Comparing version 1.5.0 to 1.6.0
@@ -7,2 +7,20 @@ # Change Log | ||
## [1.6.0] - 2017-07-13 | ||
### Added | ||
- `be.compareVersion`, compare two version | ||
- `be.androidTablet`, detect Android tablet | ||
- `be.androidPhone`, detect Android phone | ||
- `be.chromeIOS`, detect Chrome on iOS | ||
- `be.opera`, detect Opera browser | ||
- `be.edge`, detect Edge browser | ||
- `be.safariMobile`, detect Safari mobile browser | ||
- `be.windowsPhone`, detect Windows Phone | ||
- `be.windowsTablet`, detect Windows tablet | ||
- `be.blackberry`, detect BlackBerry device | ||
- `be.linux`, detect Linux | ||
- `be.mobile`, detect mobile device | ||
- `be.tablet`, detect tablet device | ||
- `be.desktop`, detect desktop device | ||
## [1.5.0] - 2017-07-10 | ||
@@ -9,0 +27,0 @@ |
@@ -1,2 +0,2 @@ | ||
// [AIV] beJS Build version: 1.5.0 | ||
var be=function(t){function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}var e={};return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},r.p="",r(r.s=4)}([function(t,r,e){"use strict";var n=e(2),i={};i._isArray=function(t){return"[object Array]"===n.objectToString(t)},i.create=function(t){t.all={},t.any={},t.not={};for(var r in t)!function(r){t.hasOwnProperty(r)&&"function"==typeof t[r]&&(t.not[r]=function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];return!t[r].apply(void 0,n)},void 0===t[r].multiple&&(t.all[r]=function(){for(var e=arguments.length,n=Array(e),o=0;o<e;o++)n[o]=arguments[o];var u=n;if(i._isArray(u[0])&&1===u.length&&(u=u[0]),!u.length)return!1;for(var a in u)if(u.hasOwnProperty(a)&&!t[r].call(void 0,u[a]))return!1;return!0},t.any[r]=function(){for(var e=arguments.length,n=Array(e),o=0;o<e;o++)n[o]=arguments[o];var u=n;i._isArray(u[0])&&1===u.length&&(u=u[0]);for(var a in u)if(u.hasOwnProperty(a)&&t[r].call(void 0,u[a]))return!0;return!1}))}(r);return t},t.exports=i},function(t,r,e){"use strict";(function(r){var n=e(2),i=e(0),o={};o.classOf=function(t,r){return n.objectToString(t).toLowerCase()==="[object "+r+"]".toLowerCase()},o.classOf.multiple=!1,o.boolean=function(t){return o.classOf(t,"boolean")},o.booleanFalse=function(t){return o.false(t)},o.false=function(t){return o.boolean(t)&&!1===t},o.booleanTrue=function(t){return o.true(t)},o.true=function(t){return o.boolean(t)&&!0===t},o.number=function(t){return o.classOf(t,"number")&&!isNaN(t)},o.string=function(t){return o.classOf(t,"string")},o.undefined=function(t){return o.classOf(t,"undefined")},o.null=function(t){return o.classOf(t,"null")},o.object=function(t){return o.classOf(t,"object")&&!o.array(t)},o.array=function(t){return o.classOf(t,"array")},o.json=function(t){try{return!!JSON.parse(t)}catch(t){return!1}},o.date=function(t){return o.classOf(t,"date")},o.function=function(t){return o.classOf(t,"function")},o.regexp=function(t){return o.classOf(t,"regexp")},o.sameType=function(t,r){return n.objectToString(t)===n.objectToString(r)},o.sameType.multiple=!1,o.empty=function(t){if(o.null(t)||o.undefined(t))return!0;if(o.number(t)||o.function(t)||o.boolean(t))return!1;if(o.object(t)||o.array(t)){if(t.length>0)return!1;if(0===t.length)return!0;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))return!1}return!(o.string(t)&&t.length>0)},o.falsy=function(t){return!t},o.truthy=function(t){return!o.falsy(t)},o.error=function(t){return o.classOf(t,"error")},o.argument=function(t){return o.classOf(t,"arguments")||o.object(t)&&"callee"in t},o.primitive=function(t){return t!==Object(t)},o.promise=function(t){return o.classOf(t,"promise")},o.buffer=function(t){return r&&t instanceof r},o.iterable=function(t){return o.function(t[Symbol.iterator])},o.symbol=function(t){return!o.undefined(Symbol)&&o.classOf(t,"symbol")},o.defined=function(t){return!o.undefined(t)},o.oSet=function(t){return o.classOf(t,"set")},o.weakSet=function(t){return o.classOf(t,"weakset")},o.map=function(t){return o.classOf(t,"map")},o.weakMap=function(t){return o.classOf(t,"weakmap")},o.mapIterator=function(t){return o.classOf(t,"map iterator")},o.setIterator=function(t){return o.classOf(t,"set iterator")},o.int8Array=function(t){return o.classOf(t,"int8array")},o.uint8Array=function(t){return o.classOf(t,"uint8array")},o.uint8ClampedArray=function(t){return o.classOf(t,"uint8clampedarray")},o.int16Array=function(t){return o.classOf(t,"int16array")},o.uint16Array=function(t){return o.classOf(t,"uint16array")},o.int32Array=function(t){return o.classOf(t,"int32array")},o.uint32Array=function(t){return o.classOf(t,"uint32array")},o.float32Array=function(t){return o.classOf(t,"float32array")},o.float64Array=function(t){return o.classOf(t,"float64array")},o=i.create(o),t.exports=o}).call(r,e(7).Buffer)},function(t,r,e){"use strict";var n={};n.getUserAgent=function(){if(arguments.length)return arguments.length<=0?void 0:arguments[0];if("undefined"==typeof window||void 0===window.navigator)throw new Error("test allowed only in browser environment");return navigator.userAgent},n.objectToString=function(t){return Object.prototype.toString.call(t)},n.getEditDistance=function(t,r){if(0===t.length)return r.length;if(0===r.length)return t.length;var e=[],n=void 0;for(n=0;n<=r.length;n++)e[n]=[n];var i=void 0;for(i=0;i<=t.length;i++)e[0][i]=i;for(n=1;n<=r.length;n++)for(i=1;i<=t.length;i++)r.charAt(n-1)===t.charAt(i-1)?e[n][i]=e[n-1][i-1]:e[n][i]=Math.min(e[n-1][i-1]+1,Math.min(e[n][i-1]+1,e[n-1][i]+1));return e[r.length][t.length]},t.exports=n},function(t,r,e){"use strict";var n=e(1),i=e(0),o={};o.int=function(t){return n.number(t)&&isFinite(t)&&Math.floor(t)===t},o.float=function(t){return n.number(t)&&!o.int(t)},o.nan=function(t){return isNaN(t)},o.even=function(t){return n.number(t)&&t%2==0},o.odd=function(t){return n.number(t)&&!o.even(t)},o.positive=function(t){return n.number(t)&&(t>0||o.positiveZero(t))},o.negative=function(t){return n.number(t)&&(t<0||o.negativeZero(t))},o.negativeZero=function(t){return n.number(t)&&0===t&&1/t===Number.NEGATIVE_INFINITY},o.positiveZero=function(t){return n.number(t)&&0===t&&1/t===Number.POSITIVE_INFINITY},o.infinity=function(t){return o.infinityPositive(t)||o.infinityNegative(t)},o.infinityPositive=function(t){return t===Number.POSITIVE_INFINITY},o.infinityNegative=function(t){return t===Number.NEGATIVE_INFINITY},o.between=function(t,r,e){return n.all.number(t,r,e)&&t>=r&&t<=e},o.between.multiple=!1,o.greater=function(t,r){return n.all.number(t,r)&&t>r},o.greater.multiple=!1,o.lesser=function(t,r){return n.all.number(t,r)&&t<r},o.lesser.multiple=!1,o.numeric=function(t){return(n.number(t)||n.string(t))&&!isNaN(t-parseFloat(t))},o=i.create(o),t.exports=o},function(t,r,e){"use strict";t.exports=e(5)},function(t,r,e){"use strict";var n=e(2),i=e(0),o={};o._helpers=n;var u={Strings:e(6),Types:e(1),Numbers:e(3),Envs:e(12),Objects:e(15),Mixed:e(16),Arrays:e(17),Dates:e(18),Urls:e(19),Hashes:e(20),CreditCards:e(21),PostalCodes:e(22),DOM:e(23)};o.getVersion=function(){return u.Envs.commonjsEnv()?e(24).version:"1.5.0"},o.set=function(t,r){o[t]=r},function(){for(var r in u)!function(t){if(u.hasOwnProperty(t)){for(var r in u[t])!function(r){u[t].hasOwnProperty(r)&&u.Types.function(u[t][r])&&(o[r]=function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];return u[t][r].apply(null,n)})}(r)}}(r);o=i.create(o);for(var e in u)u.hasOwnProperty(e)&&(o[e]=u[e]);t.exports=o}()},function(t,r,e){"use strict";var n=e(2),i=e(0),o=e(1),u={};u.camelCase=function(t){return o.string(t)&&!u.upperCase(t)&&u.alphanumeric(t)&&u.spaces(t.replace(/([A-Z])/g," $1"))},u.snakeCase=function(t){return u.lowerCase(t)&&/^[0-9a-z]*_[0-9a-z]/gi.test(t)},u.kebabCase=function(t){return u.lowerCase(t)&&/^[0-9a-z]*-[0-9a-z]/gi.test(t)},u.similarity=function(t,r,e){if(!o.all.string(t,r))return!1;(!o.number(e)||e<0||e>1)&&(e=1);var i=t,u=r;t.length<r.length&&(i=r,u=t);var a=i.length;return(a-n.getEditDistance(i,u))/parseFloat(a)>=e},u.similarity.multiple=!1,u.contains=function(t,r){return!!o.string(t)&&t.indexOf(r)>-1},u.contains.multiple=!1,u.lowerCase=function(t){return!!o.string(t)&&t.toLowerCase()===t},u.upperCase=function(t){return!!o.string(t)&&t.toUpperCase()===t},u.word=function(t){if(!o.string(t))return!1;var r=t.trim();return r.length>0&&1===r.split(" ").length},u.capitalized=function(t){if(!o.string(t))return!1;if(0===t.trim().length)return!1;var r=t.trim().split(" ");for(var e in r){var n=r[e].charAt(0);if(n!==n.toUpperCase())return!1}return!0},u.emptyString=function(t){return o.string(t)&&0===t.length},u.alphanumeric=function(t){return/^[a-z0-9]+$/i.test(t)&&o.string(t)},u.startWith=function(t,r,e){return o.any.string(t,r)||(t+="",r+=""),o.truthy(e)&&(t=t.toLocaleLowerCase(),r=r.toLocaleLowerCase()),0===r.indexOf(t)},u.startWith.multiple=!1,u.endWith=function(t,r,e){o.any.string(t,r)||(t+="",r+=""),o.truthy(e)&&(t=t.toLocaleLowerCase(),r=r.toLocaleLowerCase());var n=r.length-t.length;return n>=0&&r.indexOf(t,n)===n},u.endWith.multiple=!1,u.palindrome=function(t){return!!o.string(t)&&(t=t.replace(/\s/g,"").toLowerCase())===t.split("").reverse().join("")},u.char=function(t){return o.string(t)&&1===t.length},u.space=function(t){return u.char(t)&&/\s/.test(t)},u.spaces=function(t){return/\s/.test(t)},u=i.create(u),t.exports=u},function(t,r,e){"use strict";(function(t){function n(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(t,r){if(n()<r)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r),t.__proto__=o.prototype):(null===t&&(t=new o(r)),t.length=r),t}function o(t,r,e){if(!(o.TYPED_ARRAY_SUPPORT||this instanceof o))return new o(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return s(this,t)}return u(this,t,r,e)}function u(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?h(t,r,e,n):"string"==typeof r?c(t,r,e):p(t,r)}function a(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,r,e,n){return a(r),r<=0?i(t,r):void 0!==e?"string"==typeof n?i(t,r).fill(e,n):i(t,r).fill(e):i(t,r)}function s(t,r){if(a(r),t=i(t,r<0?0:0|d(r)),!o.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function c(t,r,e){if("string"==typeof e&&""!==e||(e="utf8"),!o.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|y(r,e);t=i(t,n);var u=t.write(r,e);return u!==n&&(t=t.slice(0,u)),t}function l(t,r){var e=r.length<0?0:0|d(r.length);t=i(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function h(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n),o.TYPED_ARRAY_SUPPORT?(t=r,t.__proto__=o.prototype):t=l(t,r),t}function p(t,r){if(o.isBuffer(r)){var e=0|d(r.length);return t=i(t,e),0===t.length?t:(r.copy(t,0,0,e),t)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||J(r.length)?i(t,0):l(t,r);if("Buffer"===r.type&&K(r.data))return l(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function d(t){if(t>=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|t}function g(t){return+t!=t&&(t=0),o.alloc(+t)}function y(t,r){if(o.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return Z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return W(t).length;default:if(n)return Z(t).length;r=(""+r).toLowerCase(),n=!0}}function m(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if(e>>>=0,r>>>=0,e<=r)return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,r,e);case"utf8":case"utf-8":return R(this,r,e);case"ascii":return C(this,r,e);case"latin1":case"binary":return B(this,r,e);case"base64":return P(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function w(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=o.from(r,n)),o.isBuffer(r))return 0===r.length?-1:b(t,r,e,n,i);if("number"==typeof r)return r&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):b(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function b(t,r,e,n,i){function o(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}var u=1,a=t.length,f=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,a/=2,f/=2,e/=2}var s;if(i){var c=-1;for(s=e;s<a;s++)if(o(t,s)===o(r,-1===c?0:s-c)){if(-1===c&&(c=s),s-c+1===f)return c*u}else-1!==c&&(s-=s-c),c=-1}else for(e+f>a&&(e=a-f),s=e;s>=0;s--){for(var l=!0,h=0;h<f;h++)if(o(t,s+h)!==o(r,h)){l=!1;break}if(l)return s}return-1}function A(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n))>i&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var a=parseInt(r.substr(2*u,2),16);if(isNaN(a))return u;t[e+u]=a}return u}function E(t,r,e,n){return q(Z(r,t.length-e),t,e,n)}function T(t,r,e,n){return q(V(r),t,e,n)}function O(t,r,e,n){return T(t,r,e,n)}function _(t,r,e,n){return q(W(r),t,e,n)}function S(t,r,e,n){return q(H(r,t.length-e),t,e,n)}function P(t,r,e){return 0===r&&e===t.length?G.fromByteArray(t):G.fromByteArray(t.slice(r,e))}function R(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o=t[i],u=null,a=o>239?4:o>223?3:o>191?2:1;if(i+a<=e){var f,s,c,l;switch(a){case 1:o<128&&(u=o);break;case 2:f=t[i+1],128==(192&f)&&(l=(31&o)<<6|63&f)>127&&(u=l);break;case 3:f=t[i+1],s=t[i+2],128==(192&f)&&128==(192&s)&&(l=(15&o)<<12|(63&f)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:f=t[i+1],s=t[i+2],c=t[i+3],128==(192&f)&&128==(192&s)&&128==(192&c)&&(l=(15&o)<<18|(63&f)<<12|(63&s)<<6|63&c)>65535&&l<1114112&&(u=l)}}null===u?(u=65533,a=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=a}return U(n)}function U(t){var r=t.length;if(r<=Q)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=Q));return e}function C(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(127&t[i]);return n}function B(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function I(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=r;o<e;++o)i+=$(t[o]);return i}function x(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function L(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function j(t,r,e,n,i,u){if(!o.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<u)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function Y(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i<o;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function D(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i<o;++i)t[e+i]=r>>>8*(n?i:3-i)&255}function N(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function M(t,r,e,n,i){return i||N(t,r,e,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(t,r,e,n,23,4),e+4}function F(t,r,e,n,i){return i||N(t,r,e,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(t,r,e,n,52,8),e+8}function z(t){if(t=k(t).replace(tt,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function k(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function $(t){return t<16?"0"+t.toString(16):t.toString(16)}function Z(t,r){r=r||1/0;for(var e,n=t.length,i=null,o=[],u=0;u<n;++u){if((e=t.charCodeAt(u))>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function V(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}function H(t,r){for(var e,n,i,o=[],u=0;u<t.length&&!((r-=2)<0);++u)e=t.charCodeAt(u),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function W(t){return G.toByteArray(z(t))}function q(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function J(t){return t!==t}var G=e(9),X=e(10),K=e(11);r.Buffer=o,r.SlowBuffer=g,r.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),r.kMaxLength=n(),o.poolSize=8192,o._augment=function(t){return t.__proto__=o.prototype,t},o.from=function(t,r,e){return u(null,t,r,e)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(t,r,e){return f(null,t,r,e)},o.allocUnsafe=function(t){return s(null,t)},o.allocUnsafeSlow=function(t){return s(null,t)},o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.compare=function(t,r){if(!o.isBuffer(t)||!o.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,u=Math.min(e,n);i<u;++i)if(t[i]!==r[i]){e=t[i],n=r[i];break}return e<n?-1:n<e?1:0},o.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(t,r){if(!K(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return o.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var n=o.allocUnsafe(r),i=0;for(e=0;e<t.length;++e){var u=t[e];if(!o.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(n,i),i+=u.length}return n},o.byteLength=y,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)v(this,r,r+1);return this},o.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)v(this,r,r+3),v(this,r+1,r+2);return this},o.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)v(this,r,r+7),v(this,r+1,r+6),v(this,r+2,r+5),v(this,r+3,r+4);return this},o.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?R(this,0,t):m.apply(this,arguments)},o.prototype.equals=function(t){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===o.compare(this,t)},o.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},o.prototype.compare=function(t,r,e,n,i){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(r>>>=0,e>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var u=i-n,a=e-r,f=Math.min(u,a),s=this.slice(n,i),c=t.slice(r,e),l=0;l<f;++l)if(s[l]!==c[l]){u=s[l],a=c[l];break}return u<a?-1:a<u?1:0},o.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},o.prototype.indexOf=function(t,r,e){return w(this,t,r,e,!0)},o.prototype.lastIndexOf=function(t,r,e){return w(this,t,r,e,!1)},o.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var i=this.length-r;if((void 0===e||e>i)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return A(this,t,r,e);case"utf8":case"utf-8":return E(this,t,r,e);case"ascii":return T(this,t,r,e);case"latin1":case"binary":return O(this,t,r,e);case"base64":return _(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;o.prototype.slice=function(t,r){var e=this.length;t=~~t,r=void 0===r?e:~~r,t<0?(t+=e)<0&&(t=0):t>e&&(t=e),r<0?(r+=e)<0&&(r=0):r>e&&(r=e),r<t&&(r=t);var n;if(o.TYPED_ARRAY_SUPPORT)n=this.subarray(t,r),n.__proto__=o.prototype;else{var i=r-t;n=new o(i,void 0);for(var u=0;u<i;++u)n[u]=this[u+t]}return n},o.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||L(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n},o.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||L(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},o.prototype.readUInt8=function(t,r){return r||L(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,r){return r||L(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,r){return r||L(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,r){return r||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,r){return r||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||L(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*r)),n},o.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||L(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*r)),o},o.prototype.readInt8=function(t,r){return r||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,r){r||L(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},o.prototype.readInt16BE=function(t,r){r||L(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},o.prototype.readInt32LE=function(t,r){return r||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,r){return r||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,r){return r||L(t,4,this.length),X.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,r){return r||L(t,4,this.length),X.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,r){return r||L(t,8,this.length),X.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,r){return r||L(t,8,this.length),X.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,r,e,n){if(t=+t,r|=0,e|=0,!n){j(this,t,r,e,Math.pow(2,8*e)-1,0)}var i=1,o=0;for(this[r]=255&t;++o<e&&(i*=256);)this[r+o]=t/i&255;return r+e},o.prototype.writeUIntBE=function(t,r,e,n){if(t=+t,r|=0,e|=0,!n){j(this,t,r,e,Math.pow(2,8*e)-1,0)}var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+e},o.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,1,255,0),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},o.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):Y(this,t,r,!0),r+2},o.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):Y(this,t,r,!1),r+2},o.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):D(this,t,r,!0),r+4},o.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):D(this,t,r,!1),r+4},o.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);j(this,t,r,e,i-1,-i)}var o=0,u=1,a=0;for(this[r]=255&t;++o<e&&(u*=256);)t<0&&0===a&&0!==this[r+o-1]&&(a=1),this[r+o]=(t/u>>0)-a&255;return r+e},o.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);j(this,t,r,e,i-1,-i)}var o=e-1,u=1,a=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===a&&0!==this[r+o+1]&&(a=1),this[r+o]=(t/u>>0)-a&255;return r+e},o.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,1,127,-128),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},o.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):Y(this,t,r,!0),r+2},o.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):Y(this,t,r,!1),r+2},o.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):D(this,t,r,!0),r+4},o.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),o.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):D(this,t,r,!1),r+4},o.prototype.writeFloatLE=function(t,r,e){return M(this,t,r,!0,e)},o.prototype.writeFloatBE=function(t,r,e){return M(this,t,r,!1,e)},o.prototype.writeDoubleLE=function(t,r,e){return F(this,t,r,!0,e)},o.prototype.writeDoubleBE=function(t,r,e){return F(this,t,r,!1,e)},o.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var i,u=n-e;if(this===t&&e<r&&r<n)for(i=u-1;i>=0;--i)t[i+r]=this[i+e];else if(u<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i<u;++i)t[i+r]=this[i+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+u),r);return u},o.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!o.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0);var u;if("number"==typeof t)for(u=r;u<e;++u)this[u]=t;else{var a=o.isBuffer(t)?t:Z(new o(t,n).toString()),f=a.length;for(u=0;u<e-r;++u)this[u+r]=a[u%f]}return this};var tt=/[^+\/0-9A-Za-z-_]/g}).call(r,e(8))},function(t,r,e){"use strict";var n,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"===("undefined"==typeof window?"undefined":i(window))&&(n=window)}t.exports=n},function(t,r,e){"use strict";function n(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[r-2]?2:"="===t[r-1]?1:0}function i(t){return 3*t.length/4-n(t)}function o(t){var r,e,i,o,u,a=t.length;o=n(t),u=new l(3*a/4-o),e=o>0?a-4:a;var f=0;for(r=0;r<e;r+=4)i=c[t.charCodeAt(r)]<<18|c[t.charCodeAt(r+1)]<<12|c[t.charCodeAt(r+2)]<<6|c[t.charCodeAt(r+3)],u[f++]=i>>16&255,u[f++]=i>>8&255,u[f++]=255&i;return 2===o?(i=c[t.charCodeAt(r)]<<2|c[t.charCodeAt(r+1)]>>4,u[f++]=255&i):1===o&&(i=c[t.charCodeAt(r)]<<10|c[t.charCodeAt(r+1)]<<4|c[t.charCodeAt(r+2)]>>2,u[f++]=i>>8&255,u[f++]=255&i),u}function u(t){return s[t>>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}function a(t,r,e){for(var n,i=[],o=r;o<e;o+=3)n=(t[o]<<16)+(t[o+1]<<8)+t[o+2],i.push(u(n));return i.join("")}function f(t){for(var r,e=t.length,n=e%3,i="",o=[],u=0,f=e-n;u<f;u+=16383)o.push(a(t,u,u+16383>f?f:u+16383));return 1===n?(r=t[e-1],i+=s[r>>2],i+=s[r<<4&63],i+="=="):2===n&&(r=(t[e-2]<<8)+t[e-1],i+=s[r>>10],i+=s[r>>4&63],i+=s[r<<2&63],i+="="),o.push(i),o.join("")}r.byteLength=i,r.toByteArray=o,r.fromByteArray=f;for(var s=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,d=h.length;p<d;++p)s[p]=h[p],c[h.charCodeAt(p)]=p;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},function(t,r,e){"use strict";r.read=function(t,r,e,n,i){var o,u,a=8*i-n-1,f=(1<<a)-1,s=f>>1,c=-7,l=e?i-1:0,h=e?-1:1,p=t[r+l];for(l+=h,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+t[r+l],l+=h,c-=8);for(u=o&(1<<-c)-1,o>>=-c,c+=n;c>0;u=256*u+t[r+l],l+=h,c-=8);if(0===o)o=1-s;else{if(o===f)return u?NaN:1/0*(p?-1:1);u+=Math.pow(2,n),o-=s}return(p?-1:1)*u*Math.pow(2,o-n)},r.write=function(t,r,e,n,i,o){var u,a,f,s=8*o-i-1,c=(1<<s)-1,l=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(a=isNaN(r)?1:0,u=c):(u=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-u))<1&&(u--,f*=2),r+=u+l>=1?h/f:h*Math.pow(2,1-l),r*f>=2&&(u++,f/=2),u+l>=c?(a=0,u=c):u+l>=1?(a=(r*f-1)*Math.pow(2,i),u+=l):(a=r*Math.pow(2,l-1)*Math.pow(2,i),u=0));i>=8;t[e+p]=255&a,p+=d,a/=256,i-=8);for(u=u<<i|a,s+=i;s>0;t[e+p]=255&u,p+=d,u/=256,s-=8);t[e+p-d]|=128*g}},function(t,r,e){"use strict";var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,r,e){"use strict";(function(r){var n=e(2),i=e(0),o={};o.commonjsEnv=function(){return void 0!==r},o.commonjsEnv.multiple=!1,o.browserEnv=function(){return"undefined"!=typeof window},o.browserEnv.multiple=!1,o.amdEnv=function(){return e(14)},o.amdEnv.multiple=!1,o.ios=function(){for(var t=arguments.length,r=Array(t),e=0;e<t;e++)r[e]=arguments[e];return/iphone|ipad|ipod/i.test(n.getUserAgent.apply(void 0,r))},o.ios.multiple=!1,o.iphone=function(){for(var t=arguments.length,r=Array(t),e=0;e<t;e++)r[e]=arguments[e];return/iphone/i.test(n.getUserAgent.apply(void 0,r))},o.iphone.multiple=!1,o.ipad=function(){for(var t=arguments.length,r=Array(t),e=0;e<t;e++)r[e]=arguments[e];return/ipad/i.test(n.getUserAgent.apply(void 0,r))},o.ipad.multiple=!1,o.ipod=function(){for(var t=arguments.length,r=Array(t),e=0;e<t;e++)r[e]=arguments[e];return/ipod/i.test(n.getUserAgent.apply(void 0,r))},o.ipod.multiple=!1,o.android=function(){for(var t=arguments.length,r=Array(t),e=0;e<t;e++)r[e]=arguments[e];return/Android/i.test(n.getUserAgent.apply(void 0,r))},o.android.multiple=!1,o.navigator=function(){return o.browserEnv()&&void 0!==window.navigator},o.navigator.multiple=!1,o.firefox=function(){for(var t=arguments.length,r=Array(t),e=0;e<t;e++)r[e]=arguments[e];return/Firefox/i.test(n.getUserAgent.apply(void 0,r))},o.firefox.multiple=!1,o.chrome=function(){for(var t=arguments.length,r=Array(t),e=0;e<t;e++)r[e]=arguments[e];return/Chrome/i.test(n.getUserAgent.apply(void 0,r))},o.chrome.multiple=!1,o.safari=function(){for(var t=arguments.length,r=Array(t),e=0;e<t;e++)r[e]=arguments[e];var i=n.getUserAgent.apply(void 0,r);return/Safari/i.test(i.replace("Chrome",""))&&!/Chrome/i.test(i.replace("Safari",""))},o.safari.multiple=!1,o.ie=function(){for(var t=arguments.length,r=Array(t),e=0;e<t;e++)r[e]=arguments[e];return/MSIE|Trident/i.test(n.getUserAgent.apply(void 0,r))},o.ie.multiple=!1,o.mac=function(){for(var t=arguments.length,r=Array(t),e=0;e<t;e++)r[e]=arguments[e];return/mac/i.test(n.getUserAgent.apply(void 0,r))},o.mac.multiple=!1,o.onLine=function(){return o.navigator()&&navigator.onLine},o.onLine.multiple=!1,o=i.create(o),t.exports=o}).call(r,e(13))},function(t,r,e){"use strict";function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(r){try{return l.call(null,t,0)}catch(r){return l.call(this,t,0)}}}function u(t){if(h===clearTimeout)return clearTimeout(t);if((h===i||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(r){try{return h.call(null,t)}catch(r){return h.call(this,t)}}}function a(){y&&d&&(y=!1,d.length?g=d.concat(g):m=-1,g.length&&f())}function f(){if(!y){var t=o(a);y=!0;for(var r=g.length;r;){for(d=g,g=[];++m<r;)d&&d[m].run();m=-1,r=g.length}d=null,y=!1,u(t)}}function s(t,r){this.fun=t,this.array=r}function c(){}var l,h,p=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(t){l=n}try{h="function"==typeof clearTimeout?clearTimeout:i}catch(t){h=i}}();var d,g=[],y=!1,m=-1;p.nextTick=function(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];g.push(new s(t,r)),1!==g.length||y||o(f)},s.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=c,p.addListener=c,p.once=c,p.off=c,p.removeListener=c,p.removeAllListeners=c,p.emit=c,p.prependListener=c,p.prependOnceListener=c,p.listeners=function(t){return[]},p.binding=function(t){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(t){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(t,r){(function(r){t.exports=r}).call(r,{})},function(t,r,e){"use strict";var n=e(1),i=e(0),o={};o.propertyOf=function(t,r){return!!n.object(r)&&r.hasOwnProperty(t)},o.propertyOf.multiple=!1,o.propertyCount=function(t,r){if(!n.object(t)||!n.number(r))return!1;var e=0;for(var i in t)if(t.hasOwnProperty(i)&&++e>r)return!1;return e===r},o.propertyCount.multiple=!1,o=i.create(o),t.exports=o},function(t,r,e){"use strict";var n=e(1),i=e(0),o={};o.email=function(t){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t)},o.hex=function(t){return/^(?:0x)?[a-f0-9]+$/.test(t)},o.hexColor=function(t){try{return t=t.replace("#",""),o.hex(t)&&(3===t.length||6===t.length)}catch(t){return!1}},o.ipv4=function(t){return/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(t)},o.ipv6=function(t){return/^(([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))$/.test(t)},o.ip=function(t){return o.ipv4(t)||o.ipv6(t)},o.base64=function(t){return/^([0-9a-zA-Z+\/]{4})*(([0-9a-zA-Z+\/]{2}==)|([0-9a-zA-Z+\/]{3}=))?$/.test(t)},o.semVer=function(t){return/^(\d*)\.(\d*)\.(\d*)(-(\d*|\d*[a-z-][0-9a-z-]*)(\.(\d*|\d*[a-z-][0-9a-z-]*))*)?(\+[0-9a-z-]+(\.[0-9a-z-]+)*)?$/i.test(t)},o.equal=function(t,r){if(console.log("ccc",n.all.number(t,r)),n.all.number(t,r))return t===r&&1/t==1/r;if(n.all.string(t,r)||n.all.regexp(t,r))return t.toString()===r.toString();if(n.all.boolean(t,r))return t===r;if(n.all.object(t,r)||n.all.array(t,r)){if(console.log("sss",n.all.array(t,r)),Object.keys(t).length!==Object.keys(r).length)return!1;for(var e in t){if(!t.hasOwnProperty(e)||!r.hasOwnProperty(e))return!1;if(!o.equal(t[e],r[e]))return!1}return!0}return!1},o.equal.multiple=!1,o.fiscalCodeIT=function(t){return/^[A-Za-z]{6}[0-9]{2}[A-Za-z]{1}[0-9]{2}[A-Za-z]{1}[0-9]{3}[A-Za-z]{1}$/.test(t)},o.macAddress=function(t){return/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/.test(t)},o=i.create(o),t.exports=o},function(t,r,e){"use strict";var n=e(1),i=e(0),o={};o.inArray=function(t,r){if(!n.array(r))return!1;for(var e in r)if(r.hasOwnProperty(e)&&r[e]===t)return!0;return!1},o.inArray.multiple=!1,o.arrayOfStrings=function(t){return n.all.string(t)},o.arrayOfObjects=function(t){return n.all.object(t)},o.arrayOfBooleans=function(t){return n.all.boolean(t)},o.arrayOfNumbers=function(t){return n.all.number(t)},o.arrayOfDates=function(t){return n.all.date(t)},o.arrayOfFunctions=function(t){return n.all.function(t)},o=i.create(o),t.exports=o},function(t,r,e){"use strict";var n=e(1),i=e(3),o=e(0),u={},a=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],f=["january","february","march","april","may","june","july","august","september","october","november","december"];u.dateString=function(t){var r=Date.parse(t);return!isNaN(r)},u.timeString=function(t){return/^(?:(?:([01]?\d|2[0-3]):)?([0-5]?\d):)?([0-5]?\d)$/.test(t)},u.today=function(t){var r=new Date;return n.date(t)&&r.toDateString()===t.toDateString()},u.tomorrow=function(t){var r=new Date;return r.setDate(r.getDate()+1),n.date(t)&&r.toDateString()===t.toDateString()},u.yesterday=function(t){var r=new Date;return r.setDate(r.getDate()-1),n.date(t)&&r.toDateString()===t.toDateString()},u.past=function(t){var r=(new Date).getTime();return n.date(t)&&r>t.getTime()},u.future=function(t){return n.date(t)&&!u.past(t)},u.day=function(t,r){return n.date(t)&&n.string(r)&&a[t.getDay()]===r.toLowerCase()},u.day.multiple=!1,u.month=function(t,r){return n.date(t)&&n.string(r)&&f[t.getMonth()]===r.toLowerCase()},u.month.multiple=!1,u.year=function(t,r){return n.date(t)&&n.number(r)&&t.getFullYear()===r},u.year.multiple=!1,u.leapYear=function(t){return n.number(t)&&t%4==0&&t%100!=0||t%400==0},u.weekend=function(t){return u.day(t,"saturday")||u.day(t,"sunday")},u.weekday=function(t){return n.date(t)&&!u.weekend(t)},u.numberInWeek=function(t){return n.number(t)&&i.between(t,0,6)},u.dateBetween=function(t,r,e){return n.all.date(t,r,e)&&i.between(t.getTime(),r.getTime(),e.getTime())},u.dateBetween.multiple=!1,u.dayLightSavingTime=function(t){if(!n.date(t))return!1;var r=new Date(t.getFullYear(),0,1),e=new Date(t.getFullYear(),6,1),i=Math.max(r.getTimezoneOffset(),e.getTimezoneOffset());return t.getTimezoneOffset()<i},u=o.create(u),t.exports=u},function(t,r,e){"use strict";var n=e(0),i={};i.url=function(t){return/^(?:(?:https?|ftps?):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,}))\.?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(t)},i.httpUrl=function(t){return i.url(t)&&/^http:/i.test(t)},i.httpsUrl=function(t){return i.url(t)&&/^https:/i.test(t)},i.urlEncoded=function(t){return/%[0-9a-f]{2}/i.test(t)},i.ftpUrl=function(t){return i.url(t)&&/^ftp:/i.test(t)},i.ftpsUrl=function(t){return i.url(t)&&/^ftps:/i.test(t)},i.domain=function(t){return/\b((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}\b/.test(t)},i=n.create(i),t.exports=i},function(t,r,e){"use strict";var n=e(0),i={};i.md5=function(t){return/^[a-f0-9]{32}$/i.test(t)},i.sha1=function(t){return/^[a-f0-9]{40}$/i.test(t)},i=n.create(i),t.exports=i},function(t,r,e){"use strict";var n=e(0),i={};i.creditCard=function(t){return/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test(t)},i.amex=function(t){return/^3[47][0-9]{13}$/.test(t)},i.dinersClub=function(t){return/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/.test(t)},i.discover=function(t){return/^6(?:011|5[0-9]{2})[0-9]{12}$/.test(t)},i.mastercard=function(t){return/^5[1-5][0-9]{14}$/.test(t)},i.visa=function(t){return/^4[0-9]{12}(?:[0-9]{3})?$/.test(t)},i=n.create(i),t.exports=i},function(t,r,e){"use strict";var n=e(0),i={};i.postalCodeES=function(t){return/^([1-9]{2}|[0-9][1-9]|[1-9][0-9])[0-9]{3}$/.test(t)},i.postalCodeUK=function(t){return/^[A-Z]{1,2}[0-9RCHNQ][0-9A-Z]?\s?[0-9][ABD-HJLNP-UW-Z]{2}$|^[A-Z]{2}-?[0-9]{4}$/.test(t)},i.postalCodeUS=function(t){return/(\d{5}([\-]\d{4})?)$/.test(t)},i.postalCodeIT=function(t){return/^\d{5}$/.test(t)},i.postalCodeDE=function(t){return/\b((?:0[1-46-9]\d{3})|(?:[1-357-9]\d{4})|(?:[4][0-24-9]\d{3})|(?:[6][013-9]\d{3}))\b/.test(t)},i.postalCodeNL=function(t){return/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(t)},i=n.create(i),t.exports=i},function(t,r,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=e(0),o=e(1),u={};u.domElement=function(t){return"object"===("undefined"==typeof HTMLElement?"undefined":n(HTMLElement))?t instanceof HTMLElement:t&&"object"===(void 0===t?"undefined":n(t))&&1===t.nodeType&&"string"==typeof t.nodeName},u.domElementTag=function(t,r){return u.domElement(t)&&o.string(r)&&t.tagName.toLowerCase()===r.toLowerCase()},u.domElementTag.multiple=!1,u=i.create(u),t.exports=u},function(t,r){t.exports={name:"bejs",version:"1.5.0",description:"Simple, light-weight assertions framework for javascript",homepage:"https://be.js.org",main:"index.js",scripts:{"version:major":"webpack --env.major && npm run-script doc && version-to-tag.sh && npm publish","version:minor":"webpack --env.minor && npm run-script doc && version-to-tag.sh && npm publish","version:patch":"webpack --env.patch && npm run-script doc && version-to-tag.sh && npm publish",build:"webpack --progress",doc:"./node_modules/.bin/jsdoc --configure .jsdoc.json --verbose",test:"istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"},keywords:["asserts","test","is","boolean","url","number","string","email","object","check","float","alphanumeric"],author:{name:"Fabio Ricali",email:"fabio@rica.li"},contributors:[{name:"Davide Polano",email:"info@mdslab.org"}],license:"MIT",devDependencies:{"babel-core":"^6.25.0","babel-loader":"^7.1.0","babel-preset-es2015":"^6.24.1",coveralls:"^2.13.1",docdash:"^0.4.0",istanbul:"^0.4.5",jsdoc:"^3.4.3",jsdom:"^11.0.0",minami:"^1.2.3",mocha:"^3.4.2","mocha-lcov-reporter":"^1.3.0","unminified-webpack-plugin":"^1.2.0",webpack:"^3.0.0","webpack-auto-inject-version":"^0.5.14"},repository:{type:"git",url:"https://github.com/fabioricali/beJS"}}}]); | ||
// [AIV] beJS Build version: 1.6.0 | ||
var be=function(t){function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}var e={};return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},r.p="",r(r.s=5)}([function(t,r,e){"use strict";var n=e(2),i={};i._isArray=function(t){return"[object Array]"===n.objectToString(t)},i.create=function(t){t.all={},t.any={},t.not={};for(var r in t)!function(r){t.hasOwnProperty(r)&&"function"==typeof t[r]&&(t.not[r]=function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];return!t[r].apply(void 0,n)},void 0===t[r].multiple&&(t.all[r]=function(){for(var e=arguments.length,n=Array(e),o=0;o<e;o++)n[o]=arguments[o];var u=n;if(i._isArray(u[0])&&1===u.length&&(u=u[0]),!u.length)return!1;for(var a in u)if(u.hasOwnProperty(a)&&!t[r].call(void 0,u[a]))return!1;return!0},t.any[r]=function(){for(var e=arguments.length,n=Array(e),o=0;o<e;o++)n[o]=arguments[o];var u=n;i._isArray(u[0])&&1===u.length&&(u=u[0]);for(var a in u)if(u.hasOwnProperty(a)&&t[r].call(void 0,u[a]))return!0;return!1}))}(r);return t},t.exports=i},function(t,r,e){"use strict";(function(r){var n=e(2),i=e(0),o={};o.classOf=function(t,r){return n.objectToString(t).toLowerCase()==="[object "+r+"]".toLowerCase()},o.classOf.multiple=!1,o.boolean=function(t){return o.classOf(t,"boolean")},o.booleanFalse=function(t){return o.false(t)},o.false=function(t){return o.boolean(t)&&!1===t},o.booleanTrue=function(t){return o.true(t)},o.true=function(t){return o.boolean(t)&&!0===t},o.number=function(t){return o.classOf(t,"number")&&!isNaN(t)},o.string=function(t){return o.classOf(t,"string")},o.undefined=function(t){return o.classOf(t,"undefined")},o.null=function(t){return o.classOf(t,"null")},o.object=function(t){return o.classOf(t,"object")&&!o.array(t)},o.array=function(t){return o.classOf(t,"array")},o.json=function(t){try{return!!JSON.parse(t)}catch(t){return!1}},o.date=function(t){return o.classOf(t,"date")},o.function=function(t){return o.classOf(t,"function")},o.regexp=function(t){return o.classOf(t,"regexp")},o.sameType=function(t,r){return n.objectToString(t)===n.objectToString(r)},o.sameType.multiple=!1,o.empty=function(t){if(o.null(t)||o.undefined(t))return!0;if(o.number(t)||o.function(t)||o.boolean(t))return!1;if(o.object(t)||o.array(t)){if(t.length>0)return!1;if(0===t.length)return!0;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))return!1}return!(o.string(t)&&t.length>0)},o.falsy=function(t){return!t},o.truthy=function(t){return!o.falsy(t)},o.error=function(t){return o.classOf(t,"error")},o.argument=function(t){return o.classOf(t,"arguments")||o.object(t)&&"callee"in t},o.primitive=function(t){return t!==Object(t)},o.promise=function(t){return o.classOf(t,"promise")},o.buffer=function(t){return r&&t instanceof r},o.iterable=function(t){return o.function(t[Symbol.iterator])},o.symbol=function(t){return!o.undefined(Symbol)&&o.classOf(t,"symbol")},o.defined=function(t){return!o.undefined(t)},o.oSet=function(t){return o.classOf(t,"set")},o.weakSet=function(t){return o.classOf(t,"weakset")},o.map=function(t){return o.classOf(t,"map")},o.weakMap=function(t){return o.classOf(t,"weakmap")},o.mapIterator=function(t){return o.classOf(t,"map iterator")},o.setIterator=function(t){return o.classOf(t,"set iterator")},o.int8Array=function(t){return o.classOf(t,"int8array")},o.uint8Array=function(t){return o.classOf(t,"uint8array")},o.uint8ClampedArray=function(t){return o.classOf(t,"uint8clampedarray")},o.int16Array=function(t){return o.classOf(t,"int16array")},o.uint16Array=function(t){return o.classOf(t,"uint16array")},o.int32Array=function(t){return o.classOf(t,"int32array")},o.uint32Array=function(t){return o.classOf(t,"uint32array")},o.float32Array=function(t){return o.classOf(t,"float32array")},o.float64Array=function(t){return o.classOf(t,"float64array")},o=i.create(o),t.exports=o}).call(r,e(8).Buffer)},function(t,r,e){"use strict";var n={};n.getUserAgent=function(){if(arguments.length)return arguments.length<=0?void 0:arguments[0];if("undefined"==typeof window||void 0===window.navigator)throw new Error("test allowed only in browser environment");return navigator.userAgent},n.objectToString=function(t){return Object.prototype.toString.call(t)},n.getEditDistance=function(t,r){if(0===t.length)return r.length;if(0===r.length)return t.length;var e=[],n=void 0;for(n=0;n<=r.length;n++)e[n]=[n];var i=void 0;for(i=0;i<=t.length;i++)e[0][i]=i;for(n=1;n<=r.length;n++)for(i=1;i<=t.length;i++)r.charAt(n-1)===t.charAt(i-1)?e[n][i]=e[n-1][i-1]:e[n][i]=Math.min(e[n-1][i-1]+1,Math.min(e[n][i-1]+1,e[n-1][i]+1));return e[r.length][t.length]},n.comparators={"==":function(t,r){return 0===n.compareVersions(t,r)},"<":function(t,r){return n.compareVersions(t,r)<0},"<=":function(t,r){return n.compareVersions(t,r)<=0},">":function(t,r){return n.compareVersions(t,r)>0},">=":function(t,r){return n.compareVersions(t,r)>=0}},n.compareVersions=function(t,r){for(var e=void 0,n=/(\.0+)+$/,i=t.replace(n,"").split("."),o=r.replace(n,"").split("."),u=Math.min(i.length,o.length),a=0;a<u;a++)if(e=parseInt(i[a],10)-parseInt(o[a],10))return e;return i.length-o.length},n.operatorVersion=function(t){if(!t)return!1;var r=t.match(/(==|<=?|>=?)(?:\s+)?(\d+((\.\d+)+)?)?/);return!!r&&[r[1],r[2]]},t.exports=n},function(t,r,e){"use strict";var n=e(1),i=e(0),o={};o.int=function(t){return n.number(t)&&isFinite(t)&&Math.floor(t)===t},o.float=function(t){return n.number(t)&&!o.int(t)},o.nan=function(t){return isNaN(t)},o.even=function(t){return n.number(t)&&t%2==0},o.odd=function(t){return n.number(t)&&!o.even(t)},o.positive=function(t){return n.number(t)&&(t>0||o.positiveZero(t))},o.negative=function(t){return n.number(t)&&(t<0||o.negativeZero(t))},o.negativeZero=function(t){return n.number(t)&&0===t&&1/t===Number.NEGATIVE_INFINITY},o.positiveZero=function(t){return n.number(t)&&0===t&&1/t===Number.POSITIVE_INFINITY},o.infinity=function(t){return o.infinityPositive(t)||o.infinityNegative(t)},o.infinityPositive=function(t){return t===Number.POSITIVE_INFINITY},o.infinityNegative=function(t){return t===Number.NEGATIVE_INFINITY},o.between=function(t,r,e){return n.all.number(t,r,e)&&t>=r&&t<=e},o.between.multiple=!1,o.greater=function(t,r){return n.all.number(t,r)&&t>r},o.greater.multiple=!1,o.lesser=function(t,r){return n.all.number(t,r)&&t<r},o.lesser.multiple=!1,o.numeric=function(t){return(n.number(t)||n.string(t))&&!isNaN(t-parseFloat(t))},o=i.create(o),t.exports=o},function(t,r,e){"use strict";var n=e(2),i=e(1),o=e(0),u={};u.email=function(t){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t)},u.hex=function(t){return/^(?:0x)?[a-f0-9]+$/.test(t)},u.hexColor=function(t){try{return t=t.replace("#",""),u.hex(t)&&(3===t.length||6===t.length)}catch(t){return!1}},u.ipv4=function(t){return/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(t)},u.ipv6=function(t){return/^(([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))$/.test(t)},u.ip=function(t){return u.ipv4(t)||u.ipv6(t)},u.base64=function(t){return/^([0-9a-zA-Z+\/]{4})*(([0-9a-zA-Z+\/]{2}==)|([0-9a-zA-Z+\/]{3}=))?$/.test(t)},u.semVer=function(t){return/^(\d*)\.(\d*)\.(\d*)(-(\d*|\d*[a-z-][0-9a-z-]*)(\.(\d*|\d*[a-z-][0-9a-z-]*))*)?(\+[0-9a-z-]+(\.[0-9a-z-]+)*)?$/i.test(t)},u.equal=function(t,r){if(console.log("ccc",i.all.number(t,r)),i.all.number(t,r))return t===r&&1/t==1/r;if(i.all.string(t,r)||i.all.regexp(t,r))return t.toString()===r.toString();if(i.all.boolean(t,r))return t===r;if(i.all.object(t,r)||i.all.array(t,r)){if(console.log("sss",i.all.array(t,r)),Object.keys(t).length!==Object.keys(r).length)return!1;for(var e in t){if(!t.hasOwnProperty(e)||!r.hasOwnProperty(e))return!1;if(!u.equal(t[e],r[e]))return!1}return!0}return!1},u.equal.multiple=!1,u.fiscalCodeIT=function(t){return/^[A-Za-z]{6}[0-9]{2}[A-Za-z]{1}[0-9]{2}[A-Za-z]{1}[0-9]{3}[A-Za-z]{1}$/.test(t)},u.macAddress=function(t){return/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/.test(t)},u.compareVersion=function(t,r,e,i){return i&&(t=t.split(".")[0],e=e.split(".")[0]),n.comparators[r](t,e)},u=o.create(u),t.exports=u},function(t,r,e){"use strict";t.exports=e(6)},function(t,r,e){"use strict";var n=e(2),i=e(0),o={};o._helpers=n;var u={Strings:e(7),Types:e(1),Numbers:e(3),Envs:e(13),Objects:e(16),Mixed:e(4),Arrays:e(17),Dates:e(18),Urls:e(19),Hashes:e(20),CreditCards:e(21),PostalCodes:e(22),DOM:e(23)};o.getVersion=function(){return u.Envs.commonjsEnv()?e(24).version:"1.6.0"},o.set=function(t,r){o[t]=r},function(){for(var r in u)!function(t){if(u.hasOwnProperty(t)){for(var r in u[t])!function(r){u[t].hasOwnProperty(r)&&u.Types.function(u[t][r])&&(o[r]=function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];return u[t][r].apply(null,n)})}(r)}}(r);o=i.create(o);for(var e in u)u.hasOwnProperty(e)&&(o[e]=u[e]);t.exports=o}()},function(t,r,e){"use strict";var n=e(2),i=e(0),o=e(1),u={};u.camelCase=function(t){return o.string(t)&&!u.upperCase(t)&&u.alphanumeric(t)&&u.spaces(t.replace(/([A-Z])/g," $1"))},u.snakeCase=function(t){return u.lowerCase(t)&&/^[0-9a-z]*_[0-9a-z]/gi.test(t)},u.kebabCase=function(t){return u.lowerCase(t)&&/^[0-9a-z]*-[0-9a-z]/gi.test(t)},u.similarity=function(t,r,e){if(!o.all.string(t,r))return!1;(!o.number(e)||e<0||e>1)&&(e=1);var i=t,u=r;t.length<r.length&&(i=r,u=t);var a=i.length;return(a-n.getEditDistance(i,u))/parseFloat(a)>=e},u.similarity.multiple=!1,u.contains=function(t,r){return!!o.string(t)&&t.indexOf(r)>-1},u.contains.multiple=!1,u.lowerCase=function(t){return!!o.string(t)&&t.toLowerCase()===t},u.upperCase=function(t){return!!o.string(t)&&t.toUpperCase()===t},u.word=function(t){if(!o.string(t))return!1;var r=t.trim();return r.length>0&&1===r.split(" ").length},u.capitalized=function(t){if(!o.string(t))return!1;if(0===t.trim().length)return!1;var r=t.trim().split(" ");for(var e in r){var n=r[e].charAt(0);if(n!==n.toUpperCase())return!1}return!0},u.emptyString=function(t){return o.string(t)&&0===t.length},u.alphanumeric=function(t){return/^[a-z0-9]+$/i.test(t)&&o.string(t)},u.startWith=function(t,r,e){return o.any.string(t,r)||(t+="",r+=""),o.truthy(e)&&(t=t.toLocaleLowerCase(),r=r.toLocaleLowerCase()),0===r.indexOf(t)},u.startWith.multiple=!1,u.endWith=function(t,r,e){o.any.string(t,r)||(t+="",r+=""),o.truthy(e)&&(t=t.toLocaleLowerCase(),r=r.toLocaleLowerCase());var n=r.length-t.length;return n>=0&&r.indexOf(t,n)===n},u.endWith.multiple=!1,u.palindrome=function(t){return!!o.string(t)&&(t=t.replace(/\s/g,"").toLowerCase())===t.split("").reverse().join("")},u.char=function(t){return o.string(t)&&1===t.length},u.space=function(t){return u.char(t)&&/\s/.test(t)},u.spaces=function(t){return/\s/.test(t)},u=i.create(u),t.exports=u},function(t,r,e){"use strict";(function(t){function n(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(t,r){if(n()<r)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r),t.__proto__=o.prototype):(null===t&&(t=new o(r)),t.length=r),t}function o(t,r,e){if(!(o.TYPED_ARRAY_SUPPORT||this instanceof o))return new o(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return u(this,t,r,e)}function u(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?h(t,r,e,n):"string"==typeof r?c(t,r,e):p(t,r)}function a(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function s(t,r,e,n){return a(r),r<=0?i(t,r):void 0!==e?"string"==typeof n?i(t,r).fill(e,n):i(t,r).fill(e):i(t,r)}function f(t,r){if(a(r),t=i(t,r<0?0:0|d(r)),!o.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function c(t,r,e){if("string"==typeof e&&""!==e||(e="utf8"),!o.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|y(r,e);t=i(t,n);var u=t.write(r,e);return u!==n&&(t=t.slice(0,u)),t}function l(t,r){var e=r.length<0?0:0|d(r.length);t=i(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function h(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n),o.TYPED_ARRAY_SUPPORT?(t=r,t.__proto__=o.prototype):t=l(t,r),t}function p(t,r){if(o.isBuffer(r)){var e=0|d(r.length);return t=i(t,e),0===t.length?t:(r.copy(t,0,0,e),t)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||J(r.length)?i(t,0):l(t,r);if("Buffer"===r.type&&K(r.data))return l(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function d(t){if(t>=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|t}function g(t){return+t!=t&&(t=0),o.alloc(+t)}function y(t,r){if(o.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return H(t).length;default:if(n)return V(t).length;r=(""+r).toLowerCase(),n=!0}}function m(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if(e>>>=0,r>>>=0,e<=r)return"";for(t||(t="utf8");;)switch(t){case"hex":return U(this,r,e);case"utf8":case"utf-8":return R(this,r,e);case"ascii":return B(this,r,e);case"latin1":case"binary":return I(this,r,e);case"base64":return _(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function w(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=o.from(r,n)),o.isBuffer(r))return 0===r.length?-1:b(t,r,e,n,i);if("number"==typeof r)return r&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):b(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function b(t,r,e,n,i){function o(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}var u=1,a=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,a/=2,s/=2,e/=2}var f;if(i){var c=-1;for(f=e;f<a;f++)if(o(t,f)===o(r,-1===c?0:f-c)){if(-1===c&&(c=f),f-c+1===s)return c*u}else-1!==c&&(f-=f-c),c=-1}else for(e+s>a&&(e=a-s),f=e;f>=0;f--){for(var l=!0,h=0;h<s;h++)if(o(t,f+h)!==o(r,h)){l=!1;break}if(l)return f}return-1}function A(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n))>i&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var a=parseInt(r.substr(2*u,2),16);if(isNaN(a))return u;t[e+u]=a}return u}function E(t,r,e,n){return q(V(r,t.length-e),t,e,n)}function T(t,r,e,n){return q(Z(r),t,e,n)}function O(t,r,e,n){return T(t,r,e,n)}function S(t,r,e,n){return q(H(r),t,e,n)}function P(t,r,e,n){return q(W(r,t.length-e),t,e,n)}function _(t,r,e){return 0===r&&e===t.length?G.fromByteArray(t):G.fromByteArray(t.slice(r,e))}function R(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o=t[i],u=null,a=o>239?4:o>223?3:o>191?2:1;if(i+a<=e){var s,f,c,l;switch(a){case 1:o<128&&(u=o);break;case 2:s=t[i+1],128==(192&s)&&(l=(31&o)<<6|63&s)>127&&(u=l);break;case 3:s=t[i+1],f=t[i+2],128==(192&s)&&128==(192&f)&&(l=(15&o)<<12|(63&s)<<6|63&f)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:s=t[i+1],f=t[i+2],c=t[i+3],128==(192&s)&&128==(192&f)&&128==(192&c)&&(l=(15&o)<<18|(63&s)<<12|(63&f)<<6|63&c)>65535&&l<1114112&&(u=l)}}null===u?(u=65533,a=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=a}return C(n)}function C(t){var r=t.length;if(r<=Q)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=Q));return e}function B(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(127&t[i]);return n}function I(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function U(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=r;o<e;++o)i+=$(t[o]);return i}function x(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function L(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function j(t,r,e,n,i,u){if(!o.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<u)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function Y(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i<o;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function D(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i<o;++i)t[e+i]=r>>>8*(n?i:3-i)&255}function M(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function N(t,r,e,n,i){return i||M(t,r,e,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(t,r,e,n,23,4),e+4}function F(t,r,e,n,i){return i||M(t,r,e,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(t,r,e,n,52,8),e+8}function k(t){if(t=z(t).replace(tt,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function z(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function $(t){return t<16?"0"+t.toString(16):t.toString(16)}function V(t,r){r=r||1/0;for(var e,n=t.length,i=null,o=[],u=0;u<n;++u){if((e=t.charCodeAt(u))>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function Z(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}function W(t,r){for(var e,n,i,o=[],u=0;u<t.length&&!((r-=2)<0);++u)e=t.charCodeAt(u),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function H(t){return G.toByteArray(k(t))}function q(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function J(t){return t!==t}var G=e(10),X=e(11),K=e(12);r.Buffer=o,r.SlowBuffer=g,r.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),r.kMaxLength=n(),o.poolSize=8192,o._augment=function(t){return t.__proto__=o.prototype,t},o.from=function(t,r,e){return u(null,t,r,e)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(t,r,e){return s(null,t,r,e)},o.allocUnsafe=function(t){return f(null,t)},o.allocUnsafeSlow=function(t){return f(null,t)},o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.compare=function(t,r){if(!o.isBuffer(t)||!o.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,u=Math.min(e,n);i<u;++i)if(t[i]!==r[i]){e=t[i],n=r[i];break}return e<n?-1:n<e?1:0},o.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(t,r){if(!K(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return o.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var n=o.allocUnsafe(r),i=0;for(e=0;e<t.length;++e){var u=t[e];if(!o.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(n,i),i+=u.length}return n},o.byteLength=y,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)v(this,r,r+1);return this},o.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)v(this,r,r+3),v(this,r+1,r+2);return this},o.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)v(this,r,r+7),v(this,r+1,r+6),v(this,r+2,r+5),v(this,r+3,r+4);return this},o.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?R(this,0,t):m.apply(this,arguments)},o.prototype.equals=function(t){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===o.compare(this,t)},o.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},o.prototype.compare=function(t,r,e,n,i){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(r>>>=0,e>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var u=i-n,a=e-r,s=Math.min(u,a),f=this.slice(n,i),c=t.slice(r,e),l=0;l<s;++l)if(f[l]!==c[l]){u=f[l],a=c[l];break}return u<a?-1:a<u?1:0},o.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},o.prototype.indexOf=function(t,r,e){return w(this,t,r,e,!0)},o.prototype.lastIndexOf=function(t,r,e){return w(this,t,r,e,!1)},o.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var i=this.length-r;if((void 0===e||e>i)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return A(this,t,r,e);case"utf8":case"utf-8":return E(this,t,r,e);case"ascii":return T(this,t,r,e);case"latin1":case"binary":return O(this,t,r,e);case"base64":return S(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;o.prototype.slice=function(t,r){var e=this.length;t=~~t,r=void 0===r?e:~~r,t<0?(t+=e)<0&&(t=0):t>e&&(t=e),r<0?(r+=e)<0&&(r=0):r>e&&(r=e),r<t&&(r=t);var n;if(o.TYPED_ARRAY_SUPPORT)n=this.subarray(t,r),n.__proto__=o.prototype;else{var i=r-t;n=new o(i,void 0);for(var u=0;u<i;++u)n[u]=this[u+t]}return n},o.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||L(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n},o.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||L(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},o.prototype.readUInt8=function(t,r){return r||L(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,r){return r||L(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,r){return r||L(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,r){return r||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,r){return r||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||L(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*r)),n},o.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||L(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*r)),o},o.prototype.readInt8=function(t,r){return r||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,r){r||L(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},o.prototype.readInt16BE=function(t,r){r||L(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},o.prototype.readInt32LE=function(t,r){return r||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,r){return r||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,r){return r||L(t,4,this.length),X.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,r){return r||L(t,4,this.length),X.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,r){return r||L(t,8,this.length),X.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,r){return r||L(t,8,this.length),X.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,r,e,n){if(t=+t,r|=0,e|=0,!n){j(this,t,r,e,Math.pow(2,8*e)-1,0)}var i=1,o=0;for(this[r]=255&t;++o<e&&(i*=256);)this[r+o]=t/i&255;return r+e},o.prototype.writeUIntBE=function(t,r,e,n){if(t=+t,r|=0,e|=0,!n){j(this,t,r,e,Math.pow(2,8*e)-1,0)}var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+e},o.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,1,255,0),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},o.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):Y(this,t,r,!0),r+2},o.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):Y(this,t,r,!1),r+2},o.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):D(this,t,r,!0),r+4},o.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):D(this,t,r,!1),r+4},o.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);j(this,t,r,e,i-1,-i)}var o=0,u=1,a=0;for(this[r]=255&t;++o<e&&(u*=256);)t<0&&0===a&&0!==this[r+o-1]&&(a=1),this[r+o]=(t/u>>0)-a&255;return r+e},o.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);j(this,t,r,e,i-1,-i)}var o=e-1,u=1,a=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===a&&0!==this[r+o+1]&&(a=1),this[r+o]=(t/u>>0)-a&255;return r+e},o.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,1,127,-128),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},o.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):Y(this,t,r,!0),r+2},o.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):Y(this,t,r,!1),r+2},o.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):D(this,t,r,!0),r+4},o.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),o.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):D(this,t,r,!1),r+4},o.prototype.writeFloatLE=function(t,r,e){return N(this,t,r,!0,e)},o.prototype.writeFloatBE=function(t,r,e){return N(this,t,r,!1,e)},o.prototype.writeDoubleLE=function(t,r,e){return F(this,t,r,!0,e)},o.prototype.writeDoubleBE=function(t,r,e){return F(this,t,r,!1,e)},o.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var i,u=n-e;if(this===t&&e<r&&r<n)for(i=u-1;i>=0;--i)t[i+r]=this[i+e];else if(u<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i<u;++i)t[i+r]=this[i+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+u),r);return u},o.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!o.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0);var u;if("number"==typeof t)for(u=r;u<e;++u)this[u]=t;else{var a=o.isBuffer(t)?t:V(new o(t,n).toString()),s=a.length;for(u=0;u<e-r;++u)this[u+r]=a[u%s]}return this};var tt=/[^+\/0-9A-Za-z-_]/g}).call(r,e(9))},function(t,r,e){"use strict";var n,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"===("undefined"==typeof window?"undefined":i(window))&&(n=window)}t.exports=n},function(t,r,e){"use strict";function n(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[r-2]?2:"="===t[r-1]?1:0}function i(t){return 3*t.length/4-n(t)}function o(t){var r,e,i,o,u,a=t.length;o=n(t),u=new l(3*a/4-o),e=o>0?a-4:a;var s=0;for(r=0;r<e;r+=4)i=c[t.charCodeAt(r)]<<18|c[t.charCodeAt(r+1)]<<12|c[t.charCodeAt(r+2)]<<6|c[t.charCodeAt(r+3)],u[s++]=i>>16&255,u[s++]=i>>8&255,u[s++]=255&i;return 2===o?(i=c[t.charCodeAt(r)]<<2|c[t.charCodeAt(r+1)]>>4,u[s++]=255&i):1===o&&(i=c[t.charCodeAt(r)]<<10|c[t.charCodeAt(r+1)]<<4|c[t.charCodeAt(r+2)]>>2,u[s++]=i>>8&255,u[s++]=255&i),u}function u(t){return f[t>>18&63]+f[t>>12&63]+f[t>>6&63]+f[63&t]}function a(t,r,e){for(var n,i=[],o=r;o<e;o+=3)n=(t[o]<<16)+(t[o+1]<<8)+t[o+2],i.push(u(n));return i.join("")}function s(t){for(var r,e=t.length,n=e%3,i="",o=[],u=0,s=e-n;u<s;u+=16383)o.push(a(t,u,u+16383>s?s:u+16383));return 1===n?(r=t[e-1],i+=f[r>>2],i+=f[r<<4&63],i+="=="):2===n&&(r=(t[e-2]<<8)+t[e-1],i+=f[r>>10],i+=f[r>>4&63],i+=f[r<<2&63],i+="="),o.push(i),o.join("")}r.byteLength=i,r.toByteArray=o,r.fromByteArray=s;for(var f=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,d=h.length;p<d;++p)f[p]=h[p],c[h.charCodeAt(p)]=p;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},function(t,r,e){"use strict";r.read=function(t,r,e,n,i){var o,u,a=8*i-n-1,s=(1<<a)-1,f=s>>1,c=-7,l=e?i-1:0,h=e?-1:1,p=t[r+l];for(l+=h,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+t[r+l],l+=h,c-=8);for(u=o&(1<<-c)-1,o>>=-c,c+=n;c>0;u=256*u+t[r+l],l+=h,c-=8);if(0===o)o=1-f;else{if(o===s)return u?NaN:1/0*(p?-1:1);u+=Math.pow(2,n),o-=f}return(p?-1:1)*u*Math.pow(2,o-n)},r.write=function(t,r,e,n,i,o){var u,a,s,f=8*o-i-1,c=(1<<f)-1,l=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(a=isNaN(r)?1:0,u=c):(u=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-u))<1&&(u--,s*=2),r+=u+l>=1?h/s:h*Math.pow(2,1-l),r*s>=2&&(u++,s/=2),u+l>=c?(a=0,u=c):u+l>=1?(a=(r*s-1)*Math.pow(2,i),u+=l):(a=r*Math.pow(2,l-1)*Math.pow(2,i),u=0));i>=8;t[e+p]=255&a,p+=d,a/=256,i-=8);for(u=u<<i|a,f+=i;f>0;t[e+p]=255&u,p+=d,u/=256,f-=8);t[e+p-d]|=128*g}},function(t,r,e){"use strict";var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,r,e){"use strict";(function(r){var n=e(2),i=e(4),o=e(0),u={};u.commonjsEnv=function(){return void 0!==r},u.commonjsEnv.multiple=!1,u.browserEnv=function(){return"undefined"!=typeof window},u.browserEnv.multiple=!1,u.amdEnv=function(){return e(15)},u.amdEnv.multiple=!1,u.navigator=function(){return u.browserEnv()&&void 0!==window.navigator},u.navigator.multiple=!1,u.onLine=function(){return u.navigator()&&navigator.onLine},u.onLine.multiple=!1;var a={android:/^(?:(?!Windows).)*(Android)(?:\s)(\d+((\.\d+)+)?)?/,androidTablet:/(Android)(?:\s)(\d+((\.\d+)+)?)?(?!.*Mobile)/,androidPhone:/(Android)(?:\s)(\d+((\.\d+)+)?)?(?:.*Mobile)/,chrome:/(Chrome|Crios)\/(\d+((\.\d+)+)?)?\s+(Safari)\/(\d+((\.\d+)+)?)?$/,chromeIOS:/(CriOS)\/(\d+((\.\d+)+)?)?/,opera:/(Opera|OPR)(?:[\/\s])(\d+((\.\d+)+)?)?/,firefox:/(Firefox)\/(\d+((\.\d+)+)?)?$/,edge:/(Edge)\/(\d+((\.\d+)+)?)?$/,safari:/^(?:(?!Chrome).)*(Safari)\/(\d+((\.\d+)+)?)?/,safariMobile:/^(?:(?!CriOS).)*(?:Mobile\/.*)(Safari)\/(\d+((\.\d+)+)?)?/,ie:/(MSIE|rv)(?:[\s:])(\d+((\.\d+)+)?)?/,windowsPhone:/(Windows Phone)(?:\s)(\d+((\.\d+)+)?)?/,windowsTablet:/(Windows NT)(?:\s)(\d+((\.\d+)+)?)?(?:.*Touch)/,blackberry:/BlackBerry|BB10/,iphone:/iPhone/,ipad:/iPad/,ipod:/iPod/,ios:/iPhone|iPad|iPod/,mac:/Mac/,linux:/Linux/,windows:/Windows/};!function(){for(var t in a)!function(t){u[t]=function(r,e){var o=n.operatorVersion(r);e=o||e||!r?e||navigator.userAgent:r;var u=e.match(a[t]);return o&&u&&u[2]?i.compareVersion(u[2],o[0],o[1],!0):null!==u},u[t].multiple=!1}(t)}(),u.mobile=function(t){return t=t||navigator.userAgent,u.iphone(t)||u.ipod(t)||u.androidPhone(t)||u.blackberry(t)||u.windowsPhone(t)},u.tablet=function(t){return t=t||navigator.userAgent,u.ipad(t)||u.windowsTablet(t)||u.androidTablet(t)},u.desktop=function(t){return t=t||navigator.userAgent,u.not.tablet(t)&&u.not.mobile(t)},u=o.create(u),t.exports=u}).call(r,e(14))},function(t,r,e){"use strict";function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(r){try{return l.call(null,t,0)}catch(r){return l.call(this,t,0)}}}function u(t){if(h===clearTimeout)return clearTimeout(t);if((h===i||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(r){try{return h.call(null,t)}catch(r){return h.call(this,t)}}}function a(){y&&d&&(y=!1,d.length?g=d.concat(g):m=-1,g.length&&s())}function s(){if(!y){var t=o(a);y=!0;for(var r=g.length;r;){for(d=g,g=[];++m<r;)d&&d[m].run();m=-1,r=g.length}d=null,y=!1,u(t)}}function f(t,r){this.fun=t,this.array=r}function c(){}var l,h,p=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(t){l=n}try{h="function"==typeof clearTimeout?clearTimeout:i}catch(t){h=i}}();var d,g=[],y=!1,m=-1;p.nextTick=function(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];g.push(new f(t,r)),1!==g.length||y||o(s)},f.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=c,p.addListener=c,p.once=c,p.off=c,p.removeListener=c,p.removeAllListeners=c,p.emit=c,p.prependListener=c,p.prependOnceListener=c,p.listeners=function(t){return[]},p.binding=function(t){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(t){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(t,r){(function(r){t.exports=r}).call(r,{})},function(t,r,e){"use strict";var n=e(1),i=e(0),o={};o.propertyOf=function(t,r){return!!n.object(r)&&r.hasOwnProperty(t)},o.propertyOf.multiple=!1,o.propertyCount=function(t,r){if(!n.object(t)||!n.number(r))return!1;var e=0;for(var i in t)if(t.hasOwnProperty(i)&&++e>r)return!1;return e===r},o.propertyCount.multiple=!1,o=i.create(o),t.exports=o},function(t,r,e){"use strict";var n=e(1),i=e(0),o={};o.inArray=function(t,r){if(!n.array(r))return!1;for(var e in r)if(r.hasOwnProperty(e)&&r[e]===t)return!0;return!1},o.inArray.multiple=!1,o.arrayOfStrings=function(t){return n.all.string(t)},o.arrayOfObjects=function(t){return n.all.object(t)},o.arrayOfBooleans=function(t){return n.all.boolean(t)},o.arrayOfNumbers=function(t){return n.all.number(t)},o.arrayOfDates=function(t){return n.all.date(t)},o.arrayOfFunctions=function(t){return n.all.function(t)},o=i.create(o),t.exports=o},function(t,r,e){"use strict";var n=e(1),i=e(3),o=e(0),u={},a=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],s=["january","february","march","april","may","june","july","august","september","october","november","december"];u.dateString=function(t){var r=Date.parse(t);return!isNaN(r)},u.timeString=function(t){return/^(?:(?:([01]?\d|2[0-3]):)?([0-5]?\d):)?([0-5]?\d)$/.test(t)},u.today=function(t){var r=new Date;return n.date(t)&&r.toDateString()===t.toDateString()},u.tomorrow=function(t){var r=new Date;return r.setDate(r.getDate()+1),n.date(t)&&r.toDateString()===t.toDateString()},u.yesterday=function(t){var r=new Date;return r.setDate(r.getDate()-1),n.date(t)&&r.toDateString()===t.toDateString()},u.past=function(t){var r=(new Date).getTime();return n.date(t)&&r>t.getTime()},u.future=function(t){return n.date(t)&&!u.past(t)},u.day=function(t,r){return n.date(t)&&n.string(r)&&a[t.getDay()]===r.toLowerCase()},u.day.multiple=!1,u.month=function(t,r){return n.date(t)&&n.string(r)&&s[t.getMonth()]===r.toLowerCase()},u.month.multiple=!1,u.year=function(t,r){return n.date(t)&&n.number(r)&&t.getFullYear()===r},u.year.multiple=!1,u.leapYear=function(t){return n.number(t)&&t%4==0&&t%100!=0||t%400==0},u.weekend=function(t){return u.day(t,"saturday")||u.day(t,"sunday")},u.weekday=function(t){return n.date(t)&&!u.weekend(t)},u.numberInWeek=function(t){return n.number(t)&&i.between(t,0,6)},u.dateBetween=function(t,r,e){return n.all.date(t,r,e)&&i.between(t.getTime(),r.getTime(),e.getTime())},u.dateBetween.multiple=!1,u.dayLightSavingTime=function(t){if(!n.date(t))return!1;var r=new Date(t.getFullYear(),0,1),e=new Date(t.getFullYear(),6,1),i=Math.max(r.getTimezoneOffset(),e.getTimezoneOffset());return t.getTimezoneOffset()<i},u=o.create(u),t.exports=u},function(t,r,e){"use strict";var n=e(0),i={};i.url=function(t){return/^(?:(?:https?|ftps?):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,}))\.?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(t)},i.httpUrl=function(t){return i.url(t)&&/^http:/i.test(t)},i.httpsUrl=function(t){return i.url(t)&&/^https:/i.test(t)},i.urlEncoded=function(t){return/%[0-9a-f]{2}/i.test(t)},i.ftpUrl=function(t){return i.url(t)&&/^ftp:/i.test(t)},i.ftpsUrl=function(t){return i.url(t)&&/^ftps:/i.test(t)},i.domain=function(t){return/\b((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}\b/.test(t)},i=n.create(i),t.exports=i},function(t,r,e){"use strict";var n=e(0),i={};i.md5=function(t){return/^[a-f0-9]{32}$/i.test(t)},i.sha1=function(t){return/^[a-f0-9]{40}$/i.test(t)},i=n.create(i),t.exports=i},function(t,r,e){"use strict";var n=e(0),i={};i.creditCard=function(t){return/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test(t)},i.amex=function(t){return/^3[47][0-9]{13}$/.test(t)},i.dinersClub=function(t){return/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/.test(t)},i.discover=function(t){return/^6(?:011|5[0-9]{2})[0-9]{12}$/.test(t)},i.mastercard=function(t){return/^5[1-5][0-9]{14}$/.test(t)},i.visa=function(t){return/^4[0-9]{12}(?:[0-9]{3})?$/.test(t)},i=n.create(i),t.exports=i},function(t,r,e){"use strict";var n=e(0),i={};i.postalCodeES=function(t){return/^([1-9]{2}|[0-9][1-9]|[1-9][0-9])[0-9]{3}$/.test(t)},i.postalCodeUK=function(t){return/^[A-Z]{1,2}[0-9RCHNQ][0-9A-Z]?\s?[0-9][ABD-HJLNP-UW-Z]{2}$|^[A-Z]{2}-?[0-9]{4}$/.test(t)},i.postalCodeUS=function(t){return/(\d{5}([\-]\d{4})?)$/.test(t)},i.postalCodeIT=function(t){return/^\d{5}$/.test(t)},i.postalCodeDE=function(t){return/\b((?:0[1-46-9]\d{3})|(?:[1-357-9]\d{4})|(?:[4][0-24-9]\d{3})|(?:[6][013-9]\d{3}))\b/.test(t)},i.postalCodeNL=function(t){return/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(t)},i=n.create(i),t.exports=i},function(t,r,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=e(0),o=e(1),u={};u.domElement=function(t){return"object"===("undefined"==typeof HTMLElement?"undefined":n(HTMLElement))?t instanceof HTMLElement:t&&"object"===(void 0===t?"undefined":n(t))&&1===t.nodeType&&"string"==typeof t.nodeName},u.domElementTag=function(t,r){return u.domElement(t)&&o.string(r)&&t.tagName.toLowerCase()===r.toLowerCase()},u.domElementTag.multiple=!1,u=i.create(u),t.exports=u},function(t,r){t.exports={name:"bejs",version:"1.6.0",description:"Simple, light-weight assertions framework for javascript",homepage:"https://be.js.org",main:"index.js",scripts:{"version:major":"webpack --env.major && npm run-script doc && version-to-tag.sh && npm publish","version:minor":"webpack --env.minor && npm run-script doc && version-to-tag.sh && npm publish","version:patch":"webpack --env.patch && npm run-script doc && version-to-tag.sh && npm publish",build:"webpack --progress",doc:"./node_modules/.bin/jsdoc --configure .jsdoc.json --verbose",test:"istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"},keywords:["asserts","test","is","boolean","url","number","string","email","object","check","float","alphanumeric"],author:{name:"Fabio Ricali",email:"fabio@rica.li"},contributors:[{name:"Davide Polano",email:"info@mdslab.org"}],license:"MIT",devDependencies:{"babel-core":"^6.25.0","babel-loader":"^7.1.0","babel-preset-es2015":"^6.24.1",coveralls:"^2.13.1",docdash:"^0.4.0",istanbul:"^0.4.5",jsdoc:"^3.4.3",jsdom:"^11.0.0",minami:"^1.2.3",mocha:"^3.4.2","mocha-lcov-reporter":"^1.3.0","unminified-webpack-plugin":"^1.2.0",webpack:"^3.0.0","webpack-auto-inject-version":"^0.5.14"},repository:{type:"git",url:"https://github.com/fabioricali/beJS"}}}]); |
{ | ||
"name": "bejs", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"description": "Simple, light-weight assertions framework for javascript", | ||
@@ -5,0 +5,0 @@ "homepage": "https://be.js.org", |
@@ -7,2 +7,3 @@ /** | ||
const Helpers = require('../helpers'); | ||
const Mixed = require('./mixed'); | ||
const Interface = require('../interface'); | ||
@@ -63,3 +64,3 @@ let Envs = {}; | ||
/** | ||
* Check if is iOS device | ||
* Check if exists navigator object | ||
* | ||
@@ -69,16 +70,16 @@ * **Interfaces**: `not` | ||
* @function | ||
* @name ios | ||
* @name navigator | ||
* @returns {boolean} | ||
* @example | ||
* be.ios() // true | ||
* be.navigator() // true | ||
*/ | ||
Envs.ios = (...params) => { | ||
let userAgent = Helpers.getUserAgent.apply(this, params); | ||
return /iphone|ipad|ipod/i.test(userAgent); | ||
Envs.navigator = () => { | ||
return Envs.browserEnv() && typeof window.navigator !== 'undefined'; | ||
}; | ||
Envs.ios.multiple = false; | ||
Envs.navigator.multiple = false; | ||
/** | ||
* Check if is iPhone device | ||
* Check if is on line | ||
* | ||
@@ -88,16 +89,54 @@ * **Interfaces**: `not` | ||
* @function | ||
* @name iphone | ||
* @name online | ||
* @returns {boolean} | ||
* @example | ||
* be.iphone() // true | ||
* be.onLine() // true | ||
*/ | ||
Envs.iphone = (...params) => { | ||
let userAgent = Helpers.getUserAgent.apply(this, params); | ||
return /iphone/i.test(userAgent); | ||
Envs.onLine = function () { | ||
return Envs.navigator() && navigator.onLine; | ||
}; | ||
Envs.iphone.multiple = false; | ||
Envs.onLine.multiple = false; | ||
let regEx = { | ||
android: /^(?:(?!Windows).)*(Android)(?:\s)(\d+((\.\d+)+)?)?/, | ||
androidTablet: /(Android)(?:\s)(\d+((\.\d+)+)?)?(?!.*Mobile)/, | ||
androidPhone: /(Android)(?:\s)(\d+((\.\d+)+)?)?(?:.*Mobile)/, | ||
chrome: /(Chrome|Crios)\/(\d+((\.\d+)+)?)?\s+(Safari)\/(\d+((\.\d+)+)?)?$/, | ||
chromeIOS: /(CriOS)\/(\d+((\.\d+)+)?)?/, | ||
opera: /(Opera|OPR)(?:[\/\s])(\d+((\.\d+)+)?)?/, | ||
firefox: /(Firefox)\/(\d+((\.\d+)+)?)?$/, | ||
edge: /(Edge)\/(\d+((\.\d+)+)?)?$/, | ||
safari: /^(?:(?!Chrome).)*(Safari)\/(\d+((\.\d+)+)?)?/, | ||
safariMobile: /^(?:(?!CriOS).)*(?:Mobile\/.*)(Safari)\/(\d+((\.\d+)+)?)?/, | ||
ie: /(MSIE|rv)(?:[\s:])(\d+((\.\d+)+)?)?/, | ||
windowsPhone: /(Windows Phone)(?:\s)(\d+((\.\d+)+)?)?/, | ||
windowsTablet: /(Windows NT)(?:\s)(\d+((\.\d+)+)?)?(?:.*Touch)/, | ||
blackberry: /BlackBerry|BB10/, | ||
iphone: /iPhone/, | ||
ipad: /iPad/, | ||
ipod: /iPod/, | ||
ios: /iPhone|iPad|iPod/, | ||
mac: /Mac/, | ||
linux: /Linux/, | ||
windows: /Windows/, | ||
}; | ||
(() => { | ||
for(let i in regEx){ | ||
Envs[i] = (range, agent) => { | ||
let rangePart = Helpers.operatorVersion(range); | ||
agent = !rangePart && !agent && range ? range : agent || navigator.userAgent; | ||
let match = agent.match(regEx[i]); | ||
if(rangePart && match && match[2]){ | ||
return Mixed.compareVersion(match[2], rangePart[0], rangePart[1], true); | ||
} | ||
return match !== null; | ||
}; | ||
Envs[i].multiple = false; | ||
} | ||
})(); | ||
/** | ||
* Check if is iPad device | ||
* Check if is mobile device | ||
* | ||
@@ -107,16 +146,32 @@ * **Interfaces**: `not` | ||
* @function | ||
* @name ipad | ||
* @name mobile | ||
* @param agent {string} user agent string | ||
* @returns {boolean} | ||
* @example | ||
* be.ipad() // true | ||
* be.mobile() // true | ||
*/ | ||
Envs.ipad = (...params) => { | ||
let userAgent = Helpers.getUserAgent.apply(this, params); | ||
return /ipad/i.test(userAgent); | ||
Envs.mobile = (agent) => { | ||
agent = agent || navigator.userAgent; | ||
return Envs.iphone(agent) || Envs.ipod(agent) || Envs.androidPhone(agent) || Envs.blackberry(agent) || Envs.windowsPhone(agent); | ||
}; | ||
Envs.ipad.multiple = false; | ||
/** | ||
* Check if is tablet device | ||
* | ||
* **Interfaces**: `not` | ||
* | ||
* @function | ||
* @name tablet | ||
* @param agent {string} user agent string | ||
* @returns {boolean} | ||
* @example | ||
* be.tablet() // true | ||
*/ | ||
Envs.tablet = (agent) => { | ||
agent = agent || navigator.userAgent; | ||
return Envs.ipad(agent) || Envs.windowsTablet(agent) || Envs.androidTablet(agent); | ||
}; | ||
/** | ||
* Check if is iPod device | ||
* Check if is desktop device | ||
* | ||
@@ -126,16 +181,29 @@ * **Interfaces**: `not` | ||
* @function | ||
* @name ipod | ||
* @name desktop | ||
* @param agent {string} user agent string | ||
* @returns {boolean} | ||
* @example | ||
* be.ipod() // true | ||
* be.desktop() // true | ||
*/ | ||
Envs.ipod = (...params) => { | ||
let userAgent = Helpers.getUserAgent.apply(this, params); | ||
return /ipod/i.test(userAgent); | ||
Envs.desktop = (agent) => { | ||
agent = agent || navigator.userAgent; | ||
return Envs.not.tablet(agent) && Envs.not.mobile(agent); | ||
}; | ||
Envs.ipod.multiple = false; | ||
/** | ||
* Check if is Android tablet | ||
* | ||
* **Interfaces**: `not` | ||
* | ||
* @function | ||
* @name androidTablet | ||
* @param range {string} operator and version number "==", "<", "<=", ">", "=>" ex: >=4 | ||
* @param agent {string} user agent string | ||
* @returns {boolean} | ||
* @example | ||
* be.androidTablet() // true | ||
*/ | ||
/** | ||
* Check if is Android device | ||
* Check if is Android phone | ||
* | ||
@@ -145,16 +213,26 @@ * **Interfaces**: `not` | ||
* @function | ||
* @name android | ||
* @name androidPhone | ||
* @param range {string} operator and version number "==", "<", "<=", ">", "=>" ex: >=4 | ||
* @param agent {string} user agent string | ||
* @returns {boolean} | ||
* @example | ||
* be.android() // true | ||
* be.androidPhone() // true | ||
*/ | ||
Envs.android = (...params) => { | ||
let userAgent = Helpers.getUserAgent.apply(this, params); | ||
return /Android/i.test(userAgent); | ||
}; | ||
Envs.android.multiple = false; | ||
/** | ||
* Check if is Windows Phone | ||
* | ||
* **Interfaces**: `not` | ||
* | ||
* @function | ||
* @name windowsPhone | ||
* @param range {string} operator and version number "==", "<", "<=", ">", "=>" ex: >=4 | ||
* @param agent {string} user agent string | ||
* @returns {boolean} | ||
* @example | ||
* be.windowsPhone() // true | ||
*/ | ||
/** | ||
* Check if exists navigator object | ||
* Check if is Windows Tablet | ||
* | ||
@@ -164,14 +242,91 @@ * **Interfaces**: `not` | ||
* @function | ||
* @name navigator | ||
* @name windowsTablet | ||
* @param range {string} operator and version number "==", "<", "<=", ">", "=>" ex: >=4 | ||
* @param agent {string} user agent string | ||
* @returns {boolean} | ||
* @example | ||
* be.navigator() // true | ||
* be.windowsTablet() // true | ||
*/ | ||
Envs.navigator = () => { | ||
return Envs.browserEnv() && typeof window.navigator !== 'undefined'; | ||
}; | ||
Envs.navigator.multiple = false; | ||
/** | ||
* Check if is BlackBerry device | ||
* | ||
* **Interfaces**: `not` | ||
* | ||
* @function | ||
* @name blackberry | ||
* @param agent {string} user agent string | ||
* @returns {boolean} | ||
* @example | ||
* be.blackberry() // true | ||
*/ | ||
/** | ||
* Check if is iOS device | ||
* | ||
* **Interfaces**: `not` | ||
* | ||
* @function | ||
* @name ios | ||
* @param agent {string} user agent string | ||
* @returns {boolean} | ||
* @example | ||
* be.ios() // true | ||
*/ | ||
/** | ||
* Check if is iPad device | ||
* | ||
* **Interfaces**: `not` | ||
* | ||
* @function | ||
* @name ipad | ||
* @param agent {string} user agent string | ||
* @returns {boolean} | ||
* @example | ||
* be.ipad() // true | ||
*/ | ||
/** | ||
* Check if is iPod device | ||
* | ||
* **Interfaces**: `not` | ||
* | ||
* @function | ||
* @name ipod | ||
* @param agent {string} user agent string | ||
* @returns {boolean} | ||
* @example | ||
* be.ipod() // true | ||
*/ | ||
/** | ||
* Check if is iPhone device | ||
* | ||
* **Interfaces**: `not` | ||
* | ||
* @function | ||
* @name iphone | ||
* @param agent {string} user agent string | ||
* @returns {boolean} | ||
* @example | ||
* be.iphone() // true | ||
*/ | ||
/** | ||
* Check if is Android device | ||
* | ||
* **Interfaces**: `not` | ||
* | ||
* @function | ||
* @name android | ||
* @param range {string} operator and version number "==", "<", "<=", ">", "=>" ex: >=4 | ||
* @param agent {string} user agent string | ||
* @returns {boolean} | ||
* @example | ||
* be.android() // true | ||
* be.android(==4) // true | ||
*/ | ||
/** | ||
* Firefox detecting | ||
@@ -183,13 +338,10 @@ * | ||
* @name firefox | ||
* @param range {string} operator and version number "==", "<", "<=", ">", "=>" ex: >=4 | ||
* @param agent {string} user agent string | ||
* @returns {boolean} | ||
* @example | ||
* be.firefox() // true | ||
* be.firefox('==30') // true | ||
*/ | ||
Envs.firefox = (...params) => { | ||
let userAgent = Helpers.getUserAgent.apply(this, params); | ||
return /Firefox/i.test(userAgent); | ||
}; | ||
Envs.firefox.multiple = false; | ||
/** | ||
@@ -202,12 +354,24 @@ * Chrome detecting | ||
* @name chrome | ||
* @param range {string} operator and version number "==", "<", "<=", ">", "=>" ex: >=4 | ||
* @param agent {string} user agent string | ||
* @returns {boolean} | ||
* @example | ||
* be.chrome() // true | ||
* be.chrome('==59') // true | ||
*/ | ||
Envs.chrome = (...params) => { | ||
let userAgent = Helpers.getUserAgent.apply(this, params); | ||
return /Chrome/i.test(userAgent); | ||
}; | ||
Envs.chrome.multiple = false; | ||
/** | ||
* Chrome iOS detecting | ||
* | ||
* **Interfaces**: `not` | ||
* | ||
* @function | ||
* @name chromeIOS | ||
* @param range {string} operator and version number "==", "<", "<=", ">", "=>" ex: >=4 | ||
* @param agent {string} user agent string | ||
* @returns {boolean} | ||
* @example | ||
* be.chromeIOS() // true | ||
* be.chromeIOS('==59') // true | ||
*/ | ||
@@ -221,15 +385,41 @@ /** | ||
* @name safari | ||
* @param range {string} operator and version number "==", "<", "<=", ">", "=>" ex: >=4 | ||
* @param agent {string} user agent string | ||
* @returns {boolean} | ||
* @example | ||
* be.safari() // true | ||
* be.safari(<=7) // true | ||
*/ | ||
Envs.safari = (...params) => { | ||
let userAgent = Helpers.getUserAgent.apply(this, params); | ||
return /Safari/i.test(userAgent.replace('Chrome', '')) && | ||
!/Chrome/i.test(userAgent.replace('Safari', '')); | ||
}; | ||
Envs.safari.multiple = false; | ||
/** | ||
* Safari mobile detecting | ||
* | ||
* **Interfaces**: `not` | ||
* | ||
* @function | ||
* @name safariMobile | ||
* @param range {string} operator and version number "==", "<", "<=", ">", "=>" ex: >=4 | ||
* @param agent {string} user agent string | ||
* @returns {boolean} | ||
* @example | ||
* be.safariMobile() // true | ||
* be.safariMobile(<=7) // true | ||
*/ | ||
/** | ||
* Edge detecting | ||
* | ||
* **Interfaces**: `not` | ||
* | ||
* @function | ||
* @name edge | ||
* @param range {string} operator and version number "==", "<", "<=", ">", "=>" ex: >=4 | ||
* @param agent {string} user agent string | ||
* @returns {boolean} | ||
* @example | ||
* be.edge() // true | ||
* be.edge(>=12) // true | ||
*/ | ||
/** | ||
* Explorer detecting | ||
@@ -241,13 +431,10 @@ * | ||
* @name userAgent | ||
* @param range {string} operator and version number "==", "<", "<=", ">", "=>" ex: >=4 | ||
* @param agent {string} user agent string | ||
* @returns {boolean} | ||
* @example | ||
* be.ie() // true | ||
* be.ie(==9) // true | ||
*/ | ||
Envs.ie = (...params) => { | ||
let userAgent = Helpers.getUserAgent.apply(this, params); | ||
return /MSIE|Trident/i.test(userAgent); | ||
}; | ||
Envs.ie.multiple = false; | ||
/** | ||
@@ -260,2 +447,3 @@ * Mac detecting | ||
* @name mac | ||
* @param agent {string} user agent string | ||
* @returns {boolean} | ||
@@ -265,11 +453,18 @@ * @example | ||
*/ | ||
Envs.mac = (...params) => { | ||
let userAgent = Helpers.getUserAgent.apply(this, params); | ||
return /mac/i.test(userAgent); | ||
}; | ||
Envs.mac.multiple = false; | ||
/** | ||
* Windows detecting | ||
* | ||
* **Interfaces**: `not` | ||
* | ||
* @function | ||
* @name windows | ||
* @param agent {string} user agent string | ||
* @returns {boolean} | ||
* @example | ||
* be.windows() // true | ||
*/ | ||
/** | ||
* Check if is on line | ||
* Linux detecting | ||
* | ||
@@ -279,15 +474,11 @@ * **Interfaces**: `not` | ||
* @function | ||
* @name online | ||
* @name linux | ||
* @param agent {string} user agent string | ||
* @returns {boolean} | ||
* @example | ||
* be.onLine() // true | ||
* be.linux() // true | ||
*/ | ||
Envs.onLine = function () { | ||
return Envs.navigator() && navigator.onLine; | ||
}; | ||
Envs.onLine.multiple = false; | ||
Envs = Interface.create(Envs); | ||
module.exports = Envs; |
@@ -5,3 +5,3 @@ /** | ||
*/ | ||
const Helpers = require('../helpers'); | ||
const Types = require('./types'); | ||
@@ -222,4 +222,28 @@ const Interface = require('../interface'); | ||
/** | ||
* Compare two version number | ||
* | ||
* **Interfaces**: `not` | ||
* | ||
* @function | ||
* @name compareVersion | ||
* @param a {string} version a | ||
* @param operator {string} operator "==", "<", "<=", ">", ">=" | ||
* @param b {string} version b | ||
* @param major {boolean} consider major only | ||
* @example | ||
* be.compareVersion('1.0.2', '==', '1.0.3') // false | ||
* //Consider major only | ||
* be.compareVersion('1.0.2', '==', '1.0.3', true) // true | ||
*/ | ||
Mixed.compareVersion = (a, operator, b, major) => { | ||
if(major){ | ||
a = a.split('.')[0]; | ||
b = b.split('.')[0]; | ||
} | ||
return Helpers.comparators[operator](a, b); | ||
}; | ||
Mixed = Interface.create(Mixed); | ||
module.exports = Mixed; |
@@ -35,3 +35,3 @@ /** | ||
* Distance between the two given strings | ||
* @link https://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#JavaScript | ||
* @see https://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#JavaScript | ||
* @param a {string} | ||
@@ -75,2 +75,48 @@ * @param b {string} | ||
/** | ||
* Comparators methods | ||
*/ | ||
Helpers.comparators = { | ||
'==': function(a, b) {return Helpers.compareVersions(a, b) === 0;}, | ||
'<': function(a, b) {return Helpers.compareVersions(a, b) < 0;}, | ||
'<=': function(a, b) {return Helpers.compareVersions(a, b) <= 0;}, | ||
'>': function(a, b) {return Helpers.compareVersions(a, b) > 0;}, | ||
'>=': function(a, b) {return Helpers.compareVersions(a, b) >= 0;} | ||
}; | ||
/** | ||
* Compare version number | ||
* @see https://stackoverflow.com/questions/6832596/how-to-compare-software-version-number-using-js-only-number | ||
* @param a {string} version number | ||
* @param b {string} version number | ||
* @returns {int} | ||
*/ | ||
Helpers.compareVersions = function (a, b) { | ||
let diff; | ||
let regExStrip0 = /(\.0+)+$/; | ||
let segmentsA = a.replace(regExStrip0, '').split('.'); | ||
let segmentsB = b.replace(regExStrip0, '').split('.'); | ||
let l = Math.min(segmentsA.length, segmentsB.length); | ||
for (let i = 0; i < l; i++) { | ||
diff = parseInt(segmentsA[i], 10) - parseInt(segmentsB[i], 10); | ||
if (diff) { | ||
return diff; | ||
} | ||
} | ||
return segmentsA.length - segmentsB.length; | ||
}; | ||
/** | ||
* Get operator and version number | ||
* @param value {string} string like <=1.0.0 | ||
* @returns {*} | ||
*/ | ||
Helpers.operatorVersion = function (value) { | ||
if(!value) return false; | ||
let match = value.match(/(==|<=?|>=?)(?:\s+)?(\d+((\.\d+)+)?)?/); | ||
if(!match) return false; | ||
return [match[1], match[2]]; | ||
}; | ||
module.exports = Helpers; |
486
test/envs.js
@@ -27,26 +27,36 @@ /** | ||
describe('ios', function () { | ||
it('should be return true', function () { | ||
describe('android', function () { | ||
it('should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_0 like Mac OS X) AppleWebKit/602.1.38 ' + | ||
'(KHTML, like Gecko) Version/10.0 Mobile/14A5297c Safari/602.1'; | ||
var result = be.ios(userAgent); | ||
var result = be.android(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
it('should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (Linux; Android 5.1.1; SM-G928X Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.83 Mobile Safari/537.36'; | ||
var result = be.android(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('should be return false', function () { | ||
it('range == 4, should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (Linux; Android 5.1.1; SM-G928X Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) ' + | ||
'Chrome/47.0.2526.83 Mobile Safari/537.36'; | ||
var result = be.ios(userAgent); | ||
var result = be.android('==4', userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
it('windows phone 10, should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/13.10586'; | ||
var result = be.android(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
it('should be return error', function (done) { | ||
try { | ||
be.ios(); | ||
be.android(); | ||
if(navigator) | ||
done(); | ||
} catch (e) { | ||
if(e.message === 'test allowed only in browser environment') | ||
done(); | ||
done(); | ||
} | ||
@@ -56,26 +66,454 @@ }); | ||
describe('android', function () { | ||
describe('chrome', function () { | ||
it('with range, should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36'; | ||
var result = be.chrome('>=58', userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('without range should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36'; | ||
var result = be.chrome(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('safari, should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4'; | ||
var result = be.chrome(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
it('opera, should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36 OPR/46.0.2597.32'; | ||
var result = be.chrome(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
it('edge, should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063'; | ||
var result = be.chrome(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
}); | ||
describe('chromeIOS', function () { | ||
it('should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_2_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/56.0.2924.79 Mobile/14D27 Safari/602.1'; | ||
var result = be.chromeIOS(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
}); | ||
describe('opera', function () { | ||
it('should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.52 Safari/537.36 OPR/15.0.1147.100'; | ||
var result = be.opera(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('old agent, should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows NT 5.1) Gecko/20100101 Firefox/14.0 Opera/12.0'; | ||
var result = be.opera(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('old agent, should be return true (2)', function () { | ||
var userAgent= 'Opera/9.80 (Windows NT 6.0; U; pl) Presto/2.10.229 Version/11.62'; | ||
var result = be.opera(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('old agent, should be return true (3)', function () { | ||
var userAgent= 'Mozilla/4.0 (compatible; MSIE 5.0; Linux 2.4.19-4GB i686) Opera 6.03 [en]'; | ||
var result = be.opera(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('edge, should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063'; | ||
var result = be.opera(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
}); | ||
describe('firefox', function () { | ||
it('should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1'; | ||
var result = be.firefox(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('old agent, should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows NT 5.1; rv:8.0; en_us) Gecko/20100101 Firefox/8.0'; | ||
var result = be.firefox(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('old agent, should be return false (2)', function () { | ||
var userAgent= 'Opera/9.80 (Windows NT 6.0; U; pl) Presto/2.10.229 Version/11.62'; | ||
var result = be.firefox(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
it('opera agent, should be return false (3)', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows NT 5.1) Gecko/20100101 Firefox/14.0 Opera/12.0'; | ||
var result = be.firefox(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
}); | ||
describe('safari', function () { | ||
it('should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A'; | ||
var result = be.safari(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('safari mobile, should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_2_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) GSA/24.0.150344369 Mobile/14D27 Safari/602.1'; | ||
var result = be.safari(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_0 like Mac OS X) AppleWebKit/602.1.38 ' + | ||
'(KHTML, like Gecko) Version/10.0 Mobile/14A5297c Safari/602.1'; | ||
var result = be.android(userAgent); | ||
var userAgent= 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36'; | ||
var result = be.safari(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
it('old agent, should be return false (2)', function () { | ||
var userAgent= 'Opera/9.80 (Windows NT 6.0; U; pl) Presto/2.10.229 Version/11.62'; | ||
var result = be.safari(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
it('opera should be return false (3)', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows NT 6.0; rv:2.0) Gecko/20100101 Firefox/4.0 Opera 12.14'; | ||
var result = be.safari(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
it('edge, should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063'; | ||
var result = be.safari(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
}); | ||
describe('edge', function () { | ||
it('should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (Linux; Android 5.1.1; SM-G928X Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) ' + | ||
'Chrome/47.0.2526.83 Mobile Safari/537.36'; | ||
var result = be.android(userAgent); | ||
var userAgent= 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063'; | ||
var result = be.edge(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('should be return error', function (done) { | ||
try { | ||
be.android(); | ||
if(navigator) | ||
done(); | ||
} catch (e) { | ||
done(); | ||
} | ||
it('range >, should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063'; | ||
var result = be.edge('>14', userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('range <, should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063'; | ||
var result = be.edge('<14', userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
}); | ||
describe('ie', function () { | ||
it('11, should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; rv:11.0) like Gecko'; | ||
var result = be.ie(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('range < 11, should be return true', function () { | ||
var userAgent= 'Mozilla/4.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/5.0)'; | ||
var result = be.ie('<11', userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('range == 8, should be return true', function () { | ||
var userAgent= 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; msn OptimizedIE8;ZHCN)'; | ||
var result = be.ie('==8', userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
}); | ||
describe('safariMobile', function () { | ||
it('should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_2_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) GSA/22.1.146053689 Mobile/14D27 Safari/600.1.4'; | ||
var result = be.safariMobile(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('Chrome iOS, should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_2_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/56.0.2924.79 Mobile/14D27 Safari/602.1'; | ||
var result = be.safariMobile(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
}); | ||
describe('iphone', function () { | ||
it('should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_2_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) GSA/22.1.146053689 Mobile/14D27 Safari/600.1.4'; | ||
var result = be.iphone(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; rv:11.0) like Gecko'; | ||
var result = be.iphone(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
}); | ||
describe('ipad', function () { | ||
it('should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (iPad; CPU OS 10_2_1 like Mac OS X) AppleWebKit/602.4.6 (KHTML, like Gecko) Version/10.0 Mobile/14D27 Safari/602.1'; | ||
var result = be.ipad(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_2_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) GSA/22.1.146053689 Mobile/14D27 Safari/600.1.4'; | ||
var result = be.ipad(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
}); | ||
describe('ipod', function () { | ||
it('should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (iPod touch; CPU iPhone OS 10_2_1 like Mac OS X) AppleWebKit/602.4.6 (KHTML, like Gecko) Version/10.0 Mobile/14D27 Safari/602.1'; | ||
var result = be.ipod(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (iPad; CPU OS 10_2_1 like Mac OS X) AppleWebKit/602.4.6 (KHTML, like Gecko) Version/10.0 Mobile/14D27 Safari/602.1'; | ||
var result = be.ipod(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
}); | ||
describe('ios', function () { | ||
it('iPod, should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (iPod touch; CPU iPhone OS 10_2_1 like Mac OS X) AppleWebKit/602.4.6 (KHTML, like Gecko) Version/10.0 Mobile/14D27 Safari/602.1'; | ||
var result = be.ios(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('iPad, should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (iPad; CPU OS 10_2_1 like Mac OS X) AppleWebKit/602.4.6 (KHTML, like Gecko) Version/10.0 Mobile/14D27 Safari/602.1'; | ||
var result = be.ios(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('iPhone, should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_2_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) GSA/22.1.146053689 Mobile/14D27 Safari/600.1.4'; | ||
var result = be.ios(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; rv:11.0) like Gecko'; | ||
var result = be.ios(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
}); | ||
describe('linux', function () { | ||
it('should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36'; | ||
var result = be.linux(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; rv:11.0) like Gecko'; | ||
var result = be.linux(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
}); | ||
describe('windows', function () { | ||
it('should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36'; | ||
var result = be.windows(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
it('should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; rv:11.0) like Gecko'; | ||
var result = be.windows(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
}); | ||
describe('mac', function () { | ||
it('should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36'; | ||
var result = be.mac(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
it('should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36'; | ||
var result = be.mac(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
}); | ||
describe('androidTablet', function () { | ||
it('should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (Linux; Android 4.4.3; KFTHWI Build/KTU84M) AppleWebKit/537.36 (KHTML, like Gecko) Silk/47.1.79 like Chrome/47.0.2526.80 Safari/537.36'; | ||
var result = be.androidTablet(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (Linux; Android 5.1.1; SM-G928X Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.83 Mobile Safari/537.36'; | ||
var result = be.androidTablet(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
}); | ||
describe('androidPhone', function () { | ||
it('should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (Linux; Android 4.4.3; KFTHWI Build/KTU84M) AppleWebKit/537.36 (KHTML, like Gecko) Silk/47.1.79 like Chrome/47.0.2526.80 Safari/537.36'; | ||
var result = be.androidPhone(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
it('should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (Linux; Android 5.1.1; SM-G928X Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.83 Mobile Safari/537.36'; | ||
var result = be.androidPhone(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
}); | ||
describe('windowsPhone', function () { | ||
it('should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (Linux; Android 4.4.3; KFTHWI Build/KTU84M) AppleWebKit/537.36 (KHTML, like Gecko) Silk/47.1.79 like Chrome/47.0.2526.80 Safari/537.36'; | ||
var result = be.windowsPhone(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
it('should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/13.10586'; | ||
var result = be.windowsPhone(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
}); | ||
describe('windowsTablet', function () { | ||
it('should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows Phone 8.1; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 635) like Gecko'; | ||
var result = be.windowsTablet(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
it('should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0; Touch)'; | ||
var result = be.windowsTablet(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
}); | ||
describe('blackberry', function () { | ||
it('should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows Phone 8.1; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 635) like Gecko'; | ||
var result = be.blackberry(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
it('should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; en) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.1.0.346 Mobile Safari/534.11+)'; | ||
var result = be.blackberry(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
}); | ||
describe('mobile', function () { | ||
it('windows phone, should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows Phone 8.1; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 635) like Gecko'; | ||
var result = be.mobile(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('BlackBerry, should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; en) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.1.0.346 Mobile Safari/534.11+)'; | ||
var result = be.mobile(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('android, should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (Linux; Android 5.1.1; SM-G928X Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.83 Mobile Safari/537.36'; | ||
var result = be.mobile(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
}); | ||
describe('tablet', function () { | ||
it('windows, should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0; Touch)'; | ||
var result = be.tablet(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('ipad, should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (iPad; CPU OS 10_2_1 like Mac OS X) AppleWebKit/602.4.6 (KHTML, like Gecko) Version/10.0 Mobile/14D27 Safari/602.1'; | ||
var result = be.tablet(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
}); | ||
describe('desktop', function () { | ||
it('windows phone, should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0; Touch)'; | ||
var result = be.desktop(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
it('ipad, should be return false', function () { | ||
var userAgent= 'Mozilla/5.0 (iPad; CPU OS 10_2_1 like Mac OS X) AppleWebKit/602.4.6 (KHTML, like Gecko) Version/10.0 Mobile/14D27 Safari/602.1'; | ||
var result = be.desktop(userAgent); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
it('windows pc, should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36'; | ||
var result = be.desktop(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('mac, should be return true', function () { | ||
var userAgent= 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36'; | ||
var result = be.desktop(userAgent); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
}); |
@@ -9,2 +9,10 @@ /** | ||
describe('objectToString', function () { | ||
it('should be return [object String]', function () { | ||
var result = be._helpers.objectToString('hello'); | ||
console.log(result); | ||
assert.equal(result, '[object String]'); | ||
}); | ||
}); | ||
describe('getEditDistance', function () { | ||
@@ -21,2 +29,98 @@ it('should be return 0', function () { | ||
}); | ||
}); | ||
describe('compareVersions', function () { | ||
it('should be return 1', function () { | ||
var result = be._helpers.compareVersions('4.53.58', '3.78.99'); | ||
console.log(result); | ||
assert.equal(result, 1); | ||
}); | ||
it('should be return -1', function () { | ||
var result = be._helpers.compareVersions('2.53.58', '3.78.99'); | ||
console.log(result); | ||
assert.equal(result, -1); | ||
}); | ||
it('string be return 0', function () { | ||
var result = be._helpers.compareVersions('hello', 'hello'); | ||
console.log(result); | ||
assert.equal(result, 0); | ||
}); | ||
}); | ||
describe('comparators', function () { | ||
it('== should be return true', function () { | ||
var result = be._helpers.comparators['==']('4.5', '4.5'); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('< should be return true (2)', function () { | ||
var result = be._helpers.comparators['<']('44', '45'); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('< should be return true', function () { | ||
var result = be._helpers.comparators['<']('4.4', '4.5'); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('< should be return false', function () { | ||
var result = be._helpers.comparators['<']('4.6', '4.5'); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
it('<= should be return true', function () { | ||
var result = be._helpers.comparators['<=']('4.3', '4.5'); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('<= should be return true (2)', function () { | ||
var result = be._helpers.comparators['<=']('4.5', '4.5'); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('> should be return true', function () { | ||
var result = be._helpers.comparators['>']('4.8', '4.5'); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('> should be return false', function () { | ||
var result = be._helpers.comparators['>']('4.4', '4.5'); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
it('>= should be return true', function () { | ||
var result = be._helpers.comparators['>=']('4.8', '4.5'); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('>= should be return true (2)', function () { | ||
var result = be._helpers.comparators['>=']('4.5', '4.5'); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
}); | ||
describe('operatorVersion', function () { | ||
it('should be return array', function () { | ||
var result = be._helpers.operatorVersion('>=4.53.58'); | ||
console.log(result); | ||
assert.equal(result[0], '>='); | ||
assert.equal(result[1], '4.53.58'); | ||
}); | ||
it('with space between operator and version should be return array', function () { | ||
var result = be._helpers.operatorVersion('>= 4.53.58'); | ||
console.log(result); | ||
assert.equal(result[0], '>='); | ||
assert.equal(result[1], '4.53.58'); | ||
}); | ||
it('only version should be return false', function () { | ||
var result = be._helpers.operatorVersion('4.53.58'); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
it('undefined should be return false', function () { | ||
var result = be._helpers.operatorVersion(); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
}); |
@@ -328,1 +328,19 @@ /** | ||
}); | ||
describe('compareVersion', function () { | ||
it('should be return true', function () { | ||
var result = be.compareVersion('1.0.2', '>', '1.0.1'); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('should be return true, consider major only', function () { | ||
var result = be.compareVersion('1.0.2', '==', '1.0.1', true); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('should be return false', function () { | ||
var result = be.compareVersion('1.0.2', '==', '1.0.1'); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
}); |
@@ -635,2 +635,12 @@ /** | ||
}); | ||
it('Map iterable, should be return true', function () { | ||
var result = be.iterable(new Map().values()); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('Set iterable, should be return true', function () { | ||
var result = be.iterable(new Set().values()); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
}); | ||
@@ -637,0 +647,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 84 instances in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
0
0
613844
46
12086