@xysfe/actui
Version:
A fantastic mobile ui lib implement by Vue
1 lines • 14.1 kB
JavaScript
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Validator=n():t.Validator=n()}("undefined"!=typeof self?self:this,function(){return function(t){function n(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r={};return n.m=t,n.c=r,n.d=function(t,r,e){n.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:e})},n.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(r,"a",r),r},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="../es",n(n.s=1378)}({0:function(t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},1:function(t,n,r){var e=r(31)("wks"),o=r(24),i=r(0).Symbol,u="function"==typeof i;(t.exports=function(t){return e[t]||(e[t]=u&&i[t]||(u?i:o)("Symbol."+t))}).store=e},10:function(t,n,r){var e=r(4),o=r(41),i=r(38),u=Object.defineProperty;n.f=r(3)?Object.defineProperty:function(t,n,r){if(e(t),n=i(n,!0),e(r),o)try{return u(t,n,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[n]=r.value),t}},11:function(t,n){t.exports={}},12:function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},13:function(t,n,r){var e=r(34),o=r(15);t.exports=function(t){return e(o(t))}},130:function(t,n,r){t.exports={default:r(144),__esModule:!0}},1378:function(t,n,r){"use strict";function e(t,n){return Object.prototype.toString.call(t)==="[object "+n+"]"}Object.defineProperty(n,"__esModule",{value:!0});var o=r(130),i=r.n(o),u=r(630),c=r.n(u),a={isString:function(t){return e(t,"String")},isNumber:function(t){return e(t,"Number")},isObject:function(t){return e(t,"Object")},isArray:function(t){return e(t,"Array")},isBoolean:function(t){return e(t,"Boolean")},isEmail:function(t){return/^([a-zA-Z0-9]+[_|_|.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|_|.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/.test(t)},isName:function(t){return!(t.length>30)&&(!!/^[a-z][a-z|.|\s]*[a-z]$/gi.test(t)||!(!/^[\u4e00-\u9fa5][\u4e00-\u9fa5|·]*[\u4e00-\u9fa5]$/g.test(t)||t.match(/([\u4e00-\u9fa5])\1{2,}/g)))},isMobile:function(t){return!!/^1\d{10}$/.test(t)},eq:function(t,n){return t===n},isIdCard:function(t){var n={11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古",21:"辽宁",22:"吉林",23:"黑龙江 ",31:"上海",32:"江苏",33:"浙江",34:"安徽",35:"福建",36:"江西",37:"山东",41:"河南",42:"湖北 ",43:"湖南",44:"广东",45:"广西",46:"海南",50:"重庆",51:"四川",52:"贵州",53:"云南",54:"西藏 ",61:"陕西",62:"甘肃",63:"青海",64:"宁夏",65:"新疆",71:"台湾",81:"香港",82:"澳门",91:"国外 "};if(!t||!/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|[xX])$/.test(t))return!1;if(!n[t.substr(0,2)])return!1;if(18===t.length){t=t.split("");for(var r=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2],e=["1","0","X","9","8","7","6","5","4","3","2"],o=0,i=0,u=0,c=0;c<17;c++)i=t[c],u=r[c],o+=i*u;if(e[o%11]!==t[17].toUpperCase())return!1}return!0},required:function(t){return!(""===t||void 0===t||null===t||e(t,"Number")&&isNaN(t))},min:function(t,n){return t.length>=n},max:function(t,n){return t.length<=n}},f={};for(var s in a)f[s.toLowerCase()]=s;var l=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";c()(this,t),this.curData=n,this.rules=[]}return t.prototype.data=function(t){return this.curData=t,this},t.prototype.add=function(){var t=this,n=arguments,r=arguments[0],o=Array.prototype.slice.call(arguments,1),u=this.curData,c=[];e(r,"Array")?c=r:c.push(r);for(var s=c,l=Array.isArray(s),p=0,s=l?s:i()(s);;){var v;if(l){if(p>=s.length)break;v=s[p++]}else{if(p=s.next(),p.done)break;v=p.value}var y=v;!function(r){e(r,"String")?t.rules.push(function(){var t=a[f[r.toLowerCase()]];return t.call.apply(t,[a,u].concat(o))}):e(r,"Function")?t.rules.push(function(){return r.apply(void 0,[u].concat(o))}):e(r,"RegExp")?t.rules.push(function(){return r.test(u)}):console.error("非法的strategy,已忽略此策略:",n)}(y)}return this},t.prototype.error=function(t){return a.required(t)||e(t,"String")||(console.warn("validator error api need a string param"),t="校验未通过,请检查后重试"),this.rules.push(t),this},t.prototype.start=function(){for(var t="";;){if(void 0===(t=this.rules.shift()))break;if(e(t,"Function")){var n=t();if(!0!==n){if(!1===n){do{if(t=this.rules.shift(),e(t,"String"))return this.clear(),t}while(t);return"校验失败"}return console.warn("Strategy function must return a boolean value"),this.clear(),"Strategy function must return a boolean value"}}}return!0},t.prototype.clear=function(){this.curData="",this.rules=[]},t}();n.default=l},14:function(t,n){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},144:function(t,n,r){r(50),r(48),t.exports=r(145)},145:function(t,n,r){var e=r(4),o=r(56);t.exports=r(2).getIterator=function(t){var n=o(t);if("function"!=typeof n)throw TypeError(t+" is not iterable!");return e(n.call(t))}},15:function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},16:function(t,n){var r=Math.ceil,e=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?e:r)(t)}},17:function(t,n,r){var e=r(19);t.exports=function(t,n,r){if(e(t),void 0===n)return t;switch(r){case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,o){return t.call(n,r,e,o)}}return function(){return t.apply(n,arguments)}}},18:function(t,n){t.exports=!0},19:function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},2:function(t,n){var r=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=r)},20:function(t,n,r){var e=r(31)("keys"),o=r(24);t.exports=function(t){return e[t]||(e[t]=o(t))}},22:function(t,n,r){var e=r(6),o=r(0).document,i=e(o)&&e(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},23:function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},24:function(t,n){var r=0,e=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+e).toString(36))}},27:function(t,n,r){var e=r(10).f,o=r(8),i=r(1)("toStringTag");t.exports=function(t,n,r){t&&!o(t=r?t:t.prototype,i)&&e(t,i,{configurable:!0,value:n})}},28:function(t,n,r){var e=r(42),o=r(32);t.exports=Object.keys||function(t){return e(t,o)}},3:function(t,n,r){t.exports=!r(12)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},31:function(t,n,r){var e=r(2),o=r(0),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,n){return i[t]||(i[t]=void 0!==n?n:{})})("versions",[]).push({version:e.version,mode:r(18)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},32:function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},33:function(t,n,r){var e=r(15);t.exports=function(t){return Object(e(t))}},34:function(t,n,r){var e=r(14);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==e(t)?t.split(""):Object(t)}},35:function(t,n,r){var e=r(16),o=Math.min;t.exports=function(t){return t>0?o(e(t),9007199254740991):0}},36:function(t,n,r){"use strict";var e=r(18),o=r(9),i=r(54),u=r(5),c=r(11),a=r(60),f=r(27),s=r(62),l=r(1)("iterator"),p=!([].keys&&"next"in[].keys()),v=function(){return this};t.exports=function(t,n,r,y,h,d,g){a(r,n,y);var x,b,m,S=function(t){if(!p&&t in j)return j[t];switch(t){case"keys":case"values":return function(){return new r(this,t)}}return function(){return new r(this,t)}},_=n+" Iterator",O="values"==h,w=!1,j=t.prototype,L=j[l]||j["@@iterator"]||h&&j[h],A=L||S(h),M=h?O?S("entries"):A:void 0,T="Array"==n?j.entries||L:L;if(T&&(m=s(T.call(new t)))!==Object.prototype&&m.next&&(f(m,_,!0),e||"function"==typeof m[l]||u(m,l,v)),O&&L&&"values"!==L.name&&(w=!0,A=function(){return L.call(this)}),e&&!g||!p&&!w&&j[l]||u(j,l,A),c[n]=A,c[_]=v,h)if(x={values:O?A:S("values"),keys:d?A:S("keys"),entries:M},g)for(b in x)b in j||i(j,b,x[b]);else o(o.P+o.F*(p||w),n,x);return x}},38:function(t,n,r){var e=r(6);t.exports=function(t,n){if(!e(t))return t;var r,o;if(n&&"function"==typeof(r=t.toString)&&!e(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!e(o=r.call(t)))return o;if(!n&&"function"==typeof(r=t.toString)&&!e(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},4:function(t,n,r){var e=r(6);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},41:function(t,n,r){t.exports=!r(3)&&!r(12)(function(){return 7!=Object.defineProperty(r(22)("div"),"a",{get:function(){return 7}}).a})},42:function(t,n,r){var e=r(8),o=r(13),i=r(46)(!1),u=r(20)("IE_PROTO");t.exports=function(t,n){var r,c=o(t),a=0,f=[];for(r in c)r!=u&&e(c,r)&&f.push(r);for(;n.length>a;)e(c,r=n[a++])&&(~i(f,r)||f.push(r));return f}},43:function(t,n,r){var e=r(0).document;t.exports=e&&e.documentElement},45:function(t,n,r){var e=r(14),o=r(1)("toStringTag"),i="Arguments"==e(function(){return arguments}()),u=function(t,n){try{return t[n]}catch(t){}};t.exports=function(t){var n,r,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=u(n=Object(t),o))?r:i?e(n):"Object"==(c=e(n))&&"function"==typeof n.callee?"Arguments":c}},46:function(t,n,r){var e=r(13),o=r(35),i=r(47);t.exports=function(t){return function(n,r,u){var c,a=e(n),f=o(a.length),s=i(u,f);if(t&&r!=r){for(;f>s;)if((c=a[s++])!=c)return!0}else for(;f>s;s++)if((t||s in a)&&a[s]===r)return t||s||0;return!t&&-1}}},47:function(t,n,r){var e=r(16),o=Math.max,i=Math.min;t.exports=function(t,n){return t=e(t),t<0?o(t+n,0):i(t,n)}},48:function(t,n,r){"use strict";var e=r(59)(!0);r(36)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,n=this._t,r=this._i;return r>=n.length?{value:void 0,done:!0}:(t=e(n,r),this._i+=t.length,{value:t,done:!1})})},5:function(t,n,r){var e=r(10),o=r(23);t.exports=r(3)?function(t,n,r){return e.f(t,n,o(1,r))}:function(t,n,r){return t[n]=r,t}},50:function(t,n,r){r(68);for(var e=r(0),o=r(5),i=r(11),u=r(1)("toStringTag"),c="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),a=0;a<c.length;a++){var f=c[a],s=e[f],l=s&&s.prototype;l&&!l[u]&&o(l,u,f),i[f]=i.Array}},52:function(t,n,r){var e=r(4),o=r(61),i=r(32),u=r(20)("IE_PROTO"),c=function(){},a=function(){var t,n=r(22)("iframe"),e=i.length;for(n.style.display="none",r(43).appendChild(n),n.src="javascript:",t=n.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),a=t.F;e--;)delete a.prototype[i[e]];return a()};t.exports=Object.create||function(t,n){var r;return null!==t?(c.prototype=e(t),r=new c,c.prototype=null,r[u]=t):r=a(),void 0===n?r:o(r,n)}},54:function(t,n,r){t.exports=r(5)},56:function(t,n,r){var e=r(45),o=r(1)("iterator"),i=r(11);t.exports=r(2).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[e(t)]}},59:function(t,n,r){var e=r(16),o=r(15);t.exports=function(t){return function(n,r){var i,u,c=String(o(n)),a=e(r),f=c.length;return a<0||a>=f?t?"":void 0:(i=c.charCodeAt(a),i<55296||i>56319||a+1===f||(u=c.charCodeAt(a+1))<56320||u>57343?t?c.charAt(a):i:t?c.slice(a,a+2):u-56320+(i-55296<<10)+65536)}}},6:function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},60:function(t,n,r){"use strict";var e=r(52),o=r(23),i=r(27),u={};r(5)(u,r(1)("iterator"),function(){return this}),t.exports=function(t,n,r){t.prototype=e(u,{next:o(1,r)}),i(t,n+" Iterator")}},61:function(t,n,r){var e=r(10),o=r(4),i=r(28);t.exports=r(3)?Object.defineProperties:function(t,n){o(t);for(var r,u=i(n),c=u.length,a=0;c>a;)e.f(t,r=u[a++],n[r]);return t}},62:function(t,n,r){var e=r(8),o=r(33),i=r(20)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),e(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},63:function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},630:function(t,n,r){"use strict";n.__esModule=!0,n.default=function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}},68:function(t,n,r){"use strict";var e=r(69),o=r(63),i=r(11),u=r(13);t.exports=r(36)(Array,"Array",function(t,n){this._t=u(t),this._i=0,this._k=n},function(){var t=this._t,n=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,o(1)):"keys"==n?o(0,r):"values"==n?o(0,t[r]):o(0,[r,t[r]])},"values"),i.Arguments=i.Array,e("keys"),e("values"),e("entries")},69:function(t,n){t.exports=function(){}},8:function(t,n){var r={}.hasOwnProperty;t.exports=function(t,n){return r.call(t,n)}},9:function(t,n,r){var e=r(0),o=r(2),i=r(17),u=r(5),c=r(8),a=function(t,n,r){var f,s,l,p=t&a.F,v=t&a.G,y=t&a.S,h=t&a.P,d=t&a.B,g=t&a.W,x=v?o:o[n]||(o[n]={}),b=x.prototype,m=v?e:y?e[n]:(e[n]||{}).prototype;v&&(r=n);for(f in r)(s=!p&&m&&void 0!==m[f])&&c(x,f)||(l=s?m[f]:r[f],x[f]=v&&"function"!=typeof m[f]?r[f]:d&&s?i(l,e):g&&m[f]==l?function(t){var n=function(n,r,e){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,e)}return t.apply(this,arguments)};return n.prototype=t.prototype,n}(l):h&&"function"==typeof l?i(Function.call,l):l,h&&((x.virtual||(x.virtual={}))[f]=l,t&a.R&&b&&!b[f]&&u(b,f,l)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a}})});