UNPKG

chek

Version:

Minimal utility for checking types, working with arrays and objects.

1 lines 48.5 kB
!function n(i,o,u){function s(r,t){if(!o[r]){if(!i[r]){var e="function"==typeof require&&require;if(!t&&e)return e(r,!0);if(f)return f(r,!0);throw(e=new Error("Cannot find module '"+r+"'")).code="MODULE_NOT_FOUND",e}e=o[r]={exports:{}},i[r][0].call(e.exports,function(t){return s(i[r][1][t]||t)},e,e.exports,n,i,o,u)}return o[r].exports}for(var f="function"==typeof require&&require,t=0;t<u.length;t++)s(u[t]);return s}({1:[function(t,r,e){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,r,e,n){void 0===n&&(n=e),Object.defineProperty(t,n,{enumerable:!0,get:function(){return r[e]}})}:function(t,r,e,n){t[n=void 0===n?e:n]=r[e]}),i=this&&this.__exportStar||function(t,r){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(r,e)||n(r,t,e)};Object.defineProperty(e,"__esModule",{value:!0}),i(t("./modules/array"),e),i(t("./modules/constant"),e),i(t("./modules/from"),e),i(t("./modules/function"),e),i(t("./modules/is"),e),i(t("./modules/object"),e),i(t("./modules/string"),e),i(t("./modules/to"),e),i(t("./modules/type"),e)},{"./modules/array":3,"./modules/constant":4,"./modules/from":5,"./modules/function":6,"./modules/is":7,"./modules/object":8,"./modules/string":9,"./modules/to":10,"./modules/type":11}],2:[function(t,r,e){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,r,e,n){void 0===n&&(n=e),Object.defineProperty(t,n,{enumerable:!0,get:function(){return r[e]}})}:function(t,r,e,n){t[n=void 0===n?e:n]=r[e]}),i=this&&this.__exportStar||function(t,r){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(r,e)||n(r,t,e)};Object.defineProperty(e,"__esModule",{value:!0});var o=t("./chek");o.toWindow("chek",o,["tryRequire","isNode"]),i(t("./types"),e),i(t("./modules/array"),e),i(t("./modules/constant"),e),i(t("./modules/from"),e),i(t("./modules/function"),e),i(t("./modules/is"),e),i(t("./modules/object"),e),i(t("./modules/string"),e),i(t("./modules/to"),e),i(t("./modules/type"),e),e.default=o},{"./chek":1,"./modules/array":3,"./modules/constant":4,"./modules/from":5,"./modules/function":6,"./modules/is":7,"./modules/object":8,"./modules/string":9,"./modules/to":10,"./modules/type":11,"./types":12}],3:[function(t,r,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unshift=e.splice=e.shift=e.push=e.pop=e.last=e.includesAny=e.includes=e.first=e.flatten=e.keys=e.duplicates=e.containsAny=e.contains=e.orderBy=void 0;var s=t("./is");function o(t,r){return t<r?-1:r<t?1:0}function n(t,r,e){return 0<(t=s.isString(t=t||[])?t.split(""):t).filter(function(t){return e&&(t=e(t)),s.isEqual(t,r)}).length}function i(r,t,e){return s.isString(r)&&(r=r.split("")),s.isString(t)&&(t=t.split("")),!(!s.isArray(r)||!s.isArray(t))&&0<t.filter(function(t){return n(r,t,e)}).length}function u(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var e=0,n=[];e<t.length;){var i=t[e],n=s.isArray(i)?n.concat(u.apply(void 0,i)):n.concat([i]);e++}return n}function f(t){return t[0]}function a(t){return t&&t[t.length-1]||void 0}function c(t,r,e){for(var n=[],i=3;i<arguments.length;i++)n[i-3]=arguments[i];var o=t.slice(0,r=r||0),u=t.slice(r),r=[];return e&&(r=u.slice(0,e),u=u.slice(e)),s.isValue(e)?t=o.concat(n).concat(u):(t=o.concat(n),r=u),{array:t,val:r}}e.orderBy=function(t){for(var u=[],r=1;r<arguments.length;r++)u[r-1]=arguments[r];var i=function(t){return t};if(s.isFunction(a(u))&&(i=u.pop()),u.length)return u=u.map(function(t){var e,n,r=t;return s.isString(r)?(r={key:t}).order=/^-/.test(t+""):s.isArray(r)&&((r={key:t[0]}).order=t[1]),r.primer=r.primer||i,r.comparator=(e=r.primer,t=r.order,n=e?function(t,r){return o(e(t),e(r))}:o,t&&/^(desc|descending|-1|true)/.test(t+"")?function(t,r){return-1*n(t,r)}:n),r}),t.sort(function(t,r){for(var e=0,n=u;e<n.length;e++){var i,o=n[e];if(0!==(i=o.comparator(t[o.key],r[o.key])))break}return i});var e=s.isNumber(t[0])&&s.isNumber(a(t));return t.sort(function(t,r){return t=i(t),r=i(r),e?t-r:(t+="")<(r+="")?-1:r<t?1:0})},e.contains=n,e.containsAny=i,e.duplicates=function(t,r,e){for(var n=t.length,i=0;n--&&!(e&&0<i);)s.isEqual(t[n],r)&&(i+=1);return i},e.keys=function(t){return s.isObject(t)?Object.keys(t):[]},e.flatten=u,e.first=f,e.includes=n,e.includesAny=i,e.last=a,e.pop=function(t){return{array:t.slice(0,t.length-1),val:t[t.length-1]}},e.push=function(t){for(var r=[],e=1;e<arguments.length;e++)r[e-1]=arguments[e];return{array:t=t.concat(u.apply(void 0,r)),val:t.length}},e.shift=function(t){return{array:c(t,0,1).array,val:t[0]}},e.splice=c,e.unshift=function(t){for(var r=[],e=1;e<arguments.length;e++)r[e-1]=arguments[e];return{array:t=t.concat(u(r)),val:t.length}}},{"./is":7}],4:[function(t,r,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toStr=void 0,e.toStr=Object.prototype.toString},{}],5:[function(t,r,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fromJSON=e.fromEpoch=void 0;var n=t("./is"),i=t("./function"),o=t("./to");e.fromEpoch=function(t,r){return n.isValue(t)&&n.isNumber(t)?new Date(t):o.toDefault(null,r)},e.fromJSON=function(t,r){return i.tryWrap(JSON.parse,t)(r)}},{"./function":6,"./is":7,"./to":10}],6:[function(n,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.tryRootRequire=r.tryRequire=r.tryWrap=r.noopIf=r.noop=void 0;var i=n("./is"),o=n("./to");function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r]}function u(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return function(r){try{return t.apply(void 0,e)}catch(t){return i.isFunction(r)?r(t):o.toDefault(r)}}}function s(t,r,e){return u(function(){return i.isNode()?e?n.main.require(t):n(t):o.toDefault(null,r)})(r)}r.noop=e,r.noopIf=function(t){return t||e},r.tryWrap=u,r.tryRequire=s,r.tryRootRequire=function(t,r){return s(t,r)}},{"./is":7,"./to":10}],7:[function(E,O,j){!function(w,A){!function(){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.isWindows=j.isValue=j.isUnique=j.isUndefinedOrNull=j.isUndefined=j.isType=j.isTruthy=j.isSymbol=j.isString=j.isRoot=j.isRegExp=j.isPromise=j.isPlainObject=j.isObject=j.isMoment=j.isNumber=j.isNull=j.isNode=j.isInteger=j.isInspect=j.isInfinite=j.isFunction=j.isFloat=j.isDocker=j.isDirectory=j.isFile=j.isError=j.isEqual=j.isEmpty=j.isDebug=j.isDate=j.isBuffer=j.isBrowser=j.isBoolean=j.isArray=void 0;var t,r,e,n,i=E("./constant"),o=E("./to"),u=E("./function"),s=E("./array");function f(t){return Array.isArray?Array.isArray(t):"[object Array]"===i.toStr.call(t)}function a(t){return m(t)&&t.constructor&&t.constructor===Date}function c(t){return b(t)||p(t)||v(t)&&0===t.length||y(t)&&isNaN(t)||d(t)&&!s.keys(t).length||f(t)&&!t.length}function l(t){return t===1/0}function h(){return void 0!==O&&O.exports&&"undefined"==typeof window}function p(t){return null===t}function y(t){return!g(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function g(t){return!b(t)&&!p(t)&&(t&&t.constructor===Object||"function"==typeof t||"object"==typeof t)}function d(t){return t&&t.constructor&&t.constructor==={}.constructor}function v(t){return m(t)&&("string"==typeof t||t instanceof String)}function b(t){return void 0===t||!1}function m(t){return!(b(t)||p(t)||y(t)&&isNaN(t)||l(t))}h()&&(t=E("fs"),r=t.existsSync.bind(t),e=t.statSync.bind(t),n=t.readFileSync.bind(t)),j.isArray=f,j.isBoolean=function(t){return m(t)&&"boolean"==typeof t},j.isBrowser=function(t){return t?void 0!==w&&!0===u.tryWrap(o.toBoolean,w.env&&w.env[t])(!1):!h()},j.isBuffer=function(t){return m(t)&&t instanceof A},j.isDate=a,j.isDebug=function(t){if(m(t))return t;var r=w&&w.execArgv;return u.tryWrap(function(){return r.filter(function(t){return/^(--debug|--inspect)/.test(t)}).length||m(v8debug)})(!1)},j.isEmpty=c,j.isEqual=function(t,r,e){return a(t)&&a(r)?o.toEpoch(t)===o.toEpoch(r):e?t==r:t===r},j.isError=function(t,r){if(!m(t)||!g(t))return!1;var e=i.toStr.call(t).toLowerCase();return"[object error]"===e||"[object domexception]"===e||!c(t[r])},j.isFile=function(t){return h()&&r(t)&&e(t).isFile()},j.isDirectory=function(t){return h()&&r(t)&&e(t).isDirectory()},j.isDocker=function(){if(!h())return!1;var t=u.tryWrap(function(){return e("/.dockerenv"),!0})(!1),r=u.tryWrap(function(){return~n("/proc/self/cgroup","utf8").indexOf("docker")})(!1);return t||r},j.isFloat=function(t){return y(t)&&Number(t)===t&&t%1!=0},j.isFunction=function(t){return m(t)&&"function"==typeof t},j.isInfinite=l,j.isInspect=function(t){if(m(t))return t;var r=w&&w.execArgv;return u.tryWrap(function(){return-1!==r.indexOf("--inspect")||-1!==r.indexOf("--inspect-brk")})(!1)},j.isInteger=function(t){return y(t)&&t%1==0},j.isNode=h,j.isNull=p,j.isNumber=y,j.isMoment=function(t){return g(t)&&t._isAMomentObject},j.isObject=g,j.isPlainObject=d,j.isPromise=function(t,r){return r=r||"Promise",!c(t)&&t.constructor&&t.constructor.name===r},j.isRegExp=function(t){return t&&t.constructor&&t.constructor===RegExp},j.isRoot=function(){return!!h()&&0===w.getuid()},j.isString=v,j.isSymbol=function(t){return m(t)&&"symbol"==typeof t},j.isTruthy=function(t){return!!m(t)&&("number"==typeof t?0<t:!(v(t)&&!t.length)&&(!1!==t&&t!==isNaN(t)))},j.isType=function(t,r){return t instanceof r},j.isUndefined=b,j.isUndefinedOrNull=function(t){return b(t)||p(t)},j.isUnique=function(t,r){return 1===s.duplicates(t,r)},j.isValue=m,j.isWindows=function(){return!!(h()&&w&&w.platform)&&0===w.platform.indexOf("win")}}.call(this)}.call(this,E("_process"),E("buffer").Buffer)},{"./array":3,"./constant":4,"./function":6,"./to":10,_process:19,buffer:15,fs:14}],8:[function(t,r,e){"use strict";var i=this&&this.__spreadArray||function(t,r){for(var e=0,n=r.length,i=t.length;e<n;e++,i++)t[i]=r[e];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.pick=e.omit=e.create=e.set=e.reverse=e.put=e.extend=e.clone=e.has=e.get=e.del=e.assign=void 0;var n=t("clone"),u=t("./array"),a=t("./is"),s=t("./string"),o=t("./to"),f=t("object-assign");function c(t){if(!t||!/\[\d+\]/.test(t))return!1;var r=t.match(/[^[]+/i),t=t.match(/\d+/g);return!!t&&{name:r[0],index:t[0],indices:t.slice(1)}}function l(t,r){if(2!==arguments.length||!a.isObject(t)||!a.isArray(r)&&!a.isString(r))return null;var e=s.split(r),n=e.shift(),i=c(n),r=t[n];return i&&(r=t[i.name][i.index]),0<e.length?l(r,e):i?t[i.name].splice(i.index,1):delete t[n],t}function h(t,r,e){if(3!==arguments.length||!a.isObject(t)||!a.isArray(r)&&!a.isString(r))return null;var n=s.split(r),i=n.shift(),o=c(i),r=t[i];return a.isValue(r)||o||(r=t[i]={}),o&&(t[o.name]||(t[o.name]=[]),r=t[o.name][o.index]),0<n.length?h(r,n,e):o?t[o.name][o.index]=e:t[i]=e,t}function p(t,r,e){if(!a.isObject(t)||!a.isArray(r)&&!a.isString(r))return null;var n=o.toArray(d(t,r),[]);return a.isArray(e)||(e=[e]),h(t,r,i(i([],n),e))}function y(t){for(var r=[],e=1;e<arguments.length;e++)r[e-1]=arguments[e];return Object.assign?Object.assign.apply(Object,i([t],r)):f.apply(void 0,i([t],r))}function g(t,r,e){return l(e?y({},t):t,r)}function d(t,r,e){var n=function(r,t){if(!a.isObject(r)||!a.isArray(t)&&!a.isString(t))return null;for(var e=a.isArray(t)?t:s.split(t);e.length&&r;){var n=e.shift(),i=c(n);i?a.isUndefined(r[i.name])||(r=r[i.name][i.index],i.indices.forEach(function(t){return r=r[t]})):r=r[n]}return r}(y({},t),r);return!a.isValue(n)&&e&&(h(t,r,e),n=e),n}function v(t,r,e,n){return h(n?y({},t):t,r,e)}e.assign=y,e.del=g,e.get=d,e.has=function(r,t){if(!a.isObject(r)||!a.isArray(t)&&!a.isString(t))return!1;r=y({},r);for(var e=a.isArray(t)?t:s.split(t);e.length&&r;){var n=e.shift(),i=c(n);if(!e.length){var o=u.keys(r);return i?u.contains(o,i.name)&&a.isValue(r[i.name][i.index]):u.contains(o,n)}i?a.isUndefined(r[i.name])||(r=r[i.name][i.index],i.indices.forEach(function(t){return r=r[t]})):r=r[n]}},e.clone=function(t,r){return r?JSON.parse(JSON.stringify(t)):n(t)},e.extend=function t(r){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var i=!1,o=r;if(a.isBoolean(o)){if(i=o,!e.length)return{};o=e[0],e=e.slice(1)}if(!a.isObject(o))return o;for(var u=0;u<e.length;){var s,f=e[u];for(s in f=a.isObject(f)?f:{})!function(e){f.hasOwnProperty(e)&&(i?a.isUndefined(f[e])||(o[e]=f[e]):a.isArray(f[e])&&a.isArray(o[e])?f[e].forEach(function(t,r){o[e][r]=t}):a.isArray(f[e])?o[e]=f[e]:a.isPlainObject(f[e])?o[e]=t(o[e]||{},f[e]):a.isUndefined(f[e])||(o[e]=f[e]))}(s);u++}return o},e.put=function(t,r,e,n){return p(n?y({},t):t,r,e)},e.reverse=function(t){if(!a.isValue(t))return null;if(a.isArray(t))return t.reverse();if(a.isString(t)){for(var r=t.toString().length,e="";r--;)e+=t[r];return e}var n,i={};for(n in t)a.isObject(t[n])||(i[t[n]]=n);return i},e.set=v,e.create=function(t){return Object.create(t||null)},e.omit=function(t,r,e){return r=o.toArray(r,[]),a.isValue(t)&&(a.isArray(t)||a.isObject(t)||a.isString(t))&&r&&r.length?(r=o.toArray(r),a.isString(t)?r.reduce(function(t,r){return r instanceof RegExp?t.replace(r,""):t=(t=(t.slice(0,t.indexOf(r))+t.slice(t.indexOf(r)+r.length)).replace(/\s{2}/," ")).replace(/\s[.!?;,:]/,t.slice(t.length-1))},t):a.isArray(t)?t.filter(function(t){return!~r.indexOf(t)}):e?r.reduce(function(t,r){return g(t,r,!0)},t):r.reduce(function(t,r){return g(t,r)},t)):t},e.pick=function(n,t){return t=o.toArray(t,[]),a.isValue(n)&&a.isObject(n)&&t&&t.length?t.reduce(function(t,r){var e=d(n,r,void 0);return a.isUndefined(e)?t:v(t,r,e)},{}):n}},{"./array":3,"./is":7,"./string":9,"./to":10,clone:16,"object-assign":18}],9:[function(t,r,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uuid=e.uppercase=e.titlecase=e.slugify=e.split=e.padValues=e.padRight=e.padLeft=e.lowercase=e.capitalize=e.decamelcase=e.camelcase=void 0;var u=t("./is"),o=t("./to");function s(t){return u.isValue(t)?""+(t=t.toLowerCase()).charAt(0).toUpperCase()+t.slice(1):null}function f(t,r,e,n){if(!u.isValue(t)||!u.isString(t))return null;u.isString(e)&&(e=e.length),n=n||" ";for(var i="";r--;)i+=n;return e?f("",e,null,n)+i+t:i+t}function a(t,r,e,n){if(!u.isValue(t)||!u.isString(t))return null;for(u.isString(e)&&(e=e.length),n=n||" ";r--;)t+=n;return e&&(t+=a("",e,null,n)),t}e.camelcase=function(t){return u.isValue(t)?(t=t.replace(/[^A-Za-z0-9]/g," ").replace(/^\w|[A-Z]|\b\w|\s+/g,function(t,r){return 0==+t||/(\.|-|_)/.test(t)?"":0===r?t.toLowerCase():t.toUpperCase()})).charAt(0).toLowerCase()+t.slice(1):null},e.decamelcase=function(t,r){return void 0===r&&(r="-"),u.isValue(t)?t.replace(/([a-z\d])([A-Z])/g,"$1"+r+"$2").replace(/([A-Z]+)([A-Z][a-z\d]+)/g,"$1"+r+"$2").toLowerCase():null},e.capitalize=s,e.lowercase=function(t){return u.isValue(t)?t.toLowerCase():null},e.padLeft=f,e.padRight=a,e.padValues=function(e,t,r,n){if(!u.isValue(e)||!u.isArray(e))return null;if(u.isString(r)&&(r=r.length),"none"===t)return e;var i=0;n=n||" ";var o="right"===(t=t||"right")?a:f;return e.forEach(function(t){t.length>i&&(i=t.length)}),r&&(i+=r),e.forEach(function(t,r){t.length<i&&(e[r]=o(t,i-t.length,null,n))}),e},e.split=function(t,r){if(u.isArray(t))return t;if(!u.isValue(t)||!u.isString(t))return null;var e;r=r?o.toArray(r):["/",".",",",";","|"];for(var n=0;n<r.length&&!e;)-1!==t.indexOf(r[n])&&(e=r[n]),n++;if(!u.isValue(e))return[t];var i=t.split(e).map(function(t){return t.trim()});return u.isEmpty(i[0])&&i.shift(),i},e.slugify=function(t){if(!u.isValue(t))return null;t=t.replace(/^\s+|\s+$/g,"").toLowerCase();for(var r="ãàáäâẽèéëêìíïîõòóöôùúüûñç·/_,:;",e=0,n=r.length;e<n;e++)t=t.replace(new RegExp(r.charAt(e),"g"),"aaaaaeeeeeiiiiooooouuuunc------".charAt(e));return t=t.replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")},e.titlecase=function(t,n){if(!u.isValue(t))return null;var i=/^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i;return t.replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g,function(t,r,e){return 0<r&&r+t.length!==e.length&&-1<t.search(i)&&";"!==e.charAt(r-2)&&("-"!==e.charAt(r+t.length)||"-"===e.charAt(r-1))&&e.charAt(r-1).search(/[^\s-]/)<0?!1===n?s(t):t.toLowerCase():-1<t.substr(1).search(/[A-Z]|\../)?t:t.charAt(0).toUpperCase()+t.substr(1)})},e.uppercase=function(t){return u.isValue(t)?t.toUpperCase():null},e.uuid=function(){var e=Date.now();return"undefined"!=typeof performance&&u.isFunction(performance.now)&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?r:3&r|8).toString(16)})}},{"./is":7,"./to":10}],10:[function(t,r,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toWindow=e.toUnnested=e.toString=e.toRegExp=e.toNumber=e.toNested=e.toMap=e.toInteger=e.toJSON=e.toFloat=e.toEpoch=e.toDefault=e.toDate=e.toBoolean=e.toArray=void 0;var s=t("./array"),i=t("./from"),f=t("./is"),a=t("./object"),o=t("./function"),c=t("./string");function u(t,r,e){if(f.isArray(r)&&(e=r,r=void 0),!f.isValue(t))return l(null,e||[]);if(f.isArray(t))return t;if(f.isPlainObject(t)&&r){var n,i,o,u=[];for(n in t)t.hasOwnProperty(n)&&(i=t[n],u=f.isPlainObject(i)?((o={})[r]=n,o=Object.assign({},i,o),s.push(u,o).array):s.push(u,t).array);return u}return f.isString(t)&&/^(.+(,|\||\s).+){1,}$/.test(t)?c.split(t):[t]}function n(t,r){return f.isBoolean(t)?t:f.isValue(t)?(t=t.toString(),0<parseFloat(t)||f.isInfinite(t)||"true"===t||"yes"===t||"1"===t||"+"===t):l(null,r)}function l(t,r){return!f.isValue(t)||f.isEmpty(t)&&!f.isEmpty(r)?f.isValue(r)?r:null:t}function h(t,r){if(f.isFloat(t))return t;if(!f.isValue(t))return l(null,r);r=o.tryWrap(parseFloat,t)(r);return f.isFloat(r)||f.isNumber(r)?r:n(t)?1:0}e.toArray=u,e.toBoolean=n,e.toDate=function(r,t,e){f.isDate(t)&&(e=t,t=void 0);var n=t;return f.isString(n)&&(n={timeZone:t}),f.isDate(r)?r:!/^[0-9]+$/.test(r)&&f.isString(r)&&/[0-9]/g.test(r)&&/(\.|\/|-|:)/g.test(r)?o.tryWrap(function(){var t=Date.parse(r);return isNaN(t)?l(null,e):(t=i.fromEpoch(t),n&&(n.locales=n.locales||"en-US",t=new Date(t.toLocaleString(n.locales,n))),t)})(e):l(null,e)},e.toDefault=l,e.toEpoch=function(t,r){return l(f.isDate(t)&&t.getTime(),r)},e.toFloat=h,e.toJSON=function(t,r,e){f.isString(r)&&(e=r,r=void 0);var n=0,n=(r=f.isBoolean(r)?2:r)||n;return f.isObject(t)?o.tryWrap(JSON.stringify,t,null,n)(e):l(null,e)},e.toInteger=function(t,r){return f.isValue(t)?(r=o.tryWrap(parseInt,t)(r),f.isInteger(r)?r:n(t)?1:0):l(null,r)},e.toMap=function(t,r,e){if(f.isValue(r)&&!f.isString(r)&&(e=r,r=void 0),f.isPlainObject(t))return t;if(!f.isValue(t)||!f.isString(t)&&!f.isArray(t))return l(null,e);r=r||"$id";var n,i,o=0,u={};if(f.isString(t))return/(\/|\.|,|;|\|)/g.test(t)?((t=c.split(t)).forEach(function(t,r){return u[r]=t}),u):{0:t};for(;o<t.length;)f.isString(t[o])?u[o]=t[o]:f.isPlainObject(t[o])&&(i=(n=Object.assign({},t[o]))[r]||o,u[i]=n[r]?a.del(n,r):n),o++;return u},e.toNested=function(t,r){return o.tryWrap(function(t){var r,e={};for(r in t)t.hasOwnProperty(r)&&(/\./g.test(r)?a.set(e,r,t[r]):e[r]=t[r]);return e},t)(r)},e.toNumber=function(t,r){return h(t)},e.toRegExp=function(r,t){var e=/^\/.+\/(g|i|m)?([m,i,u,y]{1,4})?/,n=/(g|i|m)?([m,i,u,y]{1,4})?$/;return f.isRegExp(r)?r:f.isValue(r)&&f.isString(r)?o.tryWrap(function(){var t;return e.test(r)&&(t=n.exec(r)[0],r=r.replace(/^\//,"").replace(n,"").replace(/\/$/,"")),new RegExp(r,t)})(t):l(null,t)},e.toString=function(t,r){return f.isString(t)?t:f.isValue(t)?o.tryWrap(function(){return t.toString()})(r):l(null,r)},e.toUnnested=function(t,u,r){f.isValue(u)&&!f.isBoolean(u)&&(r=u,u=void 0);var s=0;return o.tryWrap(function t(r,e,n){for(var i in e=e||{},r){if(0<s)return;var o;r.hasOwnProperty(i)&&(f.isPlainObject(r[i])?(o=!1!==u&&n&&n.length?n+"."+i:i,t(r[i],e,o)):e[o=!1!==u&&n&&n.length?n+"."+i:i]?s+=1:e[o]=r[i])}return 0<s?null:e},a.clone(t))(r)},e.toWindow=function(t,r,e){if(f.isBrowser())if(e=u(e),f.isString(t))if(f.isPlainObject(r)){for(var n,i={},o=(n=s.keys(r)).length;o--;)s.contains(e,n[o])||(i[n[o]]=r[n[o]]);window[t]=i}else window[t]=r;else if(f.isPlainObject(t))for(o=(n=s.keys(t)).length;o--;)s.contains(e,n[o])||(window[n[o]]=t[n[o]])}},{"./array":3,"./from":5,"./function":6,"./is":7,"./object":8,"./string":9}],11:[function(t,r,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getType=e.castType=void 0;var o=t("./is"),u=t("./to"),s=t("./function"),f={boolean:u.toBoolean,date:u.toDate,float:u.toFloat,integer:u.toInteger,number:u.toNumber,regexp:u.toRegExp,string:u.toString,epoch:u.toEpoch,any:function(t){return t}};function a(t,r,e){o.isString(r)&&(e=r,r=void 0);var n=typeof t;o.isValue(r);return"undefined"==n||"object"!=n&&"number"!=n&&"string"!=n?n:o.isNull(t)?"null":o.isDate(t)?"date":o.isNumber(t)?r?"number":o.isFloat(t)?"float":o.isInteger(t)?"integer":"number":o.isPlainObject(t)?r?n:"literal":o.isError(t)?"error":o.isRegExp(t)?"regexp":o.isArray(t)?"array":o.isString(t)?"string":t.constructor&&t.constructor.name?r?n:t.constructor.name:e||"any"}e.castType=function e(r,n,i){return s.tryWrap(function(){if(!o.isValue(r))return u.toDefault(null,i);if(n=n||a(r),o.isArray(n))return u.toArray(r).map(function(t,r){return e(t,n[r]||n[r-1]||n[0])});if(o.isFunction(n))return r=u.toArray(r),n.apply(void 0,r);if(o.isString(n)){n=n.toLowerCase();var t=f[n];return t?t(r):u.toDefault(null,i)}return r})(i)},e.getType=a},{"./function":6,"./is":7,"./to":10}],12:[function(t,r,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},{}],13:[function(t,r,e){"use strict";e.byteLength=function(t){var r=c(t),t=r[0],r=r[1];return 3*(t+r)/4-r},e.toByteArray=function(t){var r,e,n=c(t),i=n[0],n=n[1],o=new a(function(t,r){return 3*(t+r)/4-r}(i,n)),u=0,s=0<n?i-4:i;for(e=0;e<s;e+=4)r=f[t.charCodeAt(e)]<<18|f[t.charCodeAt(e+1)]<<12|f[t.charCodeAt(e+2)]<<6|f[t.charCodeAt(e+3)],o[u++]=r>>16&255,o[u++]=r>>8&255,o[u++]=255&r;2===n&&(r=f[t.charCodeAt(e)]<<2|f[t.charCodeAt(e+1)]>>4,o[u++]=255&r);1===n&&(r=f[t.charCodeAt(e)]<<10|f[t.charCodeAt(e+1)]<<4|f[t.charCodeAt(e+2)]>>2,o[u++]=r>>8&255,o[u++]=255&r);return o},e.fromByteArray=function(t){for(var r,e=t.length,n=e%3,i=[],o=0,u=e-n;o<u;o+=16383)i.push(function(t,r,e){for(var n,i=[],o=r;o<e;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(function(t){return s[t>>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}(n));return i.join("")}(t,o,u<o+16383?u:o+16383));1==n?(r=t[e-1],i.push(s[r>>2]+s[r<<4&63]+"==")):2==n&&(r=(t[e-2]<<8)+t[e-1],i.push(s[r>>10]+s[r>>4&63]+s[r<<2&63]+"="));return i.join("")};for(var s=[],f=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,o=n.length;i<o;++i)s[i]=n[i],f[n.charCodeAt(i)]=i;function c(t){var r=t.length;if(0<r%4)throw new Error("Invalid string. Length must be a multiple of 4");t=t.indexOf("=");return[t=-1===t?r:t,t===r?0:4-t%4]}f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63},{}],14:[function(t,r,e){},{}],15:[function(P,t,I){!function(t){!function(){"use strict";var s=P("base64-js"),o=P("ieee754");I.Buffer=l,I.SlowBuffer=function(t){+t!=t&&(t=0);return l.alloc(+t)},I.INSPECT_MAX_BYTES=50;var r=2147483647;function i(t){if(r<t)throw new RangeError('The value "'+t+'" is invalid for option "size"');t=new Uint8Array(t);return t.__proto__=l.prototype,t}function l(t,r,e){if("number"!=typeof t)return n(t,r,e);if("string"==typeof r)throw new TypeError('The "string" argument must be of type string. Received type number');return f(t)}function n(t,r,e){if("string"==typeof t)return function(t,r){"string"==typeof r&&""!==r||(r="utf8");if(!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var e=0|h(t,r),n=i(e),r=n.write(t,r);r!==e&&(n=n.slice(0,r));return n}(t,r);if(ArrayBuffer.isView(t))return a(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(T(t,ArrayBuffer)||t&&T(t.buffer,ArrayBuffer))return function(t,r,e){if(r<0||t.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<r+(e||0))throw new RangeError('"length" is outside of buffer bounds');e=void 0===r&&void 0===e?new Uint8Array(t):void 0===e?new Uint8Array(t,r):new Uint8Array(t,r,e);return e.__proto__=l.prototype,e}(t,r,e);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return l.from(n,r,e);n=function(t){if(l.isBuffer(t)){var r=0|c(t.length),e=i(r);return 0===e.length?e:(t.copy(e,0,0,r),e)}if(void 0!==t.length)return"number"!=typeof t.length||U(t.length)?i(0):a(t);if("Buffer"===t.type&&Array.isArray(t.data))return a(t.data)}(t);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return l.from(t[Symbol.toPrimitive]("string"),r,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return u(t),i(t<0?0:0|c(t))}function a(t){for(var r=t.length<0?0:0|c(t.length),e=i(r),n=0;n<r;n+=1)e[n]=255&t[n];return e}function c(t){if(r<=t)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|t}function h(t,r){if(l.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||T(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var e=t.length,n=2<arguments.length&&!0===arguments[2];if(!n&&0===e)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return S(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return _(t).length;default:if(i)return n?-1:S(t).length;r=(""+r).toLowerCase(),i=!0}}function e(t,r,e){var n,i,o,u=!1;if((r=void 0===r||r<0?0:r)>this.length)return"";if((e=void 0===e||e>this.length?this.length:e)<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t=t||"utf8";;)switch(t){case"hex":return function(t,r,e){var n=t.length;(!r||r<0)&&(r=0);(!e||e<0||n<e)&&(e=n);for(var i="",o=r;o<e;++o)i+=function(t){return t<16?"0"+t.toString(16):t.toString(16)}(t[o]);return i}(this,r,e);case"utf8":case"utf-8":return b(this,r,e);case"ascii":return function(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}(this,r,e);case"latin1":case"binary":return function(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}(this,r,e);case"base64":return n=this,o=e,0===(i=r)&&o===n.length?s.fromByteArray(n):s.fromByteArray(n.slice(i,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(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}(this,r,e);default:if(u)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),u=!0}}function p(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function y(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):2147483647<e?e=2147483647:e<-2147483648&&(e=-2147483648),(e=(e=U(e=+e)?i?0:t.length-1:e)<0?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=l.from(r,n)),l.isBuffer(r))return 0===r.length?-1:g(t,r,e,n,i);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?(i?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(t,r,e):g(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function g(t,r,e,n,i){var o=1,u=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/=o=2,s/=2,e/=2}function f(t,r){return 1===o?t[r]:t.readUInt16BE(r*o)}if(i)for(var a=-1,c=e;c<u;c++)if(f(t,c)===f(r,-1===a?0:c-a)){if(c-(a=-1===a?c:a)+1===s)return a*o}else-1!==a&&(c-=c-a),a=-1;else for(c=e=u<e+s?u-s:e;0<=c;c--){for(var l=!0,h=0;h<s;h++)if(f(t,c+h)!==f(r,h)){l=!1;break}if(l)return c}return-1}function d(t,r,e,n){return B(function(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}(r),t,e,n)}function v(t,r,e,n){return B(function(t,r){for(var e,n,i=[],o=0;o<t.length&&!((r-=2)<0);++o)n=t.charCodeAt(o),e=n>>8,n=n%256,i.push(n),i.push(e);return i}(r,t.length-e),t,e,n)}function b(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o,u,s,f,a=t[i],c=null,l=239<a?4:223<a?3:191<a?2:1;if(i+l<=e)switch(l){case 1:a<128&&(c=a);break;case 2:128==(192&(o=t[i+1]))&&127<(f=(31&a)<<6|63&o)&&(c=f);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&2047<(f=(15&a)<<12|(63&o)<<6|63&u)&&(f<55296||57343<f)&&(c=f);break;case 4:o=t[i+1],u=t[i+2],s=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&s)&&65535<(f=(15&a)<<18|(63&o)<<12|(63&u)<<6|63&s)&&f<1114112&&(c=f)}null===c?(c=65533,l=1):65535<c&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=l}return function(t){var r=t.length;if(r<=m)return String.fromCharCode.apply(String,t);var e="",n=0;for(;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=m));return e}(n)}I.kMaxLength=r,(l.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),l.poolSize=8192,l.from=n,l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,l.alloc=function(t,r,e){return r=r,e=e,u(t=t),!(t<=0)&&void 0!==r?"string"==typeof e?i(t).fill(r,e):i(t).fill(r):i(t)},l.allocUnsafe=f,l.allocUnsafeSlow=f,l.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==l.prototype},l.compare=function(t,r){if(T(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),T(r,Uint8Array)&&(r=l.from(r,r.offset,r.byteLength)),!l.isBuffer(t)||!l.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i<o;++i)if(t[i]!==r[i]){e=t[i],n=r[i];break}return e<n?-1:n<e?1:0},l.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}},l.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return l.alloc(0);if(void 0===r)for(i=r=0;i<t.length;++i)r+=t[i].length;for(var e=l.allocUnsafe(r),n=0,i=0;i<t.length;++i){var o=t[i];if(T(o,Uint8Array)&&(o=l.from(o)),!l.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(e,n),n+=o.length}return e},l.byteLength=h,l.prototype._isBuffer=!0,l.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)p(this,r,r+1);return this},l.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)p(this,r,r+3),p(this,r+1,r+2);return this},l.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)p(this,r,r+7),p(this,r+1,r+6),p(this,r+2,r+5),p(this,r+3,r+4);return this},l.prototype.toLocaleString=l.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?b(this,0,t):e.apply(this,arguments)},l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function(){var t="",r=I.INSPECT_MAX_BYTES,t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim();return this.length>r&&(t+=" ... "),"<Buffer "+t+">"},l.prototype.compare=function(t,r,e,n,i){if(T(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),(r=void 0===r?0:r)<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(i<=n&&e<=r)return 0;if(i<=n)return-1;if(e<=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),s=Math.min(o,u),f=this.slice(n,i),a=t.slice(r,e),c=0;c<s;++c)if(f[c]!==a[c]){o=f[c],u=a[c];break}return o<u?-1:u<o?1:0},l.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},l.prototype.indexOf=function(t,r,e){return y(this,t,r,e,!0)},l.prototype.lastIndexOf=function(t,r,e){return y(this,t,r,e,!1)},l.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||i<e)&&(e=i),0<t.length&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n=n||"utf8";for(var o,u,s,f=!1;;)switch(n){case"hex":return function(t,r,e,n){e=Number(e)||0;var i=t.length-e;(!n||i<(n=Number(n)))&&(n=i),(i=r.length)/2<n&&(n=i/2);for(var o=0;o<n;++o){var u=parseInt(r.substr(2*o,2),16);if(U(u))return o;t[e+o]=u}return o}(this,t,r,e);case"utf8":case"utf-8":return u=r,s=e,B(S(t,(o=this).length-u),o,u,s);case"ascii":return d(this,t,r,e);case"latin1":case"binary":return d(this,t,r,e);case"base64":return o=this,u=r,s=e,B(_(t),o,u,s);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v(this,t,r,e);default:if(f)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),f=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var m=4096;function w(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(e<t+r)throw new RangeError("Trying to access beyond buffer length")}function A(t,r,e,n,i,o){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(i<r||r<o)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function E(t,r,e,n){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function O(t,r,e,n,i){return r=+r,e>>>=0,i||E(t,0,e,4),o.write(t,r,e,n,23,4),e+4}function j(t,r,e,n,i){return r=+r,e>>>=0,i||E(t,0,e,8),o.write(t,r,e,n,52,8),e+8}l.prototype.slice=function(t,r){var e=this.length;(t=~~t)<0?(t+=e)<0&&(t=0):e<t&&(t=e),(r=void 0===r?e:~~r)<0?(r+=e)<0&&(r=0):e<r&&(r=e);r=this.subarray(t,r=r<t?t:r);return r.__proto__=l.prototype,r},l.prototype.readUIntLE=function(t,r,e){t>>>=0,r>>>=0,e||w(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n},l.prototype.readUIntBE=function(t,r,e){t>>>=0,r>>>=0,e||w(t,r,this.length);for(var n=this[t+--r],i=1;0<r&&(i*=256);)n+=this[t+--r]*i;return n},l.prototype.readUInt8=function(t,r){return t>>>=0,r||w(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,r){return t>>>=0,r||w(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,r){return t>>>=0,r||w(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,r){return t>>>=0,r||w(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUInt32BE=function(t,r){return t>>>=0,r||w(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,r,e){t>>>=0,r>>>=0,e||w(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&&(n-=Math.pow(2,8*r)),n},l.prototype.readIntBE=function(t,r,e){t>>>=0,r>>>=0,e||w(t,r,this.length);for(var n=r,i=1,o=this[t+--n];0<n&&(i*=256);)o+=this[t+--n]*i;return(i*=128)<=o&&(o-=Math.pow(2,8*r)),o},l.prototype.readInt8=function(t,r){return t>>>=0,r||w(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,r){t>>>=0,r||w(t,2,this.length);t=this[t]|this[t+1]<<8;return 32768&t?4294901760|t:t},l.prototype.readInt16BE=function(t,r){t>>>=0,r||w(t,2,this.length);t=this[t+1]|this[t]<<8;return 32768&t?4294901760|t:t},l.prototype.readInt32LE=function(t,r){return t>>>=0,r||w(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,r){return t>>>=0,r||w(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,r){return t>>>=0,r||w(t,4,this.length),o.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,r){return t>>>=0,r||w(t,4,this.length),o.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,r){return t>>>=0,r||w(t,8,this.length),o.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,r){return t>>>=0,r||w(t,8,this.length),o.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function(t,r,e,n){t=+t,r>>>=0,e>>>=0,n||A(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},l.prototype.writeUIntBE=function(t,r,e,n){t=+t,r>>>=0,e>>>=0,n||A(this,t,r,e,Math.pow(2,8*e)-1,0);var i=e-1,o=1;for(this[r+i]=255&t;0<=--i&&(o*=256);)this[r+i]=t/o&255;return r+e},l.prototype.writeUInt8=function(t,r,e){return t=+t,r>>>=0,e||A(this,t,r,1,255,0),this[r]=255&t,r+1},l.prototype.writeUInt16LE=function(t,r,e){return t=+t,r>>>=0,e||A(this,t,r,2,65535,0),this[r]=255&t,this[r+1]=t>>>8,r+2},l.prototype.writeUInt16BE=function(t,r,e){return t=+t,r>>>=0,e||A(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=255&t,r+2},l.prototype.writeUInt32LE=function(t,r,e){return t=+t,r>>>=0,e||A(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t,r+4},l.prototype.writeUInt32BE=function(t,r,e){return t=+t,r>>>=0,e||A(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t,r+4},l.prototype.writeIntLE=function(t,r,e,n){t=+t,r>>>=0,n||A(this,t,r,e,(n=Math.pow(2,8*e-1))-1,-n);var i=0,o=1,u=0;for(this[r]=255&t;++i<e&&(o*=256);)t<0&&0===u&&0!==this[r+i-1]&&(u=1),this[r+i]=(t/o>>0)-u&255;return r+e},l.prototype.writeIntBE=function(t,r,e,n){t=+t,r>>>=0,n||A(this,t,r,e,(n=Math.pow(2,8*e-1))-1,-n);var i=e-1,o=1,u=0;for(this[r+i]=255&t;0<=--i&&(o*=256);)t<0&&0===u&&0!==this[r+i+1]&&(u=1),this[r+i]=(t/o>>0)-u&255;return r+e},l.prototype.writeInt8=function(t,r,e){return t=+t,r>>>=0,e||A(this,t,r,1,127,-128),this[r]=255&(t=t<0?255+t+1:t),r+1},l.prototype.writeInt16LE=function(t,r,e){return t=+t,r>>>=0,e||A(this,t,r,2,32767,-32768),this[r]=255&t,this[r+1]=t>>>8,r+2},l.prototype.writeInt16BE=function(t,r,e){return t=+t,r>>>=0,e||A(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=255&t,r+2},l.prototype.writeInt32LE=function(t,r,e){return t=+t,r>>>=0,e||A(this,t,r,4,2147483647,-2147483648),this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4},l.prototype.writeInt32BE=function(t,r,e){return t=+t,r>>>=0,e||A(this,t,r,4,2147483647,-2147483648),this[r]=(t=t<0?4294967295+t+1:t)>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t,r+4},l.prototype.writeFloatLE=function(t,r,e){return O(this,t,r,!0,e)},l.prototype.writeFloatBE=function(t,r,e){return O(this,t,r,!1,e)},l.prototype.writeDoubleLE=function(t,r,e){return j(this,t,r,!0,e)},l.prototype.writeDoubleBE=function(t,r,e){return j(this,t,r,!1,e)},l.prototype.copy=function(t,r,e,n){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");if(e=e||0,n||0===n||(n=this.length),r>=t.length&&(r=t.length),(n=0<n&&n<e?e:n)===e)return 0;if(0===t.length||0===this.length)return 0;if((r=r||0)<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length);var i=(n=t.length-r<n-e?t.length-r+e:n)-e;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(r,e,n);else if(this===t&&e<r&&r<n)for(var o=i-1;0<=o;--o)t[o+r]=this[o+e];else Uint8Array.prototype.set.call(t,this.subarray(e,n),r);return i},l.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),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!l.isEncoding(n))throw new TypeError("Unknown encoding: "+n);var i;1===t.length&&(i=t.charCodeAt(0),("utf8"===n&&i<128||"latin1"===n)&&(t=i))}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;var o;if(r>>>=0,e=void 0===e?this.length:e>>>0,"number"==typeof(t=t||0))for(o=r;o<e;++o)this[o]=t;else{var u=l.isBuffer(t)?t:l.from(t,n),s=u.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<e-r;++o)this[o+r]=u[o%s]}return this};var x=/[^+/0-9A-Za-z-_]/g;function S(t,r){var e;r=r||1/0;for(var n=t.length,i=null,o=[],u=0;u<n;++u){if(55295<(e=t.charCodeAt(u))&&e<57344){if(!i){if(56319<e){-1<(r-=3)&&o.push(239,191,189);continue}if(u+1===n){-1<(r-=3)&&o.push(239,191,189);continue}i=e;continue}if(e<56320){-1<(r-=3)&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&-1<(r-=3)&&o.push(239,191,189);if(i=null,e<128){if(--r<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 _(t){return s.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(x,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function B(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 T(t,r){return t instanceof r||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===r.name}function U(t){return t!=t}}.call(this)}.call(this,P("buffer").Buffer)},{"base64-js":13,buffer:15,ieee754:17}],16:[function(t,r,e){!function(x){!function(){var t=function(){"use strict";function m(t,r){return null!=r&&t instanceof r}var w,A,E;try{w=Map}catch(t){w=function(){}}try{A=Set}catch(t){A=function(){}}try{E=Promise}catch(t){E=function(){}}function O(t,p,r,y,g){"object"==typeof p&&(r=p.depth,y=p.prototype,g=p.includeNonEnumerable,p=p.circular);var d=[],v=[],b=void 0!==x;return void 0===p&&(p=!0),function n(t,i){if(null===t)return null;if(0===i)return t;var e,r,o;if("object"!=typeof t)return t;if(m(t,w))e=new w;else if(m(t,A))e=new A;else if(m(t,E))e=new E(function(r,e){t.then(function(t){r(n(t,i-1))},function(t){e(n(t,i-1))})});else if(O.__isArray(t))e=[];else if(O.__isRegExp(t))e=new RegExp(t.source,j(t)),t.lastIndex&&(e.lastIndex=t.lastIndex);else if(O.__isDate(t))e=new Date(t.getTime());else{if(b&&x.isBuffer(t))return e=x.allocUnsafe?x.allocUnsafe(t.length):new x(t.length),t.copy(e),e;m(t,Error)?e=Object.create(t):void 0===y?(r=Object.getPrototypeOf(t),e=Object.create(r)):(e=Object.create(y),r=y)}if(p){var u=d.indexOf(t);if(-1!=u)return v[u];d.push(t),v.push(e)}for(f in m(t,w)&&t.forEach(function(t,r){r=n(r,i-1),t=n(t,i-1),e.set(r,t)}),m(t,A)&&t.forEach(function(t){t=n(t,i-1),e.add(t)}),t)(o=r?Object.getOwnPropertyDescriptor(r,f):o)&&null==o.set||(e[f]=n(t[f],i-1));if(Object.getOwnPropertySymbols)for(var s=Object.getOwnPropertySymbols(t),f=0;f<s.length;f++){var a=s[f];(l=Object.getOwnPropertyDescriptor(t,a))&&!l.enumerable&&!g||(e[a]=n(t[a],i-1),l.enumerable||Object.defineProperty(e,a,{enumerable:!1}))}if(g)for(var c=Object.getOwnPropertyNames(t),f=0;f<c.length;f++){var l,h=c[f];(l=Object.getOwnPropertyDescriptor(t,h))&&l.enumerable||(e[h]=n(t[h],i-1),Object.defineProperty(e,h,{enumerable:!1}))}return e}(t,r=void 0===r?1/0:r)}function r(t){return Object.prototype.toString.call(t)}function j(t){var r="";return t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),r}return O.clonePrototype=function(t){if(null===t)return null;function r(){}return r.prototype=t,new r},O.__objToStr=r,O.__isDate=function(t){return"object"==typeof t&&"[object Date]"===r(t)},O.__isArray=function(t){return"object"==typeof t&&"[object Array]"===r(t)},O.__isRegExp=function(t){return"object"==typeof t&&"[object RegExp]"===r(t)},O.__getRegExpFlags=j,O}();"object"==typeof r&&r.exports&&(r.exports=t)}.call(this)}.call(this,t("buffer").Buffer)},{buffer:15}],17:[function(t,r,e){e.read=function(t,r,e,n,i){var o,u,s=8*i-n-1,f=(1<<s)-1,a=f>>1,c=-7,l=e?i-1:0,h=e?-1:1,e=t[r+l];for(l+=h,o=e&(1<<-c)-1,e>>=-c,c+=s;0<c;o=256*o+t[r+l],l+=h,c-=8);for(u=o&(1<<-c)-1,o>>=-c,c+=n;0<c;u=256*u+t[r+l],l+=h,c-=8);if(0===o)o=1-a;else{if(o===f)return u?NaN:1/0*(e?-1:1);u+=Math.pow(2,n),o-=a}return(e?-1:1)*u*Math.pow(2,o-n)},e.write=function(t,r,e,n,i,o){var u,s,f=8*o-i-1,a=(1<<f)-1,c=a>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,o=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(s=isNaN(r)?1:0,u=a):(u=Math.floor(Math.log(r)/Math.LN2),r*(n=Math.pow(2,-u))<1&&(u--,n*=2),2<=(r+=1<=u+c?l/n:l*Math.pow(2,1-c))*n&&(u++,n/=2),a<=u+c?(s=0,u=a):1<=u+c?(s=(r*n-1)*Math.pow(2,i),u+=c):(s=r*Math.pow(2,c-1)*Math.pow(2,i),u=0));8<=i;t[e+h]=255&s,h+=p,s/=256,i-=8);for(u=u<<i|s,f+=i;0<f;t[e+h]=255&u,h+=p,u/=256,f-=8);t[e+h-p]|=128*o}},{}],18:[function(t,r,e){"use strict";var f=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable;r.exports=function(){try{if(!Object.assign)return;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return;for(var r={},e=0;e<10;e++)r["_"+String.fromCharCode(e)]=e;if("0123456789"!==Object.getOwnPropertyNames(r).map(function(t){return r[t]}).join(""))return;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},n)).join("")?void 0:1}catch(t){return}}()?Object.assign:function(t,r){for(var e,n=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),i=1;i<arguments.length;i++){for(var o in e=Object(arguments[i]))a.call(e,o)&&(n[o]=e[o]);if(f)for(var u=f(e),s=0;s<u.length;s++)c.call(e,u[s])&&(n[u[s]]=e[u[s]])}return n}},{}],19:[function(t,r,e){var n,i,r=r.exports={};function o(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function s(r){if(n===setTimeout)return setTimeout(r,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(r,0);try{return n(r,0)}catch(t){try{return n.call(null,r,0)}catch(t){return n.call(this,r,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:u}catch(t){i=u}}();var f,a=[],c=!1,l=-1;function h(){c&&f&&(c=!1,f.length?a=f.concat(a):l=-1,a.length&&p())}function p(){if(!c){var t=s(h);c=!0;for(var r=a.length;r;){for(f=a,a=[];++l<r;)f&&f[l].run();l=-1,r=a.length}f=null,c=!1,function(r){if(i===clearTimeout)return clearTimeout(r);if((i===u||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(r);try{i(r)}catch(t){try{return i.call(null,r)}catch(t){return i.call(this,r)}}}(t)}}function y(t,r){this.fun=t,this.array=r}function g(){}r.nextTick=function(t){var r=new Array(arguments.length-1);if(1<arguments.length)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];a.push(new y(t,r)),1!==a.length||c||s(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=g,r.addListener=g,r.once=g,r.off=g,r.removeListener=g,r.removeAllListeners=g,r.emit=g,r.prependListener=g,r.prependOnceListener=g,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},{}]},{},[2]);