UNPKG

vc-autocomplete

Version:

autocomplete(local & remote) component based on vue.js & bootstrap

2 lines 34.8 kB
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.vcAutocomplete=n():t.vcAutocomplete=n()}(this,function(){return function(t){function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}var e={};return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,n,e){Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:e})},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="/",n(n.s=92)}([function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n){var e=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=e)},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n,e){var o=e(59),r=e(15);t.exports=function(t){return o(r(t))}},function(t,n,e){t.exports=!e(8)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n,e){var o=e(6),r=e(13);t.exports=e(4)?function(t,n,e){return o.f(t,n,r(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var o=e(11),r=e(33),i=e(24),s=Object.defineProperty;n.f=e(4)?Object.defineProperty:function(t,n,e){if(o(t),n=i(n,!0),o(e),r)try{return s(t,n,e)}catch(a){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var o=e(22)("wks"),r=e(14),i=e(0).Symbol,s="function"==typeof i,a=t.exports=function(t){return o[t]||(o[t]=s&&i[t]||(s?i:r)("Symbol."+t))};a.store=o},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,e){var o=e(38),r=e(16);t.exports=Object.keys||function(t){return o(t,r)}},function(t,n,e){var o=e(9);t.exports=function(t){if(!o(t))throw TypeError(t+" is not an object!");return t}},function(t,n,e){var o=e(0),r=e(1),i=e(56),s=e(5),a="prototype",u=function(t,n,e){var c,l,f,p=t&u.F,h=t&u.G,d=t&u.S,v=t&u.P,y=t&u.B,m=t&u.W,b=h?r:r[n]||(r[n]={}),x=b[a],g=h?o:d?o[n]:(o[n]||{})[a];h&&(e=n);for(c in e)l=!p&&g&&void 0!==g[c],l&&c in b||(f=l?g[c]:e[c],b[c]=h&&"function"!=typeof g[c]?e[c]:y&&l?i(f,o):m&&g[c]==f?function(t){var n=function(n,e,o){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,e)}return new t(n,e,o)}return t.apply(this,arguments)};return n[a]=t[a],n}(f):v&&"function"==typeof f?i(Function.call,f):f,v&&((b.virtual||(b.virtual={}))[c]=f,t&u.R&&x&&!x[c]&&s(x,c,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n){var e=0,o=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+o).toString(36))}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n){t.exports={}},function(t,n){t.exports=!0},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,e){var o=e(6).f,r=e(2),i=e(7)("toStringTag");t.exports=function(t,n,e){t&&!r(t=e?t:t.prototype,i)&&o(t,i,{configurable:!0,value:n})}},function(t,n,e){var o=e(22)("keys"),r=e(14);t.exports=function(t){return o[t]||(o[t]=r(t))}},function(t,n,e){var o=e(0),r="__core-js_shared__",i=o[r]||(o[r]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,n){var e=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?o:e)(t)}},function(t,n,e){var o=e(9);t.exports=function(t,n){if(!o(t))return t;var e,r;if(n&&"function"==typeof(e=t.toString)&&!o(r=e.call(t)))return r;if("function"==typeof(e=t.valueOf)&&!o(r=e.call(t)))return r;if(!n&&"function"==typeof(e=t.toString)&&!o(r=e.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,n,e){var o=e(0),r=e(1),i=e(18),s=e(26),a=e(6).f;t.exports=function(t){var n=r.Symbol||(r.Symbol=i?{}:o.Symbol||{});"_"==t.charAt(0)||t in n||a(n,t,{value:s.f(t)})}},function(t,n,e){n.f=e(7)},,,function(t,n){function e(t,n){for(var e=0;e<t.length;e++){var o=t[e],r=p[o.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](o.parts[i]);for(;i<o.parts.length;i++)r.parts.push(u(o.parts[i],n))}else{for(var s=[],i=0;i<o.parts.length;i++)s.push(u(o.parts[i],n));p[o.id]={id:o.id,refs:1,parts:s}}}}function o(t){for(var n=[],e={},o=0;o<t.length;o++){var r=t[o],i=r[0],s=r[1],a=r[2],u=r[3],c={css:s,media:a,sourceMap:u};e[i]?e[i].parts.push(c):n.push(e[i]={id:i,parts:[c]})}return n}function r(t,n){var e=v(),o=b[b.length-1];if("top"===t.insertAt)o?o.nextSibling?e.insertBefore(n,o.nextSibling):e.appendChild(n):e.insertBefore(n,e.firstChild),b.push(n);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");e.appendChild(n)}}function i(t){t.parentNode.removeChild(t);var n=b.indexOf(t);n>=0&&b.splice(n,1)}function s(t){var n=document.createElement("style");return n.type="text/css",r(t,n),n}function a(t){var n=document.createElement("link");return n.rel="stylesheet",r(t,n),n}function u(t,n){var e,o,r;if(n.singleton){var u=m++;e=y||(y=s(n)),o=c.bind(null,e,u,!1),r=c.bind(null,e,u,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(e=a(n),o=f.bind(null,e),r=function(){i(e),e.href&&URL.revokeObjectURL(e.href)}):(e=s(n),o=l.bind(null,e),r=function(){i(e)});return o(t),function(n){if(n){if(n.css===t.css&&n.media===t.media&&n.sourceMap===t.sourceMap)return;o(t=n)}else r()}}function c(t,n,e,o){var r=e?"":o.css;if(t.styleSheet)t.styleSheet.cssText=x(n,r);else{var i=document.createTextNode(r),s=t.childNodes;s[n]&&t.removeChild(s[n]),s.length?t.insertBefore(i,s[n]):t.appendChild(i)}}function l(t,n){var e=n.css,o=n.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}function f(t,n){var e=n.css,o=n.sourceMap;o&&(e+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var r=new Blob([e],{type:"text/css"}),i=t.href;t.href=URL.createObjectURL(r),i&&URL.revokeObjectURL(i)}var p={},h=function(t){var n;return function(){return"undefined"==typeof n&&(n=t.apply(this,arguments)),n}},d=h(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),v=h(function(){return document.head||document.getElementsByTagName("head")[0]}),y=null,m=0,b=[];t.exports=function(t,n){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");n=n||{},"undefined"==typeof n.singleton&&(n.singleton=d()),"undefined"==typeof n.insertAt&&(n.insertAt="bottom");var r=o(t);return e(r,n),function(t){for(var i=[],s=0;s<r.length;s++){var a=r[s],u=p[a.id];u.refs--,i.push(u)}if(t){var c=o(t);e(c,n)}for(var s=0;s<i.length;s++){var u=i[s];if(0===u.refs){for(var l=0;l<u.parts.length;l++)u.parts[l]();delete p[u.id]}}}};var x=function(){var t=[];return function(n,e){return t[n]=e,t.filter(Boolean).join("\n")}}()},function(t,n){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],n=0;n<this.length;n++){var e=this[n];e[2]?t.push("@media "+e[2]+"{"+e[1]+"}"):t.push(e[1])}return t.join("")},t.i=function(n,e){"string"==typeof n&&(n=[[null,n,""]]);for(var o={},r=0;r<this.length;r++){var i=this[r][0];"number"==typeof i&&(o[i]=!0)}for(r=0;r<n.length;r++){var s=n[r];"number"==typeof s[0]&&o[s[0]]||(e&&!s[2]?s[2]=e:e&&(s[2]="("+s[2]+") and ("+e+")"),t.push(s))}},t}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n,e){var o=e(9),r=e(0).document,i=o(r)&&o(r.createElement);t.exports=function(t){return i?r.createElement(t):{}}},function(t,n,e){t.exports=!e(4)&&!e(8)(function(){return 7!=Object.defineProperty(e(32)("div"),"a",{get:function(){return 7}}).a})},function(t,n,e){"use strict";var o=e(18),r=e(12),i=e(39),s=e(5),a=e(2),u=e(17),c=e(62),l=e(20),f=e(69),p=e(7)("iterator"),h=!([].keys&&"next"in[].keys()),d="@@iterator",v="keys",y="values",m=function(){return this};t.exports=function(t,n,e,b,x,g,w){c(e,n,b);var S,O,j,L=function(t){if(!h&&t in M)return M[t];switch(t){case v:return function(){return new e(this,t)};case y:return function(){return new e(this,t)}}return function(){return new e(this,t)}},_=n+" Iterator",k=x==y,C=!1,M=t.prototype,E=M[p]||M[d]||x&&M[x],A=E||L(x),P=x?k?L("entries"):A:void 0,I="Array"==n?M.entries||E:E;if(I&&(j=f(I.call(new t)),j!==Object.prototype&&(l(j,_,!0),o||a(j,p)||s(j,p,m))),k&&E&&E.name!==y&&(C=!0,A=function(){return E.call(this)}),o&&!w||!h&&!C&&M[p]||s(M,p,A),u[n]=A,u[_]=m,x)if(S={values:k?A:L(y),keys:g?A:L(v),entries:P},w)for(O in S)O in M||i(M,O,S[O]);else r(r.P+r.F*(h||C),n,S);return S}},function(t,n,e){var o=e(11),r=e(66),i=e(16),s=e(21)("IE_PROTO"),a=function(){},u="prototype",c=function(){var t,n=e(32)("iframe"),o=i.length,r="<",s=">";for(n.style.display="none",e(58).appendChild(n),n.src="javascript:",t=n.contentWindow.document,t.open(),t.write(r+"script"+s+"document.F=Object"+r+"/script"+s),t.close(),c=t.F;o--;)delete c[u][i[o]];return c()};t.exports=Object.create||function(t,n){var e;return null!==t?(a[u]=o(t),e=new a,a[u]=null,e[s]=t):e=c(),void 0===n?e:r(e,n)}},function(t,n,e){var o=e(38),r=e(16).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return o(t,r)}},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,e){var o=e(2),r=e(3),i=e(55)(!1),s=e(21)("IE_PROTO");t.exports=function(t,n){var e,a=r(t),u=0,c=[];for(e in a)e!=s&&o(a,e)&&c.push(e);for(;n.length>u;)o(a,e=n[u++])&&(~i(c,e)||c.push(e));return c}},function(t,n,e){t.exports=e(5)},function(t,n,e){var o=e(15);t.exports=function(t){return Object(o(t))}},function(t,n,e){e(42),t.exports=e(89),t.exports.__esModule&&(t.exports=t.exports["default"]),("function"==typeof t.exports?t.exports.options:t.exports).template=e(46)},function(t,n,e){var o=e(44);"string"==typeof o&&(o=[[t.i,o,""]]);e(29)(o,{});o.locals&&(t.exports=o.locals)},function(t,n,e){var o=e(45);"string"==typeof o&&(o=[[t.i,o,""]]);e(29)(o,{});o.locals&&(t.exports=o.locals)},function(t,n,e){n=t.exports=e(30)(),n.push([t.i,'.vc-autocomplete-component {\n position: relative;\n}\n.vc-autocomplete-component .input-box {\n display: inline-block;\n position: relative;\n}\n.vc-autocomplete-component .input-box:hover .clear-it {\n visibility: visible;\n}\n.vc-autocomplete-component .input-box .clear-it {\n visibility: hidden;\n position: absolute;\n right: 6px;\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n opacity: .3;\n}\n.transition,\n.autocomplete,\n.showAll-transition,\n.autocomplete ul,\n.autocomplete ul li a {\n transition: all 0.3s ease-out;\n -moz-transition: all 0.3s ease-out;\n -webkit-transition: all 0.3s ease-out;\n -o-transition: all 0.3s ease-out;\n}\n.autocomplete ul {\n width: auto;\n min-width: 100%;\n font-family: sans-serif;\n position: absolute;\n left: 50%;\n -webkit-transform: translate(-50%);\n transform: translate(-50%);\n list-style: none;\n background: #fff;\n padding: 1px;\n margin: 0;\n display: inline-block;\n margin-top: 10px;\n}\n/* 三角形 */\n.autocomplete ul:before {\n content: "";\n display: block;\n position: absolute;\n height: 0;\n width: 0;\n border: 10px solid transparent;\n border-bottom: 10px solid rgba(0, 0, 0, 0.15);\n left: 46%;\n top: -20px;\n}\n.autocomplete ul:after {\n content: "";\n display: block;\n position: absolute;\n height: 0;\n width: 0;\n border: 10px solid transparent;\n border-bottom: 10px solid #fff;\n left: 46%;\n top: -19px;\n}\n.autocomplete ul li a {\n text-decoration: none;\n display: block;\n color: #2b2b2b;\n padding: 5px;\n padding-left: 10px;\n}\n.autocomplete ul li a:hover,\n.autocomplete ul li.focus-list a {\n color: white;\n background: #2F9AF7;\n}\n.autocomplete ul li a span {\n display: block;\n margin-top: 3px;\n color: grey;\n font-size: 13px;\n}\n.autocomplete ul li a:hover span,\n.autocomplete ul li.focus-list a span {\n color: white;\n}\n.showAll-transition {\n opacity: 1;\n height: 30px;\n overflow: hidden;\n}\n.showAll-enter {\n opacity: 0.3;\n height: 0;\n}\n.showAll-leave {\n display: none;\n}\n',""])},function(t,n,e){n=t.exports=e(30)(),n.push([t.i,".vc-easyclearinput-component .label-item {\n font-weight: normal;\n display: table;\n vertical-align: bottom;\n float: left;\n height: 34px;\n line-height: 34px;\n}\n.vc-easyclearinput-component textarea.form-control {\n resize: vertical;\n}\n.vc-easyclearinput-component .glyphicon {\n z-index: 9;\n}\n.vc-easyclearinput-component .input-box {\n display: table;\n position: relative;\n}\n.vc-easyclearinput-component .input-box .form-control {\n width: 100%;\n border-radius: 4px!important;\n}\n.vc-easyclearinput-component .input-box .form-control.slot-before {\n border-top-left-radius: 0!important;\n border-bottom-left-radius: 0!important;\n}\n.vc-easyclearinput-component .input-box .form-control.slot-after {\n border-top-right-radius: 0!important;\n border-bottom-right-radius: 0!important;\n}\n.vc-easyclearinput-component .input-box:hover .clear-it {\n visibility: visible;\n}\n.vc-easyclearinput-component .input-box .clear-it {\n visibility: hidden;\n position: absolute;\n top: 50%;\n right: 6px;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n opacity: .3;\n}\n.vc-easyclearinput-component .input-box .clear-it.has-icon {\n right: 28px;\n}\n.vc-easyclearinput-component .info-text {\n position: absolute;\n top: -22px;\n}\n.vc-easyclearinput-component .info-text.with-success {\n color: #87d068;\n}\n.vc-easyclearinput-component .info-text.with-warning {\n color: #fa0;\n}\n.vc-easyclearinput-component .info-text.with-error {\n color: #f50;\n}\n",""])},function(t,n){t.exports='<div class="vc-autocomplete-component form-group">\n <vc-easyclearinput\n :name="name"\n type="text"\n :value.sync="shownValue"\n :placeholder="placeholder"\n :label="label"\n @input="input | debounce 300"\n :on-blur="handleBlur"\n :on-focus="handleFocus"\n @keydown="keydown"\n :on-clear="clear"\n >\n <div :class="[ \'autocomplete\', \'transition\', \'autocomplete-\' + name ]" :id="\'autocomplete-\' + name" v-show="showList"> \n <ul v-if="jsonList && jsonList.length > 0" class="dropdown-menu" @mousemove="inList = true" @mouseleave="inList = false"> \n <li v-for="data in jsonList" transition="showAll" :class="activeClass($index)"> \n <!--<a href="#" @click.prevent="$emit(\'selectList\',data)" @mousemove="mousemove($index)">-->\n <a href="#" @click.prevent="handleClick(data)" @mousemove="mousemove($index)">\n <span class="vc-autocomplete-item">{{ data[anchor] }} {{ data[anchorPlus] }}</span>\n </a> \n </li>\n </ul> \n <ul class="dropdown-menu" v-if="showNoContentTip" style="text-align: center;padding: 10px;">没有匹配的{{ label }}数据</ul>\n </div>\n </vc-easyclearinput>\n </div>'},function(t,n){t.exports='<div class="vc-easyclearinput-component form-group" :class="[statusClass, { \'has-feedback\': icon }]" :style="{ \'width\': optionalWidth }">\n <label class="label-item">{{ label }}</label>\n <div class="info-text" :class="infoTextClass">{{ infoText }}</div>\n <div :class="{ \'input-box\': true, \'input-group\': (slotBefore || slotAfter)}">\n <slot name="input-before"></slot>\n <span v-if="!slot-before || !slot-after" style="width: 1%;display: table-cell">&nbsp;</span><!-- 占位元素,用于撑开宽度,原因未知 -->\n <span v-if="icon" class="glyphicon form-control-feedback" :class="iconClass" aria-hidden="true"></span>\n <span @click="handleClear" class="clear-it glyphicon glyphicon-remove-circle" :class="{ \'has-icon\': icon, \'hide\': hideClearIcon, \'slot-after\': slotAfter }" aria-hidden="true"></span>\n <input class="form-control"\n :class="[ \'form-control\', slotBefore ? \'slot-before\' : \'\', slotAfter ? \'slot-after\' : \'\' ]"\n v-if="type !== \'textarea\'"\n v-el:input\n :type="type"\n :disabled="disabled"\n :readonly="readonly"\n v-model="value"\n :placeholder="placeholder"\n @focus="handleFocus"\n @blur="handleBlur"\n />\n <textarea \n v-if="type === \'textarea\'"\n class="form-control"\n v-el:input\n :type="type"\n :disabled="disabled"\n :readonly="readonly"\n v-model="value"\n :placeholder="placeholder"\n @focus="handleFocus"\n @blur="handleBlur"\n >\n </textarea>\n <slot></slot>\n <slot name="input-after"></slot>\n </div>\n </div>'},function(t,n,e){var o=e(1),r=o.JSON||(o.JSON={stringify:JSON.stringify});t.exports=function(t){return r.stringify.apply(r,arguments)}},function(t,n,e){e(75),t.exports=e(1).Number.isInteger},function(t,n,e){e(76),t.exports=e(1).Object.keys},function(t,n,e){e(79),e(77),e(80),e(81),t.exports=e(1).Symbol},function(t,n,e){e(78),e(82),t.exports=e(26).f("iterator")},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n){t.exports=function(){}},function(t,n,e){var o=e(3),r=e(73),i=e(72);t.exports=function(t){return function(n,e,s){var a,u=o(n),c=r(u.length),l=i(s,c);if(t&&e!=e){for(;c>l;)if(a=u[l++],a!=a)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===e)return t||l||0;return!t&&-1}}},function(t,n,e){var o=e(53);t.exports=function(t,n,e){if(o(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,o){return t.call(n,e,o)};case 3:return function(e,o,r){return t.call(n,e,o,r)}}return function(){return t.apply(n,arguments)}}},function(t,n,e){var o=e(10),r=e(37),i=e(19);t.exports=function(t){var n=o(t),e=r.f;if(e)for(var s,a=e(t),u=i.f,c=0;a.length>c;)u.call(t,s=a[c++])&&n.push(s);return n}},function(t,n,e){t.exports=e(0).document&&document.documentElement},function(t,n,e){var o=e(31);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==o(t)?t.split(""):Object(t)}},function(t,n,e){var o=e(31);t.exports=Array.isArray||function(t){return"Array"==o(t)}},function(t,n,e){var o=e(9),r=Math.floor;t.exports=function(t){return!o(t)&&isFinite(t)&&r(t)===t}},function(t,n,e){"use strict";var o=e(35),r=e(13),i=e(20),s={};e(5)(s,e(7)("iterator"),function(){return this}),t.exports=function(t,n,e){t.prototype=o(s,{next:r(1,e)}),i(t,n+" Iterator")}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,e){var o=e(10),r=e(3);t.exports=function(t,n){for(var e,i=r(t),s=o(i),a=s.length,u=0;a>u;)if(i[e=s[u++]]===n)return e}},function(t,n,e){var o=e(14)("meta"),r=e(9),i=e(2),s=e(6).f,a=0,u=Object.isExtensible||function(){return!0},c=!e(8)(function(){return u(Object.preventExtensions({}))}),l=function(t){s(t,o,{value:{i:"O"+ ++a,w:{}}})},f=function(t,n){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,o)){if(!u(t))return"F";if(!n)return"E";l(t)}return t[o].i},p=function(t,n){if(!i(t,o)){if(!u(t))return!0;if(!n)return!1;l(t)}return t[o].w},h=function(t){return c&&d.NEED&&u(t)&&!i(t,o)&&l(t),t},d=t.exports={KEY:o,NEED:!1,fastKey:f,getWeak:p,onFreeze:h}},function(t,n,e){var o=e(6),r=e(11),i=e(10);t.exports=e(4)?Object.defineProperties:function(t,n){r(t);for(var e,s=i(n),a=s.length,u=0;a>u;)o.f(t,e=s[u++],n[e]);return t}},function(t,n,e){var o=e(19),r=e(13),i=e(3),s=e(24),a=e(2),u=e(33),c=Object.getOwnPropertyDescriptor;n.f=e(4)?c:function(t,n){if(t=i(t),n=s(n,!0),u)try{return c(t,n)}catch(e){}if(a(t,n))return r(!o.f.call(t,n),t[n])}},function(t,n,e){var o=e(3),r=e(36).f,i={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return r(t)}catch(n){return s.slice()}};t.exports.f=function(t){return s&&"[object Window]"==i.call(t)?a(t):r(o(t))}},function(t,n,e){var o=e(2),r=e(40),i=e(21)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=r(t),o(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,n,e){var o=e(12),r=e(1),i=e(8);t.exports=function(t,n){var e=(r.Object||{})[t]||Object[t],s={};s[t]=n(e),o(o.S+o.F*i(function(){e(1)}),"Object",s)}},function(t,n,e){var o=e(23),r=e(15);t.exports=function(t){return function(n,e){var i,s,a=String(r(n)),u=o(e),c=a.length;return u<0||u>=c?t?"":void 0:(i=a.charCodeAt(u),i<55296||i>56319||u+1===c||(s=a.charCodeAt(u+1))<56320||s>57343?t?a.charAt(u):i:t?a.slice(u,u+2):(i-55296<<10)+(s-56320)+65536)}}},function(t,n,e){var o=e(23),r=Math.max,i=Math.min;t.exports=function(t,n){return t=o(t),t<0?r(t+n,0):i(t,n)}},function(t,n,e){var o=e(23),r=Math.min;t.exports=function(t){return t>0?r(o(t),9007199254740991):0}},function(t,n,e){"use strict";var o=e(54),r=e(63),i=e(17),s=e(3);t.exports=e(34)(Array,"Array",function(t,n){this._t=s(t),this._i=0,this._k=n},function(){var t=this._t,n=this._k,e=this._i++;return!t||e>=t.length?(this._t=void 0,r(1)):"keys"==n?r(0,e):"values"==n?r(0,t[e]):r(0,[e,t[e]])},"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,n,e){var o=e(12);o(o.S,"Number",{isInteger:e(61)})},function(t,n,e){var o=e(40),r=e(10);e(70)("keys",function(){return function(t){return r(o(t))}})},function(t,n){},function(t,n,e){"use strict";var o=e(71)(!0);e(34)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,n=this._t,e=this._i;return e>=n.length?{value:void 0,done:!0}:(t=o(n,e),this._i+=t.length,{value:t,done:!1})})},function(t,n,e){"use strict";var o=e(0),r=e(2),i=e(4),s=e(12),a=e(39),u=e(65).KEY,c=e(8),l=e(22),f=e(20),p=e(14),h=e(7),d=e(26),v=e(25),y=e(64),m=e(57),b=e(60),x=e(11),g=e(3),w=e(24),S=e(13),O=e(35),j=e(68),L=e(67),_=e(6),k=e(10),C=L.f,M=_.f,E=j.f,A=o.Symbol,P=o.JSON,I=P&&P.stringify,T="prototype",F=h("_hidden"),N=h("toPrimitive"),B={}.propertyIsEnumerable,$=l("symbol-registry"),R=l("symbols"),U=l("op-symbols"),D=Object[T],V="function"==typeof A,J=o.QObject,K=!J||!J[T]||!J[T].findChild,W=i&&c(function(){return 7!=O(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a})?function(t,n,e){var o=C(D,n);o&&delete D[n],M(t,n,e),o&&t!==D&&M(D,n,o)}:M,z=function(t){var n=R[t]=O(A[T]);return n._k=t,n},G=V&&"symbol"==typeof A.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof A},Y=function(t,n,e){return t===D&&Y(U,n,e),x(t),n=w(n,!0),x(e),r(R,n)?(e.enumerable?(r(t,F)&&t[F][n]&&(t[F][n]=!1),e=O(e,{enumerable:S(0,!1)})):(r(t,F)||M(t,F,S(1,{})),t[F][n]=!0),W(t,n,e)):M(t,n,e)},q=function(t,n){x(t);for(var e,o=m(n=g(n)),r=0,i=o.length;i>r;)Y(t,e=o[r++],n[e]);return t},H=function(t,n){return void 0===n?O(t):q(O(t),n)},Q=function(t){var n=B.call(this,t=w(t,!0));return!(this===D&&r(R,t)&&!r(U,t))&&(!(n||!r(this,t)||!r(R,t)||r(this,F)&&this[F][t])||n)},X=function(t,n){if(t=g(t),n=w(n,!0),t!==D||!r(R,n)||r(U,n)){var e=C(t,n);return!e||!r(R,n)||r(t,F)&&t[F][n]||(e.enumerable=!0),e}},Z=function(t){for(var n,e=E(g(t)),o=[],i=0;e.length>i;)r(R,n=e[i++])||n==F||n==u||o.push(n);return o},tt=function(t){for(var n,e=t===D,o=E(e?U:g(t)),i=[],s=0;o.length>s;)!r(R,n=o[s++])||e&&!r(D,n)||i.push(R[n]);return i};V||(A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),n=function(e){this===D&&n.call(U,e),r(this,F)&&r(this[F],t)&&(this[F][t]=!1),W(this,t,S(1,e))};return i&&K&&W(D,t,{configurable:!0,set:n}),z(t)},a(A[T],"toString",function(){return this._k}),L.f=X,_.f=Y,e(36).f=j.f=Z,e(19).f=Q,e(37).f=tt,i&&!e(18)&&a(D,"propertyIsEnumerable",Q,!0),d.f=function(t){return z(h(t))}),s(s.G+s.W+s.F*!V,{Symbol:A});for(var nt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;nt.length>et;)h(nt[et++]);for(var nt=k(h.store),et=0;nt.length>et;)v(nt[et++]);s(s.S+s.F*!V,"Symbol",{"for":function(t){return r($,t+="")?$[t]:$[t]=A(t)},keyFor:function(t){if(G(t))return y($,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){K=!0},useSimple:function(){K=!1}}),s(s.S+s.F*!V,"Object",{create:H,defineProperty:Y,defineProperties:q,getOwnPropertyDescriptor:X,getOwnPropertyNames:Z,getOwnPropertySymbols:tt}),P&&s(s.S+s.F*(!V||c(function(){var t=A();return"[null]"!=I([t])||"{}"!=I({a:t})||"{}"!=I(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!G(t)){for(var n,e,o=[t],r=1;arguments.length>r;)o.push(arguments[r++]);return n=o[1],"function"==typeof n&&(e=n),!e&&b(n)||(n=function(t,n){if(e&&(n=e.call(this,t,n)),!G(n))return n}),o[1]=n,I.apply(P,o)}}}),A[T][N]||e(5)(A[T],N,A[T].valueOf),f(A,"Symbol"),f(Math,"Math",!0),f(o.JSON,"JSON",!0)},function(t,n,e){e(25)("asyncIterator")},function(t,n,e){e(25)("observable")},function(t,n,e){e(74);for(var o=e(0),r=e(5),i=e(17),s=e(7)("toStringTag"),a=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var c=a[u],l=o[c],f=l&&l.prototype;f&&!f[s]&&r(f,s,c),i[c]=i.Array}},function(t,n,e){t.exports={"default":e(48),__esModule:!0}},function(t,n,e){t.exports={"default":e(49),__esModule:!0}},function(t,n,e){t.exports={"default":e(50),__esModule:!0}},function(t,n,e){t.exports={"default":e(51),__esModule:!0}},function(t,n,e){t.exports={"default":e(52),__esModule:!0}},function(t,n,e){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}n.__esModule=!0;var r=e(87),i=o(r),s=e(86),a=o(s),u="function"==typeof a["default"]&&"symbol"==typeof i["default"]?function(t){return typeof t}:function(t){return t&&"function"==typeof a["default"]&&t.constructor===a["default"]?"symbol":typeof t};n["default"]="function"==typeof a["default"]&&"symbol"===u(i["default"])?function(t){return"undefined"==typeof t?"undefined":u(t)}:function(t){return t&&"function"==typeof a["default"]&&t.constructor===a["default"]?"symbol":"undefined"==typeof t?"undefined":u(t)}},function(t,n,e){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(n,"__esModule",{value:!0});var r=e(88),i=o(r),s=e(83),a=o(s),u=e(91),c=o(u),l="AUTOCOMPLETE";n["default"]={name:"vc-autocomplete",props:{name:String,autofocus:{type:Boolean,"default":!1},fallback:{type:Boolean,"default":!0},autoSelect:{type:Boolean,"default":!1},label:{type:String,"default":""},placeholder:String,parentModelKey:String,mode:{type:String,"default":"remote"},store:{type:Array},comparer:Function,url:{type:String,required:!0},param:{type:String,"default":"word"},dataParser:Function,target:{type:String,required:!0,"default":"data.list"},limitKey:{type:String,"default":"limit"},limit:{type:String,"default":""},anchor:{type:String,required:!0},anchorPlus:{type:String,"default":"district"}},data:function(){return{shownValue:"",inputValue:"",vm:null,userSelected:!1,showList:!1,jsonList:[],json:function(t){return t&&JSON.parse((0,a["default"])(t))},showNoContentTip:!1,focusListIndex:"",inList:!1}},created:function(){this.shownValue=this.$parent.$data[this.parentModelKey],this.vm=this.$parent.$data[this.parentModelKey]},ready:function(){this.autofocus&&this.focusInput()},watch:{autofocus:function(t){this.focusInput()},vm:function(t,n){return this.$parent.$data[this.parentModelKey]=t}},components:{vcEasyclearinput:c["default"]},methods:{editDistance:function(t,n){if(t.indexOf(n)>-1||n.indexOf(t)>-1)return-1;var e=t.length+1,o=n.length+1,r=[],i=0,s=void 0,a=void 0;for(s=0;s<e;r[s]=[s++]);for(s=0;s<o;r[0][s]=s++);for(s=1;s<e;s++)for(a=1;a<o;a++)i=t[s-1]==n[a-1]?0:1,r[s][a]=Math.min(r[s-1][a]+1,r[s][a-1]+1,r[s-1][a-1]+i);return r[s-1][a-1]},fetchLocal:function(t,n){for(var e=e||this.editDistance,o=n||this.store,r=[],i=0,s=o.length;i<s;i++){var a={};a[this.anchor]=o[i],a.distance=e(t,o[i]),r.push(a)}r.sort(function(t,n){return t.distance>n.distance}),this.jsonList=r},fetchRemote:function(t){var n=this;null!=this.url&&!function(){var e={action:"beforeAjax",data:t};n.$dispatch(l,e,n.name);var o=new XMLHttpRequest,r=void 0;""!==n.limit?(n.limit=parseFloat(n.limit),r=""!==n.limit?"&"+n.limitKey+"="+n.limit:""):r="";var i=n.url+"?"+n.param+"="+t+r;o.open("GET",i),o.send(null),o.addEventListener("progress",function(t){if(t.lengthComputable){var e={action:"xhrProgress",data:t};n.$dispatch(l,e,n.name)}}),o.addEventListener("loadend",function(t){var e=JSON.parse(o.responseText);e=n.dataParser?n.dataParser(e):n.getDeepData(e,n.target);var r={action:"xhrLoaded",data:e};n.$dispatch(l,r,n.name),n.jsonList=e,null==e||e.length<1?n.fallback||(n.showNoContentTip=!0):n.showNoContentTip=!1}),o.addEventListener("error",function(t){console.error(t)})}()},focusInput:function(){this.$els.input&&this.$els.input.focus()},clear:function(){this.shownValue="",this.vm=null},getDeepData:function(t,n){for(var e=n.split("."),o=0,r=e.length;o<r;o++)t=t[e[o]];return t},input:function(){this.userSelected=!1;var t=this.shownValue;this.inputValue=this.shownValue,this.showList=!0;var n={action:"input",data:t};this.fallback&&(this.vm=t),this.$dispatch(l,n,this.name),this.$emit("fetchData",t)},showAll:function(){this.jsonList=[],this.$emit("fetchData");var t={action:"show",data:null};this.$dispatch(l,t,this.name),this.showList=!0},hideAll:function(t){var n=this,e={action:"blur",data:t};this.$dispatch(l,e,this.name),setTimeout(function(){n.showList=!1;var t={action:"hide",data:null};n.$dispatch(l,t,n.name)},250)},handleBlur:function(t){""===this.shownValue||null!=this.vm&&""!==this.vm||this.autoSelect||this.fallback||console.info("maybe you should use `fallback` or `autoSelect` mode to make the value as what you input!"),this.hideAll(t),this.userSelected||!this.autoSelect||this.inList||(this.vm=this.jsonList&&this.jsonList[0]||this.vm,"object"===(0,i["default"])(this.vm)&&null!=this.vm&&(this.shownValue=this.vm&&this.vm[this.anchor]),this.jsonList=[])},handleClick:function(t){if(this.userSelected=!0,t=this.json(t)){this.vm=t,this.shownValue=t[this.anchor],this.showList=!1;var n={action:"selected",data:t};this.$dispatch(l,n,this.name)}},handleFocus:function(t){this.focusListIndex=0;var n={action:"focus",data:t};this.$dispatch(l,n,this.name)},mousemove:function(t){this.focusListIndex=t},keydown:function(t){var n=t.keyCode;if(this.showList){switch(n){case 40:this.focusListIndex++;break;case 38:this.focusListIndex--;break;case 13:this.jsonList&&(this.handleClick(this.jsonList[this.focusListIndex]),this.showList=!1);break;case 27:this.showList=!1}var e=this.jsonList&&this.jsonList.length-1;this.focusListIndex=this.focusListIndex>e?0:this.focusListIndex<0?e:this.focusListIndex}},activeClass:function(t){return{"focus-list":t===this.focusListIndex}}},events:{selectList:function(t){var n=this;this.userSelected=!0,t=this.json(t),t&&setTimeout(function(){n.vm=t,n.shownValue=t[n.anchor],n.showList=!1;var e={action:"selected",data:t};n.$dispatch(l,e,n.name)},100)},fetchData:function(t){null!=t&&""!==t&&("remote"===this.mode?this.fetchRemote(t):"local"===this.mode?this.fetchLocal(t):console.warn("maybe no this mode!")); }}}},function(t,n,e){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(n,"__esModule",{value:!0});var r=e(85),i=o(r),s=e(84),a=o(s),u=128;n["default"]={name:"vc-easyclearinput",props:{type:{type:String,"default":"text"},value:{twoWay:!0},label:String,placeholder:String,infoText:{type:String,"default":""},disabled:{type:Boolean,"default":!1},readonly:{type:Boolean,"default":!1},autofocus:{type:Boolean,"default":!1},width:{type:[Number,String],"default":"250"},icon:{type:Boolean,"default":!1},status:{type:String,"default":""},onFocus:{type:Function,"default":function(){}},onBlur:{type:Function,"default":function(){}},onClear:{type:Function,"default":function(){}}},data:function(){return{isClear:!1,slotBefore:!1,slotAfter:!1}},created:function(){},ready:function(){this.autofocus&&this.focusInput(),this.checkSlot(),this.checkEvents()},computed:{hideClearIcon:function(){return null==this.value||""===this.value||this.disabled||this.readonly},optionalWidth:function(){return null==this.width||""===this.width?null:(0,a["default"])(+this.width)?this.width+"px":this.width},statusClass:function(){return"has-"+this.status},infoTextClass:function(){return"with-"+this.status},iconClass:function(){return"success"===this.status?"glyphicon-ok":"warning"===this.status?"glyphicon-warning-sign":"error"===this.status?"glyphicon-remove":void 0}},watch:{autofocus:function(t){t&&this.focusInput()}},methods:{checkSlot:function(){for(var t=(0,i["default"])(this._slotContents),n=0,e=t.length;n<e;n++)"input-before"===t[n]&&(this.slotBefore=!0),"input-after"===t[n]&&(this.slotAfter=!0)},checkEvents:function(){var t=this._events.focus;t&&t.length>0&&console.warn("if you want to listen on focus event, please use `:on-focus` callback!");var n=this._events.blur;n&&n.length>0&&console.warn("if you want to listen on blur event, please use `:on-blur` callback!")},focusInput:function(){this.$els.input&&this.$els.input.focus()},handleBlur:function(t){var n=this;setTimeout(function(){n.isClear?setTimeout(function(){n.focusInput()},0):n.onBlur(t)},u)},handleClear:function(){this.disabled||this.readonly||(this.isClear=!0,this.value="",this.onClear(),this.focusInput())},handleFocus:function(t){var n=this;setTimeout(function(){n.isClear||n.onFocus(t),n.isClear=!1},u+10)}}}},function(t,n,e){e(43),t.exports=e(90),t.exports.__esModule&&(t.exports=t.exports["default"]),("function"==typeof t.exports?t.exports.options:t.exports).template=e(47)},function(t,n,e){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}var r=e(41),i=o(r);t.exports=i["default"]}])});