vue-spear-tip 0.2.14 → 0.2.15
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/.vite/manifest.json +32 -32
- package/dist/{Button-D3wxk32n.js → Button-BkzQb0g8.js} +1 -1
- package/dist/{Button-C-_LLCJ8.cjs → Button-DjuvVLMq.cjs} +1 -1
- package/dist/{CodeHighlight-hA59-wK0.js → CodeHighlight-Bh23z1uf.js} +1 -1
- package/dist/{CodeHighlight-BQkI0Qdb.cjs → CodeHighlight-C8Y-gfDc.cjs} +1 -1
- package/dist/{DateField--anXRYwD.cjs → DateField-B82HWIBS.cjs} +1 -1
- package/dist/{DateField-CbD-7nJo.js → DateField-Bw053ye0.js} +2 -2
- package/dist/{FieldComponent.vue_vue_type_script_lang-BBV9PhxZ.cjs → FieldComponent.vue_vue_type_script_lang-CeH-5wkc.cjs} +1 -1
- package/dist/{FieldComponent.vue_vue_type_script_lang-D8oglWYI.js → FieldComponent.vue_vue_type_script_lang-Cz840qnG.js} +1 -1
- package/dist/{SelectField-_DCw7asw.js → SelectField-CAXhi6l3.js} +2 -2
- package/dist/{SelectField-0sIO2oZ8.cjs → SelectField-CTGlQluA.cjs} +1 -1
- package/dist/{StringField-Dx9x3hG1.cjs → StringField-CVG8C0Va.cjs} +1 -1
- package/dist/{StringField-Q6tdcgNE.js → StringField-s9Wz67z0.js} +2 -2
- package/dist/{SwitchField-D2CUl-83.js → SwitchField-B3U3kL7v.js} +46 -43
- package/dist/SwitchField-CLF9MHBX.cjs +1 -0
- package/dist/{Tabs-Bdbmi4vp.js → Tabs-Be4PuSkW.js} +1 -1
- package/dist/{Tabs-Bs59wIyv.cjs → Tabs-DkxUPHsT.cjs} +1 -1
- package/dist/{TextField-D4LS0W8b.cjs → TextField-Cd89tDiv.cjs} +1 -1
- package/dist/{TextField-BiySwnpX.js → TextField-DPh0d_BF.js} +2 -2
- package/dist/grid-style.css +1 -1
- package/dist/{index-Cb9JNh32.js → index-C3iH518C.js} +3 -3
- package/dist/{index-C6zu8hmM.cjs → index-_vuPJ0dk.cjs} +1 -1
- package/dist/vue-spear-tip.cjs.js +1 -1
- package/dist/vue-spear-tip.css +1 -1
- package/dist/vue-spear-tip.es.js +1 -1
- package/docs/index.html +2 -2
- package/docs/static/{Button-DQufd156.js → Button-sUI9KqkY.js} +1 -1
- package/docs/static/{CodeHighlight-B3Ig4KDk.js → CodeHighlight-DaitPlT0.js} +1 -1
- package/docs/static/{DateField-C6BbToAd.js → DateField-qDHcnTNL.js} +1 -1
- package/docs/static/{FieldComponent.vue_vue_type_script_lang-DvjF0ufQ.js → FieldComponent.vue_vue_type_script_lang-Bta9r3fM.js} +1 -1
- package/docs/static/{NoSymbolIcon-BcSCXTGD.js → NoSymbolIcon-CkMqcao3.js} +1 -1
- package/docs/static/{SelectField-CIZ_xg-o.js → SelectField-CU1j3fu_.js} +1 -1
- package/docs/static/{StringField-DoqZ8gGA.js → StringField-DrzuLoiI.js} +1 -1
- package/docs/static/SwitchField-BXh1DoSh.css +1 -0
- package/docs/static/SwitchField-CYjiGtTW.js +1 -0
- package/docs/static/{Tabs-D191loy_.js → Tabs-xXm2jMOr.js} +1 -1
- package/docs/static/{TextField-o2QP_97x.js → TextField-CGJzy2V1.js} +1 -1
- package/docs/static/index-YY1vacQn.js +2 -0
- package/docs/static/{main-DkOCkEos.js → main-CjwB_FDy.js} +2 -2
- package/docs/static/main-CkcC65yN.css +1 -0
- package/package.json +1 -1
- package/dist/SwitchField-DF62AQwm.cjs +0 -1
- package/docs/static/SwitchField-D1HrNcLY.css +0 -1
- package/docs/static/SwitchField-Db23H0Im.js +0 -1
- package/docs/static/index-F0CNC5Sw.js +0 -2
- package/docs/static/main-Bqckh-QL.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var St=Object.defineProperty;var r=(t,e)=>St(t,"name",{value:e,configurable:!0});import{P as K,W as ot,V as xt,c as Dt,o as It,a as Nt,n as Et,b as Mt}from"./main-DkOCkEos.js";import{F as _t}from"./FieldComponent.vue_vue_type_script_lang-DvjF0ufQ.js";var lt="​";function Y(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}r(Y,"e");function dt(t){return(function(e){if(Array.isArray(e))return Y(e)})(t)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||(function(e,i){if(e){if(typeof e=="string")return Y(e,i);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y(e,i)}})(t)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(dt,"i");var L={isEnabled:r(function(){var t;return(t=window.TAGIFY_DEBUG)===null||t===void 0||t},"isEnabled"),log:r(function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var n;this.isEnabled()&&(n=console).log.apply(n,["[Tagify]:"].concat(dt(e)))},"log"),warn:r(function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var n;this.isEnabled()&&(n=console).warn.apply(n,["[Tagify]:"].concat(dt(e)))},"warn")},q=r(function(t,e,i,n){return t=""+t,e=""+e,n&&(t=t.trim(),e=e.trim()),i?t==e:t.toLowerCase()==e.toLowerCase()},"s"),ut=r(function(t,e){return t&&Array.isArray(t)&&t.map((function(i){return at(i,e)}))},"a");function at(t,e){var i,n={};for(i in t)e.indexOf(i)<0&&(n[i]=t[i]);return n}r(at,"o");function Z(t){return new DOMParser().parseFromString(t.trim(),"text/html").body.firstElementChild}r(Z,"r");function ct(t,e){for(e=e||"previous";t=t[e+"Sibling"];)if(t.nodeType==3)return t}r(ct,"l");function R(t){return typeof t=="string"?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/`|'/g,"'"):t}r(R,"d");function M(t){var e=Object.prototype.toString.call(t).split(" ")[1].slice(0,-1);return t===Object(t)&&e!="Array"&&e!="Function"&&e!="RegExp"&&e!="HTMLUnknownElement"}r(M,"c");function w(t,e,i){var n,s;function a(o,l){for(var d in l)if(l.hasOwnProperty(d)){if(M(l[d])){M(o[d])?a(o[d],l[d]):o[d]=Object.assign({},l[d]);continue}if(Array.isArray(l[d])){o[d]=Object.assign([],l[d]);continue}o[d]=l[d]}}return r(a,"a"),n=t,((s=Object)!=null&&typeof Symbol<"u"&&s[Symbol.hasInstance]?s[Symbol.hasInstance](n):n instanceof s)||(t={}),a(t,e),i&&a(t,i),t}r(w,"u");function gt(){var t=[],e={},i=!0,n=!1,s=void 0;try{for(var a,o=arguments[Symbol.iterator]();!(i=(a=o.next()).done);i=!0){var l=a.value,d=!0,u=!1,c=void 0;try{for(var g,h=l[Symbol.iterator]();!(d=(g=h.next()).done);d=!0){var f=g.value;M(f)?e[f.value]||(t.push(f),e[f.value]=1):t.includes(f)||t.push(f)}}catch(p){u=!0,c=p}finally{try{d||h.return==null||h.return()}finally{if(u)throw c}}}}catch(p){n=!0,s=p}finally{try{i||o.return==null||o.return()}finally{if(n)throw s}}return t}r(gt,"g");function J(t){return String.prototype.normalize?typeof t=="string"?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):void 0:t}r(J,"h");var ht=r(function(){return/(?=.*chrome)(?=.*android)/i.test(navigator.userAgent)},"p");function pt(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,(function(t){return(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)}))}r(pt,"f");function B(t){var e,i=wt.call(this,t),n=t==null||(e=t.classList)===null||e===void 0?void 0:e.contains(this.settings.classNames.tag);return i&&n}r(B,"m");function ft(t){return wt.call(this,t)&&t?.closest(this.settings.classNames.tagSelector)}r(ft,"v");function wt(t){var e;return(t==null||(e=t.closest)===null||e===void 0?void 0:e.call(t,this.settings.classNames.namespaceSelector))===this.DOM.scope}r(wt,"b");function Tt(t,e){var i=window.getSelection();return e=e||i.getRangeAt(0),typeof t=="string"&&(t=document.createTextNode(t)),e&&(e.deleteContents(),e.insertNode(t)),t}r(Tt,"w");function y(t,e,i){return t?(e&&(t.__tagifyTagData=i?e:w({},t.__tagifyTagData||{},e)),t.__tagifyTagData):(L.warn("tag element doesn't exist",{tagElm:t,data:e}),e)}r(y,"y");function V(t){if(t&&t.parentNode){var e=t,i=window.getSelection(),n=i.getRangeAt(0);i.rangeCount&&(n.setStartAfter(e),n.collapse(!0),i.removeAllRanges(),i.addRange(n))}}r(V,"T");function Ot(t,e){t.forEach((function(i){if(y(i.previousSibling)||!i.previousSibling){var n=document.createTextNode("");i.before(n),e&&V(n)}}))}r(Ot,"O");var tt={delimiters:",",pattern:null,tagTextProp:"value",maxTags:1/0,callbacks:{},addTagOnBlur:!0,addTagOn:["blur","tab","enter"],onChangeAfterBlur:!0,duplicates:!1,whitelist:[],blacklist:[],enforceWhitelist:!1,userInput:!0,focusable:!0,focusInputOnRemove:!0,keepInvalidTags:!1,createInvalidTags:!0,mixTagsAllowedAfter:/,|\.|\:|\s/,mixTagsInterpolator:["[[","]]"],backspace:!0,skipInvalid:!1,pasteAsTags:!0,editTags:{clicks:2,keepInvalid:!0},transformTag:r(function(){},"transformTag"),trim:!0,a11y:{focusableTags:!1},mixMode:{insertAfterTag:" "},autoComplete:{enabled:!0,rightKey:!1,tabKey:!1},classNames:{namespace:"tagify",mixMode:"tagify--mix",selectMode:"tagify--select",input:"tagify__input",focus:"tagify--focus",tagNoAnimation:"tagify--noAnim",tagInvalid:"tagify--invalid",tagNotAllowed:"tagify--notAllowed",scopeLoading:"tagify--loading",hasMaxTags:"tagify--hasMaxTags",hasNoTags:"tagify--noTags",empty:"tagify--empty",inputInvalid:"tagify__input--invalid",dropdown:"tagify__dropdown",dropdownWrapper:"tagify__dropdown__wrapper",dropdownHeader:"tagify__dropdown__header",dropdownFooter:"tagify__dropdown__footer",dropdownItem:"tagify__dropdown__item",dropdownItemActive:"tagify__dropdown__item--active",dropdownItemHidden:"tagify__dropdown__item--hidden",dropdownItemSelected:"tagify__dropdown__item--selected",dropdownInital:"tagify__dropdown--initial",tag:"tagify__tag",tagText:"tagify__tag-text",tagX:"tagify__tag__removeBtn",tagLoading:"tagify__tag--loading",tagEditing:"tagify__tag--editable",tagFlash:"tagify__tag--flash",tagHide:"tagify__tag--hide"},dropdown:{classname:"",enabled:2,maxItems:10,searchKeys:["value","searchBy"],fuzzySearch:!0,caseSensitive:!1,accentedSearch:!0,includeSelectedTags:!1,escapeHTML:!0,highlightFirst:!0,closeOnSelect:!0,clearOnSelect:!0,position:"all",appendTarget:null},hooks:{beforeRemoveTag:r(function(){return Promise.resolve()},"beforeRemoveTag"),beforePaste:r(function(){return Promise.resolve()},"beforePaste"),suggestionClick:r(function(){return Promise.resolve()},"suggestionClick"),beforeKeyDown:r(function(){return Promise.resolve()},"beforeKeyDown")}};function At(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r(At,"x");function Ct(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter((function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})))),n.forEach((function(s){At(t,s,i[s])}))}return t}r(Ct,"S");function kt(t,e){return e=e??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):(function(i,n){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(i);s.push.apply(s,a)}return s})(Object(e)).forEach((function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))})),t}r(kt,"I");function et(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}r(et,"E");function Vt(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r(Vt,"M");function Lt(t){return(function(e){if(Array.isArray(e))return et(e)})(t)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||(function(e,i){if(e){if(typeof e=="string")return et(e,i);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return et(e,i)}})(t)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(Lt,"N");function Pt(){for(var t in this.dropdown={},this._dropdown)this.dropdown[t]=typeof this._dropdown[t]=="function"?this._dropdown[t].bind(this):this._dropdown[t];this.dropdown.refs(),this.DOM.dropdown.__tagify=this}r(Pt,"A");var $,H,jt=($=(function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter((function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})))),n.forEach((function(s){Vt(t,s,i[s])}))}return t})({},{events:{binding:r(function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],e=this.dropdown.events.callbacks,i=this.listeners.dropdown=this.listeners.dropdown||{position:this.dropdown.position.bind(this,null),onKeyDown:e.onKeyDown.bind(this),onMouseOver:e.onMouseOver.bind(this),onMouseLeave:e.onMouseLeave.bind(this),onClick:e.onClick.bind(this),onScroll:e.onScroll.bind(this)},n=t?"addEventListener":"removeEventListener";this.settings.dropdown.position!="manual"&&(document[n]("scroll",i.position,!0),window[n]("resize",i.position),window[n]("keydown",i.onKeyDown)),this.DOM.dropdown[n]("mouseover",i.onMouseOver),this.DOM.dropdown[n]("mouseleave",i.onMouseLeave),this.DOM.dropdown[n]("mousedown",i.onClick),this.DOM.dropdown.content[n]("scroll",i.onScroll)},"binding"),callbacks:{onKeyDown:r(function(t){var e=this;if(this.state.hasFocus&&!this.state.composing){var i=this.settings,n=i.dropdown.includeSelectedTags,s=this.DOM.dropdown.querySelector(i.classNames.dropdownItemActiveSelector),a=this.dropdown.getSuggestionDataByNode(s),o=i.mode=="mix",l=i.mode=="select";i.hooks.beforeKeyDown(t,{tagify:this}).then((function(d){switch(t.key){case"ArrowDown":case"ArrowUp":case"Down":case"Up":t.preventDefault();var u=e.dropdown.getAllSuggestionsRefs(),c=t.key=="ArrowUp"||t.key=="Up";s&&(s=e.dropdown.getNextOrPrevOption(s,!c)),s&&s.matches(i.classNames.dropdownItemSelector)||(s=u[c?u.length-1:0]),e.dropdown.highlightOption(s,!0);break;case"PageUp":case"PageDown":var g;t.preventDefault();var h=e.dropdown.getAllSuggestionsRefs(),f=Math.floor(e.DOM.dropdown.content.clientHeight/((g=h[0])===null||g===void 0?void 0:g.offsetHeight))||1,p=t.key==="PageUp";if(s){var m=h.indexOf(s),v=p?Math.max(0,m-f):Math.min(h.length-1,m+f);s=h[v]}else s=h[0];e.dropdown.highlightOption(s,!0);break;case"Home":case"End":t.preventDefault();var T=e.dropdown.getAllSuggestionsRefs();s=T[t.key==="Home"?0:T.length-1],e.dropdown.highlightOption(s,!0);break;case"Escape":case"Esc":e.dropdown.hide();break;case"ArrowRight":if(e.state.actions.ArrowLeft||i.autoComplete.rightKey)return;case"Tab":var D=!i.autoComplete.rightKey||!i.autoComplete.tabKey;if(!o&&!l&&s&&D&&!e.state.editing&&a){t.preventDefault();var I=e.dropdown.getMappedValue(a);return e.state.autoCompleteData=a,e.input.autocomplete.set.call(e,I),!1}return!0;case"Enter":t.preventDefault(),e.state.actions.selectOption=!0,setTimeout((function(){return e.state.actions.selectOption=!1}),100),i.hooks.suggestionClick(t,{tagify:e,tagData:a,suggestionElm:s}).then((function(){if(s){var b=n?s:e.dropdown.getNextOrPrevOption(s,!c);e.dropdown.selectOption(s,t,(function(){if(b){var k=b.getAttribute("value");b=e.dropdown.getSuggestionNodeByValue(k),e.dropdown.highlightOption(b)}}))}else e.dropdown.hide(),o||e.addTags(e.state.inputText.trim(),!0)})).catch((function(b){return L.warn(b)}));break;case"Backspace":if(o||e.state.editing.scope)return;var N=e.input.raw.call(e);N!=""&&N.charCodeAt(0)!=8203||(i.backspace===!0?e.removeTags():i.backspace=="edit"&&setTimeout(e.editTag.bind(e),0))}}))}},"onKeyDown"),onMouseOver:r(function(t){var e=t.target.closest(this.settings.classNames.dropdownItemSelector);this.dropdown.highlightOption(e)},"onMouseOver"),onMouseLeave:r(function(t){this.dropdown.highlightOption()},"onMouseLeave"),onClick:r(function(t){var e=this;if(t.button==0&&t.target!=this.DOM.dropdown&&t.target!=this.DOM.dropdown.content){var i=t.target.closest(this.settings.classNames.dropdownItemSelector),n=this.dropdown.getSuggestionDataByNode(i);this.state.actions.selectOption=!0,setTimeout((function(){return e.state.actions.selectOption=!1}),100),this.settings.hooks.suggestionClick(t,{tagify:this,tagData:n,suggestionElm:i}).then((function(){i?e.dropdown.selectOption(i,t):e.dropdown.hide()})).catch((function(s){return L.warn(s)}))}},"onClick"),onScroll:r(function(t){var e=t.target,i=e.scrollTop/(e.scrollHeight-e.parentNode.clientHeight)*100;this.trigger("dropdown:scroll",{percentage:Math.round(i)})},"onScroll")}},refilter:r(function(t){t=t||this.state.dropdown.query||"",this.suggestedListItems=this.dropdown.filterListItems(t),this.dropdown.fill(),this.suggestedListItems.length||this.dropdown.hide(),this.trigger("dropdown:updated",this.DOM.dropdown)},"refilter"),getSuggestionDataByNode:r(function(t){for(var e,i=t&&t.getAttribute("value"),n=this.suggestedListItems.length;n--;){if(M(e=this.suggestedListItems[n])&&e.value==i)return e;if(e==i)return{value:e}}},"getSuggestionDataByNode"),getSuggestionNodeByValue:r(function(t){return this.dropdown.getAllSuggestionsRefs().find((function(e){return e.getAttribute("value")===t}))},"getSuggestionNodeByValue"),getNextOrPrevOption:r(function(t){var e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.dropdown.getAllSuggestionsRefs(),n=i.findIndex((function(s){return s===t}));return e?i[n+1]:i[n-1]},"getNextOrPrevOption"),highlightOption:r(function(t,e){var i,n=this.settings.classNames.dropdownItemActive;if(this.state.ddItemElm&&(this.state.ddItemElm.classList.remove(n),this.state.ddItemElm.removeAttribute("aria-selected")),!t)return this.state.ddItemData=null,this.state.ddItemElm=null,void this.input.autocomplete.suggest.call(this);i=this.dropdown.getSuggestionDataByNode(t),this.state.ddItemData=i,this.state.ddItemElm=t,t.classList.add(n),t.setAttribute("aria-selected",!0),e&&(t.parentNode.scrollTop=t.clientHeight+t.offsetTop-t.parentNode.clientHeight),this.settings.autoComplete&&(this.input.autocomplete.suggest.call(this,i),this.dropdown.position())},"highlightOption"),selectOption:r(function(t,e,i){var n=this,s=this.settings,a=s.dropdown.includeSelectedTags,o=s.dropdown,l=o.clearOnSelect,d=o.closeOnSelect;if(!t)return this.addTags(this.state.inputText,!0),void(d&&this.dropdown.hide());e=e||{};var u=t.getAttribute("value"),c=u=="noMatch",g=s.mode=="mix",h=this.suggestedListItems.find((function(p){var m;return((m=p.value)!==null&&m!==void 0?m:p)==u}));if(this.trigger("dropdown:select",{data:h,elm:t,event:e}),h||c){if(this.state.editing){var f=this.normalizeTags([h])[0];h=s.transformTag.call(this,f)||f,this.onEditTagDone(null,w({__isValid:!0},h))}else this[g?"addMixTags":"addTags"]([h||this.input.raw.call(this)],l);(g||this.DOM.input.parentNode)&&(setTimeout((function(){n.DOM.input.focus(),n.toggleFocusClass(!0)})),d&&setTimeout(this.dropdown.hide.bind(this)),a?i&&i():(t.addEventListener("transitionend",(function(){n.dropdown.fillHeaderFooter(),setTimeout((function(){t.remove(),n.dropdown.refilter(),i&&i()}),100)}),{once:!0}),t.classList.add(this.settings.classNames.dropdownItemHidden)))}else d&&setTimeout(this.dropdown.hide.bind(this))},"selectOption"),selectAll:r(function(t){this.suggestedListItems.length=0,this.dropdown.hide(),this.dropdown.filterListItems("");var e=this.dropdown.filterListItems("");return t||(e=this.state.dropdown.suggestions),this.addTags(e,!0),this},"selectAll"),filterListItems:r(function(t,e){var i,n,s,a,o,l,d=r(function(){var b,k,P=void 0,j=void 0;b=p[I],n=((k=Object)!=null&&typeof Symbol<"u"&&k[Symbol.hasInstance]?k[Symbol.hasInstance](b):b instanceof k)?p[I]:{value:p[I]};var O,S=Object.keys(n).some((function(x){return D.includes(x)}))?D:["value"];g.fuzzySearch&&!e.exact?(a=S.reduce((function(x,E){return x+" "+(n[E]||"")}),"").toLowerCase().trim(),g.accentedSearch&&(a=J(a),l=J(l)),P=a.indexOf(l)==0,j=a===l,O=a,s=l.toLowerCase().split(" ").every((function(x){return O.includes(x.toLowerCase())}))):(P=!0,s=S.some((function(x){var E=""+(n[x]||"");return g.accentedSearch&&(E=J(E),l=J(l)),g.caseSensitive||(E=E.toLowerCase()),j=E===l,e.exact?E===l:E.indexOf(l)==0}))),o=!g.includeSelectedTags&&i.isTagDuplicate(M(n)?n.value:n),s&&!o&&(j&&P?f.push(n):g.sortby=="startsWith"&&P?h.unshift(n):h.push(n))},"l"),u=this,c=this.settings,g=c.dropdown,h=(e=e||{},[]),f=[],p=c.whitelist,m=g.maxItems>=0?g.maxItems:1/0,v=g.includeSelectedTags,T=typeof g.sortby=="function",D=g.searchKeys,I=0;if(!(t=c.mode=="select"&&this.value.length&&this.value[0][c.tagTextProp]==t?"":t)||!D.length){h=v?p:p.filter((function(b){return!u.isTagDuplicate(M(b)?b.value:b)}));var N=T?g.sortby(h,l):h.slice(0,m);return this.state.dropdown.suggestions=N,N}for(l=g.caseSensitive?""+t:(""+t).toLowerCase();I<p.length;I++)i=this,d();return this.state.dropdown.suggestions=f.concat(h),N=T?g.sortby(f.concat(h),l):f.concat(h).slice(0,m),this.state.dropdown.suggestions=N,N},"filterListItems"),getMappedValue:r(function(t){var e=this.settings.dropdown.mapValueTo;return e?typeof e=="function"?e(t):t[e]||t.value:t.value},"getMappedValue"),createListHTML:r(function(t){var e=this;return w([],t).map((function(i,n){typeof i!="string"&&typeof i!="number"||(i={value:i});var s=e.dropdown.getMappedValue(i);return s=typeof s=="string"&&e.settings.dropdown.escapeHTML?R(s):s,e.settings.templates.dropdownItem.apply(e,[kt(Ct({},i),{mappedValue:s}),e])})).join("")},"createListHTML")}),H=(H={refs:r(function(){this.DOM.dropdown=this.parseTemplate("dropdown",[this.settings]),this.DOM.dropdown.content=this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-wrapper']")},"refs"),getHeaderRef:r(function(){return this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-header']")},"getHeaderRef"),getFooterRef:r(function(){return this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-footer']")},"getFooterRef"),getAllSuggestionsRefs:r(function(){return Lt(this.DOM.dropdown.content.querySelectorAll(this.settings.classNames.dropdownItemSelector))},"getAllSuggestionsRefs"),show:r(function(t){var e,i,n,s=this,a=this.settings,o=a.mode=="mix"&&!a.enforceWhitelist,l=!a.whitelist||!a.whitelist.length,d=a.dropdown.position=="manual";if(t=t===void 0?this.state.inputText:t,!(l&&!o&&!a.templates.dropdownItemNoMatch||a.dropdown.enabled===!1||this.state.isLoading||this.settings.readonly)){if(clearTimeout(this.dropdownHide__bindEventsTimeout),this.suggestedListItems=this.dropdown.filterListItems(t),t&&!this.suggestedListItems.length&&(this.trigger("dropdown:noMatch",t),a.templates.dropdownItemNoMatch&&(n=a.templates.dropdownItemNoMatch.call(this,{value:t}))),!n){if(this.suggestedListItems.length)t&&o&&!this.state.editing.scope&&!q(this.suggestedListItems[0].value,t)&&this.suggestedListItems.unshift({value:t});else{if(!t||!o||this.state.editing.scope)return this.input.autocomplete.suggest.call(this),void this.dropdown.hide();this.suggestedListItems=[{value:t}]}i=""+(M(e=this.suggestedListItems[0])?e.value:e),a.autoComplete&&i&&i.indexOf(t)==0&&this.input.autocomplete.suggest.call(this,e)}this.dropdown.fill(n),a.dropdown.highlightFirst&&this.dropdown.highlightOption(this.DOM.dropdown.content.querySelector(a.classNames.dropdownItemSelector)),this.state.dropdown.visible||setTimeout(this.dropdown.events.binding.bind(this)),this.state.dropdown.visible=t||!0,this.state.dropdown.query=t,this.setStateSelection(),d||setTimeout((function(){s.dropdown.position(),s.dropdown.render()})),setTimeout((function(){s.trigger("dropdown:show",s.DOM.dropdown)}))}},"show"),hide:r(function(t){var e=this,i=this.DOM,n=i.scope,s=i.dropdown,a=this.settings.dropdown.position=="manual"&&!t;if(s&&document.body.contains(s)&&!a)return window.removeEventListener("resize",this.dropdown.position),this.dropdown.events.binding.call(this,!1),n.setAttribute("aria-expanded",!1),s.parentNode.removeChild(s),setTimeout((function(){e.state.dropdown.visible=!1}),100),this.state.dropdown.query=this.state.ddItemData=this.state.ddItemElm=this.state.selection=null,this.state.tag&&this.state.tag.value.length&&(this.state.flaggedTags[this.state.tag.baseOffset]=this.state.tag),this.trigger("dropdown:hide",s),this},"hide"),toggle:r(function(t){this.dropdown[this.state.dropdown.visible&&!t?"hide":"show"]()},"toggle"),getAppendTarget:r(function(){var t=this.settings.dropdown;return typeof t.appendTarget=="function"?t.appendTarget():t.appendTarget},"getAppendTarget"),render:r(function(){var t,e,i,n=this,s=(t=this.DOM.dropdown,(i=t.cloneNode(!0)).style.cssText="position:fixed; top:-9999px; opacity:0",document.body.appendChild(i),e=i.clientHeight,i.parentNode.removeChild(i),e),a=this.settings,o=this.dropdown.getAppendTarget();return a.dropdown.enabled===!1||(this.DOM.scope.setAttribute("aria-expanded",!0),document.body.contains(this.DOM.dropdown)||(this.DOM.dropdown.classList.add(a.classNames.dropdownInital),this.dropdown.position(s),o.appendChild(this.DOM.dropdown),setTimeout((function(){return n.DOM.dropdown.classList.remove(a.classNames.dropdownInital)})))),this},"render"),fill:r(function(t){t=typeof t=="string"?t:this.dropdown.createListHTML(t||this.suggestedListItems);var e,i=this.settings.templates.dropdownContent.call(this,t);this.DOM.dropdown.content.innerHTML=(e=i)?e.replace(/\>[\r\n ]+\</g,"><").split(/>\s+</).join("><").trim():""},"fill"),fillHeaderFooter:r(function(){var t=this.dropdown.filterListItems(this.state.dropdown.query),e=this.parseTemplate("dropdownHeader",[t]),i=this.parseTemplate("dropdownFooter",[t]),n=this.dropdown.getHeaderRef(),s=this.dropdown.getFooterRef();e&&n?.parentNode.replaceChild(e,n),i&&s?.parentNode.replaceChild(i,s)},"fillHeaderFooter"),position:r(function(t){var e=this.settings.dropdown,i=this.dropdown.getAppendTarget();if(e.position!="manual"&&i){var n,s,a,o,l,d,u,c,g,h,f=this.DOM.dropdown,p=e.RTL,m=i===document.body,v=i===this.DOM.scope,T=m?window.pageYOffset:i.scrollTop,D=document.fullscreenElement||document.webkitFullscreenElement||document.documentElement,I=D.clientHeight,N=Math.max(D.clientWidth||0,window.innerWidth||0),b=N>480?e.position:"all",k=this.DOM[b=="input"?"input":"scope"];if(t=t||f.clientHeight,this.state.dropdown.visible){if(b=="text"?(a=(n=(function(){var O=document.getSelection();if(O.rangeCount){var S,x,E=O.getRangeAt(0),z=E.startContainer,Q=E.startOffset;if(Q>0)return(x=document.createRange()).setStart(z,Q-1),x.setEnd(z,Q),{left:(S=x.getBoundingClientRect()).right,top:S.top,bottom:S.bottom};if(z.getBoundingClientRect)return z.getBoundingClientRect()}return{left:-9999,top:-9999}})()).bottom,s=n.top,o=n.left,l="auto"):(d=(function(O){var S=0,x=0;for(O=O.parentNode;O&&O!=D;)S+=O.offsetTop||0,x+=O.offsetLeft||0,O=O.parentNode;return{top:S,left:x}})(i),n=k.getBoundingClientRect(),s=v?-1:n.top-d.top,a=(v?n.height:n.bottom-d.top)-1,o=v?-1:n.left-d.left,l=n.width+"px"),!m){var P=(function(){for(var O=0,S=e.appendTarget.parentNode;S;)O+=S.scrollTop||0,S=S.parentNode;return O})();s+=P,a+=P}var j;s=Math.floor(s),a=Math.ceil(a),c=N-o<120,g=((u=(j=e.placeAbove)!==null&&j!==void 0?j:I-n.bottom<t)?s:a)+T,h=o+(p&&n.width||0)+window.pageXOffset,h=b=="text"&&c?"right: 0;":"left: ".concat(h,"px;"),f.style.cssText="".concat(h," top: ").concat(g,"px; min-width: ").concat(l,"; max-width: ").concat(l),f.setAttribute("placement",u?"top":"bottom"),f.setAttribute("position",b)}}},"position")})!=null?H:{},Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(H)):(function(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);i.push.apply(i,n)}return i})(Object(H)).forEach((function(t){Object.defineProperty($,t,Object.getOwnPropertyDescriptor(H,t))})),$),U="@yaireo/tagify/",Ft={empty:"empty",exceed:"number of tags exceeded",pattern:"pattern mismatch",duplicate:"already exists",notAllowed:"not allowed"},Rt={wrapper:r(function(t,e){return'<tags class="'.concat(e.classNames.namespace," ").concat(e.mode?"".concat(e.classNames[e.mode+"Mode"]):""," ").concat(t.className,`"
|
|
1
|
+
var St=Object.defineProperty;var r=(t,e)=>St(t,"name",{value:e,configurable:!0});import{P as K,W as ot,V as xt,c as Dt,o as It,a as Nt,n as Et,b as Mt}from"./main-CjwB_FDy.js";import{F as _t}from"./FieldComponent.vue_vue_type_script_lang-Bta9r3fM.js";var lt="​";function Y(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}r(Y,"e");function dt(t){return(function(e){if(Array.isArray(e))return Y(e)})(t)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||(function(e,i){if(e){if(typeof e=="string")return Y(e,i);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y(e,i)}})(t)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(dt,"i");var L={isEnabled:r(function(){var t;return(t=window.TAGIFY_DEBUG)===null||t===void 0||t},"isEnabled"),log:r(function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var n;this.isEnabled()&&(n=console).log.apply(n,["[Tagify]:"].concat(dt(e)))},"log"),warn:r(function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var n;this.isEnabled()&&(n=console).warn.apply(n,["[Tagify]:"].concat(dt(e)))},"warn")},q=r(function(t,e,i,n){return t=""+t,e=""+e,n&&(t=t.trim(),e=e.trim()),i?t==e:t.toLowerCase()==e.toLowerCase()},"s"),ut=r(function(t,e){return t&&Array.isArray(t)&&t.map((function(i){return at(i,e)}))},"a");function at(t,e){var i,n={};for(i in t)e.indexOf(i)<0&&(n[i]=t[i]);return n}r(at,"o");function Z(t){return new DOMParser().parseFromString(t.trim(),"text/html").body.firstElementChild}r(Z,"r");function ct(t,e){for(e=e||"previous";t=t[e+"Sibling"];)if(t.nodeType==3)return t}r(ct,"l");function R(t){return typeof t=="string"?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/`|'/g,"'"):t}r(R,"d");function M(t){var e=Object.prototype.toString.call(t).split(" ")[1].slice(0,-1);return t===Object(t)&&e!="Array"&&e!="Function"&&e!="RegExp"&&e!="HTMLUnknownElement"}r(M,"c");function w(t,e,i){var n,s;function a(o,l){for(var d in l)if(l.hasOwnProperty(d)){if(M(l[d])){M(o[d])?a(o[d],l[d]):o[d]=Object.assign({},l[d]);continue}if(Array.isArray(l[d])){o[d]=Object.assign([],l[d]);continue}o[d]=l[d]}}return r(a,"a"),n=t,((s=Object)!=null&&typeof Symbol<"u"&&s[Symbol.hasInstance]?s[Symbol.hasInstance](n):n instanceof s)||(t={}),a(t,e),i&&a(t,i),t}r(w,"u");function gt(){var t=[],e={},i=!0,n=!1,s=void 0;try{for(var a,o=arguments[Symbol.iterator]();!(i=(a=o.next()).done);i=!0){var l=a.value,d=!0,u=!1,c=void 0;try{for(var g,h=l[Symbol.iterator]();!(d=(g=h.next()).done);d=!0){var f=g.value;M(f)?e[f.value]||(t.push(f),e[f.value]=1):t.includes(f)||t.push(f)}}catch(p){u=!0,c=p}finally{try{d||h.return==null||h.return()}finally{if(u)throw c}}}}catch(p){n=!0,s=p}finally{try{i||o.return==null||o.return()}finally{if(n)throw s}}return t}r(gt,"g");function J(t){return String.prototype.normalize?typeof t=="string"?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):void 0:t}r(J,"h");var ht=r(function(){return/(?=.*chrome)(?=.*android)/i.test(navigator.userAgent)},"p");function pt(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,(function(t){return(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)}))}r(pt,"f");function B(t){var e,i=wt.call(this,t),n=t==null||(e=t.classList)===null||e===void 0?void 0:e.contains(this.settings.classNames.tag);return i&&n}r(B,"m");function ft(t){return wt.call(this,t)&&t?.closest(this.settings.classNames.tagSelector)}r(ft,"v");function wt(t){var e;return(t==null||(e=t.closest)===null||e===void 0?void 0:e.call(t,this.settings.classNames.namespaceSelector))===this.DOM.scope}r(wt,"b");function Tt(t,e){var i=window.getSelection();return e=e||i.getRangeAt(0),typeof t=="string"&&(t=document.createTextNode(t)),e&&(e.deleteContents(),e.insertNode(t)),t}r(Tt,"w");function y(t,e,i){return t?(e&&(t.__tagifyTagData=i?e:w({},t.__tagifyTagData||{},e)),t.__tagifyTagData):(L.warn("tag element doesn't exist",{tagElm:t,data:e}),e)}r(y,"y");function V(t){if(t&&t.parentNode){var e=t,i=window.getSelection(),n=i.getRangeAt(0);i.rangeCount&&(n.setStartAfter(e),n.collapse(!0),i.removeAllRanges(),i.addRange(n))}}r(V,"T");function Ot(t,e){t.forEach((function(i){if(y(i.previousSibling)||!i.previousSibling){var n=document.createTextNode("");i.before(n),e&&V(n)}}))}r(Ot,"O");var tt={delimiters:",",pattern:null,tagTextProp:"value",maxTags:1/0,callbacks:{},addTagOnBlur:!0,addTagOn:["blur","tab","enter"],onChangeAfterBlur:!0,duplicates:!1,whitelist:[],blacklist:[],enforceWhitelist:!1,userInput:!0,focusable:!0,focusInputOnRemove:!0,keepInvalidTags:!1,createInvalidTags:!0,mixTagsAllowedAfter:/,|\.|\:|\s/,mixTagsInterpolator:["[[","]]"],backspace:!0,skipInvalid:!1,pasteAsTags:!0,editTags:{clicks:2,keepInvalid:!0},transformTag:r(function(){},"transformTag"),trim:!0,a11y:{focusableTags:!1},mixMode:{insertAfterTag:" "},autoComplete:{enabled:!0,rightKey:!1,tabKey:!1},classNames:{namespace:"tagify",mixMode:"tagify--mix",selectMode:"tagify--select",input:"tagify__input",focus:"tagify--focus",tagNoAnimation:"tagify--noAnim",tagInvalid:"tagify--invalid",tagNotAllowed:"tagify--notAllowed",scopeLoading:"tagify--loading",hasMaxTags:"tagify--hasMaxTags",hasNoTags:"tagify--noTags",empty:"tagify--empty",inputInvalid:"tagify__input--invalid",dropdown:"tagify__dropdown",dropdownWrapper:"tagify__dropdown__wrapper",dropdownHeader:"tagify__dropdown__header",dropdownFooter:"tagify__dropdown__footer",dropdownItem:"tagify__dropdown__item",dropdownItemActive:"tagify__dropdown__item--active",dropdownItemHidden:"tagify__dropdown__item--hidden",dropdownItemSelected:"tagify__dropdown__item--selected",dropdownInital:"tagify__dropdown--initial",tag:"tagify__tag",tagText:"tagify__tag-text",tagX:"tagify__tag__removeBtn",tagLoading:"tagify__tag--loading",tagEditing:"tagify__tag--editable",tagFlash:"tagify__tag--flash",tagHide:"tagify__tag--hide"},dropdown:{classname:"",enabled:2,maxItems:10,searchKeys:["value","searchBy"],fuzzySearch:!0,caseSensitive:!1,accentedSearch:!0,includeSelectedTags:!1,escapeHTML:!0,highlightFirst:!0,closeOnSelect:!0,clearOnSelect:!0,position:"all",appendTarget:null},hooks:{beforeRemoveTag:r(function(){return Promise.resolve()},"beforeRemoveTag"),beforePaste:r(function(){return Promise.resolve()},"beforePaste"),suggestionClick:r(function(){return Promise.resolve()},"suggestionClick"),beforeKeyDown:r(function(){return Promise.resolve()},"beforeKeyDown")}};function At(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r(At,"x");function Ct(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter((function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})))),n.forEach((function(s){At(t,s,i[s])}))}return t}r(Ct,"S");function kt(t,e){return e=e??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):(function(i,n){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(i);s.push.apply(s,a)}return s})(Object(e)).forEach((function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))})),t}r(kt,"I");function et(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}r(et,"E");function Vt(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r(Vt,"M");function Lt(t){return(function(e){if(Array.isArray(e))return et(e)})(t)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||(function(e,i){if(e){if(typeof e=="string")return et(e,i);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return et(e,i)}})(t)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(Lt,"N");function Pt(){for(var t in this.dropdown={},this._dropdown)this.dropdown[t]=typeof this._dropdown[t]=="function"?this._dropdown[t].bind(this):this._dropdown[t];this.dropdown.refs(),this.DOM.dropdown.__tagify=this}r(Pt,"A");var $,H,jt=($=(function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter((function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})))),n.forEach((function(s){Vt(t,s,i[s])}))}return t})({},{events:{binding:r(function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],e=this.dropdown.events.callbacks,i=this.listeners.dropdown=this.listeners.dropdown||{position:this.dropdown.position.bind(this,null),onKeyDown:e.onKeyDown.bind(this),onMouseOver:e.onMouseOver.bind(this),onMouseLeave:e.onMouseLeave.bind(this),onClick:e.onClick.bind(this),onScroll:e.onScroll.bind(this)},n=t?"addEventListener":"removeEventListener";this.settings.dropdown.position!="manual"&&(document[n]("scroll",i.position,!0),window[n]("resize",i.position),window[n]("keydown",i.onKeyDown)),this.DOM.dropdown[n]("mouseover",i.onMouseOver),this.DOM.dropdown[n]("mouseleave",i.onMouseLeave),this.DOM.dropdown[n]("mousedown",i.onClick),this.DOM.dropdown.content[n]("scroll",i.onScroll)},"binding"),callbacks:{onKeyDown:r(function(t){var e=this;if(this.state.hasFocus&&!this.state.composing){var i=this.settings,n=i.dropdown.includeSelectedTags,s=this.DOM.dropdown.querySelector(i.classNames.dropdownItemActiveSelector),a=this.dropdown.getSuggestionDataByNode(s),o=i.mode=="mix",l=i.mode=="select";i.hooks.beforeKeyDown(t,{tagify:this}).then((function(d){switch(t.key){case"ArrowDown":case"ArrowUp":case"Down":case"Up":t.preventDefault();var u=e.dropdown.getAllSuggestionsRefs(),c=t.key=="ArrowUp"||t.key=="Up";s&&(s=e.dropdown.getNextOrPrevOption(s,!c)),s&&s.matches(i.classNames.dropdownItemSelector)||(s=u[c?u.length-1:0]),e.dropdown.highlightOption(s,!0);break;case"PageUp":case"PageDown":var g;t.preventDefault();var h=e.dropdown.getAllSuggestionsRefs(),f=Math.floor(e.DOM.dropdown.content.clientHeight/((g=h[0])===null||g===void 0?void 0:g.offsetHeight))||1,p=t.key==="PageUp";if(s){var m=h.indexOf(s),v=p?Math.max(0,m-f):Math.min(h.length-1,m+f);s=h[v]}else s=h[0];e.dropdown.highlightOption(s,!0);break;case"Home":case"End":t.preventDefault();var T=e.dropdown.getAllSuggestionsRefs();s=T[t.key==="Home"?0:T.length-1],e.dropdown.highlightOption(s,!0);break;case"Escape":case"Esc":e.dropdown.hide();break;case"ArrowRight":if(e.state.actions.ArrowLeft||i.autoComplete.rightKey)return;case"Tab":var D=!i.autoComplete.rightKey||!i.autoComplete.tabKey;if(!o&&!l&&s&&D&&!e.state.editing&&a){t.preventDefault();var I=e.dropdown.getMappedValue(a);return e.state.autoCompleteData=a,e.input.autocomplete.set.call(e,I),!1}return!0;case"Enter":t.preventDefault(),e.state.actions.selectOption=!0,setTimeout((function(){return e.state.actions.selectOption=!1}),100),i.hooks.suggestionClick(t,{tagify:e,tagData:a,suggestionElm:s}).then((function(){if(s){var b=n?s:e.dropdown.getNextOrPrevOption(s,!c);e.dropdown.selectOption(s,t,(function(){if(b){var k=b.getAttribute("value");b=e.dropdown.getSuggestionNodeByValue(k),e.dropdown.highlightOption(b)}}))}else e.dropdown.hide(),o||e.addTags(e.state.inputText.trim(),!0)})).catch((function(b){return L.warn(b)}));break;case"Backspace":if(o||e.state.editing.scope)return;var N=e.input.raw.call(e);N!=""&&N.charCodeAt(0)!=8203||(i.backspace===!0?e.removeTags():i.backspace=="edit"&&setTimeout(e.editTag.bind(e),0))}}))}},"onKeyDown"),onMouseOver:r(function(t){var e=t.target.closest(this.settings.classNames.dropdownItemSelector);this.dropdown.highlightOption(e)},"onMouseOver"),onMouseLeave:r(function(t){this.dropdown.highlightOption()},"onMouseLeave"),onClick:r(function(t){var e=this;if(t.button==0&&t.target!=this.DOM.dropdown&&t.target!=this.DOM.dropdown.content){var i=t.target.closest(this.settings.classNames.dropdownItemSelector),n=this.dropdown.getSuggestionDataByNode(i);this.state.actions.selectOption=!0,setTimeout((function(){return e.state.actions.selectOption=!1}),100),this.settings.hooks.suggestionClick(t,{tagify:this,tagData:n,suggestionElm:i}).then((function(){i?e.dropdown.selectOption(i,t):e.dropdown.hide()})).catch((function(s){return L.warn(s)}))}},"onClick"),onScroll:r(function(t){var e=t.target,i=e.scrollTop/(e.scrollHeight-e.parentNode.clientHeight)*100;this.trigger("dropdown:scroll",{percentage:Math.round(i)})},"onScroll")}},refilter:r(function(t){t=t||this.state.dropdown.query||"",this.suggestedListItems=this.dropdown.filterListItems(t),this.dropdown.fill(),this.suggestedListItems.length||this.dropdown.hide(),this.trigger("dropdown:updated",this.DOM.dropdown)},"refilter"),getSuggestionDataByNode:r(function(t){for(var e,i=t&&t.getAttribute("value"),n=this.suggestedListItems.length;n--;){if(M(e=this.suggestedListItems[n])&&e.value==i)return e;if(e==i)return{value:e}}},"getSuggestionDataByNode"),getSuggestionNodeByValue:r(function(t){return this.dropdown.getAllSuggestionsRefs().find((function(e){return e.getAttribute("value")===t}))},"getSuggestionNodeByValue"),getNextOrPrevOption:r(function(t){var e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.dropdown.getAllSuggestionsRefs(),n=i.findIndex((function(s){return s===t}));return e?i[n+1]:i[n-1]},"getNextOrPrevOption"),highlightOption:r(function(t,e){var i,n=this.settings.classNames.dropdownItemActive;if(this.state.ddItemElm&&(this.state.ddItemElm.classList.remove(n),this.state.ddItemElm.removeAttribute("aria-selected")),!t)return this.state.ddItemData=null,this.state.ddItemElm=null,void this.input.autocomplete.suggest.call(this);i=this.dropdown.getSuggestionDataByNode(t),this.state.ddItemData=i,this.state.ddItemElm=t,t.classList.add(n),t.setAttribute("aria-selected",!0),e&&(t.parentNode.scrollTop=t.clientHeight+t.offsetTop-t.parentNode.clientHeight),this.settings.autoComplete&&(this.input.autocomplete.suggest.call(this,i),this.dropdown.position())},"highlightOption"),selectOption:r(function(t,e,i){var n=this,s=this.settings,a=s.dropdown.includeSelectedTags,o=s.dropdown,l=o.clearOnSelect,d=o.closeOnSelect;if(!t)return this.addTags(this.state.inputText,!0),void(d&&this.dropdown.hide());e=e||{};var u=t.getAttribute("value"),c=u=="noMatch",g=s.mode=="mix",h=this.suggestedListItems.find((function(p){var m;return((m=p.value)!==null&&m!==void 0?m:p)==u}));if(this.trigger("dropdown:select",{data:h,elm:t,event:e}),h||c){if(this.state.editing){var f=this.normalizeTags([h])[0];h=s.transformTag.call(this,f)||f,this.onEditTagDone(null,w({__isValid:!0},h))}else this[g?"addMixTags":"addTags"]([h||this.input.raw.call(this)],l);(g||this.DOM.input.parentNode)&&(setTimeout((function(){n.DOM.input.focus(),n.toggleFocusClass(!0)})),d&&setTimeout(this.dropdown.hide.bind(this)),a?i&&i():(t.addEventListener("transitionend",(function(){n.dropdown.fillHeaderFooter(),setTimeout((function(){t.remove(),n.dropdown.refilter(),i&&i()}),100)}),{once:!0}),t.classList.add(this.settings.classNames.dropdownItemHidden)))}else d&&setTimeout(this.dropdown.hide.bind(this))},"selectOption"),selectAll:r(function(t){this.suggestedListItems.length=0,this.dropdown.hide(),this.dropdown.filterListItems("");var e=this.dropdown.filterListItems("");return t||(e=this.state.dropdown.suggestions),this.addTags(e,!0),this},"selectAll"),filterListItems:r(function(t,e){var i,n,s,a,o,l,d=r(function(){var b,k,P=void 0,j=void 0;b=p[I],n=((k=Object)!=null&&typeof Symbol<"u"&&k[Symbol.hasInstance]?k[Symbol.hasInstance](b):b instanceof k)?p[I]:{value:p[I]};var O,S=Object.keys(n).some((function(x){return D.includes(x)}))?D:["value"];g.fuzzySearch&&!e.exact?(a=S.reduce((function(x,E){return x+" "+(n[E]||"")}),"").toLowerCase().trim(),g.accentedSearch&&(a=J(a),l=J(l)),P=a.indexOf(l)==0,j=a===l,O=a,s=l.toLowerCase().split(" ").every((function(x){return O.includes(x.toLowerCase())}))):(P=!0,s=S.some((function(x){var E=""+(n[x]||"");return g.accentedSearch&&(E=J(E),l=J(l)),g.caseSensitive||(E=E.toLowerCase()),j=E===l,e.exact?E===l:E.indexOf(l)==0}))),o=!g.includeSelectedTags&&i.isTagDuplicate(M(n)?n.value:n),s&&!o&&(j&&P?f.push(n):g.sortby=="startsWith"&&P?h.unshift(n):h.push(n))},"l"),u=this,c=this.settings,g=c.dropdown,h=(e=e||{},[]),f=[],p=c.whitelist,m=g.maxItems>=0?g.maxItems:1/0,v=g.includeSelectedTags,T=typeof g.sortby=="function",D=g.searchKeys,I=0;if(!(t=c.mode=="select"&&this.value.length&&this.value[0][c.tagTextProp]==t?"":t)||!D.length){h=v?p:p.filter((function(b){return!u.isTagDuplicate(M(b)?b.value:b)}));var N=T?g.sortby(h,l):h.slice(0,m);return this.state.dropdown.suggestions=N,N}for(l=g.caseSensitive?""+t:(""+t).toLowerCase();I<p.length;I++)i=this,d();return this.state.dropdown.suggestions=f.concat(h),N=T?g.sortby(f.concat(h),l):f.concat(h).slice(0,m),this.state.dropdown.suggestions=N,N},"filterListItems"),getMappedValue:r(function(t){var e=this.settings.dropdown.mapValueTo;return e?typeof e=="function"?e(t):t[e]||t.value:t.value},"getMappedValue"),createListHTML:r(function(t){var e=this;return w([],t).map((function(i,n){typeof i!="string"&&typeof i!="number"||(i={value:i});var s=e.dropdown.getMappedValue(i);return s=typeof s=="string"&&e.settings.dropdown.escapeHTML?R(s):s,e.settings.templates.dropdownItem.apply(e,[kt(Ct({},i),{mappedValue:s}),e])})).join("")},"createListHTML")}),H=(H={refs:r(function(){this.DOM.dropdown=this.parseTemplate("dropdown",[this.settings]),this.DOM.dropdown.content=this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-wrapper']")},"refs"),getHeaderRef:r(function(){return this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-header']")},"getHeaderRef"),getFooterRef:r(function(){return this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-footer']")},"getFooterRef"),getAllSuggestionsRefs:r(function(){return Lt(this.DOM.dropdown.content.querySelectorAll(this.settings.classNames.dropdownItemSelector))},"getAllSuggestionsRefs"),show:r(function(t){var e,i,n,s=this,a=this.settings,o=a.mode=="mix"&&!a.enforceWhitelist,l=!a.whitelist||!a.whitelist.length,d=a.dropdown.position=="manual";if(t=t===void 0?this.state.inputText:t,!(l&&!o&&!a.templates.dropdownItemNoMatch||a.dropdown.enabled===!1||this.state.isLoading||this.settings.readonly)){if(clearTimeout(this.dropdownHide__bindEventsTimeout),this.suggestedListItems=this.dropdown.filterListItems(t),t&&!this.suggestedListItems.length&&(this.trigger("dropdown:noMatch",t),a.templates.dropdownItemNoMatch&&(n=a.templates.dropdownItemNoMatch.call(this,{value:t}))),!n){if(this.suggestedListItems.length)t&&o&&!this.state.editing.scope&&!q(this.suggestedListItems[0].value,t)&&this.suggestedListItems.unshift({value:t});else{if(!t||!o||this.state.editing.scope)return this.input.autocomplete.suggest.call(this),void this.dropdown.hide();this.suggestedListItems=[{value:t}]}i=""+(M(e=this.suggestedListItems[0])?e.value:e),a.autoComplete&&i&&i.indexOf(t)==0&&this.input.autocomplete.suggest.call(this,e)}this.dropdown.fill(n),a.dropdown.highlightFirst&&this.dropdown.highlightOption(this.DOM.dropdown.content.querySelector(a.classNames.dropdownItemSelector)),this.state.dropdown.visible||setTimeout(this.dropdown.events.binding.bind(this)),this.state.dropdown.visible=t||!0,this.state.dropdown.query=t,this.setStateSelection(),d||setTimeout((function(){s.dropdown.position(),s.dropdown.render()})),setTimeout((function(){s.trigger("dropdown:show",s.DOM.dropdown)}))}},"show"),hide:r(function(t){var e=this,i=this.DOM,n=i.scope,s=i.dropdown,a=this.settings.dropdown.position=="manual"&&!t;if(s&&document.body.contains(s)&&!a)return window.removeEventListener("resize",this.dropdown.position),this.dropdown.events.binding.call(this,!1),n.setAttribute("aria-expanded",!1),s.parentNode.removeChild(s),setTimeout((function(){e.state.dropdown.visible=!1}),100),this.state.dropdown.query=this.state.ddItemData=this.state.ddItemElm=this.state.selection=null,this.state.tag&&this.state.tag.value.length&&(this.state.flaggedTags[this.state.tag.baseOffset]=this.state.tag),this.trigger("dropdown:hide",s),this},"hide"),toggle:r(function(t){this.dropdown[this.state.dropdown.visible&&!t?"hide":"show"]()},"toggle"),getAppendTarget:r(function(){var t=this.settings.dropdown;return typeof t.appendTarget=="function"?t.appendTarget():t.appendTarget},"getAppendTarget"),render:r(function(){var t,e,i,n=this,s=(t=this.DOM.dropdown,(i=t.cloneNode(!0)).style.cssText="position:fixed; top:-9999px; opacity:0",document.body.appendChild(i),e=i.clientHeight,i.parentNode.removeChild(i),e),a=this.settings,o=this.dropdown.getAppendTarget();return a.dropdown.enabled===!1||(this.DOM.scope.setAttribute("aria-expanded",!0),document.body.contains(this.DOM.dropdown)||(this.DOM.dropdown.classList.add(a.classNames.dropdownInital),this.dropdown.position(s),o.appendChild(this.DOM.dropdown),setTimeout((function(){return n.DOM.dropdown.classList.remove(a.classNames.dropdownInital)})))),this},"render"),fill:r(function(t){t=typeof t=="string"?t:this.dropdown.createListHTML(t||this.suggestedListItems);var e,i=this.settings.templates.dropdownContent.call(this,t);this.DOM.dropdown.content.innerHTML=(e=i)?e.replace(/\>[\r\n ]+\</g,"><").split(/>\s+</).join("><").trim():""},"fill"),fillHeaderFooter:r(function(){var t=this.dropdown.filterListItems(this.state.dropdown.query),e=this.parseTemplate("dropdownHeader",[t]),i=this.parseTemplate("dropdownFooter",[t]),n=this.dropdown.getHeaderRef(),s=this.dropdown.getFooterRef();e&&n?.parentNode.replaceChild(e,n),i&&s?.parentNode.replaceChild(i,s)},"fillHeaderFooter"),position:r(function(t){var e=this.settings.dropdown,i=this.dropdown.getAppendTarget();if(e.position!="manual"&&i){var n,s,a,o,l,d,u,c,g,h,f=this.DOM.dropdown,p=e.RTL,m=i===document.body,v=i===this.DOM.scope,T=m?window.pageYOffset:i.scrollTop,D=document.fullscreenElement||document.webkitFullscreenElement||document.documentElement,I=D.clientHeight,N=Math.max(D.clientWidth||0,window.innerWidth||0),b=N>480?e.position:"all",k=this.DOM[b=="input"?"input":"scope"];if(t=t||f.clientHeight,this.state.dropdown.visible){if(b=="text"?(a=(n=(function(){var O=document.getSelection();if(O.rangeCount){var S,x,E=O.getRangeAt(0),z=E.startContainer,Q=E.startOffset;if(Q>0)return(x=document.createRange()).setStart(z,Q-1),x.setEnd(z,Q),{left:(S=x.getBoundingClientRect()).right,top:S.top,bottom:S.bottom};if(z.getBoundingClientRect)return z.getBoundingClientRect()}return{left:-9999,top:-9999}})()).bottom,s=n.top,o=n.left,l="auto"):(d=(function(O){var S=0,x=0;for(O=O.parentNode;O&&O!=D;)S+=O.offsetTop||0,x+=O.offsetLeft||0,O=O.parentNode;return{top:S,left:x}})(i),n=k.getBoundingClientRect(),s=v?-1:n.top-d.top,a=(v?n.height:n.bottom-d.top)-1,o=v?-1:n.left-d.left,l=n.width+"px"),!m){var P=(function(){for(var O=0,S=e.appendTarget.parentNode;S;)O+=S.scrollTop||0,S=S.parentNode;return O})();s+=P,a+=P}var j;s=Math.floor(s),a=Math.ceil(a),c=N-o<120,g=((u=(j=e.placeAbove)!==null&&j!==void 0?j:I-n.bottom<t)?s:a)+T,h=o+(p&&n.width||0)+window.pageXOffset,h=b=="text"&&c?"right: 0;":"left: ".concat(h,"px;"),f.style.cssText="".concat(h," top: ").concat(g,"px; min-width: ").concat(l,"; max-width: ").concat(l),f.setAttribute("placement",u?"top":"bottom"),f.setAttribute("position",b)}}},"position")})!=null?H:{},Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(H)):(function(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);i.push.apply(i,n)}return i})(Object(H)).forEach((function(t){Object.defineProperty($,t,Object.getOwnPropertyDescriptor(H,t))})),$),U="@yaireo/tagify/",Ft={empty:"empty",exceed:"number of tags exceeded",pattern:"pattern mismatch",duplicate:"already exists",notAllowed:"not allowed"},Rt={wrapper:r(function(t,e){return'<tags class="'.concat(e.classNames.namespace," ").concat(e.mode?"".concat(e.classNames[e.mode+"Mode"]):""," ").concat(t.className,`"
|
|
2
2
|
`).concat(e.readonly?"readonly":"",`
|
|
3
3
|
`).concat(e.disabled?"disabled":"",`
|
|
4
4
|
`).concat(e.required?"required":"",`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var We=Object.defineProperty;var o=(u,e)=>We(u,"name",{value:e,configurable:!0});import{i as Je,r as R,w as x,e as Qe,f as et,g as tt,h as st,t as G,j as it,c as O,o as S,a as W,P as j,C as at,V as nt,k as Z,l as X,m as de,p as je,q as ut,n as pe,s as rt,u as ce,v as lt,x as ot,y as ht,b as dt}from"./main-DkOCkEos.js";import{F as pt}from"./FieldComponent.vue_vue_type_script_lang-DvjF0ufQ.js";import{r as ct}from"./NoSymbolIcon-BcSCXTGD.js";function b(u){return typeof u=="string"||u instanceof String}o(b,"isString");function qe(u){var e;return typeof u=="object"&&u!=null&&(u==null||(e=u.constructor)==null?void 0:e.name)==="Object"}o(qe,"isObject");function Ke(u,e){return Array.isArray(e)?Ke(u,(t,s)=>e.includes(s)):Object.entries(u).reduce((t,s)=>{let[i,a]=s;return e(a,i)&&(t[i]=a),t},{})}o(Ke,"pick");const d={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function ft(u){switch(u){case d.LEFT:return d.FORCE_LEFT;case d.RIGHT:return d.FORCE_RIGHT;default:return u}}o(ft,"forceDirection");function fe(u){return u.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}o(fe,"escapeRegExp");function J(u,e){if(e===u)return!0;const t=Array.isArray(e),s=Array.isArray(u);let i;if(t&&s){if(e.length!=u.length)return!1;for(i=0;i<e.length;i++)if(!J(e[i],u[i]))return!1;return!0}if(t!=s)return!1;if(e&&u&&typeof e=="object"&&typeof u=="object"){const a=e instanceof Date,n=u instanceof Date;if(a&&n)return e.getTime()==u.getTime();if(a!=n)return!1;const r=e instanceof RegExp,l=u instanceof RegExp;if(r&&l)return e.toString()==u.toString();if(r!=l)return!1;const h=Object.keys(e);for(i=0;i<h.length;i++)if(!Object.prototype.hasOwnProperty.call(u,h[i]))return!1;for(i=0;i<h.length;i++)if(!J(u[h[i]],e[h[i]]))return!1;return!0}else if(e&&u&&typeof e=="function"&&typeof u=="function")return e.toString()===u.toString();return!1}o(J,"objectIncludes");const Fe=class Fe{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}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?d.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?d.RIGHT:d.LEFT}};o(Fe,"ActionDetails");let me=Fe;function c(u,e){return new c.InputMask(u,e)}o(c,"IMask");function He(u){if(u==null)throw new Error("mask property should be defined");return u instanceof RegExp?c.MaskedRegExp:b(u)?c.MaskedPattern:u===Date?c.MaskedDate:u===Number?c.MaskedNumber:Array.isArray(u)||u===Array?c.MaskedDynamic:c.Masked&&u.prototype instanceof c.Masked?u:c.Masked&&u instanceof c.Masked?u.constructor:u instanceof Function?c.MaskedFunction:(console.warn("Mask not found for mask",u),c.Masked)}o(He,"maskedClass");function q(u){if(!u)throw new Error("Options in not defined");if(c.Masked){if(u.prototype instanceof c.Masked)return{mask:u};const{mask:e=void 0,...t}=u instanceof c.Masked?{mask:u}:qe(u)&&u.mask instanceof c.Masked?u:{};if(e){const s=e.mask;return{...Ke(e,(i,a)=>!a.startsWith("_")),mask:e.constructor,_mask:s,...t}}}return qe(u)?{...u}:{mask:u}}o(q,"normalizeOpts");function V(u){if(c.Masked&&u instanceof c.Masked)return u;const e=q(u),t=He(e.mask);if(!t)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===t&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new t(e)}o(V,"createMask");c.createMask=V;const ye=class ye{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,t){if(!(e==null||t==null||e===this.selectionStart&&t===this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}};o(ye,"MaskElement");let z=ye;c.MaskElement=z;const ze=90,mt=89,Se=class Se extends z{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,s;return(e=(t=(s=this.input).getRootNode)==null?void 0:t.call(s))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===ze&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===mt&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===ze&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}};o(Se,"HTMLMaskElement");let U=Se;c.HTMLMaskElement=U;const Ve=class Ve extends U{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}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}};o(Ve,"HTMLInputMaskElement");let ke=Ve;c.HTMLMaskElement=U;const Be=class Be extends U{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return i==null||s==null||s<i?s:i}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return i==null||s==null||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,a=i.getSelection&&i.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}};o(Be,"HTMLContenteditableMaskElement");let Q=Be;c.HTMLContenteditableMaskElement=Q;const ne=class ne{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>ne.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}};o(ne,"InputHistory");let ee=ne;ee.MAX_LENGTH=100;const xe=class xe{constructor(e,t){this.el=e instanceof z?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new Q(e):new ke(e),this.masked=V(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new ee,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._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return e==null||((t=this.masked)==null?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof c.Masked)&&this.masked.constructor===He(e)){this.masked.updateOptions({mask:e});return}const t=e instanceof c.Masked?e:V({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("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}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,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const s=this._listeners[e];s&&s.forEach(i=>i(t))}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,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,s=this.masked.value,i=this.masked.rawInputValue,a=this.displayValue,n=this.unmaskedValue!==t||this.value!==s||this._rawInputValue!==i;this._unmaskedValue=t,this._value=s,this._rawInputValue=i,this.el.value!==a&&(this.el.value=a),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),n&&this._fireChangeEvents(),!this._historyChanging&&(n||this.history.isEmpty)&&this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...s}=e,i=!this.maskEquals(t),a=this.masked.optionsIsChanged(s);i&&(this.mask=t),a&&this.masked.updateOptions(s),(i||a)&&this.updateControl()}updateCursor(e){e!=null&&(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,d.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){this._inputEvent=e,this._abortUpdateCursor();const t=new me({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,i=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,a=s===this.masked.rawInputValue?t.removeDirection:d.NONE;let n=this.masked.nearestInputPos(t.startChangePos+i,a);a!==d.NONE&&(n=this.masked.nearestInputPos(n,d.NONE)),this.updateControl(n),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()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}};o(xe,"InputMask");let ge=xe;c.InputMask=ge;const ue=class ue{static normalize(e){return Array.isArray(e)?e:[e,new ue]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}};o(ue,"ChangeDetails");let f=ue;c.ChangeDetails=f;const be=class be{constructor(e,t,s){e===void 0&&(e=""),t===void 0&&(t=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||e!=null&&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}};o(be,"ContinuousTailDetails");let A=be;const L=class L{constructor(e){this._value="",this._update({...L.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){t===void 0&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new A(this.extractInput(e,t),e)}appendTail(e){return b(e)&&(e=new A(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new f({inserted:e,rawInserted:e})):new f}_appendChar(e,t,s){t===void 0&&(t={});const i=this.state;let a;if([e,a]=this.doPrepareChar(e,t),e&&(a=a.aggregate(this._appendCharRaw(e,t)),!a.rawInserted&&this.autofix==="pad")){const n=this.state;this.state=i;let r=this.pad(t);const l=this._appendCharRaw(e,t);r=r.aggregate(l),l.rawInserted||r.equals(a)?a=r:this.state=n}if(a.inserted){let n,r=this.doValidate(t)!==!1;if(r&&s!=null){const l=this.state;if(this.overwrite===!0){n=s.state;for(let p=0;p<a.rawInserted.length;++p)s.unshift(this.displayValue.length-a.tailShift)}let h=this.appendTail(s);if(r=h.rawInserted.length===s.toString().length,!(r&&h.inserted)&&this.overwrite==="shift"){this.state=l,n=s.state;for(let p=0;p<a.rawInserted.length;++p)s.shift();h=this.appendTail(s),r=h.rawInserted.length===s.toString().length}r&&h.inserted&&(this.state=l)}r||(a=new f,this.state=i,s&&n&&(s.state=n))}return a}_appendPlaceholder(){return new f}_appendEager(){return new f}append(e,t,s){if(!b(e))throw new Error("value should be string");const i=b(s)?new A(String(s)):s;t!=null&&t.tail&&(t._beforeTailState=this.state);let a;[e,a]=this.doPrepare(e,t);for(let n=0;n<e.length;++n){const r=this._appendChar(e[n],t,i);if(!r.rawInserted&&!this.doSkipInvalid(e[n],t,i))break;a.aggregate(r)}return(this.eager===!0||this.eager==="append")&&t!=null&&t.input&&e&&a.aggregate(this._appendEager()),i!=null&&(a.tailShift+=this.appendTail(i).tailShift),a}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new f}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,s=this.value,i=e();return this.rawInputValue=t,this.value&&this.value!==s&&s.indexOf(this.value)===0&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,i}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,s=e(this);return this.state=t,delete this._isolated,s}doSkipInvalid(e,t,s){return!!this.skipInvalid}doPrepare(e,t){return t===void 0&&(t={}),f.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return t===void 0&&(t={}),f.normalize(this.prepareChar?this.prepareChar(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)}splice(e,t,s,i,a){s===void 0&&(s=""),i===void 0&&(i=d.NONE),a===void 0&&(a={input:!0});const n=e+t,r=this.extractTail(n),l=this.eager===!0||this.eager==="remove";let h;l&&(i=ft(i),h=this.extractInput(0,n,{raw:!0}));let p=e;const k=new f;if(i!==d.NONE&&(p=this.nearestInputPos(e,t>1&&e!==0&&!l?d.NONE:i),k.tailShift=p-e),k.aggregate(this.remove(p)),l&&i!==d.NONE&&h===this.rawInputValue)if(i===d.FORCE_LEFT){let g;for(;h===this.rawInputValue&&(g=this.displayValue.length);)k.aggregate(new f({tailShift:-1})).aggregate(this.remove(g-1))}else i===d.FORCE_RIGHT&&r.unshift();return k.aggregate(this.append(s,a,r))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!J(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||L.EMPTY_VALUES.includes(e)&&L.EMPTY_VALUES.includes(t)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new f}};o(L,"Masked");let C=L;C.DEFAULTS={skipInvalid:!0};C.EMPTY_VALUES=[void 0,null,""];c.Masked=C;const D=class D{constructor(e,t){e===void 0&&(e=[]),t===void 0&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=b(e)?new A(String(e)):e;const t=this.chunks[this.chunks.length-1],s=t&&(t.stop===e.stop||e.stop==null)&&e.from===t.from+t.toString().length;if(e instanceof A)s?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof D){if(e.stop==null){let i;for(;e.chunks.length&&e.chunks[0].stop==null;)i=e.chunks.shift(),i.from+=e.from,this.extend(i)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof c.MaskedPattern))return new A(this.toString()).appendTo(e);const t=new f;for(let s=0;s<this.chunks.length;++s){const i=this.chunks[s],a=e._mapPosToBlock(e.displayValue.length),n=i.stop;let r;if(n!=null&&(!a||a.index<=n)&&((i instanceof D||e._stops.indexOf(n)>=0)&&t.aggregate(e._appendPlaceholder(n)),r=i instanceof D&&e._blocks[n]),r){const l=r.appendTail(i);t.aggregate(l);const h=i.toString().slice(l.rawInserted.length);h&&t.aggregate(e.append(h,{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,...s}=e;Object.assign(this,s),this.chunks=t.map(i=>{const a="chunks"in i?new D:new A;return a.state=i,a})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const t=e!=null?e-this.from:e;let s=0;for(;s<this.chunks.length;){const i=this.chunks[s],a=i.unshift(t);if(i.toString()){if(!a)break;++s}else this.chunks.splice(s,1);if(a)return a}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""}};o(D,"ChunksTailDetails");let te=D;const Ie=class Ie{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 e&&(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.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((t=this.block)==null?void 0:t.displayValue.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)&&(this.offset=this.block.nearestInputPos(this.offset,d.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,d.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,d.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,d.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,d.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,d.NONE),!0})}};o(Ie,"PatternCursor");let ve=Ie;const we=class we{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new f}nearestInputPos(e,t){t===void 0&&(t=d.NONE);const s=0,i=this._value.length;switch(t){case d.LEFT:case d.FORCE_LEFT:return s;case d.NONE:case d.RIGHT:case d.FORCE_RIGHT:default:return i}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),s===void 0&&(s={}),s.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new f;const s=this.eager===!0||this.eager==="append",a=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!s)&&!t.tail,n=new f({inserted:this.char,rawInserted:a?this.char:""});return this._value=this.char,this._isRawInput=a&&(t.raw||t.input),n}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new f;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new A("")}appendTail(e){return b(e)&&(e=new A(String(e))),e.appendTo(this)}append(e,t,s){const i=this._appendChar(e[0],t);return s!=null&&(i.tailShift+=this.appendTail(s).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}};o(we,"PatternFixedDefinition");let se=we;const De=class De{constructor(e){const{parent:t,isOptional:s,placeholderChar:i,displayChar:a,lazy:n,eager:r,...l}=e;this.masked=V(l),Object.assign(this,{parent:t,isOptional:s,placeholderChar:i,displayChar:a,lazy:n,eager:r})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),e===0&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new f}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new f;const s=this.masked.state;let i=this.masked._appendChar(e,this.currentMaskFlags(t));return i.inserted&&this.doValidate(t)===!1&&(i=new f,this.masked.state=s),!i.inserted&&!this.isOptional&&!this.lazy&&!t.input&&(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=!!i.inserted,i}append(e,t,s){return this.masked.append(e,this.currentMaskFlags(t),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new f:(this.isFilled=!0,new f({inserted:this.placeholderChar}))}_appendEager(){return new f}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.masked.extractInput(e,t,s)}nearestInputPos(e,t){t===void 0&&(t=d.NONE);const s=0,i=this.value.length,a=Math.min(Math.max(e,s),i);switch(t){case d.LEFT:case d.FORCE_LEFT:return this.isComplete?a:s;case d.RIGHT:case d.FORCE_RIGHT:return this.isComplete?a:i;case d.NONE:default:return a}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(e==null||(t=e._beforeTailState)==null?void 0:t.masked)||e?._beforeTailState}}pad(e){return new f}};o(De,"PatternInputDefinition");let Y=De;Y.DEFAULT_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]/,"*":/./};const Me=class Me extends C{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=s=>s.search(t)>=0),super._update(e)}};o(Me,"MaskedRegExp");let _e=Me;c.MaskedRegExp=_e;const N=class N extends C{constructor(e){super({...N.DEFAULTS,...e,definitions:Object.assign({},Y.DEFAULT_DEFINITIONS,e?.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let s=!1,i=!1;for(let a=0;a<t.length;++a){if(this.blocks){const h=t.slice(a),p=Object.keys(this.blocks).filter(g=>h.indexOf(g)===0);p.sort((g,m)=>m.length-g.length);const k=p[0];if(k){const{expose:g,repeat:m,..._}=q(this.blocks[k]),T={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,..._,repeat:m,parent:this},w=m!=null?new c.RepeatBlock(T):V(T);w&&(this._blocks.push(w),g&&(this.exposeBlock=w),this._maskedBlocks[k]||(this._maskedBlocks[k]=[]),this._maskedBlocks[k].push(this._blocks.length-1)),a+=k.length-1;continue}}let n=t[a],r=n in e;if(n===N.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(n==="{"||n==="}"){s=!s;continue}if(n==="["||n==="]"){i=!i;continue}if(n===N.ESCAPE_CHAR){if(++a,n=t[a],!n)break;r=!1}const l=r?new Y({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...q(e[n]),parent:this}):new se({char:n,eager:this.eager,isUnmasking:s});this._blocks.push(l)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:t,...s}=e;this._blocks.forEach((i,a)=>i.state=t[a]),super.state=s}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete: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.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,t)=>e+=t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+=t.value,"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=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 f;let s=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(s==null)return t;this._blocks[s].isFilled&&++s;for(let i=s;i<this._blocks.length;++i){const a=this._blocks[i]._appendEager();if(!a.inserted)break;t.aggregate(a)}return t}_appendCharRaw(e,t){t===void 0&&(t={});const s=this._mapPosToBlock(this.displayValue.length),i=new f;if(!s)return i;for(let n=s.index,r;r=this._blocks[n];++n){var a;const l=r._appendChar(e,{...t,_beforeTailState:(a=t._beforeTailState)==null||(a=a._blocks)==null?void 0:a[n]});if(i.aggregate(l),l.consumed)break}return i}extractTail(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=new te;return e===t||this._forEachBlocksInRange(e,t,(i,a,n,r)=>{const l=i.extractTail(n,r);l.stop=this._findStopBefore(a),l.from=this._blockStartPos(a),l instanceof te&&(l.blockIndex=a),s.extend(l)}),s}extractInput(e,t,s){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),s===void 0&&(s={}),e===t)return"";let i="";return this._forEachBlocksInRange(e,t,(a,n,r,l)=>{i+=a.extractInput(r,l,s)}),i}_findStopBefore(e){let t;for(let s=0;s<this._stops.length;++s){const i=this._stops[s];if(i<=e)t=i;else break}return t}_appendPlaceholder(e){const t=new f;if(this.lazy&&e==null)return t;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return t;const i=s.index,a=e??this._blocks.length;return this._blocks.slice(i,a).forEach(n=>{if(!n.lazy||e!=null){var r;t.aggregate(n._appendPlaceholder((r=n._blocks)==null?void 0:r.length))}}),t}_mapPosToBlock(e){let t="";for(let s=0;s<this._blocks.length;++s){const i=this._blocks[s],a=t.length;if(t+=i.displayValue,e<=t.length)return{index:s,offset:e-a}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((t,s)=>t+=s.displayValue.length,0)}_forEachBlocksInRange(e,t,s){t===void 0&&(t=this.displayValue.length);const i=this._mapPosToBlock(e);if(i){const a=this._mapPosToBlock(t),n=a&&i.index===a.index,r=i.offset,l=a&&n?a.offset:this._blocks[i.index].displayValue.length;if(s(this._blocks[i.index],i.index,r,l),a&&!n){for(let h=i.index+1;h<a.index;++h)s(this._blocks[h],h,0,this._blocks[h].displayValue.length);s(this._blocks[a.index],a.index,0,a.offset)}}}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=super.remove(e,t);return this._forEachBlocksInRange(e,t,(i,a,n,r)=>{s.aggregate(i.remove(n,r))}),s}nearestInputPos(e,t){if(t===void 0&&(t=d.NONE),!this._blocks.length)return 0;const s=new ve(this,e);if(t===d.NONE)return s.pushRightBeforeInput()||(s.popState(),s.pushLeftBeforeInput())?s.pos:this.displayValue.length;if(t===d.LEFT||t===d.FORCE_LEFT){if(t===d.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),t===d.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=e||(s.popState(),s.ok&&s.pos<=e))return s.pos;s.popState()}return s.ok?s.pos:t===d.FORCE_LEFT?0:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:0)}return t===d.RIGHT||t===d.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:t===d.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:this.nearestInputPos(e,d.LEFT))):e}totalInputPositions(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);let s=0;return this._forEachBlocksInRange(e,t,(i,a,n,r)=>{s+=i.totalInputPositions(n,r)}),s}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map(s=>this._blocks[s]):[]}pad(e){const t=new f;return this._forEachBlocksInRange(0,this.displayValue.length,s=>t.aggregate(s.pad(e))),t}};o(N,"MaskedPattern");let E=N;E.DEFAULTS={...C.DEFAULTS,lazy:!0,placeholderChar:"_"};E.STOP_CHAR="`";E.ESCAPE_CHAR="\\";E.InputDefinition=Y;E.FixedDefinition=se;c.MaskedPattern=E;const Te=class Te extends E{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:s=this.from||0,maxLength:i=this.maxLength||0,autofix:a=this.autofix,...n}=e;this.to=t,this.from=s,this.maxLength=Math.max(String(t).length,i),this.autofix=a;const r=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0");let h=0;for(;h<l.length&&l[h]===r[h];)++h;n.mask=l.slice(0,h).replace(/0/g,"\\0")+"0".repeat(this.maxLength-h),super._update(n)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let t="",s="";const[,i,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(t="0".repeat(i.length)+a,s="9".repeat(i.length)+a),t=t.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[t,s]}doPrepareChar(e,t){t===void 0&&(t={});let s;return[e,s]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(s.skip=!this.isComplete),[e,s]}_appendCharRaw(e,t){if(t===void 0&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const s=String(this.from).padStart(this.maxLength,"0"),i=String(this.to).padStart(this.maxLength,"0"),[a,n]=this.boundaries(this.value+e);return Number(n)<this.from?super._appendCharRaw(s[this.value.length],t):Number(a)>this.to?!t.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(i[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(t.search(/[^0]/)===-1&&t.length<=this._matchFrom)return!0;const[i,a]=this.boundaries(t);return this.from<=Number(a)&&Number(i)<=this.to&&super.doValidate(e)}pad(e){const t=new f;if(this.value.length===this.maxLength)return t;const s=this.value,i=this.maxLength-this.value.length;if(i){this.reset();for(let a=0;a<i;++a)t.aggregate(super._appendCharRaw("0",e));s.split("").forEach(a=>this._appendCharRaw(a))}return t}};o(Te,"MaskedRange");let P=Te;c.MaskedRange=P;const kt="d{.}`m{.}`Y",B=class B extends E{static extractPatternOptions(e){const{mask:t,pattern:s,...i}=e;return{...i,mask:b(t)?t:s}}constructor(e){super(B.extractPatternOptions({...B.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:s,blocks:i,...a}={...B.DEFAULTS,...e},n=Object.assign({},B.GET_DEFAULT_BLOCKS());e.min&&(n.Y.from=e.min.getFullYear()),e.max&&(n.Y.to=e.max.getFullYear()),e.min&&e.max&&n.Y.from===n.Y.to&&(n.m.from=e.min.getMonth()+1,n.m.to=e.max.getMonth()+1,n.m.from===n.m.to&&(n.d.from=e.min.getDate(),n.d.to=e.max.getDate())),Object.assign(n,this.blocks,i),super._update({...a,mask:b(t)?t:s,blocks:n})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&t!=null&&(this.min==null||this.min<=t)&&(this.max==null||t<=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)}optionsIsChanged(e){return super.optionsIsChanged(B.extractPatternOptions(e))}};o(B,"MaskedDate");let K=B;K.GET_DEFAULT_BLOCKS=()=>({d:{mask:P,from:1,to:31,maxLength:2},m:{mask:P,from:1,to:12,maxLength:2},Y:{mask:P,from:1900,to:9999}});K.DEFAULTS={...E.DEFAULTS,mask:Date,pattern:kt,format:o((u,e)=>{if(!u)return"";const t=String(u.getDate()).padStart(2,"0"),s=String(u.getMonth()+1).padStart(2,"0"),i=u.getFullYear();return[t,s,i].join(".")},"format"),parse:o((u,e)=>{const[t,s,i]=u.split(".").map(Number);return new Date(i,s-1,t)},"parse")};c.MaskedDate=K;const re=class re extends C{constructor(e){super({...re.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(t=>{const{expose:s,...i}=q(t),a=V({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});return s&&(this.exposeMask=a),a}):[])}_appendCharRaw(e,t){t===void 0&&(t={});const s=this._applyDispatch(e,t);return this.currentMask&&s.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),s}_applyDispatch(e,t,s){e===void 0&&(e=""),t===void 0&&(t={}),s===void 0&&(s="");const i=t.tail&&t._beforeTailState!=null?t._beforeTailState._value:this.value,a=this.rawInputValue,n=t.tail&&t._beforeTailState!=null?t._beforeTailState._rawInputValue:a,r=a.slice(n.length),l=this.currentMask,h=new f,p=l?.state;return this.currentMask=this.doDispatch(e,{...t},s),this.currentMask&&(this.currentMask!==l?(this.currentMask.reset(),n&&(this.currentMask.append(n,{raw:!0}),h.tailShift=this.currentMask.value.length-i.length),r&&(h.tailShift+=this.currentMask.append(r,{raw:!0,tail:!0}).tailShift)):p&&(this.currentMask.state=p)),h}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new f;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,s;return{...e,_beforeTailState:((t=e._beforeTailState)==null?void 0:t.currentMaskRef)===this.currentMask&&((s=e._beforeTailState)==null?void 0:s.currentMask)||e._beforeTailState}}doDispatch(e,t,s){return t===void 0&&(t={}),s===void 0&&(s=""),this.dispatch(e,this,t,s)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){t===void 0&&(t={});let[s,i]=super.doPrepare(e,t);if(this.currentMask){let a;[s,a]=super.doPrepare(s,this.currentMaskFlags(t)),i=i.aggregate(a)}return[s,i]}doPrepareChar(e,t){t===void 0&&(t={});let[s,i]=super.doPrepareChar(e,t);if(this.currentMask){let a;[s,a]=super.doPrepareChar(s,this.currentMaskFlags(t)),i=i.aggregate(a)}return[s,i]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(t=>t.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}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!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,t){const s=new f;return this.currentMask&&s.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),s}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(t=>t.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:s,currentMask:i,...a}=e;t&&this.compiledMasks.forEach((n,r)=>n.state=t[r]),s!=null&&(this.currentMask=s,this.currentMask.state=i),super.state=a}extractInput(e,t,s){return this.currentMask?this.currentMask.extractInput(e,t,s):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,s)=>{if(!e[s])return;const{mask:i,...a}=e[s];return J(t,a)&&t.maskEquals(i)}):super.maskEquals(e)}typedValueEquals(e){var t;return!!((t=this.currentMask)!=null&&t.typedValueEquals(e))}};o(re,"MaskedDynamic");let ie=re;ie.DEFAULTS={...C.DEFAULTS,dispatch:o((u,e,t,s)=>{if(!e.compiledMasks.length)return;const i=e.rawInputValue,a=e.compiledMasks.map((n,r)=>{const l=e.currentMask===n,h=l?n.displayValue.length:n.nearestInputPos(n.displayValue.length,d.FORCE_LEFT);return n.rawInputValue!==i?(n.reset(),n.append(i,{raw:!0})):l||n.remove(h),n.append(u,e.currentMaskFlags(t)),n.appendTail(s),{index:r,weight:n.rawInputValue.length,totalInputPositions:n.totalInputPositions(0,Math.max(h,n.nearestInputPos(n.displayValue.length,d.FORCE_LEFT)))}});return a.sort((n,r)=>r.weight-n.weight||r.totalInputPositions-n.totalInputPositions),e.compiledMasks[a[0].index]},"dispatch")};c.MaskedDynamic=ie;const le=class le extends E{constructor(e){super({...le.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...s}=e;if(t){const i=t.map(r=>r.length),a=Math.min(...i),n=Math.max(...i)-a;s.mask="*".repeat(a),n&&(s.mask+="["+"*".repeat(n)+"]"),this.enum=t}super._update(s)}_appendCharRaw(e,t){t===void 0&&(t={});const s=Math.min(this.nearestInputPos(0,d.FORCE_RIGHT),this.value.length),i=this.enum.filter(a=>this.matchValue(a,this.unmaskedValue+e,s));if(i.length){i.length===1&&this._forEachBlocksInRange(0,this.value.length,(n,r)=>{const l=i[0][r];r>=this.value.length||l===n.value||(n.reset(),n._appendChar(l,t))});const a=super._appendCharRaw(i[0][this.value.length],t);return i.length===1&&i[0].slice(this.unmaskedValue.length).split("").forEach(n=>a.aggregate(super._appendCharRaw(n))),a}return new f({skip:!this.isComplete})}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new A("",e)}remove(e,t){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),e===t)return new f;const s=Math.min(super.nearestInputPos(0,d.FORCE_RIGHT),this.value.length);let i;for(i=e;i>=0&&!(this.enum.filter(r=>this.matchValue(r,this.value.slice(s,i),s)).length>1);--i);const a=super.remove(i,t);return a.tailShift+=i-e,a}get isComplete(){return this.enum.indexOf(this.value)>=0}};o(le,"MaskedEnum");let ae=le;ae.DEFAULTS={...E.DEFAULTS,matchValue:o((u,e,t)=>u.indexOf(e,t)===t,"matchValue")};c.MaskedEnum=ae;const Re=class Re extends C{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}};o(Re,"MaskedFunction");let Ce=Re;c.MaskedFunction=Ce;var Ge;const F=class F extends C{constructor(e){super({...F.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t="\\d*",s=(this.scale?"("+fe(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+t+s),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(fe).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(fe(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)}doPrepareChar(e,t){t===void 0&&(t={});const[s,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!s&&(i.skip=!0),s&&!this.allowPositive&&!this.value&&s!=="-"&&i.aggregate(this._appendChar("-")),[s,i]}_separatorsCount(e,t){t===void 0&&(t=!1);let 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(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,s))}_appendCharRaw(e,t){t===void 0&&(t={});const s=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const a=this._value;this._value+=e;const n=this.number;let r=!isNaN(n),l=!1;if(r){let g;this.min!=null&&this.min<0&&this.number<this.min&&(g=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(g=this.max),g!=null&&(this.autofix?(this._value=this.format(g,this).replace(F.UNMASKED_RADIX,this.radix),l||(l=a===this._value&&!t.tail)):r=!1),r&&(r=!!this._value.match(this._numberRegExp))}let h;r?h=new f({inserted:this._value.slice(a.length),rawInserted:l?"":e,skip:l}):(this._value=a,h=new f),this._value=this._insertThousandsSeparators(this._value);const p=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,k=this._separatorsCountFromSlice(p);return h.tailShift+=(k-i)*this.thousandsSeparator.length,h}_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(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const s=this.value.slice(0,e),i=this.value.slice(t),a=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+i));const n=this._separatorsCountFromSlice(s);return new f({tailShift:(n-a)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case d.NONE:case d.LEFT:case d.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===d.FORCE_LEFT)return s}break}case d.RIGHT:case d.FORCE_RIGHT:{const s=this._findSeparatorAround(e);if(s>=0)return s+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;this.min!=null&&(t=Math.max(t,this.min)),this.max!=null&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));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*)/,(s,i,a,n)=>i+n),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,t,s){t===void 0&&(t={});const i=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===F.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,F.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(F.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||F.EMPTY_VALUES.includes(e)&&F.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}};o(F,"MaskedNumber");let M=F;Ge=M;M.UNMASKED_RADIX=".";M.EMPTY_VALUES=[...C.EMPTY_VALUES,0];M.DEFAULTS={...C.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Ge.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:o(u=>u.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20}),"format")};c.MaskedNumber=M;const Ee={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Ze(u,e,t){e===void 0&&(e=Ee.MASKED),t===void 0&&(t=Ee.MASKED);const s=V(u);return i=>s.runIsolated(a=>(a[e]=i,a[t]))}o(Ze,"createPipe");function gt(u,e,t,s){return Ze(e,t,s)(u)}o(gt,"pipe");c.PIPE_TYPE=Ee;c.createPipe=Ze;c.pipe=gt;const Oe=class Oe extends E{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,s,i;const{repeat:a,...n}=q(e);this._blockOpts=Object.assign({},this._blockOpts,n);const r=V(this._blockOpts);this.repeat=(t=(s=a??r.repeat)!=null?s:this.repeat)!=null?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((i=this._blocks)==null?void 0:i.length)||0,this.repeatFrom)),blocks:{m:r},eager:r.eager,overwrite:r.overwrite,skipInvalid:r.skipInvalid,lazy:r.lazy,placeholderChar:r.placeholderChar,displayChar:r.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(V(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,t){t===void 0&&(t={});const s=new f;for(let l=(i=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?i:Math.max(this._blocks.length-1,0),h,p;h=(n=this._blocks[l])!=null?n:p=!p&&this._allocateBlock(l);++l){var i,a,n,r;const k=h._appendChar(e,{...t,_beforeTailState:(r=t._beforeTailState)==null||(r=r._blocks)==null?void 0:r[l]});if(k.skip&&p){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(k),k.consumed)break}return s}_trimEmptyTail(e,t){var s,i;e===void 0&&(e=0);const a=Math.max(((s=this._mapPosToBlock(e))==null?void 0:s.index)||0,this.repeatFrom,0);let n;t!=null&&(n=(i=this._mapPosToBlock(t))==null?void 0:i.index),n==null&&(n=this._blocks.length-1);let r=0;for(let l=n;a<=l&&!this._blocks[l].unmaskedValue;--l,++r);r&&(this._blocks.splice(n-r+1,r),this.mask=this.mask.slice(r))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=super.remove(e,t);return this._trimEmptyTail(e,t),s}totalInputPositions(e,t){return e===void 0&&(e=0),t==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}};o(Oe,"RepeatBlock");let Ae=Oe;c.RepeatBlock=Ae;try{globalThis.IMask=c}catch{}var vt={mask:void 0,prepare:Function,prepareChar:Function,validate:Function,commit:Function,overwrite:{type:Boolean,required:!1,default:void 0},eager:{required:!1,default:void 0,validator:o(u=>["append","remove"].includes(u)||typeof u=="boolean","validator")},skipInvalid:{type:Boolean,required:!1,default:void 0},placeholderChar:String,displayChar:String,lazy:{type:Boolean,required:!1,default:void 0},definitions:Object,blocks:Object,enum:Array,maxLength:Number,from:Number,to:Number,pattern:String,format:Function,parse:Function,autofix:{required:!1,default:void 0,validator:o(u=>u==="pad"||typeof u=="boolean","validator")},radix:String,thousandsSeparator:String,mapToRadix:Array,scale:Number,normalizeZeros:{type:Boolean,required:!1,default:void 0},padFractionalZeros:{type:Boolean,required:!1,default:void 0},min:[Number,Date],max:[Number,Date],dispatch:Function};function _t(u,e){let{emit:t,onAccept:s,onComplete:i,defaultValue:a,defaultUnmaskedValue:n,defaultTypedValue:r}=e===void 0?{}:e;const l=Je(u)?u:R(u),h=R(),p=R(),k=R(""),g=R(""),m=R();let _,T=k.value,w=g.value,oe=m.value;function Le(){oe=m.value=p.value.typedValue,w=g.value=p.value.unmaskedValue,T=k.value=p.value.value}o(Le,"storeLastAcceptedValues");function H(v){Le(),t&&(t("accept",k.value,v),t("accept:masked",k.value,v),t("accept:typed",m.value,v),t("accept:unmasked",g.value,v)),s?.(v)}o(H,"_onAccept");function Xe(v){t&&(t("complete",p.value.value,v),t("complete:masked",p.value.value,v),t("complete:typed",p.value.typedValue,v),t("complete:unmasked",p.value.unmaskedValue,v)),i?.(v)}o(Xe,"_onComplete");const Ne=o(()=>{!p.value||g.value===void 0||(w!==g.value&&(p.value.unmaskedValue=g.value,p.value.unmaskedValue!==g.value&&H()),w=void 0)},"updateUnmaskedValue");x(g,Ne);const Pe=o(()=>{!p.value||k.value===void 0||(T!==k.value&&(p.value.value=k.value,p.value.value!==k.value&&H()),T=void 0)},"updateMaskedValue");x(k,Pe);const $e=o(()=>{!p.value||m.value===void 0||(oe!==m.value&&(p.value.typedValue=m.value,p.value.masked.typedValueEquals(m.value)||H()),oe=void 0)},"updateTypedValue");x(m,$e);function Ue(){_=h.value;const v=l.value;!_||!(v!=null&&v.mask)||(p.value=c(_,v),a!==void 0&&(k.value=a),n!==void 0&&(g.value=n),r!==void 0&&(m.value=r),Ne(),Pe(),$e(),Le(),p.value.on("accept",H).on("complete",Xe))}o(Ue,"_initMask");function Ye(){var v;(v=p.value)==null||v.destroy(),p.value=void 0}return o(Ye,"_destroyMask"),Qe(Ue),et(Ye),x([h,l],()=>{const v=h.value,he=l.value;(!(he!=null&&he.mask)||v!==_)&&Ye(),v&&(p.value?p.value.updateOptions(he):Ue())}),{el:h,mask:tt(p),masked:k,unmasked:g,typed:m}}o(_t,"useIMask");function Ct(u,e){return u={...u},Object.keys(u).forEach(t=>{(u[t]===void 0||e.includes(t))&&delete u[t]}),u}o(Ct,"extractOptionsFromProps");const Et=["typed","unmasked","value","modelValue"];var At=st({name:"imask-input",inheritAttrs:!1,props:{modelValue:String,value:String,unmasked:String,typed:{validator:o(()=>!0,"validator")},...vt},emits:["update:modelValue","update:masked","update:value","update:unmasked","update:typed","accept","accept:value","accept:masked","accept:unmasked","accept:typed","complete","complete:value","complete:masked","complete:unmasked","complete:typed"],setup(u,e){let{attrs:t,emit:s}=e;const{el:i,mask:a,masked:n,unmasked:r,typed:l}=_t(Ct(u,Et),{emit:s,onAccept:o(m=>{const _=n.value;s("accept:value",_,m),s("update:value",_,m),s("update:masked",_,m),s("update:modelValue",_,m),s("update:unmasked",r.value,m),s("update:typed",l.value,m)},"onAccept"),onComplete:o(m=>{s("complete:value",n.value,m)},"onComplete")}),h=G(u,"value"),p=G(u,"modelValue"),k=G(u,"unmasked"),g=G(u,"typed");return n.value=p.value||h.value||"",r.value=k.value||"",l.value=g.value,x(h,m=>n.value=m),x(p,m=>n.value=m),x(k,m=>r.value=m),x(g,m=>l.value=m),()=>{const m={...t,value:u.value!=null?u.value:u.modelValue!=null?u.modelValue:a.value?a.value.displayValue:"",ref:i};return u.mask||(m.onInput=_=>{s("update:modelValue",_.target.value),s("update:value",_.target.value)}),it("input",m)}}}),Ft=At;function yt(u,e){return S(),O("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[W("path",{"fill-rule":"evenodd",d:"M8.603 3.799A4.49 4.49 0 0 1 12 2.25c1.357 0 2.573.6 3.397 1.549a4.49 4.49 0 0 1 3.498 1.307 4.491 4.491 0 0 1 1.307 3.497A4.49 4.49 0 0 1 21.75 12a4.49 4.49 0 0 1-1.549 3.397 4.491 4.491 0 0 1-1.307 3.497 4.491 4.491 0 0 1-3.497 1.307A4.49 4.49 0 0 1 12 21.75a4.49 4.49 0 0 1-3.397-1.549 4.49 4.49 0 0 1-3.498-1.306 4.491 4.491 0 0 1-1.307-3.498A4.49 4.49 0 0 1 2.25 12c0-1.357.6-2.573 1.549-3.397a4.49 4.49 0 0 1 1.307-3.497 4.49 4.49 0 0 1 3.497-1.307Zm7.007 6.387a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z","clip-rule":"evenodd"})])}o(yt,"render$2");function St(u,e){return S(),O("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[W("path",{"fill-rule":"evenodd",d:"M7.502 6h7.128A3.375 3.375 0 0 1 18 9.375v9.375a3 3 0 0 0 3-3V6.108c0-1.505-1.125-2.811-2.664-2.94a48.972 48.972 0 0 0-.673-.05A3 3 0 0 0 15 1.5h-1.5a3 3 0 0 0-2.663 1.618c-.225.015-.45.032-.673.05C8.662 3.295 7.554 4.542 7.502 6ZM13.5 3A1.5 1.5 0 0 0 12 4.5h4.5A1.5 1.5 0 0 0 15 3h-1.5Z","clip-rule":"evenodd"}),W("path",{"fill-rule":"evenodd",d:"M3 9.375C3 8.339 3.84 7.5 4.875 7.5h9.75c1.036 0 1.875.84 1.875 1.875v11.25c0 1.035-.84 1.875-1.875 1.875h-9.75A1.875 1.875 0 0 1 3 20.625V9.375ZM6 12a.75.75 0 0 1 .75-.75h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75H6.75a.75.75 0 0 1-.75-.75V12Zm2.25 0a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H9a.75.75 0 0 1-.75-.75ZM6 15a.75.75 0 0 1 .75-.75h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75H6.75a.75.75 0 0 1-.75-.75V15Zm2.25 0a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H9a.75.75 0 0 1-.75-.75ZM6 18a.75.75 0 0 1 .75-.75h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75H6.75a.75.75 0 0 1-.75-.75V18Zm2.25 0a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H9a.75.75 0 0 1-.75-.75Z","clip-rule":"evenodd"})])}o(St,"render$1");var Vt=Object.defineProperty,Bt=Object.getOwnPropertyDescriptor,I=o((u,e,t,s)=>{for(var i=s>1?void 0:s?Bt(e,t):e,a=u.length-1,n;a>=0;a--)(n=u[a])&&(i=(s?n(e,t,i):n(i))||i);return s&&i&&Vt(e,t,i),i},"__decorateClass"),$;let y=($=class extends pt{maskPreset=null;force12hours=!1;alwaysCopyIcon=!1;disabled=!1;dtPresetLocale="";emitsParent=["input","change","focus","blur","update:modelValue","dateMaskChange","keypress.enter","reset"];componentsParent={IMaskComponent:Ft,ClipboardDocumentListIcon:St,CheckBadgeIcon:yt,NoSymbolIcon:ct};mask=null;maskBlocks={};utc="UTC";placeholder="Введите текст";onAccept(e){const t=this.getFromMask(this.mask,e,"MM"),s=this.getFromMask(this.mask,e,"YYYY"),i=this.getFromMask(this.mask,e,"DD");let a=this.getFromMask(this.mask,e,"hh");const n=this.getFromMask(this.mask,e,"mm"),r=this.getFromMask(this.mask,e,"ss"),l=this.is12hours?e.toLowerCase().includes("am")?"am":"pm":"";this.$emit("dateMaskChange",{month:t,year:s,day:i,hour:a,minute:n,seconds:r,AmPm:l})}onCompleteTyped(e){}is12hours=!1;_randKey="";createdParent(){if(this._randKey=$VST.generateRandomKey(),!this.is12hours&&this.isDateTime)try{const e=new Intl.DateTimeFormat(this.dtPresetLocale||this.VST.$r.locale,{hour:"numeric"}).resolvedOptions();this.is12hours=e.hourCycle==="h11"||e.hourCycle==="h12"}catch{this.is12hours=!1}else this.force12hours&&(this.is12hours=!0)}beforeMountParent(){let e=this.modelValue||this.inputValue||"";if(typeof e!="string"&&(e=""),this.value=e,this.isDateTime){const t=new Intl.DateTimeFormat(this.dtPresetLocale||this.VST.$r.locale,{year:"numeric",month:"2-digit",day:"2-digit",hour:this.maskPreset=="datetime"||this.maskPreset=="datetimeSec"?"2-digit":void 0,minute:this.maskPreset=="datetime"||this.maskPreset=="datetimeSec"?"2-digit":void 0,second:this.maskPreset=="datetimeSec"?"2-digit":void 0,timeZoneName:"longOffset"}).formatToParts(new Date($VST.DT().epochMilliseconds));if(this.mask=t.map(s=>{switch(s.type){case"year":return"YYYY";case"month":return"MM";case"day":return"DD";case"hour":return"hh";case"second":return"ss";case"minute":return"mm";case"literal":return s.value;case"timeZoneName":return this.utc=s.value,"";default:return""}}).join(""),this.is12hours&&this.maskPreset!=="date")this.mask+="!";else if(this.maskPreset==="date"){const s=this._extractDateOnly(this.mask);s&&(this.mask=s)}this.mask=this.mask.replace(/\s+/g," "),this.maskBlocks={YYYY:{mask:c.MaskedRange,from:1e3,to:2300,validate:o((s,i)=>this.dateMaskValidateWithReplaceDays(i),"validate"),overwrite:!0},MM:{mask:c.MaskedRange,from:1,to:12,validate:o((s,i)=>this.dateMaskValidateWithReplaceDays(i),"validate"),overwrite:!0},DD:{mask:c.MaskedRange,from:1,to:31,validate:o((s,i)=>this.dateMaskValidateWithReplaceDays(i),"validate"),overwrite:!0},hh:{mask:c.MaskedRange,from:this.is12hours?1:0,to:this.is12hours?12:23,overwrite:!0},mm:{mask:c.MaskedRange,from:0,to:59,overwrite:!0},ss:{mask:c.MaskedRange,from:0,to:59,overwrite:!0},"!":{mask:c.MaskedEnum,enum:["AM","PM","am","pm"],overwrite:!0}}}}mountedParent(){this.$refs.selectInput.$el.addEventListener("focus",this._onFocus),this.$refs.selectInput.$el.addEventListener("blur",this._onBlur),this.isDateTime||this.$refs.selectInput.$el.addEventListener("input",this._onInput)}beforeUnmountParent(){this.$refs.selectInput.$el.removeEventListener("focus",this._onFocus),this.$refs.selectInput.$el.removeEventListener("blur",this._onBlur),this.isDateTime||this.$refs.selectInput.$el.removeEventListener("input",this._onInput)}focus(e=0,t=0){const s=this.$el.querySelector("input.inputMask");s?.focus?.(),s?.setSelectionRange?.(e,t>e?t||e:t)}blur(){this.$el.querySelector("input.inputMask")?.blur?.()}_onReset(){this.$emit("reset"),this._onInput("",!0)}_onFocus(){this.$emit("focus")}_onBlur(){this.nextTick(()=>this.$emit("blur",this.$refs.selectInput?.$el?.value))}_onInput(e,t=!1){const s=e?.target?.value?.trim?.()||e;typeof s=="string"&&(this.$emit("input",this.value=s,t),this.$emit("change",this.value,t),this.$emit("update:modelValue",this.value))}_extractDateOnly(e){const t=/([\d\w]{2,4}[./_-][\d\w]{2,4}[./_-][\d\w]{2,4})/,s=e.match(t);return s?s?.[0]??null:null}getFromMask(e,t,s="MM"){const i=e.indexOf(s);if(i===-1)return 0;const a=t.slice(i,i+s.length),n=parseInt(a,10);return isNaN(n)?0:n}setValue(e){this.$refs?.selectInput?.maskRef&&(this.$refs.selectInput.maskRef.unmaskedValue=e),super.setValue(e)}_prepareIMask(e){if(this.isDateTime)return e.toUpperCase()}replaceInMask(e,t,s,i="MM"){const a=e.indexOf(i);if(a===-1)return t;const n=s.toString().padStart(2,"0");return t.slice(0,a)+n+t.slice(a+i.length)}dateMaskValidateWithReplaceDays(e){const t=this.getFromMask(e.parent.mask,e.parent.displayValue,"MM"),s=this.getFromMask(e.parent.mask,e.parent.displayValue,"YYYY"),i=this.getFromMask(e.parent.mask,e.parent.displayValue,"DD");let a=i;return t&&(t==2&&(!s||s&&s%4==0)?a=29:t==2&&s&&s.toString().length==4&&s%4!=0?a=28:[1,3,5,7,8,10,12].includes(t)?a=31:a=30,a<i&&this.nextTick(()=>{this.$refs.selectInput.$el.value=this.replaceInMask(e.parent.mask,e.parent.displayValue,a.toString(),"DD"),this.$refs.selectInput.$el.blur(),this.nextTick(()=>{this.$refs.selectInput.$el.focus()})})),!0}_isOnlyValueCopied=!1;_copyValueToClipboard(){this.value&&$VST.copyToClipboard(this.value),this._isOnlyValueCopied=!0,setTimeout(()=>this._isOnlyValueCopied=!1,500)}_valueComputed(){return["date","datetime","datetimeSec"].includes(this.maskPreset??"")}},o($,"StringField"),$);I([j(String)],y.prototype,"maskPreset",2);I([j(Boolean)],y.prototype,"force12hours",2);I([j(Boolean)],y.prototype,"alwaysCopyIcon",2);I([j(Boolean)],y.prototype,"disabled",2);I([j(String)],y.prototype,"dtPresetLocale",2);I([j(String)],y.prototype,"placeholder",2);I([at("isDateTime")],y.prototype,"_valueComputed",1);y=I([nt],y);const xt={class:"relative w100%"},bt={key:0,class:"w22px h22px text-stone absolute t-13px l-12px z4 cursor-pointer hover:scale-130"};function It(u,e,t,s,i,a){const n=Z("IMaskComponent"),r=Z("ClipboardDocumentListIcon"),l=Z("CheckBadgeIcon"),h=Z("NoSymbolIcon");return S(),O("div",{class:pe(["d-inline-block my2px w100% relative",{["sf"+u._randKey]:!0}])},[W("div",xt,[je(n,{class:pe(["w100% inputMask",{"hover:bg-white":!u.disabled,"user-select-none!":u.disabled}]),value:u.value,mask:u.mask,radix:",",placeholder:u.placeholder,ref:"selectInput",lazy:!1,overwrite:!0,blocks:u.maskBlocks,autocomplete:u.maskPreset=="email"?"email":"off",onsubmit:"return false;",autocorrect:"off",autocapitalize:"off",onAccept:u.onAccept,"onComplete:typed":u.onCompleteTyped,disabled:u.disabled,prepare:u._prepareIMask,onKeypress:e[0]||(e[0]=ut(p=>u.$emit("keypress.enter"),["enter"]))},null,8,["value","mask","placeholder","blocks","autocomplete","onAccept","onComplete:typed","class","disabled","prepare"]),u.maskPreset=="datetime"||u.maskPreset=="datetimeSec"?(S(),O("div",{key:0,class:"absolute! r-15px! t-2 fs-0.7rem text-stone-500 hover:scale-110 hover:fw-bold",style:rt({pointerEvents:u.disabled?"none !important":void 0})},ce(u.utc),5)):X("",!0)]),u.disabled||u.alwaysCopyIcon?(S(),O("div",bt,[u._isOnlyValueCopied?(S(),de(l,{key:1,class:"text-emerald-500"})):(S(),de(r,{key:0,onClick:e[1]||(e[1]=p=>u._copyValueToClipboard())}))])):X("",!0),!u.disabled&&u.value?(S(),O("div",{key:1,class:pe(["w25px h25px text-stone absolute r-12px z4 cursor-pointer hover:scale-130",{"t-15px":u.maskPreset=="datetime"||u.maskPreset=="datetimeSec","t-9px":u.maskPreset!="datetime"&&u.maskPreset!="datetimeSec"}])},[je(h,{onClick:e[2]||(e[2]=p=>u._onReset())})],2)):X("",!0),u.disabled||u.alwaysCopyIcon?(S(),de(ht("style"),{key:2},{default:lt(()=>[ot(".sf"+ce(u._randKey)+"["+ce(u.$options.__scopeId)+"] input { padding-left: 40px !important; }",1)]),_:1})):X("",!0)],2)}o(It,"render");const Rt=dt(y,[["render",It],["__scopeId","data-v-bd33d684"]]);export{Rt as default};
|
|
1
|
+
var We=Object.defineProperty;var o=(u,e)=>We(u,"name",{value:e,configurable:!0});import{i as Je,r as R,w as x,e as Qe,f as et,g as tt,h as st,t as G,j as it,c as O,o as S,a as W,P as j,C as at,V as nt,k as Z,l as X,m as de,p as je,q as ut,n as pe,s as rt,u as ce,v as lt,x as ot,y as ht,b as dt}from"./main-CjwB_FDy.js";import{F as pt}from"./FieldComponent.vue_vue_type_script_lang-Bta9r3fM.js";import{r as ct}from"./NoSymbolIcon-CkMqcao3.js";function b(u){return typeof u=="string"||u instanceof String}o(b,"isString");function qe(u){var e;return typeof u=="object"&&u!=null&&(u==null||(e=u.constructor)==null?void 0:e.name)==="Object"}o(qe,"isObject");function Ke(u,e){return Array.isArray(e)?Ke(u,(t,s)=>e.includes(s)):Object.entries(u).reduce((t,s)=>{let[i,a]=s;return e(a,i)&&(t[i]=a),t},{})}o(Ke,"pick");const d={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function ft(u){switch(u){case d.LEFT:return d.FORCE_LEFT;case d.RIGHT:return d.FORCE_RIGHT;default:return u}}o(ft,"forceDirection");function fe(u){return u.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}o(fe,"escapeRegExp");function J(u,e){if(e===u)return!0;const t=Array.isArray(e),s=Array.isArray(u);let i;if(t&&s){if(e.length!=u.length)return!1;for(i=0;i<e.length;i++)if(!J(e[i],u[i]))return!1;return!0}if(t!=s)return!1;if(e&&u&&typeof e=="object"&&typeof u=="object"){const a=e instanceof Date,n=u instanceof Date;if(a&&n)return e.getTime()==u.getTime();if(a!=n)return!1;const r=e instanceof RegExp,l=u instanceof RegExp;if(r&&l)return e.toString()==u.toString();if(r!=l)return!1;const h=Object.keys(e);for(i=0;i<h.length;i++)if(!Object.prototype.hasOwnProperty.call(u,h[i]))return!1;for(i=0;i<h.length;i++)if(!J(u[h[i]],e[h[i]]))return!1;return!0}else if(e&&u&&typeof e=="function"&&typeof u=="function")return e.toString()===u.toString();return!1}o(J,"objectIncludes");const Fe=class Fe{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}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?d.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?d.RIGHT:d.LEFT}};o(Fe,"ActionDetails");let me=Fe;function c(u,e){return new c.InputMask(u,e)}o(c,"IMask");function He(u){if(u==null)throw new Error("mask property should be defined");return u instanceof RegExp?c.MaskedRegExp:b(u)?c.MaskedPattern:u===Date?c.MaskedDate:u===Number?c.MaskedNumber:Array.isArray(u)||u===Array?c.MaskedDynamic:c.Masked&&u.prototype instanceof c.Masked?u:c.Masked&&u instanceof c.Masked?u.constructor:u instanceof Function?c.MaskedFunction:(console.warn("Mask not found for mask",u),c.Masked)}o(He,"maskedClass");function q(u){if(!u)throw new Error("Options in not defined");if(c.Masked){if(u.prototype instanceof c.Masked)return{mask:u};const{mask:e=void 0,...t}=u instanceof c.Masked?{mask:u}:qe(u)&&u.mask instanceof c.Masked?u:{};if(e){const s=e.mask;return{...Ke(e,(i,a)=>!a.startsWith("_")),mask:e.constructor,_mask:s,...t}}}return qe(u)?{...u}:{mask:u}}o(q,"normalizeOpts");function V(u){if(c.Masked&&u instanceof c.Masked)return u;const e=q(u),t=He(e.mask);if(!t)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===t&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new t(e)}o(V,"createMask");c.createMask=V;const ye=class ye{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,t){if(!(e==null||t==null||e===this.selectionStart&&t===this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}};o(ye,"MaskElement");let z=ye;c.MaskElement=z;const ze=90,mt=89,Se=class Se extends z{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,s;return(e=(t=(s=this.input).getRootNode)==null?void 0:t.call(s))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===ze&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===mt&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===ze&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}};o(Se,"HTMLMaskElement");let U=Se;c.HTMLMaskElement=U;const Ve=class Ve extends U{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}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}};o(Ve,"HTMLInputMaskElement");let ke=Ve;c.HTMLMaskElement=U;const Be=class Be extends U{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return i==null||s==null||s<i?s:i}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return i==null||s==null||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,a=i.getSelection&&i.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}};o(Be,"HTMLContenteditableMaskElement");let Q=Be;c.HTMLContenteditableMaskElement=Q;const ne=class ne{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>ne.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}};o(ne,"InputHistory");let ee=ne;ee.MAX_LENGTH=100;const xe=class xe{constructor(e,t){this.el=e instanceof z?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new Q(e):new ke(e),this.masked=V(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new ee,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._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return e==null||((t=this.masked)==null?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof c.Masked)&&this.masked.constructor===He(e)){this.masked.updateOptions({mask:e});return}const t=e instanceof c.Masked?e:V({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("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}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,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const s=this._listeners[e];s&&s.forEach(i=>i(t))}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,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,s=this.masked.value,i=this.masked.rawInputValue,a=this.displayValue,n=this.unmaskedValue!==t||this.value!==s||this._rawInputValue!==i;this._unmaskedValue=t,this._value=s,this._rawInputValue=i,this.el.value!==a&&(this.el.value=a),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),n&&this._fireChangeEvents(),!this._historyChanging&&(n||this.history.isEmpty)&&this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...s}=e,i=!this.maskEquals(t),a=this.masked.optionsIsChanged(s);i&&(this.mask=t),a&&this.masked.updateOptions(s),(i||a)&&this.updateControl()}updateCursor(e){e!=null&&(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,d.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){this._inputEvent=e,this._abortUpdateCursor();const t=new me({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,i=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,a=s===this.masked.rawInputValue?t.removeDirection:d.NONE;let n=this.masked.nearestInputPos(t.startChangePos+i,a);a!==d.NONE&&(n=this.masked.nearestInputPos(n,d.NONE)),this.updateControl(n),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()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}};o(xe,"InputMask");let ge=xe;c.InputMask=ge;const ue=class ue{static normalize(e){return Array.isArray(e)?e:[e,new ue]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}};o(ue,"ChangeDetails");let f=ue;c.ChangeDetails=f;const be=class be{constructor(e,t,s){e===void 0&&(e=""),t===void 0&&(t=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||e!=null&&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}};o(be,"ContinuousTailDetails");let A=be;const L=class L{constructor(e){this._value="",this._update({...L.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){t===void 0&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new A(this.extractInput(e,t),e)}appendTail(e){return b(e)&&(e=new A(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new f({inserted:e,rawInserted:e})):new f}_appendChar(e,t,s){t===void 0&&(t={});const i=this.state;let a;if([e,a]=this.doPrepareChar(e,t),e&&(a=a.aggregate(this._appendCharRaw(e,t)),!a.rawInserted&&this.autofix==="pad")){const n=this.state;this.state=i;let r=this.pad(t);const l=this._appendCharRaw(e,t);r=r.aggregate(l),l.rawInserted||r.equals(a)?a=r:this.state=n}if(a.inserted){let n,r=this.doValidate(t)!==!1;if(r&&s!=null){const l=this.state;if(this.overwrite===!0){n=s.state;for(let p=0;p<a.rawInserted.length;++p)s.unshift(this.displayValue.length-a.tailShift)}let h=this.appendTail(s);if(r=h.rawInserted.length===s.toString().length,!(r&&h.inserted)&&this.overwrite==="shift"){this.state=l,n=s.state;for(let p=0;p<a.rawInserted.length;++p)s.shift();h=this.appendTail(s),r=h.rawInserted.length===s.toString().length}r&&h.inserted&&(this.state=l)}r||(a=new f,this.state=i,s&&n&&(s.state=n))}return a}_appendPlaceholder(){return new f}_appendEager(){return new f}append(e,t,s){if(!b(e))throw new Error("value should be string");const i=b(s)?new A(String(s)):s;t!=null&&t.tail&&(t._beforeTailState=this.state);let a;[e,a]=this.doPrepare(e,t);for(let n=0;n<e.length;++n){const r=this._appendChar(e[n],t,i);if(!r.rawInserted&&!this.doSkipInvalid(e[n],t,i))break;a.aggregate(r)}return(this.eager===!0||this.eager==="append")&&t!=null&&t.input&&e&&a.aggregate(this._appendEager()),i!=null&&(a.tailShift+=this.appendTail(i).tailShift),a}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new f}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,s=this.value,i=e();return this.rawInputValue=t,this.value&&this.value!==s&&s.indexOf(this.value)===0&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,i}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,s=e(this);return this.state=t,delete this._isolated,s}doSkipInvalid(e,t,s){return!!this.skipInvalid}doPrepare(e,t){return t===void 0&&(t={}),f.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return t===void 0&&(t={}),f.normalize(this.prepareChar?this.prepareChar(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)}splice(e,t,s,i,a){s===void 0&&(s=""),i===void 0&&(i=d.NONE),a===void 0&&(a={input:!0});const n=e+t,r=this.extractTail(n),l=this.eager===!0||this.eager==="remove";let h;l&&(i=ft(i),h=this.extractInput(0,n,{raw:!0}));let p=e;const k=new f;if(i!==d.NONE&&(p=this.nearestInputPos(e,t>1&&e!==0&&!l?d.NONE:i),k.tailShift=p-e),k.aggregate(this.remove(p)),l&&i!==d.NONE&&h===this.rawInputValue)if(i===d.FORCE_LEFT){let g;for(;h===this.rawInputValue&&(g=this.displayValue.length);)k.aggregate(new f({tailShift:-1})).aggregate(this.remove(g-1))}else i===d.FORCE_RIGHT&&r.unshift();return k.aggregate(this.append(s,a,r))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!J(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||L.EMPTY_VALUES.includes(e)&&L.EMPTY_VALUES.includes(t)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new f}};o(L,"Masked");let C=L;C.DEFAULTS={skipInvalid:!0};C.EMPTY_VALUES=[void 0,null,""];c.Masked=C;const D=class D{constructor(e,t){e===void 0&&(e=[]),t===void 0&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=b(e)?new A(String(e)):e;const t=this.chunks[this.chunks.length-1],s=t&&(t.stop===e.stop||e.stop==null)&&e.from===t.from+t.toString().length;if(e instanceof A)s?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof D){if(e.stop==null){let i;for(;e.chunks.length&&e.chunks[0].stop==null;)i=e.chunks.shift(),i.from+=e.from,this.extend(i)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof c.MaskedPattern))return new A(this.toString()).appendTo(e);const t=new f;for(let s=0;s<this.chunks.length;++s){const i=this.chunks[s],a=e._mapPosToBlock(e.displayValue.length),n=i.stop;let r;if(n!=null&&(!a||a.index<=n)&&((i instanceof D||e._stops.indexOf(n)>=0)&&t.aggregate(e._appendPlaceholder(n)),r=i instanceof D&&e._blocks[n]),r){const l=r.appendTail(i);t.aggregate(l);const h=i.toString().slice(l.rawInserted.length);h&&t.aggregate(e.append(h,{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,...s}=e;Object.assign(this,s),this.chunks=t.map(i=>{const a="chunks"in i?new D:new A;return a.state=i,a})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const t=e!=null?e-this.from:e;let s=0;for(;s<this.chunks.length;){const i=this.chunks[s],a=i.unshift(t);if(i.toString()){if(!a)break;++s}else this.chunks.splice(s,1);if(a)return a}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""}};o(D,"ChunksTailDetails");let te=D;const Ie=class Ie{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 e&&(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.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((t=this.block)==null?void 0:t.displayValue.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)&&(this.offset=this.block.nearestInputPos(this.offset,d.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,d.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,d.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,d.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,d.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,d.NONE),!0})}};o(Ie,"PatternCursor");let ve=Ie;const we=class we{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new f}nearestInputPos(e,t){t===void 0&&(t=d.NONE);const s=0,i=this._value.length;switch(t){case d.LEFT:case d.FORCE_LEFT:return s;case d.NONE:case d.RIGHT:case d.FORCE_RIGHT:default:return i}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),s===void 0&&(s={}),s.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new f;const s=this.eager===!0||this.eager==="append",a=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!s)&&!t.tail,n=new f({inserted:this.char,rawInserted:a?this.char:""});return this._value=this.char,this._isRawInput=a&&(t.raw||t.input),n}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new f;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new A("")}appendTail(e){return b(e)&&(e=new A(String(e))),e.appendTo(this)}append(e,t,s){const i=this._appendChar(e[0],t);return s!=null&&(i.tailShift+=this.appendTail(s).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}};o(we,"PatternFixedDefinition");let se=we;const De=class De{constructor(e){const{parent:t,isOptional:s,placeholderChar:i,displayChar:a,lazy:n,eager:r,...l}=e;this.masked=V(l),Object.assign(this,{parent:t,isOptional:s,placeholderChar:i,displayChar:a,lazy:n,eager:r})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),e===0&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new f}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new f;const s=this.masked.state;let i=this.masked._appendChar(e,this.currentMaskFlags(t));return i.inserted&&this.doValidate(t)===!1&&(i=new f,this.masked.state=s),!i.inserted&&!this.isOptional&&!this.lazy&&!t.input&&(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=!!i.inserted,i}append(e,t,s){return this.masked.append(e,this.currentMaskFlags(t),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new f:(this.isFilled=!0,new f({inserted:this.placeholderChar}))}_appendEager(){return new f}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.masked.extractInput(e,t,s)}nearestInputPos(e,t){t===void 0&&(t=d.NONE);const s=0,i=this.value.length,a=Math.min(Math.max(e,s),i);switch(t){case d.LEFT:case d.FORCE_LEFT:return this.isComplete?a:s;case d.RIGHT:case d.FORCE_RIGHT:return this.isComplete?a:i;case d.NONE:default:return a}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(e==null||(t=e._beforeTailState)==null?void 0:t.masked)||e?._beforeTailState}}pad(e){return new f}};o(De,"PatternInputDefinition");let Y=De;Y.DEFAULT_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]/,"*":/./};const Me=class Me extends C{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=s=>s.search(t)>=0),super._update(e)}};o(Me,"MaskedRegExp");let _e=Me;c.MaskedRegExp=_e;const N=class N extends C{constructor(e){super({...N.DEFAULTS,...e,definitions:Object.assign({},Y.DEFAULT_DEFINITIONS,e?.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let s=!1,i=!1;for(let a=0;a<t.length;++a){if(this.blocks){const h=t.slice(a),p=Object.keys(this.blocks).filter(g=>h.indexOf(g)===0);p.sort((g,m)=>m.length-g.length);const k=p[0];if(k){const{expose:g,repeat:m,..._}=q(this.blocks[k]),T={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,..._,repeat:m,parent:this},w=m!=null?new c.RepeatBlock(T):V(T);w&&(this._blocks.push(w),g&&(this.exposeBlock=w),this._maskedBlocks[k]||(this._maskedBlocks[k]=[]),this._maskedBlocks[k].push(this._blocks.length-1)),a+=k.length-1;continue}}let n=t[a],r=n in e;if(n===N.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(n==="{"||n==="}"){s=!s;continue}if(n==="["||n==="]"){i=!i;continue}if(n===N.ESCAPE_CHAR){if(++a,n=t[a],!n)break;r=!1}const l=r?new Y({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...q(e[n]),parent:this}):new se({char:n,eager:this.eager,isUnmasking:s});this._blocks.push(l)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:t,...s}=e;this._blocks.forEach((i,a)=>i.state=t[a]),super.state=s}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete: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.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,t)=>e+=t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+=t.value,"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=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 f;let s=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(s==null)return t;this._blocks[s].isFilled&&++s;for(let i=s;i<this._blocks.length;++i){const a=this._blocks[i]._appendEager();if(!a.inserted)break;t.aggregate(a)}return t}_appendCharRaw(e,t){t===void 0&&(t={});const s=this._mapPosToBlock(this.displayValue.length),i=new f;if(!s)return i;for(let n=s.index,r;r=this._blocks[n];++n){var a;const l=r._appendChar(e,{...t,_beforeTailState:(a=t._beforeTailState)==null||(a=a._blocks)==null?void 0:a[n]});if(i.aggregate(l),l.consumed)break}return i}extractTail(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=new te;return e===t||this._forEachBlocksInRange(e,t,(i,a,n,r)=>{const l=i.extractTail(n,r);l.stop=this._findStopBefore(a),l.from=this._blockStartPos(a),l instanceof te&&(l.blockIndex=a),s.extend(l)}),s}extractInput(e,t,s){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),s===void 0&&(s={}),e===t)return"";let i="";return this._forEachBlocksInRange(e,t,(a,n,r,l)=>{i+=a.extractInput(r,l,s)}),i}_findStopBefore(e){let t;for(let s=0;s<this._stops.length;++s){const i=this._stops[s];if(i<=e)t=i;else break}return t}_appendPlaceholder(e){const t=new f;if(this.lazy&&e==null)return t;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return t;const i=s.index,a=e??this._blocks.length;return this._blocks.slice(i,a).forEach(n=>{if(!n.lazy||e!=null){var r;t.aggregate(n._appendPlaceholder((r=n._blocks)==null?void 0:r.length))}}),t}_mapPosToBlock(e){let t="";for(let s=0;s<this._blocks.length;++s){const i=this._blocks[s],a=t.length;if(t+=i.displayValue,e<=t.length)return{index:s,offset:e-a}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((t,s)=>t+=s.displayValue.length,0)}_forEachBlocksInRange(e,t,s){t===void 0&&(t=this.displayValue.length);const i=this._mapPosToBlock(e);if(i){const a=this._mapPosToBlock(t),n=a&&i.index===a.index,r=i.offset,l=a&&n?a.offset:this._blocks[i.index].displayValue.length;if(s(this._blocks[i.index],i.index,r,l),a&&!n){for(let h=i.index+1;h<a.index;++h)s(this._blocks[h],h,0,this._blocks[h].displayValue.length);s(this._blocks[a.index],a.index,0,a.offset)}}}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=super.remove(e,t);return this._forEachBlocksInRange(e,t,(i,a,n,r)=>{s.aggregate(i.remove(n,r))}),s}nearestInputPos(e,t){if(t===void 0&&(t=d.NONE),!this._blocks.length)return 0;const s=new ve(this,e);if(t===d.NONE)return s.pushRightBeforeInput()||(s.popState(),s.pushLeftBeforeInput())?s.pos:this.displayValue.length;if(t===d.LEFT||t===d.FORCE_LEFT){if(t===d.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),t===d.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=e||(s.popState(),s.ok&&s.pos<=e))return s.pos;s.popState()}return s.ok?s.pos:t===d.FORCE_LEFT?0:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:0)}return t===d.RIGHT||t===d.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:t===d.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:this.nearestInputPos(e,d.LEFT))):e}totalInputPositions(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);let s=0;return this._forEachBlocksInRange(e,t,(i,a,n,r)=>{s+=i.totalInputPositions(n,r)}),s}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map(s=>this._blocks[s]):[]}pad(e){const t=new f;return this._forEachBlocksInRange(0,this.displayValue.length,s=>t.aggregate(s.pad(e))),t}};o(N,"MaskedPattern");let E=N;E.DEFAULTS={...C.DEFAULTS,lazy:!0,placeholderChar:"_"};E.STOP_CHAR="`";E.ESCAPE_CHAR="\\";E.InputDefinition=Y;E.FixedDefinition=se;c.MaskedPattern=E;const Te=class Te extends E{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:s=this.from||0,maxLength:i=this.maxLength||0,autofix:a=this.autofix,...n}=e;this.to=t,this.from=s,this.maxLength=Math.max(String(t).length,i),this.autofix=a;const r=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0");let h=0;for(;h<l.length&&l[h]===r[h];)++h;n.mask=l.slice(0,h).replace(/0/g,"\\0")+"0".repeat(this.maxLength-h),super._update(n)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let t="",s="";const[,i,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(t="0".repeat(i.length)+a,s="9".repeat(i.length)+a),t=t.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[t,s]}doPrepareChar(e,t){t===void 0&&(t={});let s;return[e,s]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(s.skip=!this.isComplete),[e,s]}_appendCharRaw(e,t){if(t===void 0&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const s=String(this.from).padStart(this.maxLength,"0"),i=String(this.to).padStart(this.maxLength,"0"),[a,n]=this.boundaries(this.value+e);return Number(n)<this.from?super._appendCharRaw(s[this.value.length],t):Number(a)>this.to?!t.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(i[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(t.search(/[^0]/)===-1&&t.length<=this._matchFrom)return!0;const[i,a]=this.boundaries(t);return this.from<=Number(a)&&Number(i)<=this.to&&super.doValidate(e)}pad(e){const t=new f;if(this.value.length===this.maxLength)return t;const s=this.value,i=this.maxLength-this.value.length;if(i){this.reset();for(let a=0;a<i;++a)t.aggregate(super._appendCharRaw("0",e));s.split("").forEach(a=>this._appendCharRaw(a))}return t}};o(Te,"MaskedRange");let P=Te;c.MaskedRange=P;const kt="d{.}`m{.}`Y",B=class B extends E{static extractPatternOptions(e){const{mask:t,pattern:s,...i}=e;return{...i,mask:b(t)?t:s}}constructor(e){super(B.extractPatternOptions({...B.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:s,blocks:i,...a}={...B.DEFAULTS,...e},n=Object.assign({},B.GET_DEFAULT_BLOCKS());e.min&&(n.Y.from=e.min.getFullYear()),e.max&&(n.Y.to=e.max.getFullYear()),e.min&&e.max&&n.Y.from===n.Y.to&&(n.m.from=e.min.getMonth()+1,n.m.to=e.max.getMonth()+1,n.m.from===n.m.to&&(n.d.from=e.min.getDate(),n.d.to=e.max.getDate())),Object.assign(n,this.blocks,i),super._update({...a,mask:b(t)?t:s,blocks:n})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&t!=null&&(this.min==null||this.min<=t)&&(this.max==null||t<=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)}optionsIsChanged(e){return super.optionsIsChanged(B.extractPatternOptions(e))}};o(B,"MaskedDate");let K=B;K.GET_DEFAULT_BLOCKS=()=>({d:{mask:P,from:1,to:31,maxLength:2},m:{mask:P,from:1,to:12,maxLength:2},Y:{mask:P,from:1900,to:9999}});K.DEFAULTS={...E.DEFAULTS,mask:Date,pattern:kt,format:o((u,e)=>{if(!u)return"";const t=String(u.getDate()).padStart(2,"0"),s=String(u.getMonth()+1).padStart(2,"0"),i=u.getFullYear();return[t,s,i].join(".")},"format"),parse:o((u,e)=>{const[t,s,i]=u.split(".").map(Number);return new Date(i,s-1,t)},"parse")};c.MaskedDate=K;const re=class re extends C{constructor(e){super({...re.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(t=>{const{expose:s,...i}=q(t),a=V({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});return s&&(this.exposeMask=a),a}):[])}_appendCharRaw(e,t){t===void 0&&(t={});const s=this._applyDispatch(e,t);return this.currentMask&&s.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),s}_applyDispatch(e,t,s){e===void 0&&(e=""),t===void 0&&(t={}),s===void 0&&(s="");const i=t.tail&&t._beforeTailState!=null?t._beforeTailState._value:this.value,a=this.rawInputValue,n=t.tail&&t._beforeTailState!=null?t._beforeTailState._rawInputValue:a,r=a.slice(n.length),l=this.currentMask,h=new f,p=l?.state;return this.currentMask=this.doDispatch(e,{...t},s),this.currentMask&&(this.currentMask!==l?(this.currentMask.reset(),n&&(this.currentMask.append(n,{raw:!0}),h.tailShift=this.currentMask.value.length-i.length),r&&(h.tailShift+=this.currentMask.append(r,{raw:!0,tail:!0}).tailShift)):p&&(this.currentMask.state=p)),h}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new f;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,s;return{...e,_beforeTailState:((t=e._beforeTailState)==null?void 0:t.currentMaskRef)===this.currentMask&&((s=e._beforeTailState)==null?void 0:s.currentMask)||e._beforeTailState}}doDispatch(e,t,s){return t===void 0&&(t={}),s===void 0&&(s=""),this.dispatch(e,this,t,s)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){t===void 0&&(t={});let[s,i]=super.doPrepare(e,t);if(this.currentMask){let a;[s,a]=super.doPrepare(s,this.currentMaskFlags(t)),i=i.aggregate(a)}return[s,i]}doPrepareChar(e,t){t===void 0&&(t={});let[s,i]=super.doPrepareChar(e,t);if(this.currentMask){let a;[s,a]=super.doPrepareChar(s,this.currentMaskFlags(t)),i=i.aggregate(a)}return[s,i]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(t=>t.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}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!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,t){const s=new f;return this.currentMask&&s.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),s}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(t=>t.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:s,currentMask:i,...a}=e;t&&this.compiledMasks.forEach((n,r)=>n.state=t[r]),s!=null&&(this.currentMask=s,this.currentMask.state=i),super.state=a}extractInput(e,t,s){return this.currentMask?this.currentMask.extractInput(e,t,s):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,s)=>{if(!e[s])return;const{mask:i,...a}=e[s];return J(t,a)&&t.maskEquals(i)}):super.maskEquals(e)}typedValueEquals(e){var t;return!!((t=this.currentMask)!=null&&t.typedValueEquals(e))}};o(re,"MaskedDynamic");let ie=re;ie.DEFAULTS={...C.DEFAULTS,dispatch:o((u,e,t,s)=>{if(!e.compiledMasks.length)return;const i=e.rawInputValue,a=e.compiledMasks.map((n,r)=>{const l=e.currentMask===n,h=l?n.displayValue.length:n.nearestInputPos(n.displayValue.length,d.FORCE_LEFT);return n.rawInputValue!==i?(n.reset(),n.append(i,{raw:!0})):l||n.remove(h),n.append(u,e.currentMaskFlags(t)),n.appendTail(s),{index:r,weight:n.rawInputValue.length,totalInputPositions:n.totalInputPositions(0,Math.max(h,n.nearestInputPos(n.displayValue.length,d.FORCE_LEFT)))}});return a.sort((n,r)=>r.weight-n.weight||r.totalInputPositions-n.totalInputPositions),e.compiledMasks[a[0].index]},"dispatch")};c.MaskedDynamic=ie;const le=class le extends E{constructor(e){super({...le.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...s}=e;if(t){const i=t.map(r=>r.length),a=Math.min(...i),n=Math.max(...i)-a;s.mask="*".repeat(a),n&&(s.mask+="["+"*".repeat(n)+"]"),this.enum=t}super._update(s)}_appendCharRaw(e,t){t===void 0&&(t={});const s=Math.min(this.nearestInputPos(0,d.FORCE_RIGHT),this.value.length),i=this.enum.filter(a=>this.matchValue(a,this.unmaskedValue+e,s));if(i.length){i.length===1&&this._forEachBlocksInRange(0,this.value.length,(n,r)=>{const l=i[0][r];r>=this.value.length||l===n.value||(n.reset(),n._appendChar(l,t))});const a=super._appendCharRaw(i[0][this.value.length],t);return i.length===1&&i[0].slice(this.unmaskedValue.length).split("").forEach(n=>a.aggregate(super._appendCharRaw(n))),a}return new f({skip:!this.isComplete})}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new A("",e)}remove(e,t){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),e===t)return new f;const s=Math.min(super.nearestInputPos(0,d.FORCE_RIGHT),this.value.length);let i;for(i=e;i>=0&&!(this.enum.filter(r=>this.matchValue(r,this.value.slice(s,i),s)).length>1);--i);const a=super.remove(i,t);return a.tailShift+=i-e,a}get isComplete(){return this.enum.indexOf(this.value)>=0}};o(le,"MaskedEnum");let ae=le;ae.DEFAULTS={...E.DEFAULTS,matchValue:o((u,e,t)=>u.indexOf(e,t)===t,"matchValue")};c.MaskedEnum=ae;const Re=class Re extends C{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}};o(Re,"MaskedFunction");let Ce=Re;c.MaskedFunction=Ce;var Ge;const F=class F extends C{constructor(e){super({...F.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t="\\d*",s=(this.scale?"("+fe(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+t+s),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(fe).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(fe(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)}doPrepareChar(e,t){t===void 0&&(t={});const[s,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!s&&(i.skip=!0),s&&!this.allowPositive&&!this.value&&s!=="-"&&i.aggregate(this._appendChar("-")),[s,i]}_separatorsCount(e,t){t===void 0&&(t=!1);let 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(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,s))}_appendCharRaw(e,t){t===void 0&&(t={});const s=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const a=this._value;this._value+=e;const n=this.number;let r=!isNaN(n),l=!1;if(r){let g;this.min!=null&&this.min<0&&this.number<this.min&&(g=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(g=this.max),g!=null&&(this.autofix?(this._value=this.format(g,this).replace(F.UNMASKED_RADIX,this.radix),l||(l=a===this._value&&!t.tail)):r=!1),r&&(r=!!this._value.match(this._numberRegExp))}let h;r?h=new f({inserted:this._value.slice(a.length),rawInserted:l?"":e,skip:l}):(this._value=a,h=new f),this._value=this._insertThousandsSeparators(this._value);const p=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,k=this._separatorsCountFromSlice(p);return h.tailShift+=(k-i)*this.thousandsSeparator.length,h}_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(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const s=this.value.slice(0,e),i=this.value.slice(t),a=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+i));const n=this._separatorsCountFromSlice(s);return new f({tailShift:(n-a)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case d.NONE:case d.LEFT:case d.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===d.FORCE_LEFT)return s}break}case d.RIGHT:case d.FORCE_RIGHT:{const s=this._findSeparatorAround(e);if(s>=0)return s+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;this.min!=null&&(t=Math.max(t,this.min)),this.max!=null&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));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*)/,(s,i,a,n)=>i+n),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,t,s){t===void 0&&(t={});const i=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===F.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,F.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(F.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||F.EMPTY_VALUES.includes(e)&&F.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}};o(F,"MaskedNumber");let M=F;Ge=M;M.UNMASKED_RADIX=".";M.EMPTY_VALUES=[...C.EMPTY_VALUES,0];M.DEFAULTS={...C.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Ge.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:o(u=>u.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20}),"format")};c.MaskedNumber=M;const Ee={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Ze(u,e,t){e===void 0&&(e=Ee.MASKED),t===void 0&&(t=Ee.MASKED);const s=V(u);return i=>s.runIsolated(a=>(a[e]=i,a[t]))}o(Ze,"createPipe");function gt(u,e,t,s){return Ze(e,t,s)(u)}o(gt,"pipe");c.PIPE_TYPE=Ee;c.createPipe=Ze;c.pipe=gt;const Oe=class Oe extends E{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,s,i;const{repeat:a,...n}=q(e);this._blockOpts=Object.assign({},this._blockOpts,n);const r=V(this._blockOpts);this.repeat=(t=(s=a??r.repeat)!=null?s:this.repeat)!=null?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((i=this._blocks)==null?void 0:i.length)||0,this.repeatFrom)),blocks:{m:r},eager:r.eager,overwrite:r.overwrite,skipInvalid:r.skipInvalid,lazy:r.lazy,placeholderChar:r.placeholderChar,displayChar:r.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(V(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,t){t===void 0&&(t={});const s=new f;for(let l=(i=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?i:Math.max(this._blocks.length-1,0),h,p;h=(n=this._blocks[l])!=null?n:p=!p&&this._allocateBlock(l);++l){var i,a,n,r;const k=h._appendChar(e,{...t,_beforeTailState:(r=t._beforeTailState)==null||(r=r._blocks)==null?void 0:r[l]});if(k.skip&&p){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(k),k.consumed)break}return s}_trimEmptyTail(e,t){var s,i;e===void 0&&(e=0);const a=Math.max(((s=this._mapPosToBlock(e))==null?void 0:s.index)||0,this.repeatFrom,0);let n;t!=null&&(n=(i=this._mapPosToBlock(t))==null?void 0:i.index),n==null&&(n=this._blocks.length-1);let r=0;for(let l=n;a<=l&&!this._blocks[l].unmaskedValue;--l,++r);r&&(this._blocks.splice(n-r+1,r),this.mask=this.mask.slice(r))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=super.remove(e,t);return this._trimEmptyTail(e,t),s}totalInputPositions(e,t){return e===void 0&&(e=0),t==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}};o(Oe,"RepeatBlock");let Ae=Oe;c.RepeatBlock=Ae;try{globalThis.IMask=c}catch{}var vt={mask:void 0,prepare:Function,prepareChar:Function,validate:Function,commit:Function,overwrite:{type:Boolean,required:!1,default:void 0},eager:{required:!1,default:void 0,validator:o(u=>["append","remove"].includes(u)||typeof u=="boolean","validator")},skipInvalid:{type:Boolean,required:!1,default:void 0},placeholderChar:String,displayChar:String,lazy:{type:Boolean,required:!1,default:void 0},definitions:Object,blocks:Object,enum:Array,maxLength:Number,from:Number,to:Number,pattern:String,format:Function,parse:Function,autofix:{required:!1,default:void 0,validator:o(u=>u==="pad"||typeof u=="boolean","validator")},radix:String,thousandsSeparator:String,mapToRadix:Array,scale:Number,normalizeZeros:{type:Boolean,required:!1,default:void 0},padFractionalZeros:{type:Boolean,required:!1,default:void 0},min:[Number,Date],max:[Number,Date],dispatch:Function};function _t(u,e){let{emit:t,onAccept:s,onComplete:i,defaultValue:a,defaultUnmaskedValue:n,defaultTypedValue:r}=e===void 0?{}:e;const l=Je(u)?u:R(u),h=R(),p=R(),k=R(""),g=R(""),m=R();let _,T=k.value,w=g.value,oe=m.value;function Le(){oe=m.value=p.value.typedValue,w=g.value=p.value.unmaskedValue,T=k.value=p.value.value}o(Le,"storeLastAcceptedValues");function H(v){Le(),t&&(t("accept",k.value,v),t("accept:masked",k.value,v),t("accept:typed",m.value,v),t("accept:unmasked",g.value,v)),s?.(v)}o(H,"_onAccept");function Xe(v){t&&(t("complete",p.value.value,v),t("complete:masked",p.value.value,v),t("complete:typed",p.value.typedValue,v),t("complete:unmasked",p.value.unmaskedValue,v)),i?.(v)}o(Xe,"_onComplete");const Ne=o(()=>{!p.value||g.value===void 0||(w!==g.value&&(p.value.unmaskedValue=g.value,p.value.unmaskedValue!==g.value&&H()),w=void 0)},"updateUnmaskedValue");x(g,Ne);const Pe=o(()=>{!p.value||k.value===void 0||(T!==k.value&&(p.value.value=k.value,p.value.value!==k.value&&H()),T=void 0)},"updateMaskedValue");x(k,Pe);const $e=o(()=>{!p.value||m.value===void 0||(oe!==m.value&&(p.value.typedValue=m.value,p.value.masked.typedValueEquals(m.value)||H()),oe=void 0)},"updateTypedValue");x(m,$e);function Ue(){_=h.value;const v=l.value;!_||!(v!=null&&v.mask)||(p.value=c(_,v),a!==void 0&&(k.value=a),n!==void 0&&(g.value=n),r!==void 0&&(m.value=r),Ne(),Pe(),$e(),Le(),p.value.on("accept",H).on("complete",Xe))}o(Ue,"_initMask");function Ye(){var v;(v=p.value)==null||v.destroy(),p.value=void 0}return o(Ye,"_destroyMask"),Qe(Ue),et(Ye),x([h,l],()=>{const v=h.value,he=l.value;(!(he!=null&&he.mask)||v!==_)&&Ye(),v&&(p.value?p.value.updateOptions(he):Ue())}),{el:h,mask:tt(p),masked:k,unmasked:g,typed:m}}o(_t,"useIMask");function Ct(u,e){return u={...u},Object.keys(u).forEach(t=>{(u[t]===void 0||e.includes(t))&&delete u[t]}),u}o(Ct,"extractOptionsFromProps");const Et=["typed","unmasked","value","modelValue"];var At=st({name:"imask-input",inheritAttrs:!1,props:{modelValue:String,value:String,unmasked:String,typed:{validator:o(()=>!0,"validator")},...vt},emits:["update:modelValue","update:masked","update:value","update:unmasked","update:typed","accept","accept:value","accept:masked","accept:unmasked","accept:typed","complete","complete:value","complete:masked","complete:unmasked","complete:typed"],setup(u,e){let{attrs:t,emit:s}=e;const{el:i,mask:a,masked:n,unmasked:r,typed:l}=_t(Ct(u,Et),{emit:s,onAccept:o(m=>{const _=n.value;s("accept:value",_,m),s("update:value",_,m),s("update:masked",_,m),s("update:modelValue",_,m),s("update:unmasked",r.value,m),s("update:typed",l.value,m)},"onAccept"),onComplete:o(m=>{s("complete:value",n.value,m)},"onComplete")}),h=G(u,"value"),p=G(u,"modelValue"),k=G(u,"unmasked"),g=G(u,"typed");return n.value=p.value||h.value||"",r.value=k.value||"",l.value=g.value,x(h,m=>n.value=m),x(p,m=>n.value=m),x(k,m=>r.value=m),x(g,m=>l.value=m),()=>{const m={...t,value:u.value!=null?u.value:u.modelValue!=null?u.modelValue:a.value?a.value.displayValue:"",ref:i};return u.mask||(m.onInput=_=>{s("update:modelValue",_.target.value),s("update:value",_.target.value)}),it("input",m)}}}),Ft=At;function yt(u,e){return S(),O("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[W("path",{"fill-rule":"evenodd",d:"M8.603 3.799A4.49 4.49 0 0 1 12 2.25c1.357 0 2.573.6 3.397 1.549a4.49 4.49 0 0 1 3.498 1.307 4.491 4.491 0 0 1 1.307 3.497A4.49 4.49 0 0 1 21.75 12a4.49 4.49 0 0 1-1.549 3.397 4.491 4.491 0 0 1-1.307 3.497 4.491 4.491 0 0 1-3.497 1.307A4.49 4.49 0 0 1 12 21.75a4.49 4.49 0 0 1-3.397-1.549 4.49 4.49 0 0 1-3.498-1.306 4.491 4.491 0 0 1-1.307-3.498A4.49 4.49 0 0 1 2.25 12c0-1.357.6-2.573 1.549-3.397a4.49 4.49 0 0 1 1.307-3.497 4.49 4.49 0 0 1 3.497-1.307Zm7.007 6.387a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z","clip-rule":"evenodd"})])}o(yt,"render$2");function St(u,e){return S(),O("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[W("path",{"fill-rule":"evenodd",d:"M7.502 6h7.128A3.375 3.375 0 0 1 18 9.375v9.375a3 3 0 0 0 3-3V6.108c0-1.505-1.125-2.811-2.664-2.94a48.972 48.972 0 0 0-.673-.05A3 3 0 0 0 15 1.5h-1.5a3 3 0 0 0-2.663 1.618c-.225.015-.45.032-.673.05C8.662 3.295 7.554 4.542 7.502 6ZM13.5 3A1.5 1.5 0 0 0 12 4.5h4.5A1.5 1.5 0 0 0 15 3h-1.5Z","clip-rule":"evenodd"}),W("path",{"fill-rule":"evenodd",d:"M3 9.375C3 8.339 3.84 7.5 4.875 7.5h9.75c1.036 0 1.875.84 1.875 1.875v11.25c0 1.035-.84 1.875-1.875 1.875h-9.75A1.875 1.875 0 0 1 3 20.625V9.375ZM6 12a.75.75 0 0 1 .75-.75h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75H6.75a.75.75 0 0 1-.75-.75V12Zm2.25 0a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H9a.75.75 0 0 1-.75-.75ZM6 15a.75.75 0 0 1 .75-.75h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75H6.75a.75.75 0 0 1-.75-.75V15Zm2.25 0a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H9a.75.75 0 0 1-.75-.75ZM6 18a.75.75 0 0 1 .75-.75h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75H6.75a.75.75 0 0 1-.75-.75V18Zm2.25 0a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H9a.75.75 0 0 1-.75-.75Z","clip-rule":"evenodd"})])}o(St,"render$1");var Vt=Object.defineProperty,Bt=Object.getOwnPropertyDescriptor,I=o((u,e,t,s)=>{for(var i=s>1?void 0:s?Bt(e,t):e,a=u.length-1,n;a>=0;a--)(n=u[a])&&(i=(s?n(e,t,i):n(i))||i);return s&&i&&Vt(e,t,i),i},"__decorateClass"),$;let y=($=class extends pt{maskPreset=null;force12hours=!1;alwaysCopyIcon=!1;disabled=!1;dtPresetLocale="";emitsParent=["input","change","focus","blur","update:modelValue","dateMaskChange","keypress.enter","reset"];componentsParent={IMaskComponent:Ft,ClipboardDocumentListIcon:St,CheckBadgeIcon:yt,NoSymbolIcon:ct};mask=null;maskBlocks={};utc="UTC";placeholder="Введите текст";onAccept(e){const t=this.getFromMask(this.mask,e,"MM"),s=this.getFromMask(this.mask,e,"YYYY"),i=this.getFromMask(this.mask,e,"DD");let a=this.getFromMask(this.mask,e,"hh");const n=this.getFromMask(this.mask,e,"mm"),r=this.getFromMask(this.mask,e,"ss"),l=this.is12hours?e.toLowerCase().includes("am")?"am":"pm":"";this.$emit("dateMaskChange",{month:t,year:s,day:i,hour:a,minute:n,seconds:r,AmPm:l})}onCompleteTyped(e){}is12hours=!1;_randKey="";createdParent(){if(this._randKey=$VST.generateRandomKey(),!this.is12hours&&this.isDateTime)try{const e=new Intl.DateTimeFormat(this.dtPresetLocale||this.VST.$r.locale,{hour:"numeric"}).resolvedOptions();this.is12hours=e.hourCycle==="h11"||e.hourCycle==="h12"}catch{this.is12hours=!1}else this.force12hours&&(this.is12hours=!0)}beforeMountParent(){let e=this.modelValue||this.inputValue||"";if(typeof e!="string"&&(e=""),this.value=e,this.isDateTime){const t=new Intl.DateTimeFormat(this.dtPresetLocale||this.VST.$r.locale,{year:"numeric",month:"2-digit",day:"2-digit",hour:this.maskPreset=="datetime"||this.maskPreset=="datetimeSec"?"2-digit":void 0,minute:this.maskPreset=="datetime"||this.maskPreset=="datetimeSec"?"2-digit":void 0,second:this.maskPreset=="datetimeSec"?"2-digit":void 0,timeZoneName:"longOffset"}).formatToParts(new Date($VST.DT().epochMilliseconds));if(this.mask=t.map(s=>{switch(s.type){case"year":return"YYYY";case"month":return"MM";case"day":return"DD";case"hour":return"hh";case"second":return"ss";case"minute":return"mm";case"literal":return s.value;case"timeZoneName":return this.utc=s.value,"";default:return""}}).join(""),this.is12hours&&this.maskPreset!=="date")this.mask+="!";else if(this.maskPreset==="date"){const s=this._extractDateOnly(this.mask);s&&(this.mask=s)}this.mask=this.mask.replace(/\s+/g," "),this.maskBlocks={YYYY:{mask:c.MaskedRange,from:1e3,to:2300,validate:o((s,i)=>this.dateMaskValidateWithReplaceDays(i),"validate"),overwrite:!0},MM:{mask:c.MaskedRange,from:1,to:12,validate:o((s,i)=>this.dateMaskValidateWithReplaceDays(i),"validate"),overwrite:!0},DD:{mask:c.MaskedRange,from:1,to:31,validate:o((s,i)=>this.dateMaskValidateWithReplaceDays(i),"validate"),overwrite:!0},hh:{mask:c.MaskedRange,from:this.is12hours?1:0,to:this.is12hours?12:23,overwrite:!0},mm:{mask:c.MaskedRange,from:0,to:59,overwrite:!0},ss:{mask:c.MaskedRange,from:0,to:59,overwrite:!0},"!":{mask:c.MaskedEnum,enum:["AM","PM","am","pm"],overwrite:!0}}}}mountedParent(){this.$refs.selectInput.$el.addEventListener("focus",this._onFocus),this.$refs.selectInput.$el.addEventListener("blur",this._onBlur),this.isDateTime||this.$refs.selectInput.$el.addEventListener("input",this._onInput)}beforeUnmountParent(){this.$refs.selectInput.$el.removeEventListener("focus",this._onFocus),this.$refs.selectInput.$el.removeEventListener("blur",this._onBlur),this.isDateTime||this.$refs.selectInput.$el.removeEventListener("input",this._onInput)}focus(e=0,t=0){const s=this.$el.querySelector("input.inputMask");s?.focus?.(),s?.setSelectionRange?.(e,t>e?t||e:t)}blur(){this.$el.querySelector("input.inputMask")?.blur?.()}_onReset(){this.$emit("reset"),this._onInput("",!0)}_onFocus(){this.$emit("focus")}_onBlur(){this.nextTick(()=>this.$emit("blur",this.$refs.selectInput?.$el?.value))}_onInput(e,t=!1){const s=e?.target?.value?.trim?.()||e;typeof s=="string"&&(this.$emit("input",this.value=s,t),this.$emit("change",this.value,t),this.$emit("update:modelValue",this.value))}_extractDateOnly(e){const t=/([\d\w]{2,4}[./_-][\d\w]{2,4}[./_-][\d\w]{2,4})/,s=e.match(t);return s?s?.[0]??null:null}getFromMask(e,t,s="MM"){const i=e.indexOf(s);if(i===-1)return 0;const a=t.slice(i,i+s.length),n=parseInt(a,10);return isNaN(n)?0:n}setValue(e){this.$refs?.selectInput?.maskRef&&(this.$refs.selectInput.maskRef.unmaskedValue=e),super.setValue(e)}_prepareIMask(e){if(this.isDateTime)return e.toUpperCase()}replaceInMask(e,t,s,i="MM"){const a=e.indexOf(i);if(a===-1)return t;const n=s.toString().padStart(2,"0");return t.slice(0,a)+n+t.slice(a+i.length)}dateMaskValidateWithReplaceDays(e){const t=this.getFromMask(e.parent.mask,e.parent.displayValue,"MM"),s=this.getFromMask(e.parent.mask,e.parent.displayValue,"YYYY"),i=this.getFromMask(e.parent.mask,e.parent.displayValue,"DD");let a=i;return t&&(t==2&&(!s||s&&s%4==0)?a=29:t==2&&s&&s.toString().length==4&&s%4!=0?a=28:[1,3,5,7,8,10,12].includes(t)?a=31:a=30,a<i&&this.nextTick(()=>{this.$refs.selectInput.$el.value=this.replaceInMask(e.parent.mask,e.parent.displayValue,a.toString(),"DD"),this.$refs.selectInput.$el.blur(),this.nextTick(()=>{this.$refs.selectInput.$el.focus()})})),!0}_isOnlyValueCopied=!1;_copyValueToClipboard(){this.value&&$VST.copyToClipboard(this.value),this._isOnlyValueCopied=!0,setTimeout(()=>this._isOnlyValueCopied=!1,500)}_valueComputed(){return["date","datetime","datetimeSec"].includes(this.maskPreset??"")}},o($,"StringField"),$);I([j(String)],y.prototype,"maskPreset",2);I([j(Boolean)],y.prototype,"force12hours",2);I([j(Boolean)],y.prototype,"alwaysCopyIcon",2);I([j(Boolean)],y.prototype,"disabled",2);I([j(String)],y.prototype,"dtPresetLocale",2);I([j(String)],y.prototype,"placeholder",2);I([at("isDateTime")],y.prototype,"_valueComputed",1);y=I([nt],y);const xt={class:"relative w100%"},bt={key:0,class:"w22px h22px text-stone absolute t-13px l-12px z4 cursor-pointer hover:scale-130"};function It(u,e,t,s,i,a){const n=Z("IMaskComponent"),r=Z("ClipboardDocumentListIcon"),l=Z("CheckBadgeIcon"),h=Z("NoSymbolIcon");return S(),O("div",{class:pe(["d-inline-block my2px w100% relative",{["sf"+u._randKey]:!0}])},[W("div",xt,[je(n,{class:pe(["w100% inputMask",{"hover:bg-white":!u.disabled,"user-select-none!":u.disabled}]),value:u.value,mask:u.mask,radix:",",placeholder:u.placeholder,ref:"selectInput",lazy:!1,overwrite:!0,blocks:u.maskBlocks,autocomplete:u.maskPreset=="email"?"email":"off",onsubmit:"return false;",autocorrect:"off",autocapitalize:"off",onAccept:u.onAccept,"onComplete:typed":u.onCompleteTyped,disabled:u.disabled,prepare:u._prepareIMask,onKeypress:e[0]||(e[0]=ut(p=>u.$emit("keypress.enter"),["enter"]))},null,8,["value","mask","placeholder","blocks","autocomplete","onAccept","onComplete:typed","class","disabled","prepare"]),u.maskPreset=="datetime"||u.maskPreset=="datetimeSec"?(S(),O("div",{key:0,class:"absolute! r-15px! t-2 fs-0.7rem text-stone-500 hover:scale-110 hover:fw-bold",style:rt({pointerEvents:u.disabled?"none !important":void 0})},ce(u.utc),5)):X("",!0)]),u.disabled||u.alwaysCopyIcon?(S(),O("div",bt,[u._isOnlyValueCopied?(S(),de(l,{key:1,class:"text-emerald-500"})):(S(),de(r,{key:0,onClick:e[1]||(e[1]=p=>u._copyValueToClipboard())}))])):X("",!0),!u.disabled&&u.value?(S(),O("div",{key:1,class:pe(["w25px h25px text-stone absolute r-12px z4 cursor-pointer hover:scale-130",{"t-15px":u.maskPreset=="datetime"||u.maskPreset=="datetimeSec","t-9px":u.maskPreset!="datetime"&&u.maskPreset!="datetimeSec"}])},[je(h,{onClick:e[2]||(e[2]=p=>u._onReset())})],2)):X("",!0),u.disabled||u.alwaysCopyIcon?(S(),de(ht("style"),{key:2},{default:lt(()=>[ot(".sf"+ce(u._randKey)+"["+ce(u.$options.__scopeId)+"] input { padding-left: 40px !important; }",1)]),_:1})):X("",!0)],2)}o(It,"render");const Rt=dt(y,[["render",It],["__scopeId","data-v-bd33d684"]]);export{Rt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.container-switch{z-index:10!important;height:100%;display:flex!important;text-align:center;margin:0;padding:0;-webkit-user-select:none;user-select:none;min-height:44px}.switch{position:relative!important;z-index:10!important;border-radius:15px}.switch input{display:none}.switch.disabled label{opacity:.7;cursor:not-allowed!important}.switch.disabled:after{color:#f3f3f3!important}.switch_box{width:62px}.switch_box label{transition:all .14s ease}.switch_box label:not(.disabled):hover{transform:scale(1.16)}.switch_box label:not(.disabled):hover:after{transform:scale(.965)!important;margin-bottom:1px}.switch_box label{display:flex;align-items:center;width:100%;height:36px;box-shadow:1px 1px 2px #737373;background:#a1a1a1;position:relative;cursor:pointer;border-radius:24px}.switch_box label:after{content:"";position:absolute;left:7px;width:23px;height:23px;border-radius:50%}.switch_box label:before{content:"";width:100%;height:100%;border-radius:inherit;opacity:0}.switch input:checked~label:before{opacity:1}.switch input:checked~label:after{left:54%}.hybrid-checkbox{display:inline-block}.hybrid-checkbox .tgl-btn{min-width:100px!important}.hybrid-checkbox .tgl{display:none}.hybrid-checkbox .tgl,.hybrid-checkbox .tgl:after,.hybrid-checkbox .tgl:before,.hybrid-checkbox .tgl *,.hybrid-checkbox .tgl *:after,.hybrid-checkbox .tgl *:before,.hybrid-checkbox .tgl+.tgl-btn{box-sizing:border-box}.hybrid-checkbox .tgl::-moz-selection,.hybrid-checkbox .tgl:after::-moz-selection,.hybrid-checkbox .tgl:before::-moz-selection,.hybrid-checkbox .tgl *::-moz-selection,.hybrid-checkbox .tgl *:after::-moz-selection,.hybrid-checkbox .tgl *:before::-moz-selection,.hybrid-checkbox .tgl+.tgl-btn::-moz-selection,.hybrid-checkbox .tgl::selection,.hybrid-checkbox .tgl:after::selection,.hybrid-checkbox .tgl:before::selection,.hybrid-checkbox .tgl *::selection,.hybrid-checkbox .tgl *:after::selection,.hybrid-checkbox .tgl *:before::selection,.hybrid-checkbox .tgl+.tgl-btn::selection{background:none}.hybrid-checkbox .tgl+.tgl-btn{margin-left:4px;margin-right:4px;width:auto;outline:0;display:block;height:2em;position:relative;cursor:pointer;-webkit-user-select:none;user-select:none}.hybrid-checkbox .tgl+.tgl-btn:after,.hybrid-checkbox .tgl+.tgl-btn:before{position:relative;display:block;content:"";width:50%;height:100%}.hybrid-checkbox .tgl+.tgl-btn:after{left:0}.hybrid-checkbox .tgl+.tgl-btn:before{display:none}.hybrid-checkbox .tgl:checked+.tgl-btn:after{left:50%}.hybrid-checkbox .tgl-flip+.tgl-btn{padding:2px;transition:all .2s ease;font-family:sans-serif;perspective:100px}.hybrid-checkbox .tgl-flip+.tgl-btn:after,.hybrid-checkbox .tgl-flip+.tgl-btn:before{display:inline-block;transition:all .4s ease;width:100%;text-align:center;position:absolute;line-height:2em;font-weight:700;color:#fff;top:0;left:0;-webkit-backface-visibility:hidden;-webkit-backface-visibility-backface-visibility:hidden;border-radius:4px}.hybrid-checkbox .tgl-flip+.tgl-btn:after{content:attr(data-tg-on);transform:rotateY(-180deg)}.hybrid-checkbox .tgl-flip+.tgl-btn:before{content:attr(data-tg-off)}.hybrid-checkbox .tgl-flip+.tgl-btn:active:before{transform:rotateY(-20deg)}.hybrid-checkbox .tgl-flip:checked+.tgl-btn:before{transform:rotateY(180deg)}.hybrid-checkbox .tgl-flip:checked+.tgl-btn:after{transform:rotateY(0);left:0}.hybrid-checkbox .tgl-flip:checked+.tgl-btn:active:after{transform:rotateY(20deg)}.typical-checkbox{margin-left:auto;margin-right:auto;min-height:44px!important;display:flex;align-items:center;padding-left:10px;padding-right:10px}.typical-checkbox label.check{display:flex!important;align-items:center;justify-content:center;border-radius:3px;display:inline-block;cursor:pointer;position:relative;margin:auto;-webkit-tap-highlight-color:transparent;transform:translateZ(0)}.typical-checkbox .check:before{content:"";position:absolute;top:-15px;left:-15px;width:50px;height:50px;border-radius:50%;opacity:0;transition:opacity .2s ease}.typical-checkbox .check svg{border-radius:2px;position:relative;z-index:1;fill:none;stroke-linecap:round;stroke-linejoin:round;stroke:#bababb;stroke-width:1.5;transform:translateZ(0) scale(1.3);transition:all .2s ease}.typical-checkbox.disabled{opacity:.6}.typical-checkbox .check svg path{stroke-dasharray:60;stroke-dashoffset:0}.typical-checkbox .check svg polyline{stroke-dasharray:22;stroke-dashoffset:66}.typical-checkbox:not(.disabled) .check:hover:before{opacity:1}.typical-checkbox:not(.disabled) .check:hover svg{stroke:#4285f4}.typical-checkbox input[type=checkbox]:checked+label{border-radius:3px;padding:2px 4px!important;border-width:2px;border-style:solid;border-color:#4285f4}.typical-checkbox input[type=checkbox]:checked+.check svg{stroke:#4285f4}.typical-checkbox input[type=checkbox]:checked+.check svg path{stroke-dashoffset:60;transition:all .3s linear}.typical-checkbox input[type=checkbox]:checked+.check svg polyline{stroke-dashoffset:42;transition:all .2s linear;transition-delay:.15s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var V=Object.defineProperty;var k=(e,o)=>V(e,"name",{value:o,configurable:!0});import{P as i,W as I,V as $,c as p,o as s,x as u,l as m,m as C,n as g,a as r,z as c,A as T,B as S,v as w,u as d,y as v,b as B}from"./main-CjwB_FDy.js";import{F as N}from"./FieldComponent.vue_vue_type_script_lang-Bta9r3fM.js";var W=Object.defineProperty,A=Object.getOwnPropertyDescriptor,l=k((e,o,y,b)=>{for(var n=b>1?void 0:b?A(o,y):o,f=e.length-1,a;f>=0;f--)(a=e[f])&&(n=(b?a(o,y,n):a(n))||n);return b&&n&&W(o,y,n),n},"__decorateClass"),h;let t=(h=class extends N{disabled=!1;bg="linear-gradient(330deg, #0aa86d 0%, #4eb18d 50%, #0ca86e 100%)";bgInactive="#a1a1a1";title=null;titleTheme="info";bgTogglerY="#3db37e";bgTogglerN="#FF3A19";titleTogglerY="Active";titleTogglerN="Inactive";togglerWidth="100px";togglerWidthActive="100px";togglerRevertColors=null;boxShadow="0 0 2px #1ca95e";disabledTitle="Disabled";disabledTitleTheme="grey";boxShadowHover="0 0 2px #9eeda8";labelColor="#fff";labelBoxShadow="0 0 4px #a4a4a4";type="switcher";modelValue=!1;value=!1;beforeMount(){this.isChecked=this.modelValue||this.inputValue||this.value,this.randomId=$VST.generateRandomKey(32)}emits=["update:modelValue","change"];_onCheckChange(){this.$emit("update:modelValue",this.isChecked),this.$emit("change",this.isChecked)}isChecked=!1;isDisabled=!1;randomId="";setValue(o){this.isChecked=o}_modelValueChanged(o){this.setValue(o)}},k(h,"SwitchField"),h);l([i(Boolean)],t.prototype,"disabled",2);l([i(String)],t.prototype,"bg",2);l([i(String)],t.prototype,"bgInactive",2);l([i(String)],t.prototype,"title",2);l([i(String)],t.prototype,"titleTheme",2);l([i(String)],t.prototype,"bgTogglerY",2);l([i(String)],t.prototype,"bgTogglerN",2);l([i(String)],t.prototype,"titleTogglerY",2);l([i(String)],t.prototype,"titleTogglerN",2);l([i(String)],t.prototype,"togglerWidth",2);l([i(String)],t.prototype,"togglerWidthActive",2);l([i(Boolean)],t.prototype,"togglerRevertColors",2);l([i(String)],t.prototype,"boxShadow",2);l([i(String)],t.prototype,"disabledTitle",2);l([i(String)],t.prototype,"disabledTitleTheme",2);l([i(String)],t.prototype,"boxShadowHover",2);l([i(String)],t.prototype,"labelColor",2);l([i(String)],t.prototype,"labelBoxShadow",2);l([i(String)],t.prototype,"type",2);l([i(Boolean,null)],t.prototype,"modelValue",2);l([I("isChecked",!0,!0)],t.prototype,"_onCheckChange",1);l([I("modelValue",!0)],t.prototype,"_modelValueChanged",1);t=l([$],t);const D=["title","data-theme"],Y={class:"switch_box"},F=["id","disabled"],P=["for"],L=["id","disabled"],R=["data-tg-off","data-tg-on","for"],O=["id","disabled"],U=["for"];function z(e,o,y,b,n,f){return s(),p("div",{class:g(["container-switch",{"min-w64px":e.type!="checkbox"}]),title:e.disabled?e.disabledTitle:e.title,"data-theme":e.disabled?e.disabledTitleTheme:e.titleTheme,"data-offset":"[-15, 15]"},[o[6]||(o[6]=u(" ",-1)),e.type=="switcher"?(s(),p("div",{key:0,class:g(["switch",e.disabled?"disabled":""])},[r("div",Y,[r("div",{class:"cursor-pointer fs-1rem mb2px",onClick:o[0]||(o[0]=a=>e.disabled?null:e.isChecked=!e.isChecked)},[T(e.$slots,"default")]),c(r("input",{id:"switch-"+e.randomId,type:"checkbox","onUpdate:modelValue":o[1]||(o[1]=a=>e.isChecked=a),disabled:e.disabled},null,8,F),[[S,e.isChecked]]),r("label",{for:"switch-"+e.randomId,class:g({disabled:e.disabled})},null,10,P)])],2)):e.type=="toggler"?(s(),p("div",{key:1,class:g(["hybrid-checkbox",{["toggler-"+e.randomId]:!0}])},[c(r("input",{class:"tgl tgl-flip",id:"toggler-"+e.randomId,type:"checkbox","onUpdate:modelValue":o[2]||(o[2]=a=>e.isChecked=a),disabled:e.disabled},null,8,L),[[S,e.isChecked]]),r("label",{class:"tgl-btn","data-tg-off":e.titleTogglerN,"data-tg-on":e.titleTogglerY,for:"toggler-"+e.randomId},null,8,R)],2)):e.type=="checkbox"?(s(),p("div",{key:2,class:g(["typical-checkbox",{disabled:e.disabled}])},[r("span",null,[c(r("input",{type:"checkbox",id:"checkbox-"+e.randomId,"onUpdate:modelValue":o[3]||(o[3]=a=>e.isChecked=a),disabled:e.disabled},null,8,O),[[S,e.isChecked]]),r("label",{class:g(["check pb3px! w20px! p0!",{"bg-white":e.isChecked,"mt3px!":!e.isChecked}]),for:"checkbox-"+e.randomId},[(s(),p("svg",{class:g(["w20px",{"svg-unchecked bg-white":!e.isChecked}]),width:"20px",height:"20px",viewBox:"0 0 18 18"},[...o[5]||(o[5]=[r("path",{d:"M1,9 L1,3.5 C1,2 2,1 3.5,1 L14.5,1 C16,1 17,2 17,3.5 L17,14.5 C17,16 16,17 14.5,17 L3.5,17 C2,17 1,16 1,14.5 L1,9 Z"},null,-1),r("polyline",{points:"1 9 7 14 15 4"},null,-1)])],2))],10,U)]),e.$slots.default?(s(),p("span",{key:0,class:g(["cursor-pointer fs-1rem mx15px my2px whitespace-nowrap",{"fw-bold underline underline-black":e.isChecked}]),onClick:o[4]||(o[4]=a=>e.disabled?null:e.isChecked=!e.isChecked)},[T(e.$slots,"default")],2)):m("",!0)],2)):m("",!0),e.type=="toggler"?(s(),C(v("style"),{key:3},{default:w(()=>[u(".toggler-"+d(e.randomId)+" .tgl-flip + .tgl-btn { perspective: "+d(e.isChecked?e.togglerWidthActive:e.togglerWidth)+" !important; width: "+d(e.isChecked?e.togglerWidthActive:e.togglerWidth)+" !important; } .toggler-"+d(e.randomId)+" .tgl-flip + .tgl-btn:before { background: "+d(e.togglerRevertColors?e.bgTogglerY:e.bgTogglerN)+" } .toggler-"+d(e.randomId)+" .tgl-flip:checked + .tgl-btn:after { background: "+d(e.togglerRevertColors?e.bgTogglerN:e.bgTogglerY)+" }",1)]),_:1})):m("",!0),e.type=="toggler"&&e.disabled?(s(),C(v("style"),{key:4},{default:w(()=>[u(".toggler-"+d(e.randomId)+" { opacity: 0.5 !important; }",1)]),_:1})):m("",!0),e.type=="checkbox"?(s(),C(v("style"),{key:5},{default:w(()=>[u("#checkbox-"+d(e.randomId)+" { display: none; visibility: hidden; } #checkbox-"+d(e.randomId)+" + label { box-sizing: content-box !important; }",1)]),_:1})):m("",!0),(s(),C(v("style"),null,{default:w(()=>[u('[for="switch-'+d(e.randomId)+'"]::before { background: '+d(e.bg)+"; box-shadow: "+d(e.boxShadow)+' !important; } [for="switch-'+d(e.randomId)+'"]:not(.disabled):hover { box-shadow: '+d(e.boxShadowHover)+'; } .switch_box [for="switch-'+d(e.randomId)+'"]::after { background: '+d(e.labelColor)+" !important; box-shadow: "+d(e.labelBoxShadow)+'; } .switch_box [for="switch-'+d(e.randomId)+'"] input { display: none !important; } .switch_box label[for="switch-'+d(e.randomId)+'"] { background: '+d(e.bgInactive)+" !important; }",1)]),_:1}))],10,D)}k(z,"render");const E=B(t,[["render",z]]);export{E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var C=Object.defineProperty;var o=(t,a)=>C(t,"name",{value:a,configurable:!0});import{U as f,V as k,c as s,o as r,a as g,S as l,X as b,l as _,n as $,A as v,u as y,z as S,N as m,b as w}from"./main-
|
|
1
|
+
var C=Object.defineProperty;var o=(t,a)=>C(t,"name",{value:a,configurable:!0});import{U as f,V as k,c as s,o as r,a as g,S as l,X as b,l as _,n as $,A as v,u as y,z as S,N as m,b as w}from"./main-CjwB_FDy.js";var B=Object.getOwnPropertyDescriptor,D=o((t,a,p,c)=>{for(var i=c>1?void 0:c?B(a,p):a,d=t.length-1,u;d>=0;d--)(u=t[d])&&(i=u(i)||i);return i},"__decorateClass"),n;let h=(n=class extends f{currentTab="default";CommentT=Comment;mounted(){}setCurrentTab(a){this.currentTab=a}getTabTitle(a){return a.props?.title||"Без названия"}},o(n,"Tabs"),n);h=D([k],h);const V={class:"tabs"},N={class:"tabs__headers"},O=["onClick"],W=["onClick"],z={key:0,class:"tabs__content"};function P(t,a,p,c,i,d){return r(),s("div",V,[g("div",N,[(r(!0),s(l,null,b(t.$slots,(u,e)=>(r(),s(l,null,[e.startsWith("$title-")?(r(),s("div",{key:0,class:$(["tabs__header",{"tabs__header--active":t.currentTab===e.split("-")[1]}]),onClick:o(T=>t.setCurrentTab(e.split("-")[1]),"onClick")},[v(t.$slots,e,{},void 0,!0)],10,O)):_("",!0)],64))),256)),(r(!0),s(l,null,b(t.$slots,(u,e)=>(r(),s(l,null,[!e.startsWith("$title")&&!t.$slots?.[`$title-${e}`]?(r(),s("div",{key:0,class:$(["tabs__header",{"tabs__header--active":t.currentTab===e}]),onClick:o(T=>t.setCurrentTab(e),"onClick")},y(e),11,W)):_("",!0)],64))),256))]),(r(!0),s(l,null,b(t.$slots,(u,e)=>(r(),s(l,null,[e.startsWith("$")?_("",!0):S((r(),s("div",z,[v(t.$slots,e,{},void 0,!0)],512)),[[m,t.currentTab==e]])],64))),256))])}o(P,"render");const E=w(h,[["render",P],["__scopeId","data-v-f8d3de0a"]]);export{E as default};
|