├── .gitignore ├── src ├── index.js └── InputMask.vue ├── .babelrc ├── example ├── src │ ├── index.js │ └── app.vue └── dist │ └── index.js ├── .npmignore ├── index.html ├── LICENSE ├── package.json ├── README.md └── dist └── index.js /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .vscode 3 | .DS_STORE 4 | node_modules 5 | yarn-error.log 6 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import InputMask from './InputMask.vue' 2 | export default InputMask 3 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "es2015", 5 | { "modules": false } 6 | ], 7 | "stage-0" 8 | ] 9 | } -------------------------------------------------------------------------------- /example/src/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import App from './app'; 3 | 4 | new Vue({ 5 | el: '#app', 6 | render: h => h(App) 7 | }); 8 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .vscode 3 | .DS_STORE 4 | node_modules 5 | demo 6 | .gitignore 7 | .npmignore 8 | .babelrc 9 | yarn.lock 10 | build 11 | example 12 | src/animation/*.css 13 | webpack.config.js 14 | index.html 15 | 16 | 17 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Vue-input-mask 6 | 7 | 13 | 14 | 15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 neverland 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-input-mask", 3 | "version": "0.0.11", 4 | "description": "Masked input component for Vue", 5 | "main": "dist/index.js", 6 | "scripts": { 7 | "dev": "node_modules/.bin/webpack-dev-server --config ./build/webpack.dev.conf.js", 8 | "build:doc": "webpack -p --hide-modules --config ./build/webpack.dev.conf.js", 9 | "build": "webpack -p --hide-modules --config ./build/webpack.prod.conf.js", 10 | "release": "bash ./build/release.sh", 11 | "unit": "" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "git+https://github.com/xdimedrolx/vue-input-mask.git" 16 | }, 17 | "keywords": [ 18 | "vue", 19 | "input", 20 | "mask", 21 | "masked" 22 | ], 23 | "authors": [ 24 | "Nikita Lobachev ", 25 | "Dmitriy Verizhnikov " 26 | ], 27 | "license": "MIT", 28 | "bugs": { 29 | "url": "https://github.com/xdimedrolx/vue-input-mask/issues" 30 | }, 31 | "homepage": "https://github.com/xdimedrolx/vue-input-mask#readme", 32 | "dependencies": { 33 | "vue": "^2.4.4" 34 | }, 35 | "devDependencies": { 36 | "babel-core": "^6.26.0", 37 | "babel-loader": "^7.1.2", 38 | "babel-preset-es2015": "^6.24.1", 39 | "babel-preset-stage-0": "^6.24.1", 40 | "css-loader": "^0.28.7", 41 | "del": "^3.0.0", 42 | "react-input-mask": "^1.2.2", 43 | "shelljs": "^0.7.7", 44 | "vue-loader": "^13.0.5", 45 | "vue-template-compiler": "^2.4.4", 46 | "webpack": "^3.6.0", 47 | "webpack-dev-server": ">=3.1.11", 48 | "webpack-merge": "^4.1.0" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-input-mask 2 | 3 | Yet another Vue component for input masking. Based on [react-input-mask](https://github.com/sanniassin/react-input-mask). 4 | 5 | #### [Demo](http://sanniassin.github.io/react-input-mask/demo.html) 6 | 7 | ## Install 8 | ``` 9 | yarn add vue-input-mask 10 | or 11 | npm i -S vue-input-mask 12 | ``` 13 | 14 | ## Properties 15 | ### `mask` : `string` 16 | 17 | Mask string. Default format characters are:
18 | `9`: `0-9`
19 | `a`: `A-Z, a-z`
20 | `*`: `A-Z, a-z, 0-9` 21 | 22 | Any character can be escaped with a backslash. It will appear as a double backslash in JS strings. For example, a German phone mask with unremoveable prefix +49 will look like mask="+4\\9 99 999 99" or mask={'+4\\\\9 99 999 99'} 23 | 24 | ### `maskChar` : `string` 25 | 26 | Character to cover unfilled parts of the mask. Default character is "\_". If set to null or empty string, unfilled parts will be empty as in ordinary input. 27 | 28 | ### `formatChars` : `object` 29 | 30 | Defines format characters with characters as a keys and corresponding RegExp strings as a values. Default ones: 31 | ```js 32 | { 33 | '9': '[0-9]', 34 | 'a': '[A-Za-z]', 35 | '*': '[A-Za-z0-9]' 36 | } 37 | ``` 38 | 39 | ### `alwaysShowMask` : `boolean` 40 | 41 | Show mask when input is empty and has no focus. 42 | 43 | ## Example 44 | ```js 45 | import Vue from 'vue'; 46 | import InputMask from 'vue-input-mask'; 47 | 48 | Vue.component('input-mask', InputMask) 49 | ``` 50 | 51 | In template: 52 | ```html 53 | 54 | ``` 55 | 56 | ## Todo 57 | - [ ] Refactoring 58 | - [ ] Tests 59 | - [ ] Implementation of `componentWillReceiveProps` 60 | 61 | ## Thanks 62 | Thanks @sanniassin for the awesome component -------------------------------------------------------------------------------- /example/src/app.vue: -------------------------------------------------------------------------------- 1 | 51 | 52 | -------------------------------------------------------------------------------- /dist/index.js: -------------------------------------------------------------------------------- 1 | module.exports=function(t){function e(n){if(s[n])return s[n].exports;var i=s[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var s={};return e.m=t,e.c=s,e.d=function(t,s,n){e.o(t,s)||Object.defineProperty(t,s,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var s=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(s,"a",s),s},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="dist/",e(e.s=0)}([function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=s(1),i=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=i.default},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=s(3),i=s.n(n),a=s(5),r=s(6),l=s(7),u=s.n(l),o={name:"input-mask",props:{mask:{type:String,required:!0},value:{type:String,default:null},maskChar:{type:String,default:void 0},formatChars:{type:Object,default:null},defaultValue:{type:[String,Number],default:""},alwaysShowMask:{type:Boolean,default:!1}},computed:{config:function(){return{mask:this.mask,maskChar:this.maskChar,formatChars:this.formatChars,defaultValue:this.defaultValue,alwaysShowMask:this.alwaysShowMask}}},watch:{value:function(t,e){if(t!==e){var s=Object(r.formatValue)(this.maskOptions,t||"");this.getInputValue()!==s&&(this.setInputValue(s),this.$emit("input",Object(r.isEmpty)(this.maskOptions,this.elValue)?"":s))}},config:{deep:!0,handler:function(t,e){if(this.hasValue=null!=this.value,this.maskOptions=i()(t.mask,t.maskChar,t.formatChars),!this.maskOptions.mask)return this.backspaceOrDeleteRemoval=null,void(this.lastCursorPos=null);var s=this.maskOptions.mask&&this.maskOptions.mask!==e.mask,n=t.alwaysShowMask||this.isFocused(),a=this.hasValue?this.getStringValue(this.value):this.value;if(e.mask||this.hasValue||(a=this.getInputDOMNode().value),(s||this.maskOptions.mask&&(a||n))&&(a=Object(r.formatValue)(this.maskOptions,a),s)){var l=this.lastCursorPos,u=Object(r.getFilledLength)(this.maskOptions,a);(null===l||u=0;--e)if(!Object(r.isPermanentChar)(this.maskOptions,e))return e;return null},getRightEditablePos:function(t){for(var e=this.maskOptions.mask,s=t;s1&&void 0!==arguments[1]?arguments[1]:0,s=this.getInputDOMNode();if(s){var n=t+e;if("selectionStart"in s&&"selectionEnd"in s)s.selectionStart=t,s.selectionEnd=n;else{var i=s.createTextRange();i.collapse(!0),i.moveStart("character",t),i.moveEnd("character",n-t),i.select()}}},getSelection:function(){var t=this.getInputDOMNode(),e=0,s=0;if("selectionStart"in t&&"selectionEnd"in t)e=t.selectionStart,s=t.selectionEnd;else{var n=document.selection.createRange();n.parentElement()===t&&(e=-n.moveStart("character",-t.value.length),s=-n.moveEnd("character",-t.value.length))}return{start:e,end:s,length:s-e}},getCursorPos:function(){return this.getSelection().start},setCursorPos:function(t){var e=this;this.setSelection(t,0),u()(function(){e.setSelection(t,0)}),this.lastCursorPos=t},isFocused:function(){return this.focused},getStringValue:function(t){return t||0===t?t+"":""},onKeyDown:function(t){this.backspaceOrDeleteRemoval=null,this.$emit("keydown",t);var e=t.key,s=t.ctrlKey,n=t.metaKey,i=t.defaultPrevented;if(!(s||n||i||"Backspace"!==e&&"Delete"!==e)){var a=this.getSelection();if(!("Backspace"===e&&a.end>0||"Delete"===e&&this.elValue.length>a.start))return;this.backspaceOrDeleteRemoval={key:e,selection:this.getSelection()}}},onChange:function(t){var e=this,s=this.beforePasteState,n=this.maskOptions,i=n.mask,a=n.maskChar,l=n.lastEditablePos,o=n.prefix,h=this.getInputValue(),c=this.changeTriggered;if(this.changeTriggered=!0,s)return this.beforePasteState=null,void this.pasteText(s.value,h,s.selection,t);var f=this.elValue,p=this.getInputDOMNode();try{"function"==typeof p.matches&&p.matches(":-webkit-autofill")}catch(t){}var d,g,m=this.getSelection(),k=m.end,v=i.length,O=h.length,b=f.length;if(0===b&&O>0&&!c)return this.setInputValue(Object(r.formatValue)(this.maskOptions,h||"")),void this.$emit("input",h);if(this.backspaceOrDeleteRemoval){var V="Delete"===this.backspaceOrDeleteRemoval.key;if(h=this.elValue,m=this.backspaceOrDeleteRemoval.selection,k=m.start,this.backspaceOrDeleteRemoval=null,m.length)h=Object(r.clearRange)(this.maskOptions,h,m.start,m.length);else if(m.startb){var C=O-b,R=m.end-C;g=h.substr(R,C),k=R=o.length&&ka.length&&n(t,e.length-1);)e=e.slice(0,e.length-1);return e.length}for(var r=a.length,l=e.length;l>=a.length;l--){var u=e[l];if(!n(t,l)&&i(t,l,u)){r=l+1;break}}return r}function l(t,e){return r(t,e)===t.mask.length}function u(t,e){var s=t.maskChar,i=t.mask,a=t.prefix;if(!s){for(e=h(t,"",e,0),e.length=a?e:n(t,i)?l[i]:r}).join("")}function h(t,e,s,a){var r=t.mask,o=t.maskChar,h=t.prefix,c=s.split(""),f=l(t,e),p=function(e,s){return!n(t,e)||s===r[e]},d=function(e,s){return!o||!n(t,s)||e!==o};return!o&&a>e.length&&(e+=r.slice(e.length,a)),c.every(function(s){for(;!p(a,s);){if(a>=e.length&&(e+=r[a]),!d(s,a))return!0;if(++a>=r.length)return!1}return!i(t,a,s)&&s!==o||(a=r.length)return!1;return(i(t,a,e)||e===l)&&a++,a 2 | 10 | 11 | 12 | 558 | -------------------------------------------------------------------------------- /example/dist/index.js: -------------------------------------------------------------------------------- 1 | !function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="example/dist/",e(e.s=2)}([function(t,e,n){"use strict";function r(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var i=o(r);return[n].concat(r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"})).concat([i]).join("\n")}return[n].join("\n")}function o(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=r(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o=0&&Math.floor(e)===e&&isFinite(t)}function f(t){return null==t?"":"object"===(void 0===t?"undefined":er(t))?JSON.stringify(t,null,2):String(t)}function d(t){var e=parseFloat(t);return isNaN(e)?t:e}function p(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(n,1)}}function h(t,e){return or.call(t,e)}function m(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}function y(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function b(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function g(t,e){for(var n in e)t[n]=e[n];return t}function _(t){for(var e={},n=0;noo&&Yr[n].id>t.id;)n--;Yr.splice(n+1,0,t)}else Yr.push(t);no||(no=!0,Ir(Et))}}function Lt(t){so.clear(),Nt(t,so)}function Nt(t,e){var n,r,o=Array.isArray(t);if((o||s(t))&&Object.isExtensible(t)){if(t.__ob__){var i=t.__ob__.dep.id;if(e.has(i))return;e.add(i)}if(o)for(n=t.length;n--;)Nt(t[n],e);else for(r=Object.keys(t),n=r.length;n--;)Nt(t[r[n]],e)}}function It(t,e,n){co.get=function(){return this[e][n]},co.set=function(t){this[e][n]=t},Object.defineProperty(t,n,co)}function Pt(t){t._watchers=[];var e=t.$options;e.props&&Rt(t,e.props),e.methods&&Vt(t,e.methods),e.data?zt(t):L(t._data={},!0),e.computed&&Bt(t,e.computed),e.watch&&e.watch!==Sr&&Ht(t,e.watch)}function Rt(t,e){var n=t.$options.propsData||{},r=t._props={},o=t.$options._propKeys=[],i=!t.$parent;Xr.shouldConvert=i;for(var a in e)!function(i){o.push(i);var a=K(i,e,n,t);N(r,i,a),i in t||It(t,"_props",i)}(a);Xr.shouldConvert=!0}function zt(t){var e=t.$options.data;e=t._data="function"==typeof e?Ut(e,t):e||{},c(e)||(e={});for(var n=Object.keys(e),r=t.$options.props,o=(t.$options.methods,n.length);o--;){var i=n[o];r&&h(r,i)||$(i)||It(t,"_data",i)}L(e,!0)}function Ut(t,e){try{return t.call(e)}catch(t){return S(t,e,"data()"),{}}}function Bt(t,e){var n=t._computedWatchers=Object.create(null);for(var r in e){var o=e[r],i="function"==typeof o?o:o.get;n[r]=new ao(t,i||w,w,lo),r in t||Ft(t,r,o)}}function Ft(t,e,n){"function"==typeof n?(co.get=Xt(e),co.set=w):(co.get=n.get?!1!==n.cache?Xt(e):n.get:w,co.set=n.set?n.set:w),Object.defineProperty(t,e,co)}function Xt(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),Rr.target&&e.depend(),e.value}}function Vt(t,e){t.$options.props;for(var n in e)t[n]=null==e[n]?w:y(e[n],t)}function Ht(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var o=0;o=0||n.indexOf(t[o])<0)&&r.push(t[o]);return r}return t}function we(t){this._init(t)}function xe(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=b(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}function ke(t){t.mixin=function(t){return this.options=W(this.options,t),this}}function Ce(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,o=t._Ctor||(t._Ctor={});if(o[r])return o[r];var i=t.name||n.options.name,a=function(t){this._init(t)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=e++,a.options=W(n.options,t),a.super=n,a.options.props&&$e(a),a.options.computed&&Ae(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,pr.forEach(function(t){a[t]=n[t]}),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=g({},a.options),o[r]=a,a}}function $e(t){var e=t.options.props;for(var n in e)It(t.prototype,"_props",n)}function Ae(t){var e=t.options.computed;for(var n in e)Ft(t.prototype,n,e[n])}function Oe(t){pr.forEach(function(e){t[e]=function(t,n){return n?("component"===e&&c(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}})}function Se(t){return t&&(t.Ctor.options.name||t.tag)}function Ee(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!l(t)&&t.test(e)}function je(t,e,n){for(var r in t){var o=t[r];if(o){var i=Se(o.componentOptions);i&&!n(i)&&(o!==e&&Te(o),t[r]=null)}}}function Te(t){t&&t.componentInstance.$destroy()}function De(t){for(var e=t.data,n=t,o=t;r(o.componentInstance);)o=o.componentInstance._vnode,o.data&&(e=Me(o.data,e));for(;r(n=n.parent);)n.data&&(e=Me(e,n.data));return Le(e.staticClass,e.class)}function Me(t,e){return{staticClass:Ne(t.staticClass,e.staticClass),class:r(t.class)?[t.class,e.class]:e.class}}function Le(t,e){return r(t)||r(e)?Ne(t,Ie(e)):""}function Ne(t,e){return t?e?t+" "+e:t:e||""}function Ie(t){return Array.isArray(t)?Pe(t):s(t)?Re(t):"string"==typeof t?t:""}function Pe(t){for(var e,n="",o=0,i=t.length;o-1?Lo[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Lo[t]=/HTMLUnknownElement/.test(e.toString())}function Be(t){if("string"==typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}function Fe(t,e){var n=document.createElement(t);return"select"!==t?n:(e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function Xe(t,e){return document.createElementNS(jo[t],e)}function Ve(t){return document.createTextNode(t)}function He(t){return document.createComment(t)}function We(t,e,n){t.insertBefore(e,n)}function qe(t,e){t.removeChild(e)}function Ke(t,e){t.appendChild(e)}function Ge(t){return t.parentNode}function Je(t){return t.nextSibling}function Ze(t){return t.tagName}function Qe(t,e){t.textContent=e}function Ye(t,e,n){t.setAttribute(e,n)}function tn(t,e){var n=t.data.ref;if(n){var r=t.context,o=t.componentInstance||t.elm,i=r.$refs;e?Array.isArray(i[n])?v(i[n],o):i[n]===o&&(i[n]=void 0):t.data.refInFor?Array.isArray(i[n])?i[n].indexOf(o)<0&&i[n].push(o):i[n]=[o]:i[n]=o}}function en(t,e){return t.key===e.key&&(t.tag===e.tag&&t.isComment===e.isComment&&r(t.data)===r(e.data)&&nn(t,e)||o(t.isAsyncPlaceholder)&&t.asyncFactory===e.asyncFactory&&n(e.asyncFactory.error))}function nn(t,e){if("input"!==t.tag)return!0;var n;return(r(n=t.data)&&r(n=n.attrs)&&n.type)===(r(n=e.data)&&r(n=n.attrs)&&n.type)}function rn(t,e,n){var o,i,a={};for(o=e;o<=n;++o)i=t[o].key,r(i)&&(a[i]=o);return a}function on(t,e){(t.data.directives||e.data.directives)&&an(t,e)}function an(t,e){var n,r,o,i=t===Po,a=e===Po,s=sn(t.data.directives,t.context),c=sn(e.data.directives,e.context),l=[],u=[];for(n in c)r=s[n],o=c[n],r?(o.oldValue=r.value,ln(o,"update",e,t),o.def&&o.def.componentUpdated&&u.push(o)):(ln(o,"bind",e,t),o.def&&o.def.inserted&&l.push(o));if(l.length){var f=function(){for(var n=0;n-1?e.split(/\s+/).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function An(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");n=n.trim(),n?t.setAttribute("class",n):t.removeAttribute("class")}}function On(t){if(t){if("object"===(void 0===t?"undefined":er(t))){var e={};return!1!==t.css&&g(e,ei(t.name||"v")),g(e,t),e}return"string"==typeof t?ei(t):void 0}}function Sn(t){li(function(){li(t)})}function En(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),$n(t,e))}function jn(t,e){t._transitionClasses&&v(t._transitionClasses,e),An(t,e)}function Tn(t,e,n){var r=Dn(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===ri?ai:ci,c=0,l=function(){t.removeEventListener(s,u),n()},u=function(e){e.target===t&&++c>=a&&l()};setTimeout(function(){c0&&(n=ri,u=a,f=i.length):e===oi?l>0&&(n=oi,u=l,f=c.length):(u=Math.max(a,l),n=u>0?a>l?ri:oi:null,f=n?n===ri?i.length:c.length:0),{type:n,timeout:u,propCount:f,hasTransform:n===ri&&ui.test(r[ii+"Property"])}}function Mn(t,e){for(;t.length1}function zn(t,e){!0!==e.data.show&&Nn(e)}function Un(t,e,n){var r=e.value,o=t.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,c=t.options.length;s-1,a.selected!==i&&(a.selected=i);else if(x(Bn(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function Bn(t){return"_value"in t?t._value:t.value}function Fn(t){t.target.composing=!0}function Xn(t){t.target.composing&&(t.target.composing=!1,Vn(t.target,"input"))}function Vn(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Hn(t){return!t.componentInstance||t.data&&t.data.transition?t:Hn(t.componentInstance._vnode)}function Wn(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Wn(pt(e.children)):t}function qn(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var i in o)e[ar(i)]=o[i];return e}function Kn(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function Gn(t){for(;t=t.parent;)if(t.data.transition)return!0}function Jn(t,e){return e.key===t.key&&e.tag===t.tag}function Zn(t){return t.isComment&&t.asyncFactory}function Qn(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function Yn(t){t.data.newPos=t.elm.getBoundingClientRect()}function tr(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,o=e.top-n.top;if(r||o){t.data.moved=!0;var i=t.elm.style;i.transform=i.WebkitTransform="translate("+r+"px,"+o+"px)",i.transitionDuration="0s"}}Object.defineProperty(e,"__esModule",{value:!0});var er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nr=Object.prototype.toString,rr=(p("slot,component",!0),p("key,ref,slot,is")),or=Object.prototype.hasOwnProperty,ir=/-(\w)/g,ar=m(function(t){return t.replace(ir,function(t,e){return e?e.toUpperCase():""})}),sr=m(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),cr=/([^-])([A-Z])/g,lr=m(function(t){return t.replace(cr,"$1-$2").replace(cr,"$1-$2").toLowerCase()}),ur=function(t,e,n){return!1},fr=function(t){return t},dr="data-server-rendered",pr=["component","directive","filter"],vr=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated"],hr={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:ur,isReservedAttr:ur,isUnknownElement:ur,getTagNamespace:w,parsePlatformTagName:fr,mustUseProp:ur,_lifecycleHooks:vr},mr=Object.freeze({}),yr=/[^\w.$]/,br=w,gr="__proto__"in{},_r="undefined"!=typeof window,wr=_r&&window.navigator.userAgent.toLowerCase(),xr=wr&&/msie|trident/.test(wr),kr=wr&&wr.indexOf("msie 9.0")>0,Cr=wr&&wr.indexOf("edge/")>0,$r=wr&&wr.indexOf("android")>0,Ar=wr&&/iphone|ipad|ipod|ios/.test(wr),Or=wr&&/chrome\/\d+/.test(wr)&&!Cr,Sr={}.watch,Er=!1;if(_r)try{var jr={};Object.defineProperty(jr,"passive",{get:function(){Er=!0}}),window.addEventListener("test-passive",null,jr)}catch(t){}var Tr,Dr,Mr=function(){return void 0===Tr&&(Tr=!_r&&void 0!==t&&"server"===t.process.env.VUE_ENV),Tr},Lr=_r&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,Nr="undefined"!=typeof Symbol&&E(Symbol)&&"undefined"!=typeof Reflect&&E(Reflect.ownKeys),Ir=function(){function t(){r=!1;var t=n.slice(0);n.length=0;for(var e=0;e1?b(n):n;for(var r=b(arguments,1),o=0,i=n.length;o1&&(e[n[0].trim()]=n[1].trim())}}),e}),Go=/^--/,Jo=/\s*!important$/,Zo=function(t,e,n){if(Go.test(e))t.style.setProperty(e,n);else if(Jo.test(n))t.style.setProperty(e,n.replace(Jo,""),"important");else{var r=Yo(e);if(Array.isArray(n))for(var o=0,i=n.length;ov?(f=n(o[y+1])?null:o[y+1].elm,b(t,f,o,p,y,i)):p>y&&_(t,e,d,v)}function k(t,e,i,a){if(t!==e){var s=e.elm=t.elm;if(o(t.isAsyncPlaceholder))return void(r(e.asyncFactory.resolved)?$(t.elm,e,i):e.isAsyncPlaceholder=!0);if(o(e.isStatic)&&o(t.isStatic)&&e.key===t.key&&(o(e.isCloned)||o(e.isOnce)))return void(e.componentInstance=t.componentInstance);var c,l=e.data;r(l)&&r(c=l.hook)&&r(c=c.prepatch)&&c(t,e);var u=t.children,f=e.children;if(r(l)&&h(e)){for(c=0;cn.parts.length&&(r.parts.length=n.parts.length)}else{for(var a=[],o=0;o