Comparing version 0.3.1 to 0.4.0
@@ -1,1 +0,1 @@ | ||
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Utils=n():t.Utils=n()}(this,function(){return function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var e={};return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},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=82)}([function(t,n){var e=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=e)},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,e){var r=e(23)("wks"),o=e(14),i=e(1).Symbol,u="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=u&&i[t]||(u?i:o)("Symbol."+t))}).store=r},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n,e){t.exports=!e(10)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n,e){var r=e(7),o=e(13);t.exports=e(4)?function(t,n,e){return r.f(t,n,o(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,e){var r=e(9),o=e(29),i=e(25),u=Object.defineProperty;n.f=e(4)?Object.defineProperty:function(t,n,e){if(r(t),n=i(n,!0),r(e),o)try{return u(t,n,e)}catch(t){}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 r=e(62),o=e(16);t.exports=function(t){return r(o(t))}},function(t,n,e){var r=e(6);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n){t.exports={}},function(t,n,e){var r=e(35),o=e(17);t.exports=Object.keys||function(t){return r(t,o)}},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,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+r).toString(36))}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},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,e){var r=e(1),o=e(0),i=e(59),u=e(5),c=function(t,n,e){var f,a,s,l=t&c.F,p=t&c.G,y=t&c.S,h=t&c.P,v=t&c.B,d=t&c.W,g=p?o:o[n]||(o[n]={}),b=g.prototype,m=p?r:y?r[n]:(r[n]||{}).prototype;p&&(e=n);for(f in e)(a=!l&&m&&void 0!==m[f])&&f in g||(s=a?m[f]:e[f],g[f]=p&&"function"!=typeof m[f]?e[f]:v&&a?i(s,r):d&&m[f]==s?function(t){var n=function(n,e,r){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,r)}return t.apply(this,arguments)};return n.prototype=t.prototype,n}(s):h&&"function"==typeof s?i(Function.call,s):s,h&&((g.virtual||(g.virtual={}))[f]=s,t&c.R&&b&&!b[f]&&u(b,f,s)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,n){t.exports=!0},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,e){var r=e(7).f,o=e(3),i=e(2)("toStringTag");t.exports=function(t,n,e){t&&!o(t=e?t:t.prototype,i)&&r(t,i,{configurable:!0,value:n})}},function(t,n,e){var r=e(23)("keys"),o=e(14);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,n,e){var r=e(1),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},function(t,n,e){var r=e(6);t.exports=function(t,n){if(!r(t))return t;var e,o;if(n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;if("function"==typeof(e=t.valueOf)&&!r(o=e.call(t)))return o;if(!n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,n,e){var r=e(1),o=e(0),i=e(19),u=e(27),c=e(7).f;t.exports=function(t){var n=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in n||c(n,t,{value:u.f(t)})}},function(t,n,e){n.f=e(2)},function(t,n,e){var r=e(6),o=e(1).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,n,e){t.exports=!e(4)&&!e(10)(function(){return 7!=Object.defineProperty(e(28)("div"),"a",{get:function(){return 7}}).a})},function(t,n,e){"use strict";var r=e(19),o=e(18),i=e(37),u=e(5),c=e(3),f=e(11),a=e(64),s=e(21),l=e(69),p=e(2)("iterator"),y=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,n,e,v,d,g,b){a(e,n,v);var m,S,O,x=function(t){if(!y&&t in P)return P[t];switch(t){case"keys":case"values":return function(){return new e(this,t)}}return function(){return new e(this,t)}},w=n+" Iterator",j="values"==d,_=!1,P=t.prototype,M=P[p]||P["@@iterator"]||d&&P[d],E=!y&&M||x(d),N=d?j?x("entries"):E:void 0,L="Array"==n?P.entries||M:M;if(L&&(O=l(L.call(new t)))!==Object.prototype&&O.next&&(s(O,w,!0),r||c(O,p)||u(O,p,h)),j&&M&&"values"!==M.name&&(_=!0,E=function(){return M.call(this)}),r&&!b||!y&&!_&&P[p]||u(P,p,E),f[n]=E,f[w]=h,d)if(m={values:j?E:x("values"),keys:g?E:x("keys"),entries:N},b)for(S in m)S in P||i(P,S,m[S]);else o(o.P+o.F*(y||_),n,m);return m}},function(t,n,e){var r=e(14)("meta"),o=e(6),i=e(3),u=e(7).f,c=0,f=Object.isExtensible||function(){return!0},a=!e(10)(function(){return f(Object.preventExtensions({}))}),s=function(t){u(t,r,{value:{i:"O"+ ++c,w:{}}})},l=function(t,n){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!f(t))return"F";if(!n)return"E";s(t)}return t[r].i},p=function(t,n){if(!i(t,r)){if(!f(t))return!0;if(!n)return!1;s(t)}return t[r].w},y=function(t){return a&&h.NEED&&f(t)&&!i(t,r)&&s(t),t},h=t.exports={KEY:r,NEED:!1,fastKey:l,getWeak:p,onFreeze:y}},function(t,n,e){var r=e(9),o=e(66),i=e(17),u=e(22)("IE_PROTO"),c=function(){},f=function(){var t,n=e(28)("iframe"),r=i.length;for(n.style.display="none",e(61).appendChild(n),n.src="javascript:",t=n.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),f=t.F;r--;)delete f.prototype[i[r]];return f()};t.exports=Object.create||function(t,n){var e;return null!==t?(c.prototype=r(t),e=new c,c.prototype=null,e[u]=t):e=f(),void 0===n?e:o(e,n)}},function(t,n,e){var r=e(35),o=e(17).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,e){var r=e(3),o=e(8),i=e(57)(!1),u=e(22)("IE_PROTO");t.exports=function(t,n){var e,c=o(t),f=0,a=[];for(e in c)e!=u&&r(c,e)&&a.push(e);for(;n.length>f;)r(c,e=n[f++])&&(~i(a,e)||a.push(e));return a}},function(t,n,e){var r=e(18),o=e(0),i=e(10);t.exports=function(t,n){var e=(o.Object||{})[t]||Object[t],u={};u[t]=n(e),r(r.S+r.F*i(function(){e(1)}),"Object",u)}},function(t,n,e){t.exports=e(5)},function(t,n,e){var r=e(16);t.exports=function(t){return Object(r(t))}},function(t,n,e){"use strict";var r=e(70)(!0);e(30)(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=r(n,e),this._i+=t.length,{value:t,done:!1})})},function(t,n,e){e(75);for(var r=e(1),o=e(5),i=e(11),u=e(2)("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(","),f=0;f<c.length;f++){var a=c[f],s=r[a],l=s&&s.prototype;l&&!l[u]&&o(l,u,a),i[a]=i.Array}},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var o=e(43),i=r(o),u=e(42),c=r(u),f=e(45),a=r(f),s=e(44),l=r(s),p=e(48),y=r(p),h={isObject:function(t){return"[object Object]"===Object.prototype.toString.call(t)},isArray:function(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)},isDate:function(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)},isNumber:function(t){return t instanceof Number||"[object Number]"===Object.prototype.toString.call(t)},isString:function(t){return t instanceof String||"[object String]"===Object.prototype.toString.call(t)},isBoolean:function(t){return"boolean"==typeof t},isFunction:function(t){return"function"==typeof t},isNull:function(t){return void 0===t||null===t},isPlainObject:function(t){if(t&&"[object Object]"===Object.prototype.toString.call(t)&&t.constructor===Object&&!hasOwnProperty.call(t,"constructor")){var n;for(n in t);return void 0===n||hasOwnProperty.call(t,n)}return!1},extend:function(){var t,n,e,r,o,i,u=arguments[0]||{},c=1,f=arguments.length,a=!1;for("boolean"==typeof u&&(a=u,u=arguments[1]||{},c=2),"object"===(void 0===u?"undefined":(0,y.default)(u))||this.isFunction(u)||(u={}),f===c&&(u=this,--c);c<f;c++)if(null!=(t=arguments[c]))for(n in t)e=u[n],r=t[n],e!==r&&(a&&r&&(this.isPlainObject(r)||(o=this.isArray(r)))?(o?(o=!1,i=e&&this.isArray(e)?e:[]):i=e&&this.isPlainObject(e)?e:{},u[n]=this.extend(a,i,r)):void 0!==r&&(u[n]=r));return u},freeze:function(t){var n=this,e=this;return(0,l.default)(t),(0,a.default)(t).forEach(function(r,o){e.isObject(t[r])&&n.freeze(t[r])}),t},copy:function(t){var n=null;if(this.isObject(t)){n={};for(var e in t)n[e]=this.copy(t[e])}else if(this.isArray(t)){n=[];var r=!0,o=!1,i=void 0;try{for(var u,f=(0,c.default)(t);!(r=(u=f.next()).done);r=!0){var a=u.value;n.push(this.copy(a))}}catch(t){o=!0,i=t}finally{try{!r&&f.return&&f.return()}finally{if(o)throw i}}}else n=t;return n},getKeyValue:function(t,n){if(!this.isObject(t))return null;var e=null;if(this.isArray(n)?e=n:this.isString(n)&&(e=n.split(".")),null==e||0==e.length)return null;var r=null,o=e.shift(),i=o.match(new RegExp("^(\\w+)\\[(\\d+)\\]$"));if(i){o=i[1];var u=i[2];r=t[o],this.isArray(r)&&r.length>u&&(r=r[u])}else r=t[o];return e.length>0?this.getKeyValue(r,e):r},setKeyValue:function(t,n,e,r){if(!this.isObject(t))return!1;var o=null;if(this.isArray(n)?o=n:this.isString(n)&&(o=n.split("."),r=t),null==o||0==o.length)return!1;var i=null,u=0,c=o.shift(),f=c.match(new RegExp("^(\\w+)\\[(\\d+)\\]$"));if(f){if(c=f[1],u=f[2],i=t[c],this.isArray(i)&&i.length>u){if(o.length>0)return this.setKeyValue(i[u],o,e,r);i[u]=e}}else{if(o.length>0)return this.setKeyValue(t[c],o,e,r);t[c]=e}return r},toArray:function(t,n,e){var r="";if(!this.isObject(t))return[];this.isString(e)&&(r=e);var o=[];for(var i in t){var u=t[i],c={};this.isObject(u)?c=u:c[r]=u,n&&(c[n]=i),o.push(c)}return o},toObject:function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id",e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r={},o=0;o<t.length;o++){var i=t[o];this.isObject(i)?"count"==n?r[o]=i:(r[i[n]]=i,e&&(r[i[n]].count=o)):r[i]=i}return r},saveLocal:function(t,n){return!!(window.localStorage&&JSON&&t)&&("object"==(void 0===n?"undefined":(0,y.default)(n))&&(n=(0,i.default)(n)),window.localStorage[t]=n,!0)},getLocal:function(t,n){if(window.localStorage&&JSON&&t){var e=window.localStorage[t];if(!n||"json"!=n||void 0===e)return e;try{return JSON.parse(e)}catch(t){return""}}return null},getLocal2Json:function(t){if(window.localStorage&&JSON&&t){var n=window.localStorage[t];if(this.isNull(n))return n;try{return JSON.parse(n)}catch(t){return""}}return null},removeLocal:function(t){return window.localStorage&&JSON&&t&&(window.localStorage[t]=null),null},saveCookie:function(t,n,e,r,o){var u=!!navigator.cookieEnabled;if(t&&u){r=r||"/","object"==(void 0===n?"undefined":(0,y.default)(n))&&(n=(0,i.default)(n));var c=void 0;o?(c=new Date,c.setTime(c.getTime()+1e3*o)):c=new Date("9998-01-01");var f=t+"="+escape(n)+(o?";expires="+c.toGMTString():"")+";path="+r+";";return e&&(f+="domain="+e+";"),document.cookie=f,!0}return!1},getCookie:function(t){var n=!!navigator.cookieEnabled;if(t&&n){var e=document.cookie.match(new RegExp("(^| )"+t+"=([^;]*)(;|$)"));if(null!==e)return unescape(e[2])}return null},clearCookie:function(t,n){var e=document.cookie.match(/[^ =;]+(?=\=)/g);if(n=n||"/",e)for(var r=e.length;r--;){var o=e[r]+"=0;expires="+new Date(0).toUTCString()+";path="+n+";";t&&(o+="domain="+t+";"),document.cookie=o}},removeCookie:function(t,n,e){var r=!!navigator.cookieEnabled;if(t&&r){e=e||"/";var o=t+"=0;expires="+new Date(0).toUTCString()+";path="+e+";";return n&&(o+="domain="+n+";"),document.cookie=o,!0}return!1},dictMapping:function(t){var n=this,e=t.value,r=t.dict,o=t.connector,i=t.keyField,u=void 0===i?"key":i,c=t.titleField,f=void 0===c?"value":c;return!r||this.isNull(e)?"":(o&&(e=e.split(o)),!this.isNull(e)&&""!==e&&r&&(this.isArray(e)||(e=[e])),e.length<=0?"":(this.isArray(r)&&(r=this.toObject(r,u)),e.map(function(t){if(n.isObject(t))return t[f];var e=r[t];return n.isObject(e)?e[f]:e}).filter(function(t){return t&&""!==t}).join(", ")))},uuid:function(){var t=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()},padLeft:function(t,n){var e="00000"+t;return e.substr(e.length-n)},toggleValue:function(t,n){if(!this.isArray(t))return[n];t.some(function(t){return t==n})?t.splice(t.indexOf(n),1):t.push(n)},toSimpleArray:function(t,n){var e=[];if(this.isObject(t)){var r=!0,o=!1,i=void 0;try{for(var u,f=(0,c.default)((0,a.default)(t));!(r=(u=f.next()).done);r=!0){var s=u.value;e.push(t[s][n])}}catch(t){o=!0,i=t}finally{try{!r&&f.return&&f.return()}finally{if(o)throw i}}}if(this.isArray(t)){var l=!0,p=!1,y=void 0;try{for(var h,v=(0,c.default)(t);!(l=(h=v.next()).done);l=!0){var d=h.value;e.push(d[n])}}catch(t){p=!0,y=t}finally{try{!l&&v.return&&v.return()}finally{if(p)throw y}}}return e},getURLParam:function(t,n){return decodeURIComponent((new RegExp("[?|&]"+t+"=([^&;]+?)(&|#|;|$)").exec(n||location.search)||[!0,""])[1].replace(/\+/g,"%20"))||null},getAuthor:function(){var t=this.getURLParam("author",window.location.search)||this.getLocal("window_author");return t&&this.saveLocal("window_author",t),t},add:function(t,n){var e=t.toString(),r=n.toString(),o=e.split("."),i=r.split("."),u=2==o.length?o[1]:"",c=2==i.length?i[1]:"",f=Math.max(u.length,c.length),a=Math.pow(10,f);return Number(((e*a+r*a)/a).toFixed(f))},sub:function(t,n){return this.add(t,-n)},mul:function(t,n){var e=0,r=t.toString(),o=n.toString();try{e+=r.split(".")[1].length}catch(t){}try{e+=o.split(".")[1].length}catch(t){}return Number(r.replace(".",""))*Number(o.replace(".",""))/Math.pow(10,e)},div:function(t,n){var e=0,r=0;try{e=t.toString().split(".")[1].length}catch(t){}try{r=n.toString().split(".")[1].length}catch(t){}return Number(t.toString().replace(".",""))/Number(n.toString().replace(".",""))*Math.pow(10,r-e)}};h.valueForKeypath=h.getKeyValue,h.setValueForKeypath=h.setKeyValue,t.exports=h},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){t.exports={default:e(53),__esModule:!0}},function(t,n,e){t.exports={default:e(54),__esModule:!0}},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var o=e(47),i=r(o),u=e(46),c=r(u),f="function"==typeof c.default&&"symbol"==typeof i.default?function(t){return typeof t}:function(t){return t&&"function"==typeof c.default&&t.constructor===c.default&&t!==c.default.prototype?"symbol":typeof t};n.default="function"==typeof c.default&&"symbol"===f(i.default)?function(t){return void 0===t?"undefined":f(t)}:function(t){return t&&"function"==typeof c.default&&t.constructor===c.default&&t!==c.default.prototype?"symbol":void 0===t?"undefined":f(t)}},function(t,n,e){e(40),e(39),t.exports=e(74)},function(t,n,e){var r=e(0),o=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(t){return o.stringify.apply(o,arguments)}},function(t,n,e){e(76),t.exports=e(0).Object.freeze},function(t,n,e){e(77),t.exports=e(0).Object.keys},function(t,n,e){e(79),e(78),e(80),e(81),t.exports=e(0).Symbol},function(t,n,e){e(39),e(40),t.exports=e(27).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 r=e(8),o=e(72),i=e(71);t.exports=function(t){return function(n,e,u){var c,f=r(n),a=o(f.length),s=i(u,a);if(t&&e!=e){for(;a>s;)if((c=f[s++])!=c)return!0}else for(;a>s;s++)if((t||s in f)&&f[s]===e)return t||s||0;return!t&&-1}}},function(t,n,e){var r=e(15),o=e(2)("toStringTag"),i="Arguments"==r(function(){return arguments}()),u=function(t,n){try{return t[n]}catch(t){}};t.exports=function(t){var n,e,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=u(n=Object(t),o))?e:i?r(n):"Object"==(c=r(n))&&"function"==typeof n.callee?"Arguments":c}},function(t,n,e){var r=e(55);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}}},function(t,n,e){var r=e(12),o=e(34),i=e(20);t.exports=function(t){var n=r(t),e=o.f;if(e)for(var u,c=e(t),f=i.f,a=0;c.length>a;)f.call(t,u=c[a++])&&n.push(u);return n}},function(t,n,e){var r=e(1).document;t.exports=r&&r.documentElement},function(t,n,e){var r=e(15);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,n,e){var r=e(15);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,n,e){"use strict";var r=e(32),o=e(13),i=e(21),u={};e(5)(u,e(2)("iterator"),function(){return this}),t.exports=function(t,n,e){t.prototype=r(u,{next:o(1,e)}),i(t,n+" Iterator")}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,e){var r=e(7),o=e(9),i=e(12);t.exports=e(4)?Object.defineProperties:function(t,n){o(t);for(var e,u=i(n),c=u.length,f=0;c>f;)r.f(t,e=u[f++],n[e]);return t}},function(t,n,e){var r=e(20),o=e(13),i=e(8),u=e(25),c=e(3),f=e(29),a=Object.getOwnPropertyDescriptor;n.f=e(4)?a:function(t,n){if(t=i(t),n=u(n,!0),f)try{return a(t,n)}catch(t){}if(c(t,n))return o(!r.f.call(t,n),t[n])}},function(t,n,e){var r=e(8),o=e(33).f,i={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(t){try{return o(t)}catch(t){return u.slice()}};t.exports.f=function(t){return u&&"[object Window]"==i.call(t)?c(t):o(r(t))}},function(t,n,e){var r=e(3),o=e(38),i=e(22)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,n,e){var r=e(24),o=e(16);t.exports=function(t){return function(n,e){var i,u,c=String(o(n)),f=r(e),a=c.length;return f<0||f>=a?t?"":void 0:(i=c.charCodeAt(f),i<55296||i>56319||f+1===a||(u=c.charCodeAt(f+1))<56320||u>57343?t?c.charAt(f):i:t?c.slice(f,f+2):u-56320+(i-55296<<10)+65536)}}},function(t,n,e){var r=e(24),o=Math.max,i=Math.min;t.exports=function(t,n){return t=r(t),t<0?o(t+n,0):i(t,n)}},function(t,n,e){var r=e(24),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,n,e){var r=e(58),o=e(2)("iterator"),i=e(11);t.exports=e(0).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,n,e){var r=e(9),o=e(73);t.exports=e(0).getIterator=function(t){var n=o(t);if("function"!=typeof n)throw TypeError(t+" is not iterable!");return r(n.call(t))}},function(t,n,e){"use strict";var r=e(56),o=e(65),i=e(11),u=e(8);t.exports=e(30)(Array,"Array",function(t,n){this._t=u(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,o(1)):"keys"==n?o(0,e):"values"==n?o(0,t[e]):o(0,[e,t[e]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,n,e){var r=e(6),o=e(31).onFreeze;e(36)("freeze",function(t){return function(n){return t&&r(n)?t(o(n)):n}})},function(t,n,e){var r=e(38),o=e(12);e(36)("keys",function(){return function(t){return o(r(t))}})},function(t,n){},function(t,n,e){"use strict";var r=e(1),o=e(3),i=e(4),u=e(18),c=e(37),f=e(31).KEY,a=e(10),s=e(23),l=e(21),p=e(14),y=e(2),h=e(27),v=e(26),d=e(60),g=e(63),b=e(9),m=e(6),S=e(8),O=e(25),x=e(13),w=e(32),j=e(68),_=e(67),P=e(7),M=e(12),E=_.f,N=P.f,L=j.f,A=r.Symbol,k=r.JSON,T=k&&k.stringify,F=y("_hidden"),C=y("toPrimitive"),D={}.propertyIsEnumerable,I=s("symbol-registry"),R=s("symbols"),V=s("op-symbols"),J=Object.prototype,K="function"==typeof A,G=r.QObject,U=!G||!G.prototype||!G.prototype.findChild,z=i&&a(function(){return 7!=w(N({},"a",{get:function(){return N(this,"a",{value:7}).a}})).a})?function(t,n,e){var r=E(J,n);r&&delete J[n],N(t,n,e),r&&t!==J&&N(J,n,r)}:N,W=function(t){var n=R[t]=w(A.prototype);return n._k=t,n},B=K&&"symbol"==typeof A.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof A},H=function(t,n,e){return t===J&&H(V,n,e),b(t),n=O(n,!0),b(e),o(R,n)?(e.enumerable?(o(t,F)&&t[F][n]&&(t[F][n]=!1),e=w(e,{enumerable:x(0,!1)})):(o(t,F)||N(t,F,x(1,{})),t[F][n]=!0),z(t,n,e)):N(t,n,e)},$=function(t,n){b(t);for(var e,r=d(n=S(n)),o=0,i=r.length;i>o;)H(t,e=r[o++],n[e]);return t},Y=function(t,n){return void 0===n?w(t):$(w(t),n)},q=function(t){var n=D.call(this,t=O(t,!0));return!(this===J&&o(R,t)&&!o(V,t))&&(!(n||!o(this,t)||!o(R,t)||o(this,F)&&this[F][t])||n)},Q=function(t,n){if(t=S(t),n=O(n,!0),t!==J||!o(R,n)||o(V,n)){var e=E(t,n);return!e||!o(R,n)||o(t,F)&&t[F][n]||(e.enumerable=!0),e}},X=function(t){for(var n,e=L(S(t)),r=[],i=0;e.length>i;)o(R,n=e[i++])||n==F||n==f||r.push(n);return r},Z=function(t){for(var n,e=t===J,r=L(e?V:S(t)),i=[],u=0;r.length>u;)!o(R,n=r[u++])||e&&!o(J,n)||i.push(R[n]);return i};K||(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===J&&n.call(V,e),o(this,F)&&o(this[F],t)&&(this[F][t]=!1),z(this,t,x(1,e))};return i&&U&&z(J,t,{configurable:!0,set:n}),W(t)},c(A.prototype,"toString",function(){return this._k}),_.f=Q,P.f=H,e(33).f=j.f=X,e(20).f=q,e(34).f=Z,i&&!e(19)&&c(J,"propertyIsEnumerable",q,!0),h.f=function(t){return W(y(t))}),u(u.G+u.W+u.F*!K,{Symbol:A});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;tt.length>nt;)y(tt[nt++]);for(var et=M(y.store),rt=0;et.length>rt;)v(et[rt++]);u(u.S+u.F*!K,"Symbol",{for:function(t){return o(I,t+="")?I[t]:I[t]=A(t)},keyFor:function(t){if(!B(t))throw TypeError(t+" is not a symbol!");for(var n in I)if(I[n]===t)return n},useSetter:function(){U=!0},useSimple:function(){U=!1}}),u(u.S+u.F*!K,"Object",{create:Y,defineProperty:H,defineProperties:$,getOwnPropertyDescriptor:Q,getOwnPropertyNames:X,getOwnPropertySymbols:Z}),k&&u(u.S+u.F*(!K||a(function(){var t=A();return"[null]"!=T([t])||"{}"!=T({a:t})||"{}"!=T(Object(t))})),"JSON",{stringify:function(t){for(var n,e,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(e=n=r[1],(m(n)||void 0!==t)&&!B(t))return g(n)||(n=function(t,n){if("function"==typeof e&&(n=e.call(this,t,n)),!B(n))return n}),r[1]=n,T.apply(k,r)}}),A.prototype[C]||e(5)(A.prototype,C,A.prototype.valueOf),l(A,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,n,e){e(26)("asyncIterator")},function(t,n,e){e(26)("observable")},function(t,n,e){t.exports=e(41)}])}); | ||
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Utils=n():t.Utils=n()}(this,function(){return function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var e={};return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},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=82)}([function(t,n){var e=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=e)},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,e){var r=e(23)("wks"),o=e(14),i=e(1).Symbol,u="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=u&&i[t]||(u?i:o)("Symbol."+t))}).store=r},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n,e){t.exports=!e(10)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n,e){var r=e(7),o=e(13);t.exports=e(4)?function(t,n,e){return r.f(t,n,o(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,e){var r=e(9),o=e(29),i=e(25),u=Object.defineProperty;n.f=e(4)?Object.defineProperty:function(t,n,e){if(r(t),n=i(n,!0),r(e),o)try{return u(t,n,e)}catch(t){}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 r=e(62),o=e(16);t.exports=function(t){return r(o(t))}},function(t,n,e){var r=e(6);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n){t.exports={}},function(t,n,e){var r=e(35),o=e(17);t.exports=Object.keys||function(t){return r(t,o)}},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,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+r).toString(36))}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},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,e){var r=e(1),o=e(0),i=e(59),u=e(5),c=function(t,n,e){var f,a,s,l=t&c.F,p=t&c.G,y=t&c.S,h=t&c.P,v=t&c.B,d=t&c.W,g=p?o:o[n]||(o[n]={}),b=g.prototype,m=p?r:y?r[n]:(r[n]||{}).prototype;p&&(e=n);for(f in e)(a=!l&&m&&void 0!==m[f])&&f in g||(s=a?m[f]:e[f],g[f]=p&&"function"!=typeof m[f]?e[f]:v&&a?i(s,r):d&&m[f]==s?function(t){var n=function(n,e,r){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,r)}return t.apply(this,arguments)};return n.prototype=t.prototype,n}(s):h&&"function"==typeof s?i(Function.call,s):s,h&&((g.virtual||(g.virtual={}))[f]=s,t&c.R&&b&&!b[f]&&u(b,f,s)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,n){t.exports=!0},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,e){var r=e(7).f,o=e(3),i=e(2)("toStringTag");t.exports=function(t,n,e){t&&!o(t=e?t:t.prototype,i)&&r(t,i,{configurable:!0,value:n})}},function(t,n,e){var r=e(23)("keys"),o=e(14);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,n,e){var r=e(1),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},function(t,n,e){var r=e(6);t.exports=function(t,n){if(!r(t))return t;var e,o;if(n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;if("function"==typeof(e=t.valueOf)&&!r(o=e.call(t)))return o;if(!n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,n,e){var r=e(1),o=e(0),i=e(19),u=e(27),c=e(7).f;t.exports=function(t){var n=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in n||c(n,t,{value:u.f(t)})}},function(t,n,e){n.f=e(2)},function(t,n,e){var r=e(6),o=e(1).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,n,e){t.exports=!e(4)&&!e(10)(function(){return 7!=Object.defineProperty(e(28)("div"),"a",{get:function(){return 7}}).a})},function(t,n,e){"use strict";var r=e(19),o=e(18),i=e(37),u=e(5),c=e(3),f=e(11),a=e(64),s=e(21),l=e(69),p=e(2)("iterator"),y=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,n,e,v,d,g,b){a(e,n,v);var m,S,O,x=function(t){if(!y&&t in P)return P[t];switch(t){case"keys":case"values":return function(){return new e(this,t)}}return function(){return new e(this,t)}},w=n+" Iterator",j="values"==d,_=!1,P=t.prototype,M=P[p]||P["@@iterator"]||d&&P[d],E=!y&&M||x(d),N=d?j?x("entries"):E:void 0,L="Array"==n?P.entries||M:M;if(L&&(O=l(L.call(new t)))!==Object.prototype&&O.next&&(s(O,w,!0),r||c(O,p)||u(O,p,h)),j&&M&&"values"!==M.name&&(_=!0,E=function(){return M.call(this)}),r&&!b||!y&&!_&&P[p]||u(P,p,E),f[n]=E,f[w]=h,d)if(m={values:j?E:x("values"),keys:g?E:x("keys"),entries:N},b)for(S in m)S in P||i(P,S,m[S]);else o(o.P+o.F*(y||_),n,m);return m}},function(t,n,e){var r=e(14)("meta"),o=e(6),i=e(3),u=e(7).f,c=0,f=Object.isExtensible||function(){return!0},a=!e(10)(function(){return f(Object.preventExtensions({}))}),s=function(t){u(t,r,{value:{i:"O"+ ++c,w:{}}})},l=function(t,n){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!f(t))return"F";if(!n)return"E";s(t)}return t[r].i},p=function(t,n){if(!i(t,r)){if(!f(t))return!0;if(!n)return!1;s(t)}return t[r].w},y=function(t){return a&&h.NEED&&f(t)&&!i(t,r)&&s(t),t},h=t.exports={KEY:r,NEED:!1,fastKey:l,getWeak:p,onFreeze:y}},function(t,n,e){var r=e(9),o=e(66),i=e(17),u=e(22)("IE_PROTO"),c=function(){},f=function(){var t,n=e(28)("iframe"),r=i.length;for(n.style.display="none",e(61).appendChild(n),n.src="javascript:",t=n.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),f=t.F;r--;)delete f.prototype[i[r]];return f()};t.exports=Object.create||function(t,n){var e;return null!==t?(c.prototype=r(t),e=new c,c.prototype=null,e[u]=t):e=f(),void 0===n?e:o(e,n)}},function(t,n,e){var r=e(35),o=e(17).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,e){var r=e(3),o=e(8),i=e(57)(!1),u=e(22)("IE_PROTO");t.exports=function(t,n){var e,c=o(t),f=0,a=[];for(e in c)e!=u&&r(c,e)&&a.push(e);for(;n.length>f;)r(c,e=n[f++])&&(~i(a,e)||a.push(e));return a}},function(t,n,e){var r=e(18),o=e(0),i=e(10);t.exports=function(t,n){var e=(o.Object||{})[t]||Object[t],u={};u[t]=n(e),r(r.S+r.F*i(function(){e(1)}),"Object",u)}},function(t,n,e){t.exports=e(5)},function(t,n,e){var r=e(16);t.exports=function(t){return Object(r(t))}},function(t,n,e){"use strict";var r=e(70)(!0);e(30)(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=r(n,e),this._i+=t.length,{value:t,done:!1})})},function(t,n,e){e(75);for(var r=e(1),o=e(5),i=e(11),u=e(2)("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(","),f=0;f<c.length;f++){var a=c[f],s=r[a],l=s&&s.prototype;l&&!l[u]&&o(l,u,a),i[a]=i.Array}},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var o=e(43),i=r(o),u=e(42),c=r(u),f=e(45),a=r(f),s=e(44),l=r(s),p=e(48),y=r(p),h={isObject:function(t){return"[object Object]"===Object.prototype.toString.call(t)},isArray:function(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)},isDate:function(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)},isNumber:function(t){return t instanceof Number||"[object Number]"===Object.prototype.toString.call(t)},isString:function(t){return t instanceof String||"[object String]"===Object.prototype.toString.call(t)},isBoolean:function(t){return"boolean"==typeof t},isFunction:function(t){return"function"==typeof t},isNull:function(t){return void 0===t||null===t},isPlainObject:function(t){if(t&&"[object Object]"===Object.prototype.toString.call(t)&&t.constructor===Object&&!hasOwnProperty.call(t,"constructor")){var n;for(n in t);return void 0===n||hasOwnProperty.call(t,n)}return!1},extend:function(){var t,n,e,r,o,i,u=arguments[0]||{},c=1,f=arguments.length,a=!1;for("boolean"==typeof u&&(a=u,u=arguments[1]||{},c=2),"object"===(void 0===u?"undefined":(0,y.default)(u))||this.isFunction(u)||(u={}),f===c&&(u=this,--c);c<f;c++)if(null!=(t=arguments[c]))for(n in t)e=u[n],r=t[n],e!==r&&(a&&r&&(this.isPlainObject(r)||(o=this.isArray(r)))?(o?(o=!1,i=e&&this.isArray(e)?e:[]):i=e&&this.isPlainObject(e)?e:{},u[n]=this.extend(a,i,r)):void 0!==r&&(u[n]=r));return u},freeze:function(t){var n=this,e=this;return(0,l.default)(t),(0,a.default)(t).forEach(function(r,o){e.isObject(t[r])&&n.freeze(t[r])}),t},copy:function(t){var n=null;if(this.isObject(t)){n={};for(var e in t)n[e]=this.copy(t[e])}else if(this.isArray(t)){n=[];var r=!0,o=!1,i=void 0;try{for(var u,f=(0,c.default)(t);!(r=(u=f.next()).done);r=!0){var a=u.value;n.push(this.copy(a))}}catch(t){o=!0,i=t}finally{try{!r&&f.return&&f.return()}finally{if(o)throw i}}}else n=t;return n},getKeyValue:function(t,n){if(!this.isObject(t))return null;var e=null;if(this.isArray(n)?e=n:this.isString(n)&&(e=n.split(".")),null==e||0==e.length)return null;var r=null,o=e.shift(),i=o.match(new RegExp("^(\\w+)\\[(\\d+)\\]$"));if(i){o=i[1];var u=i[2];r=t[o],this.isArray(r)&&r.length>u&&(r=r[u])}else r=t[o];return e.length>0?this.getKeyValue(r,e):r},setKeyValue:function(t,n,e,r){if(!this.isObject(t))return!1;var o=null;if(this.isArray(n)?o=n:this.isString(n)&&(o=n.split("."),r=t),null==o||0==o.length)return!1;var i=null,u=0,c=o.shift(),f=c.match(new RegExp("^(\\w+)\\[(\\d+)\\]$"));if(f){if(c=f[1],u=f[2],i=t[c],this.isArray(i)&&i.length>u){if(o.length>0)return this.setKeyValue(i[u],o,e,r);i[u]=e}}else{if(o.length>0)return this.setKeyValue(t[c],o,e,r);t[c]=e}return r},toArray:function(t,n,e){var r="";if(!this.isObject(t))return[];this.isString(e)&&(r=e);var o=[];for(var i in t){var u=t[i],c={};this.isObject(u)?c=u:c[r]=u,n&&(c[n]=i),o.push(c)}return o},toObject:function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id",e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r={},o=0;o<t.length;o++){var i=t[o];this.isObject(i)?"count"==n?r[o]=i:(r[i[n]]=i,e&&(r[i[n]].count=o)):r[i]=i}return r},saveLocal:function(t,n){return!!(window.localStorage&&JSON&&t)&&("object"==(void 0===n?"undefined":(0,y.default)(n))&&(n=(0,i.default)(n)),window.localStorage[t]=n,!0)},getLocal:function(t,n){if(window.localStorage&&JSON&&t){var e=window.localStorage[t];if(!n||"json"!=n||void 0===e)return e;try{return JSON.parse(e)}catch(t){return""}}return null},getLocal2Json:function(t){if(window.localStorage&&JSON&&t){var n=window.localStorage[t];if(this.isNull(n))return n;try{return JSON.parse(n)}catch(t){return""}}return null},removeLocal:function(t){return window.localStorage&&JSON&&t&&(window.localStorage[t]=null),null},saveCookie:function(t,n,e,r,o){var u=!!navigator.cookieEnabled;if(t&&u){r=r||"/","object"==(void 0===n?"undefined":(0,y.default)(n))&&(n=(0,i.default)(n));var c=void 0;o?(c=new Date,c.setTime(c.getTime()+1e3*o)):c=new Date("9998-01-01");var f=t+"="+escape(n)+(o?";expires="+c.toGMTString():"")+";path="+r+";";return e&&(f+="domain="+e+";"),document.cookie=f,!0}return!1},getCookie:function(t){var n=!!navigator.cookieEnabled;if(t&&n){var e=document.cookie.match(new RegExp("(^| )"+t+"=([^;]*)(;|$)"));if(null!==e)return unescape(e[2])}return null},clearCookie:function(t,n){var e=document.cookie.match(/[^ =;]+(?=\=)/g);if(n=n||"/",e)for(var r=e.length;r--;){var o=e[r]+"=0;expires="+new Date(0).toUTCString()+";path="+n+";";t&&(o+="domain="+t+";"),document.cookie=o}},removeCookie:function(t,n,e){var r=!!navigator.cookieEnabled;if(t&&r){e=e||"/";var o=t+"=0;expires="+new Date(0).toUTCString()+";path="+e+";";return n&&(o+="domain="+n+";"),document.cookie=o,!0}return!1},dictMapping:function(t){var n=this,e=t.value,r=t.dict,o=t.connector,i=t.keyField,u=void 0===i?"key":i,c=t.titleField,f=void 0===c?"value":c;return!r||this.isNull(e)?"":(o&&(e=e.split(o)),!this.isNull(e)&&""!==e&&r&&(this.isArray(e)||(e=[e])),e.length<=0?"":(this.isArray(r)&&(r=this.toObject(r,u)),e.map(function(t){if(n.isObject(t))return t[f];var e=r[t];return n.isObject(e)?e[f]:e}).filter(function(t){return t&&""!==t}).join(", ")))},uuid:function(){var t=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()},padLeft:function(t,n){var e="00000"+t;return e.substr(e.length-n)},toggleValue:function(t,n){if(!this.isArray(t))return[n];t.some(function(t){return t==n})?t.splice(t.indexOf(n),1):t.push(n)},toSimpleArray:function(t,n){var e=[];if(this.isObject(t)){var r=!0,o=!1,i=void 0;try{for(var u,f=(0,c.default)((0,a.default)(t));!(r=(u=f.next()).done);r=!0){var s=u.value;e.push(t[s][n])}}catch(t){o=!0,i=t}finally{try{!r&&f.return&&f.return()}finally{if(o)throw i}}}if(this.isArray(t)){var l=!0,p=!1,y=void 0;try{for(var h,v=(0,c.default)(t);!(l=(h=v.next()).done);l=!0){var d=h.value;e.push(d[n])}}catch(t){p=!0,y=t}finally{try{!l&&v.return&&v.return()}finally{if(p)throw y}}}return e},getURLParam:function(t,n){return decodeURIComponent((new RegExp("[?|&]"+t+"=([^&;]+?)(&|#|;|$)").exec(n||location.search)||[!0,""])[1].replace(/\+/g,"%20"))||null},getAuthor:function(){var t=this.getURLParam("author",window.location.search)||this.getLocal("window_author");return t&&this.saveLocal("window_author",t),t},add:function(t,n){var e=t.toString(),r=n.toString(),o=e.split("."),i=r.split("."),u=2==o.length?o[1]:"",c=2==i.length?i[1]:"",f=Math.max(u.length,c.length),a=Math.pow(10,f);return Number(((e*a+r*a)/a).toFixed(f))},sub:function(t,n){return this.add(t,-n)},mul:function(t,n){var e=0,r=t.toString(),o=n.toString();try{e+=r.split(".")[1].length}catch(t){}try{e+=o.split(".")[1].length}catch(t){}return Number(r.replace(".",""))*Number(o.replace(".",""))/Math.pow(10,e)},div:function(t,n){var e=0,r=0;try{e=t.toString().split(".")[1].length}catch(t){}try{r=n.toString().split(".")[1].length}catch(t){}var o=Number(t.toString().replace(".","")),i=Number(n.toString().replace(".",""));return this.mul(o/i,Math.pow(10,r-e))}};h.valueForKeypath=h.getKeyValue,h.setValueForKeypath=h.setKeyValue,t.exports=h},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){t.exports={default:e(53),__esModule:!0}},function(t,n,e){t.exports={default:e(54),__esModule:!0}},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var o=e(47),i=r(o),u=e(46),c=r(u),f="function"==typeof c.default&&"symbol"==typeof i.default?function(t){return typeof t}:function(t){return t&&"function"==typeof c.default&&t.constructor===c.default&&t!==c.default.prototype?"symbol":typeof t};n.default="function"==typeof c.default&&"symbol"===f(i.default)?function(t){return void 0===t?"undefined":f(t)}:function(t){return t&&"function"==typeof c.default&&t.constructor===c.default&&t!==c.default.prototype?"symbol":void 0===t?"undefined":f(t)}},function(t,n,e){e(40),e(39),t.exports=e(74)},function(t,n,e){var r=e(0),o=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(t){return o.stringify.apply(o,arguments)}},function(t,n,e){e(76),t.exports=e(0).Object.freeze},function(t,n,e){e(77),t.exports=e(0).Object.keys},function(t,n,e){e(79),e(78),e(80),e(81),t.exports=e(0).Symbol},function(t,n,e){e(39),e(40),t.exports=e(27).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 r=e(8),o=e(72),i=e(71);t.exports=function(t){return function(n,e,u){var c,f=r(n),a=o(f.length),s=i(u,a);if(t&&e!=e){for(;a>s;)if((c=f[s++])!=c)return!0}else for(;a>s;s++)if((t||s in f)&&f[s]===e)return t||s||0;return!t&&-1}}},function(t,n,e){var r=e(15),o=e(2)("toStringTag"),i="Arguments"==r(function(){return arguments}()),u=function(t,n){try{return t[n]}catch(t){}};t.exports=function(t){var n,e,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=u(n=Object(t),o))?e:i?r(n):"Object"==(c=r(n))&&"function"==typeof n.callee?"Arguments":c}},function(t,n,e){var r=e(55);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}}},function(t,n,e){var r=e(12),o=e(34),i=e(20);t.exports=function(t){var n=r(t),e=o.f;if(e)for(var u,c=e(t),f=i.f,a=0;c.length>a;)f.call(t,u=c[a++])&&n.push(u);return n}},function(t,n,e){var r=e(1).document;t.exports=r&&r.documentElement},function(t,n,e){var r=e(15);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,n,e){var r=e(15);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,n,e){"use strict";var r=e(32),o=e(13),i=e(21),u={};e(5)(u,e(2)("iterator"),function(){return this}),t.exports=function(t,n,e){t.prototype=r(u,{next:o(1,e)}),i(t,n+" Iterator")}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,e){var r=e(7),o=e(9),i=e(12);t.exports=e(4)?Object.defineProperties:function(t,n){o(t);for(var e,u=i(n),c=u.length,f=0;c>f;)r.f(t,e=u[f++],n[e]);return t}},function(t,n,e){var r=e(20),o=e(13),i=e(8),u=e(25),c=e(3),f=e(29),a=Object.getOwnPropertyDescriptor;n.f=e(4)?a:function(t,n){if(t=i(t),n=u(n,!0),f)try{return a(t,n)}catch(t){}if(c(t,n))return o(!r.f.call(t,n),t[n])}},function(t,n,e){var r=e(8),o=e(33).f,i={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(t){try{return o(t)}catch(t){return u.slice()}};t.exports.f=function(t){return u&&"[object Window]"==i.call(t)?c(t):o(r(t))}},function(t,n,e){var r=e(3),o=e(38),i=e(22)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,n,e){var r=e(24),o=e(16);t.exports=function(t){return function(n,e){var i,u,c=String(o(n)),f=r(e),a=c.length;return f<0||f>=a?t?"":void 0:(i=c.charCodeAt(f),i<55296||i>56319||f+1===a||(u=c.charCodeAt(f+1))<56320||u>57343?t?c.charAt(f):i:t?c.slice(f,f+2):u-56320+(i-55296<<10)+65536)}}},function(t,n,e){var r=e(24),o=Math.max,i=Math.min;t.exports=function(t,n){return t=r(t),t<0?o(t+n,0):i(t,n)}},function(t,n,e){var r=e(24),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,n,e){var r=e(58),o=e(2)("iterator"),i=e(11);t.exports=e(0).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,n,e){var r=e(9),o=e(73);t.exports=e(0).getIterator=function(t){var n=o(t);if("function"!=typeof n)throw TypeError(t+" is not iterable!");return r(n.call(t))}},function(t,n,e){"use strict";var r=e(56),o=e(65),i=e(11),u=e(8);t.exports=e(30)(Array,"Array",function(t,n){this._t=u(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,o(1)):"keys"==n?o(0,e):"values"==n?o(0,t[e]):o(0,[e,t[e]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,n,e){var r=e(6),o=e(31).onFreeze;e(36)("freeze",function(t){return function(n){return t&&r(n)?t(o(n)):n}})},function(t,n,e){var r=e(38),o=e(12);e(36)("keys",function(){return function(t){return o(r(t))}})},function(t,n){},function(t,n,e){"use strict";var r=e(1),o=e(3),i=e(4),u=e(18),c=e(37),f=e(31).KEY,a=e(10),s=e(23),l=e(21),p=e(14),y=e(2),h=e(27),v=e(26),d=e(60),g=e(63),b=e(9),m=e(6),S=e(8),O=e(25),x=e(13),w=e(32),j=e(68),_=e(67),P=e(7),M=e(12),E=_.f,N=P.f,L=j.f,A=r.Symbol,k=r.JSON,T=k&&k.stringify,F=y("_hidden"),C=y("toPrimitive"),D={}.propertyIsEnumerable,I=s("symbol-registry"),R=s("symbols"),V=s("op-symbols"),J=Object.prototype,K="function"==typeof A,G=r.QObject,U=!G||!G.prototype||!G.prototype.findChild,z=i&&a(function(){return 7!=w(N({},"a",{get:function(){return N(this,"a",{value:7}).a}})).a})?function(t,n,e){var r=E(J,n);r&&delete J[n],N(t,n,e),r&&t!==J&&N(J,n,r)}:N,W=function(t){var n=R[t]=w(A.prototype);return n._k=t,n},B=K&&"symbol"==typeof A.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof A},H=function(t,n,e){return t===J&&H(V,n,e),b(t),n=O(n,!0),b(e),o(R,n)?(e.enumerable?(o(t,F)&&t[F][n]&&(t[F][n]=!1),e=w(e,{enumerable:x(0,!1)})):(o(t,F)||N(t,F,x(1,{})),t[F][n]=!0),z(t,n,e)):N(t,n,e)},$=function(t,n){b(t);for(var e,r=d(n=S(n)),o=0,i=r.length;i>o;)H(t,e=r[o++],n[e]);return t},Y=function(t,n){return void 0===n?w(t):$(w(t),n)},q=function(t){var n=D.call(this,t=O(t,!0));return!(this===J&&o(R,t)&&!o(V,t))&&(!(n||!o(this,t)||!o(R,t)||o(this,F)&&this[F][t])||n)},Q=function(t,n){if(t=S(t),n=O(n,!0),t!==J||!o(R,n)||o(V,n)){var e=E(t,n);return!e||!o(R,n)||o(t,F)&&t[F][n]||(e.enumerable=!0),e}},X=function(t){for(var n,e=L(S(t)),r=[],i=0;e.length>i;)o(R,n=e[i++])||n==F||n==f||r.push(n);return r},Z=function(t){for(var n,e=t===J,r=L(e?V:S(t)),i=[],u=0;r.length>u;)!o(R,n=r[u++])||e&&!o(J,n)||i.push(R[n]);return i};K||(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===J&&n.call(V,e),o(this,F)&&o(this[F],t)&&(this[F][t]=!1),z(this,t,x(1,e))};return i&&U&&z(J,t,{configurable:!0,set:n}),W(t)},c(A.prototype,"toString",function(){return this._k}),_.f=Q,P.f=H,e(33).f=j.f=X,e(20).f=q,e(34).f=Z,i&&!e(19)&&c(J,"propertyIsEnumerable",q,!0),h.f=function(t){return W(y(t))}),u(u.G+u.W+u.F*!K,{Symbol:A});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;tt.length>nt;)y(tt[nt++]);for(var et=M(y.store),rt=0;et.length>rt;)v(et[rt++]);u(u.S+u.F*!K,"Symbol",{for:function(t){return o(I,t+="")?I[t]:I[t]=A(t)},keyFor:function(t){if(!B(t))throw TypeError(t+" is not a symbol!");for(var n in I)if(I[n]===t)return n},useSetter:function(){U=!0},useSimple:function(){U=!1}}),u(u.S+u.F*!K,"Object",{create:Y,defineProperty:H,defineProperties:$,getOwnPropertyDescriptor:Q,getOwnPropertyNames:X,getOwnPropertySymbols:Z}),k&&u(u.S+u.F*(!K||a(function(){var t=A();return"[null]"!=T([t])||"{}"!=T({a:t})||"{}"!=T(Object(t))})),"JSON",{stringify:function(t){for(var n,e,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(e=n=r[1],(m(n)||void 0!==t)&&!B(t))return g(n)||(n=function(t,n){if("function"==typeof e&&(n=e.call(this,t,n)),!B(n))return n}),r[1]=n,T.apply(k,r)}}),A.prototype[C]||e(5)(A.prototype,C,A.prototype.valueOf),l(A,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,n,e){e(26)("asyncIterator")},function(t,n,e){e(26)("observable")},function(t,n,e){t.exports=e(41)}])}); |
{ | ||
"name": "hey-utils", | ||
"version": "0.3.1", | ||
"version": "0.4.0", | ||
"description": "js-utils, js, util", | ||
@@ -5,0 +5,0 @@ "main": "build/utils.js", |
@@ -16,2 +16,17 @@ # hey-utils | ||
## 数值计算 | ||
替换js数学计算中产生的错误,比如:0.09999999 + 0.00000001 | ||
### add(arg1, arg2) | ||
加法 | ||
### sub(arg1, arg2) | ||
减法 | ||
### mul(arg1, arg2) | ||
乘法 | ||
### div(arg1, arg2) | ||
除法 | ||
## 对象复制,合并,赋值 | ||
@@ -18,0 +33,0 @@ |
@@ -419,3 +419,3 @@ "use strict"; | ||
let r2 = Number(arg2.toString().replace(".", "")); | ||
return (r1 / r2) * Math.pow(10, t2 - t1); | ||
return this.mul((r1 / r2) , Math.pow(10, t2 - t1)); | ||
} | ||
@@ -422,0 +422,0 @@ } |
@@ -47,2 +47,3 @@ var utils = require('../src/index'); | ||
it('div', function () { | ||
expect(utils.div(193.3, 10)).to.be.deep.equal(19.33); | ||
expect(utils.div(0.000001, 0.0001)).to.be.deep.equal(0.01); | ||
@@ -49,0 +50,0 @@ expect(utils.div(32209.99, 1000)).to.be.deep.equal(32.20999); |
Sorry, the diff of this file is too big to display
219773
480
214