NIM_Web_WhiteBoard_v4.8.0.js
107.3 KB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.WhiteBoard=t():e.WhiteBoard=t()}(this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return e[i].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";function i(e){return e&&e.__esModule?e:{"default":e}}var o=n(98),r=i(o);n(138);var s=n(345),a=n(346),c=n(361),u=n(359),l=n(55),h=n(347),f=n(348),d=n(349),p=(0,r["default"])({},l.constantBB,{install:function(e,t){s.install(e,t),a.install(e,t),e.parser.mixin({configMap:h,serializeMap:f,unserializeMap:d})},getInstance:function(e){return new u(e)},destroy:function(e){e&&(e.destroy(),e=null)},checkCompatibility:function(){return c()}});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 i=n(35)("wks"),o=n(22),r=n(2).Symbol,s="function"==typeof r,a=e.exports=function(e){return i[e]||(i[e]=s&&r[e]||(s?r:o)("Symbol."+e))};a.store=i},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){(function(t,i){/*!
* @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 r(e){$=e}function s(e){X=e}function a(){return function(){return t.nextTick(f)}}function c(){return"undefined"!=typeof J?function(){J(f)}:h()}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 h(){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 J=e.runOnLoop||e.runOnContext,c()}catch(t){return h()}}function p(e,t){var n=arguments,i=this,o=new this.constructor(v);void 0===o[oe]&&k(o);var r=i._state;return r?!function(){var e=n[r-1];X(function(){return D(r,o,e,i._result)})}():x(i,o,e,t),o}function b(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(v);return S(n,e),n}function v(){}function y(){return new TypeError("You cannot resolve a promise with itself")}function g(){return new TypeError("A promises callback cannot return that same promise.")}function m(e){try{return e.then}catch(t){return ce.error=t,ce}}function _(e,t,n,i){try{e.call(t,n,i)}catch(o){return o}}function w(e,t,n){X(function(e){var i=!1,o=_(n,t,function(n){i||(i=!0,t!==n?S(e,n):E(e,n))},function(t){i||(i=!0,I(e,t))},"Settle: "+(e._label||" unknown promise"));!i&&o&&(i=!0,I(e,o))},e)}function C(e,t){t._state===se?E(e,t._result):t._state===ae?I(e,t._result):x(t,void 0,function(t){return S(e,t)},function(t){return I(e,t)})}function O(e,t,n){t.constructor===e.constructor&&n===p&&t.constructor.resolve===b?C(e,t):n===ce?I(e,ce.error):void 0===n?E(e,t):o(n)?w(e,t,n):E(e,t)}function S(t,n){t===n?I(t,y()):e(n)?O(t,n,m(n)):E(t,n)}function T(e){e._onerror&&e._onerror(e._result),A(e)}function E(e,t){e._state===re&&(e._result=t,e._state=se,0!==e._subscribers.length&&X(A,e))}function I(e,t){e._state===re&&(e._state=ae,e._result=t,X(T,e))}function x(e,t,n,i){var o=e._subscribers,r=o.length;e._onerror=null,o[r]=t,o[r+se]=n,o[r+ae]=i,0===r&&e._state&&X(A,e)}function A(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var i=void 0,o=void 0,r=e._result,s=0;s<t.length;s+=3)i=t[s],o=t[s+n],i?D(n,i,o,r):o(r);e._subscribers.length=0}}function M(){this.error=null}function P(e,t){try{return e(t)}catch(n){return ue.error=n,ue}}function D(e,t,n,i){var r=o(n),s=void 0,a=void 0,c=void 0,u=void 0;if(r){if(s=P(n,i),s===ue?(u=!0,a=s.error,s=null):c=!0,t===s)return void I(t,g())}else s=i,c=!0;t._state!==re||(r&&c?S(t,s):u?I(t,a):e===se?E(t,s):e===ae&&I(t,s))}function N(e,t){try{t(function(t){S(e,t)},function(t){I(e,t)})}catch(n){I(e,n)}}function j(){return le++}function k(e){e[oe]=le++,e._state=void 0,e._result=void 0,e._subscribers=[]}function L(e,t){this._instanceConstructor=e,this.promise=new e(v),this.promise[oe]||k(this.promise),z(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?E(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&E(this.promise,this._result))):I(this.promise,R())}function R(){return new Error("Array Methods must be provided an Array")}function U(e){return new L(this,e).promise}function W(e){var t=this;return new t(z(e)?function(n,i){for(var o=e.length,r=0;r<o;r++)t.resolve(e[r]).then(n,i)}:function(e,t){return t(new TypeError("You must pass an array to race."))})}function B(e){var t=this,n=new t(v);return I(n,e),n}function H(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function F(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function Y(e){this[oe]=j(),this._result=this._state=void 0,this._subscribers=[],v!==e&&("function"!=typeof e&&H(),this instanceof Y?N(this,e):F())}function V(){var e=void 0;if("undefined"!=typeof i)e=i;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=Y}var K=void 0;K=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var z=K,G=0,J=void 0,$=void 0,X=function(e,t){ne[G]=e,ne[G+1]=t,G+=2,2===G&&($?$(f):ie())},Q="undefined"!=typeof window?window:void 0,q=Q||{},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),ie=void 0;ie=ee?a():Z?u():te?l():void 0===Q?d():h();var oe=Math.random().toString(36).substring(16),re=void 0,se=1,ae=2,ce=new M,ue=new M,le=0;return L.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===re&&n<e;n++)this._eachEntry(t[n],n)},L.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,i=n.resolve;if(i===b){var o=m(e);if(o===p&&e._state!==re)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===Y){var r=new n(v);O(r,e,o),this._willSettleAt(r,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(i(e),t)},L.prototype._settledAt=function(e,t,n){var i=this.promise;i._state===re&&(this._remaining--,e===ae?I(i,n):this._result[t]=n),0===this._remaining&&E(i,this._result)},L.prototype._willSettleAt=function(e,t){var n=this;x(e,void 0,function(e){return n._settledAt(se,t,e)},function(e){return n._settledAt(ae,t,e)})},Y.all=U,Y.race=W,Y.resolve=b,Y.reject=B,Y._setScheduler=r,Y._setAsap=s,Y._asap=X,Y.prototype={constructor:Y,then:p,"catch":function(e){return this.then(null,e)}},Y.polyfill=V,Y.Promise=Y,Y})}).call(t,n(28),function(){return this}())},function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){e.exports=!n(18)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var i=n(9),o=n(21);e.exports=n(7)?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var i=n(14),o=n(50),r=n(37),s=Object.defineProperty;t.f=n(7)?Object.defineProperty:function(e,t,n){if(i(e),t=r(t,!0),i(n),o)try{return s(e,t,n)}catch(a){}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 i=n(57),o=n(32);e.exports=function(e){return i(o(e))}},function(e,t,n){(function(t){"use strict";var n="'4cb44d7578c1b21a823b0bbf6da74f19e0b51d15",i="4cb44d75'",o="4.8.0",r="2.4.0.208",s="3.7.0",a="45",c=1,u="https://lbs.netease.im/lbs/webconf.jsp",l="development"===t.env.NODE_ENV?6e3:42e3,h={info:{hash:n,shortHash:i,version:o,sdkVersion:a,nrtcVersion:s,protocolVersion:c},agentVersion:r,lbsUrl:u,connectTimeout:l,xhrTimeout:l,socketTimeout:l,reconnectionDelay:656.25,reconnectionDelayMax:l,reconnectionJitter:.1,heartbeatInterval:18e4,cmdTimeout:l};h.formatSocketUrl=function(e){var t=e.url,n=e.secure,i=n?"https":"http";return t.indexOf("http")===-1?i+"://"+t:t},h.fileServerUrl="https://nos.netease.com",h.replaceUrl="http://nos.netease.im",h.genUploadUrl=function(e){return h.uploadUrl?h.uploadUrl+"/"+e:h.fileServerUrl+"/"+e},h.genDownloadUrl=function(e,t){return h.downloadUrl?h.replaceUrl+"/"+e+"/"+t:"https://"+e+".nosdn.127.net/"+t},e.exports=h}).call(t,n(28))},function(e,t,n){var i=n(11);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(121),r=i(o),s=n(120),a=i(s),c=n(20),u=i(c);t["default"]=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":(0,u["default"])(t)));e.prototype=(0,a["default"])(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(r["default"]?(0,r["default"])(e,t):e.__proto__=t)}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(20),r=i(o);t["default"]=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":(0,r["default"])(t))&&"function"!=typeof t?e:t}},function(e,t,n){var i=n(2),o=n(10),r=n(45),s=n(8),a="prototype",c=function(e,t,n){var u,l,h,f=e&c.F,d=e&c.G,p=e&c.S,b=e&c.P,v=e&c.B,y=e&c.W,g=d?o:o[t]||(o[t]={}),m=g[a],_=d?i:p?i[t]:(i[t]||{})[a];d&&(n=t);for(u in n)l=!f&&_&&void 0!==_[u],l&&u in g||(h=l?_[u]:n[u],g[u]=d&&"function"!=typeof _[u]?n[u]:v&&l?r(h,i):y&&_[u]==h?function(e){var t=function(t,n,i){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,i)}return e.apply(this,arguments)};return t[a]=e[a],t}(h):b&&"function"==typeof h?r(Function.call,h):h,b&&((g.virtual||(g.virtual={}))[u]=h,e&c.R&&m&&!m[u]&&s(m,u,h)))};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 i(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function r(){this._events=new i,this._eventsCount=0}var s=Object.prototype.hasOwnProperty,a="~";Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(a=!1)),r.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)s.call(e,t)&&n.push(a?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},r.prototype.listeners=function(e,t){var n=a?a+e:e,i=this._events[n];if(t)return!!i;if(!i)return[];if(i.fn)return[i.fn];for(var o=0,r=i.length,s=new Array(r);o<r;o++)s[o]=i[o].fn;return s},r.prototype.emit=function(e,t,n,i,o,r){var s=a?a+e:e;if(!this._events[s])return!1;var c,u,l=this._events[s],h=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),h){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,i),!0;case 5:return l.fn.call(l.context,t,n,i,o),!0;case 6:return l.fn.call(l.context,t,n,i,o,r),!0}for(u=1,c=new Array(h-1);u<h;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),h){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,i);break;default:if(!c)for(f=1,c=new Array(h-1);f<h;f++)c[f-1]=arguments[f];l[u].fn.apply(l[u].context,c)}}return!0},r.prototype.on=function(e,t,n){var i=new o(t,n||this),r=a?a+e:e;return this._events[r]?this._events[r].fn?this._events[r]=[this._events[r],i]:this._events[r].push(i):(this._events[r]=i,this._eventsCount++),this},r.prototype.once=function(e,t,n){var i=new o(t,n||this,!0),r=a?a+e:e;return this._events[r]?this._events[r].fn?this._events[r]=[this._events[r],i]:this._events[r].push(i):(this._events[r]=i,this._eventsCount++),this},r.prototype.removeListener=function(e,t,n,o){var r=a?a+e:e;if(!this._events[r])return this;if(!t)return 0===--this._eventsCount?this._events=new i:delete this._events[r],this;var s=this._events[r];if(s.fn)s.fn!==t||o&&!s.once||n&&s.context!==n||(0===--this._eventsCount?this._events=new i:delete this._events[r]);else{for(var c=0,u=[],l=s.length;c<l;c++)(s[c].fn!==t||o&&!s[c].once||n&&s[c].context!==n)&&u.push(s[c]);u.length?this._events[r]=1===u.length?u[0]:u:0===--this._eventsCount?this._events=new i:delete this._events[r]}return this},r.prototype.removeAllListeners=function(e){var t;return e?(t=a?a+e:e,this._events[t]&&(0===--this._eventsCount?this._events=new i:delete this._events[t])):(this._events=new i,this._eventsCount=0),this},r.prototype.off=r.prototype.removeListener,r.prototype.addListener=r.prototype.on,r.prototype.setMaxListeners=function(){return this},r.prefixed=a,r.EventEmitter=r,e.exports=r},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(74),r=i(o),s=n(73),a=i(s),c="function"==typeof a["default"]&&"symbol"==typeof r["default"]?function(e){return typeof e}:function(e){return e&&"function"==typeof a["default"]&&e.constructor===a["default"]&&e!==a["default"].prototype?"symbol":typeof e};t["default"]="function"==typeof a["default"]&&"symbol"===c(r["default"])?function(e){return"undefined"==typeof e?"undefined":c(e)}:function(e){return e&&"function"==typeof a["default"]&&e.constructor===a["default"]&&e!==a["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,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},,function(e,t,n){var i=n(53),o=n(33);e.exports=Object.keys||function(e){return i(e,o)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t){e.exports={}},,function(e,t){function n(){throw new Error("setTimeout has not been defined")}function i(){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 r(e){if(h===clearTimeout)return clearTimeout(e);if((h===i||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(e);try{return h(e)}catch(t){try{return h.call(null,e)}catch(t){return h.call(this,e)}}}function s(){b&&d&&(b=!1,d.length?p=d.concat(p):v=-1,p.length&&a())}function a(){if(!b){var e=o(s);b=!0;for(var t=p.length;t;){for(d=p,p=[];++v<t;)d&&d[v].run();v=-1,t=p.length}d=null,b=!1,r(e)}}function c(e,t){this.fun=e,this.array=t}function u(){}var l,h,f=e.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(e){l=n}try{h="function"==typeof clearTimeout?clearTimeout:i}catch(e){h=i}}();var d,p=[],b=!1,v=-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];p.push(new c(e,t)),1!==p.length||b||o(a)},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 i=n(9).f,o=n(4),r=n(3)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,r)&&i(e,r,{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 i=n(35)("keys"),o=n(22);e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e,t,n){var i=n(2),o="__core-js_shared__",r=i[o]||(i[o]={});e.exports=function(e){return r[e]||(r[e]={})}},function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},function(e,t,n){var i=n(11);e.exports=function(e,t){if(!i(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!i(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var i=n(2),o=n(10),r=n(30),s=n(39),a=n(9).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=r?{}:i.Symbol||{});"_"==e.charAt(0)||e in t||a(t,e,{value:s.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){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(114);Object.defineProperty(t,"ajax",{enumerable:!0,get:function(){return i(o)["default"]}});var r=n(115);Object.defineProperty(t,"element",{enumerable:!0,get:function(){return i(r)["default"]}});var s=n(116);Object.defineProperty(t,"tool",{enumerable:!0,get:function(){return i(s)["default"]}})},function(e,t,n){var i=n(14),o=n(84),r=n(33),s=n(34)("IE_PROTO"),a=function(){},c="prototype",u=function(){var e,t=n(46)("iframe"),i=r.length,o="<",s=">";for(t.style.display="none",n(67).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(o+"script"+s+"document.F=Object"+o+"/script"+s),e.close(),u=e.F;i--;)delete u[c][r[i]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(a[c]=i(e),n=new a,a[c]=null,n[s]=e):n=u(),void 0===t?n:o(n,t)}},function(e,t){t.f=Object.getOwnPropertySymbols},,function(e,t,n){var i=n(56);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,o){return e.call(t,n,i,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var i=n(11),o=n(2).document,r=i(o)&&i(o.createElement);e.exports=function(e){return r?o.createElement(e):{}}},,function(e,t,n){var i;(function(e,o){(function(){"use strict";function r(e){return e=String(e),e.charAt(0).toUpperCase()+e.slice(1)}function s(e,t,n){var i={"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)&&(i=i[/[\d.]+$/.exec(e)])&&(e="Windows "+i),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 a(e,t){var n=-1,i=e?e.length:0;if("number"==typeof i&&i>-1&&i<=C)for(;++n<i;)t(e[n],n,e);else u(e,t)}function c(e){return e=p(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:r(e)}function u(e,t){for(var n in e)E.call(e,n)&&t(e[n],n,e)}function l(e){return null==e?r(e):I.call(e).slice(8,-1)}function h(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 a(e,function(i,o){n=t(n,i,o,e)}),n}function p(e){return String(e).replace(/^ +| +$/g,"")}function b(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,i){return t||(n[$]||n[/^[a-z]+(?: +[a-z]+\b)*/i.exec($)]||RegExp("\\b"+f(i)+"(?:\\b|\\w*\\d)","i").exec(e))&&i})}function i(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 i=n.pattern||f(n);return!t&&(t=RegExp("\\b"+i+"(?:/[\\d.]+|[ \\w.]*)","i").exec(e))&&(t=s(t,i,n.label||n)),t})}function r(t){return d(t,function(t,n){var i=n.pattern||f(n);return!t&&(t=RegExp("\\b"+i+" *\\d+[.\\w_]*","i").exec(e)||RegExp("\\b"+i+" *\\w+-[\\w]*","i").exec(e)||RegExp("\\b"+i+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(e))&&((t=String(n.label&&!RegExp(i,"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(i,"i"),n).replace(RegExp("; *(?:"+n+"[_-])?","i")," ").replace(RegExp("("+n+")[-_.]?(\\w)","i"),"$1 $2"))),t})}function a(t){return d(t,function(t,n){return t||(RegExp(n+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(e)||0)[1]||null})}function v(){return this.description||""}var m=y,_=e&&"object"==typeof e&&"String"!=l(e);_&&(m=e,e=null);var w=m.navigator||{},C=w.userAgent||"";e||(e=C);var T,E,x=_||S==g,A=_?!!w.likeChrome:/\bChrome\b/.test(e)&&!/internal|\n/i.test(I.toString()),M="Object",P=_?M:"ScriptBridgingProxyObject",D=_?M:"Environment",N=_&&m.java?"JavaPackage":l(m.java),j=_?M:"RuntimeObject",k=/\bJava/.test(N)&&m.java,L=k&&l(m.environment)==D,R=k?"a":"α",U=k?"b":"β",W=m.document||{},B=m.operamini||m.opera,H=O.test(H=_&&B?B["[[Class]]"]:l(B))?H:B=null,F=e,Y=[],V=null,K=e==C,z=K&&B&&"function"==typeof B.version&&B.version(),G=t([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),J=i(["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"]),$=r([{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"]),X=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}}),Q=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]),X&&!$&&($=r([X])),(T=/\bGoogle TV\b/.exec($))&&($=T[0]),/\bSimulator\b/i.test(e)&&($=($?$+" ":"")+"Simulator"),"Opera Mini"==J&&/\bOPiOS\b/.test(e)&&Y.push("running in Turbo/Uncompressed mode"),"IE"==J&&/\blike iPhone OS\b/.test(e)?(T=b(e.replace(/like iPhone OS/,"")),X=T.manufacturer,$=T.product):/^iP/.test($)?(J||(J="Safari"),Q="iOS"+((T=/ OS ([\d_]+)/i.exec(e))?" "+T[1].replace(/_/g,"."):"")):"Konqueror"!=J||/buntu/i.test(Q)?X&&"Google"!=X&&(/Chrome/.test(J)&&!/\bMobile Safari\b/i.test(e)||/\bVita\b/.test($))||/\bAndroid\b/.test(Q)&&/^Chrome/.test(J)&&/\bVersion\//i.test(e)?(J="Android Browser",Q=/\bAndroid\b/.test(Q)?Q:"Android"):"Silk"==J?(/\bMobi/i.test(e)||(Q="Android",Y.unshift("desktop mode")),/Accelerated *= *true/i.test(e)&&Y.unshift("accelerated")):"PaleMoon"==J&&(T=/\bFirefox\/([\d.]+)\b/.exec(e))?Y.push("identifying as Firefox "+T[1]):"Firefox"==J&&(T=/\b(Mobile|Tablet|TV)\b/i.exec(e))?(Q||(Q="Firefox OS"),$||($=T[1])):!J||(T=!/\bMinefield\b/i.test(e)&&/\b(?:Firefox|Safari)\b/.exec(J))?(J&&!$&&/[\/,]|^[^(]+?\)/.test(e.slice(e.indexOf(T+"/")+8))&&(J=null),(T=$||X||Q)&&($||X||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Q))&&(J=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Q)?Q:T)+" Browser")):"Electron"==J&&(T=(/\bChrome\/([\d.]+)\b/.exec(e)||0)[1])&&Y.push("Chromium "+T):Q="Kubuntu",z||(z=a(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",f(J),"(?:Firefox|Minefield|NetFront)"])),(T="iCab"==G&&parseFloat(z)>3&&"WebKit"||/\bOpera\b/.test(J)&&(/\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"==Q?"Tasman":"Trident")||"WebKit"==G&&/\bPlayStation\b(?! Vita\b)/i.test(J)&&"NetFront")&&(G=[T]),"IE"==J&&(T=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(e)||0)[1])?(J+=" Mobile",Q="Windows Phone "+(/\+$/.test(T)?T:T+".x"),Y.unshift("desktop mode")):/\bWPDesktop\b/i.test(e)?(J="IE Mobile",Q="Windows Phone 8.x",Y.unshift("desktop mode"),z||(z=(/\brv:([\d.]+)/.exec(e)||0)[1])):"IE"!=J&&"Trident"==G&&(T=/\brv:([\d.]+)/.exec(e))&&(J&&Y.push("identifying as "+J+(z?" "+z:"")),J="IE",z=T[1]),K){if(h(m,"global"))if(k&&(T=k.lang.System,F=T.getProperty("os.arch"),Q=Q||T.getProperty("os.name")+" "+T.getProperty("os.version")),x&&h(m,"system")&&(T=[m.system])[0]){Q||(Q=T[0].os||null);try{T[1]=m.require("ringo/engine").version,z=T[1].join("."),J="RingoJS"}catch(q){T[0].global.system==m.system&&(J="Narwhal")}}else"object"==typeof m.process&&!m.process.browser&&(T=m.process)?"object"==typeof T.versions?"string"==typeof T.versions.electron?(Y.push("Node "+T.versions.node),J="Electron",z=T.versions.electron):"string"==typeof T.versions.nw&&(Y.push("Chromium "+z,"Node "+T.versions.node),J="NW.js",z=T.versions.nw):(J="Node.js",F=T.arch,Q=T.platform,z=/[\d.]+/.exec(T.version),z=z?z[0]:"unknown"):L&&(J="Rhino");else l(T=m.runtime)==P?(J="Adobe AIR",Q=T.flash.system.Capabilities.os):l(T=m.phantom)==j?(J="PhantomJS",z=(T=T.version||null)&&T.major+"."+T.minor+"."+T.patch):"number"==typeof W.documentMode&&(T=/\bTrident\/(\d+)/i.exec(e))?(z=[z,W.documentMode],(T=+T[1]+4)!=z[1]&&(Y.push("IE "+z[1]+" mode"),G&&(G[1]=""),z[1]=T),z="IE"==J?String(z[1].toFixed(1)):z[0]):"number"==typeof W.documentMode&&/^(?:Chrome|Firefox)\b/.test(J)&&(Y.push("masking as "+J+" "+z),J="IE",z="11.0",G=["Trident"],Q="Windows");Q=Q&&c(Q)}if(z&&(T=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(z)||/(?:alpha|beta)(?: ?\d)?/i.exec(e+";"+(K&&w.appMinorVersion))||/\bMinefield\b/i.test(e)&&"a")&&(V=/b/i.test(T)?"beta":"alpha",z=z.replace(RegExp(T+"\\+?$"),"")+("beta"==V?U:R)+(/\d+\+?/.exec(T)||"")),"Fennec"==J||"Firefox"==J&&/\b(?:Android|Firefox OS)\b/.test(Q))J="Firefox Mobile";else if("Maxthon"==J&&z)z=z.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test($))"Xbox 360"==$&&(Q=null),"Xbox 360"==$&&/\bIEMobile\b/.test(e)&&Y.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(J)&&(!J||$||/Browser|Mobi/.test(J))||"Windows CE"!=Q&&!/Mobi/i.test(e))if("IE"==J&&K)try{null===m.external&&Y.unshift("platform preview")}catch(q){Y.unshift("embedded")}else(/\bBlackBerry\b/.test($)||/\bBB10\b/.test(e))&&(T=(RegExp($.replace(/ +/g," *")+"/([.\\d]+)","i").exec(e)||0)[1]||z)?(T=[T,/BB10/.test(e)],Q=(T[1]?($=null,X="BlackBerry"):"Device Software")+" "+T[0],z=null):this!=u&&"Wii"!=$&&(K&&B||/Opera/.test(J)&&/\b(?:MSIE|Firefox)\b/i.test(e)||"Firefox"==J&&/\bOS X (?:\d+\.){2,}/.test(Q)||"IE"==J&&(Q&&!/^Win/.test(Q)&&z>5.5||/\bWindows XP\b/.test(Q)&&z>8||8==z&&!/\bTrident\b/.test(e)))&&!O.test(T=b.call(u,e.replace(O,"")+";"))&&T.name&&(T="ing as "+T.name+((T=T.version)?" "+T:""),O.test(J)?(/\bIE\b/.test(T)&&"Mac OS"==Q&&(Q=null),T="identify"+T):(T="mask"+T,J=H?c(H.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(T)&&(Q=null),K||(z=null)),G=["Presto"],Y.push(T));else J+=" Mobile";(T=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(e)||0)[1])&&(T=[parseFloat(T.replace(/\.(\d)$/,".0$1")),T],"Safari"==J&&"+"==T[1].slice(-1)?(J="WebKit Nightly",V="alpha",z=T[1].slice(0,-1)):z!=T[1]&&z!=(T[2]=(/\bSafari\/([\d.]+\+?)/i.exec(e)||0)[1])||(z=null),T[1]=(/\bChrome\/([\d.]+)/i.exec(e)||0)[1],537.36==T[0]&&537.36==T[2]&&parseFloat(T[1])>=28&&"WebKit"==G&&(G=["Blink"]),K&&(A||T[1])?(G&&(G[1]="like Chrome"),T=T[1]||(T=T[0],T<530?1:T<532?2:T<532.05?3:T<533?4:T<534.03?5:T<534.07?6:T<534.1?7:T<534.13?8:T<534.16?9:T<534.24?10:T<534.3?11:T<535.01?12:T<535.02?"13+":T<535.07?15:T<535.11?16:T<535.19?17:T<536.05?18:T<536.1?19:T<537.01?20:T<537.11?"21+":T<537.13?23:T<537.18?24:T<537.24?25:T<537.36?26:"Blink"!=G?"27":"28")):(G&&(G[1]="like Safari"),T=T[0],T=T<400?1:T<500?2:T<526?3:T<533?4:T<534?"4+":T<535?5:T<537?6:T<538?7:T<601?8:"8"),G&&(G[1]+=" "+(T+="number"==typeof T?".x":/[.+]/.test(T)?"":"+")),"Safari"==J&&(!z||parseInt(z)>45)&&(z=T)),"Opera"==J&&(T=/\bzbov|zvav$/.exec(Q))?(J+=" ",Y.unshift("desktop mode"),"zvav"==T?(J+="Mini",z=null):J+="Mobile",Q=Q.replace(RegExp(" *"+T+"$"),"")):"Safari"==J&&/\bChrome\b/.exec(G&&G[1])&&(Y.unshift("desktop mode"),J="Chrome Mobile",z=null,/\bOS X\b/.test(Q)?(X="Apple",Q="iOS 4.3+"):Q=null),z&&0==z.indexOf(T=/[\d.]+$/.exec(Q))&&e.indexOf("/"+T+"-")>-1&&(Q=p(Q.replace(T,""))),G&&!/\b(?:Avant|Nook)\b/.test(J)&&(/Browser|Lunascape|Maxthon/.test(J)||"Safari"!=J&&/^iOS/.test(Q)&&/\bSafari\b/.test(G[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(J)&&G[1])&&(T=G[G.length-1])&&Y.push(T),Y.length&&(Y=["("+Y.join("; ")+")"]),X&&$&&$.indexOf(X)<0&&Y.push("on "+X),$&&Y.push((/^on /.test(Y[Y.length-1])?"":"on ")+$),Q&&(T=/ ([\d.+]+)$/.exec(Q),E=T&&"/"==Q.charAt(Q.length-T[0].length-1),Q={architecture:32,family:T&&!E?Q.replace(T[0],""):Q,version:T?T[1]:null,toString:function(){var e=this.version;return this.family+(e&&!E?" "+e:"")+(64==this.architecture?" 64-bit":"")}}),(T=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(F))&&!/\bi686\b/i.test(F)?(Q&&(Q.architecture=64,Q.family=Q.family.replace(RegExp(" *"+T),"")),J&&(/\bWOW64\b/i.test(e)||K&&/\w(?:86|32)$/.test(w.cpuClass||w.platform)&&!/\bWin64; x64\b/i.test(e))&&Y.unshift("32-bit")):Q&&/^OS X/.test(Q.family)&&"Chrome"==J&&parseFloat(z)>=39&&(Q.architecture=64),e||(e=null);var Z={};return Z.description=e,Z.layout=G&&G[0],Z.manufacturer=X,Z.name=J,Z.prerelease=V,Z.product=$,Z.ua=e,Z.version=J&&z,Z.os=Q||{architecture:null,family:null,version:null,toString:function(){return"null"}},Z.parse=b,Z.toString=v,Z.version&&Y.unshift(z),Z.name&&Y.unshift(J),Q&&J&&(Q!=String(Q).split(" ")[0]||Q!=J.split(" ")[0]&&!$)&&Y.push($?"("+Q+")":"on "+Q),Y.length&&(Z.description=Y.join(" ")),Z}var v={"function":!0,object:!0},y=v[typeof window]&&window||this,g=y,m=v[typeof t]&&t,_=v[typeof e]&&e&&!e.nodeType&&e,w=m&&_&&"object"==typeof o&&o;!w||w.global!==w&&w.window!==w&&w.self!==w||(y=w);var C=Math.pow(2,53)-1,O=/\bOpera/,S=this,T=Object.prototype,E=T.hasOwnProperty,I=T.toString,x=b();y.platform=x,i=function(){return x}.call(t,n,t,e),!(void 0!==i&&(e.exports=i))}).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 i=n(30),o=n(17),r=n(54),s=n(8),a=n(4),c=n(26),u=n(81),l=n(31),h=n(86),f=n(3)("iterator"),d=!([].keys&&"next"in[].keys()),p="@@iterator",b="keys",v="values",y=function(){return this};e.exports=function(e,t,n,g,m,_,w){u(n,t,g);var C,O,S,T=function(e){if(!d&&e in A)return A[e];switch(e){case b:return function(){return new n(this,e)};case v:return function(){return new n(this,e)}}return function(){return new n(this,e)}},E=t+" Iterator",I=m==v,x=!1,A=e.prototype,M=A[f]||A[p]||m&&A[m],P=!d&&M||T(m),D=m?I?T("entries"):P:void 0,N="Array"==t?A.entries||M:M;if(N&&(S=h(N.call(new e)),S!==Object.prototype&&S.next&&(l(S,E,!0),i||a(S,f)||s(S,f,y))),I&&M&&M.name!==v&&(x=!0,P=function(){return M.call(this)}),i&&!w||!d&&!x&&A[f]||s(A,f,P),c[t]=P,c[E]=y,m)if(C={values:I?P:T(v),keys:_?P:T(b),entries:D},w)for(O in C)O in A||r(A,O,C[O]);else o(o.P+o.F*(d||x),t,C);return C}},function(e,t,n){var i=n(53),o=n(33).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,o)}},function(e,t,n){var i=n(4),o=n(12),r=n(78)(!1),s=n(34)("IE_PROTO");e.exports=function(e,t){var n,a=o(e),c=0,u=[];for(n in a)n!=s&&i(a,n)&&u.push(n);for(;t.length>c;)i(a,n=t[c++])&&(~r(u,n)||u.push(n));return u}},function(e,t,n){e.exports=n(8)},function(e,t){"use strict";t.__esModule=!0;var n,i,o,r,s={CONTROL_COMMAND_BUSY:9,CONTROL_COMMAND_SELF_ON_BACKGROUND:12,CONTROL_COMMAND_START_NOTIFY_RECEIVED:13},a={NETCALL_CONTROL_COMMAND_NOTIFY_AUDIO_ON:1,NETCALL_CONTROL_COMMAND_NOTIFY_AUDIO_OFF:2,NETCALL_CONTROL_COMMAND_NOTIFY_VIDEO_ON:3,NETCALL_CONTROL_COMMAND_NOTIFY_VIDEO_OFF:4,NETCALL_CONTROL_COMMAND_SWITCH_AUDIO_TO_VIDEO:5,NETCALL_CONTROL_COMMAND_SWITCH_AUDIO_TO_VIDEO_AGREE:6,NETCALL_CONTROL_COMMAND_SWITCH_AUDIO_TO_VIDEO_REJECT:7,NETCALL_CONTROL_COMMAND_SWITCH_VIDEO_TO_AUDIO:8,NETCALL_CONTROL_COMMAND_BUSY:9,NETCALL_CONTROL_COMMAND_SELF_CAMERA_INVALID:10,NETCALL_CONTROL_COMMAND_SELF_AUDIO_INVALID:11,NETCALL_CONTROL_COMMAND_SELF_ON_BACKGROUND:12,NETCALL_CONTROL_COMMAND_START_NOTIFY_RECEIVED:13,NETCALL_CONTROL_COMMAND_NOTIFY_RECORD_START:14,NETCALL_CONTROL_COMMAND_NOTIFY_RECORD_STOP:15},c={HANGUP_TYPE_NORMAL:0,HANGUP_TYPE_TIMEOUT:-1},u={NETCALL_TYPE_AUDIO:1,NETCALL_TYPE_VIDEO:2,DEVICE_TYPE_AUDIO_IN:0,DEVICE_TYPE_AUDIO_OUT_LOCAL:1,DEVICE_TYPE_AUDIO_OUT_CHAT:2,DEVICE_TYPE_VIDEO:3,DEVICE_TYPE_DESKTOP_SCREEN:4,DEVICE_TYPE_DESKTOP_WINDOW:5,CHAT_VIDEO_QUALITY_NORMAL:0,CHAT_VIDEO_QUALITY_LOW:1,CHAT_VIDEO_QUALITY_MEDIUM:2,CHAT_VIDEO_QUALITY_HIGH:3,CHAT_VIDEO_QUALITY_480P:4,CHAT_VIDEO_QUALITY_540P:5,CHAT_VIDEO_QUALITY_720P:6,CHAT_VIDEO_FRAME_RATE_NORMAL:0,CHAT_VIDEO_FRAME_RATE_5:1,CHAT_VIDEO_FRAME_RATE_10:2,CHAT_VIDEO_FRAME_RATE_15:3,CHAT_VIDEO_FRAME_RATE_20:4,CHAT_VIDEO_FRAME_RATE_25:5,LAYOUT_SPLITBOTTOMHORFLOATING:0,LAYOUT_SPLITTOPHORFLOATING:1,LAYOUT_SPLITLATTICETILE:2,LAYOUT_SPLITLATTICECUTTINGTILE:3,LAYOUT_SPLITCUSTOM:4,ROLE_PLAYER:0,ROLE_AUDIENCE:1},l={WB_TYPE_TCP:2,WB_TYPE_UDP:3,CALL_TYPE_NONE:0,CALL_TYPE_AUDIO:1,HANGUP_TYPE_NORMAL:0,HANGUP_TYPE_TIMEOUT:-1};u.deviceTypeMap=(n={},n[u.DEVICE_TYPE_AUDIO_IN]="audioIn",n[u.DEVICE_TYPE_AUDIO_OUT_CHAT]="audioOut",n[u.DEVICE_TYPE_VIDEO]="video",n),u.deviceTypeMap=(i={},i[u.DEVICE_TYPE_AUDIO_IN]="audioIn",i[u.DEVICE_TYPE_AUDIO_OUT_LOCAL]="audioOut",i[u.DEVICE_TYPE_AUDIO_OUT_CHAT]="audioOut",i[u.DEVICE_TYPE_VIDEO]="video",i),u.videoMap={frame:(o={},o[u.CHAT_VIDEO_QUALITY_NORMAL]="480x320",o[u.CHAT_VIDEO_QUALITY_LOW]="176x144",o[u.CHAT_VIDEO_QUALITY_MEDIUM]="352x288",o[u.CHAT_VIDEO_QUALITY_HIGH]="480x320",o[u.CHAT_VIDEO_QUALITY_480P]="640x480",o[u.CHAT_VIDEO_QUALITY_540P]="960x540",o[u.CHAT_VIDEO_QUALITY_720P]="1280x720",o),frameRate:(r={},r[u.CHAT_VIDEO_FRAME_RATE_NORMAL]=15,r[u.CHAT_VIDEO_FRAME_RATE_5]=5,r[u.CHAT_VIDEO_FRAME_RATE_10]=10,r[u.CHAT_VIDEO_FRAME_RATE_15]=15,r[u.CHAT_VIDEO_FRAME_RATE_20]=20,r[u.CHAT_VIDEO_FRAME_RATE_25]=25,r)};var h={getVideoSessionConfig:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.quality,n=void 0===t?u.CHAT_VIDEO_QUALITY_NORMAL:t,i=e.frameRate,o=void 0===i?u.CHAT_VIDEO_FRAME_RATE_NORMAL:i,r={},s=u.videoMap.frame[n];return r.frameRate=u.videoMap.frameRate[o],r.width=+s.split("x")[0],r.height=+s.split("x")[1],r},getDeviceTypeStr:function(e){return u.deviceTypeMap[e]},getDeviceTypeMap:function(e){return u.deviceTypeMap[e]}},f=Object.assign(u,a,c),d=Object.assign(l,s,c);t.constantTool=h,t.constantRtc=f,t.constantBB=d},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 i=n(40);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},function(e,t,n){var i=n(25),o=n(21),r=n(12),s=n(37),a=n(4),c=n(50),u=Object.getOwnPropertyDescriptor;t.f=n(7)?u:function(e,t){if(e=r(e),t=s(t,!0),c)try{return u(e,t)}catch(n){}if(a(e,t))return o(!i.f.call(e,t),e[t])}},function(e,t,n){var i=n(32);e.exports=function(e){return Object(i(e))}},function(e,t){"use strict";t.__esModule=!0;var n,i,o={CURRENT:{SDK_TYPE:null},SDK_TYPE:{NETCALL:1,WEBRTC:2,WHITEBOARD:3,NRTC:4},SDK_NAME:{1:"Netcall",2:"WebRTC",3:"WhiteBoard",4:"NRTC"}};o.STATS_FUN=(n={},n[o.SDK_TYPE.NETCALL]=1,n[o.SDK_TYPE.WEBRTC]=1,n[o.SDK_TYPE.NRTC]=1,n[o.SDK_TYPE.WHITEBOARD]=0,n),o.STATS_RTC=(i={},i[o.SDK_TYPE.WEBRTC]=1,i[o.SDK_TYPE.NRTC]=1,i[o.SDK_TYPE.WHITEBOARD]=0,i),t["default"]=o,e.exports=t["default"]},,,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){var i=n(2).document;e.exports=i&&i.documentElement},function(e,t,n){var i=n(36),o=Math.min;e.exports=function(e){return e>0?o(i(e),9007199254740991):0}},function(e,t){},function(e,t,n){"use strict";var i=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=i(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){n(89);for(var i=n(2),o=n(8),r=n(26),s=n(3)("toStringTag"),a="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<a.length;c++){var u=a[c],l=i[u],h=l&&l.prototype;h&&!h[s]&&o(h,s,u),r[u]=r.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 i=n(12),o=n(68),r=n(88);e.exports=function(e){return function(t,n,s){var a,c=i(t),u=o(c.length),l=r(s,u);if(e&&n!=n){for(;u>l;)if(a=c[l++],a!=a)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 i=n(24),o=n(43),r=n(25);e.exports=function(e){var t=i(e),n=o.f;if(n)for(var s,a=n(e),c=r.f,u=0;a.length>u;)c.call(e,s=a[u++])&&t.push(s);return t}},function(e,t,n){var i=n(40);e.exports=Array.isArray||function(e){return"Array"==i(e)}},function(e,t,n){"use strict";var i=n(42),o=n(21),r=n(31),s={};n(8)(s,n(3)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=i(s,{next:o(1,n)}),r(e,t+" Iterator")}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var i=n(22)("meta"),o=n(11),r=n(4),s=n(9).f,a=0,c=Object.isExtensible||function(){return!0},u=!n(18)(function(){return c(Object.preventExtensions({}))}),l=function(e){s(e,i,{value:{i:"O"+ ++a,w:{}}})},h=function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!r(e,i)){if(!c(e))return"F";if(!t)return"E";l(e)}return e[i].i},f=function(e,t){if(!r(e,i)){if(!c(e))return!0;if(!t)return!1;l(e)}return e[i].w},d=function(e){return u&&p.NEED&&c(e)&&!r(e,i)&&l(e),e},p=e.exports={KEY:i,NEED:!1,fastKey:h,getWeak:f,onFreeze:d}},function(e,t,n){var i=n(9),o=n(14),r=n(24);e.exports=n(7)?Object.defineProperties:function(e,t){o(e);for(var n,s=r(t),a=s.length,c=0;a>c;)i.f(e,n=s[c++],t[n]);return e}},function(e,t,n){var i=n(12),o=n(52).f,r={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return o(e)}catch(t){return s.slice()}};e.exports.f=function(e){return s&&"[object Window]"==r.call(e)?a(e):o(i(e))}},function(e,t,n){var i=n(4),o=n(59),r=n(34)("IE_PROTO"),s=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),i(e,r)?e[r]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},function(e,t,n){var i=n(36),o=n(32);e.exports=function(e){return function(t,n){var r,s,a=String(o(t)),c=i(n),u=a.length;return c<0||c>=u?e?"":void 0:(r=a.charCodeAt(c),r<55296||r>56319||c+1===u||(s=a.charCodeAt(c+1))<56320||s>57343?e?a.charAt(c):r:e?a.slice(c,c+2):(r-55296<<10)+(s-56320)+65536)}}},function(e,t,n){var i=n(36),o=Math.max,r=Math.min;e.exports=function(e,t){return e=i(e),e<0?o(e+t,0):r(e,t)}},function(e,t,n){"use strict";var i=n(77),o=n(82),r=n(26),s=n(12);e.exports=n(51)(Array,"Array",function(e,t){this._t=s(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"),r.Arguments=r.Array,i("keys"),i("values"),i("entries")},function(e,t,n){"use strict";var i=n(2),o=n(4),r=n(7),s=n(17),a=n(54),c=n(83).KEY,u=n(18),l=n(35),h=n(31),f=n(22),d=n(3),p=n(39),b=n(38),v=n(79),y=n(80),g=n(14),m=n(11),_=n(12),w=n(37),C=n(21),O=n(42),S=n(85),T=n(58),E=n(9),I=n(24),x=T.f,A=E.f,M=S.f,P=i.Symbol,D=i.JSON,N=D&&D.stringify,j="prototype",k=d("_hidden"),L=d("toPrimitive"),R={}.propertyIsEnumerable,U=l("symbol-registry"),W=l("symbols"),B=l("op-symbols"),H=Object[j],F="function"==typeof P,Y=i.QObject,V=!Y||!Y[j]||!Y[j].findChild,K=r&&u(function(){return 7!=O(A({},"a",{get:function(){return A(this,"a",{value:7}).a}})).a})?function(e,t,n){var i=x(H,t);i&&delete H[t],A(e,t,n),i&&e!==H&&A(H,t,i)}:A,z=function(e){var t=W[e]=O(P[j]);return t._k=e,t},G=F&&"symbol"==typeof P.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof P},J=function(e,t,n){return e===H&&J(B,t,n),g(e),t=w(t,!0),g(n),o(W,t)?(n.enumerable?(o(e,k)&&e[k][t]&&(e[k][t]=!1),n=O(n,{enumerable:C(0,!1)})):(o(e,k)||A(e,k,C(1,{})),e[k][t]=!0),K(e,t,n)):A(e,t,n)},$=function(e,t){g(e);for(var n,i=v(t=_(t)),o=0,r=i.length;r>o;)J(e,n=i[o++],t[n]);return e},X=function(e,t){return void 0===t?O(e):$(O(e),t)},Q=function(e){var t=R.call(this,e=w(e,!0));return!(this===H&&o(W,e)&&!o(B,e))&&(!(t||!o(this,e)||!o(W,e)||o(this,k)&&this[k][e])||t)},q=function(e,t){if(e=_(e),t=w(t,!0),e!==H||!o(W,t)||o(B,t)){var n=x(e,t);return!n||!o(W,t)||o(e,k)&&e[k][t]||(n.enumerable=!0),n}},Z=function(e){for(var t,n=M(_(e)),i=[],r=0;n.length>r;)o(W,t=n[r++])||t==k||t==c||i.push(t);return i},ee=function(e){for(var t,n=e===H,i=M(n?B:_(e)),r=[],s=0;i.length>s;)!o(W,t=i[s++])||n&&!o(H,t)||r.push(W[t]);return r};F||(P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===H&&t.call(B,n),o(this,k)&&o(this[k],e)&&(this[k][e]=!1),K(this,e,C(1,n))};return r&&V&&K(H,e,{configurable:!0,set:t}),z(e)},a(P[j],"toString",function(){return this._k}),T.f=q,E.f=J,n(52).f=S.f=Z,n(25).f=Q,n(43).f=ee,r&&!n(30)&&a(H,"propertyIsEnumerable",Q,!0),p.f=function(e){return z(d(e))}),s(s.G+s.W+s.F*!F,{Symbol:P});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 ie=I(d.store),oe=0;ie.length>oe;)b(ie[oe++]);s(s.S+s.F*!F,"Symbol",{"for":function(e){return o(U,e+="")?U[e]:U[e]=P(e)},keyFor:function(e){if(!G(e))throw TypeError(e+" is not a symbol!");for(var t in U)if(U[t]===e)return t},useSetter:function(){V=!0},useSimple:function(){V=!1}}),s(s.S+s.F*!F,"Object",{create:X,defineProperty:J,defineProperties:$,getOwnPropertyDescriptor:q,getOwnPropertyNames:Z,getOwnPropertySymbols:ee}),D&&s(s.S+s.F*(!F||u(function(){var e=P();return"[null]"!=N([e])||"{}"!=N({a:e})||"{}"!=N(Object(e))})),"JSON",{stringify:function(e){for(var t,n,i=[e],o=1;arguments.length>o;)i.push(arguments[o++]);if(n=t=i[1],(m(t)||void 0!==e)&&!G(e))return y(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!G(t))return t}),i[1]=t,N.apply(D,i)}}),P[j][L]||n(8)(P[j],L,P[j].valueOf),h(P,"Symbol"),h(Math,"Math",!0),h(i.JSON,"JSON",!0)},function(e,t,n){n(38)("asyncIterator")},function(e,t,n){n(38)("observable")},,,,function(e,t,n){var i,o;!function(r,s){"use strict";i=s,o="function"==typeof i?i.call(t,n,t,e):i,!(void 0!==o&&(e.exports=o))}(this,function(){var e,t,n,i,o=Function.call,r=Object.prototype,s=o.bind(r.hasOwnProperty),a=o.bind(r.propertyIsEnumerable),c=o.bind(r.toString),u=s(r,"__defineGetter__");u&&(e=o.bind(r.__defineGetter__),t=o.bind(r.__defineSetter__),n=o.bind(r.__lookupGetter__),i=o.bind(r.__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?r:null});var h=function(e){try{return e.sentinel=0,0===Object.getOwnPropertyDescriptor(e,"sentinel").value}catch(t){return!1}};if(Object.defineProperty){var f=h({}),d="undefined"==typeof document||h(document.createElement("div"));if(!d||!f)var p=Object.getOwnPropertyDescriptor}if(!Object.getOwnPropertyDescriptor||p){var b="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if(l(e))throw new TypeError(b+e);if(p)try{return p.call(Object,e,t)}catch(o){}var c;if(!s(e,t))return c;if(c={enumerable:a(e,t),configurable:!0},u){var h=e.__proto__,f=e!==r;f&&(e.__proto__=r);var d=n(e,t),v=i(e,t);if(f&&(e.__proto__=h),d||v)return d&&(c.get=d),v&&(c.set=v),c}return c.value=e[t],c.writable=!0,c}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),!Object.create){var v,y=!({__proto__:null}instanceof Object),g=function(){if(!document.domain)return!1;try{return!!new ActiveXObject("htmlfile")}catch(e){return!1}},m=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},_=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};v=y||"undefined"==typeof document?function(){return{__proto__:null}}:function(){var e=g()?m():_();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,v=function(){return new t},new t},Object.create=function(e,t){var n,i=function(){};if(null===e)n=v();else{if(null!==e&&l(e))throw new TypeError("Object prototype may only be an Object or null");i.prototype=e,n=new i,n.__proto__=e}return void 0!==t&&Object.defineProperties(n,t),n}}var w=function(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){return!1}};if(Object.defineProperty){var C=w({}),O="undefined"==typeof document||w(document.createElement("div"));if(!C||!O)var S=Object.defineProperty,T=Object.defineProperties}if(!Object.defineProperty||S){var E="Property description must be an object: ",I="Object.defineProperty called on non-object: ",x="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(o,s,a){if(l(o))throw new TypeError(I+o);if(l(a))throw new TypeError(E+a);if(S)try{return S.call(Object,o,s,a)}catch(c){}if("value"in a)if(u&&(n(o,s)||i(o,s))){var h=o.__proto__;o.__proto__=r,delete o[s],o[s]=a.value,o.__proto__=h}else o[s]=a.value;else{var f="get"in a,d="set"in a;if(!u&&(f||d))throw new TypeError(x);f&&e(o,s,a.get),d&&t(o,s,a.set)}return o}}Object.defineProperties&&!T||(Object.defineProperties=function(e,t){if(T)try{return T.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(A){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="";s(e,t);)t+="?";e[t]=!0;var n=s(e,t);return delete e[t],n})})},function(e,t){},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(119),r=i(o);t["default"]=r["default"]||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}},,,,,,,function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(6),r=i(o),s=n(41),a=n(13),c=a.info.nrtcVersion,u="https://statistic.live.126.net/statistic/realtime/sdkFunctioninfo",l=function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r["default"])(this,f);var t=e.appkey,n=e.platform;this.apis={},this.isRtc=/WebRTC/.test(n),this.init(t,n),this.resetStatus()};t["default"]=l;var h=l.prototype;h.init=function(e,t){this.apis=Object.assign(this.apis,{ver:1,platform:t,sdk_ver:c||"v4.4.0",uid:null,appkey:e,time:null})},h.start=function(e){this.calling=!0,this.apis=Object.assign(this.apis,e)},h.resetStatus=function(){this.calling=!1,this.apis=Object.assign(this.apis,{p2p:{value:0},meeting:{value:0},bypass:{value:0},call_control_type:{value:0},self_mute:{value:-1},self_mic_mute:{value:-1},switch_p2p_type:{value:0},set_speaker:{value:-1},net_detect:{value:this.isRtc?-1:0},beautify:{value:-1},water_mark:{value:-1},audio_samples:{value:-1},video_samples:{value:-1},pre_view_mirror:{value:-1},code_mirror:{value:-1},custom_audio:{value:-1},custom_video:{value:-1},audio_mix:{value:-1},snap_shot:{value:-1},record:{value:0},audio_record:{value:0},display:{value:0},android_compatibility:{value:-1},hd_audio:{value:0},video_quality:{value:0},fps:{value:0},prefered_video_encoder:{value:-1},prefered_video_decoder:{value:-1},video_max_encode_bitrate:{value:this.isRtc?-1:0},audio_scene:{value:-1},video_adaptive_strategy:{value:this.isRtc?-1:0},ans:{value:this.isRtc?-1:0},agc:{value:-1},dtx:{value:-1},aec:{value:this.isRtc?-1:0},awc:{value:this.isRtc?-1:0}})},h.update=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],n=e.key,i=e.ext;e.constructor===String&&(n=e),i=i||t,this.apis[n]&&(this.apis[n].value=1,void 0!==i&&(this.apis[n].ext=i),/(p2p|meeting)/.test(n)&&(this.calling=!0))},h.send=function(){var e=this;this.calling&&(this.calling=!1,this.apis.time=Date.now(),(0,s.ajax)({type:"post",url:u,data:this.apis}).then(function(t){e.resetStatus()})["catch"](function(t){console.log("err",t),e.resetStatus()}))},e.exports=t["default"]},,,,,,,,,function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e){if(!e.url||!e.data)return Promise.reject("参数不完整,无法发起请求");e.dataType=e.dataType||"json";var t=new XMLHttpRequest;return t.open(e.type||"GET",e.url,!0),t.responseType=""+e.dataType,t.setRequestHeader("Content-type","application/json;charset=UTF-8"),new Promise(function(n,i){t.onload=function(){var e=t.response;n(e)},t.onerror=function(e){i(e)},t.send(JSON.stringify(e.data))})};e.exports=t["default"]},function(e,t){"use strict";t.__esModule=!0,t["default"]={html2node:function(e){var t=document.createElement("div");t.innerHTML=e;var n,i,o=[];if(t.children)for(n=0,i=t.children.length;n<i;n++)o.push(t.children[n]);else for(n=0,i=t.childNodes.length;n<i;n++){var r=t.childNodes[n];1===r.nodeType&&o.push(r)}return o.length>1?t:o[0]},n2node:function(e){return e?/HTML.+Element/gi.test(e)?e:e[0]&&/HTML.+Element/gi.test(e[0])?e[0]:null:null}},e.exports=t["default"]},function(e,t){"use strict";t.__esModule=!0,t["default"]={merge:function(){var e=arguments;return e[0]=Object.assign.apply(Object.assign,arguments),e[0]},verifyOptions:function(){var e=arguments;if(e[0]&&e[0].constructor===Object)for(var t=1;t<arguments.length;t++){var n=e[t];n=n.split(" "),n.map(function(t){if(!e[0][t])throw Error("参数缺失 "+t)})}},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()}}()},e.exports=t["default"]},function(e,t){"use strict";t.__esModule=!0;var n={gateWay:{login:1,loginAck:2,join:3,keep_alive:4,keep_alive_ack:5,keep_alive_node:6,broadcast:7,toUser:8,logout:9}},i={gateWay:{1:"login",2:"loginAck",3:"join",4:"keep_alive",5:"keep_alive_ack",6:"keep_alive_node",7:"broadcast",8:"toUser",9:"logout"}};t.serializeWb=n,t.unserializeWb=i},,function(e,t,n){e.exports={"default":n(122),__esModule:!0}},function(e,t,n){e.exports={"default":n(123),__esModule:!0}},function(e,t,n){e.exports={"default":n(124),__esModule:!0}},function(e,t,n){n(127),e.exports=n(10).Object.assign},function(e,t,n){n(128);var i=n(10).Object;e.exports=function(e,t){return i.create(e,t)}},function(e,t,n){n(129),e.exports=n(10).Object.setPrototypeOf},function(e,t,n){"use strict";var i=n(24),o=n(43),r=n(25),s=n(59),a=n(57),c=Object.assign;e.exports=!c||n(18)(function(){var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach(function(e){t[e]=e}),7!=c({},e)[n]||Object.keys(c({},t)).join("")!=i})?function(e,t){for(var n=s(e),c=arguments.length,u=1,l=o.f,h=r.f;c>u;)for(var f,d=a(arguments[u++]),p=l?i(d).concat(l(d)):i(d),b=p.length,v=0;b>v;)h.call(d,f=p[v++])&&(n[f]=d[f]);return n}:c},function(e,t,n){var i=n(11),o=n(14),r=function(e,t){if(o(e),!i(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,i){try{i=n(45)(Function.call,n(58).f(Object.prototype,"__proto__").set,2),i(e,[]),t=!(e instanceof Array)}catch(o){t=!0}return function(e,n){return r(e,n),t?e.__proto__=n:i(e,n),e}}({},!1):void 0),check:r}},function(e,t,n){var i=n(17);i(i.S+i.F,"Object",{assign:n(125)})},function(e,t,n){var i=n(17);i(i.S,"Object",{create:n(42)})},function(e,t,n){var i=n(17);i(i.S,"Object",{setPrototypeOf:n(126).set})},,,function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(6),r=i(o),s=n(16),a=i(s),c=n(15),u=i(c),l=n(60),h=i(l),f=n(117),d=n(19),p=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r["default"])(this,t);var i=(0,a["default"])(this,e.call(this));return i.info=Object.assign({},n),i.init(),i.logger=n.logger||window.console,i.autoReconnect=n.autoReconnect||!0,i.isDestroy=!1,i.reConnectCount=0,i.wssUrl=null,i}return(0,u["default"])(t,e),t}(d),b=p.prototype;b.init=function(){this.reset()},b.reset=function(){this.imInfo={}},b.connect=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.url,i=void 0===n?this.wssUrl:n,o=t.imInfo;return this.imInfo=o||this.imInfo,i?new Promise(function(t,n){e.url=i;var o=void 0;try{o=e.ws=new WebSocket("wss://"+i);var r=e;o.onopen=function(n){e.wssUrl=i,r.initSignal(),r.signalConnected=!0,console.log("signalConnected",i),r.emit("signalConnected"),t(r),e.heartbeat()},o.onclose=o.onerror=function(e){r.signalConnected=!1,n(e)}}catch(s){e.logger.error("信令连接建立失败",s),n(s)}}):Promise.reject("信令地址缺失")},b.initSignal=function(){var e=this,t=this.ws,n=t.send;t.send=function(e){n.call(this,JSON.stringify(e))},t.onmessage=function(t){var n=JSON.parse(t.data||null);if(n)return!e.isHeartBeating||"keep_alive_ack"!==n.type&&n.type!==f.serializeWb.gateWay.keep_alive_ack?void e.emit("message",n):void e.onHeartBeat(n)},t.onclose=function(t){e.signalConnected=!1,e.emit("signalTimeout",t)},t.onerror=function(t){e.signalConnected=!1,e.emit("signalError",t)}},b.send=function(e){var t=this;"keep_alive"!==e.type,this.ws&&this.signalConnected&&this.ws.readyState===this.ws.OPEN?(e.browser={},e.browser.name=window.platform.name,e.browser.version=window.platform.version,this.ws.send(e)):this.once("signalConnected",function(){t.send(e)})},b.heartbeat=function(){this.socketData=this.socketData||{uid:this.imInfo.uid,cid:this.imInfo.cid},this.heartBeatList=[],this.bindHearBeat(5)},b.onHeartBeat=function(e){this.heartBeatList.shift(),this.bindHearBeat(5)},b.heartBeatHandler=function(){var e=this.socketData,t=this.heartBeatList;if(t){var n=Date.now(),i=n;if(h["default"].CURRENT.SDK_TYPE===h["default"].SDK_TYPE.WHITEBOARD&&(i=+n.toString().slice(0,-3)),t.constructor===Array&&0===t.length){t.push(n);var o=this.getContentData({type:"keep_alive",uid:h["default"].CURRENT.SDK_TYPE===h["default"].SDK_TYPE.WHITEBOARD?+e.uid:e.uid+"",cid:h["default"].CURRENT.SDK_TYPE===h["default"].SDK_TYPE.WHITEBOARD?+e.cid:e.cid+""},i);return this.send(o),void this.bindHearBeat(5)}var r=Date.now()-t[0];if(r>3e4)this.logger.error("socket error: heartbeat timeout"),this.emit("signalTimeout");else if(r>2e3&&r<3e4){this.logger.warn("socket error: no response, keep heartbeat"),t.push(n);var s=this.getContentData({type:"keep_alive",uid:e.uid,cid:e.cid},i);this.send(s),this.bindHearBeat(2)}}},b.getContentData=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];return h["default"].CURRENT.SDK_TYPE===h["default"].SDK_TYPE.WHITEBOARD?(e.version=31,e.type=f.serializeWb.gateWay[e.type],e.content={params:{timestamp:+t}}):e.params={content:{timestamp:t+""}},e},b.bindHearBeat=function(e){this.isHeartBeating&&clearTimeout(this.isHeartBeating),this.isHeartBeating=setTimeout(this.heartBeatHandler.bind(this),1e3*e)},b.stopHeartBeat=function(){this.isHeartBeating&&(this.isHeartBeating&&clearTimeout(this.isHeartBeating),this.heartBeatTimer&&clearInterval(this.heartBeatTimer),this.isHeartBeating=null,this.heartBeatTimer=null,this.heartBeatList=null,this.heartBeatCount=0)},b.logout=function(){var e=this.socketData,t=Date.now().toString(),n=this.getContentData({type:"logout",uid:e.uid,cid:e.cid},t);this.send(n)},b.destroy=function(){this.logger.log("signal close -> signal.js"),this.stopHeartBeat(),this.isDestroy=!0,this.ws&&(this.ws.onopen=null,this.ws.onmessage=null,this.ws.onerror=null,this.ws.onclose=null,this.ws.readyState===WebSocket.OPEN&&this.ws.close(),this.ws=null)},t["default"]=p,e.exports=t["default"]},,,,,,function(e,t,n){"use strict";function i(e,t){for(var n in t)e[n]=t[n];return e}n(96),n(48),n(5).Promise,window.Object.assign||(console.log("Object.assign polyfill"),window.Object.assign=function(){for(var e=arguments,t=1;t<e.length;t++)e[0]=i(e[0],e[t]);return e[0]})},,,,,function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var o=n(6),r=i(o),s=n(16),a=i(s),c=n(15),u=i(c),l=n(41),h=n(19),f=function(e){function t(n){(0,r["default"])(this,t);var i=(0,a["default"])(this,e.call(this));return n.container=l.element.n2node(n.container),n.remoteContainer=l.element.n2node(n.remoteContainer),l.tool.merge(i,n),i.init(),i}return(0,u["default"])(t,e),t}(h),d=f.prototype;d.init=function(){var e=this;this.resetStatus(),window.addEventListener("beforeunload",this.beforeunload.bind(this));var t=this.nim&&this.nim.logger||window.console;this.logger={log:function(){arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.debug&&t.log.apply(t,arguments)},error:function(){arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.debug&&t.error.apply(t,arguments)},warn:function(){arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.debug&&t.warn.apply(t,arguments)}},this.log=this.logger.log,this.error=this.logger.error,this.warn=this.logger.warn},d.resetStatus=function(){this.signalInited=!1,this.channelId=null,this.type=null,this.target={account:null,uid:null},this.sessionConfig={},this.sessionMode=null,this.imInfo={},this.calling=!1,this.isCaller=!1,this.callee=null,this.callAccepted=!1,this.callerInfo=null,this.beCalledInfo=null,this.nim&&(this.nim.protocol&&this.nim.protocol.setCurrentNetcall&&this.nim.protocol.setCurrentNetcall(),this.nim.protocol&&this.nim.protocol.setCurrentWhiteBoard&&this.nim.protocol.setCurrentWhiteBoard()),this.needQueryAccountMap={},this.accountUidMap={},this.uidAccountMap={},this.isOnHangup=!1},d.beforeunload=function(){this.signalInited&&(this.callerInfo||this.beCalledInfo?this.hangup():this.leaveChannel())},d.baseGetAccount=function(){return this.nim&&this.nim.account},d.baseGetUid=function(){return this.accountUidMap?this.accountUidMap[this.nim.account]||"-1":"-1"},d.parseAccountUidMap=function(e){var t=this;Object.keys(e).forEach(function(n){t.addAccountUidMap({account:n,uid:e[n]})})},d.addAccountUidMap=function(e){var t=e.account,n=e.uid;this.uidAccountMap||(this.uidAccountMap={}),this.uidAccountMap[n]=t,this.accountUidMap||(this.accountUidMap={}),this.accountUidMap[t]=n},d.getAccountWithUid=function(e){if(this.uidAccountMap)return this.uidAccountMap[e]},d.getUidWithAccount=function(e){if(this.accountUidMap)return this.accountUidMap[e]},d.baseIsCurrentChannelId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.channelId&&this.channelId===e.channelId},d.baseNotCurrentChannelId=function(e){return!this.baseIsCurrentChannelId(e)},d.baseResponse=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.fn||"calleeAck",i=t.beCalledInfo||this.beCalledInfo,o=i.accepted=t.accepted!==!1;return o?(this.sessionMode="p2p",this.type=i.type,this.channelId=i.channelId,this.target.account=i.account,this.calling=!0,this.imInfo=i,this.imInfo.sessionMode=this.sessionMode,this.setSessionConfig({signalStartTime:Date.now()})):(this.log("reject call",i),this.packNetcallRecord({type:i.type,channelId:i.channelId,isCaller:!1,target:i.account,recordType:"rejectNetcall"})),this.nim[n](i).then(function(){o&&(t.sessionConfig&&e.setSessionConfig(t.sessionConfig),e.beCalledInfo=i,e.initSession({beCalledInfo:i}))},function(t){throw e.log(t),t})},d.baseControl=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.channelId=t.channelId||this.channelId,t.command&&t.channelId){this.controller.uploadDataApi("update",{key:"call_control_type"});var n=t.fn||"netcallControl";return t.type=t.command,this.nim[n](t)["catch"](function(t){e.log(t)})}},d.baseHangup=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.controller.uploadDataApi("send");var t=e.channelId,n=void 0===t?this.channelId:t,i=e.recordType;if(n){var o=e.fn||"hangup";this.nim[o]({channelId:n})}n===this.channelId&&(this.isCaller&&!this.callAccepted&&(this.log(i,{channelId:n}),this.packNetcallRecord({recordType:i})),this.resetWhenHangup())},d.baseStartSession=function(){this.imInfo.cid=this.imInfo.cid||this.imInfo.channelId;var e=this.sessionMode=this.sessionMode||"p2p";this.imInfo.sessionMode=e,this.imInfo.sessionConfig=this.sessionConfig;
},d.packNetcallRecord=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.recordType,n=e.type||this.type,i=e.channelId||this.channelId,o=e.duration||0,r=e.isCaller||this.isCaller,s=e.target||this.target.account,a=this.baseGetAccount(),c=r?a:s,u=r?s:a,h=+new Date;this.nim.protocol.onMsg({content:{msg:{attach:JSON.stringify({data:{calltype:n,channel:i,duration:o,ids:[a,s],time:h},id:t}),from:c,fromClientType:r?16:0,fromDeviceId:"",fromNick:"",idClient:l.tool.guid(),idServer:l.tool.guid(),scene:0,time:h,to:u,type:5}}})},d.setSessionConfig=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l.tool.merge(this.sessionConfig,e)},d.initSignal=function(){return Promise.resolve()},d.initSession=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sessionMode="p2p";var n=this.isCaller?this.callerInfo:t.beCalledInfo;this.parseAccountUidMap(n.accountUidMap),!n.account&&n.uid&&(n.account=this.getAccountWithUid(n.uid)),this.callAccepted=!0,this.signalInited=!0,this.setSessionConfig({signalEndTime:Date.now()}),this.controller.uploadDataApi("start",{uid:n.uid}),this.target.uid=this.getUidWithAccount(this.target.account);var i={type:n.type,account:this.target&&this.target.account||n.account,channelId:n.channelId};n.netcallType&&(i.netcallType=n.netcallType),this.imInfo.target=this.target,setTimeout(function(){e.emit("callAccepted",i)},1)},d.onBeCalled=function(e){this.signalInited=!0,this.channelId=e.channelId,this.beCalledInfo=e,this.log("beCalling",e),this.emit("beCalling",e)},d.onUserJoin=function(e){if(this.log("client on userJoined",e),e.type=e.type||this.type,e.account=this.getAccountWithUid(e.uid),e.mode=this.sessionMode,e.account!==this.baseGetAccount()){if(e.account)return this.logger.log("userjoin ----> from signal",e),void this.emit("joinChannel",e);this.needQueryAccountMap[e.uid]=e;var t=this.nim.queryAccountUidMap||this.nim.wbQueryAccountUidMap;t.call(this.nim,this.channelName,[e.uid])}},d.onUserLeft=function(e){var t=this;this.channelId&&(this.logger.log("leave channel from signal"),"p2p"===this.imInfo.sessionMode?(this.controller.uploadDataApi("send"),setTimeout(function(){t.logger.log("超时处理 onUserLeft"),t.resetWhenHangup()},1e3),this.emit("hangup",{channelId:e.channelId||e.cid,account:this.target.account,type:e.type||0})):this.emit("leaveChannel",{channelId:e.channelId||e.cid,account:this.getAccountWithUid(e.uid),type:e.type||0}))},d.onNotifyJoin=function(e){this.logger.log("join channel from IM");var t=e.accountUidMap,n=this.needQueryAccountMap;this.parseAccountUidMap(t);for(var i in t){var o=i,r=t[i];if(r in n){var s=n[r];s.account=o,delete n[r],this.logger.log("userjoin ----> from IM",e),this.emit("joinChannel",s)}}},d.onCalleeAck=function(e){if(this.logger.log("收到被叫的通知",e),!this.baseNotCurrentChannelId(e)){var t=e.account,n=this.beCalledInfo||this.callerInfo;this.target.account=t,this.setSessionConfig({signalEndTime:Date.now()}),e.accepted?(this.callAccepted=!0,this.initSession()):(this.log("call Rejected",e),this.packNetcallRecord({type:e.type,channelId:e.channelId,isCaller:!0,target:e.account,recordType:"netcallRejected"}),this.resetWhenHangup(),this.emit("callRejected",{type:n.type,account:t}))}},d.onHangup=function(e){var t=this;this.channelId&&"p2p"===this.sessionMode&&(this.logger.log("on hangup from IM"),this.controller.uploadDataApi("send"),setTimeout(function(){t.logger.log("超时处理 onHangup"),t.resetWhenHangup()},1e3),this.emit("hangup",{channelId:e.channelId,account:e.account,type:0}))},d.onControl=function(e){this.emit("control",e)},d.onCalleeAckSync=function(e){this.emit("callerAckSync",e),this.baseIsCurrentChannelId(e)&&this.resetWhenHangup()},d.baseCreateChannel=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l.tool.verifyOptions(n,"channelName"),n.custom=n.custom||"",this.setSessionConfig({signalStartTime:Date.now()}),this.nim[e](n).then(function(e){return Promise.resolve(e)})["catch"](function(e){return t.setSessionConfig({signalEndTime:Date.now()}),Promise.reject(e)})},d.baseJoinChannel=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.nim[e](n).then(function(e){return t.setSessionConfig({signalEndTime:Date.now()}),t.signalInited=!0,t.sessionMode=e.sessionMode="meeting",t.parseAccountUidMap(e.accountUidMap),e.uid=t.getUidWithAccount(t.nim.account),Promise.resolve(e)})["catch"](function(e){return t.setSessionConfig({signalEndTime:Date.now()}),Promise.reject(e)})},d.format=function(e){return e.rtcServerMap&&(e.rtcServerMap=JSON.parse(e.rtcServerMap),e.rtcServerMap=e.rtcServerMap.webrtcarray||[e.rtcServerMap.webrtc]||e.rtcServerMap),e.wbServerMap&&(e.wbServerMap=JSON.parse(e.wbServerMap),e.wbServerMap=e.wbServerMap.webrtcarray||[e.wbServerMap.webrtc]||e.wbServerMap),e},d.resetWhenHangup=function(){},e.exports=f},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(6),r=i(o),s=n(16),a=i(s),c=n(15),u=i(c),l=n(132),h=i(l),f=n(60),d=i(f),p=n(105),b=i(p),v=n(19),y=function(e){return new b["default"](e)},g=function(e){function t(n){(0,r["default"])(this,t);var i=(0,a["default"])(this,e.call(this,n));return i.info={},i._init(n),i._reset(),i}return(0,u["default"])(t,e),t.prototype._init=function(e){this.info=Object.assign(this.info,e),this.logger=e.logger||window.console,d["default"].STATS_RTC[d["default"].CURRENT.SDK_TYPE]&&(this.dataApi=y({appkey:this.info.appKey,platform:d["default"].SDK_NAME[d["default"].CURRENT.SDK_TYPE]}))},t.prototype._reset=function(){this.signal&&(this.signal.destroy(),this.signal=null),this.sessionConfig={},this.imInfo={},this.target={},this.userJoinTimeoutId=0,this.remoteNodeStatus={}},t.prototype.resetStatus=function(){this._reset()},t.prototype._startSession=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.imInfo||e;t.uid=+t.uid,t.cid=+t.cid,this.setSessionConfig(t.sessionConfig);var n=t.serverMap?JSON.parse(t.serverMap):{};t.urlArray=t.serverAddrs||n.webrtcarray||[n.webrtc];var i=void 0;return i=this.signal?Promise.resolve(this.signal):this._initSignal()},t.prototype._initSignal=function(){var e=this;if(this.signal)return Promise.resolve();var t=new h["default"]({logger:this.logger}),n=this.imInfo.urlArray;if(n){var i=n.shift();return i?t.connect({url:i,imInfo:this.imInfo}).then(function(t){return e.signal=t,e._initSignalEvent(),Promise.resolve(t.url)})["catch"](function(t){return e._initSignal()}):Promise.reject("无可用的网关服务器地址, 如果当前应用是WebRTC音视频, 请确保对方打开了WebRTC兼容开关")}},t.prototype._initSignalEvent=function(){var e=this,t=this.signal;t.on("signalTimeout",this.onSignalTimeout.bind(this)),t.on("message",this.onSignalMessage.bind(this)),t.on("signalClosed",function(){e.emit("signalClosed"),e.resetStatus()}),this.signal.on("signalError",function(t){e.emit("signalClosed"),e._stopSignal()})},t.prototype._stopSignal=function(){this.signal&&(this.signal.destroy(),this.signal=null)},t.prototype._stopSession=function(){this._stopSignal(),this._reset()},t.prototype._logout=function(){this.signal&&this.signal.logout()},t.prototype.setAppKey=function(e){e&&(this.info.appKey=e)},t.prototype.getUidByMsid=function(e){var t=this.remoteUidMsidMap;for(var n in t)if(t[n]===e)return n;return null},t.prototype.getMsidByUid=function(e){return this.remoteUidMsidMap(e)},t.prototype.setSessionConfig=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sessionConfig=Object.assign(this.sessionConfig,e)},t.prototype.onSignalMessage=function(e){},t.prototype.onSignalTimeout=function(e){},t.prototype.uploadDataApi=function(e,t){d["default"].STATS_FUN[d["default"].CURRENT.SDK_TYPE]&&this.info.appKey&&("start"===e&&(t.appkey=this.info.appKey),this.dataApi[e]&&this.dataApi[e](t))},t}(v);t["default"]=g,e.exports=t["default"]},,,,,,,,,,,,,,,,,,function(e,t){"use strict";function n(e){i(e.enable)&&(this.enable=e.enable?1:0),i(e.needBadge)&&(this.needBadge=e.needBadge?1:0),i(e.needPushNick)&&(this.needPushNick=e.needPushNick?1:0),i(e.pushContent)&&(this.pushContent=""+e.pushContent),i(e.custom)&&(this.custom=""+e.custom),i(e.pushPayload)&&(this.pushPayload=""+e.pushPayload),i(e.sound)&&(this.sound=""+e.sound),i(e.webrtcEnable)&&(this.webrtcEnable=e.webrtcEnable?1:0)}t.__esModule=!0,t["default"]=function(e){var t=e.util;return i=t.notundef,n};var i=void 0;e.exports=t["default"]},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(6),r=i(o),s=function(){function e(t){(0,r["default"])(this,e),this.all=t||Object.create(null)}return e.prototype.on=function(e,t){(this.all[e]||(this.all[e]=[])).push(t)},e.prototype.off=function(e,t){this.all[e]&&this.all[e].splice(this.all[e].indexOf(t)>>>0,1)},e.prototype.emit=function(e,t){(this.all[e]||[]).map(function(e){e(t)}),(this.all["*"]||[]).map(function(n){n(e,t)})},e}();t["default"]=s,e.exports=t["default"]},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){var i=0;t.forEach(function(t){if(t.visible&&!(i>=n)){if(r(e,t),"fill"===t.mode)return f(e,t.corner[0]);e.drawImage(t.ctx.canvas,t.corner[0].x,t.corner[0].y),n++}})}function r(e,t){var n=t.UID,i=t.ctx,o=t.size,r=t.color,s=t.mode;void 0!==n&&(e.lineWidth=i.lineWidth=o,e.strokeStyle=i.strokeStyle=r),"erase"===s?e.globalCompositeOperation="destination-out":e.globalCompositeOperation="source-over"}function s(e,t){var n=e.canvas,i=document.createElement("canvas").getContext("2d");i.canvas.width=n.width,i.canvas.height=n.height,i.drawImage(n,0,0,n.width,n.height),n.style.width=n.width*t+"px",n.style.height=n.height*t+"px",n.width=n.width*t,n.height=n.height*t,e.lineCap=e.lineJoin="round",e.drawImage(i.canvas,0,0,n.width,n.height)}function a(e,t,n,i){return t.x===i.x&&t.y===i.y?void u(e,t,1,1):(e.beginPath(),e.moveTo(t.x,t.y),e.quadraticCurveTo(n.x,n.y,i.x,i.y),void e.stroke())}function c(e,t,n){e.beginPath(),e.moveTo(t.x,t.y),e.lineTo(n.x,n.y),e.stroke()}function u(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];o?e.fillRect(t.x,t.y,n,i):e.strokeRect(t.x,t.y,n,i)}function l(e,t,n,i,o){var r=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=t.x,a=t.y,c=n<0?-o:o,u=i<0?-o:o;e.beginPath(),e.moveTo(s+c,a),e.lineTo(s+n-c,a),e.quadraticCurveTo(s+n,a,s+n,a+u),e.lineTo(s+n,a+i-u),e.quadraticCurveTo(s+n,a+i,s+n-c,a+i),e.lineTo(s+c,a+i),e.quadraticCurveTo(s,a+i,s,a+i-u),e.lineTo(s,a+u),e.quadraticCurveTo(s,a,s+c,a),e.stroke(),r&&e.fill()}function h(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.beginPath(),e.arc(t.x,t.y,n,0,2*Math.PI,!0),e.stroke(),i&&e.fill()}function f(e,t){function n(e){return e===y||(4278190080&e)>>>0<4278190080}var i=t.x,o=t.y,r=e.getImageData(0,0,e.canvas.width,e.canvas.height),s=0,a=1,c=e.strokeStyle,u=parseInt(c.substr(1,2),16),l=parseInt(c.substr(3,2),16),h=parseInt(c.substr(5,2),16),f=(255<<24|h<<16|l<<8|u)>>>0,d=[i,o],p=new ArrayBuffer(r.data.length),b=new Uint8ClampedArray(p);b.set(r.data);var v=new Uint32Array(p),y=v[o*r.width+i];if(y!==f){for(var g=[d],m=void 0,_=r.width-1,w=r.height-1;m=g.pop();){for(var C=m[a]*r.width+m[s],O=m[s],S=m[a];S-- >=0&&n(v[C]);)C-=r.width;C+=r.width,S++;for(var T=!1,E=!1;S++<w&&n(v[C]);)v[C]=f,O>0&&(n(v[C-1])?T||(g.push([O-1,S]),T=!0):T&&(T=!1)),O<_&&(n(v[C+1])?E||(g.push([O+1,S]),E=!0):E&&(E=!1)),C+=r.width}r.data.set(b),e.putImageData(r,0,0)}}t.__esModule=!0;var d=n(6),p=i(d),b=n(16),v=i(b),y=n(15),g=i(y),m=n(204),_=i(m),w=function(e){function t(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,p["default"])(this,t);var o=(0,v["default"])(this,e.call(this));if(o.displayCtx&&o.destory(),o.users={},o.UID=i.UID||0,o.shapes=[],o.visible=0,!(n instanceof window.HTMLElement))throw new Error("画板容器不是HTMLElement实例");o.container=n;var r=document.createElement("canvas");if(o.displayCtx=r.getContext("2d"),n.style.position="relative",r.style.position="relative",r.style.boxSizing="content-box",r.style.zIndex=i.zIndex||0,r.style.cursor="crosshair",o.width=i.width||800,o.height=i.height||500,"number"!=typeof o.width)throw new Error("画板宽度不是数字");if("number"!=typeof o.height)throw new Error("画板高度不是数字");o.displayCtx.canvas.width=o.width,o.displayCtx.canvas.height=o.height,o.displayCtx.lineCap=o.displayCtx.lineJoin="round";var s=o.addUser(o.UID);return n.appendChild(r),n.appendChild(s.ctx.canvas),o.dispatcher=o.dispatcher.bind(o),o.switchEventListener(!0),o}return(0,g["default"])(t,e),t.prototype.mode=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.UID,n=this.users[t];if(!e)return n.mode;if("string"!=typeof e)throw new Error("操作模式不是字符串");var i=e.split(":");n.mode=i[0],n.type=i[1]||"free",this.emit("action",{UID:t,op:"mode",value:e})},t.prototype.size=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.UID,n=this.users[t];if(!e)return n.size;if("number"!=typeof e)throw new Error("Type Error: size");n.size=e,this.emit("action",{UID:t,op:"size",value:e})},t.prototype.color=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.UID,n=this.users[t];return e?(n.color=e,void this.emit("action",{UID:t,op:"color",value:e})):n.color},t.prototype.switchEventListener=function(e){var t=e?"add":"remove",n=[this.users[this.UID].ctx.canvas,this.displayCtx.canvas],i=this.dispatcher;n.forEach(function(e){e[t+"EventListener"]("mousedown",i),e[t+"EventListener"]("mousemove",i),e[t+"EventListener"]("touchmove",i),e[t+"EventListener"]("touchstart",i)}),document[t+"EventListener"]("mouseup",i),document[t+"EventListener"]("touchend",i)},t.prototype.mousedown=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.UID,n=void 0,i=this.users[t],o=i.start,s=i.oldMid,a=i.end;i.isMouseDown=!0;var c=i.ctx;switch("free"===i.type?c.canvas.style.visibility="hidden":c.canvas.style.visibility="visible",r(this.displayCtx,i),i.mode){case"draw":case"erase":switch(n=new O(i.mode,i.type,i.size,i.color,new C(e.x,e.y)),i.activeShape=n,this.shapes.push(n),i.shapes.push(this.shapes.length-1),i.type){case"free":C.set(o,e.x,e.y),C.set(s,o.x,o.y),C.set(a,o.x,o.y);break;default:C.set(o,e.x,e.y)}break;case"fill":n=new O(i.mode,i.type,i.size,i.color,new C(e.x,e.y)),this.shapes.push(n),i.shapes.push(this.shapes.length-1),f(this.displayCtx,e);break;case"select":}"select"!==i.mode&&(i.available=++i.visible,this.visible++),this.emit("action",{UID:t,op:"mousedown",value:e})},t.prototype.mousemove=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.UID,n=this.users[t];if(n.isMouseDown){var i=n.start,o=n.oldMid,s=n.end,f=n.ctx,d=this.displayCtx;switch(n.mode){case"draw":case"erase":switch(r(d,n),n.type){case"free":var p=new C((s.x+e.x)/2,(s.y+e.y)/2);a(f,o,s,p),a(d,o,s,p),C.set(o,p.x,p.y),C.set(s,e.x,e.y);break;case"line":C.set(s,e.x,e.y),f.clearRect(0,0,f.canvas.width,f.canvas.height),c(f,i,s);break;case"rect":C.set(s,e.x,e.y),f.clearRect(0,0,f.canvas.width,f.canvas.height),u(f,i,s.x-i.x,s.y-i.y);break;case"roundRect":C.set(s,e.x,e.y),f.clearRect(0,0,f.canvas.width,f.canvas.height),l(f,i,s.x-i.x,s.y-i.y,30);break;case"circle":C.set(s,e.x,e.y),f.clearRect(0,0,f.canvas.width,f.canvas.height),h(f,i,Math.abs(e.x-i.x))}var b=n.activeShape.corner;if("circle"===n.type){var v=Math.abs(e.x-i.x);b[0].x=i.x-v,b[0].y=i.y-v,b[1].x=i.x+v,b[1].y=i.y+v}else b[0].x=Math.min(s.x,b[0].x),b[0].y=Math.min(s.y,b[0].y),b[1].x=Math.max(s.x,b[1].x),b[1].y=Math.max(s.y,b[1].y);break;case"fill":break;case"select":}this.emit("action",{UID:t,op:"mousemove",value:e})}},t.prototype.mouseup=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.UID,n=this.users[t];if(n.isMouseDown){n.isMouseDown=!1;var i=n.start,o=n.oldMid,s=n.end,f=n.ctx,d=this.displayCtx;switch(n.mode){case"draw":case"erase":switch(r(d,n),n.type){case"free":var p=new C((s.x+e.x)/2,(s.y+e.y)/2);a(f,o,s,p),a(d,o,s,p),C.set(o,p.x,p.y),C.set(s,e.x,e.y);break;case"line":C.set(s,e.x,e.y),c(f,i,s);break;case"rect":C.set(s,e.x,e.y),u(f,i,s.x-i.x,s.y-i.y);break;case"roundRect":C.set(s,e.x,e.y),l(f,i,s.x-i.x,s.y-i.y,30);break;case"circle":C.set(s,e.x,e.y),h(f,i,Math.abs(e.x-i.x))}var b=n.activeShape.corner,v=n.activeShape.ctx;b[0].x-=this.size(),b[0].y-=this.size(),b[1].x+=this.size(),b[1].y+=this.size(),v.canvas.width=Math.ceil(b[1].x-b[0].x),v.canvas.height=Math.ceil(b[1].y-b[0].y),v.lineCap=v.lineJoin=n.ctx.lineCap,v.lineWidth=n.ctx.lineWidth;var y=f.getImageData(b[0].x,b[0].y,v.canvas.width,v.canvas.height);v.putImageData(y,0,0),"free"!==n.type&&d.drawImage(v.canvas,b[0].x,b[0].y),f.clearRect(0,0,this.displayCtx.canvas.width,this.displayCtx.canvas.height);break;case"fill":break;case"select":}this.emit("action",{UID:t,op:"mouseup",value:e})}},t.prototype.undo=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.UID,t=this.users[e];if(0!==t.visible){var n=t.shapes.pop();this.shapes[n].visible=!1,t.recycle.push(n),--t.visible,this._clear(),o(this.displayCtx,this.shapes,--this.visible),this.emit("action",{UID:e,op:"undo",value:e})}},t.prototype.redo=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.UID,t=this.users[e];if(t.visible!==t.available){var n=t.recycle.pop();this.shapes[n].visible=!0,t.shapes.push(n),++t.visible,this._clear(),o(this.displayCtx,this.shapes,++this.visible),this.emit("action",{UID:e,op:"redo",value:e})}},t.prototype.clear=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.UID;if(this._clear(),e&&this.users[e]){var i=this.users[e];return i.isMouseDown=!1,i.shapes.forEach(function(e){t.shapes[e]&&(t.shapes[e].visible=!1,t.visible--)}),i.shapes=[],i.recycle=[],i.available=0,i.visible=0,this._clear(),void o(this.displayCtx,this.shapes,this.visible)}this.shapes=[],this.visible=0;for(var r in this.users){var s=this.users[r];s.shapes=[],s.recycle=[],s.available=0,s.visible=0,s.isMouseDown=!1}this.emit("action",{UID:n,op:"clear",value:null})},t.prototype._clear=function(){this.displayCtx.clearRect(0,0,this.width,this.height);for(var e in this.users){var t=this.users[e];t.ctx.clearRect(0,0,this.width,this.height)}},t.prototype.act=function(e){var t=e.UID,n=e.op,i=e.value,o=this.users[t];o||(this.users[t]=this.addUser(t)),this[n](i,t)},t.prototype.resize=function(e){if(e=parseInt(e),isNaN(e)||e<=0)throw new Error("白板宽度应是大于0的数字");var t=e/this.width,n=this.height*t;s(this.displayCtx,t);for(var i in this.users)s(this.users[i].ctx,t);this.shapes.forEach(function(e){s(e.ctx,t),e.corner[0].x*=t,e.corner[0].y*=t,e.corner[1].x*=t,e.corner[1].y*=t}),this.width=e,this.height=n},t.prototype.addUser=function(e){if(this.users[e])return this.users[e];var t=new S(e),n=t.ctx.canvas,i=this.displayCtx.canvas;return n.style.position="absolute",n.style.boxSizing="content-box",n.style.top=i.clientTop+"px",n.style.left=i.clientLeft+"px",n.style.zIndex=i.style.zIndex+1,n.style.cursor="crosshair",n.style.width=this.width+"px",n.style.height=this.height+"px",n.width=this.width,n.height=this.height,t.ctx.lineCap=t.ctx.lineJoin="round",this.users[e]=t,this.users[e]},t.prototype.destory=function(){this.users[this.UID]&&(this.switchEventListener(!1),this.container.removeChild(this.users[this.UID].ctx.canvas)),this.container.removeChild(this.displayCtx.canvas),this.displayCtx=null,this.shapes=[],this.visible=0},t.prototype.dispatcher=function(e){e.preventDefault(),e=e.originalEvent?e.originalEvent:e;var t=this.displayCtx.canvas.getBoundingClientRect(),n=void 0,i=void 0;e.touches&&1===e.touches.length?(n=e.touches[0].clientX,i=e.touches[0].clientY):e.changedTouches&&1===e.changedTouches.length?(n=e.changedTouches[0].clientX,i=e.changedTouches[0].clientY):(n=e.clientX,i=e.clientY),n||0===n||(n=0),i||0===i||(i=0);var o=new C(n-t.left,i-t.top),r=e.type;"touchstart"===r&&(r="mousedown"),"touchmove"===r&&(r="mousemove"),"touchend"===r&&(r="mouseup"),this[r](o)},t}(_["default"]);t["default"]=w;var C=function(){function e(t,n){(0,p["default"])(this,e),this.x=t||0,this.y=n||0}return e.prototype.copy=function(){return new e(this.x,this.y)},e.set=function(e,t,n){e.x=t,e.y=n},e}(),O=function T(e,t,n,i,o){(0,p["default"])(this,T),this.visible=!0,this.ctx=document.createElement("canvas").getContext("2d"),this.type=t,this.mode=e,this.color=i,this.size=n,this.corner=[o.copy(),o.copy()],this.transform=[],this.path=[],this.zIndex=0},S=function E(e){(0,p["default"])(this,E),this.UID=e,this.ctx=document.createElement("canvas").getContext("2d"),this.shapes=[],this.recycle=[],this.mode="draw",this.type="free",this.size=4,this.color="#000",this.isMouseDown=!1,this.start=new C(0,0),this.oldMid=new C(0,0),this.end=new C(0,0),this.visible=0,this.available=0,this.activeShape={}};e.exports=t["default"]},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(6),r=i(o),s=n(16),a=i(s),c=n(15),u=i(c),l=n(19),h=i(l),f=n(205),d=i(f),p="#f5455e",b="#238efa",v=function(e){function t(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r["default"])(this,t);var o=(0,a["default"])(this,e.call(this));return o.debug=i.debug||!1,o.limit=i.limit||80,o.data="",o.count=0,o.draw=new d["default"](n,i),o.draw.size(4),o.draw.color(p),o.draw.on("action",o.transform.bind(o)),setInterval(function(){o.data.length>0&&(o.emit("action",o.data),o.data="",o.count++)},o.limit),o}return(0,u["default"])(t,e),t.prototype.undo=function(){this.draw.undo()},t.prototype.clear=function(){this.draw.clear()},t.prototype.resize=function(e){this.draw.resize(e)},t.prototype.act=function(e){var t=this,n=e.UID,i=e.data;if(n!==this.draw.UID){this.draw.users[n]||(this.draw.addUser(n),this.draw.users[n].color=b);var o=i.split(";"),r=this.draw.width,s=this.draw.height;o.forEach(function(e){var i=e.split(":"),o=i[0],a=i.length>1?i[1].split(","):[],c={};switch(o){case"1":c.op="mousedown",c.value={x:Math.ceil(parseFloat(a[0])*r),y:Math.ceil(parseFloat(a[1])*s)};break;case"2":c.op="mousemove",c.value={x:Math.ceil(parseFloat(a[0])*r),y:Math.ceil(parseFloat(a[1])*s)};break;case"3":c.op="mouseup",c.value={x:Math.ceil(parseFloat(a[0])*r),y:Math.ceil(parseFloat(a[1])*s)};break;case"4":c.op="undo",c.value=n;break;case"5":return;case"6":c.op="clear",t.data+="7:0,0;";break;case"7":c.op="clear",c.value=n;break;case"8":break;case"9":break;case"10":break;case"11":break;case"12":break;case"13":break;case"14":break;default:return}c.UID=n,t.draw.act(c)})}},t.prototype.destory=function(){this.draw.destory()},t.prototype.transform=function(e){if(e.UID===this.draw.UID){var t="",n=[],i=this.draw.width,o=this.draw.height;switch(e.op){case"mousedown":t="1",n.push(e.value.x/i,e.value.y/o);break;case"mousemove":t="2",n.push(e.value.x/i,e.value.y/o);break;case"mouseup":t="3",n.push(e.value.x/i,e.value.y/o);break;case"undo":t="4",n.push(0,0);break;case"color":return void(this.color=parseInt(e.value.substring(1),16));case"clear":t="6",n.push(0,0);break;default:return}this.data+=t+":"+n.join(",")+";",this.debug&&(this.data+="5:"+this.count+",0;")}},t}(h["default"]);t["default"]=v,e.exports=t["default"]},function(e,t){"use strict";t.__esModule=!0,t["default"]={getAccount:function(){return this.baseGetAccount()},getUid:function(){return this.baseGetUid()},isCurrentChannelId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.baseIsCurrentChannelId(e)},notCurrentChannelId:function(e){return!this.isCurrentChannelId(e)},startSession:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.sessionStarted?Promise.resolve():(this.sessionStarted=!0,e.wssArr&&(this.imInfo.serverAddrs=e.wssArr.constructor===Array?e.wssArr:[e.wssArr]),this.baseStartSession(),this.controller.startSession(this.imInfo))},stopSession:function(){return this.resetWhenHangup(),Promise.resolve()},leaveChannel:function(){this.stopSession()},undo:function(){this.controller.undo()},redo:function(){this.controller.redo()},clear:function(){this.controller.clear()},resize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.controller.resize(e)},sendCustomData:function(e){this.controller.sendCustomData(e)},send:function(e){this.controller.send(e)}},e.exports=t["default"]},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(6),r=i(o),s=n(16),a=i(s),c=n(15),u=i(c),l=n(144),h=i(l),f=n(306),d=i(f),p=n(117),b=n(55),v=n(41),y=3,g=null,m=function(e){function t(n){(0,r["default"])(this,t);var i=(0,a["default"])(this,e.call(this,n));return i.logger=n.logger||{},i.resetStatus(),i}return(0,u["default"])(t,e),t}(h["default"]);t["default"]=m;var _=m.prototype;_.resetStatus=function(){this.wbAdapter&&(this.wbAdapter.destory(),this.wbAdapter=null),this.nodeTimer&&(clearInterval(this.nodeTimer),this.nodeTimer=null),this.reConnectCount=0,this.recv_bytes=0,this.send_bytes=0},_.startSession=function(e){var t=this;return this.imInfo=e||this.imInfo,this.connect().then(function(){"meeting"===t.imInfo.sessionMode&&t.initWbAdapter()})},_.connect=function(){var e=this;return this._startSession().then(function(t){return g=t,e.reConnectCount=0,new Promise(function(t,n){e.wbLogin(),e.once("LoginSuccess",function(n){e.logger.log("once LoginSuccess-->",n),t(g)}),e.once("LoginFailed",function(t){e.logger.log("once LoginFailed-->",t),n(t)})})})},_.stopSession=function(){return this.wbLogout(),this._stopSession(),this.resetStatus(),Promise.resolve()},_.setSessionConfig=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};v.tool.merge(this.sessionConfig,e)},_.initWbAdapter=function(){!this.wbAdapter&&this.info.container&&(this.wbAdapter=new d["default"](this.info.container,{UID:this.imInfo.uid,width:parseInt(this.sessionConfig.width)||400,height:parseInt(this.sessionConfig.height)||400,limit:60,debug:this.info.debug}),this.wbAdapter.on("action",this.onWbAdapterData.bind(this)))},_.onWbAdapterData=function(e,t){t&&(e=JSON.stringify({isCustom:1,data:e}));var n={data:e};this.sendStats(e),"p2p"===this.imInfo.sessionMode&&(n.dst_client_id=this.target&&this.target.uid||0);var i="p2p"===this.imInfo.sessionMode?p.serializeWb.gateWay.toUser:p.serializeWb.gateWay.broadcast;this.sendMsg(i,n)},_.wbLogin=function(){var e={token:this.imInfo.cid,client_type:2,client_net:2,client_os:6,client_support_record:~~this.sessionConfig.record};this.sendMsg(p.serializeWb.gateWay.login,e)},_.wbLogout=function(){var e=Date.now(),t={timestamp:e,recv_bytes:this.recv_bytes,send_bytes:this.send_bytes};this.sendMsg(p.serializeWb.gateWay.logout,t)},_.sendMsg=function(e,t){var n={type:e,uid:+this.imInfo.uid,cid:+this.imInfo.cid,version:31,content:{params:t}};this.signal&&this.signal.send(n)},_.onSignalMessage=function(e){if(e&&e.cid&&e.uid&&(e.cid=+e.cid,e.uid=+e.uid),e.cid!==this.imInfo.cid)return console.error("websocket message not belong to this session");var t=p.unserializeWb.gateWay[e.type];this["on"+t]&&this["on"+t](e)},_.onloginAck=function(e){var t=this,n=e.content.params.auth_result-0;return 200!==n?(this.logger.error("服务器验证不通过, 断开连接"),void this.emit("LoginFailed",{code:n,error:"服务器验证不通过, 断开连接"})):(this.logger.log("白板服务器登录成功",e),this.emit("LoginSuccess"),void("p2p"===this.imInfo.sessionMode&&(this.logger.log("45s之内等待对方加入"),this.userJoinTimeoutId=setTimeout(function(){t.userJoinTimeoutId&&0===Object.keys(t.remoteNodeStatus).length&&t.emit("error",{error:"点对点对方登录超时, 断开连接"})},45e3))))},_.onjoin=function(e){this.logger.log(e);var t=e.content&&e.content.params&&e.content.params.client_id;this.startNodeMonitor(t),"p2p"===this.imInfo.sessionMode&&(this.target={uid:t},this.initWbAdapter(),this.userJoinTimeoutId&&clearTimeout(this.userJoinTimeoutId),this.userJoinTimeoutId=0),this.emit("userJoined",{uid:t,cid:e.cid})},_.onkeep_alive_node=function(e){var t=e.uid,n=this.remoteNodeStatus;n[t]=n[t]||{now:Date.now(),total:45},n[t].now=Date.now(),n[t].total=45},_.onlogout=function(e){this.logger.log("onlogout",e),this.emit("leaveChannel",{uid:e.uid,channelId:e.cid})},_.ontoUser=function(e){this.onData(e)},_.onbroadcast=function(e){this.onData(e)},_.onData=function(e){var t=e.content&&e.content.params&&e.content.params.data,n=e.uid;this.receiveStats(t);var i=void 0;try{i=JSON.parse(t||null)}catch(o){i=t}return this.onkeep_alive_node({uid:n}),this.info.isCustom?void this.emit("data",{uid:n,data:i}):i.constructor===Object?void(i.isCustom&&this.emit("customData",{UID:e.uid,data:i.data})):(this.wbAdapter&&this.wbAdapter.act({UID:e.uid,data:i}),this.remoteNodeStatus[e.uid].now=Date.now(),void(this.remoteNodeStatus[e.uid].total=45))},_.startNodeMonitor=function(e){var t=this,n=this.remoteNodeStatus;n[e]=n[e]||{now:Date.now(),total:45},n[e].now=Date.now(),this.nodeTimer||(this.nodeTimer=setInterval(function(){var e=Date.now();Object.keys(n).map(function(i){return e-n[i].now>5e4||n[i].total<=0?(t.logger.warn("节点45s超时离开:",i),void t.emit("leaveChannel",{uid:i,type:b.constantBB.HANGUP_TYPE_TIMEOUT,channelId:t.imInfo.cid})):e-n[i].now>5e3?void(n[i].total-=5):void 0}),t.logger.log("节点巡查结束")},5e3))},_.onSignalTimeout=function(){var e=this;return this.emit("disconnected"),this.reConnectCount>=y?void this.emit("signalClosed"):(this.reConnectCount++,this.emit("willReconnect",this.reConnectCount),this.logger.log("3s后尝试第"+this.reConnectCount+"次重连服务器"),this._stopSignal(),void setTimeout(function(){e.logger.log("开始第"+e.reConnectCount+"次重连服务器"),g&&e.imInfo.serverAddrs.unshift(g),e.connect().then(function(){e.emit("connected",e.reConnectCount)})["catch"](function(t){e.logger.error("reconnect error",t),e.onSignalTimeout()})},3e3))},_.undo=function(){this.wbAdapter&&this.wbAdapter.undo()},_.redo=function(){this.wbAdapter&&this.wbAdapter.redo()},_.clear=function(){this.wbAdapter&&this.wbAdapter.clear()},_.resize=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.wbAdapter&&this.wbAdapter.resize(e.width)},_.sendCustomData=function(e){this.onWbAdapterData(e,!0)},_.sendStats=function(e){this.send_bytes+=e.length},_.receiveStats=function(e){this.recv_bytes+=e.length},e.exports=t["default"]},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var i=n(162),o={};o.install=function(e){var t=e.fn,n=e.util,o=i({util:n});t.initWhiteBoard=function(e){return n.verifyOptions(e,"type accounts","wb::initWhiteBoard"),e.pushContent="",e.custom="",e.pushConfig||(e.pushConfig={}),e.pushConfig.webrtcEnable=e.webrtcEnable,e.pushConfig=new o(e.pushConfig),this.cbAndSendCmd("initWhiteBoard",e)},t.wbKeepCalling=function(e){return n.verifyOptions(e,"type accounts channelId","wb::wbKeepCalling"),this.cbAndSendCmd("wbKeepCalling",e)},t.wbCalleeAck=function(e){return n.verifyOptions(e,"account channelId type accepted","wb::wbCalleeAck"),this.cbAndSendCmd("wbCalleeAck",e)},t.wbHangup=function(e){return n.verifyOptions(e,"channelId","wb::wbHangup"),this.cbAndSendCmd("wbHangup",e)},t.wbControl=function(e){return n.verifyOptions(e,"channelId type","wb::wbControl"),this.cbAndSendCmd("wbControl",e)},t.wbCreateChannel=function(e){return this.cbAndSendCmd("wbCreateChannel",e)},t.wbJoinChannel=function(e){return n.verifyOptions(e,"channelName","wb::wbJoinChannel"),n.verifyBooleanWithDefault(e,"liveEnable",!1,"","wb::wbJoinChannel"),n.verifyBooleanWithDefault(e,"webrtcEnable",!1,"","wb::wbJoinChannel"),this.cbAndSendCmd("wbJoinChannel",{channelName:e.channelName,liveOption:{liveEnable:e.liveEnable?1:0,webrtcEnable:e.webrtcEnable?1:0}})},t.wbQueryAccountUidMap=function(e,t){return this.cbAndSendCmd("wbQueryAccountUidMap",{channelName:e,uids:t})}},e.exports=o},function(e,t){"use strict";var n={};n.install=function(e){var t=e.Protocol.fn;t.processDatatun=function(e){switch(e.cmd){case"initWhiteBoard":this.onWbInit(e);break;case"wbBeCalled":this.onWbBeCalled(e);break;case"wbKeepCalling":this.onWbKeepCalling(e);break;case"wbCalleeAck":break;case"wbNotifyCalleeAck":this.onWbNotifyCalleeAck(e);break;case"wbHangup":
break;case"wbNotifyHangup":this.onWbNotifyHangup(e);break;case"wbNotifyControl":this.onWbControl(e);break;case"wbNotifyCalleeAckSync":this.onWbNotifyCalleeAckSync(e);break;case"wbNotifyRecord":break;case"wbCreateChannel":break;case"wbJoinChannel":this.wbJoinChannel(e);break;case"wbNotifyJoin":this.onWbNotifyJoin(e)}},t.onWbInit=function(e){if(!e.error){var t=e.obj.type;e.obj=e.content,e.obj.type=t,e.obj.accounts=e.obj.keepCallingAccounts,this.setCurrentWhiteBoard(e.obj.channelId),this.wbKeepCalling(e)}},t.setCurrentWhiteBoard=function(e){this.currentWhiteBoardChannelId=e},t.onWbKeepCalling=function(e){e.error||e.content.accounts.length&&this.wbKeepCalling(e)},t.wbKeepCalling=function(e){var t=this,n=e.obj,i=n.type,o=n.accounts,r=n.channelId;o&&o.length&&setTimeout(function(){t.currentWhiteBoardChannelId&&t.currentWhiteBoardChannelId===r&&t.api.wbKeepCalling({type:i,accounts:o,channelId:r})["catch"](function(){})},3e3)},t.onWbBeCalled=function(e){e.error||this.emitAPI({type:"wbBeCalled",obj:e.content})},t.onWbNotifyCalleeAck=function(e){e.error||this.emitAPI({type:"wbNotifyCalleeAck",obj:e.content})},t.onWbNotifyHangup=function(e){e.error||this.emitAPI({type:"wbNotifyHangup",obj:e.content})},t.onWbControl=function(e){e.error||this.emitAPI({type:"wbControl",obj:e.content})},t.onWbNotifyCalleeAckSync=function(e){e.error||this.emitAPI({type:"wbNotifyCalleeAckSync",obj:e.content})},t.onWbNotifyJoin=function(e){e.error||this.emitAPI({type:"wbNotifyJoin",obj:e.content})},t.wbJoinChannel=function(e){e.obj=e.content}},e.exports=n},function(e,t){"use strict";var n=11,i={wb:{id:n,initWhiteBoard:1,wbKeepCalling:2,wbCalleeAck:4,wbNotifyCalleeAck:5,wbHangup:8,wbNotifyHangup:9,wbControl:10,wbNotifyControl:11,wbNotifyRecord:12,wbCreateChannel:13,wbJoinChannel:14,wbNotifyJoin:15,wbQueryAccountUidMap:16}},o={initWhiteBoard:{sid:n,cid:i.wb.initWhiteBoard,params:[{type:"StrArray",name:"type"},{type:"StrArray",name:"accounts"},{type:"String",name:"pushContent"},{type:"String",name:"custom"},{type:"Property",name:"pushConfig"}]},wbKeepCalling:{sid:n,cid:i.wb.wbKeepCalling,params:[{type:"StrArray",name:"accounts"},{type:"long",name:"channelId"}]},wbCalleeAck:{sid:n,cid:i.wb.wbCalleeAck,params:[{type:"long",name:"channelId"},{type:"bool",name:"accepted"}]},wbHangup:{sid:n,cid:i.wb.wbHangup,params:[{type:"long",name:"channelId"}]},wbControl:{sid:n,cid:i.wb.wbControl,params:[{type:"long",name:"channelId"},{type:"byte",name:"type"},{type:"string",name:"info"}]},wbCreateChannel:{sid:n,cid:i.wb.wbCreateChannel,params:[{type:"String",name:"channelName"},{type:"String",name:"custom"},{type:"String",name:"webrtcEnable"}]},wbJoinChannel:{sid:n,cid:i.wb.wbJoinChannel,params:[{type:"String",name:"channelName"},{type:"Property",name:"liveOption"}]},wbQueryAccountUidMap:{sid:n,cid:i.wb.wbQueryAccountUidMap,params:[{type:"String",name:"channelName"},{type:"LongArray",name:"uids"}]}},r="datatun",s={"11_1":{service:r,cmd:"initWhiteBoard",response:[{type:"Number",name:"timetag"},{type:"Number",name:"uid"},{type:"Number",name:"channelId"},{type:"PropertyArray",name:"turnInfoTag"},{type:"StrArray",name:"keepCallingAccounts"},{type:"StrLongMap",name:"accountUidMap"},{type:"bool",name:"p2p"},{type:"String",name:"clientConfig"}]},"11_2":{service:r,cmd:"wbKeepCalling",response:[{type:"StrArr",name:"accounts"}]},"11_3":{service:r,cmd:"wbBeCalled",response:[{type:"Number",name:"timetag"},{type:"String",name:"account"},{type:"Number",name:"channelId"},{type:"PropertyArray",name:"turnInfoTag"},{type:"StrLongMap",name:"accountUidMap"},{type:"bool",name:"p2p"},{type:"String",name:"custom"},{type:"Number",name:"uid"},{type:"String",name:"clientConfig"},{type:"Property",name:"pushConfig"}]},"11_4":{service:r,cmd:"wbCalleeAck",response:[]},"11_5":{service:r,cmd:"wbNotifyCalleeAck",response:[{type:"long",name:"channelId"},{type:"String",name:"account"},{type:"bool",name:"accepted"}]},"11_6":{service:r,cmd:"wbNotifyCalleeAckSync",response:[{type:"String",name:"timetag"},{type:"long",name:"channelId"},{type:"byte",name:"type"},{type:"bool",name:"accepted"},{type:"byte",name:"fromClientType"}]},"11_7":{service:r,cmd:"xxxx",response:[]},"11_8":{service:r,cmd:"wbHangup",response:[]},"11_9":{service:r,cmd:"wbNotifyHangup",response:[{type:"long",name:"timetag"},{type:"long",name:"channelId"},{type:"String",name:"account"}]},"11_10":{service:r,cmd:"wbControl",response:[]},"11_11":{service:r,cmd:"wbNotifyControl",response:[{type:"String",name:"account"},{type:"byte",name:"type"},{type:"string",name:"info"},{type:"long",name:"channelId"}]},"11_12":{service:r,cmd:"wbNotifyRecord",response:[{type:"Property",name:"msg"}]},"11_13":{service:r,cmd:"wbCreateChannel",response:[{type:"long",name:"timetag"}]},"11_14":{service:r,cmd:"wbJoinChannel",response:[{type:"long",name:"timetag"},{type:"long",name:"channelId"},{type:"StrLongMap",name:"accountUidMap"},{type:"Property",name:"turnInfoTag"},{type:"String",name:"custom"}]},"11_15":{service:r,cmd:"wbNotifyJoin",response:[{type:"Long",name:"channelId"},{type:"StrLongMap",name:"accountUidMap"}]},"11_16":{service:r,cmd:"wbQueryAccountUidMap",response:[]}};e.exports={idMap:i,cmdConfig:o,packetConfig:s}},function(e,t){"use strict";e.exports={pushConfig:{enable:1,needBadge:2,needPushNick:3,pushContent:4,custom:5,pushPayload:6,sound:7,webrtcEnable:10},liveOption:{liveEnable:1,webrtcEnable:2},turnInfoTag:{channelId:0,tunnelServer:1,proxyServer:2,stunServer:3,type:4,dispatchServer:5}}},function(e,t){"use strict";e.exports={pushConfig:{1:"enable",2:"needBadge",3:"needPushNick",4:"pushContent",5:"custom",6:"pushPayload",7:"sound",10:"webrtcEnable"},liveOption:{1:"liveEnable",2:"webrtcEnable"},turnInfoTag:{0:"channelId",1:"tunnelServer",2:"proxyServer",3:"stunServer",4:"type",5:"dispatchServer"}}},,,,,,,,,,function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(6),r=i(o),s=n(16),a=i(s),c=n(15),u=i(c),l=n(60),h=i(l),f=n(143),d=i(f),p=n(308),b=i(p),v=n(41),y=n(55),g=n(307),m=i(g);h["default"].CURRENT.SDK_TYPE=h["default"].SDK_TYPE.WHITEBOARD;var _=function(e){function t(n){(0,r["default"])(this,t);var i=(0,a["default"])(this,e.call(this,n));return i.initWB(),i}return(0,u["default"])(t,e),t.prototype.initWB=function(){if(!this.nim)throw new Error({error:"请传入nim实例"});this.initProtocol(),this.initController()},t.prototype.initProtocol=function(){var e=this.nim;e.on("wbBeCalled",this.onBeCalled.bind(this)),e.on("wbNotifyCalleeAck",this.onCalleeAck.bind(this)),e.on("wbNotifyHangup",this.onHangup.bind(this)),e.on("wbControl",this.onControl.bind(this)),e.on("wbNotifyCalleeAckSync",this.onCalleeAckSync.bind(this)),e.on("wbNotifyJoin",this.onNotifyJoin.bind(this))},t.prototype.initController=function(){var e=this;window.myWbContrl=this.controller=new b["default"]({appKey:this.nim&&this.nim.options.appKey,debug:this.debug,container:this.container,logger:this.logger,client:this,isCustom:this.isCustom}),this.controller.on("userJoined",this.onUserJoin.bind(this)),this.controller.on("signalClosed",function(t){e.emit("signalClosed",t)}),this.controller.on("willReconnect",function(t){e.emit("willReconnect",t)}),this.controller.on("disconnected",function(t){e.emit("disconnected",t)}),this.controller.on("connected",function(t){e.emit("connected",t)}),this.controller.on("leaveChannel",this.onUserLeft.bind(this)),this.controller.on("error",function(t){e.emit("error",t)}),this.controller.on("customData",function(t){e.emit("customData",t)}),this.controller.on("data",function(t){e.emit("data",{account:e.getAccountWithUid(t.uid),data:t.data})}),window.addEventListener("beforeunload",this.beforeunload.bind(this))},t.prototype.serializeType=function(e,t){return t&&t!==y.constantBB.CALL_TYPE_NONE?t!==y.constantBB.CALL_TYPE_AUDIO?[e]:[t,e]:[e]},t.prototype.unserializeType=function(e){var t={},n=-1;return e.map(function(e,i){e===y.constantBB.CALL_TYPE_AUDIO&&(t.netcallType=y.constantBB.CALL_TYPE_AUDIO,n=i)}),n!==-1&&e.splice(t.i,1),t.type=e[0],t},t.prototype.call=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.account,n=e.type,i=e.netcallType,o=e.pushConfig,r=e.sessionConfig;return this.calling=!0,this.isCaller=!0,this.callee=t,this.target.account=t,r&&(r.signalStartTime=Date.now(),this.setSessionConfig(r)),this.initWhiteBoard({type:n,netcallType:i,pushConfig:o})},t.prototype.initWhiteBoard=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.type,i=t.netcallType,o=t.pushConfig;this.type=n,this.netcallType=i||y.constantBB.CALL_TYPE_NONE,this.setSessionConfig({signalStartTime:Date.now()});var r={type:this.serializeType(this.type,this.netcallType),accounts:[this.callee],pushConfig:o};return r.webrtcEnable=!0,this.nim.initWhiteBoard(r).then(function(t){e.signalInited=!0,e.sessionMode="p2p",e.logger.log("initWhiteBoard:",t),e.callerInfo=e.wbFormat(t),e.imInfo=e.callerInfo,e.imInfo.sessionMode=e.sessionMode,e.channelId=t.channelId})["catch"](function(t){return e.setSessionConfig({signalEndTime:Date.now()}),e.resetWhenHangup(),Promise.reject(t)})},t.prototype.response=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.fn="wbCalleeAck",this.baseResponse(e)},t.prototype.control=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.info="",e.fn="wbControl",this.baseControl(e)},t.prototype.hangup=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.fn="wbHangup",e.recordType="cancelWhiteBoardBeforeAccept",this.baseHangup(e)},t.prototype.createChannel=function(e){return e.channelName?(e.custom=e.custom||"",this.baseCreateChannel("wbCreateChannel",e).then(function(e){return Promise.resolve(e)})["catch"](function(e){return Promise.reject(e)})):Promise.reject("缺少参数 channelName")},t.prototype.joinChannel=function(e){var t=this;if(this.signalInited)return Promise.reject("已经加入房间");if(!e.channelName)return Promise.reject("缺少参数 channelName");var n=e.sessionConfig;return n&&(v.tool.merge(this,{sessionConfig:n}),this.setSessionConfig(n),this.setSessionConfig({signalStartTime:Date.now()})),this.baseJoinChannel("wbJoinChannel",{channelName:e.channelName}).then(function(i){var o=void 0;return i.turnInfoTag&&(o=i.turnInfoTag.dispatchServer&&JSON.parse(i.turnInfoTag.dispatchServer)||i.turnInfoTag.tunnelServer),o&&o.constructor===String&&(o=o.split(";")),o&&o.constructor===Object&&(o=o.webrtcarray),i.serverAddrs=o||[],t.type=i.type=i.type,i.account=t.nim.account,i.sessionConfig=n,t.imInfo=i,setTimeout(function(){t.sessionStarted||t.startSession(e)},200),Promise.resolve({uid:i.uid,account:t.nim.account,type:i.type})})["catch"](function(e){return Promise.reject(e)})},t.prototype.onBeCalled=function(e){e=this.wbFormat(e),this.channelId||(this.signalInited=!0,this.channelId=e.channelId,this.beCalledInfo=e,this.logger.log("beCalling",e)),this.emit("beCalling",e)},t.prototype.wbFormat=function(e){var t=e,n=t.turnInfoTag;return n&&n.constructor===Array?(n.map(function(t){/[01]/.test(t.type)?(e.netcallType=t.type,e.rtcServerMap=t.dispatchServer,e.serverMap=JSON.parse(JSON.stringify(t.dispatchServer))):(e.type=t.type,e.wbServerMap=t.dispatchServer)}),e.netcallType=e.netcallType||y.constantBB.CALL_TYPE_NONE,e=this.format(e),e.serverAddrs=JSON.parse(JSON.stringify(e.wbServerMap))||[],e):e},t.prototype.resetWhenHangup=function(){this.controller.stopSession(),this.resetStatus(),this.sessionStarted=!1},t}(d["default"]),w=_.prototype;w=Object.assign(w,m["default"]),t["default"]=_,e.exports=t["default"]},,function(e,t){"use strict";t.__esModule=!0,t["default"]=function(){return!!WebSocket},e.exports=t["default"]}])});