NIM_Web_Chatroom_v4.8.0.js
273.2 KB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Chatroom=t():e.Chatroom=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";n(153),e.exports=n(206)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){"object"===("undefined"==typeof e?"undefined":(0,a["default"])(e))?(this.callFunc=e.callFunc||null,this.message=e.message||"UNKNOW ERROR"):this.message=e,this.time=new Date,this.timetag=+this.time}var i=n(20),a=r(i),s=n(48),c=n(99),u=n(136),l=n(108);n(180);var p=n(44),f=p.getGlobal(),d=/\s+/;p.shouldDisplayInstallFlashHint=function(){var e=s.name.toLowerCase();if("ie"===e){var t=+s.version||0;return t=Math.floor(t),7===t&&!c.Transport.flashsocket.check()}return!1},p.deduplicate=function(e){var t=[];return e.forEach(function(e){t.indexOf(e)===-1&&t.push(e)}),t},p.capFirstLetter=function(e){return e?(e=""+e,e.slice(0,1).toUpperCase()+e.slice(1)):""},p.guid=function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return function(){return e()+e()+e()+e()+e()+e()+e()+e()}}(),p.extend=function(e,t,n){for(var r in t)"undefined"!=typeof e[r]&&n!==!0||(e[r]=t[r])},p.filterObj=function(e,t){var n={};return p.isString(t)&&(t=t.split(d)),t.forEach(function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n},p.simpleClone=function(e){return JSON.parse(JSON.stringify(e))},p.copy=function(e,t){return t=t||{},e?(Object.keys(e).forEach(function(n){p.exist(e[n])&&(t[n]=e[n])}),t):t},p.copyWithNull=function(e,t){return t=t||{},e?(Object.keys(e).forEach(function(n){(p.exist(e[n])||p.isnull(e[n]))&&(t[n]=e[n])}),t):t},p.findObjIndexInArray=function(e,t){e=e||[];var n=t.keyPath||"id",r=-1;return e.some(function(e,o){if(l(e,n)===t.value)return r=o,!0}),r},p.findObjInArray=function(e,t){var n=p.findObjIndexInArray(e,t);return n===-1?null:e[n]},p.mergeObjArray=function(){var e=[],t=[].slice.call(arguments,0,-1),n=arguments[arguments.length-1];p.isArray(n)&&(t.push(n),n={});var r=n.keyPath=n.keyPath||"id";for(n.sortPath=n.sortPath||r;!e.length&&t.length;)e=t.shift()||[],e=e.slice(0);var o;return t.forEach(function(t){t&&t.forEach(function(t){o=p.findObjIndexInArray(e,{keyPath:r,value:l(t,r)}),o!==-1?e[o]=p.merge({},e[o],t):e.push(t)})}),n.notSort||(e=p.sortObjArray(e,n)),e},p.cutObjArray=function(e){var t=e.slice(0),n=arguments.length,r=[].slice.call(arguments,1,n-1),o=arguments[n-1];p.isObject(o)||(r.push(o),o={});var i,a=o.keyPath=o.keyPath||"id";return r.forEach(function(e){p.isArray(e)||(e=[e]),e.forEach(function(e){e&&(o.value=l(e,a),i=p.findObjIndexInArray(t,o),i!==-1&&t.splice(i,1))})}),t},p.sortObjArray=function(e,t){t=t||{};var n=t.sortPath||"id";u.insensitive=!!t.insensitive;var r,o,i,a=!!t.desc;return i=p.isFunction(t.compare)?t.compare:function(e,t){return r=l(e,n),o=l(t,n),a?u(o,r):u(r,o)},e.sort(i)},p.emptyFunc=function(){},p.isEmptyFunc=function(e){return e===p.emptyFunc},p.notEmptyFunc=function(e){return e!==p.emptyFunc},p.splice=function(e,t,n){return[].splice.call(e,t,n)},p.reshape2d=function(e,t){if(Array.isArray(e)){p.verifyParamType("type",t,"number","util::reshape2d");var n=e.length;if(n<=t)return[e];for(var r=Math.ceil(n/t),o=[],i=0;i<r;i++)o.push(e.slice(i*t,(i+1)*t));return o}return e},p.flatten2d=function(e){if(Array.isArray(e)){var t=[];return e.forEach(function(e){t=t.concat(e)}),t}return e},p.dropArrayDuplicates=function(e){if(Array.isArray(e)){for(var t={},n=[];e.length>0;){var r=e.shift();t[r]=!0}for(var o in t)t[o]===!0&&n.push(o);return n}return e},p.onError=function(e){throw new o(e)},p.verifyParamPresent=function(e,t,n,r){n=n||"";var o=!1;switch(p.typeOf(t)){case"undefined":case"null":o=!0;break;case"string":""===t&&(o=!0);break;case"object":Object.keys(t).length||(o=!0);break;case"array":t.length?t.some(function(e){if(p.notexist(e))return o=!0,!0}):o=!0}o&&p.onParamAbsent(n+e,r)},p.onParamAbsent=function(e,t){p.onParamError("缺少参数 "+e+", 请确保参数不是 空字符串、空对象、空数组、null或undefined, 或数组的内容不是 null/undefined",t)},p.verifyParamAbsent=function(e,t,n,r){n=n||"",void 0!==t&&p.onParamPresent(n+e,r)},p.onParamPresent=function(e,t){p.onParamError("多余的参数 "+e,t)},p.verifyParamType=function(e,t,n,r){var o=p.typeOf(t).toLowerCase();p.isArray(n)||(n=[n]),n=n.map(function(e){return e.toLowerCase()});var i=!0;switch(n.indexOf(o)===-1&&(i=!1),o){case"number":isNaN(t)&&(i=!1)}i||p.onParamInvalidType(e,n,"",r)},p.onParamInvalidType=function(e,t,n,r){n=n||"",p.isArray(t)?(t=t.map(function(e){return'"'+e+'"'}),t=t.join(", ")):t='"'+t+'"',p.onParamError('参数"'+n+e+'"类型错误, 合法的类型包括: ['+t+"]",r)},p.verifyParamValid=function(e,t,n,r){p.isArray(n)||(n=[n]),n.indexOf(t)===-1&&p.onParamInvalidValue(e,n,r)},p.onParamInvalidValue=function(e,t,n){p.isArray(t)||(t=[t]),t=t.map(function(e){return'"'+e+'"'}),p.isArray(t)&&(t=t.join(", ")),p.onParamError("参数 "+e+"值错误, 合法的值包括: ["+JSON.stringify(t)+"]",n)},p.verifyParamMin=function(e,t,n,r){t<n&&p.onParamError("参数"+e+"的值不能小于"+n,r)},p.verifyParamMax=function(e,t,n,r){t>n&&p.onParamError("参数"+e+"的值不能大于"+n,r)},p.verifyArrayMax=function(e,t,n,r){t.length>n&&p.onParamError("参数"+e+"的长度不能大于"+n,r)},p.verifyEmail=function(){var e=/^\S+@\S+$/;return function(t,n,r){e.test(n)||p.onParamError("参数"+t+"邮箱格式错误, 合法格式必须包含@符号, @符号前后至少要各有一个字符",r)}}(),p.verifyTel=function(){var e=/^[+\-()\d]+$/;return function(t,n,r){e.test(n)||p.onParamError("参数"+t+"电话号码格式错误, 合法字符包括+、-、英文括号和数字",r)}}(),p.verifyBirth=function(){var e=/^(\d{4})-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/;return function(t,n,r){e.test(n)||p.onParamError("参数"+t+'生日格式错误, 合法为"yyyy-MM-dd"',r)}}(),p.onParamError=function(e,t){p.onError({message:e,callFunc:t})},p.verifyOptions=function(e,t,n,r,o){if(e=e||{},t&&(p.isString(t)&&(t=t.split(d)),p.isArray(t))){"boolean"!=typeof n&&(o=n||null,n=!0,r="");var i=n?p.verifyParamPresent:p.verifyParamAbsent;t.forEach(function(t){i.call(p,t,e[t],r,o)})}return e},p.verifyParamAtLeastPresentOne=function(e,t,n){if(t&&(p.isString(t)&&(t=t.split(d)),p.isArray(t))){var r=t.some(function(t){return p.exist(e[t])});r||p.onParamError("以下参数["+t.join(", ")+"]至少需要传入一个",n)}},p.verifyParamPresentJustOne=function(e,t,n){if(t&&(p.isString(t)&&(t=t.split(d)),p.isArray(t))){var r=t.reduce(function(t,n){return p.exist(e[n])&&t++,t},0);1!==r&&p.onParamError("以下参数["+t.join(", ")+"]必须且只能传入一个",n)}},p.verifyBooleanWithDefault=function(e,t,n,r,o){p.undef(n)&&(n=!0),d.test(t)&&(t=t.split(d)),p.isArray(t)?t.forEach(function(t){p.verifyBooleanWithDefault(e,t,n,r,o)}):"undefined"==typeof e[t]?e[t]=n:p.isBoolean(e[t])||p.onParamInvalidType(t,"boolean",r,o)},p.verifyFileInput=function(e,t){return p.verifyParamPresent("fileInput",e,"",t),p.isString(e)&&(e=document.getElementById(e),e||p.onParamError("找不到要上传的文件对应的input, 请检查fileInput id "+e,t)),e.tagName&&"input"===e.tagName.toLowerCase()&&"file"===e.type.toLowerCase()||p.onParamError("请提供正确的 fileInput, 必须为 file 类型的 input 节点 tagname:"+e.tagName+", filetype:"+e.type,t),e},p.verifyFileType=function(e,t){p.verifyParamValid("type",e,p.validFileTypes,t)},p.verifyCallback=function(e,t,n){d.test(t)&&(t=t.split(d)),p.isArray(t)?t.forEach(function(t){p.verifyCallback(e,t,n)}):e[t]?p.isFunction(e[t])||p.onParamInvalidType(t,"function","",n):e[t]=p.emptyFunc},p.verifyFileUploadCallback=function(e,t){p.verifyCallback(e,"uploadprogress uploaddone uploaderror uploadcancel",t)},p.validFileTypes=["image","audio","video","file"],p.validFileExts={image:["bmp","gif","jpg","jpeg","jng","png","webp"],audio:["mp3","wav","aac","wma","wmv","amr","mp2","flac","vorbis","ac3"],video:["mp4","rm","rmvb","wmv","avi","mpg","mpeg"]},p.filterFiles=function(e,t){t=t.toLowerCase();var n,r,o,i="file"===t,a=[];return[].forEach.call(e,function(e){if(i)a.push(e);else if(n=e.name.slice(e.name.lastIndexOf(".")+1),r=e.type.split("/"),r[0]&&r[1]){o=r[0].toLowerCase();var s=!1;s=o===t||p.validFileExts[t].indexOf(n)!==-1,s&&a.push(e)}}),a};var m=p.supportFormData=p.notundef(f.FormData);p.getFileName=function(){return function(e){return e=p.verifyFileInput(e),m?e.files[0].name:e.value.slice(e.value.lastIndexOf("\\")+1)}}(),p.sizeText=function(){var e=["B","KB","MB","GB","TB","PB","EB","ZB","BB"];return function(t){var n,r=0;do{t=Math.floor(100*t)/100;var o=e[r];n=t+o,t/=1024,r++}while(t>1);return n}}(),p.promises2cmds=function(e){return e.map(function(e){return e.cmd})},p.objs2accounts=function(e){return e.map(function(e){return e.account})},p.teams2ids=function(e){return e.map(function(e){return e.teamId})},p.objs2ids=function(e){return e.map(function(e){return e.id})},p.getMaxUpdateTime=function(e){var t=e.map(function(e){return+e.updateTime});return Math.max.apply(Math,t)},p.genCheckUniqueFunc=function(e,t){var n=[],r={};return e=e||"id",t=t||1e3,function(o){var i;return n.length>=t&&(i=n.shift(),delete r[i]),i=l(o,e),!r[i]&&(r[i]=!0,n.push(i),!0)}},p.fillPropertyWithDefault=function(e,t,n){return!!p.undef(e[t])&&(e[t]=n,!0)},e.exports=p},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(35)("wks"),o=n(22),i=n(2).Symbol,a="function"==typeof i,s=e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))};s.store=r},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){(function(t,r){/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
* @version 4.0.5
*/
!function(t,n){e.exports=n()}(this,function(){"use strict";function e(e){return"function"==typeof e||"object"==typeof e&&null!==e}function o(e){return"function"==typeof e}function i(e){V=e}function a(e){z=e}function s(){return function(){return t.nextTick(f)}}function c(){return"undefined"!=typeof K?function(){K(f)}:p()}function u(){var e=0,t=new Z(f),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function l(){var e=new MessageChannel;return e.port1.onmessage=f,function(){return e.port2.postMessage(0)}}function p(){var e=setTimeout;return function(){return e(f,1)}}function f(){for(var e=0;e<G;e+=2){var t=ne[e],n=ne[e+1];t(n),ne[e]=void 0,ne[e+1]=void 0}G=0}function d(){try{var e=n(97);return K=e.runOnLoop||e.runOnContext,c()}catch(t){return p()}}function m(e,t){var n=arguments,r=this,o=new this.constructor(y);void 0===o[oe]&&F(o);var i=r._state;return i?!function(){var e=n[i-1];z(function(){return A(i,o,e,r._result)})}():C(r,o,e,t),o}function h(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(y);return M(n,e),n}function y(){}function g(){return new TypeError("You cannot resolve a promise with itself")}function v(){return new TypeError("A promises callback cannot return that same promise.")}function b(e){try{return e.then}catch(t){return ce.error=t,ce}}function w(e,t,n,r){try{e.call(t,n,r)}catch(o){return o}}function k(e,t,n){z(function(e){var r=!1,o=w(n,t,function(n){r||(r=!0,t!==n?M(e,n):x(e,n))},function(t){r||(r=!0,O(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,O(e,o))},e)}function T(e,t){t._state===ae?x(e,t._result):t._state===se?O(e,t._result):C(t,void 0,function(t){return M(e,t)},function(t){return O(e,t)})}function S(e,t,n){t.constructor===e.constructor&&n===m&&t.constructor.resolve===h?T(e,t):n===ce?O(e,ce.error):void 0===n?x(e,t):o(n)?k(e,t,n):x(e,t)}function M(t,n){t===n?O(t,g()):e(n)?S(t,n,b(n)):x(t,n)}function _(e){e._onerror&&e._onerror(e._result),E(e)}function x(e,t){e._state===ie&&(e._result=t,e._state=ae,0!==e._subscribers.length&&z(E,e))}function O(e,t){e._state===ie&&(e._state=se,e._result=t,z(_,e))}function C(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+ae]=n,o[i+se]=r,0===i&&e._state&&z(E,e)}function E(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,o=void 0,i=e._result,a=0;a<t.length;a+=3)r=t[a],o=t[a+n],r?A(n,r,o,i):o(i);e._subscribers.length=0}}function P(){this.error=null}function I(e,t){try{return e(t)}catch(n){return ue.error=n,ue}}function A(e,t,n,r){var i=o(n),a=void 0,s=void 0,c=void 0,u=void 0;if(i){if(a=I(n,r),a===ue?(u=!0,s=a.error,a=null):c=!0,t===a)return void O(t,v())}else a=r,c=!0;t._state!==ie||(i&&c?M(t,a):u?O(t,s):e===ae?x(t,a):e===se&&O(t,a))}function j(e,t){try{t(function(t){M(e,t)},function(t){O(e,t)})}catch(n){O(e,n)}}function N(){return le++}function F(e){e[oe]=le++,e._state=void 0,e._result=void 0,e._subscribers=[]}function D(e,t){this._instanceConstructor=e,this.promise=new e(y),this.promise[oe]||F(this.promise),J(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?x(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&x(this.promise,this._result))):O(this.promise,R())}function R(){return new Error("Array Methods must be provided an Array")}function L(e){return new D(this,e).promise}function U(e){var t=this;return new t(J(e)?function(n,r){for(var o=e.length,i=0;i<o;i++)t.resolve(e[i]).then(n,r)}:function(e,t){return t(new TypeError("You must pass an array to race."))})}function B(e){var t=this,n=new t(y);return O(n,e),n}function q(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function W(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function H(e){this[oe]=N(),this._result=this._state=void 0,this._subscribers=[],y!==e&&("function"!=typeof e&&q(),this instanceof H?j(this,e):W())}function $(){var e=void 0;if("undefined"!=typeof r)e=r;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=e.Promise;if(n){var o=null;try{o=Object.prototype.toString.call(n.resolve())}catch(t){}if("[object Promise]"===o&&!n.cast)return}e.Promise=H}var X=void 0;X=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var J=X,G=0,K=void 0,V=void 0,z=function(e,t){ne[G]=e,ne[G+1]=t,G+=2,2===G&&(V?V(f):re())},Y="undefined"!=typeof window?window:void 0,Q=Y||{},Z=Q.MutationObserver||Q.WebKitMutationObserver,ee="undefined"==typeof self&&"undefined"!=typeof t&&"[object process]"==={}.toString.call(t),te="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,ne=new Array(1e3),re=void 0;re=ee?s():Z?u():te?l():void 0===Y?d():p();var oe=Math.random().toString(36).substring(16),ie=void 0,ae=1,se=2,ce=new P,ue=new P,le=0;return D.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===ie&&n<e;n++)this._eachEntry(t[n],n)},D.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=b(e);if(o===m&&e._state!==ie)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===H){var i=new n(y);S(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(r(e),t)},D.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===ie&&(this._remaining--,e===se?O(r,n):this._result[t]=n),0===this._remaining&&x(r,this._result)},D.prototype._willSettleAt=function(e,t){var n=this;C(e,void 0,function(e){return n._settledAt(ae,t,e)},function(e){return n._settledAt(se,t,e)})},H.all=L,H.race=U,H.resolve=h,H.reject=B,H._setScheduler=i,H._setAsap=a,H._asap=z,H.prototype={constructor:H,then:m,"catch":function(e){return this.then(null,e)}},H.polyfill=$,H.Promise=H,H})}).call(t,n(28),function(){return this}())},,function(e,t,n){e.exports=!n(18)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(9),o=n(21);e.exports=n(7)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(14),o=n(50),i=n(37),a=Object.defineProperty;t.f=n(7)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t){var n=e.exports={version:"2.5.3"};"number"==typeof __e&&(__e=n)},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(57),o=n(32);e.exports=function(e){return r(o(e))}},function(e,t,n){(function(t){"use strict";var n="'4cb44d7578c1b21a823b0bbf6da74f19e0b51d15",r="4cb44d75'",o="4.8.0",i="2.4.0.208",a="3.7.0",s="45",c=1,u="https://lbs.netease.im/lbs/webconf.jsp",l="development"===t.env.NODE_ENV?6e3:42e3,p={info:{hash:n,shortHash:r,version:o,sdkVersion:s,nrtcVersion:a,protocolVersion:c},agentVersion:i,lbsUrl:u,connectTimeout:l,xhrTimeout:l,socketTimeout:l,reconnectionDelay:656.25,reconnectionDelayMax:l,reconnectionJitter:.1,heartbeatInterval:18e4,cmdTimeout:l};p.formatSocketUrl=function(e){var t=e.url,n=e.secure,r=n?"https":"http";return t.indexOf("http")===-1?r+"://"+t:t},p.fileServerUrl="https://nos.netease.com",p.replaceUrl="http://nos.netease.im",p.genUploadUrl=function(e){return p.uploadUrl?p.uploadUrl+"/"+e:p.fileServerUrl+"/"+e},p.genDownloadUrl=function(e,t){return p.downloadUrl?p.replaceUrl+"/"+e+"/"+t:"https://"+e+".nosdn.127.net/"+t},e.exports=p}).call(t,n(28))},function(e,t,n){var r=n(11);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},,,function(e,t,n){var r=n(2),o=n(10),i=n(45),a=n(8),s="prototype",c=function(e,t,n){var u,l,p,f=e&c.F,d=e&c.G,m=e&c.S,h=e&c.P,y=e&c.B,g=e&c.W,v=d?o:o[t]||(o[t]={}),b=v[s],w=d?r:m?r[t]:(r[t]||{})[s];d&&(n=t);for(u in n)l=!f&&w&&void 0!==w[u],l&&u in v||(p=l?w[u]:n[u],v[u]=d&&"function"!=typeof w[u]?n[u]:y&&l?i(p,r):g&&w[u]==p?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t[s]=e[s],t}(p):h&&"function"==typeof p?i(Function.call,p):p,h&&((v.virtual||(v.virtual={}))[u]=p,e&c.R&&b&&!b[u]&&a(b,u,p)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){"use strict";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(){this._events=new r,this._eventsCount=0}var a=Object.prototype.hasOwnProperty,s="~";Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(s=!1)),i.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)a.call(e,t)&&n.push(s?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},i.prototype.listeners=function(e,t){var n=s?s+e:e,r=this._events[n];if(t)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,a=new Array(i);o<i;o++)a[o]=r[o].fn;return a},i.prototype.emit=function(e,t,n,r,o,i){var a=s?s+e:e;if(!this._events[a])return!1;var c,u,l=this._events[a],p=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),p){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,r),!0;case 5:return l.fn.call(l.context,t,n,r,o),!0;case 6:return l.fn.call(l.context,t,n,r,o,i),!0}for(u=1,c=new Array(p-1);u<p;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var f,d=l.length;for(u=0;u<d;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),p){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,n);break;case 4:l[u].fn.call(l[u].context,t,n,r);break;default:if(!c)for(f=1,c=new Array(p-1);f<p;f++)c[f-1]=arguments[f];l[u].fn.apply(l[u].context,c)}}return!0},i.prototype.on=function(e,t,n){var r=new o(t,n||this),i=s?s+e:e;return this._events[i]?this._events[i].fn?this._events[i]=[this._events[i],r]:this._events[i].push(r):(this._events[i]=r,this._eventsCount++),this},i.prototype.once=function(e,t,n){var r=new o(t,n||this,!0),i=s?s+e:e;return this._events[i]?this._events[i].fn?this._events[i]=[this._events[i],r]:this._events[i].push(r):(this._events[i]=r,this._eventsCount++),this},i.prototype.removeListener=function(e,t,n,o){var i=s?s+e:e;if(!this._events[i])return this;if(!t)return 0===--this._eventsCount?this._events=new r:delete this._events[i],this;var a=this._events[i];if(a.fn)a.fn!==t||o&&!a.once||n&&a.context!==n||(0===--this._eventsCount?this._events=new r:delete this._events[i]);else{for(var c=0,u=[],l=a.length;c<l;c++)(a[c].fn!==t||o&&!a[c].once||n&&a[c].context!==n)&&u.push(a[c]);u.length?this._events[i]=1===u.length?u[0]:u:0===--this._eventsCount?this._events=new r:delete this._events[i]}return this},i.prototype.removeAllListeners=function(e){var t;return e?(t=s?s+e:e,this._events[t]&&(0===--this._eventsCount?this._events=new r:delete this._events[t])):(this._events=new r,this._eventsCount=0),this},i.prototype.off=i.prototype.removeListener,i.prototype.addListener=i.prototype.on,i.prototype.setMaxListeners=function(){return this},i.prefixed=s,i.EventEmitter=i,e.exports=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(74),i=r(o),a=n(73),s=r(a),c="function"==typeof s["default"]&&"symbol"==typeof i["default"]?function(e){return typeof e}:function(e){return e&&"function"==typeof s["default"]&&e.constructor===s["default"]&&e!==s["default"].prototype?"symbol":typeof e};t["default"]="function"==typeof s["default"]&&"symbol"===c(i["default"])?function(e){return"undefined"==typeof e?"undefined":c(e)}:function(e){return e&&"function"==typeof s["default"]&&e.constructor===s["default"]&&e!==s["default"].prototype?"symbol":"undefined"==typeof e?"undefined":c(e)}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},,function(e,t,n){var r=n(53),o=n(33);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t){e.exports={}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){var r=this;r.message=e||n.message||"","object"===("undefined"==typeof t?"undefined":(0,a["default"])(t))?(r.event=t,r.code="Other_Error"):"undefined"!=typeof t&&(r.code=t),r.timetag=+new Date,"undefined"!=typeof n&&(r.event=n),r.event&&(r.callFunc=r.event.callFunc||null,delete r.event.callFunc)}var i=n(20),a=r(i);o.prototype=Object.create(Error.prototype),o.prototype.name="NIMError";var s={201:"客户端版本不对, 需升级sdk",302:"用户名或密码错误, 请检查appKey和token是否有效, account和token是否匹配",403:"非法操作或没有权限",404:"对象(用户/群/聊天室)不存在",405:"参数长度过长",408:"客户端请求超时",414:"参数错误",415:"服务不可用/没有聊天室服务器可分配",416:"频率控制",417:"重复操作",422:"帐号被禁用",500:"服务器内部错误",501:"数据库操作失败",503:"服务器繁忙",508:"删除有效期过了",509:"已失效",7101:"被拉黑",801:"群人数达到上限",802:"没有权限",803:"群不存在或未发生变化",804:"用户不在群里面",805:"群类型不匹配",806:"创建群数量达到限制",807:"群成员状态不对",809:"已经在群里",813:"因群数量限制,部分拉人成功",997:"协议已失效",998:"解包错误",999:"打包错误",9102:"通道失效",9103:"已经在其他端接听/拒绝过这通电话",11001:"对方离线, 通话不可送达",13002:"聊天室状态异常",13003:"在黑名单中",13004:"在禁言名单中",13006:"聊天室处于整体禁言状态,只有管理员能发言",Connect_Failed:"无法建立连接, 请确保能 ping/telnet 到云信服务器; 如果是IE8/9, 请确保项目部署在 HTTPS 环境下",Error_Internet_Disconnected:"网断了",Error_Connection_is_not_Established:"连接未建立",Error_Connection_Socket_State_not_Match:"socket状态不对",Error_Timeout:"超时",Param_Error:"参数错误",No_File_Selected:"请选择文件",Wrong_File_Type:"文件类型错误",File_Too_Large:"文件过大",Cross_Origin_Iframe:"不能获取跨域Iframe的内容",Not_Support:"不支持",NO_DB:"无数据库",DB:"数据库错误",Still_In_Team:"还在群里",Session_Exist:"会话已存在",Session_Not_Exist:"会话不存在",Error_Unknown:"未知错误",Operation_Canceled:"操作取消"},c=[200,406,808,810];c.forEach(function(e){s[e]=null}),o.genError=function(e){var t=s[e];return void 0===t&&(t="操作失败"),null===t?null:new o(t,e)},o.multiInstance=function(e){return new o("不允许初始化多个实例","Not_Allow_Multi_Instance",e)},o.newNetworkError=function(e){var t="Error_Internet_Disconnected";return new o(s[t],t,e)},o.newConnectError=function(e){var t="Connect_Failed";return new o(s[t]||null,t,e)},o.newConnectionError=function(e){var t="Error_Connection_is_not_Established";return new o(s[t],t,e)},o.newSocketStateError=function(e){var t="Error_Connection_Socket_State_not_Match";return new o(s[t],t,e)},o.newTimeoutError=function(e){var t="Error_Timeout";return new o(s[t],t,e)},o.newFrequencyControlError=function(e){var t=416,n=new o(s[t],t,e);return n.from="local",n},o.newParamError=function(e,t){var n="Param_Error";return new o(e||s[n],n,t)},o.newNoFileError=function(e,t){var n="No_File_Selected";return new o(e||s[n],n,t)},o.newWrongFileTypeError=function(e,t){var n="Wrong_File_Type";return new o(e||s[n],n,t)},o.newFileTooLargeError=function(e,t){var n="File_Too_Large";return new o(e||s[n],n,t)},o.newCORSIframeError=function(e){var t="Cross_Origin_Iframe";return new o(s[t],t,e)},o.newSupportError=function(e,t,n){return new o("不支持"+e,"Not_Support_"+t,n)},o.newSupportDBError=function(e){return o.newSupportError("数据库","DB",e)},o.noDBError=function(e){var t="NO_DB";return new o(s[t],t,e)},o.newDBError=function(e){var t="DB";return new o(s[t],t,e)},o.newUnknownError=function(e){var t="Error_Unknown";return new o(s[t],t,e)},o.stillInTeamError=function(e){var t="Still_In_Team";return new o(s[t],t,e)},o.sessionExist=function(e){var t="Session_Exist";return new o(s[t],t,e)},o.sessionNotExist=function(e){var t="Session_Not_Exist";return new o(s[t],t,e)},o.cancel=function(e){var t="Operation_Canceled";return new o(s[t],t,e)},o.customError=function(e,t){e=e||"Other_Error",t=t||{};var n="";return t.message||(n=s[e]||e),"object"!==("undefined"==typeof e?"undefined":(0,a["default"])(e))?new o(n,e,t):"undefined"==typeof t?new o(n,"Other_Error",e):new o(n,"Other_Error",t)},e.exports=o},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function i(e){if(p===clearTimeout)return clearTimeout(e);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function a(){h&&d&&(h=!1,d.length?m=d.concat(m):y=-1,m.length&&s())}function s(){if(!h){var e=o(a);h=!0;for(var t=m.length;t;){for(d=m,m=[];++y<t;)d&&d[y].run();y=-1,t=m.length}d=null,h=!1,i(e)}}function c(e,t){this.fun=e,this.array=t}function u(){}var l,p,f=e.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(e){l=n}try{p="function"==typeof clearTimeout?clearTimeout:r}catch(e){p=r}}();var d,m=[],h=!1,y=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];m.push(new c(e,t)),1!==m.length||h||o(s)},c.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.prependListener=u,f.prependOnceListener=u,f.listeners=function(e){return[]},f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},,function(e,t){e.exports=!0},function(e,t,n){var r=n(9).f,o=n(4),i=n(3)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(35)("keys"),o=n(22);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(2),o="__core-js_shared__",i=r[o]||(r[o]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(11);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(2),o=n(10),i=n(30),a=n(39),s=n(9).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t,n){t.f=n(3)},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},,function(e,t,n){var r=n(14),o=n(84),i=n(33),a=n(34)("IE_PROTO"),s=function(){},c="prototype",u=function(){var e,t=n(46)("iframe"),r=i.length,o="<",a=">";for(t.style.display="none",n(67).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(o+"script"+a+"document.F=Object"+o+"/script"+a),e.close(),u=e.F;r--;)delete u[c][i[r]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(s[c]=r(e),n=new s,s[c]=null,n[a]=e):n=u(),void 0===t?n:o(n,t)}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){(function(e){"use strict";function n(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof e?e:{}}function r(e){var t=!1,n="Webkit Moz ms O".split(" "),r=document.createElement("div"),o=null;if(e=e.toLowerCase(),void 0!==r.style[e]&&(t=!0),t===!1){o=e.charAt(0).toUpperCase()+e.substr(1);for(var i=0;i<n.length;i++)if(void 0!==r.style[n[i]+o]){t=!0;break}}return t}function o(e,t){t=t||2;for(var n=""+e;n.length<t;)n="0"+n;return n}function i(e){return""+e.getFullYear()}function a(e){return o(e.getMonth()+1)}function s(e){return o(e.getDate())}function c(e){return o(e.getHours())}function u(e){return o(e.getMinutes())}function l(e){return o(e.getSeconds())}function p(e){return o(e.getMilliseconds(),3)}function f(e){return e=""+e,new Date(e.replace(/-/g,"/").replace("T"," "))}function d(e){return Object.prototype.toString.call(e).slice(8,-1)}function m(e){return d(e).toLowerCase()}function h(e){return"string"===m(e)}function y(e){return"number"===m(e)}function g(e){return"boolean"===m(e)}function v(e){return"array"===m(e)}function b(e){return"function"===m(e)}function w(e){return"date"===m(e)}function k(e){return"regexp"===m(e)}function T(e){return"error"===m(e)}function S(e){return null===e}function M(e){return null!==e}function _(e){return"undefined"==typeof e}function x(e){return"undefined"!=typeof e}function O(e){return x(e)&&M(e)}function C(e){return _(e)||S(e)}function E(e){return O(e)&&"object"===m(e)}function P(e){return C(e)||(h(e)||v(e))&&0===e.length}function I(e,t){if(e===t)return!0;for(;t.parentNode;){if(t.parentNode===e)return!0;t=t.parentNode}return!1}function A(e){var t=e.parentNode||document.body;e=e.cloneNode(!0),e.style.display="block",e.style.opacity=0,e.style.height="auto",t.appendChild(e);var n=e.offsetHeight;return t.removeChild(e),n}function j(e){e.parentNode&&e.parentNode.removeChild(e)}function N(e,t,n){return O(n)?void e.setAttribute("data-"+t,n):e.getAttribute("data-"+t)}function F(e){return e.target||e.srcElement}function D(e){function t(r){n.src&&(e.multi||ie(n,"load",t),e.onload(r))}e=e||{};var n;if(e.name)try{n=document.createElement('<iframe name="'+e.name+'"></iframe>'),n.frameBorder=0}catch(r){n=document.createElement("iframe"),n.name=e.name}else n=document.createElement("iframe");e.visible||(n.style.display="none"),b(e.onload)&&re(n,"load",t);var o=e.parent;(o||document.body).appendChild(n);var i=e.src||"about:blank";return setTimeout(function(){n.src=i},0),n}function R(e){var t=document.createElement("div");t.innerHTML=e;var n=[],r=void 0,o=void 0;if(t.children)for(r=0,o=t.children.length;r<o;r++)n.push(t.children[r]);else for(r=0,o=t.childNodes.length;r<o;r++){var i=t.childNodes[r];1===i.nodeType&&n.push(i)}return n.length>1?t:n[0]}function L(e){return O(e)&&(document.documentElement.scrollTop=document.body.scrollTop=e),window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function U(e){var t=n(),r=void 0;r=e.split(",")[0].indexOf("base64")>=0?t.atob(e.split(",")[1]):t.decodeURIComponent(e.split(",")[1]);for(var o=e.split(",")[0].split(":")[1].split(";")[0],i=new Uint8Array(r.length),a=0;a<r.length;a++)i[a]=r.charCodeAt(a);return new t.Blob([i],{type:o})}function B(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"image/jpeg",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(e.toBlob)e.toBlob(t,n,r);else{var o=e.toDataURL(n,r);t(U(o))}}function q(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments[2];for(var r in e)e.hasOwnProperty(r)&&t.call(n,r,e[r])}function W(e,t){q(t,function(t,n){e[t]=n})}function H(e){return h(e)&&0===e.indexOf("{")&&e.lastIndexOf("}")===e.length-1}function $(e){try{H(e)&&(e=JSON.parse(e)),E(e)&&q(e,function(t,n){switch(m(n)){case"string":case"object":e[t]=$(n)}})}catch(t){console.error(t)}return e}function X(e){return JSON.parse(JSON.stringify(e))}function J(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.forEach(function(t){W(e,t)}),e}function G(e,t){return q(t,function(t,n){_(e[t])&&(e[t]=n)}),e}function K(e,t,n){var r=e[t]||e[t.toLowerCase()];return C(r)&&(r=n,e[t]=r),r}function V(e,t){return q(e,function(n,r){O(t[n])&&(e[n]=t[n])}),e}function z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",",n={};return e.split(t).forEach(function(e){var t=e.split("="),r=t.shift();r&&(n[decodeURIComponent(r)]=decodeURIComponent(t.join("=")))}),n}function Y(e,t,n){if(!e)return"";var r=[];return q(e,function(e,t){b(t)||(w(t)?t=t.getTime():v(t)?t=t.join(","):E(t)&&(t=JSON.stringify(t)),n&&(t=encodeURIComponent(t)),r.push(encodeURIComponent(e)+"="+t))}),r.join(t||",")}function Q(e){return e.indexOf("?")<0?"?":"&"}function Z(e){return Y(e,"&",!0)}function ee(e){var t=n();return e.tagName&&"INPUT"===e.tagName.toUpperCase()||t.Blob&&e instanceof t.Blob}function te(e,t){var n=Object.keys(e);return t&&n.sort(function(t,n){var r=ee(e[t]),o=ee(e[n]);return r===o?0:r?1:-1}),n}t.__esModule=!0,t.getGlobal=n,t.detectCSSFeature=r,t.fix=o,t.getYearStr=i,t.getMonthStr=a,t.getDayStr=s,t.getHourStr=c,t.getMinuteStr=u,t.getSecondStr=l,t.getMillisecondStr=p,t.dateFromDateTimeLocal=f,t.getClass=d,t.typeOf=m,t.isString=h,t.isNumber=y,t.isBoolean=g,t.isArray=v,t.isFunction=b,t.isDate=w,t.isRegExp=k,t.isError=T,t.isnull=S,t.notnull=M,t.undef=_,t.notundef=x,t.exist=O,t.notexist=C,t.isObject=E,t.isEmpty=P,t.containsNode=I,t.calcHeight=A,t.remove=j,t.dataset=N,t.target=F,t.createIframe=D,t.html2node=R,t.scrollTop=L,t.blobFromDataURL=U,t.blobFromCanvas=B,t.forOwn=q,t.mixin=W,t.isJSON=H,t.parseJSON=$,t.simpleClone=X,t.merge=J,t.fillUndef=G,t.checkWithDefault=K,t.fetch=V,t.string2object=z,t.object2string=Y,t.genUrlSep=Q,t.object2query=Z,t.isFileInput=ee,t.getKeys=te;var ne=(t.o={},t.emptyObj={},t.f=function(){},t.emptyFunc=function(){},t.regBlank=/\s+/gi,t.regWhiteSpace=/\s+/gi,t.format=function(){var e=/yyyy|MM|dd|hh|mm|ss|SSS/g,t={yyyy:i,MM:a,dd:s,hh:c,mm:u,ss:l,SSS:p};return function(n,r){return n=new Date(n),isNaN(+n)?"invalid date":(r=r||"yyyy-MM-dd",r.replace(e,function(e){return t[e](n)}))}}(),t.addEventListener=function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,n)}),re=t.on=ne,oe=t.removeEventListener=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent&&e.detachEvent("on"+t,n)},ie=t.off=oe;t.uniqueID=function(){var e=0;return function(){return""+e++}}(),t.url2origin=function(){var e=/^([\w]+?:\/\/.*?(?=\/|$))/i;return function(t){return e.test(t||"")?RegExp.$1.toLowerCase():""}}()}).call(t,function(){return this}())},function(e,t,n){var r=n(56);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(11),o=n(2).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,n){"use strict";function r(){}var o=n(19),i=n(5).Promise,a=n(1),s=a.notundef,c=n(181),u=n(13),l={};r.rmAllInstances=function(){l={}},r.getInstance=function(e){var t=this;a.verifyOptions(e,"account","api::Base.getInstance");var n=t.genInstanceName(e),o=l[n];return o?r.updateInstance(o,e):o=l[n]=new t(e),o},r.updateInstance=function(e,t){e.setOptions(t),e.connect()};var p=r.fn=r.prototype=Object.create(new o);p.init=function(e){var t=this;a.verifyOptions(e,"account","api::Base.init");var n=t.account=e.account=e.account+"",o=e.constructor,i=o.genInstanceName(e),s=l[i];if(e._disableSingleton&&(s=null),s)return r.updateInstance(s,e),s;t.name=i,l[i]=t,t.logger=e.logger=new c({debug:e.debug,logFunc:e.logFunc,prefix:t.subType}),e.api=t;var p=t.protocol=new e.Protocol(e);return p.name="Protocol-"+i,p.account=n,p.api=t,p.message=t.message=new e.Message({account:n,enabledHttpsForMessage:t.protocol.options.enabledHttpsForMessage||!1}),t.options=a.copy(e),u.ntServerAddress=null===e.ntServerAddress?null:e.ntServerAddress||"https://dr.netease.im/1.gif",u.downloadHost=e.downloadHost||"nos.netease.com",e.uploadUrl&&(u.uploadUrl=e.uploadUrl),e.downloadUrl&&(u.downloadUrl=e.downloadUrl),u.replaceUrl=e.replaceUrl||"http://nos.netease.im",t.reset(),t},p.reset=function(){var e=this,t=e.options;a.verifyBooleanWithDefault(t,"exifOrientation",!0,"","api::Base.reset")},p.setOptions=function(e){this.reset(),this.protocol.setOptions(e)},p.processCallback=function(e,t){f(e,t)},p.processCallbackPromise=function(e,t){var n=new i(function(n,r){f(e,t,!0,n,r)});return n};var f=function(e,t,n,r,o){var i="api::processCallback";n&&(i="api::processCallbackPromise"),a.verifyCallback(e,"done",i),e.callback=function(c,u,l){var p=e.callback.options;if(u=u||p,t&&(u=p),a.isFunction(e.cbaop)){var f=e.cbaop(c,u);s(f)&&(u=f)}var d=e.done;a.isObject(u)&&(delete u.done,delete u.cb,delete u.callback),n?c?o({message:"生成接口回调错误",callFunc:i,event:c}):r(u):d(c,u,l)},e.callback.options=a.copy(e)};p.processPs=function(e){a.notexist(e.ps)&&(e.ps="")},p.processCustom=function(e){a.notexist(e.custom)&&(e.custom="")},p.sendCmd=function(){this.protocol.sendCmd.apply(this.protocol,arguments)},p.sendCmdWithResp=function(e,t,n){this.sendCmd(e,t,function(e,t,r){a.isFunction(n)&&(e?n(e,t):n(null,r))})},p.cbAndSendCmd=function(e,t){var n=this.processCallbackPromise(t);return this.sendCmd(e,t),n},r.use=function(e,t){e&&e.install&&a.isFunction(e.install)&&e.install(this,t)},e.exports=r,n(154),n(156),n(157),n(158),n(155),n(159)},function(e,t,n){var r;(function(e,o){(function(){"use strict";function i(e){return e=String(e),e.charAt(0).toUpperCase()+e.slice(1)}function a(e,t,n){var r={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return t&&n&&/^Win/i.test(e)&&!/^Windows Phone /i.test(e)&&(r=r[/[\d.]+$/.exec(e)])&&(e="Windows "+r),e=String(e),t&&n&&(e=e.replace(RegExp(t,"i"),n)),e=c(e.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}function s(e,t){var n=-1,r=e?e.length:0;if("number"==typeof r&&r>-1&&r<=T)for(;++n<r;)t(e[n],n,e);else u(e,t)}function c(e){return e=m(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:i(e)}function u(e,t){for(var n in e)x.call(e,n)&&t(e[n],n,e)}function l(e){return null==e?i(e):O.call(e).slice(8,-1)}function p(e,t){var n=null!=e?typeof e[t]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(n)||"object"==n&&!e[t])}function f(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function d(e,t){var n=null;return s(e,function(r,o){n=t(n,r,o,e)}),n}function m(e){return String(e).replace(/^ +| +$/g,"")}function h(e){function t(t){return d(t,function(t,n){return t||RegExp("\\b"+(n.pattern||f(n))+"\\b","i").exec(e)&&(n.label||n)})}function n(t){return d(t,function(t,n,r){return t||(n[V]||n[/^[a-z]+(?: +[a-z]+\b)*/i.exec(V)]||RegExp("\\b"+f(r)+"(?:\\b|\\w*\\d)","i").exec(e))&&r})}function r(t){return d(t,function(t,n){return t||RegExp("\\b"+(n.pattern||f(n))+"\\b","i").exec(e)&&(n.label||n)})}function o(t){return d(t,function(t,n){var r=n.pattern||f(n);return!t&&(t=RegExp("\\b"+r+"(?:/[\\d.]+|[ \\w.]*)","i").exec(e))&&(t=a(t,r,n.label||n)),t})}function i(t){return d(t,function(t,n){var r=n.pattern||f(n);return!t&&(t=RegExp("\\b"+r+" *\\d+[.\\w_]*","i").exec(e)||RegExp("\\b"+r+" *\\w+-[\\w]*","i").exec(e)||RegExp("\\b"+r+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(e))&&((t=String(n.label&&!RegExp(r,"i").test(n.label)?n.label:t).split("/"))[1]&&!/[\d.]+/.test(t[0])&&(t[0]+=" "+t[1]),
n=n.label||n,t=c(t[0].replace(RegExp(r,"i"),n).replace(RegExp("; *(?:"+n+"[_-])?","i")," ").replace(RegExp("("+n+")[-_.]?(\\w)","i"),"$1 $2"))),t})}function s(t){return d(t,function(t,n){return t||(RegExp(n+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(e)||0)[1]||null})}function y(){return this.description||""}var b=g,w=e&&"object"==typeof e&&"String"!=l(e);w&&(b=e,e=null);var k=b.navigator||{},T=k.userAgent||"";e||(e=T);var _,x,C=w||M==v,E=w?!!k.likeChrome:/\bChrome\b/.test(e)&&!/internal|\n/i.test(O.toString()),P="Object",I=w?P:"ScriptBridgingProxyObject",A=w?P:"Environment",j=w&&b.java?"JavaPackage":l(b.java),N=w?P:"RuntimeObject",F=/\bJava/.test(j)&&b.java,D=F&&l(b.environment)==A,R=F?"a":"α",L=F?"b":"β",U=b.document||{},B=b.operamini||b.opera,q=S.test(q=w&&B?B["[[Class]]"]:l(B))?q:B=null,W=e,H=[],$=null,X=e==T,J=X&&B&&"function"==typeof B.version&&B.version(),G=t([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),K=r(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),V=i([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),z=n({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),Y=o(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);if(G&&(G=[G]),z&&!V&&(V=i([z])),(_=/\bGoogle TV\b/.exec(V))&&(V=_[0]),/\bSimulator\b/i.test(e)&&(V=(V?V+" ":"")+"Simulator"),"Opera Mini"==K&&/\bOPiOS\b/.test(e)&&H.push("running in Turbo/Uncompressed mode"),"IE"==K&&/\blike iPhone OS\b/.test(e)?(_=h(e.replace(/like iPhone OS/,"")),z=_.manufacturer,V=_.product):/^iP/.test(V)?(K||(K="Safari"),Y="iOS"+((_=/ OS ([\d_]+)/i.exec(e))?" "+_[1].replace(/_/g,"."):"")):"Konqueror"!=K||/buntu/i.test(Y)?z&&"Google"!=z&&(/Chrome/.test(K)&&!/\bMobile Safari\b/i.test(e)||/\bVita\b/.test(V))||/\bAndroid\b/.test(Y)&&/^Chrome/.test(K)&&/\bVersion\//i.test(e)?(K="Android Browser",Y=/\bAndroid\b/.test(Y)?Y:"Android"):"Silk"==K?(/\bMobi/i.test(e)||(Y="Android",H.unshift("desktop mode")),/Accelerated *= *true/i.test(e)&&H.unshift("accelerated")):"PaleMoon"==K&&(_=/\bFirefox\/([\d.]+)\b/.exec(e))?H.push("identifying as Firefox "+_[1]):"Firefox"==K&&(_=/\b(Mobile|Tablet|TV)\b/i.exec(e))?(Y||(Y="Firefox OS"),V||(V=_[1])):!K||(_=!/\bMinefield\b/i.test(e)&&/\b(?:Firefox|Safari)\b/.exec(K))?(K&&!V&&/[\/,]|^[^(]+?\)/.test(e.slice(e.indexOf(_+"/")+8))&&(K=null),(_=V||z||Y)&&(V||z||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Y))&&(K=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Y)?Y:_)+" Browser")):"Electron"==K&&(_=(/\bChrome\/([\d.]+)\b/.exec(e)||0)[1])&&H.push("Chromium "+_):Y="Kubuntu",J||(J=s(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",f(K),"(?:Firefox|Minefield|NetFront)"])),(_="iCab"==G&&parseFloat(J)>3&&"WebKit"||/\bOpera\b/.test(K)&&(/\bOPR\b/.test(e)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(e)&&!/^(?:Trident|EdgeHTML)$/.test(G)&&"WebKit"||!G&&/\bMSIE\b/i.test(e)&&("Mac OS"==Y?"Tasman":"Trident")||"WebKit"==G&&/\bPlayStation\b(?! Vita\b)/i.test(K)&&"NetFront")&&(G=[_]),"IE"==K&&(_=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(e)||0)[1])?(K+=" Mobile",Y="Windows Phone "+(/\+$/.test(_)?_:_+".x"),H.unshift("desktop mode")):/\bWPDesktop\b/i.test(e)?(K="IE Mobile",Y="Windows Phone 8.x",H.unshift("desktop mode"),J||(J=(/\brv:([\d.]+)/.exec(e)||0)[1])):"IE"!=K&&"Trident"==G&&(_=/\brv:([\d.]+)/.exec(e))&&(K&&H.push("identifying as "+K+(J?" "+J:"")),K="IE",J=_[1]),X){if(p(b,"global"))if(F&&(_=F.lang.System,W=_.getProperty("os.arch"),Y=Y||_.getProperty("os.name")+" "+_.getProperty("os.version")),C&&p(b,"system")&&(_=[b.system])[0]){Y||(Y=_[0].os||null);try{_[1]=b.require("ringo/engine").version,J=_[1].join("."),K="RingoJS"}catch(Q){_[0].global.system==b.system&&(K="Narwhal")}}else"object"==typeof b.process&&!b.process.browser&&(_=b.process)?"object"==typeof _.versions?"string"==typeof _.versions.electron?(H.push("Node "+_.versions.node),K="Electron",J=_.versions.electron):"string"==typeof _.versions.nw&&(H.push("Chromium "+J,"Node "+_.versions.node),K="NW.js",J=_.versions.nw):(K="Node.js",W=_.arch,Y=_.platform,J=/[\d.]+/.exec(_.version),J=J?J[0]:"unknown"):D&&(K="Rhino");else l(_=b.runtime)==I?(K="Adobe AIR",Y=_.flash.system.Capabilities.os):l(_=b.phantom)==N?(K="PhantomJS",J=(_=_.version||null)&&_.major+"."+_.minor+"."+_.patch):"number"==typeof U.documentMode&&(_=/\bTrident\/(\d+)/i.exec(e))?(J=[J,U.documentMode],(_=+_[1]+4)!=J[1]&&(H.push("IE "+J[1]+" mode"),G&&(G[1]=""),J[1]=_),J="IE"==K?String(J[1].toFixed(1)):J[0]):"number"==typeof U.documentMode&&/^(?:Chrome|Firefox)\b/.test(K)&&(H.push("masking as "+K+" "+J),K="IE",J="11.0",G=["Trident"],Y="Windows");Y=Y&&c(Y)}if(J&&(_=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(J)||/(?:alpha|beta)(?: ?\d)?/i.exec(e+";"+(X&&k.appMinorVersion))||/\bMinefield\b/i.test(e)&&"a")&&($=/b/i.test(_)?"beta":"alpha",J=J.replace(RegExp(_+"\\+?$"),"")+("beta"==$?L:R)+(/\d+\+?/.exec(_)||"")),"Fennec"==K||"Firefox"==K&&/\b(?:Android|Firefox OS)\b/.test(Y))K="Firefox Mobile";else if("Maxthon"==K&&J)J=J.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(V))"Xbox 360"==V&&(Y=null),"Xbox 360"==V&&/\bIEMobile\b/.test(e)&&H.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(K)&&(!K||V||/Browser|Mobi/.test(K))||"Windows CE"!=Y&&!/Mobi/i.test(e))if("IE"==K&&X)try{null===b.external&&H.unshift("platform preview")}catch(Q){H.unshift("embedded")}else(/\bBlackBerry\b/.test(V)||/\bBB10\b/.test(e))&&(_=(RegExp(V.replace(/ +/g," *")+"/([.\\d]+)","i").exec(e)||0)[1]||J)?(_=[_,/BB10/.test(e)],Y=(_[1]?(V=null,z="BlackBerry"):"Device Software")+" "+_[0],J=null):this!=u&&"Wii"!=V&&(X&&B||/Opera/.test(K)&&/\b(?:MSIE|Firefox)\b/i.test(e)||"Firefox"==K&&/\bOS X (?:\d+\.){2,}/.test(Y)||"IE"==K&&(Y&&!/^Win/.test(Y)&&J>5.5||/\bWindows XP\b/.test(Y)&&J>8||8==J&&!/\bTrident\b/.test(e)))&&!S.test(_=h.call(u,e.replace(S,"")+";"))&&_.name&&(_="ing as "+_.name+((_=_.version)?" "+_:""),S.test(K)?(/\bIE\b/.test(_)&&"Mac OS"==Y&&(Y=null),_="identify"+_):(_="mask"+_,K=q?c(q.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(_)&&(Y=null),X||(J=null)),G=["Presto"],H.push(_));else K+=" Mobile";(_=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(e)||0)[1])&&(_=[parseFloat(_.replace(/\.(\d)$/,".0$1")),_],"Safari"==K&&"+"==_[1].slice(-1)?(K="WebKit Nightly",$="alpha",J=_[1].slice(0,-1)):J!=_[1]&&J!=(_[2]=(/\bSafari\/([\d.]+\+?)/i.exec(e)||0)[1])||(J=null),_[1]=(/\bChrome\/([\d.]+)/i.exec(e)||0)[1],537.36==_[0]&&537.36==_[2]&&parseFloat(_[1])>=28&&"WebKit"==G&&(G=["Blink"]),X&&(E||_[1])?(G&&(G[1]="like Chrome"),_=_[1]||(_=_[0],_<530?1:_<532?2:_<532.05?3:_<533?4:_<534.03?5:_<534.07?6:_<534.1?7:_<534.13?8:_<534.16?9:_<534.24?10:_<534.3?11:_<535.01?12:_<535.02?"13+":_<535.07?15:_<535.11?16:_<535.19?17:_<536.05?18:_<536.1?19:_<537.01?20:_<537.11?"21+":_<537.13?23:_<537.18?24:_<537.24?25:_<537.36?26:"Blink"!=G?"27":"28")):(G&&(G[1]="like Safari"),_=_[0],_=_<400?1:_<500?2:_<526?3:_<533?4:_<534?"4+":_<535?5:_<537?6:_<538?7:_<601?8:"8"),G&&(G[1]+=" "+(_+="number"==typeof _?".x":/[.+]/.test(_)?"":"+")),"Safari"==K&&(!J||parseInt(J)>45)&&(J=_)),"Opera"==K&&(_=/\bzbov|zvav$/.exec(Y))?(K+=" ",H.unshift("desktop mode"),"zvav"==_?(K+="Mini",J=null):K+="Mobile",Y=Y.replace(RegExp(" *"+_+"$"),"")):"Safari"==K&&/\bChrome\b/.exec(G&&G[1])&&(H.unshift("desktop mode"),K="Chrome Mobile",J=null,/\bOS X\b/.test(Y)?(z="Apple",Y="iOS 4.3+"):Y=null),J&&0==J.indexOf(_=/[\d.]+$/.exec(Y))&&e.indexOf("/"+_+"-")>-1&&(Y=m(Y.replace(_,""))),G&&!/\b(?:Avant|Nook)\b/.test(K)&&(/Browser|Lunascape|Maxthon/.test(K)||"Safari"!=K&&/^iOS/.test(Y)&&/\bSafari\b/.test(G[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(K)&&G[1])&&(_=G[G.length-1])&&H.push(_),H.length&&(H=["("+H.join("; ")+")"]),z&&V&&V.indexOf(z)<0&&H.push("on "+z),V&&H.push((/^on /.test(H[H.length-1])?"":"on ")+V),Y&&(_=/ ([\d.+]+)$/.exec(Y),x=_&&"/"==Y.charAt(Y.length-_[0].length-1),Y={architecture:32,family:_&&!x?Y.replace(_[0],""):Y,version:_?_[1]:null,toString:function(){var e=this.version;return this.family+(e&&!x?" "+e:"")+(64==this.architecture?" 64-bit":"")}}),(_=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(W))&&!/\bi686\b/i.test(W)?(Y&&(Y.architecture=64,Y.family=Y.family.replace(RegExp(" *"+_),"")),K&&(/\bWOW64\b/i.test(e)||X&&/\w(?:86|32)$/.test(k.cpuClass||k.platform)&&!/\bWin64; x64\b/i.test(e))&&H.unshift("32-bit")):Y&&/^OS X/.test(Y.family)&&"Chrome"==K&&parseFloat(J)>=39&&(Y.architecture=64),e||(e=null);var Z={};return Z.description=e,Z.layout=G&&G[0],Z.manufacturer=z,Z.name=K,Z.prerelease=$,Z.product=V,Z.ua=e,Z.version=K&&J,Z.os=Y||{architecture:null,family:null,version:null,toString:function(){return"null"}},Z.parse=h,Z.toString=y,Z.version&&H.unshift(J),Z.name&&H.unshift(K),Y&&K&&(Y!=String(Y).split(" ")[0]||Y!=K.split(" ")[0]&&!V)&&H.push(V?"("+Y+")":"on "+Y),H.length&&(Z.description=H.join(" ")),Z}var y={"function":!0,object:!0},g=y[typeof window]&&window||this,v=g,b=y[typeof t]&&t,w=y[typeof e]&&e&&!e.nodeType&&e,k=b&&w&&"object"==typeof o&&o;!k||k.global!==k&&k.window!==k&&k.self!==k||(g=k);var T=Math.pow(2,53)-1,S=/\bOpera/,M=this,_=Object.prototype,x=_.hasOwnProperty,O=_.toString,C=h();g.platform=C,r=function(){return C}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}).call(this)}).call(t,n(63)(e),function(){return this}())},,function(e,t,n){e.exports=!n(7)&&!n(18)(function(){return 7!=Object.defineProperty(n(46)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){"use strict";var r=n(30),o=n(17),i=n(54),a=n(8),s=n(4),c=n(26),u=n(81),l=n(31),p=n(86),f=n(3)("iterator"),d=!([].keys&&"next"in[].keys()),m="@@iterator",h="keys",y="values",g=function(){return this};e.exports=function(e,t,n,v,b,w,k){u(n,t,v);var T,S,M,_=function(e){if(!d&&e in E)return E[e];switch(e){case h:return function(){return new n(this,e)};case y:return function(){return new n(this,e)}}return function(){return new n(this,e)}},x=t+" Iterator",O=b==y,C=!1,E=e.prototype,P=E[f]||E[m]||b&&E[b],I=!d&&P||_(b),A=b?O?_("entries"):I:void 0,j="Array"==t?E.entries||P:P;if(j&&(M=p(j.call(new e)),M!==Object.prototype&&M.next&&(l(M,x,!0),r||s(M,f)||a(M,f,g))),O&&P&&P.name!==y&&(C=!0,I=function(){return P.call(this)}),r&&!k||!d&&!C&&E[f]||a(E,f,I),c[t]=I,c[x]=g,b)if(T={values:O?I:_(y),keys:w?I:_(h),entries:A},k)for(S in T)S in E||i(E,S,T[S]);else o(o.P+o.F*(d||C),t,T);return T}},function(e,t,n){var r=n(53),o=n(33).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){var r=n(4),o=n(12),i=n(78)(!1),a=n(34)("IE_PROTO");e.exports=function(e,t){var n,s=o(e),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;t.length>c;)r(s,n=t[c++])&&(~i(u,n)||u.push(n));return u}},function(e,t,n){e.exports=n(8)},,function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(40);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){var r=n(25),o=n(21),i=n(12),a=n(37),s=n(4),c=n(50),u=Object.getOwnPropertyDescriptor;t.f=n(7)?u:function(e,t){if(e=i(e),t=a(t,!0),c)try{return u(e,t)}catch(n){}if(s(e,t))return o(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(32);e.exports=function(e){return Object(r(e))}},,function(e,t,n){"use strict";var r=n(106),o=n(175),i=n(179);r.json=o,r.upload=i,e.exports=r},function(e,t,n){"use strict";var r=n(1),o={};o.init=function(){o.deviceId=r.guid()},o.init(),o.clientTypeMap={1:"Android",2:"iOS",4:"PC",8:"WindowsPhone",16:"Web",32:"Server",64:"Mac"},e.exports=o},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){var t=this;o.undef(e.secure)&&(e.secure=!0),t.options=o.copy(e),t.init(),t.connect()}var o=n(1),i=n(13),a=n(27),s=r.fn=r.prototype;s.init=function(){var e=this;e.logger=e.options.logger,e.cmdTaskArray=[],e.timerMap={},e.cmdCallbackMap={},e.cmdContentMap={},e.initConnect(),e.reset()},s.reset=function(){var e=this;e.resetConnect()},s.setOptions=function(e){var t=this,n=t.options,r=Object.keys(n),i=r.indexOf("account");i!==-1&&r.splice(i,1),e=o.filterObj(e,r),t.options=o.merge(n,e),t.reset()},s.sendCmd=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments[2],r=this;r.heartbeat(),"heartbeat"!==e&&r.logger.warn("protocol::sendCmd: "+e,t);var o=e;e=r.parser.createCmd(e,t);var i,a=e.SER;t=t||{},r.cmdContentMap[a]=t,t.single&&(delete t.single,i=Object.keys(t),1===i.length&&(r.cmdContentMap[a]=t[i[0]])),t.NOTSTORE&&(i=t.NOTSTORE.split(" "),i.forEach(function(e){delete t[e]}),delete t.NOTSTORE),n=n||t.callback,n&&(r.cmdCallbackMap[a]=n),r.cmdTaskArray.push({cmdName:o,cmd:JSON.stringify(e)}),r.startCmdTaskTimer()},s.startCmdTaskTimer=function(){var e=this;e.cmdTaskTimer||(e.cmdTaskTimer=setTimeout(function(){var t=e.cmdTaskArray.shift();e.cmdTaskTimer=null,t&&e.executeCmdTask(t),e.cmdTaskArray.length&&e.startCmdTaskTimer()},0))},s.executeCmdTask=function(e){var t=this,n=e.cmdName,r=e.cmd;r=JSON.parse(r);var o=r.SER;t.isFrequencyControlled(n)?(t.logger.warn("protocol::executeCmdTask: "+n+" hit freq control"),t.markCallbackInvalid(o,a.newFrequencyControlError({callFunc:"protocol::executeCmdTask",message:n+" hit freq control"}))):t.isConnected()?(t.logger.log("protocol::sendCmd: "+n+" "+JSON.stringify(r)),t.doSendCmd(r)):(t.logger.warn("protocol::executeCmdTask: "+n+" not connected"),t.markCallbackInvalid(o,a.newSocketStateError({callFunc:"protocol::executeCmdTask",message:n+" not connected"})))},s.isFrequencyControlled=function(e){var t=this.frequencyControlMap&&this.frequencyControlMap[e];if(t){if(Date.now()<t.from+t.duration)return!0;delete this.frequencyControlMap[e]}},s.doSendCmd=function(e){var t=this,n=e.SER;t.timerMap[n]=setTimeout(function(){t.markCallbackInvalid(n,a.newTimeoutError({callFunc:"protocol::doSendCmd",message:"ser "+n+" Timeout Error"}))},i.cmdTimeout);try{t.socket.send(JSON.stringify(e))}catch(r){t.markCallbackInvalid(n,a.newSocketStateError({callFunc:"protocol::doSendCmd",message:"ser "+n+" socketSendJson Error"})),t.onDisconnect(!0,"protocol::doSendCmd:socketSendJson")}},s.getObjWithSer=function(e){var t=this,n=t.cmdContentMap[e];return delete t.cmdContentMap[e],n&&o.copy(n)},s.getCallbackWithSer=function(e){var t=this,n=t.cmdCallbackMap[e];return delete t.cmdCallbackMap[e],n},s.getTimerWithSer=function(e){var t=this,n=t.timerMap[e];return delete t.timerMap[e],n},s.clearTimerWithSer=function(e){var t=this,n=t.getTimerWithSer(e);n&&clearTimeout(n)},s.markCallbackInvalid=function(e,t){var n=this;n.getObjWithSer(e),n.clearTimerWithSer(e);var r=n.getCallbackWithSer(e);if(r){var o=r.options;setTimeout(function(){r(t||a.newUnknownError({ser:e}),o)},0)}},s.markAllCallbackInvalid=function(e){var t=this;Object.keys(this.cmdCallbackMap).forEach(function(n){t.markCallbackInvalid(n,e)})},s.getPacketObj=function(e){var t=null;if(e&&e.raw){var n=e.raw.ser;o.notundef(n)&&(t=this.getObjWithSer(n))}return t},s.callPacketAckCallback=function(e){var t=this;if(e&&e.raw){var n=e.raw.ser;if(o.notundef(n)){t.clearTimerWithSer(n);var r=t.getCallbackWithSer(n);r&&(e.promise?e.promise.then(function(){r(e.error,e.obj)},function(o){o.callFunc="protocol::callPacketAckCallback",o.message="Resp Promoise Error: cmd: "+e.cmd+", ser: "+n;var i=a.customError("CALLBACK_ACK_ERR",o);t.logger.error("protocol::callPacketAckCallback: promise error "+JSON.stringify(o)),r(i,e.obj,e.content)}):r(e.error,e.obj,e.content))}}},s.onMessage=function(e){var t=this;t.heartbeat();var n=t.parser.parseResponse(e);n.notFound&&t.logger.warn("protocol::onMessage: packet not found "+JSON.stringify(n)),n.error?(n.error.message=n.cmd+" error: "+n.error.message,t.logger.error("protocol::onMessage: packet error "+JSON.stringify(n.error))):n.content||"heartbeat"===n.cmd||t.logger.warn("protocol::onMessage: packet.content undefined "+JSON.stringify(n)),n.frequencyControlDuration&&(t.logger.error("protocol::onMessage: server freq control "+JSON.stringify(n.cmd)),t.frequencyControlMap=t.frequencyControlMap||{},t.frequencyControlMap[n.cmd]={from:+new Date,duration:n.frequencyControlDuration}),n.obj=t.getPacketObj(n),"heartbeat"!==n.cmd&&t.logger.log("protocol::recvCmd: "+n.cmd+" "+n.rawStr);var r="process"+o.capFirstLetter(n.service);t[r]?(t.logger.warn("protocol::recvCmd: "+n.cmd+" "+r,n.content),t[r](n)):t.logger.warn("protocol::onMessage: "+r+" not found"),t.callPacketAckCallback(n)},s.onMiscError=function(e,t,n){t&&this.notifyError(e,t,n)},s.notifyError=function(e,t,n){var r=this;if(r.isConnected()){var o=[(e||"")+" "+r.name+" "+JSON.stringify(t)];n&&o.push(n),r.logger.error.apply(r.logger.error,o),r.options.onerror(t,n)}},s.emitAPI=function(e){var t=e.type,n=e.obj;this.api.emit(t,n)},e.exports=r,n(164),n(163),n(165),n(166)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=this;e.resend?(s.verifyOptions(e,"idClient","msg::Message"),t.idClient=e.idClient):t.idClient=s.guid(),t.type=f[e.type],t.resend=e.resend?1:0,c(e.custom)&&("object"===(0,a["default"])(e.custom)?(t.logger.info("model::Message: custom should be JsonString, auto transfer"),t.custom=JSON.stringify(e.custom)):t.custom=""+e.custom),c(e.text)&&(t.body=""+e.text),c(e.body)&&(t.body=""+e.body),c(e.yidunEnable)&&(t.yidunEnable=e.yidunEnable?1:0),c(e.antiSpamUsingYidun)&&(t.antiSpamUsingYidun=e.antiSpamUsingYidun?1:0),c(e.antiSpamContent)&&("object"===(0,a["default"])(e.antiSpamContent)?(t.logger.info("model::Message: antiSpamContent should be JsonString, auto transfer"),t.antiSpamContent=JSON.stringify(e.antiSpamContent)):t.antiSpamContent=""+e.antiSpamContent),c(e.antiSpamBusinessId)&&("object"===(0,a["default"])(e.antiSpamBusinessId)?(t.logger.info("model::Message: antiSpamBusinessId should be JsonString, auto transfer"),t.antiSpamBusinessId=JSON.stringify(e.antiSpamBusinessId)):t.antiSpamBusinessId=""+e.antiSpamBusinessId),c(e.skipHistory)&&(t.skipHistory=e.skipHistory?1:0)}var i=n(20),a=r(i),s=n(1),c=s.notundef,u=s.exist,l=n(100),p=n(151),f=p.typeMap;o.validTypes=p.validTypes,o.getType=p.getType,o.reverse=function(e){var t=s.filterObj(e,"chatroomId idClient from fromNick fromAvatar fromCustom userUpdateTime custom status");return t=s.merge(t,{fromClientType:l.reverseType(e.fromClientType),time:+e.time,type:o.getType(e),text:u(e.body)?e.body:"",resend:1===+e.resend}),c(t.userUpdateTime)&&(t.userUpdateTime=+t.userUpdateTime),t.status=t.status||"success",t},o.setExtra=function(e,t){p.setFlow(e,t)},e.exports=o},,function(e,t,n){var r=n(2).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(36),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t){},function(e,t,n){"use strict";var r=n(87)(!0);n(51)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){n(89);for(var r=n(2),o=n(8),i=n(26),a=n(3)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c<s.length;c++){var u=s[c],l=r[u],p=l&&l.prototype;p&&!p[a]&&o(p,a,u),i[u]=i.Array}},,function(e,t,n){e.exports={"default":n(75),__esModule:!0}},function(e,t,n){e.exports={"default":n(76),__esModule:!0}},function(e,t,n){n(90),n(69),n(91),n(92),e.exports=n(10).Symbol},function(e,t,n){n(70),n(71),e.exports=n(39).f("iterator")},function(e,t){e.exports=function(){}},function(e,t,n){var r=n(12),o=n(68),i=n(88);e.exports=function(e){return function(t,n,a){var s,c=r(t),u=o(c.length),l=i(a,u);if(e&&n!=n){for(;u>l;)if(s=c[l++],s!=s)return!0}else for(;u>l;l++)if((e||l in c)&&c[l]===n)return e||l||0;return!e&&-1}}},function(e,t,n){var r=n(24),o=n(43),i=n(25);e.exports=function(e){var t=r(e),n=o.f;if(n)for(var a,s=n(e),c=i.f,u=0;s.length>u;)c.call(e,a=s[u++])&&t.push(a);return t}},function(e,t,n){var r=n(40);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){"use strict";var r=n(42),o=n(21),i=n(31),a={};n(8)(a,n(3)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(22)("meta"),o=n(11),i=n(4),a=n(9).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(18)(function(){return c(Object.preventExtensions({}))}),l=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},p=function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!c(e))return"F";if(!t)return"E";l(e)}return e[r].i},f=function(e,t){if(!i(e,r)){if(!c(e))return!0;if(!t)return!1;l(e)}return e[r].w},d=function(e){return u&&m.NEED&&c(e)&&!i(e,r)&&l(e),e},m=e.exports={KEY:r,NEED:!1,fastKey:p,getWeak:f,onFreeze:d}},function(e,t,n){var r=n(9),o=n(14),i=n(24);e.exports=n(7)?Object.defineProperties:function(e,t){o(e);for(var n,a=i(t),s=a.length,c=0;s>c;)r.f(e,n=a[c++],t[n]);return e}},function(e,t,n){var r=n(12),o=n(52).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(e){try{return o(e)}catch(t){return a.slice()}};e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?s(e):o(r(e))}},function(e,t,n){var r=n(4),o=n(59),i=n(34)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){var r=n(36),o=n(32);e.exports=function(e){return function(t,n){var i,a,s=String(o(t)),c=r(n),u=s.length;return c<0||c>=u?e?"":void 0:(i=s.charCodeAt(c),i<55296||i>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?e?s.charAt(c):i:e?s.slice(c,c+2):(i-55296<<10)+(a-56320)+65536)}}},function(e,t,n){var r=n(36),o=Math.max,i=Math.min;e.exports=function(e,t){return e=r(e),e<0?o(e+t,0):i(e,t)}},function(e,t,n){"use strict";var r=n(77),o=n(82),i=n(26),a=n(12);e.exports=n(51)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):"keys"==t?o(0,n):"values"==t?o(0,e[n]):o(0,[n,e[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t,n){"use strict";var r=n(2),o=n(4),i=n(7),a=n(17),s=n(54),c=n(83).KEY,u=n(18),l=n(35),p=n(31),f=n(22),d=n(3),m=n(39),h=n(38),y=n(79),g=n(80),v=n(14),b=n(11),w=n(12),k=n(37),T=n(21),S=n(42),M=n(85),_=n(58),x=n(9),O=n(24),C=_.f,E=x.f,P=M.f,I=r.Symbol,A=r.JSON,j=A&&A.stringify,N="prototype",F=d("_hidden"),D=d("toPrimitive"),R={}.propertyIsEnumerable,L=l("symbol-registry"),U=l("symbols"),B=l("op-symbols"),q=Object[N],W="function"==typeof I,H=r.QObject,$=!H||!H[N]||!H[N].findChild,X=i&&u(function(){return 7!=S(E({},"a",{get:function(){return E(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=C(q,t);r&&delete q[t],E(e,t,n),r&&e!==q&&E(q,t,r)}:E,J=function(e){var t=U[e]=S(I[N]);return t._k=e,t},G=W&&"symbol"==typeof I.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof I},K=function(e,t,n){return e===q&&K(B,t,n),v(e),t=k(t,!0),v(n),o(U,t)?(n.enumerable?(o(e,F)&&e[F][t]&&(e[F][t]=!1),n=S(n,{enumerable:T(0,!1)})):(o(e,F)||E(e,F,T(1,{})),e[F][t]=!0),X(e,t,n)):E(e,t,n)},V=function(e,t){v(e);for(var n,r=y(t=w(t)),o=0,i=r.length;i>o;)K(e,n=r[o++],t[n]);return e},z=function(e,t){return void 0===t?S(e):V(S(e),t)},Y=function(e){var t=R.call(this,e=k(e,!0));return!(this===q&&o(U,e)&&!o(B,e))&&(!(t||!o(this,e)||!o(U,e)||o(this,F)&&this[F][e])||t)},Q=function(e,t){if(e=w(e),t=k(t,!0),e!==q||!o(U,t)||o(B,t)){var n=C(e,t);return!n||!o(U,t)||o(e,F)&&e[F][t]||(n.enumerable=!0),n}},Z=function(e){for(var t,n=P(w(e)),r=[],i=0;n.length>i;)o(U,t=n[i++])||t==F||t==c||r.push(t);return r},ee=function(e){for(var t,n=e===q,r=P(n?B:w(e)),i=[],a=0;r.length>a;)!o(U,t=r[a++])||n&&!o(q,t)||i.push(U[t]);return i};W||(I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===q&&t.call(B,n),o(this,F)&&o(this[F],e)&&(this[F][e]=!1),X(this,e,T(1,n))};return i&&$&&X(q,e,{configurable:!0,set:t}),J(e)},s(I[N],"toString",function(){return this._k}),_.f=Q,x.f=K,n(52).f=M.f=Z,n(25).f=Y,n(43).f=ee,i&&!n(30)&&s(q,"propertyIsEnumerable",Y,!0),m.f=function(e){return J(d(e))}),a(a.G+a.W+a.F*!W,{Symbol:I});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)d(te[ne++]);for(var re=O(d.store),oe=0;re.length>oe;)h(re[oe++]);a(a.S+a.F*!W,"Symbol",{"for":function(e){return o(L,e+="")?L[e]:L[e]=I(e)},keyFor:function(e){if(!G(e))throw TypeError(e+" is not a symbol!");for(var t in L)if(L[t]===e)return t},useSetter:function(){$=!0},useSimple:function(){$=!1}}),a(a.S+a.F*!W,"Object",{create:z,defineProperty:K,defineProperties:V,getOwnPropertyDescriptor:Q,getOwnPropertyNames:Z,getOwnPropertySymbols:ee}),A&&a(a.S+a.F*(!W||u(function(){var e=I();return"[null]"!=j([e])||"{}"!=j({a:e})||"{}"!=j(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=t=r[1],(b(t)||void 0!==e)&&!G(e))return g(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!G(t))return t}),r[1]=t,j.apply(A,r)}}),I[N][D]||n(8)(I[N],D,I[N].valueOf),p(I,"Symbol"),p(Math,"Math",!0),p(r.JSON,"JSON",!0)},function(e,t,n){n(38)("asyncIterator")},function(e,t,n){n(38)("observable")},function(e,t,n){"use strict";function r(e){this.mixin(e)}var o=n(1),i=o.undef,a=n(27),s=n(142),c=n(169),u=n(171),l=n(167),p=n(168),f=n(170);r.prototype.mixin=function(e){var t=this;this.configMap=this.configMap||{},["idMap","cmdConfig","packetConfig"].forEach(function(n){t.configMap[n]=o.merge({},t.configMap[n],e.configMap&&e.configMap[n])}),["serializeMap","unserializeMap"].forEach(function(n){t[n]=o.merge({},t[n],e[n])})};var d=new r({configMap:s,serializeMap:c,unserializeMap:u}),m=new r({configMap:l,serializeMap:p,unserializeMap:f});r.getInstance=function(e){switch(e){case"IM":return d;case"Chatroom":return m}},r.prototype.createCmd=function(){var e=1;return function(t,n){var r=this,o=this.configMap.cmdConfig[t];return t={SID:o.sid,CID:o.cid,SER:"heartbeat"===t?0:e++},o.params&&(t.Q=[],o.params.forEach(function(e){var o=e.type,a=e.name,s=e.entity,c=n[a];if(!i(c)){switch(o){case"PropertyArray":o="ArrayMable",c=c.map(function(e){return{t:"Property",v:r.serialize(e,s)}});break;case"Property":c=r.serialize(c,a);break;case"bool":c=c?"true":"false"}t.Q.push({t:o,v:c})}})),t}}(),r.prototype.parseResponse=function(e){var t=this,n=JSON.parse(e),r={raw:n,rawStr:e,error:a.genError(n.code)},i=t.configMap.packetConfig[n.sid+"_"+n.cid];if(!i)return r.notFound={sid:n.sid,cid:n.cid},r;var s=n.r,c="notify"===i.service&&!i.cmd;if(r.isNotify=c,c){var u=n.r[1].headerPacket;if(i=t.configMap.packetConfig[u.sid+"_"+u.cid],s=n.r[1].body,!i)return r.notFound={sid:u.sid,cid:u.cid},r}if(r.service=i.service,r.cmd=i.cmd,r.error){var l=n.sid+"_"+n.cid;if(c&&(l=u.sid+"_"+u.cid),r.error.cmd=r.cmd,r.error.callFunc="protocol::parseResponse: "+l,416===r.error.code){var p=s[0];p&&(r.frequencyControlDuration=1e3*p)}}var f=!1;return r.error&&i.trivialErrorCodes&&(f=i.trivialErrorCodes.indexOf(r.error.code)!==-1),r.error&&!f||!i.response||(r.content={},i.response.forEach(function(e,i){var a=s[i];if(!o.undef(a)){var u=e.type,l=e.name,p=e.entity||l;switch(u){case"Property":r.content[l]=t.unserialize(a,p);break;case"PropertyArray":r.content[l]=[],a.forEach(function(e){r.content[l].push(t.unserialize(e,p))});break;case"KVArray":r.content[l]=a;break;case"long":case"Long":case"byte":case"Byte":case"Number":r.content[l]=+a;break;default:r.content[l]=a}if(c&&"msg"===l||"sysMsg"===l){var f=r.content[l];o.isObject(f)&&!f.idServer&&(f.idServer=""+n.r[0],f.type&&"8"===f.type&&f.deletedIdClient&&(f.idServer=f.deletedIdClient))}}})),r},r.prototype.serialize=function(e,t){var n=this.serializeMap[t],r={};for(var o in n)e.hasOwnProperty(o)&&(r[n[o]]=e[o]);return r},r.prototype.unserialize=function(e,t){var n=this.unserializeMap[t],r={};if(e)for(var o in n)e.hasOwnProperty(o)&&(r[n[o]]=e[o]);return r},e.exports=r},,,function(e,t,n){var r,o;!function(i,a){"use strict";r=a,o="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==o&&(e.exports=o))}(this,function(){var e,t,n,r,o=Function.call,i=Object.prototype,a=o.bind(i.hasOwnProperty),s=o.bind(i.propertyIsEnumerable),c=o.bind(i.toString),u=a(i,"__defineGetter__");u&&(e=o.bind(i.__defineGetter__),t=o.bind(i.__defineSetter__),n=o.bind(i.__lookupGetter__),r=o.bind(i.__lookupSetter__));var l=function(e){return null==e||"object"!=typeof e&&"function"!=typeof e};Object.getPrototypeOf||(Object.getPrototypeOf=function(e){var t=e.__proto__;return t||null===t?t:"[object Function]"===c(e.constructor)?e.constructor.prototype:e instanceof Object?i:null});var p=function(e){try{return e.sentinel=0,0===Object.getOwnPropertyDescriptor(e,"sentinel").value}catch(t){return!1}};if(Object.defineProperty){var f=p({}),d="undefined"==typeof document||p(document.createElement("div"));if(!d||!f)var m=Object.getOwnPropertyDescriptor}if(!Object.getOwnPropertyDescriptor||m){var h="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if(l(e))throw new TypeError(h+e);if(m)try{return m.call(Object,e,t)}catch(o){}var c;if(!a(e,t))return c;if(c={enumerable:s(e,t),configurable:!0},u){var p=e.__proto__,f=e!==i;f&&(e.__proto__=i);var d=n(e,t),y=r(e,t);if(f&&(e.__proto__=p),
d||y)return d&&(c.get=d),y&&(c.set=y),c}return c.value=e[t],c.writable=!0,c}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),!Object.create){var y,g=!({__proto__:null}instanceof Object),v=function(){if(!document.domain)return!1;try{return!!new ActiveXObject("htmlfile")}catch(e){return!1}},b=function(){var e,t;t=new ActiveXObject("htmlfile");var n="script";return t.write("<"+n+"></"+n+">"),t.close(),e=t.parentWindow.Object.prototype,t=null,e},w=function(){var e,t=document.createElement("iframe"),n=document.body||document.documentElement;return t.style.display="none",n.appendChild(t),t.src="javascript:",e=t.contentWindow.Object.prototype,n.removeChild(t),t=null,e};y=g||"undefined"==typeof document?function(){return{__proto__:null}}:function(){var e=v()?b():w();delete e.constructor,delete e.hasOwnProperty,delete e.propertyIsEnumerable,delete e.isPrototypeOf,delete e.toLocaleString,delete e.toString,delete e.valueOf;var t=function(){};return t.prototype=e,y=function(){return new t},new t},Object.create=function(e,t){var n,r=function(){};if(null===e)n=y();else{if(null!==e&&l(e))throw new TypeError("Object prototype may only be an Object or null");r.prototype=e,n=new r,n.__proto__=e}return void 0!==t&&Object.defineProperties(n,t),n}}var k=function(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){return!1}};if(Object.defineProperty){var T=k({}),S="undefined"==typeof document||k(document.createElement("div"));if(!T||!S)var M=Object.defineProperty,_=Object.defineProperties}if(!Object.defineProperty||M){var x="Property description must be an object: ",O="Object.defineProperty called on non-object: ",C="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(o,a,s){if(l(o))throw new TypeError(O+o);if(l(s))throw new TypeError(x+s);if(M)try{return M.call(Object,o,a,s)}catch(c){}if("value"in s)if(u&&(n(o,a)||r(o,a))){var p=o.__proto__;o.__proto__=i,delete o[a],o[a]=s.value,o.__proto__=p}else o[a]=s.value;else{var f="get"in s,d="set"in s;if(!u&&(f||d))throw new TypeError(C);f&&e(o,a,s.get),d&&t(o,a,s.set)}return o}}Object.defineProperties&&!_||(Object.defineProperties=function(e,t){if(_)try{return _.call(Object,e,t)}catch(n){}return Object.keys(t).forEach(function(n){"__proto__"!==n&&Object.defineProperty(e,n,t[n])}),e}),Object.seal||(Object.seal=function(e){if(Object(e)!==e)throw new TypeError("Object.seal can only be called on Objects.");return e}),Object.freeze||(Object.freeze=function(e){if(Object(e)!==e)throw new TypeError("Object.freeze can only be called on Objects.");return e});try{Object.freeze(function(){})}catch(E){Object.freeze=function(e){return function(t){return"function"==typeof t?t:e(t)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(e){if(Object(e)!==e)throw new TypeError("Object.preventExtensions can only be called on Objects.");return e}),Object.isSealed||(Object.isSealed=function(e){if(Object(e)!==e)throw new TypeError("Object.isSealed can only be called on Objects.");return!1}),Object.isFrozen||(Object.isFrozen=function(e){if(Object(e)!==e)throw new TypeError("Object.isFrozen can only be called on Objects.");return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)!==e)throw new TypeError("Object.isExtensible can only be called on Objects.");for(var t="";a(e,t);)t+="?";e[t]=!0;var n=a(e,t);return delete e[t],n})})},function(e,t){},,function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(module){/*! Socket.IO.js build:0.9.11, development. Copyright(c) 2011 LearnBoost <dev@learnboost.com> MIT Licensed */
var io=module.exports;window.io?module&&(module.exports=io=window.io):window.io=io,function(){if(function(e,t){var n=e;n.version="0.9.11",n.protocol=1,n.transports=[],n.j=[],n.sockets={},n.connect=function(e,r){var o,i,a=n.util.parseUri(e);t&&t.location&&(a.protocol=a.protocol||t.location.protocol.slice(0,-1),a.host=a.host||(t.document?t.document.domain:t.location.hostname),a.port=a.port||t.location.port),o=n.util.uniqueUri(a);var s={host:a.host,secure:"https"==a.protocol,port:a.port||("https"==a.protocol?443:80),query:a.query||""};return n.util.merge(s,r),!s["force new connection"]&&n.sockets[o]||(i=new n.Socket(s)),!s["force new connection"]&&i&&(n.sockets[o]=i),i=i||n.sockets[o],i.of(a.path.length>1?a.path:"")}}(module.exports,window),function(e,t){var n=e.util={},r=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,o=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];n.parseUri=function(e){for(var t=r.exec(e||""),n={},i=14;i--;)n[o[i]]=t[i]||"";return n},n.uniqueUri=function(e){var n=e.protocol,r=e.host,o=e.port;return"document"in t?(r=r||document.domain,o=o||("https"==n&&"https:"!==document.location.protocol?443:document.location.port)):(r=r||"localhost",o||"https"!=n||(o=443)),(n||"http")+"://"+r+":"+(o||80)},n.query=function(e,t){var r=n.chunkQuery(e||""),o=[];n.merge(r,n.chunkQuery(t||""));for(var i in r)r.hasOwnProperty(i)&&o.push(i+"="+r[i]);return o.length?"?"+o.join("&"):""},n.chunkQuery=function(e){for(var t,n={},r=e.split("&"),o=0,i=r.length;o<i;++o)t=r[o].split("="),t[0]&&(n[t[0]]=t[1]);return n};var i=!1;n.load=function(e){return"document"in t&&"complete"===document.readyState||i?e():void n.on(t,"load",e,!1)},n.on=function(e,t,n,r){e.attachEvent?e.attachEvent("on"+t,n):e.addEventListener&&e.addEventListener(t,n,r)},n.request=function(e){if(e&&"undefined"!=typeof XDomainRequest&&!n.ua.hasCORS)return new XDomainRequest;if("undefined"!=typeof XMLHttpRequest&&(!e||n.ua.hasCORS))return new XMLHttpRequest;if(!e)try{return new(window[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}return null},"undefined"!=typeof window&&n.load(function(){i=!0}),n.defer=function(e){return n.ua.webkit&&"undefined"==typeof importScripts?void n.load(function(){setTimeout(e,100)}):e()},n.merge=function(e,t,r,o){var i,a=o||[],s="undefined"==typeof r?2:r;for(i in t)t.hasOwnProperty(i)&&n.indexOf(a,i)<0&&("object"==typeof e[i]&&s?n.merge(e[i],t[i],s-1,a):(e[i]=t[i],a.push(t[i])));return e},n.mixin=function(e,t){n.merge(e.prototype,t.prototype)},n.inherit=function(e,t){function n(){}n.prototype=t.prototype,e.prototype=new n},n.isArray=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},n.intersect=function(e,t){for(var r=[],o=e.length>t.length?e:t,i=e.length>t.length?t:e,a=0,s=i.length;a<s;a++)~n.indexOf(o,i[a])&&r.push(i[a]);return r},n.indexOf=function(e,t,n){for(var r=e.length,n=n<0?n+r<0?0:n+r:n||0;n<r&&e[n]!==t;n++);return r<=n?-1:n},n.toArray=function(e){for(var t=[],n=0,r=e.length;n<r;n++)t.push(e[n]);return t},n.ua={},n.ua.hasCORS="undefined"!=typeof XMLHttpRequest&&function(){try{var e=new XMLHttpRequest}catch(t){return!1}return void 0!=e.withCredentials}(),n.ua.webkit="undefined"!=typeof navigator&&/webkit/i.test(navigator.userAgent),n.ua.iDevice="undefined"!=typeof navigator&&/iPad|iPhone|iPod/i.test(navigator.userAgent)}("undefined"!=typeof io?io:module.exports,window),function(e,t){function n(){}e.EventEmitter=n,n.prototype.on=function(e,n){return this.$events||(this.$events={}),this.$events[e]?t.util.isArray(this.$events[e])?this.$events[e].push(n):this.$events[e]=[this.$events[e],n]:this.$events[e]=n,this},n.prototype.addListener=n.prototype.on,n.prototype.once=function(e,t){function n(){r.removeListener(e,n),t.apply(this,arguments)}var r=this;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,n){if(this.$events&&this.$events[e]){var r=this.$events[e];if(t.util.isArray(r)){for(var o=-1,i=0,a=r.length;i<a;i++)if(r[i]===n||r[i].listener&&r[i].listener===n){o=i;break}if(o<0)return this;r.splice(o,1),r.length||delete this.$events[e]}else(r===n||r.listener&&r.listener===n)&&delete this.$events[e]}return this},n.prototype.removeAllListeners=function(e){return void 0===e?(this.$events={},this):(this.$events&&this.$events[e]&&(this.$events[e]=null),this)},n.prototype.listeners=function(e){return this.$events||(this.$events={}),this.$events[e]||(this.$events[e]=[]),t.util.isArray(this.$events[e])||(this.$events[e]=[this.$events[e]]),this.$events[e]},n.prototype.emit=function(e){if(!this.$events)return!1;var n=this.$events[e];if(!n)return!1;var r=Array.prototype.slice.call(arguments,1);if("function"==typeof n)n.apply(this,r);else{if(!t.util.isArray(n))return!1;for(var o=n.slice(),i=0,a=o.length;i<a;i++)o[i].apply(this,r)}return!0}}("undefined"!=typeof io?io:module.exports,"undefined"!=typeof io?io:module.parent.exports),function(exports,nativeJSON){"use strict";function f(e){return e<10?"0"+e:e}function date(e,t){return isFinite(e.valueOf())?e.getUTCFullYear()+"-"+f(e.getUTCMonth()+1)+"-"+f(e.getUTCDate())+"T"+f(e.getUTCHours())+":"+f(e.getUTCMinutes())+":"+f(e.getUTCSeconds())+"Z":null}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,o,i,a,s=gap,c=t[e];switch(c instanceof Date&&(c=date(e)),"function"==typeof rep&&(c=rep.call(t,e,c)),typeof c){case"string":return quote(c);case"number":return isFinite(c)?String(c):"null";case"boolean":case"null":return String(c);case"object":if(!c)return"null";if(gap+=indent,a=[],"[object Array]"===Object.prototype.toString.apply(c)){for(i=c.length,n=0;n<i;n+=1)a[n]=str(n,c)||"null";return o=0===a.length?"[]":gap?"[\n"+gap+a.join(",\n"+gap)+"\n"+s+"]":"["+a.join(",")+"]",gap=s,o}if(rep&&"object"==typeof rep)for(i=rep.length,n=0;n<i;n+=1)"string"==typeof rep[n]&&(r=rep[n],o=str(r,c),o&&a.push(quote(r)+(gap?": ":":")+o));else for(r in c)Object.prototype.hasOwnProperty.call(c,r)&&(o=str(r,c),o&&a.push(quote(r)+(gap?": ":":")+o));return o=0===a.length?"{}":gap?"{\n"+gap+a.join(",\n"+gap)+"\n"+s+"}":"{"+a.join(",")+"}",gap=s,o}}if(nativeJSON&&nativeJSON.parse)return exports.JSON={parse:nativeJSON.parse,stringify:nativeJSON.stringify};var JSON=exports.JSON={},cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;JSON.stringify=function(e,t,n){var r;if(gap="",indent="","number"==typeof n)for(r=0;r<n;r+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("socket.io:: replacer cannot JSON.stringify");return str("",{"":e})},JSON.parse=function(text,reviver){function walk(e,t){var n,r,o=e[t];if(o&&"object"==typeof o)for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(r=walk(o,n),void 0!==r?o[n]=r:delete o[n]);return reviver.call(e,t,o)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("socket.io:: reviver cannot JSON.parse")}}("undefined"!=typeof io?io:module.exports,"undefined"!=typeof JSON?JSON:void 0),function(e,t){var n=e.parser={},r=n.packets=["disconnect","connect","heartbeat","message","json","event","ack","error","noop"],o=n.reasons=["transport not supported","client not handshaken","unauthorized"],i=n.advice=["reconnect"],a=t.JSON,s=t.util.indexOf;n.encodePacket=function(e){var t=s(r,e.type),n=e.id||"",c=e.endpoint||"",u=e.ack,l=null;switch(e.type){case"error":var p=e.reason?s(o,e.reason):"",f=e.advice?s(i,e.advice):"";""===p&&""===f||(l=p+(""!==f?"+"+f:""));break;case"message":""!==e.data&&(l=e.data);break;case"event":var d={name:e.name};e.args&&e.args.length&&(d.args=e.args),l=a.stringify(d);break;case"json":l=a.stringify(e.data);break;case"connect":e.qs&&(l=e.qs);break;case"ack":l=e.ackId+(e.args&&e.args.length?"+"+a.stringify(e.args):"")}var m=[t,n+("data"==u?"+":""),c];return null!==l&&void 0!==l&&m.push(l),m.join(":")},n.encodePayload=function(e){var t="";if(1==e.length)return e[0];for(var n=0,r=e.length;n<r;n++){var o=e[n];t+="�"+o.length+"�"+e[n]}return t};var c=/([^:]+):([0-9]+)?(\+)?:([^:]+)?:?([\s\S]*)?/;n.decodePacket=function(e){var t=e.match(c);if(!t)return{};var n=t[2]||"",e=t[5]||"",s={type:r[t[1]],endpoint:t[4]||""};switch(n&&(s.id=n,t[3]?s.ack="data":s.ack=!0),s.type){case"error":var t=e.split("+");s.reason=o[t[0]]||"",s.advice=i[t[1]]||"";break;case"message":s.data=e||"";break;case"event":try{var u=a.parse(e);s.name=u.name,s.args=u.args}catch(l){}s.args=s.args||[];break;case"json":try{s.data=a.parse(e)}catch(l){}break;case"connect":s.qs=e||"";break;case"ack":var t=e.match(/^([0-9]+)(\+)?(.*)/);if(t&&(s.ackId=t[1],s.args=[],t[3]))try{s.args=t[3]?a.parse(t[3]):[]}catch(l){}break;case"disconnect":case"heartbeat":}return s},n.decodePayload=function(e){var t=function(e,t){for(var n=0,r=e;r<t.length;r++){if("�"==t.charAt(r))return n;n++}return n};if("�"==e.charAt(0)){for(var r=[],o=1,i="";o<e.length;o++)if("�"==e.charAt(o)){var a=e.substr(o+1).substr(0,i);if("�"!=e.charAt(o+1+Number(i))&&o+1+Number(i)!=e.length){var s=Number(i);l=t(o+s+1,e),a=e.substr(o+1).substr(0,s+l),o+=l}r.push(n.decodePacket(a)),o+=Number(i)+1,i=""}else i+=e.charAt(o);return r}return[n.decodePacket(e)]}}("undefined"!=typeof io?io:module.exports,"undefined"!=typeof io?io:module.parent.exports),function(e,t){function n(e,t){this.socket=e,this.sessid=t}e.Transport=n,t.util.mixin(n,t.EventEmitter),n.prototype.heartbeats=function(){return!0},n.prototype.onData=function(e){if(this!==this.socket.transport)return this;if(this.clearCloseTimeout(),(this.socket.connected||this.socket.connecting||this.socket.reconnecting)&&this.setCloseTimeout(),""!==e){var n=t.parser.decodePayload(e);if(n&&n.length)for(var r=0,o=n.length;r<o;r++)this.onPacket(n[r])}return this},n.prototype.onPacket=function(e){return this.socket.setHeartbeatTimeout(),"heartbeat"==e.type?this.onHeartbeat():("connect"==e.type&&""==e.endpoint&&this.onConnect(),"error"==e.type&&"reconnect"==e.advice&&(this.isOpen=!1),this.socket.onPacket(e),this)},n.prototype.setCloseTimeout=function(){if(!this.closeTimeout){var e=this;this.closeTimeout=setTimeout(function(){e.onDisconnect()},this.socket.closeTimeout)}},n.prototype.onDisconnect=function(){return this.isOpen&&this.close(),this.clearTimeouts(),this.socket.transport===this?this.socket.onDisconnect():this.socket.setBuffer(!1),this},n.prototype.onConnect=function(){return this.socket.onConnect(),this},n.prototype.clearCloseTimeout=function(){this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)},n.prototype.clearTimeouts=function(){this.clearCloseTimeout(),this.reopenTimeout&&clearTimeout(this.reopenTimeout)},n.prototype.packet=function(e){this.send(t.parser.encodePacket(e))},n.prototype.onHeartbeat=function(e){this.packet({type:"heartbeat"})},n.prototype.onOpen=function(){this.isOpen=!0,this.clearCloseTimeout(),this.socket.onOpen()},n.prototype.onClose=function(){this.isOpen=!1,this.socket.transport===this?this.socket.onClose():this.socket.setBuffer(!1),this.onDisconnect()},n.prototype.prepareUrl=function(){var e=this.socket.options;return this.scheme()+"://"+e.host+":"+e.port+"/"+e.resource+"/"+t.protocol+"/"+this.name+"/"+this.sessid},n.prototype.ready=function(e,t){t.call(this)}}("undefined"!=typeof io?io:module.exports,"undefined"!=typeof io?io:module.parent.exports),function(e,t,n){function r(e){if(this.options={port:80,secure:!1,document:"document"in n&&document,resource:"socket.io",transports:e.transports||t.transports,"connect timeout":1e4,"try multiple transports":!0,reconnect:!0,"reconnection delay":500,"reconnection limit":1/0,"reopen delay":3e3,"max reconnection attempts":10,"sync disconnect on unload":!1,"auto connect":!0,"flash policy port":10843,manualFlush:!1},t.util.merge(this.options,e),this.connected=!1,this.open=!1,this.connecting=!1,this.reconnecting=!1,this.namespaces={},this.buffer=[],this.doBuffer=!1,this.options["sync disconnect on unload"]&&(!this.isXDomain()||t.util.ua.hasCORS)){var r=this;t.util.on(n,"beforeunload",function(){r.disconnectSync()},!1)}this.options["auto connect"]&&this.connect()}function o(){}e.Socket=r,t.util.mixin(r,t.EventEmitter),r.prototype.of=function(e){return this.namespaces[e]||(this.namespaces[e]=new t.SocketNamespace(this,e),""!==e&&this.namespaces[e].packet({type:"connect"})),this.namespaces[e]},r.prototype.publish=function(){this.emit.apply(this,arguments);var e;for(var t in this.namespaces)this.namespaces.hasOwnProperty(t)&&(e=this.of(t),e.$emit.apply(e,arguments))},r.prototype.handshake=function(e){function n(t){t instanceof Error?(r.connecting=!1,r.onError(t.message)):(console.log("D handshake success "+t),e.apply(null,t.split(":")))}var r=this,i=this.options,a=["http"+(i.secure?"s":"")+":/",i.host+":"+i.port,i.resource,t.protocol,t.util.query(this.options.query,"t="+ +new Date)].join("/");if(this.isXDomain()&&!t.util.ua.hasCORS){var s=document.getElementsByTagName("script")[0],c=document.createElement("script");c.src=a+"&jsonp="+t.j.length,c.onreadystatechange=function(){"loaded"==this.readyState&&c.parentNode&&(c.parentNode.removeChild(c),r.connecting=!1,!r.reconnecting&&r.onError("Server down or port not open"),r.publish("handshake_failed"))},s.parentNode.insertBefore(c,s),t.j.push(function(e){n(e),c.parentNode.removeChild(c)})}else{var u=t.util.request();u.open("GET",a,!0),u.timeout=1e4,this.isXDomain()&&(u.withCredentials=!0),u.onreadystatechange=function(){4==u.readyState&&(u.onreadystatechange=o,200==u.status?n(u.responseText):403==u.status?(r.onError(u.responseText),r.publish("handshake_failed")):(r.connecting=!1,!r.reconnecting&&r.onError(u.responseText),r.publish("handshake_failed")))},u.ontimeout=function(e){r.connecting=!1,!r.reconnecting&&r.onError(u.responseText),r.publish("handshake_failed")},u.send(null)}},r.prototype.connect=function(e){if(this.connecting)return this;var n=this;return n.connecting=!0,this.handshake(function(r,o,i,a){n.sessionid=r,n.closeTimeout=1e3*i,n.heartbeatTimeout=1e3*o,n.transports||(n.transports=n.origTransports=a?t.util.intersect(a.split(","),n.options.transports):n.options.transports),console.log("D options transports: "+n.options.transports),console.log("D transports: "+n.transports),n.setHeartbeatTimeout(),n.once("connect",function(){clearTimeout(n.connectTimeoutTimer),n.connectTimeoutTimer=null,e&&"function"==typeof e&&e()}),n.doConnect()}),this},r.prototype.doConnect=function(){var e=this;return e.transport&&e.transport.clearTimeouts(),e.transport=e.getTransport(e.transports),e.transport?void e.transport.ready(e,function(){e.connecting=!0,e.publish("connecting",e.transport.name),e.transport.open(),e.options["connect timeout"]&&(e.connectTimeoutTimer&&clearTimeout(e.connectTimeoutTimer),e.connectTimeoutTimer=setTimeout(e.tryNextTransport.bind(e),e.options["connect timeout"]))}):e.publish("connect_failed")},r.prototype.getTransport=function(e){for(var n,r=e||this.transports,o=0;n=r[o];o++)if(console.log("D check "+n+" "+t.Transport[n].check(this)+" , cors "+t.Transport[n].xdomainCheck(this)),t.Transport[n]&&t.Transport[n].check(this)&&(!this.isXDomain()||t.Transport[n].xdomainCheck(this))){var i=new t.Transport[n](this,this.sessionid);return i}return null},r.prototype.tryNextTransport=function(){console.log("D try next transport");var e=this;if(!e.connected&&(e.connecting=!1,e.options["try multiple transports"])){for(var t=e.transports;t.length>0&&t.splice(0,1)[0]!=e.transport.name;);t.length?e.doConnect():e.publish("connect_failed")}},r.prototype.setHeartbeatTimeout=function(){if(clearTimeout(this.heartbeatTimeoutTimer),!this.transport||this.transport.heartbeats()){var e=this;this.heartbeatTimeoutTimer=setTimeout(function(){e.transport&&e.transport.onClose()},this.heartbeatTimeout)}},r.prototype.packet=function(e){return this.connected&&!this.doBuffer?this.transport.packet(e):this.buffer.push(e),this},r.prototype.setBuffer=function(e){this.doBuffer=e,!e&&this.connected&&this.buffer.length&&(this.options.manualFlush||this.flushBuffer())},r.prototype.flushBuffer=function(){this.transport.payload(this.buffer),this.buffer=[]},r.prototype.disconnect=function(){return(this.connected||this.connecting)&&(this.open&&this.of("").packet({type:"disconnect"}),this.onDisconnect("booted")),this},r.prototype.disconnectSync=function(){var e=t.util.request(),n=["http"+(this.options.secure?"s":"")+":/",this.options.host+":"+this.options.port,this.options.resource,t.protocol,"",this.sessionid].join("/")+"/?disconnect=1";e.open("GET",n,!1),e.send(null),this.onDisconnect("booted")},r.prototype.isXDomain=function(){var e=n.location.port||("https:"==n.location.protocol?443:80);return this.options.host!==n.location.hostname||this.options.port!=e},r.prototype.onConnect=function(){this.connected||(this.connected=!0,this.connecting=!1,this.doBuffer||this.setBuffer(!1),this.emit("connect"))},r.prototype.onOpen=function(){this.open=!0},r.prototype.onClose=function(){this.open=!1,clearTimeout(this.heartbeatTimeoutTimer)},r.prototype.onPacket=function(e){this.of(e.endpoint).onPacket(e)},r.prototype.onError=function(e){e&&e.advice&&"reconnect"===e.advice&&(this.connected||this.connecting)&&(this.disconnect(),this.options.reconnect&&this.reconnect()),this.publish("error",e&&e.reason?e.reason:e)},r.prototype.onDisconnect=function(e){var t=this.connected,n=this.connecting;this.connected=!1,this.connecting=!1,this.open=!1,(t||n)&&(this.transport.close(),this.transport.clearTimeouts(),t&&(this.publish("disconnect",e),"booted"!=e&&this.options.reconnect&&!this.reconnecting&&this.reconnect()),n&&this.tryNextTransport())},r.prototype.reconnect=function(){function e(){if(n.connected){for(var e in n.namespaces)n.namespaces.hasOwnProperty(e)&&""!==e&&n.namespaces[e].packet({type:"connect"});n.publish("reconnect",n.transport.name,n.reconnectionAttempts)}clearTimeout(n.reconnectionTimer),n.removeListener("connect_failed",t),n.removeListener("connect",t),n.reconnecting=!1,delete n.reconnectionAttempts,delete n.reconnectionDelay,delete n.reconnectionTimer,delete n.redoTransports,n.options["try multiple transports"]=o}function t(){if(n.reconnecting)return n.connected?e():n.connecting&&n.reconnecting?n.reconnectionTimer=setTimeout(t,1e3):void(n.reconnectionAttempts++>=r?n.redoTransports?(n.publish("reconnect_failed"),e()):(n.on("connect_failed",t),n.options["try multiple transports"]=!0,n.transports=n.origTransports,n.transport=n.getTransport(),n.redoTransports=!0,n.connect()):(n.reconnectionDelay<i&&(n.reconnectionDelay*=2),n.connect(),n.publish("reconnecting",n.reconnectionDelay,n.reconnectionAttempts),n.reconnectionTimer=setTimeout(t,n.reconnectionDelay)))}this.reconnecting=!0,this.reconnectionAttempts=0,this.reconnectionDelay=this.options["reconnection delay"];var n=this,r=this.options["max reconnection attempts"],o=this.options["try multiple transports"],i=this.options["reconnection limit"];this.options["try multiple transports"]=!1,this.reconnectionTimer=setTimeout(t,this.reconnectionDelay),this.on("connect",t)}}("undefined"!=typeof io?io:module.exports,"undefined"!=typeof io?io:module.parent.exports,window),function(e,t){function n(e,t){this.socket=e,this.name=t||"",this.flags={},this.json=new r(this,"json"),this.ackPackets=0,this.acks={}}function r(e,t){this.namespace=e,this.name=t}e.SocketNamespace=n,t.util.mixin(n,t.EventEmitter),n.prototype.$emit=t.EventEmitter.prototype.emit,n.prototype.of=function(){return this.socket.of.apply(this.socket,arguments)},n.prototype.packet=function(e){return e.endpoint=this.name,this.socket.packet(e),this.flags={},this},n.prototype.send=function(e,t){var n={type:this.flags.json?"json":"message",data:e};return"function"==typeof t&&(n.id=++this.ackPackets,n.ack=!0,this.acks[n.id]=t),this.packet(n)},n.prototype.emit=function(e){var t=Array.prototype.slice.call(arguments,1),n=t[t.length-1],r={type:"event",name:e};return"function"==typeof n&&(r.id=++this.ackPackets,r.ack="data",this.acks[r.id]=n,t=t.slice(0,t.length-1)),r.args=t,this.packet(r)},n.prototype.disconnect=function(){return""===this.name?this.socket.disconnect():(this.packet({type:"disconnect"}),this.$emit("disconnect")),this},n.prototype.onPacket=function(e){function n(){r.packet({type:"ack",args:t.util.toArray(arguments),ackId:e.id})}var r=this;switch(e.type){case"connect":this.$emit("connect");break;case"disconnect":""===this.name?this.socket.onDisconnect(e.reason||"booted"):this.$emit("disconnect",e.reason);break;case"message":case"json":var o=["message",e.data];"data"==e.ack?o.push(n):e.ack&&this.packet({type:"ack",ackId:e.id}),this.$emit.apply(this,o);break;case"event":var o=[e.name].concat(e.args);"data"==e.ack&&o.push(n),this.$emit.apply(this,o);break;case"ack":this.acks[e.ackId]&&(this.acks[e.ackId].apply(this,e.args),delete this.acks[e.ackId]);break;case"error":e.advice?this.socket.onError(e):"unauthorized"==e.reason?this.$emit("connect_failed",e.reason):this.$emit("error",e.reason)}},r.prototype.send=function(){this.namespace.flags[this.name]=!0,this.namespace.send.apply(this.namespace,arguments)},r.prototype.emit=function(){this.namespace.flags[this.name]=!0,this.namespace.emit.apply(this.namespace,arguments)}}("undefined"!=typeof io?io:module.exports,"undefined"!=typeof io?io:module.parent.exports),function(e,t,n){function r(e){t.Transport.apply(this,arguments)}e.websocket=r,t.util.inherit(r,t.Transport),r.prototype.name="websocket",r.prototype.open=function(){var e,r=t.util.query(this.socket.options.query),o=this;return e||(e=n.MozWebSocket||n.WebSocket),this.websocket=new e(this.prepareUrl()+r),this.websocket.onopen=function(){o.onOpen(),o.socket.setBuffer(!1)},this.websocket.onmessage=function(e){o.onData(e.data)},this.websocket.onclose=function(){o.socket.setBuffer(!0),o.onClose()},this.websocket.onerror=function(e){o.onError(e)},this},t.util.ua.iDevice?r.prototype.send=function(e){var t=this;return setTimeout(function(){t.websocket.send(e)},0),this}:r.prototype.send=function(e){return this.websocket.send(e),this},r.prototype.payload=function(e){for(var t=0,n=e.length;t<n;t++)this.packet(e[t]);return this},r.prototype.close=function(){return this.websocket.close(),this},r.prototype.onError=function(e){this.socket.onError(e)},r.prototype.scheme=function(){return this.socket.options.secure?"wss":"ws"},r.check=function(){return"WebSocket"in n&&!("__addTask"in WebSocket)||"MozWebSocket"in n},r.xdomainCheck=function(){return!0},t.transports.push("websocket")}("undefined"!=typeof io?io.Transport:module.exports,"undefined"!=typeof io?io:module.parent.exports,window),function(e,t){function n(){t.Transport.websocket.apply(this,arguments)}e.flashsocket=n,t.util.inherit(n,t.Transport.websocket),n.prototype.name="flashsocket",n.prototype.open=function(){var e=this,n=arguments;return WebSocket.__addTask(function(){t.Transport.websocket.prototype.open.apply(e,n)}),this},n.prototype.send=function(){var e=this,n=arguments;return WebSocket.__addTask(function(){t.Transport.websocket.prototype.send.apply(e,n)}),this},n.prototype.close=function(){return WebSocket.__tasks.length=0,t.Transport.websocket.prototype.close.call(this),this},n.prototype.ready=function(e,r){function o(){var t=e.options,o=t["flash policy port"],a=["http"+(t.secure?"s":"")+":/",t.host+":"+t.port,t.resource,"static/flashsocket","WebSocketMain"+(e.isXDomain()?"Insecure":"")+".swf"];n.loaded||("undefined"==typeof WEB_SOCKET_SWF_LOCATION&&(WEB_SOCKET_SWF_LOCATION=a.join("/")),843!==o&&WebSocket.loadFlashPolicyFile("xmlsocket://"+t.host+":"+o),WebSocket.__initialize(),n.loaded=!0),r.call(i)}var i=this;return document.body?o():void t.util.load(o)},n.check=function(){return!!("undefined"!=typeof WebSocket&&"__initialize"in WebSocket&&swfobject)&&swfobject.getFlashPlayerVersion().major>=10},n.xdomainCheck=function(){return!0},"undefined"!=typeof window&&(window.WEB_SOCKET_DISABLE_AUTO_INITIALIZATION=!0),t.transports.push("flashsocket")}("undefined"!=typeof io?io.Transport:module.exports,"undefined"!=typeof io?io:module.parent.exports),"undefined"!=typeof window&&"undefined"!=typeof window.document)var swfobject=function(){function e(){if(!H){try{var e=D.getElementsByTagName("body")[0].appendChild(y("span"));e.parentNode.removeChild(e)}catch(t){return}H=!0;for(var n=U.length,r=0;r<n;r++)U[r]()}}function t(e){H?e():U[U.length]=e}function n(e){if(typeof F.addEventListener!=C)F.addEventListener("load",e,!1);else if(typeof D.addEventListener!=C)D.addEventListener("load",e,!1);else if(typeof F.attachEvent!=C)g(F,"onload",e);else if("function"==typeof F.onload){var t=F.onload;F.onload=function(){t(),e()}}else F.onload=e}function r(){L?o():i()}function o(){var e=D.getElementsByTagName("body")[0],t=y(E);t.setAttribute("type",A);var n=e.appendChild(t);if(n){var r=0;!function(){if(typeof n.GetVariable!=C){var o=n.GetVariable("$version");o&&(o=o.split(" ")[1].split(","),J.pv=[parseInt(o[0],10),parseInt(o[1],10),parseInt(o[2],10)])}else if(r<10)return r++,void setTimeout(arguments.callee,10);e.removeChild(t),n=null,i()}()}else i()}function i(){var e=B.length;if(e>0)for(var t=0;t<e;t++){var n=B[t].id,r=B[t].callbackFn,o={success:!1,id:n};if(J.pv[0]>0){var i=h(n);if(i)if(!v(B[t].swfVersion)||J.wk&&J.wk<312)if(B[t].expressInstall&&s()){var l={};l.data=B[t].expressInstall,l.width=i.getAttribute("width")||"0",l.height=i.getAttribute("height")||"0",i.getAttribute("class")&&(l.styleclass=i.getAttribute("class")),i.getAttribute("align")&&(l.align=i.getAttribute("align"));for(var p={},f=i.getElementsByTagName("param"),d=f.length,m=0;m<d;m++)"movie"!=f[m].getAttribute("name").toLowerCase()&&(p[f[m].getAttribute("name")]=f[m].getAttribute("value"));c(l,p,n,r)}else u(i),r&&r(o);else w(n,!0),r&&(o.success=!0,o.ref=a(n),r(o))}else if(w(n,!0),r){var y=a(n);y&&typeof y.SetVariable!=C&&(o.success=!0,o.ref=y),r(o)}}}function a(e){var t=null,n=h(e);if(n&&"OBJECT"==n.nodeName)if(typeof n.SetVariable!=C)t=n;else{var r=n.getElementsByTagName(E)[0];r&&(t=r)}return t}function s(){return!$&&v("6.0.65")&&(J.win||J.mac)&&!(J.wk&&J.wk<312)}function c(e,t,n,r){$=!0,M=r||null,_={success:!1,id:n};var o=h(n);if(o){"OBJECT"==o.nodeName?(T=l(o),S=null):(T=o,S=n),e.id=j,(typeof e.width==C||!/%$/.test(e.width)&&parseInt(e.width,10)<310)&&(e.width="310"),(typeof e.height==C||!/%$/.test(e.height)&&parseInt(e.height,10)<137)&&(e.height="137"),D.title=D.title.slice(0,47)+" - Flash Player Installation";var i=J.ie&&J.win?["Active"].concat("").join("X"):"PlugIn",a="MMredirectURL="+F.location.toString().replace(/&/g,"%26")+"&MMplayerType="+i+"&MMdoctitle="+D.title;if(typeof t.flashvars!=C?t.flashvars+="&"+a:t.flashvars=a,J.ie&&J.win&&4!=o.readyState){var s=y("div");n+="SWFObjectNew",s.setAttribute("id",n),o.parentNode.insertBefore(s,o),o.style.display="none",function(){4==o.readyState?o.parentNode.removeChild(o):setTimeout(arguments.callee,10)}()}p(e,t,n)}}function u(e){if(J.ie&&J.win&&4!=e.readyState){var t=y("div");e.parentNode.insertBefore(t,e),t.parentNode.replaceChild(l(e),t),e.style.display="none",function(){4==e.readyState?e.parentNode.removeChild(e):setTimeout(arguments.callee,10)}()}else e.parentNode.replaceChild(l(e),e)}function l(e){var t=y("div");if(J.win&&J.ie)t.innerHTML=e.innerHTML;else{var n=e.getElementsByTagName(E)[0];if(n){var r=n.childNodes;if(r)for(var o=r.length,i=0;i<o;i++)1==r[i].nodeType&&"PARAM"==r[i].nodeName||8==r[i].nodeType||t.appendChild(r[i].cloneNode(!0))}}return t}function p(e,t,n){var r,o=h(n);if(J.wk&&J.wk<312)return r;if(o)if(typeof e.id==C&&(e.id=n),J.ie&&J.win){var i="";for(var a in e)e[a]!=Object.prototype[a]&&("data"==a.toLowerCase()?t.movie=e[a]:"styleclass"==a.toLowerCase()?i+=' class="'+e[a]+'"':"classid"!=a.toLowerCase()&&(i+=" "+a+'="'+e[a]+'"'));var s="";for(var c in t)t[c]!=Object.prototype[c]&&(s+='<param name="'+c+'" value="'+t[c]+'" />');o.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+i+">"+s+"</object>",q[q.length]=e.id,r=h(e.id)}else{var u=y(E);u.setAttribute("type",A);for(var l in e)e[l]!=Object.prototype[l]&&("styleclass"==l.toLowerCase()?u.setAttribute("class",e[l]):"classid"!=l.toLowerCase()&&u.setAttribute(l,e[l]));for(var p in t)t[p]!=Object.prototype[p]&&"movie"!=p.toLowerCase()&&f(u,p,t[p]);o.parentNode.replaceChild(u,o),r=u}return r}function f(e,t,n){var r=y("param");r.setAttribute("name",t),r.setAttribute("value",n),e.appendChild(r)}function d(e){var t=h(e);t&&"OBJECT"==t.nodeName&&(J.ie&&J.win?(t.style.display="none",function(){4==t.readyState?m(e):setTimeout(arguments.callee,10)}()):t.parentNode.removeChild(t))}function m(e){var t=h(e);if(t){for(var n in t)"function"==typeof t[n]&&(t[n]=null);t.parentNode.removeChild(t)}}function h(e){var t=null;try{t=D.getElementById(e)}catch(n){}return t}function y(e){return D.createElement(e)}function g(e,t,n){e.attachEvent(t,n),W[W.length]=[e,t,n]}function v(e){var t=J.pv,n=e.split(".");return n[0]=parseInt(n[0],10),n[1]=parseInt(n[1],10)||0,n[2]=parseInt(n[2],10)||0,t[0]>n[0]||t[0]==n[0]&&t[1]>n[1]||t[0]==n[0]&&t[1]==n[1]&&t[2]>=n[2]}function b(e,t,n,r){if(!J.ie||!J.mac){var o=D.getElementsByTagName("head")[0];if(o){var i=n&&"string"==typeof n?n:"screen";if(r&&(x=null,O=null),!x||O!=i){var a=y("style");a.setAttribute("type","text/css"),a.setAttribute("media",i),x=o.appendChild(a),J.ie&&J.win&&typeof D.styleSheets!=C&&D.styleSheets.length>0&&(x=D.styleSheets[D.styleSheets.length-1]),O=i}J.ie&&J.win?x&&typeof x.addRule==E&&x.addRule(e,t):x&&typeof D.createTextNode!=C&&x.appendChild(D.createTextNode(e+" {"+t+"}"))}}}function w(e,t){if(X){var n=t?"visible":"hidden";H&&h(e)?h(e).style.visibility=n:b("#"+e,"visibility:"+n)}}function k(e){var t=/[\\\"<>\.;]/,n=null!=t.exec(e);return n&&typeof encodeURIComponent!=C?encodeURIComponent(e):e}var T,S,M,_,x,O,C="undefined",E="object",P="Shockwave Flash",I="ShockwaveFlash.ShockwaveFlash",A="application/x-shockwave-flash",j="SWFObjectExprInst",N="onreadystatechange",F=window,D=document,R=navigator,L=!1,U=[r],B=[],q=[],W=[],H=!1,$=!1,X=!0,J=function(){var e=typeof D.getElementById!=C&&typeof D.getElementsByTagName!=C&&typeof D.createElement!=C,t=R.userAgent.toLowerCase(),n=R.platform.toLowerCase(),r=n?/win/.test(n):/win/.test(t),o=n?/mac/.test(n):/mac/.test(t),i=!!/webkit/.test(t)&&parseFloat(t.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")),a=!1,s=[0,0,0],c=null;if(typeof R.plugins!=C&&typeof R.plugins[P]==E)c=R.plugins[P].description,!c||typeof R.mimeTypes!=C&&R.mimeTypes[A]&&!R.mimeTypes[A].enabledPlugin||(L=!0,a=!1,c=c.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),s[0]=parseInt(c.replace(/^(.*)\..*$/,"$1"),10),s[1]=parseInt(c.replace(/^.*\.(.*)\s.*$/,"$1"),10),s[2]=/[a-zA-Z]/.test(c)?parseInt(c.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof F[["Active"].concat("Object").join("X")]!=C)try{var u=new(window[["Active"].concat("Object").join("X")])(I);u&&(c=u.GetVariable("$version"),c&&(a=!0,c=c.split(" ")[1].split(","),s=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)]))}catch(l){}return{w3:e,pv:s,wk:i,ie:a,win:r,mac:o}}();(function(){J.w3&&((typeof D.readyState!=C&&"complete"==D.readyState||typeof D.readyState==C&&(D.getElementsByTagName("body")[0]||D.body))&&e(),H||(typeof D.addEventListener!=C&&D.addEventListener("DOMContentLoaded",e,!1),
J.ie&&J.win&&(D.attachEvent(N,function(){"complete"==D.readyState&&(D.detachEvent(N,arguments.callee),e())}),F==top&&!function(){if(!H){try{D.documentElement.doScroll("left")}catch(t){return void setTimeout(arguments.callee,0)}e()}}()),J.wk&&!function(){if(!H)return/loaded|complete/.test(D.readyState)?void e():void setTimeout(arguments.callee,0)}(),n(e)))})(),function(){J.ie&&J.win&&window.attachEvent("onunload",function(){for(var e=W.length,t=0;t<e;t++)W[t][0].detachEvent(W[t][1],W[t][2]);for(var n=q.length,r=0;r<n;r++)d(q[r]);for(var o in J)J[o]=null;J=null;for(var i in swfobject)swfobject[i]=null;swfobject=null})}();return{registerObject:function(e,t,n,r){if(J.w3&&e&&t){var o={};o.id=e,o.swfVersion=t,o.expressInstall=n,o.callbackFn=r,B[B.length]=o,w(e,!1)}else r&&r({success:!1,id:e})},getObjectById:function(e){if(J.w3)return a(e)},embedSWF:function(e,n,r,o,i,a,u,l,f,d){var m={success:!1,id:n};J.w3&&!(J.wk&&J.wk<312)&&e&&n&&r&&o&&i?(w(n,!1),t(function(){r+="",o+="";var t={};if(f&&typeof f===E)for(var h in f)t[h]=f[h];t.data=e,t.width=r,t.height=o;var y={};if(l&&typeof l===E)for(var g in l)y[g]=l[g];if(u&&typeof u===E)for(var b in u)typeof y.flashvars!=C?y.flashvars+="&"+b+"="+u[b]:y.flashvars=b+"="+u[b];if(v(i)){var k=p(t,y,n);t.id==n&&w(n,!0),m.success=!0,m.ref=k}else{if(a&&s())return t.data=a,void c(t,y,n,d);w(n,!0)}d&&d(m)})):d&&d(m)},switchOffAutoHideShow:function(){X=!1},ua:J,getFlashPlayerVersion:function(){return{major:J.pv[0],minor:J.pv[1],release:J.pv[2]}},hasFlashPlayerVersion:v,createSWF:function(e,t,n){return J.w3?p(e,t,n):void 0},showExpressInstall:function(e,t,n,r){J.w3&&s()&&c(e,t,n,r)},removeSWF:function(e){J.w3&&d(e)},createCSS:function(e,t,n,r){J.w3&&b(e,t,n,r)},addDomLoadEvent:t,addLoadEvent:n,getQueryParamValue:function(e){var t=D.location.search||D.location.hash;if(t){if(/\?/.test(t)&&(t=t.split("?")[1]),null==e)return k(t);for(var n=t.split("&"),r=0;r<n.length;r++)if(n[r].substring(0,n[r].indexOf("="))==e)return k(n[r].substring(n[r].indexOf("=")+1))}return""},expressInstallCallback:function(){if($){var e=h(j);e&&T&&(e.parentNode.replaceChild(T,e),S&&(w(S,!0),J.ie&&J.win&&(T.style.display="block")),M&&M(_)),$=!1}}}}();!function(){if("undefined"!=typeof window&&!window.WebSocket){var e=window.console;if(e&&e.log&&e.error||(e={log:function(){},error:function(){}}),!swfobject.hasFlashPlayerVersion("10.0.0"))return void e.error("Flash Player >= 10.0.0 is required.");"file:"==location.protocol&&e.error("WARNING: web-socket-js doesn't work in file:///... URL unless you set Flash Security Settings properly. Open the page via Web server i.e. http://..."),WebSocket=function(e,t,n,r,o){var i=this;i.__id=WebSocket.__nextId++,WebSocket.__instances[i.__id]=i,i.readyState=WebSocket.CONNECTING,i.bufferedAmount=0,i.__events={},t?"string"==typeof t&&(t=[t]):t=[],setTimeout(function(){WebSocket.__addTask(function(){WebSocket.__flash.create(i.__id,e,t,n||null,r||0,o||null)})},0)},WebSocket.prototype.send=function(e){if(this.readyState==WebSocket.CONNECTING)throw"socket.io::send: INVALID_STATE_ERR: Web Socket connection has not been established";var t=WebSocket.__flash.send(this.__id,encodeURIComponent(e));return t<0||(this.bufferedAmount+=t,!1)},WebSocket.prototype.close=function(){this.readyState!=WebSocket.CLOSED&&this.readyState!=WebSocket.CLOSING&&(this.readyState=WebSocket.CLOSING,WebSocket.__flash.close(this.__id))},WebSocket.prototype.addEventListener=function(e,t,n){e in this.__events||(this.__events[e]=[]),this.__events[e].push(t)},WebSocket.prototype.removeEventListener=function(e,t,n){if(e in this.__events)for(var r=this.__events[e],o=r.length-1;o>=0;--o)if(r[o]===t){r.splice(o,1);break}},WebSocket.prototype.dispatchEvent=function(e){for(var t=this.__events[e.type]||[],n=0;n<t.length;++n)t[n](e);var r=this["on"+e.type];r&&r(e)},WebSocket.prototype.__handleEvent=function(e){"readyState"in e&&(this.readyState=e.readyState),"protocol"in e&&(this.protocol=e.protocol);var t;if("open"==e.type||"error"==e.type)t=this.__createSimpleEvent(e.type);else if("close"==e.type)t=this.__createSimpleEvent("close");else{if("message"!=e.type)throw"socket.io::handleFlashEvent: unknown event type: "+e.type;var n=decodeURIComponent(e.message);t=this.__createMessageEvent("message",n)}this.dispatchEvent(t)},WebSocket.prototype.__createSimpleEvent=function(e){if(document.createEvent&&window.Event){var t=document.createEvent("Event");return t.initEvent(e,!1,!1),t}return{type:e,bubbles:!1,cancelable:!1}},WebSocket.prototype.__createMessageEvent=function(e,t){if(document.createEvent&&window.MessageEvent&&!window.opera){var n=document.createEvent("MessageEvent");return n.initMessageEvent("message",!1,!1,t,null,null,window,null),n}return{type:e,data:t,bubbles:!1,cancelable:!1}},WebSocket.CONNECTING=0,WebSocket.OPEN=1,WebSocket.CLOSING=2,WebSocket.CLOSED=3,WebSocket.__flash=null,WebSocket.__instances={},WebSocket.__tasks=[],WebSocket.__nextId=0,WebSocket.loadFlashPolicyFile=function(e){WebSocket.__addTask(function(){WebSocket.__flash.loadManualPolicyFile(e)})},WebSocket.__initialize=function(){if(!WebSocket.__flash){if(WebSocket.__swfLocation&&(window.WEB_SOCKET_SWF_LOCATION=WebSocket.__swfLocation),!window.WEB_SOCKET_SWF_LOCATION)return void e.error("[WebSocket] set WEB_SOCKET_SWF_LOCATION to location of WebSocketMain.swf");var t=document.createElement("div");t.id="webSocketContainer",t.style.position="absolute",WebSocket.__isFlashLite()?(t.style.left="0px",t.style.top="0px"):(t.style.left="-100px",t.style.top="-100px");var n=document.createElement("div");n.id="webSocketFlash",t.appendChild(n),document.body.appendChild(t),swfobject.embedSWF(WEB_SOCKET_SWF_LOCATION,"webSocketFlash","1","1","10.0.0",null,null,{hasPriority:!0,swliveconnect:!0,allowScriptAccess:"always"},null,function(t){t.success||e.error("[WebSocket] swfobject.embedSWF failed")})}},WebSocket.__onFlashInitialized=function(){setTimeout(function(){WebSocket.__flash=document.getElementById("webSocketFlash"),WebSocket.__flash.setCallerUrl(location.href),WebSocket.__flash.setDebug(!!window.WEB_SOCKET_DEBUG);for(var e=0;e<WebSocket.__tasks.length;++e)WebSocket.__tasks[e]();WebSocket.__tasks=[]},0)},WebSocket.__onFlashEvent=function(){return setTimeout(function(){try{for(var t=WebSocket.__flash.receiveEvents(),n=0;n<t.length;++n)WebSocket.__instances[t[n].webSocketId].__handleEvent(t[n])}catch(r){e.error(r)}},0),!0};var t=function(){var e=function(e,t){t=t||2;for(var n=""+e;n.length<t;)n="0"+n;return n},t=new Date,n=t.getFullYear()+"-"+e(t.getMonth()+1)+"-"+e(t.getDate())+" "+e(t.getHours())+":"+e(t.getMinutes())+":"+e(t.getSeconds())+":"+e(t.getMilliseconds(),3);return n};WebSocket.__log=function(n){e.log(t(),decodeURIComponent(n))},WebSocket.__error=function(n){e.error(t(),decodeURIComponent(n))},WebSocket.__addTask=function(e){WebSocket.__flash?e():WebSocket.__tasks.push(e)},WebSocket.__isFlashLite=function(){if(!window.navigator||!window.navigator.mimeTypes)return!1;var e=window.navigator.mimeTypes["application/x-shockwave-flash"];return!!(e&&e.enabledPlugin&&e.enabledPlugin.filename)&&!!e.enabledPlugin.filename.match(/flashlite/i)},window.WEB_SOCKET_DISABLE_AUTO_INITIALIZATION||(window.addEventListener?window.addEventListener("load",function(){WebSocket.__initialize()},!1):window.attachEvent("onload",function(){WebSocket.__initialize()}))}}(),function(e,t,n){function r(e){e&&(t.Transport.apply(this,arguments),this.sendBuffer=[])}function o(){}e.XHR=r,t.util.inherit(r,t.Transport),r.prototype.open=function(){return this.socket.setBuffer(!1),this.onOpen(),this.get(),this.setCloseTimeout(),this},r.prototype.payload=function(e){for(var n=[],r=0,o=e.length;r<o;r++)n.push(t.parser.encodePacket(e[r]));this.send(t.parser.encodePayload(n))},r.prototype.send=function(e){return this.post(e),this},r.prototype.post=function(e){function t(){4==this.readyState&&(this.onreadystatechange=o,i.posting=!1,200==this.status?i.socket.setBuffer(!1):i.onClose())}function r(){this.onload=o,i.socket.setBuffer(!1)}var i=this;this.socket.setBuffer(!0),this.sendXHR=this.request("POST"),n.XDomainRequest&&this.sendXHR instanceof XDomainRequest?this.sendXHR.onload=this.sendXHR.onerror=r:this.sendXHR.onreadystatechange=t,this.sendXHR.send(e)},r.prototype.close=function(){return this.onClose(),this},r.prototype.request=function(e){var n=t.util.request(this.socket.isXDomain()),r=t.util.query(this.socket.options.query,"t="+ +new Date);if(n.open(e||"GET",this.prepareUrl()+r,!0),"POST"==e)try{n.setRequestHeader?n.setRequestHeader("Content-type","text/plain;charset=UTF-8"):n.contentType="text/plain"}catch(o){}return n},r.prototype.scheme=function(){return this.socket.options.secure?"https":"http"},r.check=function(e,r){try{var o=t.util.request(r),i=n.XDomainRequest&&o instanceof XDomainRequest,a=e&&e.options&&e.options.secure?"https:":"http:",s=n.location&&a!=n.location.protocol;if(o&&(!i||!s))return!0}catch(c){}return!1},r.xdomainCheck=function(e){return r.check(e,!0)}}("undefined"!=typeof io?io.Transport:module.exports,"undefined"!=typeof io?io:module.parent.exports,window),function(e,t){function n(e){t.Transport.XHR.apply(this,arguments)}e.htmlfile=n,t.util.inherit(n,t.Transport.XHR),n.prototype.name="htmlfile",n.prototype.get=function(){this.doc=new(window[["Active"].concat("Object").join("X")])("htmlfile"),this.doc.open(),this.doc.write("<html></html>"),this.doc.close(),this.doc.parentWindow.s=this;var e=this.doc.createElement("div");e.className="socketio",this.doc.body.appendChild(e),this.iframe=this.doc.createElement("iframe"),e.appendChild(this.iframe);var n=this,r=t.util.query(this.socket.options.query,"t="+ +new Date);this.iframe.src=this.prepareUrl()+r,t.util.on(window,"unload",function(){n.destroy()})},n.prototype._=function(e,t){this.onData(e);try{var n=t.getElementsByTagName("script")[0];n.parentNode.removeChild(n)}catch(r){}},n.prototype.destroy=function(){if(this.iframe){try{this.iframe.src="about:blank"}catch(e){}this.doc=null,this.iframe.parentNode.removeChild(this.iframe),this.iframe=null,CollectGarbage()}},n.prototype.close=function(){return this.destroy(),t.Transport.XHR.prototype.close.call(this)},n.check=function(e){if("undefined"!=typeof window&&["Active"].concat("Object").join("X")in window)try{var n=new(window[["Active"].concat("Object").join("X")])("htmlfile");return n&&t.Transport.XHR.check(e)}catch(r){}return!1},n.xdomainCheck=function(){return!1},t.transports.push("htmlfile")}("undefined"!=typeof io?io.Transport:module.exports,"undefined"!=typeof io?io:module.parent.exports),function(e,t,n){function r(){t.Transport.XHR.apply(this,arguments)}function o(){}e["xhr-polling"]=r,t.util.inherit(r,t.Transport.XHR),t.util.merge(r,t.Transport.XHR),r.prototype.name="xhr-polling",r.prototype.heartbeats=function(){return!1},r.prototype.open=function(){var e=this;return t.Transport.XHR.prototype.open.call(e),!1},r.prototype.get=function(){function e(){4==this.readyState&&(this.onreadystatechange=o,200==this.status?(i.onData(this.responseText),i.get()):i.onClose())}function t(){this.onload=o,this.onerror=o,i.retryCounter=1,i.onData(this.responseText),i.get()}function r(){i.retryCounter++,!i.retryCounter||i.retryCounter>3?i.onClose():i.get()}if(this.isOpen){var i=this;this.xhr=this.request(),n.XDomainRequest&&this.xhr instanceof XDomainRequest?(this.xhr.onload=t,this.xhr.onerror=r):this.xhr.onreadystatechange=e,this.xhr.send(null)}},r.prototype.onClose=function(){if(t.Transport.XHR.prototype.onClose.call(this),this.xhr){this.xhr.onreadystatechange=this.xhr.onload=this.xhr.onerror=o;try{this.xhr.abort()}catch(e){}this.xhr=null}},r.prototype.ready=function(e,n){var r=this;t.util.defer(function(){n.call(r)})},t.transports.push("xhr-polling")}("undefined"!=typeof io?io.Transport:module.exports,"undefined"!=typeof io?io:module.parent.exports,window),function(e,t,n){function r(e){t.Transport["xhr-polling"].apply(this,arguments),this.index=t.j.length;var n=this;t.j.push(function(e){n._(e)})}var o=n.document&&"MozAppearance"in n.document.documentElement.style;e["jsonp-polling"]=r,t.util.inherit(r,t.Transport["xhr-polling"]),r.prototype.name="jsonp-polling",r.prototype.post=function(e){function n(){r(),o.socket.setBuffer(!1)}function r(){o.iframe&&o.form.removeChild(o.iframe);try{a=document.createElement('<iframe name="'+o.iframeId+'">')}catch(e){a=document.createElement("iframe"),a.name=o.iframeId}a.id=o.iframeId,o.form.appendChild(a),o.iframe=a}var o=this,i=t.util.query(this.socket.options.query,"t="+ +new Date+"&i="+this.index);if(!this.form){var a,s=document.createElement("form"),c=document.createElement("textarea"),u=this.iframeId="socketio_iframe_"+this.index;s.className="socketio",s.style.position="absolute",s.style.top="0px",s.style.left="0px",s.style.display="none",s.target=u,s.method="POST",s.setAttribute("accept-charset","utf-8"),c.name="d",s.appendChild(c),document.body.appendChild(s),this.form=s,this.area=c}this.form.action=this.prepareUrl()+i,r(),this.area.value=t.JSON.stringify(e);try{this.form.submit()}catch(l){}this.iframe.attachEvent?a.onreadystatechange=function(){"complete"==o.iframe.readyState&&n()}:this.iframe.onload=n,this.socket.setBuffer(!0)},r.prototype.get=function(){var e=this,n=document.createElement("script"),r=t.util.query(this.socket.options.query,"t="+ +new Date+"&i="+this.index);this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),n.async=!0,n.src=this.prepareUrl()+r,n.onerror=function(){e.onClose()};var i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(n,i),this.script=n,o&&setTimeout(function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)},100)},r.prototype._=function(e){return this.onData(e),this.isOpen&&this.get(),this},r.prototype.ready=function(e,n){var r=this;return o?void t.util.load(function(){n.call(r)}):n.call(this)},r.check=function(){return"document"in n},r.xdomainCheck=function(){return!0},t.transports.push("jsonp-polling")}("undefined"!=typeof io?io.Transport:module.exports,"undefined"!=typeof io?io:module.parent.exports,window),__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return io}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),!(void 0!==__WEBPACK_AMD_DEFINE_RESULT__&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))}()}).call(exports,__webpack_require__(63)(module))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(){}var i=n(62),a=r(i),s=a["default"].clientTypeMap;o.reverse=function(e){var t=e;return t.type=s[t.type],t},o.reverseType=function(e){return s[e]||e},e.exports=o},,,,function(e,t,n){"use strict";function r(e){var t=this;i.verifyOptions(e,"appKey account chatroomId chatroomAddresses","protocol::ChatroomProtocol"),e.isAnonymous||i.verifyOptions(e,"token","protocol::ChatroomProtocol"),i.verifyParamType("chatroomAddresses",e.chatroomAddresses,"array","protocol::ChatroomProtocol"),i.verifyCallback(e,"onconnect onerror onwillreconnect ondisconnect onmsg onmsgs onrobots","protocol::ChatroomProtocol"),o.call(t,e)}var o=n(64),i=n(1),a=i.undef,s=i.notundef,c=n(13),u=n(93).getInstance("Chatroom"),l=n(160),p=n(140),f=o.fn,d=r.fn=r.prototype=Object.create(f);d.init=function(){var e=this;f.init.call(e),e.parser=u,e.syncResult={},e.timetags={},e.msgBuffer=[]},d.reset=function(){var e=this;f.reset.call(e);var t=e.options;a(t.msgBufferInterval)&&(t.msgBufferInterval=300),i.verifyParamType("msgBufferInterval",t.msgBufferInterval,"number","protocol::ChatroomProtocol.reset"),a(t.msgBufferSize)&&(t.msgBufferSize=500),i.verifyParamType("msgBufferSize",t.msgBufferSize,"number","protocol::ChatroomProtocol.reset"),s(t.chatroomAddresses)&&(e.socketUrls=t.chatroomAddresses.map(function(t){return c.formatSocketUrl({url:t,secure:e.options.secure})}),e.socketUrlsBackup=e.socketUrls.slice(0))},d.processChatroom=function(e){var t=this;switch(e.cmd){case"login":e.error||(e.obj={chatroom:l.reverse(e.content.chatroom),member:p.reverse(e.content.chatroomMember)});break;case"kicked":t.onKicked(e);break;case"logout":break;case"sendMsg":t.onSendMsg(e);break;case"msg":t.onMsg(e);break;case"getChatroomMembers":t.onChatroomMembers(e);break;case"getHistoryMsgs":t.onHistoryMsgs(e);break;case"markChatroomMember":t.onMarkChatroomMember(e);break;case"closeChatroom":break;case"getChatroom":t.onChatroom(e);break;case"updateChatroom":break;case"updateMyChatroomMemberInfo":delete e.obj.chatroomMember;break;case"getChatroomMembersInfo":t.onChatroomMembersInfo(e);break;case"kickChatroomMember":break;case"updateChatroomMemberTempMute":break;case"queueList":e.error||(e.obj=e.content);break;case"syncRobot":t.onSyncRobot(e)}},d.onChatroom=function(e){e.error||(e.obj.chatroom=l.reverse(e.content.chatroom))},e.exports=r,n(264),n(263),n(266),n(265)},,function(e,t,n){"use strict";function r(e){var t=e.mode,n=d,r=f.getGlobal();return r.FormData||(t="iframe"),"iframe"===t&&(n=e.upload?m:h),new n(e)}function o(e){var t=e.upload="multipart/form-data"===(e.headers||f.o)["Content-Type"],n=!1;try{var o=(location.protocol+"//"+location.host).toLowerCase(),i=f.url2origin(e.url);n=o!==i}catch(a){}return e.cors=n,t||n||e.mode?r(e):new d(e)}function i(e){var t=y[e];t&&(t.req.destroy(),delete y[e])}function a(e,t){t={data:t};var n=e.result.headers;return n&&(t.headers=e.req.header(n)),t}function s(e,t,n){var r=y[e];if(r){"onload"===t&&r.result&&(n=a(r,n)),i(e);var o={type:t,result:n};g(o),o.stopped||r[t](o.result)}}function c(e,t){s(e,"onload",t)}function u(e,t){s(e,"onerror",t)}function l(e,t){var n=f.genUrlSep(e);return t=t||"",f.isObject(t)&&(t=f.object2query(t)),t&&(e+=n+t),e}function p(e,t){t=t||{};var n=f.uniqueID(),r={result:t.result,onload:t.onload||f.f,onerror:t.onerror||f.f};y[n]=r,t.onload=c.bind(null,n),t.onerror=u.bind(null,n),t.query&&(e=l(e,t.query));var i=t.method||"";return i&&!/get/i.test(i)||!t.data||(e=l(e,t.data),t.data=null),t.url=e,r.req=o(t),n}var f=n(44),d=n(178),m=n(177),h=n(176),y={},g=f.f;p.filter=function(e){f.isFunction(e)&&(g=e)},p.abort=function(e){var t=y[e];t&&t.req.abort()},e.exports=p},function(e,t,n){"use strict";function r(e){var t=this;e.onload&&t.once("load",e.onload),e.onerror&&t.once("error",e.onerror),e.onbeforesend&&t.once("beforesend",e.onbeforesend),e.onaftersend&&t.once("aftersend",e.onaftersend),e=t.options=o.fetch({method:"GET",url:"",sync:!1,data:null,headers:{},cookie:!1,timeout:6e4,type:"text",form:null,input:null,putFileAtEnd:!1,proxyUrl:""},e);var n=e.headers,r="Content-Type";o.notexist(n[r])&&(n[r]="application/x-www-form-urlencoded"),t.send()}var o=n(44),i=o.f,a=n(198),s=r.prototype=Object.create(a.prototype);s.send=function(){var e=this,t=e.options;setTimeout(function(){try{try{e.emit("beforesend",t)}catch(n){console.error("ignore error ajax beforesend,",n)}e.doSend()}catch(n){console.error("ignore error server error,",n),e.onError("serverError","请求失败:"+n.message)}},0)},s.doSend=i,s.afterSend=function(){var e=this;setTimeout(function(){e.emit("aftersend",e.options)},0)},s.onLoad=function(e){var t=this,n=t.options,r=e.status,o=e.result;if(0!==(""+r).indexOf("2"))return void t.onError("serverError","服务器返回异常状态",{status:r,result:o});if("json"===n.type)try{o=JSON.parse(o)}catch(i){return console.error("ignore error parse json,",i),void t.onError("parseError",o)}t.emit("load",o)},s.onError=function(e,t,n){var r=o.isObject(n)?n:{};r.code=e||"error",r.message=t||"发生错误",this.emit("error",r)},s.onTimeout=function(){this.onError("timeout","请求超时")},s.abort=function(){this.onError("abort","客户端中止")},s.header=function(e){var t=this;if(!o.isArray(e))return t.getResponseHeader(e||"");var n={};return e.forEach(function(e){n[e]=t.header(e)}),n},s.getResponseHeader=i,s.destroy=i,e.exports=r},function(e,t){function n(e,t){for(var n=t.split(".");n.length;){var r=n.shift(),o=!1;if("?"==r[r.length-1]&&(r=r.slice(0,-1),o=!0),e=e[r],!e&&o)return e}return e}e.exports=n},function(e,t,n){"use strict";function r(e){var t=this;return t.subType="chatroom",e.Protocol=i,e.Message=c,e.constructor=r,e.isAnonymous&&(e.account=e.account||"nimanon_"+u.guid(),e.isAnonymous=1,u.verifyOptions(e,"chatroomNick","api::Chatroom"),e.chatroomAvatar=e.chatroomAvatar||" "),t.init(e)}var o=n(47),i=n(104),a=n(13),s=n(160),c=n(244),u=n(1),l=u.verifyOptions,p=u.verifyParamType,f=n(93).getInstance("Chatroom");r.Protocol=i,r.parser=f,r.use=o.use,r.getInstance=function(e){return e.isAnonymous&&(e.account=e.account||"nimanon_"+u.guid(),e.isAnonymous=1,u.verifyOptions(e,"chatroomNick","api::Chatroom.getInstance"),e.chatroomAvatar=e.chatroomAvatar||" "),o.getInstance.call(this,e)},r.genInstanceName=function(e){return u.verifyOptions(e,"chatroomId","api::Chatroom.genInstanceName"),"Chatroom-account-"+e.account+"-chatroomId-"+e.chatroomId};var d=r.fn=r.prototype=Object.create(o.prototype);r.info=d.info=a.info,d.getChatroom=function(e){var t=this;t.processCallback(e),t.sendCmd("getChatroom",e)},d.updateChatroom=function(e){l(e,"chatroom needNotify","api::updateChatroom"),p("needNotify",e.needNotify,"boolean"),this.processCustom(e),this.processCallback(e),e.chatroom=new s(e.chatroom),this.sendCmd("updateChatroom",e)},d.closeChatroom=function(e){var t=this;t.processCustom(e),t.processCallback(e),t.sendCmd("closeChatroom",e)},e.exports=r,n(209),n(208),n(210)},function(e,t,n){"use strict";function r(e){switch(a.notundef(e.type)?a.verifyFileType(e.type,"msg::FileMessage"):e.type="file",a.verifyOptions(e,"file","msg::FileMessage"),a.verifyOptions(e.file,"url ext size md5",!0,"file.","msg::FileMessage"),e.type){case"image":c.verifyFile(e.file,"msg::FileMessage");break;case"audio":u.verifyFile(e.file,"msg::FileMessage");break;case"video":l.verifyFile(e.file,"msg::FileMessage")}i.call(this,e),this.attach=JSON.stringify(e.file)}var o=n(118),i=n(65),a=n(1),s=n(13);r.prototype=Object.create(i.prototype),r.reverse=function(e){var t=i.reverse(e);e.attach=e.attach?""+e.attach:"",t.file=e.attach?JSON.parse(e.attach):{},"audio"===t.type&&(t.file.mp3Url=t.file.url+"?audioTrans&type=mp3");var n=t.file.url,r=(0,o.url2object)(n),a=r.hostname,c=s.downloadHost;if(a===c){var u=r.path,l=u.indexOf("/");if(l!==-1){var p=u.substring(0,l),f=u.substring(l+1);t.file.url=(0,o.object2url)({protocol:r.protocol,hostname:p+".nosdn.127.net",path:f,query:r.query})}}else a.indexOf(c)!==-1&&(t.file.url=n.replace(c,"nosdn.127.net"));return e.enabledHttpsForMessage&&(t.file.url=n.replace("http","https")),t},e.exports=r;var c=n(243),u=n(240),l=n(249)},,,,,,,,function(e,t){"use strict";t.__esModule=!0,t["default"]={genUrlSep:function(e){e=""+e;var t=e.indexOf("?")===-1?"?imageView&":"&";return t},url2object:function(e){e=e||"";var t=e.indexOf("https")>=0?"https://":"http://",n=e.replace(t,"");n.indexOf("?")>=0&&(n=n.substring(0,n.indexOf("?")));var r=n.split("/");n=r[0];var o="";if(r.length>0&&(o=r.slice(1).join("/")),e.indexOf("?")===-1)return{protocol:t,hostname:n,path:o,query:{}};var i=e.substr(e.indexOf("?")+1),a=i.split("&"),s={};return a.forEach(function(e){if(e.indexOf("=")>0){var t=e.split("=");s[t[0]]=decodeURIComponent(t[1])}else s[e]=""}),{protocol:t,hostname:n,path:o,query:s}},object2url:function(e){var t=e.protocol,n=e.hostname,r=e.path,o=e.query;t=t||"http://",n=n||"",r&&(n=n+"/"+r),o=o||{};var i=[];for(var a in o)"imageView"!==a&&i.push(a+"="+encodeURIComponent(o[a]));return i.length>0?""+t+n+"?imageView&"+i.join("&"):""+t+n}},e.exports=t["default"]},,,,,,,,,,,,function(e,t,n){"use strict";function r(e){o.verifyOptions(e,"type","image::ImageOp"),o.verifyParamValid("type",e.type,r.validTypes,"image::ImageOp"),o.merge(this,e),this.type=i[e.type]}var o=n(1),i={stripmeta:0,blur:2,quality:3,crop:4,rotate:5,thumbnail:7,interlace:9},a={0:"stripmeta",1:"type",2:"blur",3:"quality",4:"crop",5:"rotate",6:"pixel",7:"thumbnail",8:"watermark",9:"interlace",10:"tmp"};r.validTypes=Object.keys(i),r.reverse=function(e){var t=o.copy(e);return t.type=a[t.type],t},r.reverseImageOps=function(e){return e.map(function(e){return r.reverse(e)})},e.exports=r},function(e,t){"use strict";var n={link:{id:1,heartbeat:2},misc:{id:6,getSimpleNosToken:1,getNosToken:2,notifyUploadLog:3,uploadSdkLogUrl:4,audioToText:5,processImage:6}},r={heartbeat:{sid:n.link.id,cid:n.link.heartbeat},getSimpleNosToken:{sid:n.misc.id,cid:n.misc.getSimpleNosToken,params:[{type:"int",name:"num"}]},getNosToken:{sid:n.misc.id,cid:n.misc.getNosToken,params:[{type:"String",name:"responseBody"}]},uploadSdkLogUrl:{sid:n.misc.id,cid:n.misc.uploadSdkLogUrl,params:[{type:"string",name:"url"}]},audioToText:{sid:n.misc.id,cid:n.misc.audioToText,params:[{type:"Property",name:"audioToText"}]},processImage:{sid:n.misc.id,cid:n.misc.processImage,params:[{type:"String",name:"url"},{type:"PropertyArray",name:"imageOps",entity:"imageOp"}]}},o={"1_2":{service:"link",cmd:"heartbeat"},"6_1":{service:"misc",cmd:"getSimpleNosToken",response:[{type:"PropertyArray",name:"nosTokens",entity:"nosToken"}]},"6_2":{service:"misc",cmd:"getNosToken",response:[{type:"Property",name:"nosToken"}]},"6_3":{service:"misc",cmd:"notifyUploadLog"},"6_5":{service:"misc",cmd:"audioToText",response:[{type:"String",name:"text"}]},"6_6":{service:"misc",cmd:"processImage",response:[{type:"String",name:"url"}]}};e.exports={idMap:n,cmdConfig:r,packetConfig:o}},,function(e,t,n){"use strict";var r=n(44),o=r.getGlobal(),i={},a=o.name||"_parent",s=[],c="MSG|",u=[];i.addMsgListener=function(e){s.push(e)};var l=function(e){for(var t=0,n=s.length;t<n;t++)try{s[t].call(null,e)}catch(r){}},p=function(){var e=/^([\w]+?:\/\/.*?(?=\/|$))/i;return function(t){return t=t||"",e.test(t)?RegExp.$1:"*"}}(),f=function(){var e=unescape(o.name||"").trim();if(e&&0===e.indexOf(c)){o.name="";var t=r.string2object(e.replace(c,""),"|"),n=(t.origin||"").toLowerCase();n&&"*"!==n&&0!==location.href.toLowerCase().indexOf(n)||l({data:JSON.parse(t.data||"null"),source:o.frames[t.self]||t.self,origin:p(t.ref||document.referrer)})}},d=function(){var e,t=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return!0;return!1};return function(){if(u.length){e=[];for(var n,r=u.length-1;r>=0;r--)n=u[r],t(e,n.w)||(e.push(n.w),u.splice(r,1),n.w.name=n.d);e=null}}}(),m=i.startTimer=function(){var e=!1;return function(){e||(e=!0,o.postMessage||(setInterval(d,100),setInterval(f,20)))}}();i.postMessage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r.fillUndef(t,{origin:"*",source:a}),o.postMessage){var n=t.data;o.FormData||(n=JSON.stringify(n)),e.postMessage(n,t.origin)}else{if(m(),r.isObject(t)){var i={};i.origin=t.origin||"",i.ref=location.href,i.self=t.source,i.data=JSON.stringify(t.data),t=c+r.object2string(i,"|",!0)}u.unshift({w:e,d:escape(t)})}},e.exports=i},function(e,t,n){"use strict";var r=n(1),o={};o.fromDataURL=r.blobFromDataURL,e.exports=o},function(e,t){function n(e){var t=r.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}e.exports=n;var r=Object.prototype.toString},function(e,t){e.exports=function n(e,t){"use strict";var r,o,i=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,a=/(^[ ]*|[ ]*$)/g,s=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,c=/^0x[0-9a-f]+$/i,u=/^0/,l=function(e){return n.insensitive&&(""+e).toLowerCase()||""+e},p=l(e).replace(a,"")||"",f=l(t).replace(a,"")||"",d=p.replace(i,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),m=f.replace(i,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),h=parseInt(p.match(c),16)||1!==d.length&&p.match(s)&&Date.parse(p),y=parseInt(f.match(c),16)||h&&f.match(s)&&Date.parse(f)||null;if(y){if(h<y)return-1;if(h>y)return 1}for(var g=0,v=Math.max(d.length,m.length);g<v;g++){if(r=!(d[g]||"").match(u)&&parseFloat(d[g])||d[g]||0,o=!(m[g]||"").match(u)&&parseFloat(m[g])||m[g]||0,isNaN(r)!==isNaN(o))return isNaN(r)?1:-1;if(typeof r!=typeof o&&(r+="",o+=""),r<o)return-1;if(r>o)return 1}return 0}},function(e,t,n){var r;(function(o){!function(i,a){"use strict";function s(){return"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof o?o:{}}i=s();var c,u=i.IDBKeyRange||i.webkitIDBKeyRange,l={readonly:"readonly",readwrite:"readwrite"},p=Object.prototype.hasOwnProperty,f=function(){if(!c&&(c=i.indexedDB||i.webkitIndexedDB||i.mozIndexedDB||i.oIndexedDB||i.msIndexedDB||(null===i.indexedDB&&i.shimIndexedDB?i.shimIndexedDB:a),!c))throw"IndexedDB required";return c},d=function(e){return e},m=function(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()},h=function(e){return"function"==typeof e},y=function(e){return"number"===m(e)},g=function(e){return"array"===m(e)},v=function(e){return e===a},b=function(e,t){var n=this,r=!1;this.name=t,this.getIndexedDB=function(){return e},this.add=function(t){if(r)throw"Database has been closed";for(var o=[],i=0,a=0;a<arguments.length-1;a++)if(Array.isArray(arguments[a+1]))for(var s=0;s<arguments[a+1].length;s++)o[i]=arguments[a+1][s],i++;else o[i]=arguments[a+1],i++;var c=e.transaction(t,l.readwrite),u=c.objectStore(t);return new Promise(function(e,t){o.forEach(function(e){var t;if(e.item&&e.key){var n=e.key;e=e.item,t=u.add(e,n)}else t=u.add(e);t.onsuccess=function(t){var n=t.target,r=n.source.keyPath;null===r&&(r="__id__"),Object.defineProperty(e,r,{value:n.result,enumerable:!0})}}),c.oncomplete=function(){e(o,n)},c.onerror=function(e){e.preventDefault(),t(e)},c.onabort=function(e){t(e)}})},this.updateAndDelete=function(t,n,o){if(r)throw"Database has been closed";var i=e.transaction(t,l.readwrite),a=i.objectStore(t),s=a.keyPath;return new Promise(function(e,t){n.forEach(function(e){if(e.item&&e.key){var t=e.key;e=e.item,a.put(e,t)}else a.put(e)}),o.forEach(function(e){a["delete"](e[s])}),i.oncomplete=function(){e([n,o])},i.onerror=function(e){t(e)}})},this.update=function(t){if(r)throw"Database has been closed";for(var o,i=[],a=1;a<arguments.length;a++)o=arguments[a],Array.isArray(o)?i=i.concat(o):i.push(o);var s=e.transaction(t,l.readwrite),c=s.objectStore(t);c.keyPath;return new Promise(function(e,t){i.forEach(function(e){var t;if(e.item&&e.key){var n=e.key;e=e.item,t=c.put(e,n)}else t=c.put(e);t.onsuccess=function(e){},t.onerror=function(e){}}),s.oncomplete=function(){e(i,n)},s.onerror=function(e){t(e)},s.onabort=function(e){t(e)}})},this.remove=function(t,n){if(r)throw"Database has been closed";var o=e.transaction(t,l.readwrite),i=o.objectStore(t);return new Promise(function(e,t){Array.isArray(n)||(n=[n]),n.forEach(function(e){i["delete"](e)}),o.oncomplete=function(){e(n)},o.onerror=function(e){t(e)},o.onabort=function(e){t(e)}})},this.clear=function(t){if(r)throw"Database has been closed";var n=e.transaction(t,l.readwrite),o=n.objectStore(t);o.clear();return new Promise(function(e,t){n.oncomplete=function(){e()},n.onerror=function(e){t(e)}})},this.close=function(){r||(e.close(),r=!0,delete S[t])},this.get=function(t,n){if(r)throw"Database has been closed";var o=e.transaction(t),i=o.objectStore(t),a=i.get(n);return new Promise(function(e,t){a.onsuccess=function(t){e(t.target.result)},o.onerror=function(e){t(e)}})},this.query=function(t,n){if(r)throw"Database has been closed";return new w(t,e,n)},this.count=function(t,n){if(r)throw"Database has been closed";var o=e.transaction(t);o.objectStore(t)};for(var o=0,i=e.objectStoreNames.length;o<i;o++)!function(e){n[e]={};for(var t in n)p.call(n,t)&&"close"!==t&&(n[e][t]=function(t){return function(){var r=[e].concat([].slice.call(arguments,0));return n[t].apply(n,r)}}(t))}(e.objectStoreNames[o])},w=function(e,t,n){var r=this,o=!1,i=!1,s=function(r,s,c,p,f,d,m){return new Promise(function(y,g){var v=o||i?l.readwrite:l.readonly,b=t.transaction(e,v),w=b.objectStore(e),k=n?w.index(n):w,T=r?u[r].apply(null,s):null,S=[],M=[T],_=0;f=f?f:null,d=d?d:[],"count"!==c&&M.push(p||"next");var x=!!o&&Object.keys(o),O=function(e){for(var t=0;t<x.length;t++){var n=x[t],r=o[n];r instanceof Function&&(r=r(e)),e[n]=r}return e};k[c].apply(k,M).onsuccess=function(e){
var t=e.target.result;if("number"==typeof t)S=t;else if(t)if(null!==f&&f[0]>_)_=f[0],t.advance(f[0]);else if(null!==f&&_>=f[0]+f[1]);else{var n=!0,r="value"in t?t.value:t.key;d.forEach(function(e){e&&e.length&&(2===e.length?n=n&&r[e[0]]===e[1]:h(e[0])&&(n=n&&e[0].apply(a,[r])))}),n&&(_++,S.push(m(r)),i?t["delete"]():o&&(r=O(r),t.update(r))),t["continue"]()}},b.oncomplete=function(){y(S)},b.onerror=function(e){g(e)},b.onabort=function(e){g(e)}})},c=function(e,t){var n="next",r="openCursor",a=[],c=null,u=d,l=!1,p=function(){return s(e,t,r,l?n+"unique":n,c,a,u)},f=function(){return n=null,r="count",{execute:p}},m=function(){return c=g(arguments[0])?arguments[0]:Array.prototype.slice.call(arguments,0,2),1==c.length&&c.unshift(0),y(c[1])||(c=null),{execute:p,count:f,keys:b,filter:w,asc:k,desc:T,distinct:S,modify:M,limit:m,map:_,remove:x}},b=function(e){return e=!!v(e)||!!e,e&&(r="openKeyCursor"),{execute:p,keys:b,filter:w,asc:k,desc:T,distinct:S,modify:M,limit:m,map:_,remove:x}},w=function(){return a.push(Array.prototype.slice.call(arguments,0,2)),{execute:p,count:f,keys:b,filter:w,asc:k,desc:T,distinct:S,modify:M,limit:m,map:_,remove:x}},k=function(e){return e=!!v(e)||!!e,n=e?"next":"prev",{execute:p,count:f,keys:b,filter:w,asc:k,desc:T,distinct:S,modify:M,limit:m,map:_,remove:x}},T=function(e){return e=!!v(e)||!!e,n=e?"prev":"next",{execute:p,count:f,keys:b,filter:w,asc:k,desc:T,distinct:S,modify:M,limit:m,map:_,remove:x}},S=function(e){return e=!!v(e)||!!e,l=e,{execute:p,count:f,keys:b,filter:w,asc:k,desc:T,distinct:S,modify:M,limit:m,map:_,remove:x}},M=function(e){return o=e,{execute:p,count:f,keys:b,filter:w,asc:k,desc:T,distinct:S,modify:M,limit:m,map:_,remove:x}},_=function(e){return h(e)&&(u=e),{execute:p,count:f,keys:b,filter:w,asc:k,desc:T,distinct:S,modify:M,limit:m,map:_,remove:x}},x=function(e){return e=!!v(e)||!!e,i=e,{execute:p,count:f,keys:b,filter:w,asc:k,desc:T,distinct:S,modify:M,limit:m,map:_,remove:x}};return{execute:p,count:f,keys:b,filter:w,asc:k,desc:T,distinct:S,modify:M,limit:m,map:_,remove:x}};"only bound upperBound lowerBound".split(" ").forEach(function(e){r[e]=function(){return new c(e,arguments)}}),this.filter=function(){var e=new c(null,null);return e.filter.apply(e,arguments)},this.all=function(){return this.filter()}},k=function(e,t,n){"function"==typeof t&&(t=t());for(var r in t){var o,i=t[r];o=!p.call(t,r)||n.objectStoreNames.contains(r)?e.currentTarget.transaction.objectStore(r):n.createObjectStore(r,i.key);for(var a in i.indexes){var s=i.indexes[a];try{o.index(a)}catch(e){o.createIndex(a,s.key||a,Object.keys(s).length?s:{unique:!1})}}}},T=function(e,t,n,r){var o=e.target.result,i=new b(o,t);return S[t]=o,Promise.resolve(i)},S={},M={version:"0.10.2",open:function(e){var t;return new Promise(function(n,r){if(S[e.server])T({target:{result:S[e.server]}},e.server,e.version,e.schema).then(n,r);else{try{t=f().open(e.server,e.version)}catch(o){r(o)}t.onsuccess=function(t){T(t,e.server,e.version,e.schema).then(n,r)},t.onupgradeneeded=function(t){k(t,e.schema,t.target.result)},t.onerror=function(e){r(e)}}})},remove:function(e){return new Promise(function(t,n){if(!e)return t();typeof e===b&&(e=e.name);var r;"string"==typeof e&&(r=S[e]),r&&"function"==typeof r.close&&r.close();var o;try{o=f().deleteDatabase(e)}catch(i){n(i)}o.onsuccess=function(n){delete S[e],t(e)},o.onerror=function(e){n(e)},o.onblocked=function(e){n(e)}})}};"undefined"!=typeof e&&"undefined"!=typeof e.exports?e.exports=M:(r=function(){return M}.call(t,n,t,e),!(r!==a&&(e.exports=r)))}(window)}).call(t,function(){return this}())},,function(e,t,n){"use strict";var r=n(48),o=n(200),i=n(99),a=n(136),s=n(108),c=n(137),u=n(1),l=n(146),p=n(134),f=n(61),d=n(5).Promise,m=n(182);e.exports=function(e){u.merge(e,{platform:r,xhr:o,io:i,naturalSort:a,deepAccess:s,db:c,util:u,support:l,blob:p,ajax:f,Promise:d,LoggerPlugin:m})}},function(e,t,n){"use strict";function r(e){var t=this;i(e.nick)&&(t.nick=""+e.nick),i(e.avatar)&&(t.avatar=""+e.avatar),i(e.custom)&&(t.custom=""+e.custom)}var o=n(1),i=o.notundef,a={"-1":"restricted",0:"common",1:"owner",2:"manager"};r.reverse=function(e){var t=o.copy(e);return i(t.chatroomId)&&(t.chatroomId=""+t.chatroomId),i(t.type)&&(t.type=a[t.type]),i(t.level)&&(t.level=+t.level),i(t.online)&&(t.online=1===+t.online),i(t.enterTime)&&(t.enterTime=+t.enterTime),i(t.guest)&&(t.guest=1===+t.guest),i(t.blacked)&&(t.blacked=1===+t.blacked),i(t.gaged)&&(t.gaged=1===+t.gaged),i(t.valid)&&(t.valid=1===+t.valid),i(t.updateTime)&&(t.updateTime=+t.updateTime),i(t.tempMuted)?t.tempMuted=1===+t.tempMuted:t.tempMuted=!1,i(t.tempMuteDuration)?t.tempMuteDuration=+t.tempMuteDuration:t.tempMuteDuration=0,t.online||delete t.enterTime,t.guest&&(t.type="guest",delete t.valid),"common"!==t.type&&delete t.level,delete t.guest,t},r.reverseMembers=function(e){return e.map(function(e){return r.reverse(e)})},r.validTypes=Object.keys(a),e.exports=r},,function(e,t,n){"use strict";var r=n(1),o=n(131),i=r.merge({},o.idMap,{auth:{id:2,login:3,kicked:5,logout:6,multiPortLogin:7,kick:8},user:{id:3,markInBlacklist:3,getBlacklist:4,markInMutelist:5,getMutelist:6,getRelations:8,getUsers:7,updateMyInfo:10,updateDonnop:15,syncMyInfo:109,syncUpdateMyInfo:110},notify:{id:4,markRead:3,syncOfflineMsgs:4,batchMarkRead:5,syncOfflineSysMsgs:6,syncRoamingMsgs:9,syncMsgReceipts:12,syncRobots:15,syncBroadcastMsgs:16},sync:{id:5,sync:1,syncTeamMembers:2},msg:{id:7,sendMsg:1,msg:2,sysMsg:3,getHistoryMsgs:6,sendCustomSysMsg:7,searchHistoryMsgs:8,deleteSessions:9,getSessions:10,syncSendMsg:101,sendMsgReceipt:11,msgReceipt:12,deleteMsg:13,msgDeleted:14,markSessionAck:16,broadcastMsg:17},team:{id:8,createTeam:1,sendTeamMsg:2,teamMsg:3,teamMsgs:4,addTeamMembers:5,removeTeamMembers:6,updateTeam:7,leaveTeam:8,getTeam:9,getTeams:10,getTeamMembers:11,dismissTeam:12,applyTeam:13,passTeamApply:14,rejectTeamApply:15,addTeamManagers:16,removeTeamManagers:17,transferTeam:18,updateInfoInTeam:19,updateNickInTeam:20,acceptTeamInvite:21,rejectTeamInvite:22,getTeamHistoryMsgs:23,searchTeamHistoryMsgs:24,updateMuteStateInTeam:25,getMyTeamMembers:26,getMutedTeamMembers:27,syncMyTeamMembers:126,syncTeams:109,syncTeamMembers:111,syncCreateTeam:101,syncSendTeamMsg:102,syncUpdateTeamMember:119},friend:{id:12,friendRequest:1,syncFriendRequest:101,deleteFriend:2,syncDeleteFriend:102,updateFriend:3,syncUpdateFriend:103,getFriends:4},chatroom:{id:13,getChatroomAddress:1},filter:{id:101,sendFilterMsg:1,filterMsg:2,filterSysMsg:3,sendFilterCustomSysMsg:7},eventService:{id:14,publishEvent:1,pushEvent:2,subscribeEvent:3,unSubscribeEventsByAccounts:4,unSubscribeEventsByType:5,querySubscribeEventsByAccounts:6,querySubscribeEventsByType:7,pushEvents:9}}),a=r.merge({},o.cmdConfig,{login:{sid:i.auth.id,cid:i.auth.login,params:[{type:"Property",name:"login"}]},logout:{sid:i.auth.id,cid:i.auth.logout},kick:{sid:i.auth.id,cid:i.auth.kick,params:[{type:"StrArray",name:"deviceIds"}]},markInBlacklist:{sid:i.user.id,cid:i.user.markInBlacklist,params:[{type:"String",name:"account"},{type:"bool",name:"isAdd"}]},getBlacklist:{sid:i.user.id,cid:i.user.getBlacklist,params:[{type:"long",name:"time"}]},markInMutelist:{sid:i.user.id,cid:i.user.markInMutelist,params:[{type:"String",name:"account"},{type:"bool",name:"isAdd"}]},getMutelist:{sid:i.user.id,cid:i.user.getMutelist,params:[{type:"long",name:"time"}]},getRelations:{sid:i.user.id,cid:i.user.getRelations,params:[{type:"long",name:"timetag"}]},getUsers:{sid:i.user.id,cid:i.user.getUsers,params:[{type:"StrArray",name:"accounts"}]},updateMyInfo:{sid:i.user.id,cid:i.user.updateMyInfo,params:[{type:"Property",name:"user"}]},updateDonnop:{sid:i.user.id,cid:i.user.updateDonnop,params:[{type:"Property",name:"donnop"}]},markRead:{sid:i.notify.id,cid:i.notify.markRead,params:[{type:"long",name:"id"},{type:"ph",name:"ph"}]},batchMarkRead:{sid:i.notify.id,cid:i.notify.batchMarkRead,params:[{type:"byte",name:"sid"},{type:"byte",name:"cid"},{type:"LongArray",name:"ids"}]},sync:{sid:i.sync.id,cid:i.sync.sync,params:[{type:"Property",name:"sync"}]},syncTeamMembers:{sid:i.sync.id,cid:i.sync.syncTeamMembers,params:[{type:"LongLongMap",name:"sync"}]},sendMsg:{sid:i.msg.id,cid:i.msg.sendMsg,params:[{type:"Property",name:"msg"}]},getHistoryMsgs:{sid:i.msg.id,cid:i.msg.getHistoryMsgs,params:[{type:"String",name:"to"},{type:"long",name:"beginTime"},{type:"long",name:"endTime"},{type:"long",name:"lastMsgId"},{type:"int",name:"limit"},{type:"bool",name:"reverse"}]},sendCustomSysMsg:{sid:i.msg.id,cid:i.msg.sendCustomSysMsg,params:[{type:"Property",name:"sysMsg"}]},searchHistoryMsgs:{sid:i.msg.id,cid:i.msg.searchHistoryMsgs,params:[{type:"String",name:"to"},{type:"long",name:"beginTime"},{type:"long",name:"endTime"},{type:"String",name:"keyword"},{type:"int",name:"limit"},{type:"bool",name:"reverse"}]},getSessions:{sid:i.msg.id,cid:i.msg.getSessions,params:[{type:"long",name:"time"}]},deleteSessions:{sid:i.msg.id,cid:i.msg.deleteSessions,params:[{type:"StrArray",name:"sessions"}]},sendMsgReceipt:{sid:i.msg.id,cid:i.msg.sendMsgReceipt,params:[{type:"Property",name:"msgReceipt"}]},deleteMsg:{sid:i.msg.id,cid:i.msg.deleteMsg,params:[{type:"Property",name:"sysMsg"}]},markSessionAck:{sid:i.msg.id,cid:i.msg.markSessionAck,params:[{type:"byte",name:"scene"},{type:"String",name:"to"},{type:"long",name:"timetag"}]},createTeam:{sid:i.team.id,cid:i.team.createTeam,params:[{type:"Property",name:"team"},{type:"StrArray",name:"accounts"},{type:"String",name:"ps"}]},sendTeamMsg:{sid:i.team.id,cid:i.team.sendTeamMsg,params:[{type:"Property",name:"msg"}]},addTeamMembers:{sid:i.team.id,cid:i.team.addTeamMembers,params:[{type:"long",name:"teamId"},{type:"StrArray",name:"accounts"},{type:"String",name:"ps"}]},removeTeamMembers:{sid:i.team.id,cid:i.team.removeTeamMembers,params:[{type:"long",name:"teamId"},{type:"StrArray",name:"accounts"}]},updateTeam:{sid:i.team.id,cid:i.team.updateTeam,params:[{type:"Property",name:"team"}]},leaveTeam:{sid:i.team.id,cid:i.team.leaveTeam,params:[{type:"long",name:"teamId"}]},getTeam:{sid:i.team.id,cid:i.team.getTeam,params:[{type:"long",name:"teamId"}]},getTeams:{sid:i.team.id,cid:i.team.getTeams,params:[{type:"long",name:"timetag"}]},getTeamMembers:{sid:i.team.id,cid:i.team.getTeamMembers,params:[{type:"long",name:"teamId"},{type:"long",name:"timetag"}]},dismissTeam:{sid:i.team.id,cid:i.team.dismissTeam,params:[{type:"long",name:"teamId"}]},applyTeam:{sid:i.team.id,cid:i.team.applyTeam,params:[{type:"long",name:"teamId"},{type:"String",name:"ps"}]},passTeamApply:{sid:i.team.id,cid:i.team.passTeamApply,params:[{type:"long",name:"teamId"},{type:"String",name:"from"}]},rejectTeamApply:{sid:i.team.id,cid:i.team.rejectTeamApply,params:[{type:"long",name:"teamId"},{type:"String",name:"from"},{type:"String",name:"ps"}]},addTeamManagers:{sid:i.team.id,cid:i.team.addTeamManagers,params:[{type:"long",name:"teamId"},{type:"StrArray",name:"accounts"}]},removeTeamManagers:{sid:i.team.id,cid:i.team.removeTeamManagers,params:[{type:"long",name:"teamId"},{type:"StrArray",name:"accounts"}]},transferTeam:{sid:i.team.id,cid:i.team.transferTeam,params:[{type:"long",name:"teamId"},{type:"String",name:"account"},{type:"bool",name:"leave"}]},updateInfoInTeam:{sid:i.team.id,cid:i.team.updateInfoInTeam,params:[{type:"Property",name:"teamMember"}]},updateNickInTeam:{sid:i.team.id,cid:i.team.updateNickInTeam,params:[{type:"Property",name:"teamMember"}]},acceptTeamInvite:{sid:i.team.id,cid:i.team.acceptTeamInvite,params:[{type:"long",name:"teamId"},{type:"String",name:"from"}]},rejectTeamInvite:{sid:i.team.id,cid:i.team.rejectTeamInvite,params:[{type:"long",name:"teamId"},{type:"String",name:"from"},{type:"String",name:"ps"}]},getTeamHistoryMsgs:{sid:i.team.id,cid:i.team.getTeamHistoryMsgs,params:[{type:"long",name:"to"},{type:"long",name:"beginTime"},{type:"long",name:"endTime"},{type:"long",name:"lastMsgId"},{type:"int",name:"limit"},{type:"bool",name:"reverse"}]},searchTeamHistoryMsgs:{sid:i.team.id,cid:i.team.searchTeamHistoryMsgs,params:[{type:"long",name:"to"},{type:"long",name:"beginTime"},{type:"long",name:"endTime"},{type:"String",name:"keyword"},{type:"int",name:"limit"},{type:"bool",name:"reverse"}]},updateMuteStateInTeam:{sid:i.team.id,cid:i.team.updateMuteStateInTeam,params:[{type:"long",name:"teamId"},{type:"String",name:"account"},{type:"int",name:"mute"}]},getMyTeamMembers:{sid:i.team.id,cid:i.team.getMyTeamMembers,params:[{type:"LongArray",name:"teamIds"}]},getMutedTeamMembers:{sid:i.team.id,cid:i.team.getMutedTeamMembers,params:[{type:"long",name:"teamId"}]},friendRequest:{sid:i.friend.id,cid:i.friend.friendRequest,params:[{type:"String",name:"account"},{type:"byte",name:"type"},{type:"String",name:"ps"}]},deleteFriend:{sid:i.friend.id,cid:i.friend.deleteFriend,params:[{type:"String",name:"account"}]},updateFriend:{sid:i.friend.id,cid:i.friend.updateFriend,params:[{type:"Property",name:"friend"}]},getFriends:{sid:i.friend.id,cid:i.friend.getFriends,params:[{type:"long",name:"timetag"}]},getChatroomAddress:{sid:i.chatroom.id,cid:i.chatroom.getChatroomAddress,params:[{type:"long",name:"chatroomId"}]},sendFilterMsg:{sid:i.filter.id,cid:i.filter.sendFilterMsg,params:[{type:"Property",name:"msg"}]},sendFilterCustomSysMsg:{sid:i.filter.id,cid:i.filter.sendFilterCustomSysMsg,params:[{type:"Property",name:"sysMsg"}]},publishEvent:{sid:i.eventService.id,cid:i.eventService.publishEvent,params:[{type:"Property",name:"msgEvent"}]},pushEvent:{sid:i.eventService.id,cid:i.eventService.pushEvent},subscribeEvent:{sid:i.eventService.id,cid:i.eventService.subscribeEvent,params:[{type:"Property",name:"msgEventSubscribe"},{type:"StrArray",name:"accounts"}]},unSubscribeEventsByAccounts:{sid:i.eventService.id,cid:i.eventService.unSubscribeEventsByAccounts,params:[{type:"Property",name:"msgEventSubscribe"},{type:"StrArray",name:"accounts"}]},unSubscribeEventsByType:{sid:i.eventService.id,cid:i.eventService.unSubscribeEventsByType,params:[{type:"Property",name:"msgEventSubscribe"}]},querySubscribeEventsByAccounts:{sid:i.eventService.id,cid:i.eventService.querySubscribeEventsByAccounts,params:[{type:"Property",name:"msgEventSubscribe"},{type:"StrArray",name:"accounts"}]},querySubscribeEventsByType:{sid:i.eventService.id,cid:i.eventService.querySubscribeEventsByType,params:[{type:"Property",name:"msgEventSubscribe"}]},pushEvents:{sid:i.eventService.id,cid:i.eventService.pushEvents}}),s=r.merge({},o.packetConfig,{"2_3":{service:"auth",cmd:"login",response:[{type:"Property",name:"loginRes"},{type:"PropertyArray",name:"loginPorts",entity:"loginPort"}]},"2_5":{service:"auth",cmd:"kicked",response:[{type:"Number",name:"from"},{type:"Number",name:"reason"}]},"2_6":{service:"auth",cmd:"logout"},"2_7":{service:"auth",cmd:"multiPortLogin",response:[{type:"Number",name:"state"},{type:"PropertyArray",name:"loginPorts",entity:"loginPort"}]},"2_8":{service:"auth",cmd:"kick",response:[{type:"StrArray",name:"deviceIds"}]},"3_3":{service:"user",cmd:"markInBlacklist"},"3_103":{service:"user",cmd:"syncMarkInBlacklist",response:[{type:"String",name:"account"},{type:"Boolean",name:"isAdd"}]},"3_4":{service:"user",cmd:"getBlacklist",response:[{type:"StrArray",name:"blacklist"}]},"3_5":{service:"user",cmd:"markInMutelist"},"3_105":{service:"user",cmd:"syncMarkInMutelist",response:[{type:"String",name:"account"},{type:"Boolean",name:"isAdd"}]},"3_6":{service:"user",cmd:"getMutelist",response:[{type:"StrArray",name:"mutelist"}]},"3_8":{service:"user",cmd:"getRelations",response:[{type:"PropertyArray",name:"specialRelations",entity:"specialRelation"},{type:"Number",name:"timetag"}]},"3_7":{service:"user",cmd:"getUsers",response:[{type:"PropertyArray",name:"users",entity:"user"}]},"3_10":{service:"user",cmd:"updateMyInfo",response:[{type:"Number",name:"timetag"}]},"3_15":{service:"user",cmd:"updateDonnop",response:[{type:"Number",name:"timetag"}]},"3_115":{service:"user",cmd:"syncUpdateDonnop",response:[{type:"Property",name:"donnop"},{type:"Number",name:"timetag"}]},"3_109":{service:"user",cmd:"syncMyInfo",response:[{type:"Property",name:"user"},{type:"Number",name:"timetag"}]},"3_110":{service:"user",cmd:"syncUpdateMyInfo",response:[{type:"Property",name:"user"}]},"4_1":{service:"notify"},"4_2":{service:"notify"},"4_3":{service:"notify",cmd:"markRead"},"4_4":{service:"notify",cmd:"syncOfflineMsgs",response:[{type:"PropertyArray",name:"msgs",entity:"msg"}]},"4_5":{service:"notify",cmd:"batchMarkRead"},"4_6":{service:"notify",cmd:"syncOfflineSysMsgs",response:[{type:"PropertyArray",name:"sysMsgs",entity:"sysMsg"}]},"4_9":{service:"notify",cmd:"syncRoamingMsgs",response:[{type:"PropertyArray",name:"msgs",entity:"msg"}]},"4_12":{service:"notify",cmd:"syncMsgReceipts",response:[{type:"PropertyArray",name:"msgReceipts",entity:"msgReceipt"},{type:"Number",name:"timetag"}]},"4_13":{service:"notify",cmd:"syncDonnop",response:[{type:"Property",name:"donnop"},{type:"Number",name:"timetag"}]},"4_14":{service:"notify",cmd:"syncSessionAck",response:[{type:"StrLongMap",name:"p2p"},{type:"LongLongMap",name:"team"},{type:"Number",name:"timetag"}]},"4_15":{service:"notify",cmd:"syncRobots",response:[{type:"PropertyArray",name:"robots",entity:"robot"}]},"4_16":{service:"notify",cmd:"syncBroadcastMsgs",response:[{type:"PropertyArray",name:"broadcastMsgs",entity:"broadcastMsg"}]},"4_100":{service:"notify",cmd:"syncOfflineFilterMsgs",response:[{type:"PropertyArray",name:"msgs",entity:"msg"}]},"4_101":{service:"notify",cmd:"syncOfflineFilterSysMsgs",response:[{type:"PropertyArray",name:"sysMsgs",entity:"sysMsg"}]},"5_1":{service:"sync",cmd:"syncDone",response:[{type:"Number",name:"timetag"}]},"5_2":{service:"sync",cmd:"syncTeamMembersDone",response:[{type:"Number",name:"timetag"}]},"7_1":{service:"msg",cmd:"sendMsg",response:[{type:"Property",name:"msg"}],trivialErrorCodes:[7101]},"7_2":{service:"msg",cmd:"msg",response:[{type:"Property",name:"msg"}]},"7_3":{service:"msg",cmd:"sysMsg",response:[{type:"Property",name:"sysMsg"}]},"7_6":{service:"msg",cmd:"getHistoryMsgs",response:[{type:"PropertyArray",name:"msgs",entity:"msg"}]},"7_7":{service:"msg",cmd:"sendCustomSysMsg",trivialErrorCodes:[7101]},"7_8":{service:"msg",cmd:"searchHistoryMsgs",response:[{type:"PropertyArray",name:"msgs",entity:"msg"}]},"7_9":{service:"msg",cmd:"deleteSessions"},"7_10":{service:"msg",cmd:"getSessions",response:[{type:"StrArray",name:"sessions"}]},"7_101":{service:"msg",cmd:"syncSendMsg",response:[{type:"Property",name:"msg"}]},"7_11":{service:"msg",cmd:"sendMsgReceipt",response:[{type:"Property",name:"msgReceipt"}]},"7_12":{service:"msg",cmd:"msgReceipt",response:[{type:"Property",name:"msgReceipt"}]},"7_13":{service:"msg",cmd:"onDeleteMsg"},"7_14":{service:"msg",cmd:"onMsgDeleted",response:[{type:"Property",name:"sysMsg"}]},"7_15":{service:"msg",cmd:"onDeleteMsgOfflineRoaming",response:[{type:"PropertyArray",name:"sysMsgs",entity:"sysMsg"},{type:"Number",name:"timetag"},{type:"Number",name:"type"}]},"7_16":{service:"msg",cmd:"onMarkSessionAck"},"7_17":{service:"msg",cmd:"broadcastMsg",response:[{type:"Property",name:"broadcastMsg"}]},"7_116":{service:"msg",cmd:"syncMarkSessionAck",response:[{type:"Number",name:"scene"},{type:"String",name:"to"},{type:"Number",name:"timetag"}]},"8_1":{service:"team",cmd:"createTeam",response:[{type:"Property",name:"team"}]},"8_2":{service:"team",cmd:"sendTeamMsg",response:[{type:"Property",name:"msg"}]},"8_3":{service:"team",cmd:"teamMsg",response:[{type:"Property",name:"msg"}]},"8_4":{service:"team",cmd:"teamMsgs",response:[{type:"PropertyArray",name:"msgs",entity:"msg"}]},"8_5":{service:"team",cmd:"addTeamMembers"},"8_6":{service:"team",cmd:"removeTeamMembers"},"8_7":{service:"team",cmd:"updateTeam",response:[{type:"Number",name:"id"},{type:"Number",name:"time"}]},"8_8":{service:"team",cmd:"leaveTeam"},"8_9":{service:"team",cmd:"getTeam",response:[{type:"Property",name:"team"}]},"8_10":{service:"team",cmd:"getTeams",response:[{type:"PropertyArray",name:"teams",entity:"team"},{type:"Number",name:"timetag"}]},"8_11":{service:"team",cmd:"getTeamMembers",response:[{type:"Number",name:"teamId"},{type:"PropertyArray",name:"members",entity:"teamMember"},{type:"Number",name:"timetag"}]},"8_12":{service:"team",cmd:"dismissTeam"},"8_13":{service:"team",cmd:"applyTeam",response:[{type:"Property",name:"team"}]},"8_14":{service:"team",cmd:"passTeamApply"},"8_15":{service:"team",cmd:"rejectTeamApply"},"8_16":{service:"team",cmd:"addTeamManagers"},"8_17":{service:"team",cmd:"removeTeamManagers"},"8_18":{service:"team",cmd:"transferTeam"},"8_19":{service:"team",cmd:"updateInfoInTeam"},"8_20":{service:"team",cmd:"updateNickInTeam"},"8_21":{service:"team",cmd:"acceptTeamInvite",response:[{type:"Property",name:"team"}]},"8_22":{service:"team",cmd:"rejectTeamInvite"},"8_23":{service:"team",cmd:"getTeamHistoryMsgs",response:[{type:"PropertyArray",name:"msgs",entity:"msg"}]},"8_24":{service:"team",cmd:"searchTeamHistoryMsgs",response:[{type:"PropertyArray",name:"msgs",entity:"msg"}]},"8_25":{service:"team",cmd:"updateMuteStateInTeam"},"8_26":{service:"team",cmd:"getMyTeamMembers",response:[{type:"PropertyArray",name:"teamMembers",entity:"teamMember"}]},"8_27":{service:"team",cmd:"getMutedTeamMembers",response:[{type:"Number",name:"teamId"},{type:"PropertyArray",name:"teamMembers",entity:"teamMember"}]},"8_126":{service:"team",cmd:"syncMyTeamMembers",response:[{type:"PropertyArray",name:"teamMembers",entity:"teamMember"},{type:"Number",name:"timetag"}]},"8_109":{service:"team",cmd:"syncTeams",response:[{type:"Number",name:"timetag"},{type:"PropertyArray",name:"teams",entity:"team"}]},"8_111":{service:"team",cmd:"syncTeamMembers",response:[{type:"Number",name:"teamId"},{type:"PropertyArray",name:"members",entity:"teamMember"},{type:"Number",name:"timetag"}]},"8_101":{service:"team",cmd:"syncCreateTeam",response:[{type:"Property",name:"team"}]},"8_102":{service:"team",cmd:"syncSendTeamMsg",response:[{type:"Property",name:"msg"}]},"8_119":{service:"team",cmd:"syncUpdateTeamMember",response:[{type:"Property",name:"teamMember"}]},"12_1":{service:"friend",cmd:"friendRequest"},"12_101":{service:"friend",cmd:"syncFriendRequest",response:[{type:"String",name:"account"},{type:"Number",name:"type"},{type:"String",name:"ps"}]},"12_2":{service:"friend",cmd:"deleteFriend"},"12_102":{service:"friend",cmd:"syncDeleteFriend",response:[{type:"String",name:"account"}]},"12_3":{service:"friend",cmd:"updateFriend"},"12_103":{service:"friend",cmd:"syncUpdateFriend",response:[{type:"Property",name:"friend"}]},"12_4":{service:"friend",cmd:"getFriends",response:[{type:"PropertyArray",name:"friends",entity:"friend"},{type:"Number",name:"timetag"}]},"12_5":{service:"friend",cmd:"syncFriends",response:[{type:"PropertyArray",name:"friends",entity:"friend"},{type:"Number",name:"timetag"}]},"12_6":{service:"friend",cmd:"syncFriendUsers",response:[{type:"PropertyArray",name:"users",entity:"user"},{type:"Number",name:"timetag"}]},"13_1":{service:"chatroom",cmd:"getChatroomAddress",response:[{type:"StrArray",name:"address"}]},"14_1":{service:"eventService",cmd:"publishEvent",response:[{type:"Property",name:"msgEvent"}]},"14_2":{service:"eventService",cmd:"pushEvent",response:[{type:"Property",name:"msgEvent"}]},"14_3":{service:"eventService",cmd:"subscribeEvent",response:[{type:"StrArray",name:"accounts"}]},"14_4":{service:"eventService",cmd:"unSubscribeEventsByAccounts",response:[{type:"StrArray",name:"accounts"}]},"14_5":{service:"eventService",cmd:"unSubscribeEventsByType"},"14_6":{service:"eventService",cmd:"querySubscribeEventsByAccounts",response:[{type:"PropertyArray",name:"msgEventSubscribes",entity:"msgEventSubscribe"}]},"14_7":{service:"eventService",cmd:"querySubscribeEventsByType",response:[{type:"PropertyArray",name:"msgEventSubscribes",entity:"msgEventSubscribe"}]},"14_9":{service:"eventService",cmd:"pushEvents",response:[{type:"PropertyArray",name:"msgEvents",entity:"msgEvent"}]},"101_1":{service:"filter",cmd:"sendFilterMsg",response:[{type:"Property",name:"msg"}]},"101_2":{service:"filter",cmd:"filterMsg",response:[{type:"Property",name:"msg"}]},"101_3":{service:"filter",cmd:"filterSysMsg",response:[{type:"Property",name:"sysMsg"}]},"101_7":{service:"filter",cmd:"sendFilterCustomSysMsg"}});e.exports={idMap:i,cmdConfig:a,packetConfig:s}},,,,function(e,t){"use strict";var n={};n.set=function(e,t,r){n[e]=t,r&&(r.support=t)},e.exports=n},,,function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}},,function(e,t,n){"use strict";function r(){}var o=n(62);r.typeMap={text:0,image:1,audio:2,video:3,geo:4,notification:5,file:6,tip:10,robot:11,custom:100};var i=r.typeReverseMap={0:"text",1:"image",2:"audio",3:"video",4:"geo",5:"notification",6:"file",10:"tip",11:"robot",100:"custom"};r.validTypes=Object.keys(r.typeMap),r.setFlow=function(e,t){var n=t===e.from;n&&t===e.to&&(n=o.deviceId===e.fromDeviceId),e.flow=n?"out":"in","robot"===e.type&&e.content&&e.content.msgOut&&(e.flow="in")},r.getType=function(e){var t=e.type;return i[t]||t},e.exports=r},,function(e,t,n){"use strict";n(190),n(96),n(193),n(5).polyfill()},function(e,t,n){"use strict";var r=n(47).fn;r.isConnected=function(){return this.protocol.isConnected()},r.connect=function(){this.protocol.connect()},r.disconnect=function(){this.protocol.disconnect()}},function(e,t,n){"use strict";var r=n(1),o=n(47).fn;o.uploadSdkLogUrl=function(e){return r.verifyOptions(e,"url","misc::uploadSdkLogUrl"),this.cbAndSendCmd("uploadSdkLogUrl",e)}},function(e,t,n){(function(e){"use strict";var t=n(47).fn,r=n(1),o=n(199),i=n(27),a=n(13),s=n(183),c=n(184),u=n(134);t.sendText=function(e){var t=this;return t.processCallback(e),e.msg=new t.message.TextMessage(e),t.sendMsg(e)},t.previewFile=function(e){if(r.verifyOptions(e,"done","msg::previewFile"),e.type||(e.type="file"),r.verifyParamPresentJustOne(e,"dataURL blob fileInput wxFilePath","msg::previewFile"),e.dataURL)e.blob=u.fromDataURL(e.dataURL);else if(e.blob);else if(e.fileInput){if(e.fileInput=r.verifyFileInput(e.fileInput,"msg::previewFile"),e.fileInput.files&&!e.fileInput.files.length)return void e.done(i.newNoFileError("请选择"+e.type+"文件",{callFunc:"msg::previewFile",fileInput:e.fileInput}),e);e.fileInputName=r.getFileName(e.fileInput)}this.processCallback(e);var t=s.genResponseBody(e.type)||{};this.getNosToken({responseBody:JSON.stringify(t).replace(/"/gi,'\\"'),callback:function(t,n){return t?void e.done(t,e.callback.options):(e.nosToken=n,void this._doPreviewFile(e))}.bind(this)})},t._doPreviewFile=function(t){function n(n,c){if(t.uploaddone=i,n)return void t.done(n,t.callback.options);if(c=s.parseResponse(c,o.options.exifOrientation),c.url=a.genDownloadUrl(t.nosToken.bucket,l.Object),r.exist(t.fileInputName))c.name=t.fileInputName;else if(t.blob){var u=t.blob.name;if(c.name=u||"blob-"+c.md5,!u){var p=t.blob.type;c.ext=p.slice(p.lastIndexOf("/")+1)}}if(e.env.WEIXIN_APP&&(c.name=t.wxFilePath),!c.ext){var f=c.name.lastIndexOf(".");f===-1?c.ext="unknown":c.ext=c.name.slice(f+1)}return void t.done(null,r.copy(c))}var o=this,i=t.uploaddone,u=a.genUploadUrl(t.nosToken.bucket),l=this.assembleUploadParams(t.nosToken),p="file";e.env.WEIXIN_APP?(r.verifyOptions(t,"wxFilePath","msg::_doPreviewFile"),wx.uploadFile({url:u,filePath:t.wxFilePath,name:p,formData:l,fail:function(e){console.log(e)},success:function(e){if(console.log(e),200===e.statusCode)try{n(null,JSON.parse(e.data))}catch(t){console.error("parse wx upload file res error",t),n({code:"PARSE_WX_UPLOAD_FILE_RES_ERROR",str:e.data,msg:e.errMsg})}else n({code:e.statusCode,msg:e.errMsg})}})):(t.uploaddone=n,t.url=u,t.params=l,t.fileName=p,new c(t))},t.sendFile=function(e){var t=this;if(e.type||(e.type="file"),r.verifyParamPresentJustOne(e,"dataURL blob fileInput file wxFilePath","msg::sendFile"),t.processCallback(e),e.dataURL)t._previewAndSendFile(e);else if(e.blob)t._previewAndSendFile(e);else if(e.fileInput){if(e.fileInput=r.verifyFileInput(e.fileInput,"msg::sendFile"),e.fileInput.files&&!e.fileInput.files.length)return void e.done(i.newNoFileError("请选择"+e.type+"文件",{callFunc:"msg::sendFile",fileInput:e.fileInput}),e.callback.options);t._previewAndSendFile(e)}else if(e.wxFilePath)t._previewAndSendFile(e);else if(e.file)return e.msg=new t.message.FileMessage(e),t.sendMsg(e)},t._previewAndSendFile=function(e){var t=this;r.verifyCallback(e,"uploaddone beforesend","msg::_previewAndSendFile");var n=e.done;e.done=function(o,i){e.done=n,o?e.uploaddone(o,e.callback.options):(e.uploaddone(null,r.copy(i)),e.file=i,e.msg=new t.message.FileMessage(e),e.beforesend(t.sendMsg(e)))},t.previewFile(e)},t.assembleUploadParams=function(e){return e?{Object:decodeURIComponent(e.objectName),"x-nos-token":e.token,"x-nos-entity-type":"json"}:null},t.sendGeo=function(e){var t=this;return t.processCallback(e),e.msg=new t.message.GeoMessage(e),t.sendMsg(e)},t.sendTipMsg=function(e){var t=this;return t.processCallback(e),e.msg=new t.message.TipMessage(e),t.sendMsg(e)},t.sendCustomMsg=function(e){var t=this;return t.processCallback(e),e.msg=new t.message.CustomMessage(e),t.sendMsg(e)},t.sendRobotMsg=function(e){var t=this;return t.processCallback(e),e.msg=new t.message.RobotMessage(e),t.sendMsg(e)},t.sendMsg=function(e){var t=this,n=t.protocol,o=e.msg,i={},a=!!e.isLocal;if(a&&e.time&&(o.time=e.time),e.resend&&("out"!==e.flow||"fail"!==e.status))return r.onError("只能重发发送失败的消息");e.callback.options.idClient=o.idClient,t.beforeSendMsg(e,i);var s=e.rtnMsg=t.formatReturnMsg(o);return a&&(s.status="success",s.isLocal=!0),n.storeSendMsg&&(i.promise=n.storeSendMsg(s)),e.cbaop=function(e){if(e&&"server"!==e.from)return s.status="fail",n.updateSendMsgError&&n.updateSendMsgError(s),s},a||(i.msg=o,t.sendCmd(e.cmd,i,e.callback)),t.afterSendMsg(e),a&&setTimeout(function(){s=r.simpleClone(s),e.done(null,s)},0),r.copy(s)},t.beforeSendMsg=function(){},t.afterSendMsg=function(){},t.formatReturnMsg=function(e){var t=this;return e=r.copy(e),t.protocol.completeMsg(e),e.status="sending",e=t.message.reverse(e)},t.resendMsg=function(e){var t=this;return r.verifyOptions(e,"msg","msg::resendMsg"),t.trimMsgFlag(e),e.resend=!0,t._sendMsgByType(e)},t.forwardMsg=function(e){var t=this;return r.verifyOptions(e,"msg","msg::forwardMsg"),t.beforeForwardMsg(e),t.trimMsgFlag(e),e.forward=!0,e.msg.idClient=r.guid(),t._sendMsgByType(e)},t.trimMsgFlag=function(e){e&&e.msg&&(e.msg=r.copy(e.msg),delete e.msg.resend,delete e.msg.forward)},t.beforeForwardMsg=function(){},t._sendMsgByType=function(e){var t=this;switch(r.verifyOptions(e,"msg","msg::_sendMsgByType"),r.verifyParamValid("msg.type",e.msg.type,t.message.validTypes,"msg::_sendMsgByType"),r.merge(e,e.msg),e.type){case"text":return t.sendText(e);case"image":case"audio":case"video":case"file":return t.sendFile(e);case"geo":return t.sendGeo(e);case"custom":return t.sendCustomMsg(e);case"tip":return t.sendTipMsg(e);default:throw new i("不能发送类型为 "+e.type+" 的消息")}},t.parseRobotTemplate=function(e){function t(e){if(e.link){var t=e.link;Array.isArray(t)||(t=[t]),t=t.map(function(e){return e.image&&(e.image=r(e)),e.text&&(e.text=n(e)),"url"===e._type?(e.type="url",e.style=e._style||"",e.target=e._target,delete e._target,delete e._style):"block"===e._type&&(e.type="block",e.style=e._style||"",e.params=e._params||"",e.target=e._target,delete e._params,delete e._target,delete e._style),delete e._type,e}),e.link=t}return e.link}function n(e){return Array.isArray(e.text)||(e.text=[e.text]),e.text=e.text.map(function(e){return{type:"text",name:e._name,text:e.__text}}),e.text}function r(e){return Array.isArray(e.image)||(e.image=[e.image]),e.image=e.image.map(function(e){
return{type:"image",name:e._name,url:e._url}}),e.image}if(/<template[^>\/]+\/>/.test(e))return{raw:e,json:[{type:"text",name:"",text:""}]};if(!/<template[^>\/]+>/.test(e))return{raw:e,json:[{type:"text",name:"",text:e}]};var i=new o({escapeMode:!1});e=e.replace(/<template [^>]+>/,"<template>");var a=i.xml2js(e);a=a.template.LinearLayout,Array.isArray(a)||(a=[a]);var s=[];return a=a.forEach(function(e){e.image&&(s=s.concat(r(e))),e.text&&(s=s.concat(n(e))),e.link&&(s=s.concat(t(e)))}),{raw:e,json:s}}}).call(t,n(28))},function(e,t,n){"use strict";var r=n(1),o=n(47).fn,i=n(130);o.getSimpleNosToken=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.num=1,r.verifyOptions(e),this.cbAndSendCmd("getSimpleNosToken",e)},o.getNosToken=function(e){this.sendCmd("getNosToken",{responseBody:e.responseBody},e.callback)},o.packFileDownloadName=function(e){r.verifyOptions(e,"url name",!0,"","nos::packFileDownloadName");var t=e.url;return t+r.genUrlSep(t)+"download="+encodeURIComponent(e.name)},o.audioToMp3=function(e){r.verifyOptions(e,"url","nos::audioToMp3");var t=e.url;return t+r.genUrlSep(t)+"audioTrans&type=mp3"},o.stripImageMeta=function(e){return this.beforeProcessImage(e,"stripmeta")},o.qualityImage=function(e){return this.beforeProcessImage(e,"quality")},o.interlaceImage=function(e){return this.beforeProcessImage(e,"interlace")},o.rotateImage=function(e){return this.beforeProcessImage(e,"rotate")},o.blurImage=function(e){return this.beforeProcessImage(e,"blur")},o.cropImage=function(e){return this.beforeProcessImage(e,"crop")},o.thumbnailImage=function(e){return this.beforeProcessImage(e,"thumbnail")},o.beforeProcessImage=function(e,t){var n=r.copy(e);return n.type=t,e.ops=[n],this.processImage(e)},o.processImage=function(e){var t=this;r.verifyOptions(e,"url ops",!0,"","nos::processImage"),r.verifyParamType("ops",e.ops,"array","nos::processImage");var n=e.ops.map(function(e){return r.verifyOptions(e,"type",!0,"","nos::processImage"),r.verifyParamValid("type",e.type,i.validTypes,"nos::processImage"),t["gen"+e.type.slice(0,1).toUpperCase()+e.type.slice(1)+"Op"](e)});t.processCallback(e),t.sendCmd("processImage",{url:e.url,imageOps:n},e.callback)},o.genStripmetaOp=function(e){return new i({type:e.type,stripmeta:e.strip?1:0})},o.genQualityOp=function(e){r.verifyOptions(e,"quality",!0,"","nos::genQualityOp"),r.verifyParamType("quality",e.quality,"number","nos::genQualityOp"),r.verifyParamMin("quality",e.quality,0,"nos::genQualityOp"),r.verifyParamMax("quality",e.quality,100,"nos::genQualityOp");var t=Math.round(e.quality);return new i({type:e.type,qualityQuality:t})},o.genInterlaceOp=function(e){return new i({type:e.type})},o.genRotateOp=function(e){for(r.verifyOptions(e,"angle",!0,"","nos::genRotateOp"),r.verifyParamType("angle",e.angle,"number","nos::genRotateOp");e.angle<0;)e.angle=e.angle+360;e.angle=e.angle%360;var t=Math.round(e.angle);return new i({type:e.type,rotateAngle:t})},o.genBlurOp=function(e){r.verifyOptions(e,"radius sigma","nos::genBlurOp"),r.verifyParamType("radius",e.radius,"number","nos::genBlurOp"),r.verifyParamMin("radius",e.radius,1,"nos::genBlurOp"),r.verifyParamMax("radius",e.radius,50,"nos::genBlurOp"),r.verifyParamType("sigma",e.sigma,"number","nos::genBlurOp"),r.verifyParamMin("sigma",e.sigma,0,"nos::genBlurOp");var t=Math.round(e.radius),n=Math.round(e.sigma);return new i({type:e.type,blurRadius:t,blurSigma:n})},o.genCropOp=function(e){r.verifyOptions(e,"x y width height","nos::genCropOp"),r.verifyParamType("x",e.x,"number","nos::genCropOp"),r.verifyParamMin("x",e.x,0,"nos::genCropOp"),r.verifyParamType("y",e.y,"number","nos::genCropOp"),r.verifyParamMin("y",e.y,0,"nos::genCropOp"),r.verifyParamType("width",e.width,"number","nos::genCropOp"),r.verifyParamMin("width",e.width,0,"nos::genCropOp"),r.verifyParamType("height",e.height,"number","nos::genCropOp"),r.verifyParamMin("height",e.height,0,"nos::genCropOp");var t=Math.round(e.x),n=Math.round(e.y),o=Math.round(e.width),a=Math.round(e.height);return new i({type:e.type,cropX:t,cropY:n,cropWidth:o,cropHeight:a})},o.genThumbnailOp=function(){var e={cover:"z",contain:"x",crop:"y"};return function(t){r.verifyOptions(t,"mode","nos::genThumbnailOp"),r.verifyParamValid("mode",t.mode,Object.keys(e),"nos::genThumbnailOp"),"contain"===t.mode?r.verifyParamAtLeastPresentOne(t,"width height","nos::genThumbnailOp"):r.verifyOptions(t,"width height","nos::genThumbnailOp"),r.undef(t.width)&&(t.width=0),r.undef(t.height)&&(t.height=0),r.verifyParamType("width",t.width,"number","nos::genThumbnailOp"),r.verifyParamMin("width",t.width,0,"nos::genThumbnailOp"),r.verifyParamType("height",t.height,"number","nos::genThumbnailOp"),r.verifyParamMin("height",t.height,0,"nos::genThumbnailOp");var n=Math.round(t.width),o=Math.round(t.height),a=new i({type:t.type,thumbnailMode:e[t.mode],thumbnailWidth:n,thumbnailHeight:o});if("crop"===t.mode&&r.notundef(t.axis)){r.undef(t.axis.x)&&(t.axis.x=5),r.undef(t.axis.y)&&(t.axis.y=5),r.verifyParamMin("axis.x",t.axis.x,0,"nos::genThumbnailOp"),r.verifyParamMax("axis.x",t.axis.x,10,"nos::genThumbnailOp"),r.verifyParamMin("axis.y",t.axis.y,0,"nos::genThumbnailOp"),r.verifyParamMax("axis.y",t.axis.y,10,"nos::genThumbnailOp");var s=Math.round(t.axis.x),c=Math.round(t.axis.y);a.thumbnailAxisX=s,a.thumbnailAxisY=c}return r.notundef(t.enlarge)&&(r.verifyParamType("enlarge",t.enlarge,"boolean","nos::genThumbnailOp"),t.enlarge&&(a.thumbnailEnlarge=1)),a}}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(20),i=r(o),a=n(118),s=n(1),c=n(47).fn;c.viewImageSync=function(e){var t=this.options;s.verifyOptions(e,"url","nos::viewImageSync");var n=e.url,r=(0,a.url2object)(n),o=r.protocol,c=r.hostname,u=r.path,l=r.query;if("boolean"==typeof e.strip&&(l.stripmeta=e.strip?1:0),"number"==typeof e.quality&&(s.verifyParamMin("quality",e.quality,0,"nos::viewImageSync"),s.verifyParamMax("quality",e.quality,100,"nos::viewImageSync"),l.quality=Math.round(e.quality)),"boolean"==typeof e.interlace&&(l.interlace=e.interlace?1:0),"number"==typeof e.rotate&&(l.rotate=Math.round(e.rotate)),"object"===(0,i["default"])(e.thumbnail)){var p=e.thumbnail.mode||"crop",f=e.thumbnail.width,d=e.thumbnail.height;if(f>=0&&d>=0&&f<4096&&d<4096&&(f>0||d>0)){switch(p){case"crop":p="y";break;case"contain":p="x";break;case"cover":p="z";break;default:p="x"}l.thumbnail=""+f+p+d}}if(t.downloadUrl){var m=(0,a.url2object)(e.url),h=t.downloadUrl,y=m.path,g=y.indexOf("/");if(g!==-1){var v=y.substring(0,g),b=y.substring(g+1);h=h.replace("{bucket}",v).replace("{object}",b)}var w=(0,a.url2object)(h);return(0,a.object2url)({protocol:w.protocol,hostname:w.hostname,path:w.path,query:s.merge(w.query,l)})}return(0,a.object2url)({protocol:o,hostname:c,path:u,query:l})},c.viewImageStripMeta=function(e){s.verifyOptions(e,"url strip","nos::viewImageStripMeta"),s.verifyParamType("strip",e.strip,"boolean","nos::viewImageStripMeta");var t="stripmeta="+(e.strip?1:0),n=(0,a.genUrlSep)(e.url);return e.url+n+t},c.viewImageQuality=function(e){s.verifyOptions(e,"url quality","nos::viewImageQuality"),s.verifyParamType("quality",e.quality,"number","nos::viewImageQuality"),s.verifyParamMin("quality",e.quality,0,"nos::viewImageQuality"),s.verifyParamMax("quality",e.quality,100,"nos::viewImageQuality");var t=Math.round(e.quality),n="quality="+t,r=(0,a.genUrlSep)(e.url);return e.url+r+n},c.viewImageInterlace=function(e){s.verifyOptions(e,"url","nos::viewImageInterlace");var t="interlace=1",n=(0,a.genUrlSep)(e.url);return e.url+n+t},c.viewImageRotate=function(e){for(s.verifyOptions(e,"url angle","nos::viewImageRotate"),s.verifyParamType("angle",e.angle,"number","nos::viewImageRotate");e.angle<0;)e.angle=e.angle+360;e.angle=e.angle%360;var t=Math.round(e.angle),n="rotate="+t,r=(0,a.genUrlSep)(e.url);return e.url+r+n},c.viewImageBlur=function(e){s.verifyOptions(e,"url radius sigma","nos::viewImageBlur"),s.verifyParamType("radius",e.radius,"number","nos::viewImageBlur"),s.verifyParamMin("radius",e.radius,1,"nos::viewImageBlur"),s.verifyParamMax("radius",e.radius,50,"nos::viewImageBlur"),s.verifyParamType("sigma",e.sigma,"number","nos::viewImageBlur"),s.verifyParamMin("sigma",e.sigma,0,"nos::viewImageBlur");var t=Math.round(e.radius),n=Math.round(e.sigma),r="blur="+t+"x"+n,o=(0,a.genUrlSep)(e.url);return e.url+o+r},c.viewImageCrop=function(e){s.verifyOptions(e,"url x y width height","nos::viewImageCrop"),s.verifyParamType("x",e.x,"number","nos::viewImageCrop"),s.verifyParamMin("x",e.x,0,"nos::viewImageCrop"),s.verifyParamType("y",e.y,"number","nos::viewImageCrop"),s.verifyParamMin("y",e.y,0,"nos::viewImageCrop"),s.verifyParamType("width",e.width,"number","nos::viewImageCrop"),s.verifyParamMin("width",e.width,0,"nos::viewImageCrop"),s.verifyParamType("height",e.height,"number","nos::viewImageCrop"),s.verifyParamMin("height",e.height,0,"nos::viewImageCrop");var t=Math.round(e.x),n=Math.round(e.y),r=Math.round(e.width),o=Math.round(e.height),i="crop="+t+"_"+n+"_"+r+"_"+o,c=(0,a.genUrlSep)(e.url);return e.url+c+i},c.viewImageThumbnail=function(){var e={cover:"z",contain:"x",crop:"y"};return function(t){s.verifyOptions(t,"url mode","nos::viewImageThumbnail"),s.verifyParamValid("mode",t.mode,Object.keys(e),"nos::viewImageThumbnail"),"contain"===t.mode?s.verifyParamAtLeastPresentOne(t,"width height","nos::viewImageThumbnail"):s.verifyOptions(t,"width height","nos::viewImageThumbnail"),s.undef(t.width)&&(t.width=0),s.undef(t.height)&&(t.height=0),s.verifyParamType("width",t.width,"number","nos::viewImageThumbnail"),s.verifyParamMin("width",t.width,0,"nos::viewImageThumbnail"),s.verifyParamType("height",t.height,"number","nos::viewImageThumbnail"),s.verifyParamMin("height",t.height,0,"nos::viewImageThumbnail");var n=Math.round(t.width),r=Math.round(t.height),o="thumbnail="+n+e[t.mode]+r;if("crop"===t.mode&&s.notundef(t.axis)){s.undef(t.axis.x)&&(t.axis.x=5),s.undef(t.axis.y)&&(t.axis.y=5),s.verifyParamMin("axis.x",t.axis.x,0,"nos::viewImageThumbnail"),s.verifyParamMax("axis.x",t.axis.x,10,"nos::viewImageThumbnail"),s.verifyParamMin("axis.y",t.axis.y,0,"nos::viewImageThumbnail"),s.verifyParamMax("axis.y",t.axis.y,10,"nos::viewImageThumbnail");var i=Math.round(t.axis.x),c=Math.round(t.axis.y);o=o+"&axis="+i+"_"+c}s.notundef(t.enlarge)&&(s.verifyParamType("enlarge",t.enlarge,"boolean","nos::viewImageThumbnail"),t.enlarge&&(o+="&enlarge=1"));var u=(0,a.genUrlSep)(t.url);return t.url+u+o}}()},function(e,t,n){(function(e){"use strict";var t=n(47).fn,r=n(13),o=n(1),i=n(61),a="production"===e.env.NODE_ENV?"https://dr.netease.im/1.gif":"https://webtest.netease.im/1.gif";t.reportLogs=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this,n=t.options,s=r.info;e=o.merge(e,{appkey:n.appKey,uid:n.account,os:"web",session:t.protocol.sdkSession||"",ver:s.sdkVersion,type:t.subType});var c=a+o.genUrlSep(a),u=[];for(var l in e)u.push(l+"="+e[l]);c+=u.join("&"),i(c,{proxyUrl:o.url2origin(c)+"/lbs/res/cors/nej_proxy_frame.html",timeout:r.xhrTimeout,onload:function(){},onerror:function(e){t.logger.debug("report::ajax report error",e)}})}}).call(t,n(28))},function(e,t,n){"use strict";function r(e){var t=this;i(e.name)&&(t.name=""+e.name),i(e.announcement)&&(t.announcement=""+e.announcement),i(e.broadcastUrl)&&(t.broadcastUrl=""+e.broadcastUrl),i(e.custom)&&(t.custom=""+e.custom),i(e.queuelevel)&&(t.queuelevel=parseInt(e.queuelevel))}var o=n(1),i=o.notundef,a=o.undef;r.reverse=function(e){var t=o.copy(e);return a(t.announcement)&&(t.announcement=""),a(t.broadcastUrl)&&(t.broadcastUrl=""),a(t.custom)&&(t.custom=""),i(t.createTime)&&(t.createTime=+t.createTime),i(t.updateTime)&&(t.updateTime=+t.updateTime),i(t.onlineMemberNum)&&(t.onlineMemberNum=+t.onlineMemberNum),i(t.mute)&&(t.mute="1"===t.mute),t},e.exports=r},,,function(e,t,n){"use strict";var r=n(64).fn,o=n(27),i=n(48),a=n(100),s=n(62),c=n(13),u=n(1),l=u.notundef;r.login=function(){var e=this;e.sendCmd("login",e.assembleLogin(),e.onLogin.bind(e)),e.autoconnect=!1},r.genSessionKey=function(){var e={};return function(){var t=this,n=t.name,r=e[n]=e[n]||u.guid();return r}}(),r.assembleIMLogin=function(){var e=this,t=e.options,n=t.account,r=e.autoconnect?0:1;return e.sdkSession=e.genSessionKey(),{appLogin:r,appKey:t.appKey,account:n,token:t.token,sdkVersion:c.info.sdkVersion,protocolVersion:c.info.protocolVersion,os:i.os.toString(),browser:i.name+" "+i.version,session:e.sdkSession,deviceId:s.deviceId}},r.onLogin=function(e,t){var n=this;n.loginResult=t,e?n.onAuthError(e,"link::onLogin"):(n.startHeartbeat(),n.afterLogin(t))},r.afterLogin=u.emptyFunc,r.notifyLogin=function(){var e=this,t=e.loginResult;e.logger.info("link::notifyLogin: on connect",t),e.options.onconnect(t)},r.logout=function(){var e=this;if(e.isConnected()){var t=new o("主动退出","logout");e.onAuthError(t,"link::logout")}},r.onKicked=function(e){var t=this,n=e.content,r=n.from,i=n.reason,s=n.custom,c={reason:t.kickedReasons[i]||"unknown",message:t.kickedMessages[i]||"未知原因"};if(l(r)&&(c.from=a.reverseType(r)),l(s)&&(c.custom=s),t.shouldNotifyKicked(c)){var p=new o("被踢了","kicked");u.merge(p,c),t.onAuthError(p,"link::onKicked")}else t.logger.warn("link::onKicked: silentlyKick"),t.shouldReconnect=!0,t.hasNotifyDisconnected=!0,t.disconnectSocket()},r.shouldNotifyKicked=function(e){return"silentlyKick"!==e.reason},r.onAuthError=function(e,t){var n=this;n.shouldReconnect=!1,e=e||o.newConnectionError({callFunc:t}),e.callFunc=e.callFunc||t||null,n.markAllCallbackInvalid(e),n.notifyDisconnect(e)}},function(e,t,n){(function(e){"use strict";var t=n(64).fn,r=n(27),o=n(149),i=n(99),a=n(13),s=n(1);t.initConnect=function(){var e=this;e.socket=null,e.retryCount=0,e.connecting=!1,e.shouldReconnect=!0,e.hasNotifyDisconnected=!1},t.resetConnect=function(){var e=this,t=e.options;s.notundef(t.needReconnect)?(s.verifyParamType("needReconnect",t.needReconnect,"boolean","link::resetConnect"),e.needReconnect=t.needReconnect):e.needReconnect=!0,e.logger.log("link::resetConnect: needReconnect "+e.needReconnect),s.notundef(t.reconnectionAttempts)&&s.verifyParamType("reconnectionAttempts",t.reconnectionAttempts,"number","link::resetConnect"),e.reconnectionAttempts=t.reconnectionAttempts||1/0,e.backoff=new o({min:a.reconnectionDelay,max:a.reconnectionDelayMax,jitter:a.reconnectionJitter})},t.connect=function(){var e=this;if(e.isConnected()||e.connecting)return void e.logger.warn("link::connect: already connected or connecting");if(e.connecting=!0,e.hasNotifyDisconnected=!1,e.socket)e.logger.info("link::connect: try connecting..."),e.socket.socket.connect();else{var t=e.getNextSocketUrl();t?e.connectToUrl(t):e.refreshSocketUrl()}},t.getNextSocketUrl=function(){return this.socketUrls.shift()},t.isConnected=function(){var e=this;return!!e.socket&&!!e.socket.socket&&e.socket.socket.connected},t.connectToUrl=function(t){var n=this;if(n.logger.log("link::connectToUrl: "+t),e.env.WEIXIN_APP){if(!window.location){var r=t.split(":");window.location={protocol:r[0],hostname:r[1].slice(2),port:r[2]}}this.options.transports=["websocket"]}var o=this.options.transports||["websocket","xhr-polling"];n.socket=i.connect(t,{transports:o,reconnect:!1,"force new connection":!0,"connect timeout":a.connectTimeout}),n.logger.info("link::connectToUrl: socket url: "+t+", transports: "+JSON.stringify(o)),n.socket.on("connect",n.onConnect.bind(n)),n.socket.on("handshake_failed",n.onHandshakeFailed.bind(n)),n.socket.on("connect_failed",n.onConnectFailed.bind(n)),n.socket.on("error",n.onError.bind(n)),n.socket.on("message",n.onMessage.bind(n)),n.socket.on("disconnect",function(){n.logger.warn("link::connectToUrl: socket url: "+t+", disconnected"),n.onDisconnect(!0,"link::socketDisconnect")})},t.disconnect=function(){var e=this;e.isConnected()&&(e.logger.log("link::disconnect: start disconnecting"),e.logout())},t.onConnect=function(){var e=this;e.backoff&&e.backoff.reset(),e.retryCount=0,e.connecting=!1,e.shouldReconnect=!0,e.hasNotifyDisconnected=!1,e.logger.log("link::onConnect: socket onconnected, start login"),e.login()},t.onHandshakeFailed=function(){this.api.reportLogs({event:"ws_handshake_failed"}),this.onDisconnect(!1,"link::onHandshakeFailed")},t.onConnectFailed=function(){this.api.reportLogs({event:"ws_connect_failed"}),this.onDisconnect(!1,"link::onConnectFailed")},t.onError=function(){var e=arguments[0];e&&(this.api.reportLogs({event:"connect_timeout"}),this.onMiscError("连接错误",new r(e,"LINK_ERROR",{callFunc:"link::onError"})))},t.onDisconnect=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this;n.connected=e,n.connecting=!1,n.markAllCallbackInvalid(r.newNetworkError({callFunc:t})),n.stopHeartbeat(),n.reconnect()},t.willReconnect=function(){var e=this;return e.shouldReconnect&&e.needReconnect&&e.retryCount<e.reconnectionAttempts},t.reconnect=function(){var e=this;if(e.willReconnect()){e.socket=null,e.connected&&(e.autoconnect=!0),e.retryCount++;var t=e.backoff.duration();e.logger.info("link::reconnect: will retry after "+t+"ms, retryCount "+e.retryCount),e.options.onwillreconnect({retryCount:e.retryCount,duration:t}),setTimeout(function(){e.connect()},t)}else e.notifyDisconnect()},t.notifyConnectError=function(e){var t=this,n=r.newConnectError({message:e,callFunc:"link::notifyConnectError"});t.logger.error("link::notifyConnectError:",n),t.options.onerror(n)},t.notifyDisconnect=function(e){var t=this;t.hasNotifyDisconnected||(t.hasNotifyDisconnected=!0,t.disconnectSocket(),e=e||new r,e.retryCount=t.retryCount,e.willReconnect=t.willReconnect(),t.backoff&&t.backoff.reset(),t.retryCount=0,t.connecting=!1,t.logger.info("link::notifyDisconnect: ondisconnected ",e),t.options.ondisconnect(e))},t.disconnectSocket=function(){var e=this;if(e.isConnected())try{e.socket.disconnect(),e.socket=null}catch(t){e.logger.info("link::disconnectSocket: disconnect failed, error ",t)}}}).call(t,n(28))},function(e,t,n){"use strict";var r=n(64).fn,o=n(13);r.processLink=function(e){switch(e.cmd){case"heartbeat":}},r.startHeartbeat=function(){var e=this;e.stopHeartbeat(),e.heartbeatTimer=setTimeout(function(){e.sendCmd("heartbeat",null,e.onHeartbeat.bind(e))},o.heartbeatInterval)},r.stopHeartbeat=function(){var e=this;e.heartbeatTimer&&(clearTimeout(e.heartbeatTimer),e.heartbeatTimer=null)},r.onHeartbeat=function(e,t){var n=this;e?(e.callFunc="link::onHeartbeat",n.api.reportLogs({event:"ping_timeout"}),n.onCustomError("heartbeat error","HEARTBEAT_ERROR",e)):n.startHeartbeat()},r.heartbeat=function(){}},function(e,t,n){"use strict";var r=n(64).fn,o=n(130);r.processMisc=function(e){switch(e.cmd){case"getSimpleNosToken":e.error||(e.obj=e.content.nosTokens[0]);break;case"getNosToken":e.error||(e.obj=e.content.nosToken);break;case"notifyUploadLog":e.error||this.emitAPI({type:"notifyUploadLog"});break;case"audioToText":e.error||(e.obj.text=e.content.text);break;case"processImage":e.obj.imageOps=o.reverseImageOps(e.obj.imageOps),e.error||(e.obj={url:e.content.url})}}},function(e,t,n){"use strict";var r=n(1),o=n(131),i=r.merge({},o.idMap,{chatroom:{id:13,login:2,kicked:3,logout:4,sendMsg:6,msg:7,getChatroomMembers:8,getHistoryMsgs:9,markChatroomMember:11,closeChatroom:12,getChatroom:13,updateChatroom:14,updateMyChatroomMemberInfo:15,getChatroomMembersInfo:16,kickChatroomMember:17,updateChatroomMemberTempMute:19,queueOffer:20,queuePoll:21,queueList:22,peak:23,queueDrop:24,queueInit:25},user:{id:3,syncRobot:16}}),a=r.merge({},o.cmdConfig,{login:{sid:i.chatroom.id,cid:i.chatroom.login,params:[{type:"byte",name:"type"},{type:"Property",name:"login"},{type:"Property",name:"imLogin"}]},logout:{sid:i.chatroom.id,cid:i.chatroom.logout},sendMsg:{sid:i.chatroom.id,cid:i.chatroom.sendMsg,params:[{type:"Property",name:"msg"}]},getChatroomMembers:{sid:i.chatroom.id,cid:i.chatroom.getChatroomMembers,params:[{type:"byte",name:"type"},{type:"long",name:"time"},{type:"int",name:"limit"}]},getHistoryMsgs:{sid:i.chatroom.id,cid:i.chatroom.getHistoryMsgs,params:[{type:"long",name:"timetag"},{type:"int",name:"limit"},{type:"bool",name:"reverse"},{type:"LongArray",name:"msgTypes"}]},markChatroomMember:{sid:i.chatroom.id,cid:i.chatroom.markChatroomMember,params:[{type:"string",name:"account"},{type:"int",name:"type"},{type:"bool",name:"isAdd"},{type:"int",name:"level"},{type:"string",name:"custom"}]},closeChatroom:{sid:i.chatroom.id,cid:i.chatroom.closeChatroom,params:[{type:"string",name:"custom"}]},getChatroom:{sid:i.chatroom.id,cid:i.chatroom.getChatroom},updateChatroom:{sid:i.chatroom.id,cid:i.chatroom.updateChatroom,params:[{type:"Property",name:"chatroom"},{type:"bool",name:"needNotify"},{type:"String",name:"custom"}]},updateMyChatroomMemberInfo:{sid:i.chatroom.id,cid:i.chatroom.updateMyChatroomMemberInfo,params:[{type:"Property",name:"chatroomMember"},{type:"bool",name:"needNotify"},{type:"String",name:"custom"},{type:"bool",name:"needSave"}]},getChatroomMembersInfo:{sid:i.chatroom.id,cid:i.chatroom.getChatroomMembersInfo,params:[{type:"StrArray",name:"accounts"}]},kickChatroomMember:{sid:i.chatroom.id,cid:i.chatroom.kickChatroomMember,params:[{type:"string",name:"account"},{type:"string",name:"custom"}]},updateChatroomMemberTempMute:{sid:i.chatroom.id,cid:i.chatroom.updateChatroomMemberTempMute,params:[{type:"String",name:"account"},{type:"long",name:"duration"},{type:"bool",name:"needNotify"},{type:"String",name:"custom"}]},queueOffer:{sid:i.chatroom.id,cid:i.chatroom.queueOffer,params:[{type:"string",name:"elementKey"},{type:"string",name:"elementValue"},{type:"bool",name:"transient"}]},queuePoll:{sid:i.chatroom.id,cid:i.chatroom.queuePoll,params:[{type:"string",name:"elementKey"}]},queueList:{sid:i.chatroom.id,cid:i.chatroom.queueList},peak:{sid:i.chatroom.id,cid:i.chatroom.peak},queueDrop:{sid:i.chatroom.id,cid:i.chatroom.queueDrop},queueInit:{sid:i.chatroom.id,cid:i.chatroom.queueInit,params:[{type:"int",name:"limit"}]},syncRobot:{sid:i.user.id,cid:i.user.syncRobot,params:[{type:"long",name:"timetag"}]}}),s="chatroom",c=r.merge({},o.packetConfig,{"4_10":{service:"notify"},"4_11":{service:"notify"},"3_16":{service:s,cmd:"syncRobot",response:[{type:"PropertyArray",name:"robots",entity:"robot"}]},"13_2":{service:s,cmd:"login",response:[{type:"Property",name:"chatroom"},{type:"Property",name:"chatroomMember"}]},"13_3":{service:s,cmd:"kicked",response:[{type:"Number",name:"reason"},{type:"String",name:"custom"}]},"13_4":{service:s,cmd:"logout"},"13_6":{service:s,cmd:"sendMsg",response:[{type:"Property",name:"msg"}]},"13_7":{service:s,cmd:"msg",response:[{type:"Property",name:"msg"}]},"13_8":{service:s,cmd:"getChatroomMembers",response:[{type:"PropertyArray",name:"members",entity:"chatroomMember"}]},"13_9":{service:s,cmd:"getHistoryMsgs",response:[{type:"PropertyArray",name:"msgs",entity:"msg"}]},"13_11":{service:s,cmd:"markChatroomMember",response:[{type:"Property",name:"chatroomMember"}]},"13_12":{service:s,cmd:"closeChatroom"},"13_13":{service:s,cmd:"getChatroom",response:[{type:"Property",name:"chatroom"}]},"13_14":{service:s,cmd:"updateChatroom"},"13_15":{service:s,cmd:"updateMyChatroomMemberInfo"},"13_16":{service:s,cmd:"getChatroomMembersInfo",response:[{type:"PropertyArray",name:"members",entity:"chatroomMember"}]},"13_17":{service:s,cmd:"kickChatroomMember"},"13_19":{service:s,cmd:"updateChatroomMemberTempMute"},"13_20":{service:s,cmd:"queueOffer"},"13_21":{service:s,cmd:"queuePoll",response:[{type:"String",name:"elementKey"},{type:"String",name:"elementValue"}]},"13_22":{service:s,cmd:"queueList",response:[{type:"KVArray",name:"queueList"}]},"13_23":{service:s,cmd:"peak",response:[{type:"String",name:"elementKey"},{type:"String",name:"elementValue"}]},"13_24":{service:s,cmd:"queueDrop"},"13_25":{service:s,cmd:"queueInit"}});e.exports={idMap:i,cmdConfig:a,packetConfig:c}},function(e,t){"use strict";e.exports={imLogin:{os:4,sdkVersion:6,appLogin:8,protocolVersion:9,deviceId:13,appKey:18,account:19,browser:24,session:26,token:1e3},nosToken:{objectName:1,token:2,bucket:3,expireTime:4},audioToText:{url:2},imageOp:{type:0,stripmeta:1,typeType:2,blurRadius:3,blurSigma:4,qualityQuality:5,cropX:6,cropY:7,cropWidth:8,cropHeight:9,rotateAngle:10,pixelPixel:11,thumbnailMode:12,thumbnailWidth:13,thumbnailHeight:14,thumbnailAxisX:15,thumbnailAxisY:16,thumbnailCenterX:17,thumbnailCenterY:18,thumbnailEnlarge:19,thumbnailToStatic:20,watermarkType:21,watermarkGravity:22,watermarkDissolve:23,watermarkDx:24,watermarkDy:25,watermarkImage:26,watermarkText:27,watermarkFont:28,watermarkFontSize:29,watermarkFontColor:30,interlace:31},robot:{account:4,nick:5,avatar:6,intro:7,config:8,valid:9,createTime:10,updateTime:11,custid:12,botid:13,bindTime:14},login:{appKey:1,account:2,deviceId:3,chatroomId:5,chatroomNick:20,chatroomAvatar:21,chatroomCustom:22,chatroomEnterCustom:23,session:26,isAnonymous:38},chatroom:{id:1,name:3,announcement:4,broadcastUrl:5,custom:12,createTime:14,updateTime:15,queuelevel:16,creator:100,onlineMemberNum:101,mute:102},msg:{idClient:1,type:2,attach:3,custom:4,resend:5,userUpdateTime:6,fromNick:7,fromAvatar:8,fromCustom:9,yidunEnable:10,antiSpamContent:11,skipHistory:12,body:13,antiSpamBusinessId:14,clientAntiSpam:15,antiSpamUsingYidun:16,time:20,from:21,chatroomId:22,fromClientType:23},chatroomMember:{chatroomId:1,account:2,type:3,level:4,nick:5,avatar:6,custom:7,online:8,guest:9,enterTime:10,blacked:12,gaged:13,valid:14,updateTime:15,tempMuted:16,tempMuteDuration:17}}},function(e,t){"use strict";e.exports={nosToken:{objectName:1,token:2,bucket:3,expireTime:4},audioToText:{url:2},imageOp:{type:0,stripmeta:1,typeType:2,blurRadius:3,blurSigma:4,qualityQuality:5,cropX:6,cropY:7,cropWidth:8,cropHeight:9,rotateAngle:10,pixelPixel:11,thumbnailMode:12,thumbnailWidth:13,thumbnailHeight:14,thumbnailAxisX:15,thumbnailAxisY:16,thumbnailCenterX:17,thumbnailCenterY:18,thumbnailEnlarge:19,thumbnailToStatic:20,watermarkType:21,watermarkGravity:22,watermarkDissolve:23,watermarkDx:24,watermarkDy:25,watermarkImage:26,watermarkText:27,watermarkFont:28,watermarkFontSize:29,watermarkFontColor:30,interlace:31},robot:{account:4,nick:5,avatar:6,intro:7,config:8,valid:9,createTime:10,updateTime:11,custid:12,botid:13,bindTime:14},login:{os:4,sdkVersion:6,appLogin:8,protocolVersion:9,deviceId:13,appKey:18,account:19,browser:24,session:26,token:1e3},loginRes:{lastLoginDeviceId:17,connectionId:102,ip:103,port:104,country:106},loginPort:{type:3,os:4,mac:5,deviceId:13,account:19,connectionId:102,ip:103,time:109},sync:{myInfo:1,offlineMsgs:2,teams:3,netcallMsgs:6,roamingMsgs:7,relations:9,friends:11,sessions:12,friendUsers:13,msgReceipts:14,myTeamMembers:15,donnop:16,deleteMsg:17,sessionAck:18,robots:19,broadcastMsgs:20,filterMsgs:100},donnop:{open:1},team:{teamId:1,name:3,type:4,owner:5,level:6,selfCustom:7,valid:8,memberNum:9,memberUpdateTime:10,createTime:11,updateTime:12,validToCurrentUser:13,intro:14,announcement:15,joinMode:16,bits:17,custom:18,serverCustom:19,avatar:20,beInviteMode:21,inviteMode:22,updateTeamMode:23,updateCustomMode:24,mute:100},teamMember:{teamId:1,account:3,type:4,nickInTeam:5,bits:7,active:8,valid:9,joinTime:10,updateTime:11,custom:12,mute:13},msg:{scene:0,to:1,from:2,fromClientType:4,fromDeviceId:5,fromNick:6,time:7,type:8,body:9,attach:10,idClient:11,idServer:12,resend:13,userUpdateTime:14,custom:15,pushPayload:16,pushContent:17,apnsAccounts:18,apnsContent:19,apnsForcePush:20,yidunEnable:21,antiSpamContent:22,antiSpamBusinessId:23,clientAntiSpam:24,antiSpamUsingYidun:25,isHistoryable:100,isRoamingable:101,isSyncable:102,isMuted:104,cc:105,isPushable:107,isOfflinable:108,isUnreadable:109,needPushNick:110},msgReceipt:{to:1,from:2,time:7,idClient:11},sysMsg:{time:0,type:1,to:2,from:3,ps:4,attach:5,idServer:6,sendToOnlineUsersOnly:7,apnsText:8,pushPayload:9,deletedIdClient:10,deletedIdServer:11,yidunEnable:12,antiSpamContent:13,deletedMsgTime:14,deletedMsgFromNick:15,opeAccount:16,cc:105,isPushable:107,isUnreadable:109,needPushNick:110},broadcastMsg:{broadcastId:1,fromAccid:2,fromUid:3,timestamp:4,body:5},friend:{account:4,flag:5,beflag:6,source:7,alias:8,bits:9,custom:10,createTime:11,updateTime:12},user:{account:1,nick:3,avatar:4,sign:5,gender:6,email:7,birth:8,tel:9,custom:10,createTime:12,updateTime:13},specialRelation:{account:0,isMuted:1,isBlacked:2,createTime:3,updateTime:4},msgType:{text:0,picture:1,audio:2,video:3,location:4,notification:5,file:6,netcall_audio:7,netcall_vedio:8,datatunnel_new:9,tips:10,robot:11,custom:100},msgEvent:{type:1,value:2,idClient:3,custom:4,validTime:5,broadcastType:6,sync:7,validTimeType:8,durable:9,time:10,idServer:11,clientType:12,serverConfig:13,serverCustom:14,appid:101,account:103,enableMultiClient:104,consid:106},msgEventSubscribe:{type:1,subscribeTime:2,sync:3,to:102,from:104,time:105}}},function(e,t){"use strict";e.exports={imLogin:{4:"os",6:"sdkVersion",8:"appLogin",9:"protocolVersion",13:"deviceId",18:"appKey",19:"account",24:"browser",26:"session",1000:"token"},nosToken:{1:"objectName",2:"token",3:"bucket",4:"expireTime"},audioToText:{2:"url"},imageOp:{0:"type",1:"stripmeta",2:"typeType",3:"blurRadius",4:"blurSigma",5:"qualityQuality",6:"cropX",7:"cropY",8:"cropWidth",9:"cropHeight",10:"rotateAngle",11:"pixelPixel",12:"thumbnailMode",13:"thumbnailWidth",14:"thumbnailHeight",15:"thumbnailAxisX",16:"thumbnailAxisY",17:"thumbnailCenterX",18:"thumbnailCenterY",19:"thumbnailEnlarge",20:"thumbnailToStatic",21:"watermarkType",22:"watermarkGravity",23:"watermarkDissolve",24:"watermarkDx",25:"watermarkDy",26:"watermarkImage",27:"watermarkText",28:"watermarkFont",29:"watermarkFontSize",30:"watermarkFontColor",31:"interlace"},robot:{4:"account",5:"nick",6:"avatar",7:"intro",8:"config",9:"valid",10:"createTime",11:"updateTime",12:"custid",13:"botid",14:"bindTime"},login:{1:"appKey",2:"account",3:"deviceId",5:"chatroomId",20:"chatroomNick",21:"chatroomAvatar",22:"chatroomCustom",23:"chatroomEnterCustom",26:"session",38:"isAnonymous"},chatroom:{1:"id",3:"name",4:"announcement",5:"broadcastUrl",12:"custom",14:"createTime",15:"updateTime",16:"queuelevel",100:"creator",101:"onlineMemberNum",102:"mute"},msg:{1:"idClient",2:"type",3:"attach",4:"custom",5:"resend",6:"userUpdateTime",7:"fromNick",8:"fromAvatar",9:"fromCustom",10:"yidunEnable",11:"antiSpamContent",12:"skipHistory",13:"body",14:"antiSpamBusinessId",15:"clientAntiSpam",16:"antiSpamUsingYidun",20:"time",21:"from",22:"chatroomId",23:"fromClientType"},chatroomMember:{1:"chatroomId",2:"account",3:"type",4:"level",5:"nick",6:"avatar",7:"custom",8:"online",9:"guest",10:"enterTime",12:"blacked",13:"gaged",14:"valid",15:"updateTime",16:"tempMuted",17:"tempMuteDuration"}}},function(e,t){"use strict";e.exports={nosToken:{1:"objectName",2:"token",3:"bucket",4:"expireTime"},audioToText:{2:"url"},imageOp:{0:"type",1:"stripmeta",2:"typeType",3:"blurRadius",4:"blurSigma",5:"qualityQuality",6:"cropX",7:"cropY",8:"cropWidth",9:"cropHeight",10:"rotateAngle",11:"pixelPixel",12:"thumbnailMode",13:"thumbnailWidth",14:"thumbnailHeight",15:"thumbnailAxisX",16:"thumbnailAxisY",17:"thumbnailCenterX",18:"thumbnailCenterY",19:"thumbnailEnlarge",20:"thumbnailToStatic",21:"watermarkType",22:"watermarkGravity",23:"watermarkDissolve",24:"watermarkDx",25:"watermarkDy",26:"watermarkImage",27:"watermarkText",28:"watermarkFont",29:"watermarkFontSize",30:"watermarkFontColor",31:"interlace"},robot:{4:"account",5:"nick",6:"avatar",7:"intro",8:"config",9:"valid",10:"createTime",11:"updateTime",12:"custid",13:"botid",14:"bindTime"},login:{4:"os",6:"sdkVersion",8:"appLogin",9:"protocolVersion",13:"deviceId",18:"appKey",19:"account",24:"browser",26:"session",1000:"token"},loginRes:{17:"lastLoginDeviceId",102:"connectionId",103:"ip",104:"port",106:"country"},loginPort:{3:"type",4:"os",5:"mac",13:"deviceId",19:"account",102:"connectionId",103:"ip",109:"time"},sync:{1:"myInfo",2:"offlineMsgs",3:"teams",6:"netcallMsgs",7:"roamingMsgs",9:"relations",11:"friends",12:"sessions",13:"friendUsers",14:"msgReceipts",15:"myTeamMembers",16:"donnop",17:"deleteMsg",18:"sessionAck",19:"robots",20:"broadcastMsgs",
100:"filterMsgs"},donnop:{1:"open"},team:{1:"teamId",3:"name",4:"type",5:"owner",6:"level",7:"selfCustom",8:"valid",9:"memberNum",10:"memberUpdateTime",11:"createTime",12:"updateTime",13:"validToCurrentUser",14:"intro",15:"announcement",16:"joinMode",17:"bits",18:"custom",19:"serverCustom",20:"avatar",21:"beInviteMode",22:"inviteMode",23:"updateTeamMode",24:"updateCustomMode",100:"mute"},teamMember:{1:"teamId",3:"account",4:"type",5:"nickInTeam",7:"bits",8:"active",9:"valid",10:"joinTime",11:"updateTime",12:"custom",13:"mute"},msg:{0:"scene",1:"to",2:"from",4:"fromClientType",5:"fromDeviceId",6:"fromNick",7:"time",8:"type",9:"body",10:"attach",11:"idClient",12:"idServer",13:"resend",14:"userUpdateTime",15:"custom",16:"pushPayload",17:"pushContent",18:"apnsAccounts",19:"apnsContent",20:"apnsForcePush",21:"yidunEnable",22:"antiSpamContent",23:"antiSpamBusinessId",24:"clientAntiSpam",25:"antiSpamUsingYidun",100:"isHistoryable",101:"isRoamingable",102:"isSyncable",104:"isMuted",105:"cc",107:"isPushable",108:"isOfflinable",109:"isUnreadable",110:"needPushNick"},msgReceipt:{1:"to",2:"from",7:"time",11:"idClient"},sysMsg:{0:"time",1:"type",2:"to",3:"from",4:"ps",5:"attach",6:"idServer",7:"sendToOnlineUsersOnly",8:"apnsText",9:"pushPayload",10:"deletedIdClient",11:"deletedIdServer",12:"yidunEnable",13:"antiSpamContent",14:"deletedMsgTime",15:"deletedMsgFromNick",16:"opeAccount",105:"cc",107:"isPushable",109:"isUnreadable",110:"needPushNick"},broadcastMsg:{1:"broadcastId",2:"fromAccid",3:"fromUid",4:"timestamp",5:"body"},friend:{4:"account",5:"flag",6:"beflag",7:"source",8:"alias",9:"bits",10:"custom",11:"createTime",12:"updateTime"},user:{1:"account",3:"nick",4:"avatar",5:"sign",6:"gender",7:"email",8:"birth",9:"tel",10:"custom",12:"createTime",13:"updateTime"},specialRelation:{0:"account",1:"isMuted",2:"isBlacked",3:"createTime",4:"updateTime"},msgType:{0:"text",1:"picture",2:"audio",3:"video",4:"location",5:"notification",6:"file",7:"netcall_audio",8:"netcall_vedio",9:"datatunnel_new",10:"tips",11:"robot",100:"custom"},msgEvent:{1:"type",2:"value",3:"idClient",4:"custom",5:"validTime",6:"broadcastType",7:"sync",8:"validTimeType",9:"durable",10:"time",11:"idServer",12:"clientType",13:"serverConfig",14:"serverCustom",101:"appid",103:"account",104:"enableMultiClient",106:"consid"},msgEventSubscribe:{1:"type",2:"subscribeTime",3:"sync",102:"to",104:"from",105:"time"}}},,,,function(e,t,n){"use strict";var r=n(44),o=n(106),i=function(){var e=/json/i,t=/post/i;return function(n,i){i=i||{};var a=i.data=i.data||{},s=i.headers=i.headers||{},c=r.checkWithDefault(s,"Accept","application/json"),u=r.checkWithDefault(s,"Content-Type","application/json");return e.test(c)&&(i.type="json"),t.test(i.method)&&e.test(u)&&(i.data=JSON.stringify(a)),o(n,i)}}();e.exports=i},function(e,t,n){"use strict";function r(e){var t=this;t.init(),a.call(t,e)}var o=n(44),i=n(133),a=n(107),s={},c=a.prototype,u=r.prototype=Object.create(c);u.init=function(){function e(e){var t=e.data;if(0===t.indexOf(n)){t=JSON.parse(t.replace(n,""));var r=t.key,o=s[r];o&&(delete s[r],t.result=decodeURIComponent(t.result||""),o.onLoad(t))}}function t(){if(!r){r=!0;var t=o.getGlobal();t.postMessage?o.on(t,"message",e):i.addMsgListener(e)}}var n="NEJ-AJAX-DATA:",r=!1;return function(){t()}}(),u.doSend=function(){var e=this,t=e.options,n=o.url2origin(t.url),r=t.proxyUrl||n+"/res/nej_proxy_frame.html",a=s[r];if(o.isArray(a))return void a.push(e.doSend.bind(e,t));if(!a)return s[r]=[e.doSend.bind(e,t)],void o.createIframe({src:r,onload:function(e){var t=s[r];s[r]=o.target(e).contentWindow,t.forEach(function(e){try{e()}catch(t){console.error(t)}})}});if(!e.aborted){var c=e.key=o.uniqueID();s[c]=e;var u=o.fetch({method:"GET",url:"",data:null,headers:{},timeout:0},t);u.key=c,i.postMessage(a,{data:u}),e.afterSend()}},u.abort=function(){var e=this;e.aborted=!0,delete s[e.key],c.abort.call(e)},e.exports=r},function(e,t,n){"use strict";function r(e){var t=this;t.init(),i.call(t,e)}var o=n(44),i=n(107),a=n(133),s="NEJ-UPLOAD-RESULT:",c={},u=i.prototype,l=r.prototype=Object.create(u);l.init=function(){function e(e){var t=e.data;if(0===t.indexOf(s)){t=JSON.parse(t.replace(s,""));var n=t.key,r=c[n];r&&(delete c[n],t.result=decodeURIComponent(t.result||""),r.onLoad(t.result))}}function t(){if(!n){n=!0;var t=o.getGlobal();t.postMessage?o.on(t,"message",e):(a.addMsgListener(e),a.startTimer())}}var n=!1;return function(){t()}}(),l.doSend=function(){function e(){l.forEach(function(e,t){var n=p[t];n.parentNode&&(e.name=n.name,o.isFunction(e.setAttribute)&&e.setAttribute("form",n.getAttribute("form")),n.parentNode.replaceChild(e,n))})}var t=this,n=t.options,r=t.key="zoro-ajax-upload-iframe-"+o.uniqueID();c[r]=t;var i=t.form=o.html2node('<form style="display:none;"></form>');document.body.appendChild(i),i.target=r,i.method="POST",i.enctype="multipart/form-data",i.encoding="multipart/form-data";var a=n.url,s=o.genUrlSep(a);i.action=a+s+"_proxy_=form";var u=n.data,l=[],p=[];u&&o.getKeys(u,n.putFileAtEnd).forEach(function(e){var t=u[e];if(t.tagName&&"INPUT"===t.tagName.toUpperCase()){if("file"===t.type){var n=t,r=n.cloneNode(!0);n.parentNode.insertBefore(r,n);var a=o.dataset(n,"name");a&&(n.name=a),i.appendChild(n),o.isFunction(n.setAttribute)&&(n.setAttribute("form",""),n.removeAttribute("form")),l.push(t),p.push(r)}}else{var s=o.html2node('<input type="hidden"/>');s.name=e,s.value=t,i.appendChild(s)}});var f=t.iframe=o.createIframe({name:r,onload:function(){return t.aborted?void e():(o.on(f,"load",t.checkResult.bind(t)),i.submit(),e(),void t.afterSend())}})},l.checkResult=function(){var e,t,n=this;try{if(e=n.iframe.contentWindow.document.body,t=(e.innerText||e.textContent||"").trim(),t.indexOf(s)>=0||e.innerHTML.indexOf(s)>=0)return}catch(r){return void console.error("ignore error if not same domain,",r)}n.onLoad(t)},l.onLoad=function(e){var t=this;u.onLoad.call(t,{status:200,result:e}),o.remove(t.form),o.remove(t.iframe),u.destroy.call(t)},l.destroy=function(){o.remove(this.iframe),o.remove(this.form)},l.abort=function(){var e=this;e.aborted=!0,delete c[e.key],u.abort.call(e)},e.exports=r},function(e,t,n){"use strict";function r(e){var t=this;e.onuploading&&t.on("uploading",e.onuploading),i.call(t,e)}var o=n(44),i=n(107),a=i.prototype,s=r.prototype=Object.create(a);s.doSend=function(){var e=this,t=e.options,n=t.headers,r=e.xhr=new XMLHttpRequest;if("multipart/form-data"===n["Content-Type"]){delete n["Content-Type"],r.upload.onprogress=e.onProgress.bind(e),r.upload.onload=e.onProgress.bind(e);var i=t.data;t.data=new window.FormData,i&&o.getKeys(i,t.putFileAtEnd).forEach(function(e){var n=i[e];n.tagName&&"INPUT"===n.tagName.toUpperCase()?"file"===n.type&&[].forEach.call(n.files,function(e){t.data.append(o.dataset(n,"name")||n.name||e.name||"file-"+o.uniqueID(),e)}):t.data.append(e,n)})}r.onreadystatechange=e.onStateChange.bind(e),0!==t.timeout&&(e.timer=setTimeout(e.onTimeout.bind(e),t.timeout)),r.open(t.method,t.url,!t.sync),Object.keys(n).forEach(function(e){r.setRequestHeader(e,n[e])}),t.cookie&&"withCredentials"in r&&(r.withCredentials=!0),r.send(t.data),e.afterSend()},s.onProgress=function(e){e.lengthComputable&&e.loaded<=e.total&&this.emit("uploading",e)},s.onStateChange=function(){var e=this,t=e.xhr;4===t.readyState&&e.onLoad({status:t.status,result:t.responseText||""})},s.getResponseHeader=function(e){var t=this.xhr;return t?t.getResponseHeader(e):""},s.destroy=function(){var e=this;clearTimeout(e.timer);try{e.xhr.onreadystatechange=o.f,e.xhr.abort()}catch(t){console.error("ignore error ajax destroy,",t)}a.destroy.call(e)},e.exports=r},function(e,t,n){"use strict";var r=n(106),o=function(e,t){return t.method="POST",t.headers=t.headers||{},t.headers["Content-Type"]="multipart/form-data",t.timeout=0,t.type=t.type||"json",r(e,t)};e.exports=o},function(e,t,n){(function(e){"use strict";"undefined"!=typeof window&&(window.console||e.env.WEIXIN_APP||(window.console={log:function(){},info:function(){},warn:function(){},error:function(){}}))}).call(t,n(28))},function(e,t,n){"use strict";function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i.merge(this,{options:e,debug:!1,api:"log",style:"color:blue;",log:i.emptyFunc,info:i.emptyFunc,warn:i.emptyFunc,error:i.emptyFunc}),this.prefix=e.prefix||"",this.setDebug(e.debug)}var o=n(48),i=n(1),a=(n(61),r.prototype),s=["Chrome","Safari","Firefox"];a.setDebug=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this;if(t.debug=e,e.style&&(t.style=e.style),t.debug&&i.exist(console)){var n=console;t.debug=function(){var e=t.formatArgs(arguments);s.indexOf(o.name)!==-1&&i.isString(e[0])&&(e[0]="%c"+e[0],e.splice(1,0,t.style)),t._log("debug",e)},t.log=function(){var e=t.formatArgs(arguments);s.indexOf(o.name)!==-1&&i.isString(e[0])&&(e[0]="%c"+e[0],e.splice(1,0,t.style)),t._log("log",e)},t.info=function(){var e=t.formatArgs(arguments);s.indexOf(o.name)!==-1&&i.isString(e[0])&&(e[0]="%c"+e[0],e.splice(1,0,t.style)),t._log("info",e)},t.warn=function(){var e=t.formatArgs(arguments);s.indexOf(o.name)!==-1&&i.isString(e[0])&&(e[0]="%c"+e[0],e.splice(1,0,t.style)),t._log("warn",e)},t.error=function(){var e=t.formatArgs(arguments);s.indexOf(o.name)!==-1&&i.isString(e[0])&&(e[0]="%c"+e[0],e.splice(1,0,t.style)),t._log("error",e)},t._log=function(e,r){var o=!1,a=t.options.logFunc,s=null;if(a&&!o&&(a[e]&&(s=a[e]),i.isFunction(s)))return void s.apply(a,r);if(n[e])try{n[e].apply?t.chrome(e,r):t.ie(e,r)}catch(c){}},t.chrome=function(e,r){s.indexOf(o.name)!==-1?n[e].apply(n,r):t.ie(e,r)},t.ie=function(e,t){t.forEach(function(t){n[e](JSON.stringify(t,null,4))})}}},a.formatArgs=function(e){var t=this;e=[].slice.call(e,0);var n=new Date,r=c(n.getMonth()+1)+"-"+c(n.getDate())+" "+c(n.getHours())+":"+c(n.getMinutes())+":"+c(n.getSeconds())+":"+c(n.getMilliseconds(),3),o="[NIM LOG "+r+" "+t.prefix.toUpperCase()+"] ";return i.isString(e[0])?e[0]=o+e[0]:e.splice(0,0,o),e.forEach(function(t,n){(i.isArray(t)||i.isObject(t))&&(e[n]=i.simpleClone(t))}),e};var c=function(e,t){t=t||2;for(var n=""+e;n.length<t;)n="0"+n;return n};e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t={debug:0,log:1,info:2,warn:3,error:4},n=this,r=e.url||null;n.level=t[e.level]||0,n.logCache=[],n.logNum=1,n.timeInterval=5e3,window.onerror=function(e,t,r,o,i){n.error.call(n,i)},setInterval(function(){n.logCache.length>0&&r&&n.postLogs(r,n.logCache)},n.timeInterval)}var i=n(20),a=r(i);o.prototype.debug=function(){this.level>0||(console.debug.apply(this,arguments),this.cacheLogs.apply(this,["[degbug]"].concat(arguments)))},o.prototype.log=function(){this.level>1||(console.log.apply(this,arguments),this.cacheLogs.apply(this,["[log]"].concat(arguments)))},o.prototype.info=function(){this.level>2||(console.info.apply(this,arguments),this.cacheLogs.apply(this,["[info]"].concat(arguments)))},o.prototype.warn=function(){this.level>3||(console.warn.apply(this,arguments),this.cacheLogs.apply(this,["[warn]"].concat(arguments)))},o.prototype.error=function(){this.level>4||(console.error.apply(this,arguments),this.cacheLogs.apply(this,["[error]"].concat(arguments)))},o.prototype.cacheLogs=function(e,t){for(var n=[],r=0;r<t.length;r++){var o=t[r];"object"===("undefined"==typeof o?"undefined":(0,a["default"])(o))?n.push(JSON.stringify(o)):n.push(o)}var i=this.logNum++ +" "+e+" "+n.join("; ");this.logCache.push(i.replace("%c",""))},o.prototype.postLogs=function(e,t){var n=this,r=new XMLHttpRequest;r.onreadystatechange=function(){4===r.readyState&&(200===r.status?(console.info("LoggerPlugin::日志上报完成"),n.logCache=[],n.timeInterval=5e3):n.timeInterval+=5e3)},r.open("POST",e),r.setRequestHeader("Content-Type","plain/text;charset=utf-8"),r.timeout=360,r.send(t.join("\n"))},e.exports=o},function(e,t,n){"use strict";var r=n(1),o={file:{md5:"$(Etag)",size:"$(ObjectSize)"},image:{md5:"$(Etag)",size:"$(ObjectSize)",w:"$(ImageInfo.Width)",h:"$(ImageInfo.Height)",orientation:"$(ImageInfo.Orientation)"},audio:{md5:"$(Etag)",size:"$(ObjectSize)",dur:"$(AVinfo.Audio.Duration)"},video:{md5:"$(Etag)",size:"$(ObjectSize)",dur:"$(AVinfo.Video.Duration)",w:"$(AVinfo.Video.Width)",h:"$(AVinfo.Video.Height)"}},i={};i.genResponseBody=function(e){return e=e||"file",o[e]},i.parseResponse=function(e,t){r.notundef(e.size)&&(e.size=+e.size),r.notundef(e.w)&&(e.w=+e.w),r.notundef(e.h)&&(e.h=+e.h),r.notundef(e.dur)&&(e.dur=+e.dur);var n=e.orientation;if(r.notundef(n)&&(delete e.orientation,t&&("right, top"===n||"left, bottom"===n))){var o=e.w;e.w=e.h,e.h=o}return e},e.exports=i},function(e,t,n){"use strict";function r(e){var t=this;t.options=o.copy(e),o.verifyOptions(e,"url fileName"),o.verifyParamPresentJustOne(e,"blob fileInput"),o.verifyCallback(e,"beginupload uploadprogress uploaddone"),e.fileInput&&(e.fileInput=o.verifyFileInput(e.fileInput)),e.type&&o.verifyFileType(e.type),e.timeout?o.verifyParamType("timeout",e.timeout,"number"):e.timeout=6e5,o.verifyFileUploadCallback(e),e.data={};var n=e.fileName,r=e.fileInput;if(c)if(r){var s=e.type?o.filterFiles(r.files,e.type):[].slice.call(r.files,0);if(!s||!s.length)return void e.uploaddone(i.newWrongFileTypeError("未读取到"+e.type+"类型的文件, 请确保文件选择节点的文件不为空, 并且请确保选择了"+e.type+"类型的文件"));var l=r.files[0].size;if(l>u)return void e.uploaddone(i.newFileTooLargeError("文件大小超过100M"));e.data[n]=s[0]}else e.blob&&(e.data[n]=e.blob);else o.dataset(r,"name",n),e.data.input=r;e.params&&o.merge(e.data,e.params);var p={data:e.data,onaftersend:function(){e.beginupload(t)},onuploading:function(t){var n=Math.floor(1e4*t.loaded/t.total)/100,r={total:t.total,loaded:t.loaded,percentage:n,percentageText:n+"%"};e.fileInput&&(r.fileInput=e.fileInput),e.blob&&(r.blob=e.blob),e.uploadprogress(r)},onload:function(n){n.Error?t.onError(n):e.uploaddone(null,n)},onerror:function(n){try{if(n.result)var r=JSON.parse(n.result);else r=n;t.onError(r)}catch(o){console.error("ignore error if could not parse obj.result",o),e.uploaddone(new i(n.message,n.code),t.options)}}};c||(p.mode="iframe"),p.putFileAtEnd=!0,t.sn=a(e.url,p)}var o=n(1),i=n(27),a=n(61).upload,s=n(61).abort,c=o.supportFormData,u=104857600;r.prototype.onError=function(e){var t,n,r,o=this,a=o.options;e=e||{},t=e.Error||e||{},n=t.Code||t.code||"unknown",r=t.Message||t.message||"未知错误",a.uploaddone(new i(n+"("+r+")",n))},r.prototype.abort=function(){s(this.sn)},e.exports=r},,,,,,function(e,t,n){var r,o;!function(i,a){"use strict";r=a,o="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==o&&(e.exports=o))}(this,function(){var e,t,n=Array,r=n.prototype,o=Object,i=o.prototype,a=Function,s=a.prototype,c=String,u=c.prototype,l=Number,p=l.prototype,f=r.slice,d=r.splice,m=r.push,h=r.unshift,y=r.concat,g=r.join,v=s.call,b=s.apply,w=Math.max,k=Math.min,T=i.toString,S="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,M=Function.prototype.toString,_=/^\s*class /,x=function(e){try{var t=M.call(e),n=t.replace(/\/\/.*\n/g,""),r=n.replace(/\/\*[.\s\S]*\*\//g,""),o=r.replace(/\n/gm," ").replace(/ {2}/g," ");return _.test(o)}catch(i){return!1}},O=function(e){try{return!x(e)&&(M.call(e),!0)}catch(t){return!1}},C="[object Function]",E="[object GeneratorFunction]",e=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(S)return O(e);if(x(e))return!1;var t=T.call(e);return t===C||t===E},P=RegExp.prototype.exec,I=function(e){try{return P.call(e),!0}catch(t){return!1}},A="[object RegExp]";t=function(e){return"object"==typeof e&&(S?I(e):T.call(e)===A)};var j,N=String.prototype.valueOf,F=function(e){try{return N.call(e),!0}catch(t){return!1}},D="[object String]";j=function(e){return"string"==typeof e||"object"==typeof e&&(S?F(e):T.call(e)===D)};var R=o.defineProperty&&function(){try{var e={};o.defineProperty(e,"x",{enumerable:!1,value:e});for(var t in e)return!1;return e.x===e}catch(n){return!1}}(),L=function(e){var t;return t=R?function(e,t,n,r){!r&&t in e||o.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(e,t,n,r){!r&&t in e||(e[t]=n)},function(n,r,o){for(var i in r)e.call(r,i)&&t(n,i,r[i],o)}}(i.hasOwnProperty),U=function(e){var t=typeof e;return null===e||"object"!==t&&"function"!==t},B=l.isNaN||function(e){return e!==e},q={ToInteger:function(e){var t=+e;return B(t)?t=0:0!==t&&t!==1/0&&t!==-(1/0)&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t},ToPrimitive:function(t){var n,r,o;if(U(t))return t;if(r=t.valueOf,e(r)&&(n=r.call(t),U(n)))return n;if(o=t.toString,e(o)&&(n=o.call(t),U(n)))return n;throw new TypeError},ToObject:function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return o(e)},ToUint32:function(e){return e>>>0}},W=function(){};L(s,{bind:function(t){var n=this;if(!e(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,i=f.call(arguments,1),s=function(){if(this instanceof r){var e=b.call(n,this,y.call(i,f.call(arguments)));return o(e)===e?e:this}return b.call(n,t,y.call(i,f.call(arguments)))},c=w(0,n.length-i.length),u=[],l=0;l<c;l++)m.call(u,"$"+l);return r=a("binder","return function ("+g.call(u,",")+"){ return binder.apply(this, arguments); }")(s),n.prototype&&(W.prototype=n.prototype,r.prototype=new W,W.prototype=null),r}});var H=v.bind(i.hasOwnProperty),$=v.bind(i.toString),X=v.bind(f),J=b.bind(f);if("object"==typeof document&&document&&document.documentElement)try{X(document.documentElement.childNodes)}catch(G){var K=X,V=J;X=function(e){for(var t=[],n=e.length;n-- >0;)t[n]=e[n];return V(t,K(arguments,1))},J=function(e,t){return V(X(e),t)}}var z=v.bind(u.slice),Y=v.bind(u.split),Q=v.bind(u.indexOf),Z=v.bind(m),ee=v.bind(i.propertyIsEnumerable),te=v.bind(r.sort),ne=n.isArray||function(e){return"[object Array]"===$(e)},re=1!==[].unshift(0);L(r,{unshift:function(){return h.apply(this,arguments),this.length}},re),L(n,{isArray:ne});var oe=o("a"),ie="a"!==oe[0]||!(0 in oe),ae=function(e){var t=!0,n=!0,r=!1;if(e)try{e.call("foo",function(e,n,r){"object"!=typeof r&&(t=!1)}),e.call([1],function(){"use strict";n="string"==typeof this},"x")}catch(o){r=!0}return!!e&&!r&&t&&n};L(r,{forEach:function(t){var n,r=q.ToObject(this),o=ie&&j(this)?Y(this,""):r,i=-1,a=q.ToUint32(o.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.forEach callback must be a function");for(;++i<a;)i in o&&("undefined"==typeof n?t(o[i],i,r):t.call(n,o[i],i,r))}},!ae(r.forEach)),L(r,{map:function(t){var r,o=q.ToObject(this),i=ie&&j(this)?Y(this,""):o,a=q.ToUint32(i.length),s=n(a);if(arguments.length>1&&(r=arguments[1]),!e(t))throw new TypeError("Array.prototype.map callback must be a function");for(var c=0;c<a;c++)c in i&&("undefined"==typeof r?s[c]=t(i[c],c,o):s[c]=t.call(r,i[c],c,o));return s}},!ae(r.map)),L(r,{filter:function(t){var n,r,o=q.ToObject(this),i=ie&&j(this)?Y(this,""):o,a=q.ToUint32(i.length),s=[];if(arguments.length>1&&(r=arguments[1]),!e(t))throw new TypeError("Array.prototype.filter callback must be a function");for(var c=0;c<a;c++)c in i&&(n=i[c],("undefined"==typeof r?t(n,c,o):t.call(r,n,c,o))&&Z(s,n));return s}},!ae(r.filter)),L(r,{every:function(t){var n,r=q.ToObject(this),o=ie&&j(this)?Y(this,""):r,i=q.ToUint32(o.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.every callback must be a function");for(var a=0;a<i;a++)if(a in o&&!("undefined"==typeof n?t(o[a],a,r):t.call(n,o[a],a,r)))return!1;return!0}},!ae(r.every)),L(r,{some:function(t){var n,r=q.ToObject(this),o=ie&&j(this)?Y(this,""):r,i=q.ToUint32(o.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.some callback must be a function");for(var a=0;a<i;a++)if(a in o&&("undefined"==typeof n?t(o[a],a,r):t.call(n,o[a],a,r)))return!0;return!1}},!ae(r.some));var se=!1;r.reduce&&(se="object"==typeof r.reduce.call("es5",function(e,t,n,r){return r})),L(r,{reduce:function(t){var n=q.ToObject(this),r=ie&&j(this)?Y(this,""):n,o=q.ToUint32(r.length);if(!e(t))throw new TypeError("Array.prototype.reduce callback must be a function");if(0===o&&1===arguments.length)throw new TypeError("reduce of empty array with no initial value");var i,a=0;if(arguments.length>=2)i=arguments[1];else for(;;){if(a in r){i=r[a++];break}if(++a>=o)throw new TypeError("reduce of empty array with no initial value")}for(;a<o;a++)a in r&&(i=t(i,r[a],a,n));return i}},!se);var ce=!1;r.reduceRight&&(ce="object"==typeof r.reduceRight.call("es5",function(e,t,n,r){return r})),L(r,{reduceRight:function(t){var n=q.ToObject(this),r=ie&&j(this)?Y(this,""):n,o=q.ToUint32(r.length);if(!e(t))throw new TypeError("Array.prototype.reduceRight callback must be a function");if(0===o&&1===arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var i,a=o-1;if(arguments.length>=2)i=arguments[1];else for(;;){if(a in r){i=r[a--];break}if(--a<0)throw new TypeError("reduceRight of empty array with no initial value")}if(a<0)return i;do a in r&&(i=t(i,r[a],a,n));while(a--);return i}},!ce);var ue=r.indexOf&&[0,1].indexOf(1,2)!==-1;L(r,{indexOf:function(e){var t=ie&&j(this)?Y(this,""):q.ToObject(this),n=q.ToUint32(t.length);if(0===n)return-1;var r=0;for(arguments.length>1&&(r=q.ToInteger(arguments[1])),r=r>=0?r:w(0,n+r);r<n;r++)if(r in t&&t[r]===e)return r;return-1}},ue);var le=r.lastIndexOf&&[0,1].lastIndexOf(0,-3)!==-1;L(r,{lastIndexOf:function(e){var t=ie&&j(this)?Y(this,""):q.ToObject(this),n=q.ToUint32(t.length);if(0===n)return-1;var r=n-1;for(arguments.length>1&&(r=k(r,q.ToInteger(arguments[1]))),r=r>=0?r:n-Math.abs(r);r>=0;r--)if(r in t&&e===t[r])return r;return-1}},le);var pe=function(){var e=[1,2],t=e.splice();return 2===e.length&&ne(t)&&0===t.length}();L(r,{splice:function(e,t){return 0===arguments.length?[]:d.apply(this,arguments)}},!pe);var fe=function(){var e={};return r.splice.call(e,0,0,1),1===e.length}();L(r,{splice:function(e,t){if(0===arguments.length)return[];var n=arguments;return this.length=w(q.ToInteger(this.length),0),arguments.length>0&&"number"!=typeof t&&(n=X(arguments),n.length<2?Z(n,this.length-e):n[1]=q.ToInteger(t)),d.apply(this,n)}},!fe);var de=function(){var e=new n(1e5);return e[8]="x",e.splice(1,1),7===e.indexOf("x")}(),me=function(){var e=256,t=[];return t[e]="a",t.splice(e+1,0,"b"),"a"===t[e]}();L(r,{splice:function(e,t){for(var n,r=q.ToObject(this),o=[],i=q.ToUint32(r.length),a=q.ToInteger(e),s=a<0?w(i+a,0):k(a,i),u=k(w(q.ToInteger(t),0),i-s),l=0;l<u;)n=c(s+l),H(r,n)&&(o[l]=r[n]),l+=1;var p,f=X(arguments,2),d=f.length;if(d<u){l=s;for(var m=i-u;l<m;)n=c(l+u),p=c(l+d),H(r,n)?r[p]=r[n]:delete r[p],l+=1;l=i;for(var h=i-u+d;l>h;)delete r[l-1],l-=1}else if(d>u)for(l=i-u;l>s;)n=c(l+u-1),p=c(l+d-1),H(r,n)?r[p]=r[n]:delete r[p],l-=1;l=s;for(var y=0;y<f.length;++y)r[l]=f[y],l+=1;return r.length=i-u+d,o}},!de||!me);var he,ye=r.join;try{he="1,2,3"!==Array.prototype.join.call("123",",")}catch(G){he=!0}he&&L(r,{join:function(e){var t="undefined"==typeof e?",":e;return ye.call(j(this)?Y(this,""):this,t)}},he);var ge="1,2"!==[1,2].join(void 0);ge&&L(r,{join:function(e){var t="undefined"==typeof e?",":e;return ye.call(this,t)}},ge);var ve=function(e){for(var t=q.ToObject(this),n=q.ToUint32(t.length),r=0;r<arguments.length;)t[n+r]=arguments[r],r+=1;return t.length=n+r,n+r},be=function(){var e={},t=Array.prototype.push.call(e,void 0);return 1!==t||1!==e.length||"undefined"!=typeof e[0]||!H(e,0)}();L(r,{push:function(e){return ne(this)?m.apply(this,arguments):ve.apply(this,arguments)}},be);var we=function(){var e=[],t=e.push(void 0);return 1!==t||1!==e.length||"undefined"!=typeof e[0]||!H(e,0)}();L(r,{push:ve},we),L(r,{slice:function(e,t){var n=j(this)?Y(this,""):this;return J(n,arguments)}},ie);var ke=function(){try{[1,2].sort(null)}catch(e){try{[1,2].sort({})}catch(t){return!1}}return!0}(),Te=function(){try{return[1,2].sort(/a/),!1}catch(e){}return!0}(),Se=function(){try{return[1,2].sort(void 0),!0}catch(e){}return!1}();L(r,{sort:function(t){if("undefined"==typeof t)return te(this);if(!e(t))throw new TypeError("Array.prototype.sort callback must be a function");return te(this,t)}},ke||!Se||!Te);var Me=!ee({toString:null},"toString"),_e=ee(function(){},"prototype"),xe=!H("x","0"),Oe=function(e){var t=e.constructor;return t&&t.prototype===e},Ce={$window:!0,$console:!0,$parent:!0,$self:!0,$frame:!0,$frames:!0,$frameElement:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$external:!0,$width:!0,$height:!0,$top:!0,$localStorage:!0},Ee=function(){if("undefined"==typeof window)return!1;for(var e in window)try{!Ce["$"+e]&&H(window,e)&&null!==window[e]&&"object"==typeof window[e]&&Oe(window[e])}catch(t){return!0}return!1}(),Pe=function(e){if("undefined"==typeof window||!Ee)return Oe(e);try{return Oe(e)}catch(t){return!1}},Ie=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Ae=Ie.length,je=function(e){return"[object Arguments]"===$(e)},Ne=function(t){return null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&!ne(t)&&e(t.callee)},Fe=je(arguments)?je:Ne;L(o,{keys:function(t){var n=e(t),r=Fe(t),o=null!==t&&"object"==typeof t,i=o&&j(t);if(!o&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var a=[],s=_e&&n;if(i&&xe||r)for(var u=0;u<t.length;++u)Z(a,c(u));if(!r)for(var l in t)s&&"prototype"===l||!H(t,l)||Z(a,c(l));if(Me)for(var p=Pe(t),f=0;f<Ae;f++){var d=Ie[f];p&&"constructor"===d||!H(t,d)||Z(a,d)}return a}});var De=o.keys&&function(){return 2===o.keys(arguments).length}(1,2),Re=o.keys&&function(){var e=o.keys(arguments);return 1!==arguments.length||1!==e.length||1!==e[0]}(1),Le=o.keys;L(o,{keys:function(e){return Le(Fe(e)?X(e):e)}},!De||Re);var Ue,Be,qe=0!==new Date(-0xc782b5b342b24).getUTCMonth(),We=new Date(-0x55d318d56a724),He=new Date(14496624e5),$e="Mon, 01 Jan -45875 11:59:59 GMT"!==We.toUTCString(),Xe=We.getTimezoneOffset();Xe<-720?(Ue="Tue Jan 02 -45875"!==We.toDateString(),Be=!/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/.test(String(He))):(Ue="Mon Jan 01 -45875"!==We.toDateString(),Be=!/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/.test(String(He)));var Je=v.bind(Date.prototype.getFullYear),Ge=v.bind(Date.prototype.getMonth),Ke=v.bind(Date.prototype.getDate),Ve=v.bind(Date.prototype.getUTCFullYear),ze=v.bind(Date.prototype.getUTCMonth),Ye=v.bind(Date.prototype.getUTCDate),Qe=v.bind(Date.prototype.getUTCDay),Ze=v.bind(Date.prototype.getUTCHours),et=v.bind(Date.prototype.getUTCMinutes),tt=v.bind(Date.prototype.getUTCSeconds),nt=v.bind(Date.prototype.getUTCMilliseconds),rt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ot=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],it=function(e,t){return Ke(new Date(t,e,0))};L(Date.prototype,{getFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Je(this);return e<0&&Ge(this)>11?e+1:e},getMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Je(this),t=Ge(this);return e<0&&t>11?0:t},getDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Je(this),t=Ge(this),n=Ke(this);if(e<0&&t>11){if(12===t)return n;var r=it(0,e+1);return r-n+1}return n},getUTCFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Ve(this);return e<0&&ze(this)>11?e+1:e},getUTCMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Ve(this),t=ze(this);return e<0&&t>11?0:t},getUTCDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Ve(this),t=ze(this),n=Ye(this);if(e<0&&t>11){if(12===t)return n;var r=it(0,e+1);return r-n+1}return n}},qe),L(Date.prototype,{toUTCString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Qe(this),t=Ye(this),n=ze(this),r=Ve(this),o=Ze(this),i=et(this),a=tt(this);return rt[e]+", "+(t<10?"0"+t:t)+" "+ot[n]+" "+r+" "+(o<10?"0"+o:o)+":"+(i<10?"0"+i:i)+":"+(a<10?"0"+a:a)+" GMT"}},qe||$e),L(Date.prototype,{toDateString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=this.getDay(),t=this.getDate(),n=this.getMonth(),r=this.getFullYear();return rt[e]+" "+ot[n]+" "+(t<10?"0"+t:t)+" "+r}},qe||Ue),(qe||Be)&&(Date.prototype.toString=function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=this.getDay(),t=this.getDate(),n=this.getMonth(),r=this.getFullYear(),o=this.getHours(),i=this.getMinutes(),a=this.getSeconds(),s=this.getTimezoneOffset(),c=Math.floor(Math.abs(s)/60),u=Math.floor(Math.abs(s)%60);return rt[e]+" "+ot[n]+" "+(t<10?"0"+t:t)+" "+r+" "+(o<10?"0"+o:o)+":"+(i<10?"0"+i:i)+":"+(a<10?"0"+a:a)+" GMT"+(s>0?"-":"+")+(c<10?"0"+c:c)+(u<10?"0"+u:u)},R&&o.defineProperty(Date.prototype,"toString",{configurable:!0,enumerable:!1,writable:!0}));var at=-621987552e5,st="-000001",ct=Date.prototype.toISOString&&new Date(at).toISOString().indexOf(st)===-1,ut=Date.prototype.toISOString&&"1969-12-31T23:59:59.999Z"!==new Date(-1).toISOString(),lt=v.bind(Date.prototype.getTime);L(Date.prototype,{toISOString:function(){if(!isFinite(this)||!isFinite(lt(this)))throw new RangeError("Date.prototype.toISOString called on non-finite value.");var e=Ve(this),t=ze(this);e+=Math.floor(t/12),t=(t%12+12)%12;var n=[t+1,Ye(this),Ze(this),et(this),tt(this)];e=(e<0?"-":e>9999?"+":"")+z("00000"+Math.abs(e),0<=e&&e<=9999?-4:-6);for(var r=0;r<n.length;++r)n[r]=z("00"+n[r],-2);return e+"-"+X(n,0,2).join("-")+"T"+X(n,2).join(":")+"."+z("000"+nt(this),-3)+"Z"}},ct||ut);var pt=function(){try{return Date.prototype.toJSON&&null===new Date(NaN).toJSON()&&new Date(at).toJSON().indexOf(st)!==-1&&Date.prototype.toJSON.call({toISOString:function(){return!0}})}catch(e){return!1}}();pt||(Date.prototype.toJSON=function(t){var n=o(this),r=q.ToPrimitive(n);if("number"==typeof r&&!isFinite(r))return null;var i=n.toISOString;if(!e(i))throw new TypeError("toISOString property is not callable");return i.call(n)});var ft=1e15===Date.parse("+033658-09-27T01:46:40.000Z"),dt=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"))||!isNaN(Date.parse("2012-12-31T23:59:60.000Z")),mt=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));if(mt||dt||!ft){var ht=Math.pow(2,31)-1,yt=B(new Date(1970,0,1,0,0,0,ht+1).getTime());Date=function(e){var t=function(n,r,o,i,a,s,u){var l,p=arguments.length;if(this instanceof e){var f=s,d=u;if(yt&&p>=7&&u>ht){var m=Math.floor(u/ht)*ht,h=Math.floor(m/1e3);f+=h,d-=1e3*h}l=1===p&&c(n)===n?new e(t.parse(n)):p>=7?new e(n,r,o,i,a,f,d):p>=6?new e(n,r,o,i,a,f):p>=5?new e(n,r,o,i,a):p>=4?new e(n,r,o,i):p>=3?new e(n,r,o):p>=2?new e(n,r):p>=1?new e(n instanceof e?+n:n):new e}else l=e.apply(this,arguments);return U(l)||L(l,{constructor:t},!0),l},n=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),r=[0,31,59,90,120,151,181,212,243,273,304,334,365],o=function(e,t){var n=t>1?1:0;return r[t]+Math.floor((e-1969+n)/4)-Math.floor((e-1901+n)/100)+Math.floor((e-1601+n)/400)+365*(e-1970)},i=function(t){var n=0,r=t;if(yt&&r>ht){var o=Math.floor(r/ht)*ht,i=Math.floor(o/1e3);n+=i,r-=1e3*i}return l(new e(1970,0,1,0,0,n,r))};for(var a in e)H(e,a)&&(t[a]=e[a]);L(t,{now:e.now,UTC:e.UTC},!0),t.prototype=e.prototype,L(t.prototype,{constructor:t},!0);var s=function(t){var r=n.exec(t);if(r){var a,s=l(r[1]),c=l(r[2]||1)-1,u=l(r[3]||1)-1,p=l(r[4]||0),f=l(r[5]||0),d=l(r[6]||0),m=Math.floor(1e3*l(r[7]||0)),h=Boolean(r[4]&&!r[8]),y="-"===r[9]?1:-1,g=l(r[10]||0),v=l(r[11]||0),b=f>0||d>0||m>0;return p<(b?24:25)&&f<60&&d<60&&m<1e3&&c>-1&&c<12&&g<24&&v<60&&u>-1&&u<o(s,c+1)-o(s,c)&&(a=60*(24*(o(s,c)+u)+p+g*y),a=1e3*(60*(a+f+v*y)+d)+m,h&&(a=i(a)),-864e13<=a&&a<=864e13)?a:NaN}return e.parse.apply(this,arguments)};return L(t,{parse:s}),t}(Date)}Date.now||(Date.now=function(){return(new Date).getTime()});var gt=p.toFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0)),vt={
base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function(e,t){for(var n=-1,r=t;++n<vt.size;)r+=e*vt.data[n],vt.data[n]=r%vt.base,r=Math.floor(r/vt.base)},divide:function(e){for(var t=vt.size,n=0;--t>=0;)n+=vt.data[t],vt.data[t]=Math.floor(n/e),n=n%e*vt.base},numToString:function(){for(var e=vt.size,t="";--e>=0;)if(""!==t||0===e||0!==vt.data[e]){var n=c(vt.data[e]);""===t?t=n:t+=z("0000000",0,7-n.length)+n}return t},pow:function Lt(e,t,n){return 0===t?n:t%2===1?Lt(e,t-1,n*e):Lt(e*e,t/2,n)},log:function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}},bt=function(e){var t,n,r,o,i,a,s,u;if(t=l(e),t=B(t)?0:Math.floor(t),t<0||t>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(n=l(this),B(n))return"NaN";if(n<=-1e21||n>=1e21)return c(n);if(r="",n<0&&(r="-",n=-n),o="0",n>1e-21)if(i=vt.log(n*vt.pow(2,69,1))-69,a=i<0?n*vt.pow(2,-i,1):n/vt.pow(2,i,1),a*=4503599627370496,i=52-i,i>0){for(vt.multiply(0,a),s=t;s>=7;)vt.multiply(1e7,0),s-=7;for(vt.multiply(vt.pow(10,s,1),0),s=i-1;s>=23;)vt.divide(1<<23),s-=23;vt.divide(1<<s),vt.multiply(1,1),vt.divide(2),o=vt.numToString()}else vt.multiply(0,a),vt.multiply(1<<-i,0),o=vt.numToString()+z("0.00000000000000000000",2,2+t);return t>0?(u=o.length,o=u<=t?r+z("0.0000000000000000000",0,t-u+2)+o:r+z(o,0,u-t)+"."+z(o,u-t)):o=r+o,o};L(p,{toFixed:bt},gt);var wt=function(){try{return"1"===1..toPrecision(void 0)}catch(e){return!0}}(),kt=p.toPrecision;L(p,{toPrecision:function(e){return"undefined"==typeof e?kt.call(this):kt.call(this,e)}},wt),2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?!function(){var e="undefined"==typeof/()??/.exec("")[1],n=Math.pow(2,32)-1;u.split=function(r,o){var i=String(this);if("undefined"==typeof r&&0===o)return[];if(!t(r))return Y(this,r,o);var a,s,c,u,l=[],p=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(r.sticky?"y":""),f=0,d=new RegExp(r.source,p+"g");e||(a=new RegExp("^"+d.source+"$(?!\\s)",p));var h="undefined"==typeof o?n:q.ToUint32(o);for(s=d.exec(i);s&&(c=s.index+s[0].length,!(c>f&&(Z(l,z(i,f,s.index)),!e&&s.length>1&&s[0].replace(a,function(){for(var e=1;e<arguments.length-2;e++)"undefined"==typeof arguments[e]&&(s[e]=void 0)}),s.length>1&&s.index<i.length&&m.apply(l,X(s,1)),u=s[0].length,f=c,l.length>=h)));)d.lastIndex===s.index&&d.lastIndex++,s=d.exec(i);return f===i.length?!u&&d.test("")||Z(l,""):Z(l,z(i,f)),l.length>h?X(l,0,h):l}}():"0".split(void 0,0).length&&(u.split=function(e,t){return"undefined"==typeof e&&0===t?[]:Y(this,e,t)});var Tt=u.replace,St=function(){var e=[];return"x".replace(/x(.)?/g,function(t,n){Z(e,n)}),1===e.length&&"undefined"==typeof e[0]}();St||(u.replace=function(n,r){var o=e(r),i=t(n)&&/\)[*?]/.test(n.source);if(o&&i){var a=function(e){var t=arguments.length,o=n.lastIndex;n.lastIndex=0;var i=n.exec(e)||[];return n.lastIndex=o,Z(i,arguments[t-2],arguments[t-1]),r.apply(this,i)};return Tt.call(this,n,a)}return Tt.call(this,n,r)});var Mt=u.substr,_t="".substr&&"b"!=="0b".substr(-1);L(u,{substr:function(e,t){var n=e;return e<0&&(n=w(this.length+e,0)),Mt.call(this,n,t)}},_t);var xt="\t\n\x0B\f\r \u2028\u2029\ufeff",Ot="",Ct="["+xt+"]",Et=new RegExp("^"+Ct+Ct+"*"),Pt=new RegExp(Ct+Ct+"*$"),It=u.trim&&(xt.trim()||!Ot.trim());L(u,{trim:function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return c(this).replace(Et,"").replace(Pt,"")}},It);var At=v.bind(String.prototype.trim),jt=u.lastIndexOf&&"abcあい".lastIndexOf("あい",2)!==-1;L(u,{lastIndexOf:function(e){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");for(var t=c(this),n=c(e),r=arguments.length>1?l(arguments[1]):NaN,o=B(r)?1/0:q.ToInteger(r),i=k(w(o,0),t.length),a=n.length,s=i+a;s>0;){s=w(0,s-a);var u=Q(z(t,s,i+a),n);if(u!==-1)return s+u}return-1}},jt);var Nt=u.lastIndexOf;if(L(u,{lastIndexOf:function(e){return Nt.apply(this,arguments)}},1!==u.lastIndexOf.length),8===parseInt(xt+"08")&&22===parseInt(xt+"0x16")||(parseInt=function(e){var t=/^[-+]?0[xX]/;return function(n,r){var o=At(String(n)),i=l(r)||(t.test(o)?16:10);return e(o,i)}}(parseInt)),1/parseFloat("-0")!==-(1/0)&&(parseFloat=function(e){return function(t){var n=At(String(t)),r=e(n);return 0===r&&"-"===z(n,0,1)?-0:r}}(parseFloat)),"RangeError: test"!==String(new RangeError("test"))){var Ft=function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");var e=this.name;"undefined"==typeof e?e="Error":"string"!=typeof e&&(e=c(e));var t=this.message;return"undefined"==typeof t?t="":"string"!=typeof t&&(t=c(t)),e?t?e+": "+t:e:t};Error.prototype.toString=Ft}if(R){var Dt=function(e,t){if(ee(e,t)){var n=Object.getOwnPropertyDescriptor(e,t);n.configurable&&(n.enumerable=!1,Object.defineProperty(e,t,n))}};Dt(Error.prototype,"message"),""!==Error.prototype.message&&(Error.prototype.message=""),Dt(Error.prototype,"name")}if("/a/gim"!==String(/a/gim)){var Rt=function(){var e="/"+this.source+"/";return this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),e};RegExp.prototype.toString=Rt}})},function(e,t,n){function r(e,t,n){if(!s(t))throw new TypeError("iterator must be a function");arguments.length<3&&(n=this),"[object Array]"===c.call(e)?o(e,t,n):"string"==typeof e?i(e,t,n):a(e,t,n)}function o(e,t,n){for(var r=0,o=e.length;r<o;r++)u.call(e,r)&&t.call(n,e[r],r,e)}function i(e,t,n){for(var r=0,o=e.length;r<o;r++)t.call(n,e.charAt(r),r,e)}function a(e,t,n){for(var r in e)u.call(e,r)&&t.call(n,e[r],r,e)}var s=n(135);e.exports=r;var c=Object.prototype.toString,u=Object.prototype.hasOwnProperty},function(e,t){(function(t){var n;n="undefined"!=typeof window?window:"undefined"!=typeof t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(t,function(){return this}())},function(e,t,n){var r;(function(e,o){(function(){function i(e,t){function n(e){if(n[e]!==y)return n[e];var i;if("bug-string-char-index"==e)i="a"!="a"[0];else if("json"==e)i=n("json-stringify")&&n("json-parse");else{var a,s='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var u=t.stringify,l="function"==typeof u&&b;if(l){(a=function(){return 1}).toJSON=a;try{l="0"===u(0)&&"0"===u(new r)&&'""'==u(new o)&&u(v)===y&&u(y)===y&&u()===y&&"1"===u(a)&&"[1]"==u([a])&&"[null]"==u([y])&&"null"==u(null)&&"[null,null,null]"==u([y,v,null])&&u({a:[a,!0,!1,null,"\0\b\n\f\r\t"]})==s&&"1"===u(null,a)&&"[\n 1,\n 2\n]"==u([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==u(new c(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==u(new c(864e13))&&'"-000001-01-01T00:00:00.000Z"'==u(new c(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==u(new c(-1))}catch(p){l=!1}}i=l}if("json-parse"==e){var f=t.parse;if("function"==typeof f)try{if(0===f("0")&&!f(!1)){a=f(s);var d=5==a.a.length&&1===a.a[0];if(d){try{d=!f('"\t"')}catch(p){}if(d)try{d=1!==f("01")}catch(p){}if(d)try{d=1!==f("1.")}catch(p){}}}}catch(p){d=!1}i=d}}return n[e]=!!i}e||(e=u.Object()),t||(t=u.Object());var r=e.Number||u.Number,o=e.String||u.String,a=e.Object||u.Object,c=e.Date||u.Date,l=e.SyntaxError||u.SyntaxError,p=e.TypeError||u.TypeError,f=e.Math||u.Math,d=e.JSON||u.JSON;"object"==typeof d&&d&&(t.stringify=d.stringify,t.parse=d.parse);var m,h,y,g=a.prototype,v=g.toString,b=new c(-0xc782b5b800cec);try{b=b.getUTCFullYear()==-109252&&0===b.getUTCMonth()&&1===b.getUTCDate()&&10==b.getUTCHours()&&37==b.getUTCMinutes()&&6==b.getUTCSeconds()&&708==b.getUTCMilliseconds()}catch(w){}if(!n("json")){var k="[object Function]",T="[object Date]",S="[object Number]",M="[object String]",_="[object Array]",x="[object Boolean]",O=n("bug-string-char-index");if(!b)var C=f.floor,E=[0,31,59,90,120,151,181,212,243,273,304,334],P=function(e,t){return E[t]+365*(e-1970)+C((e-1969+(t=+(t>1)))/4)-C((e-1901+t)/100)+C((e-1601+t)/400)};if((m=g.hasOwnProperty)||(m=function(e){var t,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=v?m=function(e){var t=this.__proto__,n=e in(this.__proto__=null,this);return this.__proto__=t,n}:(t=n.constructor,m=function(e){var n=(this.constructor||t).prototype;return e in this&&!(e in n&&this[e]===n[e])}),n=null,m.call(this,e)}),h=function(e,t){var n,r,o,i=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,r=new n;for(o in r)m.call(r,o)&&i++;return n=r=null,i?h=2==i?function(e,t){var n,r={},o=v.call(e)==k;for(n in e)o&&"prototype"==n||m.call(r,n)||!(r[n]=1)||!m.call(e,n)||t(n)}:function(e,t){var n,r,o=v.call(e)==k;for(n in e)o&&"prototype"==n||!m.call(e,n)||(r="constructor"===n)||t(n);(r||m.call(e,n="constructor"))&&t(n)}:(r=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],h=function(e,t){var n,o,i=v.call(e)==k,a=!i&&"function"!=typeof e.constructor&&s[typeof e.hasOwnProperty]&&e.hasOwnProperty||m;for(n in e)i&&"prototype"==n||!a.call(e,n)||t(n);for(o=r.length;n=r[--o];a.call(e,n)&&t(n));}),h(e,t)},!n("json-stringify")){var I={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},A="000000",j=function(e,t){return(A+(t||0)).slice(-e)},N="\\u00",F=function(e){for(var t='"',n=0,r=e.length,o=!O||r>10,i=o&&(O?e.split(""):e);n<r;n++){var a=e.charCodeAt(n);switch(a){case 8:case 9:case 10:case 12:case 13:case 34:case 92:t+=I[a];break;default:if(a<32){t+=N+j(2,a.toString(16));break}t+=o?i[n]:e.charAt(n)}}return t+'"'},D=function(e,t,n,r,o,i,a){var s,c,u,l,f,d,g,b,w,k,O,E,I,A,N,R;try{s=t[e]}catch(L){}if("object"==typeof s&&s)if(c=v.call(s),c!=T||m.call(s,"toJSON"))"function"==typeof s.toJSON&&(c!=S&&c!=M&&c!=_||m.call(s,"toJSON"))&&(s=s.toJSON(e));else if(s>-1/0&&s<1/0){if(P){for(f=C(s/864e5),u=C(f/365.2425)+1970-1;P(u+1,0)<=f;u++);for(l=C((f-P(u,0))/30.42);P(u,l+1)<=f;l++);f=1+f-P(u,l),d=(s%864e5+864e5)%864e5,g=C(d/36e5)%24,b=C(d/6e4)%60,w=C(d/1e3)%60,k=d%1e3}else u=s.getUTCFullYear(),l=s.getUTCMonth(),f=s.getUTCDate(),g=s.getUTCHours(),b=s.getUTCMinutes(),w=s.getUTCSeconds(),k=s.getUTCMilliseconds();s=(u<=0||u>=1e4?(u<0?"-":"+")+j(6,u<0?-u:u):j(4,u))+"-"+j(2,l+1)+"-"+j(2,f)+"T"+j(2,g)+":"+j(2,b)+":"+j(2,w)+"."+j(3,k)+"Z"}else s=null;if(n&&(s=n.call(t,e,s)),null===s)return"null";if(c=v.call(s),c==x)return""+s;if(c==S)return s>-1/0&&s<1/0?""+s:"null";if(c==M)return F(""+s);if("object"==typeof s){for(A=a.length;A--;)if(a[A]===s)throw p();if(a.push(s),O=[],N=i,i+=o,c==_){for(I=0,A=s.length;I<A;I++)E=D(I,s,n,r,o,i,a),O.push(E===y?"null":E);R=O.length?o?"[\n"+i+O.join(",\n"+i)+"\n"+N+"]":"["+O.join(",")+"]":"[]"}else h(r||s,function(e){var t=D(e,s,n,r,o,i,a);t!==y&&O.push(F(e)+":"+(o?" ":"")+t)}),R=O.length?o?"{\n"+i+O.join(",\n"+i)+"\n"+N+"}":"{"+O.join(",")+"}":"{}";return a.pop(),R}};t.stringify=function(e,t,n){var r,o,i,a;if(s[typeof t]&&t)if((a=v.call(t))==k)o=t;else if(a==_){i={};for(var c,u=0,l=t.length;u<l;c=t[u++],a=v.call(c),(a==M||a==S)&&(i[c]=1));}if(n)if((a=v.call(n))==S){if((n-=n%1)>0)for(r="",n>10&&(n=10);r.length<n;r+=" ");}else a==M&&(r=n.length<=10?n:n.slice(0,10));return D("",(c={},c[""]=e,c),o,i,r,"",[])}}if(!n("json-parse")){var R,L,U=o.fromCharCode,B={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"},q=function(){throw R=L=null,l()},W=function(){for(var e,t,n,r,o,i=L,a=i.length;R<a;)switch(o=i.charCodeAt(R)){case 9:case 10:case 13:case 32:R++;break;case 123:case 125:case 91:case 93:case 58:case 44:return e=O?i.charAt(R):i[R],R++,e;case 34:for(e="@",R++;R<a;)if(o=i.charCodeAt(R),o<32)q();else if(92==o)switch(o=i.charCodeAt(++R)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:e+=B[o],R++;break;case 117:for(t=++R,n=R+4;R<n;R++)o=i.charCodeAt(R),o>=48&&o<=57||o>=97&&o<=102||o>=65&&o<=70||q();e+=U("0x"+i.slice(t,R));break;default:q()}else{if(34==o)break;for(o=i.charCodeAt(R),t=R;o>=32&&92!=o&&34!=o;)o=i.charCodeAt(++R);e+=i.slice(t,R)}if(34==i.charCodeAt(R))return R++,e;q();default:if(t=R,45==o&&(r=!0,o=i.charCodeAt(++R)),o>=48&&o<=57){for(48==o&&(o=i.charCodeAt(R+1),o>=48&&o<=57)&&q(),r=!1;R<a&&(o=i.charCodeAt(R),o>=48&&o<=57);R++);if(46==i.charCodeAt(R)){for(n=++R;n<a&&(o=i.charCodeAt(n),o>=48&&o<=57);n++);n==R&&q(),R=n}if(o=i.charCodeAt(R),101==o||69==o){for(o=i.charCodeAt(++R),43!=o&&45!=o||R++,n=R;n<a&&(o=i.charCodeAt(n),o>=48&&o<=57);n++);n==R&&q(),R=n}return+i.slice(t,R)}if(r&&q(),"true"==i.slice(R,R+4))return R+=4,!0;if("false"==i.slice(R,R+5))return R+=5,!1;if("null"==i.slice(R,R+4))return R+=4,null;q()}return"$"},H=function(e){var t,n;if("$"==e&&q(),"string"==typeof e){if("@"==(O?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];e=W(),"]"!=e;n||(n=!0))n&&(","==e?(e=W(),"]"==e&&q()):q()),","==e&&q(),t.push(H(e));return t}if("{"==e){for(t={};e=W(),"}"!=e;n||(n=!0))n&&(","==e?(e=W(),"}"==e&&q()):q()),","!=e&&"string"==typeof e&&"@"==(O?e.charAt(0):e[0])&&":"==W()||q(),t[e.slice(1)]=H(W());return t}q()}return e},$=function(e,t,n){var r=X(e,t,n);r===y?delete e[t]:e[t]=r},X=function(e,t,n){var r,o=e[t];if("object"==typeof o&&o)if(v.call(o)==_)for(r=o.length;r--;)$(o,r,n);else h(o,function(e){$(o,e,n)});return n.call(e,t,o)};t.parse=function(e,t){var n,r;return R=0,L=""+e,n=H(W()),"$"!=W()&&q(),R=L=null,t&&v.call(t)==k?X((r={},r[""]=n,r),"",t):n}}}return t.runInContext=i,t}var a=n(202),s={"function":!0,object:!0},c=s[typeof t]&&t&&!t.nodeType&&t,u=s[typeof window]&&window||this,l=c&&s[typeof e]&&e&&!e.nodeType&&"object"==typeof o&&o;if(!l||l.global!==l&&l.window!==l&&l.self!==l||(u=l),c&&!a)i(u,c);else{var p=u.JSON,f=u.JSON3,d=!1,m=i(u,u.JSON3={noConflict:function(){return d||(d=!0,u.JSON=p,u.JSON3=f,p=f=null),m}});u.JSON={parse:m.parse,stringify:m.stringify}}a&&(r=function(){return m}.call(t,n,t,e),!(void 0!==r&&(e.exports=r)))}).call(this)}).call(t,n(63)(e),function(){return this}())},function(e,t,n){var r=n(197),o=n(191),i=function(e){return"[object Array]"===Object.prototype.toString.call(e)};e.exports=function(e){if(!e)return{};var t={};return o(r(e).split("\n"),function(e){var n=e.indexOf(":"),o=r(e.slice(0,n)).toLowerCase(),a=r(e.slice(n+1));"undefined"==typeof t[o]?t[o]=a:i(t[o])?t[o].push(a):t[o]=[t[o],a]}),t}},,,function(e,t){function n(e){return e.replace(/^\s*|\s*$/g,"")}t=e.exports=n,t.left=function(e){return e.replace(/^\s*/,"")},t.right=function(e){return e.replace(/\s*$/,"")}},function(e,t,n){var r;!function(t){"use strict";function o(){}function i(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function a(e){return function(){return this[e].apply(this,arguments)}}function s(e){return"function"==typeof e||e instanceof RegExp||!(!e||"object"!=typeof e)&&s(e.listener)}var c=o.prototype,u=t.EventEmitter;c.getListeners=function(e){var t,n,r=this._getEvents();if(e instanceof RegExp){t={};for(n in r)r.hasOwnProperty(n)&&e.test(n)&&(t[n]=r[n])}else t=r[e]||(r[e]=[]);return t},c.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},c.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},c.addListener=function(e,t){if(!s(t))throw new TypeError("listener must be a function");var n,r=this.getListenersAsObject(e),o="object"==typeof t;for(n in r)r.hasOwnProperty(n)&&i(r[n],t)===-1&&r[n].push(o?t:{listener:t,once:!1});return this},c.on=a("addListener"),c.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},c.once=a("addOnceListener"),c.defineEvent=function(e){return this.getListeners(e),this},c.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},c.removeListener=function(e,t){var n,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&(n=i(o[r],t),n!==-1&&o[r].splice(n,1));return this},c.off=a("removeListener"),c.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},c.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},c.manipulateListeners=function(e,t,n){var r,o,i=e?this.removeListener:this.addListener,a=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(r=n.length;r--;)i.call(this,t,n[r]);else for(r in t)t.hasOwnProperty(r)&&(o=t[r])&&("function"==typeof o?i.call(this,r,o):a.call(this,r,o));return this},c.removeEvent=function(e){var t,n=typeof e,r=this._getEvents();if("string"===n)delete r[e];else if(e instanceof RegExp)for(t in r)r.hasOwnProperty(t)&&e.test(t)&&delete r[t];else delete this._events;return this},c.removeAllListeners=a("removeEvent"),c.emitEvent=function(e,t){var n,r,o,i,a,s=this.getListenersAsObject(e);for(i in s)if(s.hasOwnProperty(i))for(n=s[i].slice(0),o=0;o<n.length;o++)r=n[o],r.once===!0&&this.removeListener(e,r.listener),a=r.listener.apply(this,t||[]),a===this._getOnceReturnValue()&&this.removeListener(e,r.listener);return this},c.trigger=a("emitEvent"),c.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},c.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},c._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},c._getEvents=function(){return this._events||(this._events={})},o.noConflict=function(){return t.EventEmitter=u,o},r=function(){return o}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}(this||{})},function(e,t,n){var r,o,i;!function(n,a){"use strict";o=[],r=a,i="function"==typeof r?r.apply(t,o):r,!(void 0!==i&&(e.exports=i))}(this,function(e){"use strict";return function(t){function n(){t.arrayAccessForm=t.arrayAccessForm||"none",t.emptyNodeForm=t.emptyNodeForm||"text",t.attributeConverters=t.attributeConverters||[],t.datetimeAccessFormPaths=t.datetimeAccessFormPaths||[],t.arrayAccessFormPaths=t.arrayAccessFormPaths||[],void 0===t.enableToStringFunc&&(t.enableToStringFunc=!0),void 0===t.skipEmptyTextNodesForObj&&(t.skipEmptyTextNodesForObj=!0),void 0===t.stripWhitespaces&&(t.stripWhitespaces=!0),void 0===t.useDoubleQuotes&&(t.useDoubleQuotes=!0),void 0===t.ignoreRoot&&(t.ignoreRoot=!1),void 0===t.escapeMode&&(t.escapeMode=!0),void 0===t.attributePrefix&&(t.attributePrefix="_"),void 0===t.selfClosingElements&&(t.selfClosingElements=!0),void 0===t.keepCData&&(t.keepCData=!1)}function r(){function e(e){var t=String(e);return 1===t.length&&(t="0"+t),t}"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|^\n+|(\s|\n)+$/g,"")}),"function"!=typeof Date.prototype.toISOString&&(Date.prototype.toISOString=function(){var t=1e3;return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/t).toFixed(3)).slice(2,5)+"Z"})}function o(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!==t||(t=e.nodeName),t}function i(e){return e.prefix}function a(e){return"string"==typeof e?e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):e}function s(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&")}function c(e,n,r){switch(t.arrayAccessForm){case"property":e[n]instanceof Array?e[n+"_asArray"]=e[n]:e[n+"_asArray"]=[e[n]]}if(!(e[n]instanceof Array)&&t.arrayAccessFormPaths.length>0){for(var o=!1,i=0;i<t.arrayAccessFormPaths.length;i++){var a=t.arrayAccessFormPaths[i];if("string"==typeof a){if(a===r){o=!0;break}}else if(a instanceof RegExp){if(a.test(r)){o=!0;break}}else if("function"==typeof a&&a(n,r)){o=!0;break}}o&&(e[n]=[e[n]])}}function u(e){var t=60,n=e.split(/[-T:+Z]/g),r=new Date(n[0],n[1]-1,n[2]),o=n[5].split(".");if(r.setHours(n[3],n[4],o[0]),o.length>1&&r.setMilliseconds(o[1]),n[6]&&n[7]){var i=n[6]*t+Number(n[7]),a=/\d\d-\d\d:\d\d$/.test(e)?"-":"+";i=0+("-"===a?-1*i:i),r.setMinutes(r.getMinutes()-i-r.getTimezoneOffset())}else e.indexOf("Z",e.length-1)!==-1&&(r=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds())));return r}function l(e,n,r){if(t.datetimeAccessFormPaths.length>0)for(var o=r.split(".#")[0],i=0;i<t.datetimeAccessFormPaths.length;i++){var a=t.datetimeAccessFormPaths[i];if("string"==typeof a){if(a===o)return u(e)}else if(a instanceof RegExp){if(a.test(o))return u(e)}else if("function"==typeof a&&a(o))return u(e)}return e}function p(e){for(var n={},r=e.childNodes,i=0;i<r.length;i++){var a=r.item(i);if(a.nodeType===O.ELEMENT_NODE){var s=o(a);t.ignoreRoot?n=d(a,s):n[s]=d(a,s)}}return n}function f(e,n){var r={};r.__cnt=0;for(var a=e.childNodes,u=0;u<a.length;u++){var p=a.item(u),f=o(p);p.nodeType!==O.COMMENT_NODE&&(r.__cnt++,null==r[f]?(r[f]=d(p,n+"."+f),c(r,f,n+"."+f)):(r[f]instanceof Array||(r[f]=[r[f]],c(r,f,n+"."+f)),r[f][r[f].length]=d(p,n+"."+f)))}for(var m=0;m<e.attributes.length;m++){var h=e.attributes.item(m);r.__cnt++;for(var y=h.value,g=0;g<t.attributeConverters.length;g++){var v=t.attributeConverters[g];v.test.call(null,h.name,h.value)&&(y=v.convert.call(null,h.name,h.value))}r[t.attributePrefix+h.name]=y}var b=i(e);return b&&(r.__cnt++,r.__prefix=b),r["#text"]&&(r.__text=r["#text"],r.__text instanceof Array&&(r.__text=r.__text.join("\n")),t.escapeMode&&(r.__text=s(r.__text)),t.stripWhitespaces&&(r.__text=r.__text.trim()),delete r["#text"],"property"===t.arrayAccessForm&&delete r["#text_asArray"],r.__text=l(r.__text,"#text",n+".#text")),r.hasOwnProperty("#cdata-section")&&(r.__cdata=r["#cdata-section"],delete r["#cdata-section"],"property"===t.arrayAccessForm&&delete r["#cdata-section_asArray"]),1===r.__cnt&&r.__text?r=r.__text:0===r.__cnt&&"text"===t.emptyNodeForm?r="":r.__cnt>1&&void 0!==r.__text&&t.skipEmptyTextNodesForObj&&(t.stripWhitespaces&&""===r.__text||""===r.__text.trim())&&delete r.__text,delete r.__cnt,t.keepCData||r.hasOwnProperty("__text")||!r.hasOwnProperty("__cdata")?(t.enableToStringFunc&&(r.__text||r.__cdata)&&(r.toString=function(){return(this.__text?this.__text:"")+(this.__cdata?this.__cdata:"")}),r):r.__cdata?r.__cdata:""}function d(e,t){return e.nodeType===O.DOCUMENT_NODE?p(e):e.nodeType===O.ELEMENT_NODE?f(e,t):e.nodeType===O.TEXT_NODE||e.nodeType===O.CDATA_SECTION_NODE?e.nodeValue:null}function m(e,n,r,o){var i="<"+(e&&e.__prefix?e.__prefix+":":"")+n;if(r)for(var s=0;s<r.length;s++){var c=r[s],u=e[c];t.escapeMode&&(u=a(u)),i+=" "+c.substr(t.attributePrefix.length)+"=",i+=t.useDoubleQuotes?'"'+u+'"':"'"+u+"'"}return i+=o?" />":">"}function h(e,t){return"</"+(e&&e.__prefix?e.__prefix+":":"")+t+">"}function y(e,t){return e.indexOf(t,e.length-t.length)!==-1}function g(e,n){return!!("property"===t.arrayAccessForm&&y(n.toString(),"_asArray")||0===n.toString().indexOf(t.attributePrefix)||0===n.toString().indexOf("__")||e[n]instanceof Function)}function v(e){var t=0;if(e instanceof Object)for(var n in e)g(e,n)||t++;return t}function b(e){var n=[];if(e instanceof Object)for(var r in e)r.toString().indexOf("__")===-1&&0===r.toString().indexOf(t.attributePrefix)&&n.push(r);return n}function w(e){var n="";return e.__cdata&&(n+="<![CDATA["+e.__cdata+"]]>"),e.__text&&(n+=t.escapeMode?a(e.__text):e.__text),n}function k(e){var n="";return e instanceof Object?n+=w(e):null!==e&&(n+=t.escapeMode?a(e):e),n}function T(e,t,n){var r="";if(0===e.length)r+=m(e,t,n,!0);else for(var o=0;o<e.length;o++)r+=S(e[o],t,b(e[o]));return r}function S(e,n,r){var o="";if(void 0!==e&&null!==e&&""!==e||!t.selfClosingElements)if("object"==typeof e)if("[object Array]"===Object.prototype.toString.call(e))o+=T(e,n,r);else if(e instanceof Date)o+=m(e,n,r,!1),o+=e.toISOString(),o+=h(e,n);else{var i=v(e);i>0||e.__text||e.__cdata?(o+=m(e,n,r,!1),o+=M(e),o+=h(e,n)):t.selfClosingElements?o+=m(e,n,r,!0):(o+=m(e,n,r,!1),o+=h(e,n))}else o+=m(e,n,r,!1),o+=k(e),o+=h(e,n);else o+=m(e,n,r,!0);return o}function M(e){var t="",n=v(e);if(n>0)for(var r in e)if(!g(e,r)){var o=e[r],i=b(o);t+=S(o,r,i)}return t+=k(e)}function _(t){if(void 0===t)return null;if("string"!=typeof t)return null;var n=null,r=null;if(e)n=new e,r=n.parseFromString(t,"text/xml");else if(window&&window.DOMParser){n=new window.DOMParser;var o=null,i=window.ActiveXObject||"ActiveXObject"in window;if(!i)try{o=n.parseFromString("INVALID","text/xml").childNodes[0].namespaceURI}catch(a){o=null}try{r=n.parseFromString(t,"text/xml"),null!==o&&r.getElementsByTagNameNS(o,"parsererror").length>0&&(r=null)}catch(a){r=null}}else 0===t.indexOf("<?")&&(t=t.substr(t.indexOf("?>")+2)),r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(t);return r}var x="3.1.1";t=t||{},n(),r();var O={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};this.asArray=function(e){return void 0===e||null===e?[]:e instanceof Array?e:[e]},this.toXmlDateTime=function(e){return e instanceof Date?e.toISOString():"number"==typeof e?new Date(e).toISOString():null},this.asDateTime=function(e){return"string"==typeof e?u(e):e},this.xml2dom=function(e){return _(e)},this.dom2js=function(e){return d(e,null)},this.js2dom=function(e){var t=this.js2xml(e);return _(t)},this.xml2js=function(e){var t=_(e);return null!=t?this.dom2js(t):null},this.js2xml=function(e){return M(e)},this.getVersion=function(){return x}}})},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<e.length;n++)t(e[n])}function o(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function i(e,t,n){var r=e;return p(t)?(n=t,"string"==typeof e&&(r={uri:e})):r=d(t,{uri:e}),r.callback=n,r}function a(e,t,n){return t=i(e,t,n),s(t)}function s(e){function t(){4===l.readyState&&setTimeout(i,0)}function n(){var e=void 0;if(e=l.response?l.response:l.responseText||c(l),w)try{e=JSON.parse(e)}catch(t){}return e}function r(e){return clearTimeout(m),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,u(e,k)}function i(){if(!d){var t;clearTimeout(m),t=e.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var r=k,o=null;return 0!==t?(r={body:n(),statusCode:t,method:y,headers:{},url:h,rawRequest:l},l.getAllResponseHeaders&&(r.headers=f(l.getAllResponseHeaders()))):o=new Error("Internal XMLHttpRequest Error"),u(o,r,r.body)}}if("undefined"==typeof e.callback)throw new Error("callback argument missing");var s=!1,u=function(t,n,r){s||(s=!0,e.callback(t,n,r))},l=e.xhr||null;l||(l=e.cors||e.useXDR?new a.XDomainRequest:new a.XMLHttpRequest);var p,d,m,h=l.url=e.uri||e.url,y=l.method=e.method||"GET",g=e.body||e.data,v=l.headers=e.headers||{},b=!!e.sync,w=!1,k={body:void 0,headers:{},statusCode:0,method:y,url:h,rawRequest:l};if("json"in e&&e.json!==!1&&(w=!0,v.accept||v.Accept||(v.Accept="application/json"),"GET"!==y&&"HEAD"!==y&&(v["content-type"]||v["Content-Type"]||(v["Content-Type"]="application/json"),g=JSON.stringify(e.json===!0?g:e.json))),l.onreadystatechange=t,l.onload=i,l.onerror=r,l.onprogress=function(){},l.onabort=function(){d=!0},l.ontimeout=r,l.open(y,h,!b,e.username,e.password),b||(l.withCredentials=!!e.withCredentials),!b&&e.timeout>0&&(m=setTimeout(function(){if(!d){d=!0,l.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",r(e)}},e.timeout)),l.setRequestHeader)for(p in v)v.hasOwnProperty(p)&&l.setRequestHeader(p,v[p]);else if(e.headers&&!o(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(l.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(l),l.send(g||null),l}function c(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(n){}return null}function u(){}var l=n(192),p=n(135),f=n(194),d=n(201);e.exports=a,a.XMLHttpRequest=l.XMLHttpRequest||u,a.XDomainRequest="withCredentials"in new a.XMLHttpRequest?a.XMLHttpRequest:l.XDomainRequest,r(["get","put","post","patch","head","delete"],function(e){a["delete"===e?"del":e]=function(t,n,r){return n=i(t,n,r),n.method=e.toUpperCase(),s(n)}})},function(e,t){function n(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var o in n)r.call(n,o)&&(e[o]=n[o])}return e}e.exports=n;var r=Object.prototype.hasOwnProperty},function(e,t){(function(t){e.exports=t}).call(t,{})},,,,function(e,t,n){"use strict";var r=n(109),o=n(139);o(r),e.exports=r},,function(e,t,n){"use strict";var r=n(1),o=r.undef,i=r.verifyOptions,a=r.verifyParamType,s=n(140),c=n(109).fn;c.updateMyChatroomMemberInfo=function(e){i(e,"member needNotify","member::updateMyChatroomMemberInfo"),a("needNotify",e.needNotify,"boolean","member::updateMyChatroomMemberInfo"),e.needSave=e.needSave||!1,a("needSave",e.needSave,"boolean","member::updateMyChatroomMemberInfo"),this.processCustom(e),this.processCallback(e),e.chatroomMember=new s(e.member),this.sendCmd("updateMyChatroomMemberInfo",e)},c.getChatroomMembers=function(e){var t=this;i(e,"guest","member::getChatroomMembers"),a("guest",e.guest,"boolean","member::getChatroomMembers"),o(e.time)?e.time=0:a("time",e.time,"number","member::getChatroomMembers"),o(e.limit)?e.limit=100:a("limit",e.limit,"number","member::getChatroomMembers"),t.processCallback(e),e.type=e.guest?1:0,!e.guest&&e.onlyOnline&&(e.type=2),t.sendCmd("getChatroomMembers",e)},c.getChatroomMembersInfo=function(e){var t=this;i(e,"accounts","member::getChatroomMembersInfo"),a("accounts",e.accounts,"array","member::getChatroomMembersInfo"),t.processCallback(e),t.sendCmd("getChatroomMembersInfo",e)},c.markChatroomManager=function(e){e.type=1,this.markChatroomMember(e)},c.markChatroomCommonMember=function(e){e.type=2,this.markChatroomMember(e)},c.markChatroomBlacklist=function(e){e.type=-1,this.markChatroomMember(e)},c.markChatroomGaglist=function(e){e.type=-2,this.markChatroomMember(e)},c.markChatroomMember=function(e){i(e,"account type isAdd","member::markChatroomMember"),a("isAdd",e.isAdd,"boolean","member::markChatroomMember"),o(e.level)?e.level=0:a("level",e.level,"number","member::markChatroomMember");var t=this;t.processCustom(e),t.processCallback(e),t.sendCmd("markChatroomMember",e)},c.kickChatroomMember=function(e){var t=this;i(e,"account","member::kickChatroomMember"),t.processCustom(e),t.processCallback(e),t.sendCmd("kickChatroomMember",e)},c.updateChatroomMemberTempMute=function(e){var t=this;i(e,"account duration needNotify","member::updateChatroomMemberTempMute"),a("duration",e.duration,"number","member::updateChatroomMemberTempMute"),a("needNotify",e.needNotify,"boolean","member::updateChatroomMemberTempMute"),t.processCustom(e),t.processCallback(e),t.sendCmd("updateChatroomMemberTempMute",e)},c.getRobotList=function(e){var t=this;o(e.timetag)&&(e.timetag=0),t.processCallback(e),t.sendCmd("syncRobot",e)}},function(e,t,n){"use strict";var r=n(1),o=r.undef,i=n(109).fn;i.beforeSendMsg=function(e){e.cmd="sendMsg"};var a={text:0,image:1,audio:2,video:3,geo:4,notification:5,file:6,tip:10,robot:11,custom:100};i.getHistoryMsgs=function(e){r.verifyOptions(e),o(e.timetag)?e.timetag=0:r.verifyParamType("timetag",e.timetag,"number","msg::getHistoryMsgs"),o(e.limit)?e.limit=100:r.verifyParamType("limit",e.limit,"number","msg::getHistoryMsgs"),o(e.reverse)?e.reverse=!1:r.verifyParamType("reverse",e.reverse,"boolean","msg::getHistoryMsgs"),o(e.msgTypes)?e.msgTypes=[]:Array.isArray(e.msgTypes)?(e.msgTypes=e.msgTypes.map(function(e){return a[e]}),e.msgTypes=e.msgTypes.filter(function(e){return"number"==typeof e})):"number"==typeof a[e.msgTypes]?e.msgTypes=[a[e.msgTypes]]:e.msgTypes=[];var t=this;t.processCallback(e),t.sendCmd("getHistoryMsgs",e,function(t,n,r){Array.isArray(r)&&(r=r.map(function(e){return a[e.type]&&(e.type=a[e.type]),e})),e.callback(t,n,r)})}},function(e,t,n){"use strict";var r=n(109).fn,o=n(1);r.queueOffer=function(e){o.verifyOptions(e,"elementKey elementValue","msg::queueOffer"),e["transient"]?e["transient"]=!0:e["transient"]=!1,this.processCallback(e),this.sendCmd("queueOffer",e,e.callback)},r.queuePoll=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.elementKey=e.elementKey||"",this.processCallback(e),this.sendCmd("queuePoll",e,e.callback)},r.queueList=function(e){
this.processCallback(e),this.sendCmd("queueList",e,e.callback)},r.peak=function(e){this.processCallback(e),this.sendCmd("peak",e,e.callback)},r.queueDrop=function(e){this.processCallback(e),this.sendCmd("queueDrop",e,e.callback)}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function r(){}var o=n(110),i=n(1);r.prototype=Object.create(o.prototype),r.verifyFile=function(e,t){i.verifyOptions(e,"dur",!0,"file.",t)},e.exports=r},function(e,t,n){"use strict";function r(e){i.verifyOptions(e,"content","msg::CustomMessage"),e.type="custom",o.call(this,e),"string"!=typeof e.content&&(e.content=JSON.stringify(e.content)),this.attach=e.content}var o=n(65),i=n(1);r.prototype=Object.create(o.prototype),r.reverse=function(e){var t=o.reverse(e);return t.content=e.attach,t},e.exports=r},function(e,t,n){"use strict";function r(e){e.type="geo",i.verifyOptions(e,"geo","msg::GeoMessage"),i.verifyOptions(e.geo,"lng lat title",!0,"geo.","msg::GeoMessage"),i.verifyParamType("geo.lng",e.geo.lng,"number","msg::GeoMessage"),i.verifyParamType("geo.lat",e.geo.lat,"number","msg::GeoMessage"),i.verifyParamType("geo.title",e.geo.title,"string","msg::GeoMessage"),o.call(this,e),this.attach=JSON.stringify(e.geo)}var o=n(65),i=n(1);r.prototype=Object.create(o.prototype),r.reverse=function(e){var t=o.reverse(e);return e.attach=e.attach?""+e.attach:"",t.geo=e.attach?JSON.parse(e.attach):{},t},e.exports=r},function(e,t,n){"use strict";function r(){}var o=n(1),i=n(110);r.prototype=Object.create(i.prototype),r.verifyFile=function(e,t){o.verifyOptions(e,"w h",!0,"file.",t)},e.exports=r},function(e,t,n){"use strict";var r=n(1),o=function(e){this.account=e.account},i=o.prototype,a=i.Message=n(65),s=i.TextMessage=n(247),c=i.FileMessage=n(110),u=i.GeoMessage=n(242),l=i.NotificationMessage=n(245),p=i.CustomMessage=n(241),f=i.TipMessage=n(248),d=i.RobotMessage=n(246);i.validTypes=a.validTypes,i.reverse=function(e){var t,n=a.getType(e);switch(n){case"text":t=s.reverse(e);break;case"image":case"audio":case"video":case"file":e.enabledHttpsForMessage=this.enabledHttpsForMessage,t=c.reverse(e);break;case"geo":t=u.reverse(e);break;case"notification":t=l.reverse(e);break;case"custom":t=p.reverse(e);break;case"tip":t=f.reverse(e);break;case"robot":t=d.reverse(e);break;default:t=a.reverse(e)}return a.setExtra(t,this.account),t},i.reverseMsgs=function(e,t){var n,o,i=this;return e.map(function(e){return e=i.reverse(e),t&&(n=t.modifyObj,n&&(e=r.merge(e,n)),o=t.mapper,r.isFunction(o)&&(e=o(e))),e})},e.exports=o},function(e,t,n){"use strict";function r(){}var o=n(1),i=o.notundef,a=n(65),s={301:"memberEnter",302:"memberExit",303:"blackMember",304:"unblackMember",305:"gagMember",306:"ungagMember",307:"addManager",308:"removeManager",309:"addCommon",310:"removeCommon",311:"closeChatroom",312:"updateChatroom",313:"kickMember",314:"addTempMute",315:"removeTempMute",316:"updateMemberInfo",317:"updateQueue",318:"muteRoom",319:"unmuteRoom",320:"batchUpdateQueue"};r.prototype=Object.create(a.prototype),r.reverse=function(e){var t=a.reverse(e);if(e.attach=e.attach?""+e.attach:"",e.attach){var n=JSON.parse(e.attach);if(t.attach={type:s[n.id]},i(n.data)){var r=n.data;if(i(r.operator)&&(t.attach.from=r.operator),i(r.opeNick)&&(t.attach.fromNick=r.opeNick),i(r.target)&&(t.attach.to=r.target),i(r.tarNick)&&(t.attach.toNick=r.tarNick),i(r.muteDuration)&&(t.attach.duration=parseInt(r.muteDuration,10)),"memberEnter"===t.attach.type&&(i(r.muted)?t.attach.gaged=1===+r.muted:t.attach.gaged=!1,i(r.tempMuted)?t.attach.tempMuted=1===+r.tempMuted:t.attach.tempMuted=!1,i(r.muteTtl)?t.attach.tempMuteDuration=+r.muteTtl:t.attach.tempMuteDuration=0),i(r.ext)&&(t.attach.custom=r.ext),i(r.queueChange)){var o=JSON.parse(r.queueChange);switch(o._e){case"OFFER":t.attach.queueChange={type:"OFFER",elementKey:o.key,elementValue:o.content};break;case"POLL":t.attach.queueChange={type:"POLL",elementKey:o.key,elementValue:o.content};break;case"DROP":t.attach.queueChange={type:"DROP"};break;case"PARTCLEAR":t.attach.queueChange={type:"PARTCLEAR",elementKv:o.kvObject}}}}}else t.attach={};return t},e.exports=r},function(e,t,n){"use strict";function r(e){i.verifyOptions(e,"content","msg::RobotMessage");var t=e.content;switch(t.type){case"welcome":i.undef(e.body)&&(this.body="欢迎消息");break;case"text":i.verifyOptions(t,"content","msg::RobotMessage"),i.undef(e.body)&&(this.body=t.content);break;case"link":i.verifyOptions(t,"target","msg::RobotMessage")}t.type&&(t.type=a[t.type]),t={param:t,robotAccid:e.robotAccid},this.attach=JSON.stringify(t),e.type="robot",o.call(this,e)}var o=n(65),i=n(1),a={welcome:"00",text:"01",link:"03"},s={"01":"text","02":"image","03":"answer",11:"template"};r.prototype=Object.create(o.prototype),r.reverse=function(e){var t=o.reverse(e);if("robot"===t.type){var n=JSON.parse(e.attach);if(n.param&&(n.param.type=s[n.param.type]||"unknown"),n.robotMsg){n=i.merge(n,n.robotMsg);var r=n.message;"bot"===n.flag?n.message=r.map(function(e){return e.type=s[e.type]||"unknown",e}):"faq"===n.flag,delete n.robotMsg}t.content=n}return t},e.exports=r},function(e,t,n){"use strict";function r(e){i.verifyOptions(e,"text","msg::TextMessage"),e.type="text",o.call(this,e),this.attach=e.text}var o=n(65),i=n(1);r.prototype=Object.create(o.prototype),r.reverse=function(e){var t=o.reverse(e);return t.text=e.attach,t},e.exports=r},function(e,t,n){"use strict";function r(e){i.verifyOptions(e,"tip","msg::TipMessage"),e.type="tip",o.call(this,e),this.attach=e.tip}var o=n(65),i=n(1);r.prototype=Object.create(o.prototype),r.reverse=function(e){var t=o.reverse(e);return t.tip=e.attach,t},e.exports=r},function(e,t,n){"use strict";function r(){}var o=n(110),i=n(1);r.prototype=Object.create(o.prototype),r.verifyFile=function(e,t){i.verifyOptions(e,"dur w h",!0,"file.",t)},e.exports=r},,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(104).fn,o=n(62),i=n(1);r.assembleLogin=function(){var e=this,t=e.options;e.sdkSession=e.genSessionKey();var n={appKey:t.appKey,account:t.account,deviceId:o.deviceId,chatroomId:t.chatroomId,session:e.sdkSession};return n=i.merge(n,i.filterObj(t,"chatroomNick chatroomAvatar chatroomCustom chatroomEnterCustom isAnonymous")),{type:1,login:n,imLogin:e.assembleIMLogin()}},r.afterLogin=function(e){var t=this,n=e.chatroom;t.chatroom=n,t.notifyLogin()},r.kickedReasons=["","chatroomClosed","managerKick","samePlatformKick","silentlyKick","blacked"],r.kickedMessages=["","聊天室关闭了","被房主或者管理员踢出","不允许同一个帐号在多个地方同时登录","悄悄被踢","被拉黑了"]},function(e,t,n){"use strict";var r=n(104).fn;r.refreshSocketUrl=function(){var e=this;e.socketUrls=e.socketUrlsBackup.slice(0),e.logger.info("link::refreshSocketUrl"),e.connectToUrl(e.getNextSocketUrl())}},function(e,t,n){"use strict";var r=n(104).fn,o=n(140);r.onChatroomMembersInfo=r.onChatroomMembers=function(e){e.error||(e.obj.members=o.reverseMembers(e.content.members))},r.onMarkChatroomMember=function(e){e.error||(e.obj.member=o.reverse(e.content.chatroomMember))},r.onSyncRobot=function(e){!e.error&&this.options.onrobots?this.options.onrobots(null,e.content):this.ontions.onrobots(e.error,{})}},function(e,t,n){"use strict";var r=n(104).fn,o=n(1);r.completeMsg=function(e){var t=this;e.chatroomId=t.chatroom.id,e.from=t.options.account,e.fromClientType="Web",e.time||(e.time=+new Date)},r.onMsg=function(e){var t=this,n=t.message.reverse(e.content.msg);t.checkMsgUnique(n)&&(t.msgBuffer.push(n),t.msgFlushTimer||t.startMsgFlushTimer())},r.startMsgFlushTimer=function(){var e=this,t=e.options;e.msgFlushTimer=setTimeout(function(){var n=e.msgBuffer.splice(0,t.msgBufferSize);e.options.onmsgs(n),e.msgBuffer.length?e.startMsgFlushTimer():delete e.msgFlushTimer},t.msgBufferInterval)},r.checkMsgUnique=o.genCheckUniqueFunc("idClient"),r.onSendMsg=function(e){var t=e.obj.msg;e.error?t.status="fail":(t=e.content.msg,t.status="success"),t=this.message.reverse(t),e.obj=t},r.onHistoryMsgs=function(e){e.error||(e.obj.msgs=this.message.reverseMsgs(e.content.msgs))}}])});