ans-ui
Version:
A vue-based UI components library for analysys
1 lines • 314 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define("ans",["vue"],t):"object"==typeof exports?exports.ans=t(require("vue")):e.ans=t(e.Vue)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=116)}([function(e,t,n){"use strict";t.__esModule=!0,t.xCuctomRender=void 0;var i=n(118);Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})});var r=n(126);Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})});var o=n(133);Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})});var s=n(141);Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})});var a=n(8);Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})});var l=n(20);Object.keys(l).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})});var u=n(142);Object.keys(u).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})});var c,d=n(143),f=(c=d)&&c.__esModule?c:{default:c};t.xCuctomRender=f.default},function(e,t,n){"use strict";t.a=function(e,t,n,i,r,o,s,a){var l,u="function"==typeof e?e.options:e;t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0);i&&(u.functional=!0);o&&(u._scopeId="data-v-"+o);s?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},u._ssrRegister=l):r&&(l=a?function(){r.call(this,this.$root.$options.shadowRoot)}:r);if(l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(e,t){return l.call(t),c(e,t)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,l):[l]}return{exports:e,options:u}}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.convertFieldsError=o,t.format=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=1,o=t[0],s=t.length;if("function"==typeof o)return o.apply(null,t.slice(1));if("string"==typeof o){for(var a=String(o).replace(r,function(e){if("%%"===e)return"%";if(i>=s)return e;switch(e){case"%s":return String(t[i++]);case"%d":return Number(t[i++]);case"%j":try{return JSON.stringify(t[i++])}catch(e){return"[Circular]"}break;default:return e}}),l=t[i];i<s;l=t[++i])a+=" "+l;return a}return o},t.isEmptyValue=function(e,t){if(void 0===e||null===e)return!0;if("array"===t&&Array.isArray(e)&&!e.length)return!0;if(function(e){return"string"===e||"url"===e||"hex"===e||"email"===e||"pattern"===e}(t)&&"string"==typeof e&&!e)return!0;return!1},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.asyncMap=function(e,t,n,i){if(t.first){var r=function(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n])}),t}(e);return s(r,n,i)}var a=t.firstFields||[];!0===a&&(a=Object.keys(e));var l=Object.keys(e),u=l.length,c=0,d=[],f=new Promise(function(t,r){var f=function(e){if(d.push.apply(d,e),++c===u)return i(d),d.length?r({errors:d,fields:o(d)}):t()};l.forEach(function(t){var i=e[t];-1!==a.indexOf(t)?s(i,n,f):function(e,t,n){var i=[],r=0,o=e.length;function s(e){i.push.apply(i,e),++r===o&&n(i)}e.forEach(function(e){t(e,s)})}(i,n,f)})});return f.catch(function(e){return e}),f},t.complementError=function(e){return function(t){return t&&t.message?(t.field=t.field||e.fullField,t):{message:"function"==typeof t?t():t,field:t.field||e.fullField}}},t.deepMerge=function(e,t){if(t)for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];"object"===(void 0===o?"undefined":i(o))&&"object"===i(e[r])?e[r]=n({},e[r],o):e[r]=o}return e};var r=/%[sdj%]/g;t.warning=function(){};function o(e){if(!e||!e.length)return null;var t={};return e.forEach(function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)}),t}function s(e,t,n){var i=0,r=e.length;!function o(s){if(s&&s.length)n(s);else{var a=i;i+=1,a<r?t(e[a],o):n([])}}([])}"production"!==e.env.NODE_ENV&&"undefined"!=typeof window&&"undefined"!=typeof document&&(t.warning=function(e,t){"undefined"!=typeof console&&console.warn&&t.every(function(e){return"string"==typeof e})})}).call(t,n(286))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=u(n(115)),r=u(n(289)),o=u(n(290)),s=u(n(291)),a=u(n(292)),l=u(n(293));function u(e){return e&&e.__esModule?e:{default:e}}t.default={required:i.default,whitespace:r.default,type:o.default,range:s.default,enum:a.default,pattern:l.default}},function(e,t,n){"use strict";t.__esModule=!0,t.i18n=t.use=t.t=void 0;var i=s(n(139)),r=s(n(5)),o=s(n(21));function s(e){return e&&e.__esModule?e:{default:e}}var a=(0,s(n(140)).default)(r.default),l=i.default,u=!1,c=function(){var e=Object.getPrototypeOf(this||r.default).$t;if("function"==typeof e&&r.default.locale)return u||(u=!0,r.default.locale(r.default.config.lang,(0,o.default)(l,r.default.locale(r.default.config.lang)||{},{clone:!0}))),e.apply(this,arguments)},d=t.t=function(e,t){var n=c.apply(this,arguments);if(null!==n&&void 0!==n)return n;for(var i=e.split("."),r=l,o=0,s=i.length;o<s;o++){if(n=r[i[o]],o===s-1)return a(n,t);if(!n)return"";r=n}return""},f=t.use=function(e){l=e||l},h=t.i18n=function(e){c=e||c};t.default={use:f,t:d,i18n:h}},function(t,n){t.exports=e},function(e,t,n){var i;i=function(){"use strict";var e="millisecond",t="second",n="minute",i="hour",r="day",o="week",s="month",a="quarter",l="year",u=/^(\d{4})-?(\d{1,2})-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/,c=/\[([^\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,d=function(e,t,n){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(n)+e},f={s:d,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),i=Math.floor(n/60),r=n%60;return(t<=0?"+":"-")+d(i,2,"0")+":"+d(r,2,"0")},m:function(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),i=e.clone().add(n,s),r=t-i<0,o=e.clone().add(n+(r?-1:1),s);return Number(-(n+(t-i)/(r?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(u){return{M:s,y:l,w:o,d:r,h:i,m:n,s:t,ms:e,Q:a}[u]||String(u||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},h={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},p="en",m={};m[p]=h;var v=function(e){return e instanceof x},g=function(e,t,n){var i;if(!e)return p;if("string"==typeof e)m[e]&&(i=e),t&&(m[e]=t,i=e);else{var r=e.name;m[r]=e,i=r}return n||(p=i),i},b=function(e,t,n){if(v(e))return e.clone();var i=t?"string"==typeof t?{format:t,pl:n}:t:{};return i.date=e,new x(i)},y=f;y.l=g,y.i=v,y.w=function(e,t){return b(e,{locale:t.$L,utc:t.$u})};var x=function(){function d(e){this.$L=this.$L||g(e.locale,null,!0),this.parse(e)}var f=d.prototype;return f.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(y.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(u);if(i)return n?new Date(Date.UTC(i[1],i[2]-1,i[3]||1,i[4]||0,i[5]||0,i[6]||0,i[7]||0)):new Date(i[1],i[2]-1,i[3]||1,i[4]||0,i[5]||0,i[6]||0,i[7]||0)}return new Date(t)}(e),this.init()},f.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},f.$utils=function(){return y},f.isValid=function(){return!("Invalid Date"===this.$d.toString())},f.isSame=function(e,t){var n=b(e);return this.startOf(t)<=n&&n<=this.endOf(t)},f.isAfter=function(e,t){return b(e)<this.startOf(t)},f.isBefore=function(e,t){return this.endOf(t)<b(e)},f.$g=function(e,t,n){return y.u(e)?this[t]:this.set(n,e)},f.year=function(e){return this.$g(e,"$y",l)},f.month=function(e){return this.$g(e,"$M",s)},f.day=function(e){return this.$g(e,"$W",r)},f.date=function(e){return this.$g(e,"$D","date")},f.hour=function(e){return this.$g(e,"$H",i)},f.minute=function(e){return this.$g(e,"$m",n)},f.second=function(e){return this.$g(e,"$s",t)},f.millisecond=function(t){return this.$g(t,"$ms",e)},f.unix=function(){return Math.floor(this.valueOf()/1e3)},f.valueOf=function(){return this.$d.getTime()},f.startOf=function(e,a){var u=this,c=!!y.u(a)||a,d=y.p(e),f=function(e,t){var n=y.w(u.$u?Date.UTC(u.$y,t,e):new Date(u.$y,t,e),u);return c?n:n.endOf(r)},h=function(e,t){return y.w(u.toDate()[e].apply(u.toDate(),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),u)},p=this.$W,m=this.$M,v=this.$D,g="set"+(this.$u?"UTC":"");switch(d){case l:return c?f(1,0):f(31,11);case s:return c?f(1,m):f(0,m+1);case o:var b=this.$locale().weekStart||0,x=(p<b?p+7:p)-b;return f(c?v-x:v+(6-x),m);case r:case"date":return h(g+"Hours",0);case i:return h(g+"Minutes",1);case n:return h(g+"Seconds",2);case t:return h(g+"Milliseconds",3);default:return this.clone()}},f.endOf=function(e){return this.startOf(e,!1)},f.$set=function(o,a){var u,c=y.p(o),d="set"+(this.$u?"UTC":""),f=(u={},u[r]=d+"Date",u.date=d+"Date",u[s]=d+"Month",u[l]=d+"FullYear",u[i]=d+"Hours",u[n]=d+"Minutes",u[t]=d+"Seconds",u[e]=d+"Milliseconds",u)[c],h=c===r?this.$D+(a-this.$W):a;if(c===s||c===l){var p=this.clone().set("date",1);p.$d[f](h),p.init(),this.$d=p.set("date",Math.min(this.$D,p.daysInMonth())).toDate()}else f&&this.$d[f](h);return this.init(),this},f.set=function(e,t){return this.clone().$set(e,t)},f.get=function(e){return this[y.p(e)]()},f.add=function(e,a){var u,c=this;e=Number(e);var d=y.p(a),f=function(t){var n=b(c);return y.w(n.date(n.date()+Math.round(t*e)),c)};if(d===s)return this.set(s,this.$M+e);if(d===l)return this.set(l,this.$y+e);if(d===r)return f(1);if(d===o)return f(7);var h=(u={},u[n]=6e4,u[i]=36e5,u[t]=1e3,u)[d]||1,p=this.valueOf()+e*h;return y.w(p,this)},f.subtract=function(e,t){return this.add(-1*e,t)},f.format=function(e){var t=this;if(!this.isValid())return"Invalid Date";var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=y.z(this),r=this.$locale(),o=this.$H,s=this.$m,a=this.$M,l=r.weekdays,u=r.months,d=function(e,i,r,o){return e&&(e[i]||e(t,n))||r[i].substr(0,o)},f=function(e){return y.s(o%12||12,e,"0")},h=r.meridiem||function(e,t,n){var i=e<12?"AM":"PM";return n?i.toLowerCase():i},p={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:y.s(a+1,2,"0"),MMM:d(r.monthsShort,a,u,3),MMMM:u[a]||u(this,n),D:this.$D,DD:y.s(this.$D,2,"0"),d:String(this.$W),dd:d(r.weekdaysMin,this.$W,l,2),ddd:d(r.weekdaysShort,this.$W,l,3),dddd:l[this.$W],H:String(o),HH:y.s(o,2,"0"),h:f(1),hh:f(2),a:h(o,s,!0),A:h(o,s,!1),m:String(s),mm:y.s(s,2,"0"),s:String(this.$s),ss:y.s(this.$s,2,"0"),SSS:y.s(this.$ms,3,"0"),Z:i};return n.replace(c,function(e,t){return t||p[e]||i.replace(":","")})},f.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},f.diff=function(e,u,c){var d,f=y.p(u),h=b(e),p=6e4*(h.utcOffset()-this.utcOffset()),m=this-h,v=y.m(this,h);return v=(d={},d[l]=v/12,d[s]=v,d[a]=v/3,d[o]=(m-p)/6048e5,d[r]=(m-p)/864e5,d[i]=m/36e5,d[n]=m/6e4,d[t]=m/1e3,d)[f]||m,c?v:y.a(v)},f.daysInMonth=function(){return this.endOf(s).$D},f.$locale=function(){return m[this.$L]},f.locale=function(e,t){if(!e)return this.$L;var n=this.clone();return n.$L=g(e,t,!0),n},f.clone=function(){return y.w(this.toDate(),this)},f.toDate=function(){return new Date(this.$d)},f.toJSON=function(){return this.toISOString()},f.toISOString=function(){return this.$d.toISOString()},f.toString=function(){return this.$d.toUTCString()},d}();return b.prototype=x.prototype,b.extend=function(e,t){return e(t,x,b),b},b.locale=g,b.isDayjs=v,b.unix=function(e){return b(1e3*e)},b.en=m[p],b.Ls=m,b},e.exports=i()},function(e,t,n){"use strict";t.__esModule=!0;var i,r=n(6),o=(i=r)&&i.__esModule?i:{default:i};t.default=function(e){return(0,o.default)(e).isValid()}},function(e,t,n){"use strict";t.__esModule=!0;t.LIB_NAME="ans",t.ANIMATION_PREFIX="x-ani-"},function(e,t,n){"use strict";t.__esModule=!0,t.xInput=void 0;var i,r=n(182),o=(i=r)&&i.__esModule?i:{default:i};t.xInput=o.default},function(e,t,n){"use strict";t.__esModule=!0,t.xPoptip=void 0;var i=o(n(224)),r=o(n(227));function o(e){return e&&e.__esModule?e:{default:e}}i.default.directive=r.default,i.default.install=function(e){e.directive("poptip",r.default)},t.xPoptip=i.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return/[HhmsS]/.test(e)?"second":/[Hhm]/.test(e)?"minute":!!/[Hh]/.test(e)&&"hour"}},function(e,t,n){"use strict";t.__esModule=!0;var i=o(n(5)),r=o(n(144));function o(e){return e&&e.__esModule?e:{default:e}}r.default.newInstance=function(e){var t=e||{},n=new i.default({data:t,i18n:t.i18n,render:function(e){return e(r.default,{props:t})}}),o=n.$mount();document.body.appendChild(o.$el);var s=n.$children[0];return{notice:function(e){s.add(e)},remove:function(e){s.close(e)},component:s,destroy:function(e){s.closeAll(),setTimeout(function(){document.body.removeChild(document.getElementsByClassName(e)[0])},500)}}},t.default=r.default},function(e,t,n){"use strict";t.__esModule=!0,t.xButtonGroup=t.xButton=void 0;var i=o(n(151)),r=o(n(154));function o(e){return e&&e.__esModule?e:{default:e}}t.xButton=i.default,t.xButtonGroup=r.default},function(e,t,n){"use strict";t.__esModule=!0,t.xCheckboxGroup=t.xCheckbox=void 0;var i=o(n(165)),r=o(n(168));function o(e){return e&&e.__esModule?e:{default:e}}t.xCheckbox=i.default,t.xCheckboxGroup=r.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(172),r=n(38);for(var o in r)"default"!==o&&function(e){n.d(t,e,function(){return r[e]})}(o);var s=n(1),a=Object(s.a)(r.default,i.a,i.b,!1,null,null,null);t.default=a.exports},function(e,t,n){"use strict";function i(e,t,n,i){var r,o=!1,s=0;function a(){r&&clearTimeout(r)}function l(){var l=this,u=Date.now()-s,c=arguments;function d(){s=Date.now(),n.apply(l,c)}o||(i&&!r&&d(),a(),void 0===i&&u>e?d():!0!==t&&(r=setTimeout(i?function(){r=void 0}:d,void 0===i?e-u:e)))}return"boolean"!=typeof t&&(i=n,n=t,t=void 0),l.cancel=function(){a(),o=!0},l}function r(e,t,n){return void 0===n?i(e,t,!1):i(e,n,!1!==t)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"throttle",function(){return i}),n.d(t,"debounce",function(){return r})},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return Object.prototype.toString.call(e).match(/\[object (.*?)\]/)[1].toLowerCase()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(102);for(var r in i)"default"!==r&&function(e){n.d(t,e,function(){return i[e]})}(r);var o=n(1),s=Object(o.a)(i.default,void 0,void 0,!1,null,null,null);t.default=s.exports},function(e,t,n){"use strict";t.__esModule=!0,t.xNotice=t.xModal=t.xMessage=void 0;var i=s(n(117)),r=s(n(150)),o=s(n(157));function s(e){return e&&e.__esModule?e:{default:e}}t.xMessage=i.default,t.xModal=r.default,t.xNotice=o.default},function(e,t,n){"use strict";t.__esModule=!0;t.on=function(e,t,n){e&&t&&n&&e.addEventListener(t,n,!1)},t.off=function(e,t,n){e&&t&&n&&e.removeEventListener(t,n,!1)}},function(e,t,n){var i;i=function(){"use strict";var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)};var t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function i(e,t,i){return e.concat(t).map(function(e){return n(e,i)})}function r(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return e.propertyIsEnumerable(t)}):[]}(e))}function o(e,t,i){var o={};return i.isMergeableObject(e)&&r(e).forEach(function(t){o[t]=n(e[t],i)}),r(t).forEach(function(r){i.isMergeableObject(t[r])&&e[r]?o[r]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(r,i)(e[r],t[r],i):o[r]=n(t[r],i)}),o}function s(t,r,s){(s=s||{}).arrayMerge=s.arrayMerge||i,s.isMergeableObject=s.isMergeableObject||e;var a=Array.isArray(r);return a===Array.isArray(t)?a?s.arrayMerge(t,r,s):o(t,r,s):n(r,s)}return s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},s},e.exports=i()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(23),r=n.n(i);for(var o in i)"default"!==o&&function(e){n.d(t,e,function(){return i[e]})}(o);t.default=r.a},function(e,t,n){"use strict";t.__esModule=!0;var i,r=n(0),o=n(147),s=(i=o)&&i.__esModule?i:{default:i};var a=r.LIB_NAME+"-layer",l=0,u=Date.now();t.default={name:"xBoxManager",components:{Box:s.default},props:{prefixCls:{type:String,default:a},styles:{type:Object,default:function(){return{top:"65px",left:"50%"}}},className:{type:String}},data:function(){return{boxs:[]}},computed:{classes:function(){var e;return[""+this.prefixCls,this.prefixCls+"-wrapper",(e={},e[""+this.className]=!!this.className,e)]}},methods:{onrender:function(){},add:function(e){var t=e.name||r.LIB_NAME+"-Box_"+u+"_"+l++,n=Object.assign({styles:{right:"50%"},content:"",duration:1.5,closable:!1,name:t},e);n.$onRender=n.$onRender?n.$onRender:function(){},this.boxs.push(n)},close:function(e){for(var t=this.boxs,n=0;n<t.length;n++)if(t[n].name===e){this.boxs.splice(n,1);break}},closeAll:function(){this.boxs=[]},_onMounted:function(e){this.$emit("on-mounted",e)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(25),r=n.n(i);for(var o in i)"default"!==o&&function(e){n.d(t,e,function(){return i[e]})}(o);t.default=r.a},function(e,t,n){"use strict";t.__esModule=!0;var i=n(0);t.default={props:{name:{type:String,required:!0},type:{type:String},prefixCls:{type:String,default:""},transitionName:{type:String},duration:{type:Number,default:1.5},content:{type:String,default:""},styles:{type:Object,default:function(){return{right:"50%"}}},closable:{type:Boolean,default:!1},onClose:{type:Function,default:function(){}},className:{type:String,default:""},escClose:{type:Boolean,default:!1}},methods:{clearCloseTimer:function(){this.closeTimer&&(clearTimeout(this.closeTimer),this.closeTimer=null)},close:function(){this.clearCloseTimer(),this.onClose();var e=(0,i.findComponentUpward)(this,"xBoxManager");e&&e.close(this.name)},escHandler:function(e){var t=e||window.event||arguments.callee.caller.arguments[0];t&&27==t.keyCode&&this.close()}},computed:{baseClass:function(){return this.prefixCls+"-box"},classes:function(){return[""+this.baseClass,""+this.className]}},mounted:function(){var e=this;this.clearCloseTimer(),0!==this.duration&&(this.closeTimer=setTimeout(function(){e.close()},1e3*this.duration)),this.$listeners.onrender&&this.$listeners.onrender(this.name),this.escClose&&(document.onkeyup=this.escHandler)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(27),r=n.n(i);for(var o in i)"default"!==o&&function(e){n.d(t,e,function(){return i[e]})}(o);t.default=r.a},function(e,t,n){"use strict";t.__esModule=!0;var i=n(0),r=i.LIB_NAME+"-btn";t.default={name:"xButton",data:function(){return{showSlot:!0,iconPrefix:i.LIB_NAME+"-icon",isFirst:!1,isLast:!1}},mixins:[i.emitter],props:{type:{type:String,default:"primary",validator:function(e){return["primary","ghost","dashed","text","info","success","warning","error"].includes(e)}},shape:{type:String,validator:function(e){return["circle",""].includes(e)}},size:{type:String,default:"default",validator:function(e){return["xsmall","small","large","default"].includes(e)}},loading:Boolean,disabled:Boolean,visible:{type:Boolean,default:!0},htmlType:{type:String,default:"button",validator:function(e){return["button","submit","reset"].includes(e)}},icon:String,long:{type:Boolean,default:!1},value:{default:""}},computed:{showSpin:function(){return this.loading},spinClasses:function(){return[this.iconPrefix,"x-fa-spin "+i.LIB_NAME+"-icon-spinner"]},wrapClasses:function(){var e;return[""+r,(e={"first-child":this.isFirst,"last-child":this.isLast},e[r+"-"+this.type]=!!this.type,e[r+"-long"]=this.long,e[r+"-"+this.shape]=!!this.shape,e[r+"-"+this.size]=!!this.size,e[r+"-loading"]=this.showSpin,e[r+"-icon-only"]=!this.showSlot&&(!!this.icon||this.loading),e)]}},watch:{visible:function(e){this.dispatch("xButtonGroup","buttonVisibleChanged")}},methods:{handleClick:function(){if(!this.disabled&&!this.loading){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];this.$emit.apply(this,["click"].concat(t))}},handlePositionChange:function(e){var t=e.first,n=e.last;this.isFirst=t===this,this.isLast=n===this}},mounted:function(){this.showSlot=void 0!==this.$slots.default},created:function(){this.$on("checkPosition",this.handlePositionChange)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(29),r=n.n(i);for(var o in i)"default"!==o&&function(e){n.d(t,e,function(){return i[e]})}(o);t.default=r.a},function(e,t,n){"use strict";t.__esModule=!0;var i=n(0),r=i.LIB_NAME+"-btn-group";t.default={name:"xButtonGroup",data:function(){return{buttons:[],checkedList:[],activeClass:"active"}},mixins:[i.emitter],props:{size:{type:String,default:"default",validator:function(e){return["xsmall","small","large","default"].includes(e)}},shape:{type:String,validator:function(e){return["circle",""].includes(e)}},vertical:Boolean,value:{default:""}},computed:{classes:function(){var e;return[""+r,(e={},e[r+"-"+this.size]=!!this.size,e[r+"-"+this.shape]=!!this.shape,e[r+"-vertical"]=this.vertical,e)]},firstVisibleChild:function(){return this.buttons.find(function(e){return e.visible})},lastVisibleChild:function(){for(var e=this.buttons.length-1;e>0;e--){var t=this.buttons[e];if(t.visible)return t}return null}},methods:{initComponents:function(){var e=this;this.buttons=this.$children.filter(function(e){return"xButton"===e.$options.name}),this.buttons.sort(function(e,t){return Array.prototype.indexOf.call(e.$el.parentNode.children,e.$el)-Array.prototype.indexOf.call(t.$el.parentNode.children,t.$el)}),this.handleButtonVisible(),this.buttons.forEach(function(t){t._$bind||(t._$bind=!0,t.$on("click",e.handleChange.bind(e,t))),t.checked=void 0!==t.value&&""!==t.value&&t.value===e.value}),this.$nextTick(function(){e.updateModel()})},updateModel:function(){var e=this.activeClass;this.buttons.forEach(function(t){var n=(0,i.hasClass)(t.$el,e);t.checked?n||(0,i.addClass)(t.$el,e):n&&(0,i.removeClass)(t.$el,e)})},handleChange:function(e){var t=this;if(!(1===this.buttons.length&&this.buttons[0].checked||e.checked)){var n=this.buttons.find(function(t){return t.checked&&t!==e});n&&(n.checked=!1),e.checked=!0,this.checkedList=this.buttons.filter(function(e){return e.checked}).map(function(e){return e.value}),this.$emit("input",this.checkedList[0],function(){return t.updateModel()}),this.updateModel()}},handleButtonVisible:function(){this.buttons.length&&this.broadcast("xButton","checkPosition",{first:this.firstVisibleChild,last:this.lastVisibleChild})}},created:function(){this.checkedList=[this.value],this.$on("buttonVisibleChanged",this.handleButtonVisible)},mounted:function(){this.initComponents()},updated:function(){this.initComponents()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(31),r=n.n(i);for(var o in i)"default"!==o&&function(e){n.d(t,e,function(){return i[e]})}(o);t.default=r.a},function(e,t,n){"use strict";t.__esModule=!0;var i=n(0),r=i.LIB_NAME+"-radio";t.default={name:"xRadio",mixins:[i.emitter],props:{value:{type:[String,Number,Boolean],default:!1},trueValue:{type:[String,Number,Boolean],default:!0},falseValue:{type:[String,Number,Boolean],default:!1},label:{type:[String,Number]},disabled:{type:Boolean,default:!1},name:{type:String},size:{type:String,validator:function(e){return["small","default","large"].includes(e)}}},data:function(){return{currentValue:this.value,group:!1,parent:(0,i.findComponentUpward)(this,"xRadioGroup")}},computed:{sizeType:function(){return this.size?this.size:this.parent&&this.parent.size?this.parent.size:"default"},myName:function(){return this.name?this.name:this.parent&&this.parent.name?this.parent.name:""},wrapClasses:function(){var e;return[r+"-wrapper",(e={},e[r+"-wrapper__"+this.sizeType]=!!this.sizeType,e[r+"-group-item"]=this.group,e[r+"-wrapper-checked"]=this.currentValue,e[r+"-wrapper-disabled"]=this.disabled,e)]},radioClasses:function(){var e;return[""+r,(e={},e[r+"-checked"]=this.currentValue,e[r+"-disabled"]=this.disabled,e)]},innerClasses:function(){return r+"-inner"},inputClasses:function(){return r+"-input"}},mounted:function(){this.parent&&(this.group=!0),this.group?this.parent.updateValue():this.updateValue()},methods:{change:function(e){if(this.disabled)return!1;var t=e.target.checked;this.currentValue=t;var n=t?this.trueValue:this.falseValue;this.$emit("input",n),this.group&&void 0!==this.label&&this.parent.change({value:this.label,checked:this.value}),this.group||(this.$emit("on-change",n),this.dispatch("xFormItem","on-form-change",n))},updateValue:function(){this.currentValue=this.value===this.trueValue}},watch:{value:function(e){if(e!==this.trueValue&&e!==this.falseValue)throw new Error("Value should be true-value or false-value.");this.updateValue()}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(33),r=n.n(i);for(var o in i)"default"!==o&&function(e){n.d(t,e,function(){return i[e]})}(o);t.default=r.a},function(e,t,n){"use strict";t.__esModule=!0;var i=n(0),r=i.LIB_NAME+"-radio-group";t.default={name:"xRadioGroup",mixins:[i.emitter],props:{value:{type:[String,Number],default:""},size:{validator:function(e){return["small","default","large"].includes(e)}},name:String,vertical:Boolean},data:function(){return{currentValue:this.value,childrens:[]}},computed:{classes:function(){var e;return[""+r,(e={},e[r+"-"+this.size]=!!this.size,e[r+"-vertical"]=this.vertical,e)]}},mounted:function(){this.updateValue()},methods:{updateValue:function(){var e=this.value;this.childrens=(0,i.findComponentsDownward)(this,"xRadio"),this.childrens&&this.childrens.forEach(function(t){t.currentValue=e===t.label,t.group=!0})},change:function(e){this.currentValue=e.value,this.updateValue(),this.$emit("input",e.value),this.$emit("on-change",e.value),this.dispatch("xFormItem","on-form-change",e.value)}},watch:{value:function(){this.updateValue()}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(35),r=n.n(i);for(var o in i)"default"!==o&&function(e){n.d(t,e,function(){return i[e]})}(o);t.default=r.a},function(e,t,n){"use strict";t.__esModule=!0;var i=n(0),r=n(8).LIB_NAME+"-checkbox";t.default={name:"xCheckbox",mixins:[i.emitter],data:function(){return{prefixCls:r,currentValue:this.value===this.trueValue,group:!1,model:[],showSlot:!0}},props:{label:{type:[String,Number,Boolean],default:""},value:[String,Number,Boolean],disabled:{type:Boolean,default:!1},trueValue:{type:[Boolean,String,Number],default:!0},falseValue:{type:[Boolean,String,Number],default:!1},indeterminate:{type:Boolean,default:!1}},computed:{className:function(){var e;return[(e={},e[r+"-wrapper"]=!0,e[r+"-wrapper-checked"]=!!this.currentValue,e[r+"-wrapper-disabled"]=!!this.disabled,e)]},checkedClass:function(){var e;return[(e={},e[""+r]=!0,e["is-indeterminate"]=this.indeterminate,e[r+"-checked"]=!!this.currentValue,e)]}},mounted:function(){this.parent=(0,i.findComponentUpward)(this,"xCheckboxGroup"),this.parent&&(this.group=!0),this.group?this.parent.updateModel(!0):this.updateModel(),this.showSlot=void 0!==this.$slots.default},methods:{change:function(e){if(!this.disabled){var t=e.target.checked;this.currentValue=t;var n=t?this.trueValue:this.falseValue;this.$emit("input",n),this.group?this.$parent.change(this.model):(this.$emit("on-change",n),this.dispatch("xFormItem","on-form-change",n))}},updateModel:function(){this.currentValue=this.value===this.trueValue}},watch:{value:function(){this.updateModel()}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(37),r=n.n(i);for(var o in i)"default"!==o&&function(e){n.d(t,e,function(){return i[e]})}(o);t.default=r.a},function(e,t,n){"use strict";t.__esModule=!0;var i=n(0),r=n(8).LIB_NAME+"-checkbox-group";t.default={name:"xCheckboxGroup",mixins:[i.emitter],props:{value:{type:Array,default:function(){return[]}}},data:function(){return{currentValue:this.value,children:[]}},computed:{classes:function(){return""+r}},mounted:function(){this.updateModel(!0)},methods:{updateModel:function(e){var t=this.value;this.children=(0,i.findComponentsDownward)(this,"xCheckbox"),this.children&&this.children.forEach(function(n){n.model=t,e&&(n.currentValue=t.indexOf(n.label)>=0,n.group=!0)})},change:function(e){this.currentValue=e,this.$emit("input",e),this.$emit("on-change",e),this.dispatch("xFormItem","on-form-change",e)}},watch:{value:function(){this.updateModel(!0)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(39),r=n.n(i);for(var o in i)"default"!==o&&function(e){n.d(t,e,function(){return i[e]})}(o);t.default=r.a},function(e,t,n){"use strict";t.__esModule=!0;var i=n(0);t.default={name:"xSpin",data:function(){return{wrapperClass:i.LIB_NAME+"-spin",transitionName:i.ANIMATION_PREFIX+"fade",visible:!1,fullscreen:!0,text:null,background:null,iconClass:"",customClass:"",onAfterLeave:function(){}}},methods:{handleAfterLeave:function(){this.onAfterLeave(),this.$emit("after-leave")},setText:function(e){this.text=e}}}},function(e,t,n){"use strict";t.__esModule=!0,t.defaults=t.init=void 0;var i=n(0),r=s(n(5)),o=s(n(15));function s(e){return e&&e.__esModule?e:{default:e}}var a=r.default.extend(o.default),l={body:!1,fullscreen:!0,lock:!1,text:null,background:null,iconClass:"",customClass:""},u=void 0;a.prototype.originalPosition="",a.prototype.close=function(){this.fullscreen&&(u=void 0),this.visible=!1};t.init=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof(e=Object.assign({},l,e)).target&&(e.target=document.querySelector(e.target)),e.target=e.target||document.body,e.target!==document.body?e.fullscreen=!1:e.body=!0,e.fullscreen&&u)return u;var t=e.body?document.body:e.target,n=new a({el:document.createElement("div"),data:e});return e.onAfterLeave=function(){(0,i.removeClass)(t,"spin-relative-parent"),(0,i.removeClass)(t,"spin-lock-overflow"),t.removeChild(n.$el),n.$destroy()},function(e,t,n){if(e.fullscreen)n.originalPosition=(0,i.getStyle)(document.body,"position");else if(e.body){n.originalPosition=(0,i.getStyle)(document.body,"position");var r=n.$el.style;["top","left"].forEach(function(t){var n="top"===t?"scrollTop":"scrollLeft";r[t]=e.target.getBoundingClientRect()[t]+document.body[n]+document.documentElement[n]-parseInt((0,i.getStyle)(document.body,"margin-"+t),10)+"px"}),["height","width"].forEach(function(t){r[t]=e.target.getBoundingClientRect()[t]+"px"})}else n.originalPosition=(0,i.getStyle)(t,"position")}(e,t,n),"absolute"!==n.originalPosition&&"fixed"!==n.originalPosition&&(0,i.addClass)(t,"spin-relative-parent"),e.fullscreen&&e.lock&&(0,i.addClass)(t,"spin-lock-overflow"),t.appendChild(n.$el),r.default.nextTick(function(){n.visible=!0}),e.fullscreen&&(u=n),n},t.defaults=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(42),r=n.n(i);for(var o in i)"default"!==o&&function(e){n.d(t,e,function(){return i[e]})}(o);t.default=r.a},function(e,t,n){"use strict";t.__esModule=!0;var i=n(0),r=n(43),o=i.LIB_NAME+"-page";t.default={name:"xPage",components:{xSelect:r.xSelect,xOption:r.xOption},mixins:[i.Locale],props:{current:{type:Number,default:1},total:{type:Number,default:0},pageSize:{type:Number,default:10},pageSizeOptions:{type:Array,default:function(){return[10,20,30,40,50]}},pagerCount:{type:Number,default:7,validator:function(e){return e%2==1}},showTotal:{type:Boolean,default:!1},showElevator:{type:Boolean,default:!1},showSizer:{type:Boolean,default:!1},simple:{type:Boolean,default:!1},small:{type:Boolean,default:!1}},data:function(){return{currentPage:this.current,currentPageSize:this.pageSize,quickPrevIconClass:"ans-icon-more",quickNextIconClass:"ans-icon-more",sizerDropdownVisible:!1}},computed:{lastPage:function(){var e=Math.ceil(this.total/this.currentPageSize);return 0===e?1:e},showPrevMore:function(){var e=this.pagerCount,t=this.currentPage;return this.lastPage>e&&t>e-(e-1)/2},showNextMore:function(){var e=this.pagerCount,t=this.currentPage,n=this.lastPage;return n>e&&t<n-(e-1)/2},pages:function(){var e=this.pagerCount,t=this.currentPage,n=this.lastPage,i=this.showPrevMore,r=this.showNextMore,o=[];if(i&&!r)for(var s=n-(e-2);s<n;s++)o.push(s);else if(!i&&r)for(var a=2;a<e;a++)o.push(a);else if(i&&r)for(var l=Math.floor(e/2)-1,u=t-l;u<=t+l;u++)o.push(u);else for(var c=2;c<n;c++)o.push(c);return o},wrapClasses:function(){return[""+o]},simpleClasses:function(){return o+"-simple"},simpleContentClasses:function(){return o+"-simple-content"},normalClasses:function(){return[o+"-normal",{small:this.small}]},prevClasses:function(){var e;return[o+"-prev",(e={},e[o+"-disabled"]=1===this.currentPage,e)]},nextClasses:function(){var e;return[o+"-next",(e={},e[o+"-disabled"]=this.currentPage===this.lastPage,e)]}},watch:{current:function(e){this.currentPage=e},currentPageSize:function(e){this.$emit("on-size-change",e),this.currentPage>this.lastPage&&this.changePage(this.lastPage)},showPrevMore:function(e){e||(this.quickPrevIconClass="ans-icon-more")},showNextMore:function(e){e||(this.quickNextIconClass="ans-icon-more")}},methods:{handleSizerDropdown:function(e){this.sizerDropdownVisible=e},getKey:function(){return Math.random()},changePage:function(e){this.currentPage!==e&&(this.currentPage=e,this.$emit("on-change",e))},prevPage:function(){var e=this.currentPage;e<=1||this.changePage(e-1)},nextPage:function(){var e=this.currentPage;e>=this.lastPage||this.changePage(e+1)},fastPrev:function(){var e=this.currentPage-5;e>0?this.changePage(e):this.changePage(1)},fastNext:function(){var e=this.currentPage+5;e>this.lastPage?this.changePage(this.lastPage):this.changePage(e)},keyDown:function(e){var t=e.keyCode;t>=48&&t<=57||t>=96&&t<=105||8===t||e.preventDefault()},keyUp:function(e){var t=e.keyCode,n=parseInt(e.target.value);if(37===t||38===t)this.prevPage();else if(39===t||40===t)this.nextPage();else if(13===t){var i=1;i=n>this.lastPage?this.lastPage:n<=0||!n?1:n,e.target.value=i,this.changePage(i)}},jumpPage:function(e){var t=parseInt(e.target.value.trim()),n=0;t&&t!==this.currentPage&&(n=t>this.lastPage?this.lastPage:t,e.target.value="",this.changePage(n))},onMouseenter:function(e){"left"===e?this.quickPrevIconClass="ans-icon-arrow-to-left":this.quickNextIconClass="ans-icon-arrow-to-right"},cleanSpace:function(){document.querySelectorAll("."+o+" ul").forEach(function(e){!function(e){for(var t=e.childNodes,n=0;n<t.length;n++)3===t[n].nodeType&&/^\s+$/.test(t[n].nodeValue)&&e.removeChild(t[n])}(e)})}},updated:function(){this.cleanSpace()},mounted:function(){this.cleanSpace()}}},function(e,t,n){"use strict";t.__esModule=!0,t.xOptionGroup=t.xOption=t.xSelect=void 0;var i=s(n(179)),r=s(n(198)),o=s(n(201));function s(e){return e&&e.__esModule?e:{default:e}}t.xSelect=i.default,t.xOption=r.default,t.xOptionGroup=o.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(45),r=n.n(i);for(var o in i)"default"!==o&&function(e){n.d(t,e,function(){return i[e]})}(o);t.default=r.a},function(e,t,n){"use strict";t.__esModule=!0;var i,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=n(16),s=n(0),a=n(9),l=n(186),u=(i=l)&&i.__esModule?i:{default:i},c=n(4);t.default={name:"xSelect",components:{xInput:a.xInput,xSelectDropdown:u.default},directives:{clickOutside:s.clickOutside},mixins:[s.emitter],provide:function(){return{select:this}},data:function(){return{wrapperClass:s.LIB_NAME+"-select",active:!1,defalutOptions:{placement:"bottom"},visible:!1,options:[],visibleOptions:[],selectedOptions:[],lastOption:null,inputHovering:!1,inputWidth:0,searchPlaceholder:(0,c.t)("ans.select.search"),keyword:"",panelHeader:null,panelFooter:null,panelStyles:{},focusIndex:-1,dragging:!1,customTrigger:!1}},props:{value:[String,Number,Object,Array],valueKey:String,name:String,placeholder:{type:String,default:function(){return(0,c.t)("ans.select.placeholder")}},inputProps:{type:Object,default:function(){return{}}},width:[String,Number],height:[String,Number],maxHeight:{type:[String,Number],default:300},addTitle:{type:Boolean,default:!1},disabled:Boolean,clearable:Boolean,multiple:Boolean,filterable:Boolean,filterProps:Array,noDataText:{type:String,default:function(){return(0,c.t)("ans.select.noData")}},noDataIcon:{type:String,default:"ans-icon-no-data"},highlightMatchedText:{type:Boolean,default:!1},ignoreCase:{type:Boolean,default:!1},noMatchText:{type:String,default:function(){return(0,c.t)("ans.select.noMatch")}},noMatchIcon:{type:String,default:"ans-icon-search-no-data"},hasArrow:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!1},positionFixed:Boolean,viewport:Boolean,popperOptions:{type:Object,default:function(){return{}}},dropdownClass:String,scrollbarClass:String,dropAnimation:String},computed:{tagContainerStyles:function(){return{"max-width":this.inputWidth-35+"px"}},currentValue:function(){return this.multiple?this.selectedOptions.map(function(e){return e.value}):this.lastOption?this.lastOption.value:null},currentLabel:function(){return this.multiple?"":this.lastOption?this.lastOption.label:""},currentPlaceholder:function(){return this.multiple&&this.selectedOptions.length?"":this.placeholder},mergedOptions:function(){return Object.assign({},this.defalutOptions,this.popperOptions)},selectedList:function(){return this.selectedOptions.map(function(e){return{label:e.label,value:e.value}})},selectedModel:function(){return this.multiple?this.selectedList:this.lastOption?{label:this.lastOption.label,value:this.lastOption.value,notFound:this.lastOption.notFound}:null},showClear:function(){var e=this.currentValue,t=this.multiple?e&&e.length>0:void 0!==e&&null!==e&&""!==e;return this.clearable&&!this.disabled&&this.inputHovering&&t},navigatable:function(){return this.options.some(function(e){return!e.disabled&&e.visible})}},watch:{keyword:function(e){this.search(e)},value:function(e,t){this.dispatch("xFormItem","on-form-change",e),this.setSelected(e)},currentLabel:function(e){this.addTitle&&!this.multiple&&this.$refs.input&&this.$refs.input.$el&&this.$refs.input.$el.setAttribute("title",e)},focusIndex:function(e){if(e>-1&&e<this.visibleOptions.length){var t=this._getOptionByElIndex(e);this.options.forEach(function(e){e.focused=t===e})}else this.options.forEach(function(e){e.focused=!1})}},methods:{setDropdownReference:function(e){this.hideDropdown(),this.$refs.dropdown.setReference(e)},updateScrollbar:function(){this.$refs.dropdown.updateLayout()},resetScrollbar:function(){this.$refs.dropdown.$refs.scroller.setContentTop(0)},search:function(e){var t=this;this.visible&&(this.focusIndex=-1,this.broadcast("xOption","keywordChange",e),this.broadcast("xOptionGroup","keywordChange",e),this.$nextTick(function(){t._filterVisible(),t.$nextTick(function(){return t.updateScrollbar()})}),this.$emit("on-keyword-change",e))},focus:function(){this.visible?this.$refs.dropdown.updateLayout():this.toggleDropdown()},_refocus:function(){this.visible?this.filterable&&this.$refs.search.focus():this.$refs.input&&this.$refs.input.focus()},blur:function(){this.active=!1,this.hideDropdown()},_refocusTrigger:function(){this.hideDropdown(),this.$refs.input&&this.$refs.input.focus()},toggleDropdown:function(){var e=this;this.disabled||(this.active=!0,this.$refs.dropdown.toggle(),this.visible=!this.visible,this.$emit("on-visible-change",this.visible),this.visible&&(this.filterable?(this.keyword="",this.$nextTick(function(){e.$refs.search.focus()})):this.$refs.input&&this.$refs.input.focus(),this.resetHoverIndex()))},hideDropdown:function(){this.visible&&(this.$refs.dropdown.hide(),this.visible=!1,this.$emit("on-visible-change",this.visible))},handleRemoveTag:function(e){var t=this;e.$el||(e=this.selectedOptions.find(function(t){return t.value===e.value})),e&&!this.disabled&&(this.deselect(e),this.setInputHeight(),this.$emit("input",this.currentValue),this.$nextTick(function(){t.$refs.dropdown.updateElementHandler()}))},handleClear:function(){this.clearAll(),this.hideDropdown(),this.$emit("on-change",this.multiple?[]:null),this.$emit("input",this.currentValue)},clearAll:function(){this.multiple?(this.selectedOptions.forEach(function(e){e.selected=!1}),this.selectedOptions=[],this.setInputHeight()):(this.lastOption&&(this.lastOption.selected=!1),this.lastOption=null)},selectOption:function(){if(this.visible){var e=this._getOptionByElIndex(this.focusIndex);e&&this.handleSelect(e)}else this.toggleDropdown()},_selectAndRefocusTrigger:function(){this.selectOption(),!this.visible&&this.$refs.input&&this.$refs.input.focus()},resetHoverIndex:function(){var e=this;this.multiple?this.selectedOptions.length>0?this.focusIndex=Math.min.apply(null,this.selectedOptions.map(function(t){return e.visibleOptions.indexOf(t)})):this.focusIndex=-1:this.focusIndex=this.visibleOptions.indexOf(this.lastOption)},navigateOptions:function(e){var t=this;if(this.visible){"next"===e?(this.focusIndex++,this.focusIndex>=this.visibleOptions.length&&(this.focusIndex=0)):"prev"===e&&(this.focusIndex--,this.focusIndex<0&&(this.focusIndex=this.visibleOptions.length-1));var n=this._getOptionByElIndex(this.focusIndex);if(n.disabled||!n.visible)return this.navigateOptions(e);this.$nextTick(function(){return t.$refs.dropdown.scrollToTarget(n)})}else this.toggleDropdown()},_filterVisible:function(){var e=this;if(this.options.length){var t=this.options[0].$el.parentNode,n=void 0;if((0,s.hasClass)(t,"dropdown-container"))n=Array.from(t.children);else{n=[];var i=Array.from(t.parentNode.parentNode.parentNode.children),r=Array.isArray(i),o=0;for(i=r?i:i[Symbol.iterator]();;){var a;if(r){if(o>=i.length)break;a=i[o++]}else{if((o=i.next()).done)break;a=o.value}var l=a;n=n.concat(Array.from(l.children[1].children[0].children))}}var u=[];n.filter(function(e){return!(0,s.hasClass)(e,"invisible-option")}).forEach(function(t){var n=e.options.find(function(e){return e.$el===t});n&&u.push(n)}),this.visibleOptions=u}else this.visibleOptions=[]},_getOptionByElIndex:function(e){return this.options.length?this.visibleOptions.length<e+1?null:this.visibleOptions[e]:null},handleSelect:function(e){var t=this;if(this.multiple){-1!==this.selectedOptions.indexOf(e)?this.deselect(e):(this.selectedOptions.push(e),e.selected=!0),this.setInputHeight(),this.$emit("on-change",this.selectedList),this.$nextTick(function(){t.$refs.dropdown.updateElementHandler()})}else{if(this.lastOption===e)return void this.hideDropdown();this.lastOption&&(this.lastOption.selected=!1),this.lastOption=e,e.selected=!0,this.hideDropdown(),this.$emit("on-change",{label:e.label,value:e.value})}this.$emit("input",this.currentValue)},deselect:function(e){e.selected=!1,this.selectedOptions.splice(this.selectedOptions.indexOf(e),1)},setSelected:function(e){var t=this;if(this.clearAll(),e){if(this.multiple)(Array.isArray(e)?e:[e]).forEach(function(e){return t.selectedOptions.push(t.getOption(e))});else this.lastOption=this.getOption(e);this.resetHoverIndex()}},getOption:function(e){var t=this.valueKey||"object"===(void 0===e?"undefined":r(e)),n=this.options,i=Array.isArray(n),o=0;for(n=i?n:n[Symbol.iterator]();;){var s;if(i){if(o>=n.length)break;s=n[o++]}else{if((o=n.next()).done)break;s=o.value}var a=s;if(t&&a.value[this.valueKey]===e[this.valueKey]||a.value===e)return a.selected=!0,a}return{value:e,label:"object"===(void 0===e?"undefined":r(e))?"":e,notFound:!0}},onOptionDestroy:function(e){e>-1&&this.options.splice(e,1),this.debouncedUpdate()},setInputHeight:function(){var e=this;this.$refs.input&&this.$nextTick(function(){var t=e.$refs.multiple.clientHeight+4;e.$refs.input.$refs.input.style.height=Math.max(32,t)+"px"})},registerOption:function(e){this.options.push(e),this.debouncedUpdate()},handleUpdateWidth:function(e){this.panelStyles={width:e}},clickWrapperOutside:function(){var e=this;this.appendToBody?setTimeout(function(){e.dropdownClicked||e.blur()},0):this.blur()},clickDropdownOutside:function(){this.appendToBody&&(this.dropdownClicked=!1)},clickDropdown:function(){this.appendToBody?this.dropdownClicked=!0:this._refocus()}},created:function(){var e=this;this.$on("click-option",this.handleSelect),this.debouncedUpdate=(0,o.debounce)(50,function(){e.focusIndex=-1,e.setSelected(e.value),e._filterVisible(),e.$refs.dropdown&&e.$refs.dropdown.checkScrollable()})},mounted:function(){var e=this;this.customTrigger=!(!this.$slots.trigger&&!this.$scopedSlots.trigger),this.setSelected(this.value),this.$refs.input&&(this.inputWidth=this.$refs.input.$el.clientWidth),this.$scopedSlots.header&&(this.panelHeader=function(t,n){return e.$scopedSlots.header(n)}),this.$scopedSlots.footer&&(this.panelFooter=function(t,n){return e.$scopedSlots.footer(n)})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(47),r=n.n(i);for(var o in i)"default"!==o&&function(e){n.d(t,e,function(){return i[e]})}(o);t.default=r.a},function(e,t,n){"use strict";t.__esModule=!0;var i,r=n(0),o=n(185),s=(i=o)&&i.__esModule?i:{default:i},a=n(4);var l=r.LIB_NAME+"-input";t.default={name:"xInput",mixins:[r.emitter],data:function(){return{wrapperClass:l,currentValue:this.value,textareaCalcStyle:{},prefixStyles:{},suffixStyles:{},hovering:!1,focused:!1,isOnComposition:!1,innerIcon:""}},props:{type:{default:"text"},size:{validator:function(e){return["small","default","large"].includes(e)},default:"default"},value:[String,Number],clearable:{type:Boolean,default:!1},suffixIcon:String,prefixIcon:String,label:String,noBorder:{type:Boolean,default:!1},name:String,placeholder:{type:String,default:function(){return(0,a.t)("ans.input.placeholder")}},disabled:Boolean,readonly:Boolean,autofocus:Boolean,autocomplete:{type:String,default:"off"},maxlength:Number,tabindex:Number,resize:String,rows:{type:Number,default:2},autosize:{type:[Boolean,Object],default:!1},minlength:Number,validatorIcon:{type:Boolean,default:!0}},computed:{textareaStyle:function(){return Object.assign({},this.textareaCalcStyle,{resize:this.resize})},showClear:function(){return!this.disabled&&this.clearable&&this.currentValue&&(this.focused||this.hovering)},hasPrefix:function(){return this.prefixIcon||this.$slots.prefix},hasSuffix:function(){return this.suffixIcon||this.clearable||this.$slots.suffix||this.validatorIcon},isNotTextarea:function(){return"textarea"!==this.type}},methods:{handleComposition:function(e){"compositionend"===e.type?this.isOnComposition=!1:this.isOnComposition=!0},handleEnter:function(e){this.$emit("on-enterkey",e)},handleClick:function(e){this.$emit("on-click",e)},handleBlur:function(e){this.focused=!1,this.$emit("on-blur",e),(0,r.findComponentUpward)(this,["xDatepicker","xTimePicker","xCascader","xSelect"])||this.dispatch("xFormItem","on-form-blur",this)},handleValidate:function(e){this.validatorIcon&&(this.innerIcon=e?r.LIB_NAME+"-icon-fail-solid fail-color":r.LIB_NAME+"-icon-success-solid success-color")},handleFocus:function(e){this.focused=!0,this.$emit("on-focus",e)},hanldleInput:function(e){this.isOnComposition||this.$emit("input",e.target.value)},handleChange:function(e){this.$emit("on-change",e.target.value)},handleIconClick:function(e){this.showClear&&(this.clear(),this.$emit("on-clear")),this.$emit("on-click-icon",e)},focus:function(){(this.$refs.input||this.$refs.textarea).focus()},blur:function(){(this.$refs.input||this.$refs.textarea).blur()},clear:function(){this.setCurrentValue(""),this.focus(),this.$emit("input","")},resizeTextarea:function(){var e=this.autosize;if(!this.isNotTextarea)if(e){var t=e.minRows,n=e.maxRows;this.textareaCalcStyle=(0,s.default)(this.$refs.textarea,t,n)}else this.textareaCalcStyle={height:"auto",minHeight:(0,s.default)(this.$refs.textarea).minHeight}},setCurrentValue:function(e){var t=this;e!==this.currentValue&&(this.$nextTick(function(e){t.resizeTextarea()}),this.currentValue=e)}},watch:{value:function(e,t){this.setCurrentValue(e)},currentValue:function(){this.resizeTextarea()}},mounted:function(){if(this.autofocus&&this.focus(),this.resizeTextarea(),this.hasPrefix){var e=this.$slots.prepend?