UNPKG

p3x-redis-ui-material

Version:

💿 The p3x-redis-ui-material web interface that connects to the p3x-redis-ui-server via http and socket.io

33 lines (24 loc) • 3.33 MB
/*! @license p3x-redis-ui-material v2020.10.144 💿 The p3x-redis-ui-material web interface that connects to the p3x-redis-ui-server via http and socket.io https://corifeus.com/redis-ui-material Copyright (c) 2020 Patrik Laszlo / P3X / Corifeus and contributors. MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information about all licenses, please see bundle.7c4ba587994d84fef5f2.js.LICENSE.txt */ !function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:!1,exports:{}};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.l=!0,module.exports}__webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.d=function(exports,name,getter){__webpack_require__.o(exports,name)||Object.defineProperty(exports,name,{enumerable:!0,get:getter})},__webpack_require__.r=function(exports){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.t=function(value,mode){if(1&mode&&(value=__webpack_require__(value)),8&mode)return value;if(4&mode&&"object"==typeof value&&value&&value.__esModule)return value;var ns=Object.create(null);if(__webpack_require__.r(ns),Object.defineProperty(ns,"default",{enumerable:!0,value}),2&mode&&"string"!=typeof value)for(var key in value)__webpack_require__.d(ns,key,function(key){return value[key]}.bind(null,key));return ns},__webpack_require__.n=function(module){var getter=module&&module.__esModule?function(){return module.default}:function(){return module};return __webpack_require__.d(getter,"a",getter),getter},__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=44)}([function(module,__webpack_exports__,__webpack_require__){"use strict";(function(global){__webpack_require__.d(__webpack_exports__,"M",(function(){return root})),__webpack_require__.d(__webpack_exports__,"x",(function(){return fromJson})),__webpack_require__.d(__webpack_exports__,"Q",(function(){return toJson})),__webpack_require__.d(__webpack_exports__,"w",(function(){return forEach})),__webpack_require__.d(__webpack_exports__,"r",(function(){return extend})),__webpack_require__.d(__webpack_exports__,"q",(function(){return equals})),__webpack_require__.d(__webpack_exports__,"y",(function(){return identity})),__webpack_require__.d(__webpack_exports__,"E",(function(){return noop})),__webpack_require__.d(__webpack_exports__,"n",(function(){return createProxyFunctions})),__webpack_require__.d(__webpack_exports__,"A",(function(){return inherit})),__webpack_require__.d(__webpack_exports__,"z",(function(){return inArray})),__webpack_require__.d(__webpack_exports__,"b",(function(){return _inArray})),__webpack_require__.d(__webpack_exports__,"L",(function(){return removeFrom})),__webpack_require__.d(__webpack_exports__,"d",(function(){return _removeFrom})),__webpack_require__.d(__webpack_exports__,"K",(function(){return pushTo})),__webpack_require__.d(__webpack_exports__,"c",(function(){return _pushTo})),__webpack_require__.d(__webpack_exports__,"p",(function(){return deregAll})),__webpack_require__.d(__webpack_exports__,"o",(function(){return defaults})),__webpack_require__.d(__webpack_exports__,"D",(function(){return mergeR})),__webpack_require__.d(__webpack_exports__,"f",(function(){return ancestors})),__webpack_require__.d(__webpack_exports__,"H",(function(){return pick})),__webpack_require__.d(__webpack_exports__,"F",(function(){return omit})),__webpack_require__.d(__webpack_exports__,"I",(function(){return pluck})),__webpack_require__.d(__webpack_exports__,"s",(function(){return filter})),__webpack_require__.d(__webpack_exports__,"t",(function(){return find})),__webpack_require__.d(__webpack_exports__,"C",(function(){return mapObj})),__webpack_require__.d(__webpack_exports__,"B",(function(){return map})),__webpack_require__.d(__webpack_exports__,"U",(function(){return values})),__webpack_require__.d(__webpack_exports__,"e",(function(){return allTrueR})),__webpack_require__.d(__webpack_exports__,"g",(function(){return anyTrueR})),__webpack_require__.d(__webpack_exports__,"T",(function(){return unnestR})),__webpack_require__.d(__webpack_exports__,"v",(function(){return flattenR})),__webpack_require__.d(__webpack_exports__,"J",(function(){return pushR})),__webpack_require__.d(__webpack_exports__,"R",(function(){return uniqR})),__webpack_require__.d(__webpack_exports__,"S",(function(){return unnest})),__webpack_require__.d(__webpack_exports__,"u",(function(){return flatten})),__webpack_require__.d(__webpack_exports__,"l",(function(){return assertPredicate})),__webpack_require__.d(__webpack_exports__,"k",(function(){return assertMap})),__webpack_require__.d(__webpack_exports__,"j",(function(){return assertFn})),__webpack_require__.d(__webpack_exports__,"G",(function(){return pairs})),__webpack_require__.d(__webpack_exports__,"i",(function(){return arrayTuples})),__webpack_require__.d(__webpack_exports__,"h",(function(){return applyPairs})),__webpack_require__.d(__webpack_exports__,"P",(function(){return tail})),__webpack_require__.d(__webpack_exports__,"m",(function(){return copy})),__webpack_require__.d(__webpack_exports__,"a",(function(){return _extend})),__webpack_require__.d(__webpack_exports__,"N",(function(){return silenceUncaughtInPromise})),__webpack_require__.d(__webpack_exports__,"O",(function(){return silentRejection}));var _predicates__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1),_hof__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(2),_coreservices__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(3),__spreadArrays=function(){for(var s=0,i=0,il=arguments.length;i<il;i++)s+=arguments[i].length;var r=Array(s),k=0;for(i=0;i<il;i++)for(var a=arguments[i],j=0,jl=a.length;j<jl;j++,k++)r[k]=a[j];return r},root="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||void 0,angular=root.angular||{},fromJson=angular.fromJson||JSON.parse.bind(JSON),toJson=angular.toJson||JSON.stringify.bind(JSON),forEach=angular.forEach||function(obj,cb,_this){if(Object(_predicates__WEBPACK_IMPORTED_MODULE_0__.a)(obj))return obj.forEach(cb,_this);Object.keys(obj).forEach((function(key){return cb(obj[key],key)}))},extend=Object.assign||_extend,equals=angular.equals||_equals;function identity(x){return x}function noop(){}function createProxyFunctions(source,target,bind,fnNames,latebind){void 0===latebind&&(latebind=!1);var bindFunction=function(fnName){return source()[fnName].bind(bind())};return(fnNames=fnNames||Object.keys(source())).reduce((function(acc,name){var fnName;return acc[name]=latebind?(fnName=name,function(){return target[fnName]=bindFunction(fnName),target[fnName].apply(null,arguments)}):bindFunction(name),acc}),target)}var inherit=function(parent,extra){return extend(Object.create(parent),extra)},inArray=Object(_hof__WEBPACK_IMPORTED_MODULE_1__.e)(_inArray);function _inArray(array,obj){return-1!==array.indexOf(obj)}var removeFrom=Object(_hof__WEBPACK_IMPORTED_MODULE_1__.e)(_removeFrom);function _removeFrom(array,obj){var idx=array.indexOf(obj);return idx>=0&&array.splice(idx,1),array}var pushTo=Object(_hof__WEBPACK_IMPORTED_MODULE_1__.e)(_pushTo);function _pushTo(arr,val){return arr.push(val),val}var deregAll=function(functions){return functions.slice().forEach((function(fn){"function"==typeof fn&&fn(),removeFrom(functions,fn)}))};function defaults(opts){for(var defaultsList=[],_i=1;_i<arguments.length;_i++)defaultsList[_i-1]=arguments[_i];var defaultVals=extend.apply(void 0,__spreadArrays([{}],defaultsList.reverse()));return extend(defaultVals,pick(opts||{},Object.keys(defaultVals)))}var mergeR=function(memo,item){return extend(memo,item)};function ancestors(first,second){var path=[];for(var n in first.path){if(first.path[n]!==second.path[n])break;path.push(first.path[n])}return path}function pick(obj,propNames){var objCopy={};for(var _prop in obj)-1!==propNames.indexOf(_prop)&&(objCopy[_prop]=obj[_prop]);return objCopy}function omit(obj,propNames){return Object.keys(obj).filter(Object(_hof__WEBPACK_IMPORTED_MODULE_1__.i)(inArray(propNames))).reduce((function(acc,key){return acc[key]=obj[key],acc}),{})}function pluck(collection,propName){return map(collection,Object(_hof__WEBPACK_IMPORTED_MODULE_1__.n)(propName))}function filter(collection,callback){var arr=Object(_predicates__WEBPACK_IMPORTED_MODULE_0__.a)(collection),result=arr?[]:{},accept=arr?function(x){return result.push(x)}:function(x,key){return result[key]=x};return forEach(collection,(function(item,i){callback(item,i)&&accept(item,i)})),result}function find(collection,callback){var result;return forEach(collection,(function(item,i){result||callback(item,i)&&(result=item)})),result}var mapObj=map;function map(collection,callback,target){return target=target||(Object(_predicates__WEBPACK_IMPORTED_MODULE_0__.a)(collection)?[]:{}),forEach(collection,(function(item,i){return target[i]=callback(item,i)})),target}var values=function(obj){return Object.keys(obj).map((function(key){return obj[key]}))},allTrueR=function(memo,elem){return memo&&elem},anyTrueR=function(memo,elem){return memo||elem},unnestR=function(memo,elem){return memo.concat(elem)},flattenR=function(memo,elem){return Object(_predicates__WEBPACK_IMPORTED_MODULE_0__.a)(elem)?memo.concat(elem.reduce(flattenR,[])):pushR(memo,elem)};function pushR(arr,obj){return arr.push(obj),arr}var uniqR=function(acc,token){return inArray(acc,token)?acc:pushR(acc,token)},unnest=function(arr){return arr.reduce(unnestR,[])},flatten=function(arr){return arr.reduce(flattenR,[])},assertPredicate=assertFn,assertMap=assertFn;function assertFn(predicateOrMap,errMsg){return void 0===errMsg&&(errMsg="assert failure"),function(obj){var result=predicateOrMap(obj);if(!result)throw new Error(Object(_predicates__WEBPACK_IMPORTED_MODULE_0__.d)(errMsg)?errMsg(obj):errMsg);return result}}var pairs=function(obj){return Object.keys(obj).map((function(key){return[key,obj[key]]}))};function arrayTuples(){for(var args=[],_i=0;_i<arguments.length;_i++)args[_i]=arguments[_i];if(0===args.length)return[];for(var maxArrayLen=args.reduce((function(min,arr){return Math.min(arr.length,min)}),9007199254740991),result=[],_loop_1=function(i){switch(args.length){case 1:result.push([args[0][i]]);break;case 2:result.push([args[0][i],args[1][i]]);break;case 3:result.push([args[0][i],args[1][i],args[2][i]]);break;case 4:result.push([args[0][i],args[1][i],args[2][i],args[3][i]]);break;default:result.push(args.map((function(array){return array[i]})))}},i=0;i<maxArrayLen;i++)_loop_1(i);return result}function applyPairs(memo,keyValTuple){var key,value;if(Object(_predicates__WEBPACK_IMPORTED_MODULE_0__.a)(keyValTuple)&&(key=keyValTuple[0],value=keyValTuple[1]),!Object(_predicates__WEBPACK_IMPORTED_MODULE_0__.l)(key))throw new Error("invalid parameters to applyPairs");return memo[key]=value,memo}function tail(arr){return arr.length&&arr[arr.length-1]||void 0}function copy(src,dest){return dest&&Object.keys(dest).forEach((function(key){return delete dest[key]})),dest||(dest={}),extend(dest,src)}function _extend(toObj){for(var i=1;i<arguments.length;i++){var obj=arguments[i];if(obj)for(var keys=Object.keys(obj),j=0;j<keys.length;j++)toObj[keys[j]]=obj[keys[j]]}return toObj}function _equals(o1,o2){if(o1===o2)return!0;if(null===o1||null===o2)return!1;if(o1!=o1&&o2!=o2)return!0;var t1=typeof o1;if(t1!==typeof o2||"object"!==t1)return!1;var a1,a2,tup=[o1,o2];if(Object(_hof__WEBPACK_IMPORTED_MODULE_1__.a)(_predicates__WEBPACK_IMPORTED_MODULE_0__.a)(tup))return a2=o2,(a1=o1).length===a2.length&&arrayTuples(a1,a2).reduce((function(b,t){return b&&_equals(t[0],t[1])}),!0);if(Object(_hof__WEBPACK_IMPORTED_MODULE_1__.a)(_predicates__WEBPACK_IMPORTED_MODULE_0__.b)(tup))return o1.getTime()===o2.getTime();if(Object(_hof__WEBPACK_IMPORTED_MODULE_1__.a)(_predicates__WEBPACK_IMPORTED_MODULE_0__.k)(tup))return o1.toString()===o2.toString();if(Object(_hof__WEBPACK_IMPORTED_MODULE_1__.a)(_predicates__WEBPACK_IMPORTED_MODULE_0__.d)(tup))return!0;if([_predicates__WEBPACK_IMPORTED_MODULE_0__.d,_predicates__WEBPACK_IMPORTED_MODULE_0__.a,_predicates__WEBPACK_IMPORTED_MODULE_0__.b,_predicates__WEBPACK_IMPORTED_MODULE_0__.k].map(_hof__WEBPACK_IMPORTED_MODULE_1__.c).reduce((function(b,fn){return b||!!fn(tup)}),!1))return!1;var keys={};for(var key in o1){if(!_equals(o1[key],o2[key]))return!1;keys[key]=!0}for(var key in o2)if(!keys[key])return!1;return!0}var silenceUncaughtInPromise=function(promise){return promise.catch((function(e){return 0}))&&promise},silentRejection=function(error){return silenceUncaughtInPromise(_coreservices__WEBPACK_IMPORTED_MODULE_2__.b.$q.reject(error))}}).call(this,__webpack_require__(4))},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"m",(function(){return isUndefined})),__webpack_require__.d(__webpack_exports__,"c",(function(){return isDefined})),__webpack_require__.d(__webpack_exports__,"f",(function(){return isNull})),__webpack_require__.d(__webpack_exports__,"g",(function(){return isNullOrUndefined})),__webpack_require__.d(__webpack_exports__,"d",(function(){return isFunction})),__webpack_require__.d(__webpack_exports__,"h",(function(){return isNumber})),__webpack_require__.d(__webpack_exports__,"l",(function(){return isString})),__webpack_require__.d(__webpack_exports__,"i",(function(){return isObject})),__webpack_require__.d(__webpack_exports__,"a",(function(){return isArray})),__webpack_require__.d(__webpack_exports__,"b",(function(){return isDate})),__webpack_require__.d(__webpack_exports__,"k",(function(){return isRegExp})),__webpack_require__.d(__webpack_exports__,"e",(function(){return isInjectable})),__webpack_require__.d(__webpack_exports__,"j",(function(){return isPromise}));var _hof__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(2),toStr=Object.prototype.toString,tis=function(t){return function(x){return typeof x===t}},isUndefined=tis("undefined"),isDefined=Object(_hof__WEBPACK_IMPORTED_MODULE_0__.i)(isUndefined),isNull=function(o){return null===o},isNullOrUndefined=Object(_hof__WEBPACK_IMPORTED_MODULE_0__.j)(isNull,isUndefined),isFunction=tis("function"),isNumber=tis("number"),isString=tis("string"),isObject=function(x){return null!==x&&"object"==typeof x},isArray=Array.isArray,isDate=function(x){return"[object Date]"===toStr.call(x)},isRegExp=function(x){return"[object RegExp]"===toStr.call(x)};function isInjectable(val){if(isArray(val)&&val.length){var head=val.slice(0,-1),tail=val.slice(-1);return!(head.filter(Object(_hof__WEBPACK_IMPORTED_MODULE_0__.i)(isString)).length||tail.filter(Object(_hof__WEBPACK_IMPORTED_MODULE_0__.i)(isFunction)).length)}return isFunction(val)}var isPromise=Object(_hof__WEBPACK_IMPORTED_MODULE_0__.b)(isObject,Object(_hof__WEBPACK_IMPORTED_MODULE_0__.m)(Object(_hof__WEBPACK_IMPORTED_MODULE_0__.n)("then"),isFunction))},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"e",(function(){return curry})),__webpack_require__.d(__webpack_exports__,"d",(function(){return compose})),__webpack_require__.d(__webpack_exports__,"m",(function(){return pipe})),__webpack_require__.d(__webpack_exports__,"n",(function(){return prop})),__webpack_require__.d(__webpack_exports__,"o",(function(){return propEq})),__webpack_require__.d(__webpack_exports__,"k",(function(){return parse})),__webpack_require__.d(__webpack_exports__,"i",(function(){return not})),__webpack_require__.d(__webpack_exports__,"b",(function(){return and})),__webpack_require__.d(__webpack_exports__,"j",(function(){return or})),__webpack_require__.d(__webpack_exports__,"a",(function(){return all})),__webpack_require__.d(__webpack_exports__,"c",(function(){return any})),__webpack_require__.d(__webpack_exports__,"h",(function(){return is})),__webpack_require__.d(__webpack_exports__,"f",(function(){return eq})),__webpack_require__.d(__webpack_exports__,"p",(function(){return val})),__webpack_require__.d(__webpack_exports__,"g",(function(){return invoke})),__webpack_require__.d(__webpack_exports__,"l",(function(){return pattern}));var __spreadArrays=function(){for(var s=0,i=0,il=arguments.length;i<il;i++)s+=arguments[i].length;var r=Array(s),k=0;for(i=0;i<il;i++)for(var a=arguments[i],j=0,jl=a.length;j<jl;j++,k++)r[k]=a[j];return r};function curry(fn){return function curried(){if(arguments.length>=fn.length)return fn.apply(this,arguments);var args=Array.prototype.slice.call(arguments);return curried.bind.apply(curried,__spreadArrays([this],args))}}function compose(){var args=arguments,start=args.length-1;return function(){for(var i=start,result=args[start].apply(this,arguments);i--;)result=args[i].call(this,result);return result}}function pipe(){for(var funcs=[],_i=0;_i<arguments.length;_i++)funcs[_i]=arguments[_i];return compose.apply(null,[].slice.call(arguments).reverse())}var prop=function(name){return function(obj){return obj&&obj[name]}},propEq=curry((function(name,_val,obj){return obj&&obj[name]===_val})),parse=function(name){return pipe.apply(null,name.split(".").map(prop))},not=function(fn){return function(){for(var args=[],_i=0;_i<arguments.length;_i++)args[_i]=arguments[_i];return!fn.apply(null,args)}};function and(fn1,fn2){return function(){for(var args=[],_i=0;_i<arguments.length;_i++)args[_i]=arguments[_i];return fn1.apply(null,args)&&fn2.apply(null,args)}}function or(fn1,fn2){return function(){for(var args=[],_i=0;_i<arguments.length;_i++)args[_i]=arguments[_i];return fn1.apply(null,args)||fn2.apply(null,args)}}var all=function(fn1){return function(arr){return arr.reduce((function(b,x){return b&&!!fn1(x)}),!0)}},any=function(fn1){return function(arr){return arr.reduce((function(b,x){return b||!!fn1(x)}),!1)}},is=function(ctor){return function(obj){return null!=obj&&obj.constructor===ctor||obj instanceof ctor}},eq=function(value){return function(other){return value===other}},val=function(v){return function(){return v}};function invoke(fnName,args){return function(obj){return obj[fnName].apply(obj,args)}}function pattern(struct){return function(x){for(var i=0;i<struct.length;i++)if(struct[i][0](x))return struct[i][1](x)}}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return makeStub})),__webpack_require__.d(__webpack_exports__,"b",(function(){return services}));var makeStub=function(service,methods){return methods.reduce((function(acc,key){return acc[key]=(fnname=service+"."+key+"()",function(){throw new Error("No implementation for "+fnname+". The framework specific code did not implement this method.")}),acc;var fnname}),{})},services={$q:void 0,$injector:void 0}},function(module,exports){var g;g=function(){return this}();try{g=g||new Function("return this")()}catch(e){"object"==typeof window&&(g=window)}module.exports=g},function(module,exports,__webpack_require__){__webpack_require__(512),module.exports=angular},function(module,exports,__webpack_require__){function Emitter(obj){if(obj)return function(obj){for(var key in Emitter.prototype)obj[key]=Emitter.prototype[key];return obj}(obj)}module.exports=Emitter,Emitter.prototype.on=Emitter.prototype.addEventListener=function(event,fn){return this._callbacks=this._callbacks||{},(this._callbacks["$"+event]=this._callbacks["$"+event]||[]).push(fn),this},Emitter.prototype.once=function(event,fn){function on(){this.off(event,on),fn.apply(this,arguments)}return on.fn=fn,this.on(event,on),this},Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(event,fn){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var cb,callbacks=this._callbacks["$"+event];if(!callbacks)return this;if(1==arguments.length)return delete this._callbacks["$"+event],this;for(var i=0;i<callbacks.length;i++)if((cb=callbacks[i])===fn||cb.fn===fn){callbacks.splice(i,1);break}return this},Emitter.prototype.emit=function(event){this._callbacks=this._callbacks||{};var args=[].slice.call(arguments,1),callbacks=this._callbacks["$"+event];if(callbacks)for(var i=0,len=(callbacks=callbacks.slice(0)).length;i<len;++i)callbacks[i].apply(this,args);return this},Emitter.prototype.listeners=function(event){return this._callbacks=this._callbacks||{},this._callbacks["$"+event]||[]},Emitter.prototype.hasListeners=function(event){return!!this.listeners(event).length}},function(module,exports,__webpack_require__){var base64encoder,keys=__webpack_require__(482),hasBinary=__webpack_require__(29),sliceBuffer=__webpack_require__(484),after=__webpack_require__(485),utf8=__webpack_require__(486);"undefined"!=typeof ArrayBuffer&&(base64encoder=__webpack_require__(487));var isAndroid="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),isPhantomJS="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),dontSendBlobs=isAndroid||isPhantomJS;exports.protocol=3;var packets=exports.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},packetslist=keys(packets),err={type:"error",data:"parser error"},Blob=__webpack_require__(488);function map(ary,each,done){for(var result=new Array(ary.length),next=after(ary.length,done),eachWithIndex=function(i,el,cb){each(el,(function(error,msg){result[i]=msg,cb(error,result)}))},i=0;i<ary.length;i++)eachWithIndex(i,ary[i],next)}exports.encodePacket=function(packet,supportsBinary,utf8encode,callback){"function"==typeof supportsBinary&&(callback=supportsBinary,supportsBinary=!1),"function"==typeof utf8encode&&(callback=utf8encode,utf8encode=null);var data=void 0===packet.data?void 0:packet.data.buffer||packet.data;if("undefined"!=typeof ArrayBuffer&&data instanceof ArrayBuffer)return function(packet,supportsBinary,callback){if(!supportsBinary)return exports.encodeBase64Packet(packet,callback);var data=packet.data,contentArray=new Uint8Array(data),resultBuffer=new Uint8Array(1+data.byteLength);resultBuffer[0]=packets[packet.type];for(var i=0;i<contentArray.length;i++)resultBuffer[i+1]=contentArray[i];return callback(resultBuffer.buffer)}(packet,supportsBinary,callback);if(void 0!==Blob&&data instanceof Blob)return function(packet,supportsBinary,callback){if(!supportsBinary)return exports.encodeBase64Packet(packet,callback);if(dontSendBlobs)return function(packet,supportsBinary,callback){if(!supportsBinary)return exports.encodeBase64Packet(packet,callback);var fr=new FileReader;return fr.onload=function(){exports.encodePacket({type:packet.type,data:fr.result},supportsBinary,!0,callback)},fr.readAsArrayBuffer(packet.data)}(packet,supportsBinary,callback);var length=new Uint8Array(1);length[0]=packets[packet.type];var blob=new Blob([length.buffer,packet.data]);return callback(blob)}(packet,supportsBinary,callback);if(data&&data.base64)return function(packet,callback){var message="b"+exports.packets[packet.type]+packet.data.data;return callback(message)}(packet,callback);var encoded=packets[packet.type];return void 0!==packet.data&&(encoded+=utf8encode?utf8.encode(String(packet.data),{strict:!1}):String(packet.data)),callback(""+encoded)},exports.encodeBase64Packet=function(packet,callback){var b64data,message="b"+exports.packets[packet.type];if(void 0!==Blob&&packet.data instanceof Blob){var fr=new FileReader;return fr.onload=function(){var b64=fr.result.split(",")[1];callback(message+b64)},fr.readAsDataURL(packet.data)}try{b64data=String.fromCharCode.apply(null,new Uint8Array(packet.data))}catch(e){for(var typed=new Uint8Array(packet.data),basic=new Array(typed.length),i=0;i<typed.length;i++)basic[i]=typed[i];b64data=String.fromCharCode.apply(null,basic)}return message+=btoa(b64data),callback(message)},exports.decodePacket=function(data,binaryType,utf8decode){if(void 0===data)return err;if("string"==typeof data){if("b"===data.charAt(0))return exports.decodeBase64Packet(data.substr(1),binaryType);if(utf8decode&&!1===(data=function(data){try{data=utf8.decode(data,{strict:!1})}catch(e){return!1}return data}(data)))return err;var type=data.charAt(0);return Number(type)==type&&packetslist[type]?data.length>1?{type:packetslist[type],data:data.substring(1)}:{type:packetslist[type]}:err}type=new Uint8Array(data)[0];var rest=sliceBuffer(data,1);return Blob&&"blob"===binaryType&&(rest=new Blob([rest])),{type:packetslist[type],data:rest}},exports.decodeBase64Packet=function(msg,binaryType){var type=packetslist[msg.charAt(0)];if(!base64encoder)return{type,data:{base64:!0,data:msg.substr(1)}};var data=base64encoder.decode(msg.substr(1));return"blob"===binaryType&&Blob&&(data=new Blob([data])),{type,data}},exports.encodePayload=function(packets,supportsBinary,callback){"function"==typeof supportsBinary&&(callback=supportsBinary,supportsBinary=null);var isBinary=hasBinary(packets);if(supportsBinary&&isBinary)return Blob&&!dontSendBlobs?exports.encodePayloadAsBlob(packets,callback):exports.encodePayloadAsArrayBuffer(packets,callback);if(!packets.length)return callback("0:");map(packets,(function(packet,doneCallback){exports.encodePacket(packet,!!isBinary&&supportsBinary,!1,(function(message){doneCallback(null,function(message){return message.length+":"+message}(message))}))}),(function(err,results){return callback(results.join(""))}))},exports.decodePayload=function(data,binaryType,callback){if("string"!=typeof data)return exports.decodePayloadAsBinary(data,binaryType,callback);var packet;if("function"==typeof binaryType&&(callback=binaryType,binaryType=null),""===data)return callback(err,0,1);for(var n,msg,length="",i=0,l=data.length;i<l;i++){var chr=data.charAt(i);if(":"===chr){if(""===length||length!=(n=Number(length)))return callback(err,0,1);if(length!=(msg=data.substr(i+1,n)).length)return callback(err,0,1);if(msg.length){if(packet=exports.decodePacket(msg,binaryType,!1),err.type===packet.type&&err.data===packet.data)return callback(err,0,1);if(!1===callback(packet,i+n,l))return}i+=n,length=""}else length+=chr}return""!==length?callback(err,0,1):void 0},exports.encodePayloadAsArrayBuffer=function(packets,callback){if(!packets.length)return callback(new ArrayBuffer(0));map(packets,(function(packet,doneCallback){exports.encodePacket(packet,!0,!0,(function(data){return doneCallback(null,data)}))}),(function(err,encodedPackets){var totalLength=encodedPackets.reduce((function(acc,p){var len;return acc+(len="string"==typeof p?p.length:p.byteLength).toString().length+len+2}),0),resultArray=new Uint8Array(totalLength),bufferIndex=0;return encodedPackets.forEach((function(p){var isString="string"==typeof p,ab=p;if(isString){for(var view=new Uint8Array(p.length),i=0;i<p.length;i++)view[i]=p.charCodeAt(i);ab=view.buffer}resultArray[bufferIndex++]=isString?0:1;var lenStr=ab.byteLength.toString();for(i=0;i<lenStr.length;i++)resultArray[bufferIndex++]=parseInt(lenStr[i]);resultArray[bufferIndex++]=255;for(view=new Uint8Array(ab),i=0;i<view.length;i++)resultArray[bufferIndex++]=view[i]})),callback(resultArray.buffer)}))},exports.encodePayloadAsBlob=function(packets,callback){map(packets,(function(packet,doneCallback){exports.encodePacket(packet,!0,!0,(function(encoded){var binaryIdentifier=new Uint8Array(1);if(binaryIdentifier[0]=1,"string"==typeof encoded){for(var view=new Uint8Array(encoded.length),i=0;i<encoded.length;i++)view[i]=encoded.charCodeAt(i);encoded=view.buffer,binaryIdentifier[0]=0}var lenStr=(encoded instanceof ArrayBuffer?encoded.byteLength:encoded.size).toString(),lengthAry=new Uint8Array(lenStr.length+1);for(i=0;i<lenStr.length;i++)lengthAry[i]=parseInt(lenStr[i]);if(lengthAry[lenStr.length]=255,Blob){var blob=new Blob([binaryIdentifier.buffer,lengthAry.buffer,encoded]);doneCallback(null,blob)}}))}),(function(err,results){return callback(new Blob(results))}))},exports.decodePayloadAsBinary=function(data,binaryType,callback){"function"==typeof binaryType&&(callback=binaryType,binaryType=null);for(var bufferTail=data,buffers=[];bufferTail.byteLength>0;){for(var tailArray=new Uint8Array(bufferTail),isString=0===tailArray[0],msgLength="",i=1;255!==tailArray[i];i++){if(msgLength.length>310)return callback(err,0,1);msgLength+=tailArray[i]}bufferTail=sliceBuffer(bufferTail,2+msgLength.length),msgLength=parseInt(msgLength);var msg=sliceBuffer(bufferTail,0,msgLength);if(isString)try{msg=String.fromCharCode.apply(null,new Uint8Array(msg))}catch(e){var typed=new Uint8Array(msg);msg="";for(i=0;i<typed.length;i++)msg+=String.fromCharCode(typed[i])}buffers.push(msg),bufferTail=sliceBuffer(bufferTail,msgLength)}var total=buffers.length;buffers.forEach((function(buffer,i){callback(exports.decodePacket(buffer,binaryType,!0),i,total)}))}},function(module,exports,__webpack_require__){(function(process){exports.log=function(...args){return"object"==typeof console&&console.log&&console.log(...args)},exports.formatArgs=function(args){if(args[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+args[0]+(this.useColors?"%c ":" ")+"+"+module.exports.humanize(this.diff),!this.useColors)return;const c="color: "+this.color;args.splice(1,0,c,"color: inherit");let index=0,lastC=0;args[0].replace(/%[a-zA-Z%]/g,match=>{"%%"!==match&&(index++,"%c"===match&&(lastC=index))}),args.splice(lastC,0,c)},exports.save=function(namespaces){try{namespaces?exports.storage.setItem("debug",namespaces):exports.storage.removeItem("debug")}catch(error){}},exports.load=function(){let r;try{r=exports.storage.getItem("debug")}catch(error){}!r&&void 0!==process&&"env"in process&&(r=process.env.DEBUG);return r},exports.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},exports.storage=function(){try{return localStorage}catch(error){}}(),exports.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],module.exports=__webpack_require__(470)(exports);const{formatters}=module.exports;formatters.j=function(v){try{return JSON.stringify(v)}catch(error){return"[UnexpectedJSONParseError]: "+error.message}}}).call(this,__webpack_require__(9))},function(module,exports){var cachedSetTimeout,cachedClearTimeout,process=module.exports={};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(fun){if(cachedSetTimeout===setTimeout)return setTimeout(fun,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(fun,0);try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var currentQueue,queue=[],draining=!1,queueIndex=-1;function cleanUpNextTick(){draining&&currentQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var timeout=runTimeout(cleanUpNextTick);draining=!0;for(var len=queue.length;len;){for(currentQueue=queue,queue=[];++queueIndex<len;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,len=queue.length}currentQueue=null,draining=!1,function(marker){if(cachedClearTimeout===clearTimeout)return clearTimeout(marker);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(marker);try{cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}(timeout)}}function Item(fun,array){this.fun=fun,this.array=array}function noop(){}process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)args[i-1]=arguments[i];queue.push(new Item(fun,args)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.prependListener=noop,process.prependOnceListener=noop,process.listeners=function(name){return[]},process.binding=function(name){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(dir){throw new Error("process.chdir is not supported")},process.umask=function(){return 0}},function(module,exports){exports.encode=function(obj){var str="";for(var i in obj)obj.hasOwnProperty(i)&&(str.length&&(str+="&"),str+=encodeURIComponent(i)+"="+encodeURIComponent(obj[i]));return str},exports.decode=function(qs){for(var qry={},pairs=qs.split("&"),i=0,l=pairs.length;i<l;i++){var pair=pairs[i].split("=");qry[decodeURIComponent(pair[0])]=decodeURIComponent(pair[1])}return qry}},function(module,exports){module.exports=function(a,b){var fn=function(){};fn.prototype=b.prototype,a.prototype=new fn,a.prototype.constructor=a}},function(module,exports,__webpack_require__){(function(process){exports.log=function(...args){return"object"==typeof console&&console.log&&console.log(...args)},exports.formatArgs=function(args){if(args[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+args[0]+(this.useColors?"%c ":" ")+"+"+module.exports.humanize(this.diff),!this.useColors)return;const c="color: "+this.color;args.splice(1,0,c,"color: inherit");let index=0,lastC=0;args[0].replace(/%[a-zA-Z%]/g,match=>{"%%"!==match&&(index++,"%c"===match&&(lastC=index))}),args.splice(lastC,0,c)},exports.save=function(namespaces){try{namespaces?exports.storage.setItem("debug",namespaces):exports.storage.removeItem("debug")}catch(error){}},exports.load=function(){let r;try{r=exports.storage.getItem("debug")}catch(error){}!r&&void 0!==process&&"env"in process&&(r=process.env.DEBUG);return r},exports.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},exports.storage=function(){try{return localStorage}catch(error){}}(),exports.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],module.exports=__webpack_require__(489)(exports);const{formatters}=module.exports;formatters.j=function(v){try{return JSON.stringify(v)}catch(error){return"[UnexpectedJSONParseError]: "+error.message}}}).call(this,__webpack_require__(9))},function(module,exports,__webpack_require__){var baseToString=__webpack_require__(555);module.exports=function(value){return null==value?"":baseToString(value)}},function(module,exports){module.exports=function(module){return module.webpackPolyfill||(module.deprecate=function(){},module.paths=[],module.children||(module.children=[]),Object.defineProperty(module,"loaded",{enumerable:!0,get:function(){return module.l}}),Object.defineProperty(module,"id",{enumerable:!0,get:function(){return module.i}}),module.webpackPolyfill=1),module}},function(module,exports,__webpack_require__){var debug=__webpack_require__(471)("socket.io-parser"),Emitter=__webpack_require__(6),binary=__webpack_require__(474),isArray=__webpack_require__(24),isBuf=__webpack_require__(25);function Encoder(){}exports.protocol=4,exports.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],exports.CONNECT=0,exports.DISCONNECT=1,exports.EVENT=2,exports.ACK=3,exports.ERROR=4,exports.BINARY_EVENT=5,exports.BINARY_ACK=6,exports.Encoder=Encoder,exports.Decoder=Decoder;var ERROR_PACKET=exports.ERROR+'"encode error"';function encodeAsString(obj){var str=""+obj.type;if(exports.BINARY_EVENT!==obj.type&&exports.BINARY_ACK!==obj.type||(str+=obj.attachments+"-"),obj.nsp&&"/"!==obj.nsp&&(str+=obj.nsp+","),null!=obj.id&&(str+=obj.id),null!=obj.data){var payload=function(str){try{return JSON.stringify(str)}catch(e){return!1}}(obj.data);if(!1===payload)return ERROR_PACKET;str+=payload}return debug("encoded %j as %s",obj,str),str}function Decoder(){this.reconstructor=null}function BinaryReconstructor(packet){this.reconPack=packet,this.buffers=[]}function error(msg){return{type:exports.ERROR,data:"parser error: "+msg}}Encoder.prototype.encode=function(obj,callback){(debug("encoding packet %j",obj),exports.BINARY_EVENT===obj.type||exports.BINARY_ACK===obj.type)?function(obj,callback){binary.removeBlobs(obj,(function(bloblessData){var deconstruction=binary.deconstructPacket(bloblessData),pack=encodeAsString(deconstruction.packet),buffers=deconstruction.buffers;buffers.unshift(pack),callback(buffers)}))}(obj,callback):callback([encodeAsString(obj)])},Emitter(Decoder.prototype),Decoder.prototype.add=function(obj){var packet;if("string"==typeof obj)packet=function(str){var i=0,p={type:Number(str.charAt(0))};if(null==exports.types[p.type])return error("unknown packet type "+p.type);if(exports.BINARY_EVENT===p.type||exports.BINARY_ACK===p.type){for(var buf="";"-"!==str.charAt(++i)&&(buf+=str.charAt(i),i!=str.length););if(buf!=Number(buf)||"-"!==str.charAt(i))throw new Error("Illegal attachments");p.attachments=Number(buf)}if("/"===str.charAt(i+1))for(p.nsp="";++i;){if(","===(c=str.charAt(i)))break;if(p.nsp+=c,i===str.length)break}else p.nsp="/";var next=str.charAt(i+1);if(""!==next&&Number(next)==next){for(p.id="";++i;){var c;if(null==(c=str.charAt(i))||Number(c)!=c){--i;break}if(p.id+=str.charAt(i),i===str.length)break}p.id=Number(p.id)}if(str.charAt(++i)){var payload=function(str){try{return JSON.parse(str)}catch(e){return!1}}(str.substr(i));if(!(!1!==payload&&(p.type===exports.ERROR||isArray(payload))))return error("invalid payload");p.data=payload}return debug("decoded %s as %j",str,p),p}(obj),exports.BINARY_EVENT===packet.type||exports.BINARY_ACK===packet.type?(this.reconstructor=new BinaryReconstructor(packet),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",packet)):this.emit("decoded",packet);else{if(!isBuf(obj)&&!obj.base64)throw new Error("Unknown type: "+obj);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(packet=this.reconstructor.takeBinaryData(obj))&&(this.reconstructor=null,this.emit("decoded",packet))}},Decoder.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},BinaryReconstructor.prototype.takeBinaryData=function(binData){if(this.buffers.push(binData),this.buffers.length===this.reconPack.attachments){var packet=binary.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),packet}return null},BinaryReconstructor.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(module,exports,__webpack_require__){"use strict";(function(global){var base64=__webpack_require__(475),ieee754=__webpack_require__(476),isArray=__webpack_require__(477);function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(that,length){if(kMaxLength()<length)throw new RangeError("Invalid typed array length");return Buffer.TYPED_ARRAY_SUPPORT?(that=new Uint8Array(length)).__proto__=Buffer.prototype:(null===that&&(that=new Buffer(length)),that.length=length),that}function Buffer(arg,encodingOrOffset,length){if(!(Buffer.TYPED_ARRAY_SUPPORT||this instanceof Buffer))return new Buffer(arg,encodingOrOffset,length);if("number"==typeof arg){if("string"==typeof encodingOrOffset)throw new Error("If encoding is specified then the first argument must be a string");return allocUnsafe(this,arg)}return from(this,arg,encodingOrOffset,length)}function from(that,value,encodingOrOffset,length){if("number"==typeof value)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&value instanceof ArrayBuffer?function(that,array,byteOffset,length){if(array.byteLength,byteOffset<0||array.byteLength<byteOffset)throw new RangeError("'offset' is out of bounds");if(array.byteLength<byteOffset+(length||0))throw new RangeError("'length' is out of bounds");array=void 0===byteOffset&&void 0===length?new Uint8Array(array):void 0===length?new Uint8Array(array,byteOffset):new Uint8Array(array,byteOffset,length);Buffer.TYPED_ARRAY_SUPPORT?(that=array).__proto__=Buffer.prototype:that=fromArrayLike(that,array);return that}(that,value,encodingOrOffset,length):"string"==typeof value?function(that,string,encoding){"string"==typeof encoding&&""!==encoding||(encoding="utf8");if(!Buffer.isEncoding(encoding))throw new TypeError('"encoding" must be a valid string encoding');var length=0|byteLength(string,encoding),actual=(that=createBuffer(that,length)).write(string,encoding);actual!==length&&(that=that.slice(0,actual));return that}(that,value,encodingOrOffset):function(that,obj){if(Buffer.isBuffer(obj)){var len=0|checked(obj.length);return 0===(that=createBuffer(that,len)).length||obj.copy(that,0,0,len),that}if(obj){if("undefined"!=typeof ArrayBuffer&&obj.buffer instanceof ArrayBuffer||"length"in obj)return"number"!=typeof obj.length||(val=obj.length)!=val?createBuffer(that,0):fromArrayLike(that,obj);if("Buffer"===obj.type&&isArray(obj.data))return fromArrayLike(that,obj.data)}var val;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(that,value)}function assertSize(size){if("number"!=typeof size)throw new TypeError('"size" argument must be a number');if(size<0)throw new RangeError('"size" argument must not be negative')}function allocUnsafe(that,size){if(assertSize(size),that=createBuffer(that,size<0?0:0|checked(size)),!Buffer.TYPED_ARRAY_SUPPORT)for(var i=0;i<size;++i)that[i]=0;return that}function fromArrayLike(that,array){var length=array.length<0?0:0|checked(array.length);that=createBuffer(that,length);for(var i=0;i<length;i+=1)that[i]=255&array[i];return that}function checked(length){if(length>=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|length}function byteLength(string,encoding){if(Buffer.isBuffer(string))return string.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(string)||string instanceof ArrayBuffer))return string.byteLength;"string"!=typeof string&&(string=""+string);var len=string.length;if(0===len)return 0;for(var loweredCase=!1;;)switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":case void 0:return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*len;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0}}function slowToString(encoding,start,end){var loweredCase=!1;if((void 0===start||start<0)&&(start=0),start>this.length)return"";if((void 0===end||end>this.length)&&(end=this.length),end<=0)return"";if((end>>>=0)<=(start>>>=0))return"";for(encoding||(encoding="utf8");;)switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase(),loweredCase=!0}}function swap(b,n,m){var i=b[n];b[n]=b[m],b[m]=i}function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){if(0===buffer.length)return-1;if("string"==typeof byteOffset?(encoding=byteOffset,byteOffset=0):byteOffset>2147483647?byteOffset=2147483647:byteOffset<-2147483648&&(byteOffset=-2147483648),byteOffset=+byteOffset,isNaN(byteOffset)&&(byteOffset=dir?0:buffer.length-1),byteOffset<0&&(byteOffset=buffer.length+byteOffset),byteOffset>=buffer.length){if(dir)return-1;byteOffset=buffer.length-1}else if(byteOffset<0){if(!dir)return-1;byteOffset=0}if("string"==typeof val&&(val=Buffer.from(val,encoding)),Buffer.isBuffer(val))return 0===val.length?-1:arrayIndexOf(buffer,val,byteOffset,encoding,dir);if("number"==typeof val)return val&=255,Buffer.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?dir?Uint8Array.prototype.indexOf.call(buffer,val,byteOffset):Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset):arrayIndexOf(buffer,[val],byteOffset,encoding,dir);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var i,indexSize=1,arrLength=arr.length,valLength=val.length;if(void 0!==encoding&&("ucs2"===(encoding=String(encoding).toLowerCase())||"ucs-2"===encoding||"utf16le"===encoding||"utf-16le"===encoding)){if(arr.length<2||val.length<2)return-1;indexSize=2,arrLength/=2,valLength/=2,byteOffset/=2}function read(buf,i){return 1===indexSize?buf[i]:buf.readUInt16BE(i*indexSize)}if(dir){var foundIndex=-1;for(i=byteOffset;i<arrLength;i++)if(read(arr,i)===read(val,-1===foundIndex?0:i-foundIndex)){if(-1===foundIndex&&(foundIndex=i),i-foundIndex+1===valLength)return foundIndex*indexSize}else-1!==foundIndex&&(i-=i-foundIndex),foundIndex=-1}else for(byteOffset+valLength>arrLength&&(byteOffset=arrLength-valLength),i=byteOffset;i>=0;i--){for(var found=!0,j=0;j<valLength;j++)if(read(arr,i+j)!==read(val,j)){found=!1;break}if(found)return i}return-1}function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;length?(length=Number(length))>remaining&&(length=remaining):length=remaining;var strLen=string.length;if(strLen%2!=0)throw new TypeError("Invalid hex string");length>strLen/2&&(length=strLen/2);for(var i=0;i<length;++i){var parsed=parseInt(string.substr(2*i,2),16);if(isNaN(parsed))return i;buf[offset+i]=parsed}return i}fun