easemob-websdk 4.1.0-beta2 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Easemob-chat.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.websdk=t():e.websdk=t()}(this,(function(){return function(){var __webpack_modules__={5317:function(e){"use strict";e.exports=function(e,t){for(var r=new Array(arguments.length-1),n=0,o=2,i=!0;o<arguments.length;)r[n++]=arguments[o++];return new Promise((function(o,a){r[n]=function(e){if(i)if(i=!1,e)a(e);else{for(var t=new Array(arguments.length-1),r=0;r<t.length;)t[r++]=arguments[r];o.apply(null,t)}};try{e.apply(t||null,r)}catch(e){i&&(i=!1,a(e))}}))}},8660:function(e,t){"use strict";var r=t;r.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var n=new Array(64),o=new Array(123),i=0;i<64;)o[n[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;r.encode=function(e,t,r){for(var o,i=null,a=[],s=0,c=0;t<r;){var u=e[t++];switch(c){case 0:a[s++]=n[u>>2],o=(3&u)<<4,c=1;break;case 1:a[s++]=n[o|u>>4],o=(15&u)<<2,c=2;break;case 2:a[s++]=n[o|u>>6],a[s++]=n[63&u],c=0}s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,a)),s=0)}return c&&(a[s++]=n[o],a[s++]=61,1===c&&(a[s++]=61)),i?(s&&i.push(String.fromCharCode.apply(String,a.slice(0,s))),i.join("")):String.fromCharCode.apply(String,a.slice(0,s))};var a="invalid encoding";r.decode=function(e,t,r){for(var n,i=r,s=0,c=0;c<e.length;){var u=e.charCodeAt(c++);if(61===u&&s>1)break;if(void 0===(u=o[u]))throw Error(a);switch(s){case 0:n=u,s=1;break;case 1:t[r++]=n<<2|(48&u)>>4,n=u,s=2;break;case 2:t[r++]=(15&n)<<4|(60&u)>>2,n=u,s=3;break;case 3:t[r++]=(3&n)<<6|u,s=0}}if(1===s)throw Error(a);return r-i},r.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},4495:function(e){"use strict";function t(e,r){"string"==typeof e&&(r=e,e=void 0);var n=[];function o(e){if("string"!=typeof e){var r=i();if(t.verbose&&console.log("codegen: "+r),r="return "+r,e){for(var a=Object.keys(e),s=new Array(a.length+1),c=new Array(a.length),u=0;u<a.length;)s[u]=a[u],c[u]=e[a[u++]];return s[u]=r,Function.apply(null,s).apply(null,c)}return Function(r)()}for(var l=new Array(arguments.length-1),p=0;p<l.length;)l[p]=arguments[++p];if(p=0,e=e.replace(/%([%dfijs])/g,(function(e,t){var r=l[p++];switch(t){case"d":case"f":return String(Number(r));case"i":return String(Math.floor(r));case"j":return JSON.stringify(r);case"s":return String(r)}return"%"})),p!==l.length)throw Error("parameter count mismatch");return n.push(e),o}function i(t){return"function "+(t||r||"")+"("+(e&&e.join(",")||"")+"){\n "+n.join("\n ")+"\n}"}return o.toString=i,o}e.exports=t,t.verbose=!1},3745:function(e){"use strict";function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],n=0;n<r.length;)r[n].fn===t?r.splice(n,1):++n;return this},t.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},8551:function(e,t,r){"use strict";e.exports=i;var n=r(5317),o=r(491)("fs");function i(e,t,r){return"function"==typeof t?(r=t,t={}):t||(t={}),r?!t.xhr&&o&&o.readFile?o.readFile(e,(function(n,o){return n&&"undefined"!=typeof XMLHttpRequest?i.xhr(e,t,r):n?r(n):r(null,t.binary?o:o.toString("utf8"))})):i.xhr(e,t,r):n(i,this,e,t)}i.xhr=function(e,t,r){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===n.readyState){if(0!==n.status&&200!==n.status)return r(Error("status "+n.status));if(t.binary){var e=n.response;if(!e){e=[];for(var o=0;o<n.responseText.length;++o)e.push(255&n.responseText.charCodeAt(o))}return r(null,"undefined"!=typeof Uint8Array?new Uint8Array(e):e)}return r(null,n.responseText)}},t.binary&&("overrideMimeType"in n&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.responseType="arraybuffer"),n.open("GET",e),n.send()}},9059:function(e){"use strict";function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),n=128===r[3];function o(e,n,o){t[0]=e,n[o]=r[0],n[o+1]=r[1],n[o+2]=r[2],n[o+3]=r[3]}function i(e,n,o){t[0]=e,n[o]=r[3],n[o+1]=r[2],n[o+2]=r[1],n[o+3]=r[0]}function a(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],t[0]}function s(e,n){return r[3]=e[n],r[2]=e[n+1],r[1]=e[n+2],r[0]=e[n+3],t[0]}e.writeFloatLE=n?o:i,e.writeFloatBE=n?i:o,e.readFloatLE=n?a:s,e.readFloatBE=n?s:a}():function(){function t(e,t,r,n){var o=t<0?1:0;if(o&&(t=-t),0===t)e(1/t>0?0:2147483648,r,n);else if(isNaN(t))e(2143289344,r,n);else if(t>34028234663852886e22)e((o<<31|2139095040)>>>0,r,n);else if(t<11754943508222875e-54)e((o<<31|Math.round(t/1401298464324817e-60))>>>0,r,n);else{var i=Math.floor(Math.log(t)/Math.LN2);e((o<<31|i+127<<23|8388607&Math.round(t*Math.pow(2,-i)*8388608))>>>0,r,n)}}function a(e,t,r){var n=e(t,r),o=2*(n>>31)+1,i=n>>>23&255,a=8388607&n;return 255===i?a?NaN:o*(1/0):0===i?1401298464324817e-60*o*a:o*Math.pow(2,i-150)*(a+8388608)}e.writeFloatLE=t.bind(null,r),e.writeFloatBE=t.bind(null,n),e.readFloatLE=a.bind(null,o),e.readFloatBE=a.bind(null,i)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=128===r[7];function o(e,n,o){t[0]=e,n[o]=r[0],n[o+1]=r[1],n[o+2]=r[2],n[o+3]=r[3],n[o+4]=r[4],n[o+5]=r[5],n[o+6]=r[6],n[o+7]=r[7]}function i(e,n,o){t[0]=e,n[o]=r[7],n[o+1]=r[6],n[o+2]=r[5],n[o+3]=r[4],n[o+4]=r[3],n[o+5]=r[2],n[o+6]=r[1],n[o+7]=r[0]}function a(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],r[4]=e[n+4],r[5]=e[n+5],r[6]=e[n+6],r[7]=e[n+7],t[0]}function s(e,n){return r[7]=e[n],r[6]=e[n+1],r[5]=e[n+2],r[4]=e[n+3],r[3]=e[n+4],r[2]=e[n+5],r[1]=e[n+6],r[0]=e[n+7],t[0]}e.writeDoubleLE=n?o:i,e.writeDoubleBE=n?i:o,e.readDoubleLE=n?a:s,e.readDoubleBE=n?s:a}():function(){function t(e,t,r,n,o,i){var a=n<0?1:0;if(a&&(n=-n),0===n)e(0,o,i+t),e(1/n>0?0:2147483648,o,i+r);else if(isNaN(n))e(0,o,i+t),e(2146959360,o,i+r);else if(n>17976931348623157e292)e(0,o,i+t),e((a<<31|2146435072)>>>0,o,i+r);else{var s;if(n<22250738585072014e-324)e((s=n/5e-324)>>>0,o,i+t),e((a<<31|s/4294967296)>>>0,o,i+r);else{var c=Math.floor(Math.log(n)/Math.LN2);1024===c&&(c=1023),e(4503599627370496*(s=n*Math.pow(2,-c))>>>0,o,i+t),e((a<<31|c+1023<<20|1048576*s&1048575)>>>0,o,i+r)}}}function a(e,t,r,n,o){var i=e(n,o+t),a=e(n,o+r),s=2*(a>>31)+1,c=a>>>20&2047,u=4294967296*(1048575&a)+i;return 2047===c?u?NaN:s*(1/0):0===c?5e-324*s*u:s*Math.pow(2,c-1075)*(u+4503599627370496)}e.writeDoubleLE=t.bind(null,r,0,4),e.writeDoubleBE=t.bind(null,n,4,0),e.readDoubleLE=a.bind(null,o,0,4),e.readDoubleBE=a.bind(null,i,4,0)}(),e}function r(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function n(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function o(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function i(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},491:function(module){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},7460:function(e,t){"use strict";var r=t,n=r.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},o=r.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),r=n(e),o="";r&&(o=t.shift()+"/");for(var i=0;i<t.length;)".."===t[i]?i>0&&".."!==t[i-1]?t.splice(--i,2):r?t.splice(i,1):++i:"."===t[i]?t.splice(i,1):++i;return o+t.join("/")};r.resolve=function(e,t,r){return r||(t=o(t)),n(t)?t:(r||(e=o(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?o(e+"/"+t):t)}},8601:function(e){"use strict";e.exports=function(e,t,r){var n=r||8192,o=n>>>1,i=null,a=n;return function(r){if(r<1||r>o)return e(r);a+r>n&&(i=e(n),a=0);var s=t.call(i,a,a+=r);return 7&a&&(a=1+(7|a)),s}}},8375:function(e,t){"use strict";var r=t;r.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)(r=e.charCodeAt(n))<128?t+=1:r<2048?t+=2:55296==(64512&r)&&56320==(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},r.read=function(e,t,r){if(r-t<1)return"";for(var n,o=null,i=[],a=0;t<r;)(n=e[t++])<128?i[a++]=n:n>191&&n<224?i[a++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,i[a++]=55296+(n>>10),i[a++]=56320+(1023&n)):i[a++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),a=0);return o?(a&&o.push(String.fromCharCode.apply(String,i.slice(0,a))),o.join("")):String.fromCharCode.apply(String,i.slice(0,a))},r.write=function(e,t,r){for(var n,o,i=r,a=0;a<e.length;++a)(n=e.charCodeAt(a))<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296==(64512&n)&&56320==(64512&(o=e.charCodeAt(a+1)))?(n=65536+((1023&n)<<10)+(1023&o),++a,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-i}},5491:function(e,t,r){var n,o,i;!function(a){"use strict";if(null!=t&&"number"!=typeof t.nodeType)e.exports=a();else if(null!=r.amdO)o=[],void 0===(i="function"==typeof(n=a)?n.apply(t,o):n)||(e.exports=i);else{var s=a(),c="undefined"!=typeof self?self:$.global;"function"!=typeof c.btoa&&(c.btoa=s.btoa),"function"!=typeof c.atob&&(c.atob=s.atob)}}((function(){"use strict";var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function t(e){this.message=e}return t.prototype=new Error,t.prototype.name="InvalidCharacterError",{btoa:function(r){for(var n,o,i=String(r),a=0,s=e,c="";i.charAt(0|a)||(s="=",a%1);c+=s.charAt(63&n>>8-a%1*8)){if((o=i.charCodeAt(a+=3/4))>255)throw new t("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");n=n<<8|o}return c},atob:function(r){var n=String(r).replace(/[=]+$/,"");if(n.length%4==1)throw new t("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,i,a=0,s=0,c="";i=n.charAt(s++);~i&&(o=a%4?64*o+i:i,a++%4)?c+=String.fromCharCode(255&o>>(-2*a&6)):0)i=e.indexOf(i);return c}}}))},7800:function(e,t,r){"use strict";r.r(t),r.d(t,{addUsersToChatRoom:function(){return E},addUsersToChatRoomAllowlist:function(){return z},addUsersToChatRoomWhitelist:function(){return V},blockChatRoomMember:function(){return P},blockChatRoomMembers:function(){return j},chatRoomBlockMulti:function(){return L},chatRoomBlockSingle:function(){return x},createChatRoom:function(){return p},deleteChatRoomSharedFile:function(){return ie},destroyChatRoom:function(){return h},disableSendChatRoomMsg:function(){return Z},enableSendChatRoomMsg:function(){return K},fetchChatRoomAnnouncement:function(){return re},fetchChatRoomSharedFileList:function(){return ae},getChatRoomAdmin:function(){return S},getChatRoomAllowlist:function(){return Q},getChatRoomAttributes:function(){return ce},getChatRoomBlacklist:function(){return W},getChatRoomBlacklistNew:function(){return F},getChatRoomBlocklist:function(){return q},getChatRoomDetails:function(){return d},getChatRoomMuteList:function(){return k},getChatRoomMuted:function(){return M},getChatRoomMutelist:function(){return U},getChatRoomSharedFilelist:function(){return se},getChatRoomWhitelist:function(){return $},getChatRooms:function(){return l},isChatRoomWhiteUser:function(){return ee},isInChatRoomAllowlist:function(){return te},joinChatRoom:function(){return _},leaveChatRoom:function(){return O},listChatRoomMember:function(){return R},listChatRoomMembers:function(){return I},modifyChatRoom:function(){return f},muteChatRoomMember:function(){return C},quitChatRoom:function(){return T},removeChatRoomAdmin:function(){return A},removeChatRoomAllowlistMember:function(){return Y},removeChatRoomAttribute:function(){return he},removeChatRoomAttributes:function(){return pe},removeChatRoomBlockMulti:function(){return B},removeChatRoomBlockSingle:function(){return D},removeChatRoomMember:function(){return y},removeChatRoomMembers:function(){return v},removeChatRoomWhitelistMember:function(){return X},removeMultiChatRoomMember:function(){return g},removeMuteChatRoomMember:function(){return N},removeSingleChatRoomMember:function(){return m},rmUsersFromChatRoomWhitelist:function(){return J},setChatRoomAdmin:function(){return b},setChatRoomAttribute:function(){return le},setChatRoomAttributes:function(){return ue},unblockChatRoomMember:function(){return G},unblockChatRoomMembers:function(){return H},unmuteChatRoomMember:function(){return w},updateChatRoomAnnouncement:function(){return ne},uploadChatRoomSharedFile:function(){return oe}}),r(900),r(3814),r(8668),r(514),r(4201),r(7095),r(3529),r(3535),r(7521),r(6864),r(1685),r(2486),r(4261);var n=r(3365),o=r(7480),i=r(7551),a=r(1222),s=r(6916),c=r(3681);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function l(e){var t=this;if("number"!=typeof e.pagenum||"number"!=typeof e.pagesize)throw Error("Invalid parameter");if(!a.XZ.call(this)){var r=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(r)}var u={pagenum:e.pagenum||1,pagesize:e.pagesize||20},l=this.context,p=l.orgName,h=l.appName,d=l.accessToken,f={url:this.apiUrl+"/"+p+"/"+h+"/chatrooms",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+d},data:u,success:function(t){"function"==typeof e.success&&e.success(t)},error:function(r){r.error&&r.error_description&&t.onError&&t.onError({type:n.E.WEBIM_CONNCTION_LOAD_CHATROOM_ERROR,message:r.error_description,data:r}),"function"==typeof e.error&&e.error(r)}};return s.kg.debug("Call getChatRooms",e),i.hj.call(this,f,c.fI.GET_CHATROOM_LIST)}function p(e){if("string"!=typeof e.name)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r={name:e.name,description:e.description,maxusers:e.maxusers,owner:this.user,members:e.members},u=this.context,l=u.orgName,p=u.appName,h=(u.accessToken,u.jid),d={url:"".concat(this.apiUrl,"/").concat(l,"/").concat(p,"/chatrooms?resource=").concat(h.clientResource),dataType:"json",type:"POST",data:JSON.stringify(r),headers:{Authorization:"Bearer "+e.token||0,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call createChatRoom",e),i.hj.call(this,d,c.fI.CREATE_CHATROOM)}function h(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=(r.accessToken,r.jid),h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(e.chatRoomId,"?resource=").concat(p.clientResource),dataType:"json",type:"DELETE",headers:{Authorization:"Bearer "+e.token||0},success:e.success,error:e.error};return s.kg.debug("Call destroyChatRoom",e),i.hj.call(this,h,c.fI.DESTROY_CHATROOM)}function d(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h={url:this.apiUrl+"/"+u+"/"+l+"/chatrooms/"+e.chatRoomId,dataType:"json",type:"GET",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getChatRoomDetails",e),i.hj.call(this,h,c.fI.GET_CHATROOM_DETAIL)}function f(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f={groupname:e.chatRoomName,description:e.description,maxusers:e.maxusers},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"?resource=").concat(h.clientResource),type:"PUT",data:JSON.stringify(f),dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call modifyChatRoom",e),i.hj.call(this,m,c.fI.MODIFY_CHATROOM)}function m(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId||"string"!=typeof e.username)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/users/").concat(f,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeChatRoomMember",e),i.hj.call(this,m,c.fI.REMOVE_CHATROOM_MEMBER)}var y=m;function g(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId||!Array.isArray(e.users))throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=e.chatRoomId,u=e.users.join(","),l=this.context,p=l.orgName,h=l.appName,d=l.accessToken,f=l.jid,m={url:"".concat(this.apiUrl,"/").concat(p,"/").concat(h,"/chatrooms/").concat(r,"/users/").concat(u,"?resource=").concat(f.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeChatRoomMembers",e),i.hj.call(this,m,c.fI.MULTI_REMOVE_CHATROOM_MEMBER)}var v=g;function E(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId||!Array.isArray(e.users))throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=e.chatRoomId,u={usernames:e.users},l=this.context,p=l.orgName,h=l.appName,d=l.accessToken,f=l.jid,m={url:"".concat(this.apiUrl,"/").concat(p,"/").concat(h,"/chatrooms/").concat(r,"/users?resource=").concat(f.clientResource),type:"POST",data:JSON.stringify(u),dataType:"json",headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call addUsersToChatRoom",e),i.hj.call(this,m,c.fI.ADD_USERS_TO_CHATROOM)}function _(e){if("string"!=typeof e.roomId||""===e.roomId)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(e.roomId,"/apply?resource=").concat(h.clientResource),dataType:"json",type:"POST",data:JSON.stringify({message:e.message||""}),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call joinChatRoom",e),i.hj.call(this,d,c.fI.JOIN_CHATROOM)}function T(e){var t=this;if("string"!=typeof e.roomId||""===e.roomId)throw Error("Invalid parameter");if(!a.XZ.call(this)){var r=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(r)}var u=this.context,l=u.orgName,p=u.appName,h=u.accessToken,d=u.jid,f={url:"".concat(this.apiUrl,"/").concat(l,"/").concat(p,"/chatrooms/").concat(e.roomId,"/quit?resource=").concat(d.clientResource),dataType:"json",type:"DELETE",headers:{Authorization:"Bearer "+h},success:function(r){t._load_msg_cache=t._load_msg_cache.filter((function(t){return(!t.isGroup||t.to!==e.roomId)&&t})),"function"==typeof e.success&&e.success(r)},error:e.error};return s.kg.debug("Call leaveChatRoom",e),i.hj.call(this,f,c.fI.QUIT_CHATROOM)}var O=T;function R(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(isNaN(e.pageNum)||e.pageNum<=0)throw Error('The parameter "pageNum" should be a positive number');if(isNaN(e.pageSize)||e.pageSize<=0)throw Error('The parameter "pageSize" should be a positive number');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r={pagenum:e.pageNum,pagesize:e.pageSize},u=this.context,l=u.orgName,p=u.appName,h=u.accessToken,d={url:this.apiUrl+"/"+l+"/"+p+"/chatrooms/"+e.chatRoomId+"/users",dataType:"json",type:"GET",data:r,headers:{Authorization:"Bearer "+h,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call listChatRoomMembers",e),i.hj.call(this,d,c.fI.LIST_CHATROOM_MEMBERS)}var I=R;function S(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.chatRoomId,d={url:this.apiUrl+"/"+u+"/"+l+"/chatrooms/"+h+"/admin",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getChatRoomAdmin",e),i.hj.call(this,d,c.fI.GET_CHATROOM_ADMIN)}function b(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f={newadmin:e.username},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/admin?resource=").concat(h.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call setChatRoomAdmin",e),i.hj.call(this,m,c.fI.SET_CHATROOM_ADMIN)}function A(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/admin/").concat(f,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeChatRoomAdmin",e),i.hj.call(this,m,c.fI.REMOVE_CHATROOM_ADMIN)}function C(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if("number"!=typeof e.muteDuration)throw Error('Invalid parameter: "muteDuration"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f={usernames:[e.username],mute_duration:e.muteDuration},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/mute?resource=").concat(h.clientResource),dataType:"json",type:"POST",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},data:JSON.stringify(f),success:e.success,error:e.error};return s.kg.debug("Call muteChatRoomMember",e),i.hj.call(this,m,c.fI.MUTE_CHATROOM_MEMBER)}function N(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/mute/").concat(f,"?resource=").concat(h.clientResource),dataType:"json",type:"DELETE",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call unmuteChatRoomMember",e),i.hj.call(this,m,c.fI.REMOVE_MUTE_CHATROOM_MEMBER)}var w=N;function M(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.chatRoomId,d={url:this.apiUrl+"/"+u+"/"+l+"/chatrooms/"+h+"/mute",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getChatRoomMutelist",e),i.hj.call(this,d,c.fI.GET_MUTE_CHATROOM_MEMBERS)}var k=M,U=M;function x(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/blocks/users/").concat(f,"?resource=").concat(h.clientResource),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call blockChatRoomMember",e),i.hj.call(this,m,c.fI.SET_CHATROOM_MEMBER_TO_BLACK)}var P=x;function L(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!Array.isArray(e.usernames))throw Error('Invalid parameter: "usernames"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f={usernames:e.usernames},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/blocks/users?resource=").concat(h.clientResource),data:JSON.stringify(f),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Chat blockChatRoomMembers:",m),i.hj.call(this,m,c.fI.MULTI_SET_CHATROOM_MEMBER_TO_BLACK)}var j=L;function D(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/blocks/users/").concat(f,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call unblockChatRoomMember",e),i.hj.call(this,m,c.fI.REMOVE_CHATROOM_MEMBER_BLACK)}var G=D;function B(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!Array.isArray(e.usernames))throw Error('Invalid parameter: "usernames"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f=e.usernames.join(","),m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/blocks/users/").concat(f,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call unblockChatRoomMembers",e),i.hj.call(this,m,c.fI.MULTI_REMOVE_CHATROOM_MEMBER_BLACK)}var H=B;function F(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.chatRoomId,d={url:this.apiUrl+"/"+u+"/"+l+"/chatrooms/"+h+"/blocks/users",type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getChatRoomBlocklist",e),i.hj.call(this,d,c.fI.GET_CHATROOM_BLOCK_MEMBERS)}var W=F,q=F;function Z(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/ban?resource=").concat(h.clientResource),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call disableSendChatRoomMsg",e),i.hj.call(this,f,c.fI.DISABLED_CHATROOM_SEND_MSG)}function K(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/ban?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call enableSendChatRoomMsg",e),i.hj.call(this,f,c.fI.ENABLE_CHATROOM_SEND_MSG)}function V(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!Array.isArray(e.users))throw Error('Invalid parameter: "users"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f={usernames:e.users},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/white/users?resource=").concat(h.clientResource),type:"POST",data:JSON.stringify(f),dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call addUsersToChatRoomWhitelist",e),i.hj.call(this,m,c.fI.ADD_USERS_TO_CHATROOM)}var z=V;function J(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if("string"!=typeof e.userName||""===e.userName)throw Error('Invalid parameter: "userName"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/white/users/").concat(e.userName,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeChatRoomAllowlistMember",e),i.hj.call(this,f,c.fI.REMOVE_CHATROOM_WHITE_USERS)}var X=J,Y=J;function $(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.chatRoomId,d={url:this.apiUrl+"/"+u+"/"+l+"/chatrooms/"+h+"/white/users",type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getChatRoomAllowlist",e),i.hj.call(this,d,c.fI.GET_CHATROOM_WHITE_USERS)}var Q=$;function ee(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if("string"!=typeof e.userName||""===e.userName)throw Error('Invalid parameter: "userName"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.chatRoomId,d={url:this.apiUrl+"/"+u+"/"+l+"/chatrooms/"+h+"/white/users/"+e.userName,type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call isInChatRoomAllowlist",e),i.hj.call(this,d,c.fI.CHECK_CHATROOM_WHITE_USER)}var te=ee;function re(e){if("string"!=typeof e.roomId||""===e.roomId)throw Error('Invalid parameter: "roomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.roomId,d={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(h,"/announcement"),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call fetchChatRoomAnnouncement",e),i.hj.call(this,d,c.fI.GET_CHATROOM_ANN)}function ne(e){if("string"!=typeof e.roomId||""===e.roomId)throw Error('Invalid parameter: "roomId"');if("string"!=typeof e.announcement)throw Error('Invalid parameter: "announcement"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.roomId,f={announcement:e.announcement},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/announcement?resource=").concat(h.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call updateChatRoomAnnouncement:",e),i.hj.call(this,m,c.fI.UPDATE_CHATROOM_ANN)}function oe(e){if("string"!=typeof e.roomId||""===e.roomId)throw Error('Invalid parameter: "roomId"');if("object"!==u(e.file))throw Error('Invalid parameter: "file"');if(a.XZ.call(this)){var t=this.context,r=t.orgName,n=t.appName,o=t.accessToken,l=t.jid,p=e.roomId;(0,i.cT)({uploadUrl:"".concat(this.apiUrl,"/").concat(r,"/").concat(n,"/chatrooms/").concat(p,"/share_files?resource=").concat(l.clientResource),onFileUploadProgress:e.onFileUploadProgress,onFileUploadComplete:e.onFileUploadComplete,onFileUploadError:e.onFileUploadError,onFileUploadCanceled:e.onFileUploadCanceled,accessToken:o,apiUrl:this.apiUrl,file:e.file,appKey:this.context.appKey},c.fI.UPLOAD_CHATROOM_FILE),s.kg.debug("Call uploadChatRoomSharedFile",e)}}function ie(e){if("string"!=typeof e.roomId||""===e.roomId)throw Error('Invalid parameter: "roomId"');if("string"!=typeof e.fileId||""===e.fileId)throw Error('Invalid parameter: "fileId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.roomId,f=e.fileId,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/share_files/").concat(f,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call deleteChatRoomSharedFile",e),i.hj.call(this,m,c.fI.DELETE_CHATROOM_FILE)}function ae(e){if("string"!=typeof e.roomId||""===e.roomId)throw Error('Invalid parameter: "roomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.roomId,d={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(h,"/share_files"),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json",accept:"application/json"},success:e.success,error:e.error};return s.kg.debug("Call fetchChatRoomSharedFileList",e),i.hj.call(this,d,c.fI.GET_CHATROOM_FILES)}var se=ae;function ce(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter chatRoomId: "+e.chatRoomId);if(e.attributeKeys&&!Array.isArray(e.attributeKeys))throw Error('"Invalid parameter attributeKeys": '+e.attributeKeys);if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=(r.jid,e.chatRoomId),d={keys:e.attributeKeys},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/metadata/chatroom/").concat(h),type:"POST",dataType:"json",data:JSON.stringify(d),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"}};return s.kg.debug("Call getChatRoomAttributes:",e),i.hj.call(this,f,c.fI.GET_CHATROOM_ATTRIBUTES).then((function(e){return{data:e.data,type:e.type}}))}function ue(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter chatRoomId: "+e.chatRoomId);if("object"!==u(e.attributes))throw Error("Invalid parameter attributes: "+e.attributes);if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,l=r.orgName,p=r.appName,h=r.accessToken,d=r.userId,f=e.chatRoomId,m=e.attributes,y=e.autoDelete,g=void 0===y||y,v=e.isForced?"/forced":"",E={metaData:m,autoDelete:g?"DELETE":"NO_DELETE"},_={url:"".concat(this.apiUrl,"/").concat(l,"/").concat(p,"/metadata/chatroom/").concat(f,"/user/").concat(d)+v,type:"PUT",dataType:"json",data:JSON.stringify(E),headers:{Authorization:"Bearer "+h,"Content-Type":"application/json"}};return s.kg.debug("Call setChatRoomAttributes:",e),i.hj.call(this,_,c.fI.SET_CHATROOM_ATTRIBUTES).then((function(e){return(0,a._W)(e)}))}function le(e){var t;if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter chatRoomId: "+e.chatRoomId);if("string"!=typeof e.attributeKey||""===e.attributeKey)throw Error("Invalid parameter attributeKey: "+e.attributeKey);if("string"!=typeof e.attributeValue||""===e.attributeValue)throw Error("Invalid parameter attributeValue: "+e.attributeValue);if(!a.XZ.call(this)){var r=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(r)}var u=this.context,l=u.orgName,p=u.appName,h=u.accessToken,d=u.userId,f=e.chatRoomId,m=e.attributeKey,y=e.attributeValue,g=e.autoDelete,v=void 0===g||g,E=e.isForced?"/forced":"",_={metaData:(t={},t[m]=y,t),autoDelete:v?"DELETE":"NO_DELETE"},T={url:"".concat(this.apiUrl,"/").concat(l,"/").concat(p,"/metadata/chatroom/").concat(f,"/user/").concat(d)+E,type:"PUT",dataType:"json",data:JSON.stringify(_),headers:{Authorization:"Bearer "+h,"Content-Type":"application/json"}};return s.kg.debug("Call setChatRoomAttribute:",e),i.hj.call(this,T,c.fI.SET_CHATROOM_ATTRIBUTE).then((function(e){var t=(0,a.H7)(e);if(t)throw t}))}function pe(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter chatRoomId: "+e.chatRoomId);if(!Array.isArray(e.attributeKeys))throw Error('"Invalid parameter attributes": '+e.attributeKeys);if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.userId,d=e.chatRoomId,f=e.attributeKeys,m=e.isForced?"/forced":"",y={keys:f},g={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/metadata/chatroom/").concat(d,"/user/").concat(h)+m,type:"DELETE",dataType:"json",data:JSON.stringify(y),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"}};return s.kg.debug("Call removeChatRoomAttributes:",e),i.hj.call(this,g,c.fI.REMOVE_CHATROOM_ATTRIBUTES).then((function(e){return(0,a._W)(e)}))}function he(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter chatRoomId: "+e.chatRoomId);if("string"!=typeof e.attributeKey||""===e.attributeKey)throw Error('"Invalid parameter attributeKey": '+e.attributeKey);if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.userId,d=e.chatRoomId,f=e.attributeKey,m=e.isForced?"/forced":"",y={keys:[f]},g={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/metadata/chatroom/").concat(d,"/user/").concat(h)+m,type:"DELETE",dataType:"json",data:JSON.stringify(y),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"}};return s.kg.debug("Call removeChatRoomAttribute:",e),i.hj.call(this,g,c.fI.REMOVE_CHATROOM_ATTRIBUTE).then((function(e){var t=(0,a.H7)(e);if(t)throw t}))}},2006:function(e,t,r){"use strict";r.d(t,{w:function(){return i}}),r(8327),r(5980);var n=r(6916),o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)};function i(e){var t,r,i=e.id,a=e.payload,s=e.timestamp,c=e.to,u=a.bodies&&a.bodies.length>0?a.bodies[0]:{},l={},p={},h=a.type?a.type:c.indexOf("@conference.easemob.com")>-1?"groupChat":"singleChat";switch(u.type){case"txt":l={id:i,type:"txt",chatType:h,msg:u.msg||"",to:a.to||"",from:a.from,time:s,ext:a.ext};break;case"img":l={id:i,type:"img",chatType:h,to:a.to,from:a.from,time:s,ext:a.ext,width:(null===(t=u.size)||void 0===t?void 0:t.width)||0,height:(null===(r=u.size)||void 0===r?void 0:r.height)||0,secret:u.secret||"",url:(null==u?void 0:u.url)||"",file:{}};break;case"video":l={id:i,type:"video",chatType:h,from:a.from,to:a.to,url:(null==u?void 0:u.url)||"",secret:u.secret||"",filename:u.filename,length:u.length||0,file:{},file_length:u.fileLength||0,filetype:a.ext.file_type||"",ext:a.ext,time:s};break;case"loc":l={id:i,type:"loc",chatType:h,from:a.from,to:a.to,buildingName:u.buildingName||"",addr:u.addr,lat:u.lat,lng:u.lng,ext:a.ext,time:s};break;case"audio":l={id:i,type:"audio",chatType:h,from:a.from,to:a.to,secret:u.secret||"",ext:a.ext,time:s,url:(null==u?void 0:u.url)||"",file:{},filename:u.filename,length:a.ext.duration||0,file_length:u.fileLength||0,filetype:a.ext.file_type||""};break;case"file":l={id:i,type:"file",chatType:h,from:a.from,to:a.to,ext:a.ext,time:s,url:(null==u?void 0:u.url)||"",secret:u.secret||"",file:{},filename:u.filename||"",length:u.length||0,file_length:u.file_length||0,filetype:a.ext.file_type||""};break;case"cmd":l={id:i,type:"cmd",chatType:h,from:a.from,to:a.to,ext:a.ext,time:s,action:u.action||""};break;case"custom":l={id:i,type:"custom",chatType:h,from:a.from,to:a.to,ext:a.ext,time:s,customEvent:u.customEvent||""};break;default:n.kg.error("unexpected message: ".concat(e))}if(a.msgConfig&&(p.msgConfig=a.msgConfig),null==a?void 0:a.meta){var d=a.meta;d.thread&&(p.chatThread={messageId:d.thread.msg_parent_id,parentId:d.thread.muc_parent_id,chatThreadName:d.thread.thread_name}),d.reactions&&(p.reactions=d.reactions),d.translations&&(p.translations=d.translations)}return o(o({},l),p)}},556:function(e,t,r){"use strict";r.r(t),r.d(t,{acceptGroupInvite:function(){return H},acceptGroupJoinRequest:function(){return j},addUsersToGroupAllowlist:function(){return me},addUsersToGroupWhitelist:function(){return fe},agreeInviteIntoGroup:function(){return B},agreeJoinGroup:function(){return L},blockGroup:function(){return h},blockGroupMember:function(){return re},blockGroupMembers:function(){return oe},blockGroupMessages:function(){return d},changeGroupOwner:function(){return E},changeOwner:function(){return v},createGroup:function(){return p},createGroupNew:function(){return l},deleteGroupSharedFile:function(){return Ce},destroyGroup:function(){return w},disableSendGroupMsg:function(){return he},dissolveGroup:function(){return N},downloadGroupSharedFile:function(){return Me},enableSendGroupMsg:function(){return de},fetchGroupAnnouncement:function(){return Se},fetchGroupSharedFileList:function(){return Ne},getGroup:function(){return y},getGroupAdmin:function(){return I},getGroupAllowlist:function(){return _e},getGroupBlacklist:function(){return le},getGroupBlacklistNew:function(){return ue},getGroupBlocklist:function(){return pe},getGroupInfo:function(){return _},getGroupMsgReadUser:function(){return Ie},getGroupMuteList:function(){return Q},getGroupMutelist:function(){return ee},getGroupSharedFilelist:function(){return we},getGroupWhitelist:function(){return Ee},getJoinedGroups:function(){return g},getMuted:function(){return $},getPublicGroups:function(){return m},groupBlockMulti:function(){return ne},groupBlockSingle:function(){return te},inviteToGroup:function(){return U},inviteUsersToGroup:function(){return x},isGroupWhiteUser:function(){return Te},isInGroupAllowlist:function(){return Re},isInGroupWhiteList:function(){return Oe},joinGroup:function(){return P},leaveGroup:function(){return k},listGroupMember:function(){return O},listGroupMembers:function(){return R},listGroups:function(){return f},modifyGroup:function(){return T},mute:function(){return z},muteGroupMember:function(){return J},quitGroup:function(){return M},rejectGroupInvite:function(){return W},rejectGroupJoinRequest:function(){return G},rejectInviteIntoGroup:function(){return F},rejectJoinGroup:function(){return D},removeAdmin:function(){return A},removeGroupAdmin:function(){return C},removeGroupAllowlistMember:function(){return ve},removeGroupBlockMulti:function(){return se},removeGroupBlockSingle:function(){return ie},removeGroupMember:function(){return Z},removeGroupMembers:function(){return V},removeGroupWhitelistMember:function(){return ge},removeMultiGroupMember:function(){return K},removeMute:function(){return X},removeSingleGroupMember:function(){return q},rmUsersFromGroupWhitelist:function(){return ye},setAdmin:function(){return S},setGroupAdmin:function(){return b},unblockGroupMember:function(){return ae},unblockGroupMembers:function(){return ce},unmuteGroupMember:function(){return Y},updateGroupAnnouncement:function(){return be},uploadGroupSharedFile:function(){return Ae}}),r(900),r(3814),r(7095),r(9889),r(6619),r(1362),r(7988),r(8668),r(514),r(4201),r(3529),r(3535),r(6864),r(1685),r(2486),r(4261);var n=r(3365),o=r(7480),i=r(7551),a=r(1222),s=r(6916),c=r(3681);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function l(e){if(!e||!e.data)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups?resource=").concat(h.clientResource),dataType:"json",type:"POST",data:JSON.stringify({owner:this.user,groupname:e.data.groupname,desc:e.data.desc,members:e.data.members,public:e.data.public,approval:e.data.approval,allowinvites:e.data.allowinvites,invite_need_confirm:e.data.inviteNeedConfirm,maxusers:e.data.maxusers}),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:function(t){e.success&&e.success(t)},error:e.error};return s.kg.debug("Call createGroup:",e),i.hj.call(this,d,c.fI.CREATE_GROUP)}var p=l;function h(e){var t;if("string"!=typeof e.groupId||""===e.groupId)throw Error("Invalid parameter");if(!a.XZ.call(this)){var r=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(r)}var u=this.context,l=u.orgName,p=u.appName,h=u.accessToken,d=u.jid,f={entities:[(t={},t["notification_ignore_"+e.groupId]=!0,t)]},m={type:"PUT",url:"".concat(this.apiUrl,"/").concat(l,"/").concat(p,"/users/").concat(this.user,"?resource=").concat(d.clientResource),data:JSON.stringify(f),dataType:"json",headers:{Authorization:"Bearer "+h,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call blockGroupMessages",e),i.hj.call(this,m,c.fI.BLOCK_GROUP)}var d=h;function f(e){if("number"!=typeof e.limit)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h={limit:e.limit,cursor:e.cursor};e.cursor||delete h.cursor;var d={url:this.apiUrl+"/"+u+"/"+l+"/publicchatgroups",type:"GET",dataType:"json",data:h,headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call listGroups",e),i.hj.call(this,d,c.fI.LIST_GROUP)}var m=f;function y(e){if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h={url:this.apiUrl+"/"+u+"/"+l+"/users/"+this.user+"/joined_chatgroups",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e&&(null==e?void 0:e.success),error:e&&(null==e?void 0:e.error)};return s.kg.debug("Call getJoinedGroups",e),i.hj.call(this,h,c.fI.GET_USER_GROUP)}function g(e){if("number"!=typeof e.pageNum||"number"!=typeof e.pageSize)throw Error('Invalid parameter: "pageNum or pageSize"');if(e.pageNum<0||e.pageSize<0)throw Error('"pageNum" should >= 0 and "pageSize" should >= 0');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.needAffiliations||e.needRole?"/chatgroups/user/".concat(this.user,"?pagenum=").concat(e.pageNum,"&pagesize=").concat(e.pageSize,"&needAffiliations=").concat(e.needAffiliations,"&needRole=").concat(e.needRole):"/users/".concat(this.user,"/joined_chatgroups?pagenum=").concat(e.pageNum,"&pagesize=").concat(e.pageSize),d={url:this.apiUrl+"/"+u+"/"+l+h,dataType:"json",type:"GET",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e&&(null==e?void 0:e.success),error:e&&(null==e?void 0:e.error)};return s.kg.debug("Call getGroup",e),i.hj.call(this,d,c.fI.GET_USER_GROUP).then((function(e){var t=e.uri,r=e.entities,n=[];return t.includes("joined_chatgroups")||(r.forEach((function(e){var t={affiliationsCount:e.affiliations_count,groupName:e.name,groupId:e.groupId,role:e.permission,disabled:e.disabled,approval:e.membersonly,allowInvites:e.allowinvites,description:e.description,maxUsers:e.maxusers,public:e.public};n.push(t)})),e.entities=n),e}))}function v(e){if("string"!=typeof e.groupId||"string"!=typeof e.newOwner)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r={newowner:e.newOwner},u=this.context,l=u.orgName,p=u.appName,h=u.accessToken,d=u.jid,f={url:"".concat(this.apiUrl,"/").concat(l,"/").concat(p,"/chatgroups/").concat(e.groupId,"?resource=").concat(d.clientResource),type:"PUT",dataType:"json",headers:{Authorization:"Bearer "+h,"Content-Type":"application/json"},data:JSON.stringify(r),success:e.success,error:e.error};return s.kg.debug("Call changeOwner",e),i.hj.call(this,f,c.fI.CHANGE_OWNER)}var E=v;function _(e){if("string"!=typeof e.groupId&&!Array.isArray(e.groupId))throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h={url:this.apiUrl+"/"+u+"/"+l+"/chatgroups/"+e.groupId+"?joined_time=true",type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getGroupInfo",e),i.hj.call(this,h,c.fI.GET_GROUP_INFO)}function T(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={groupname:e.groupName,description:e.description},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"?resource=").concat(h.clientResource),type:"PUT",data:JSON.stringify(f),dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call modifyGroup",e),i.hj.call(this,m,c.fI.MODIFY_GROUP)}function O(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(isNaN(e.pageNum)||e.pageNum<=0)throw Error('The parameter "pageNum" should be a positive number');if(isNaN(e.pageSize)||e.pageSize<=0)throw Error('The parameter "pageSize" should be a positive number');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r={pagenum:e.pageNum,pagesize:e.pageSize},u=this.context,l=u.orgName,p=u.appName,h=u.accessToken,d={url:this.apiUrl+"/"+l+"/"+p+"/chatgroups/"+e.groupId+"/users",dataType:"json",type:"GET",data:r,headers:{Authorization:"Bearer "+h,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call listGroupMember",e),i.hj.call(this,d,c.fI.LIST_GROUP_MEMBER)}var R=O;function I(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.groupId,d={url:this.apiUrl+"/"+u+"/"+l+"/chatgroups/"+h+"/admin",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getGroupAdmin",e),i.hj.call(this,d,c.fI.GET_GROUP_ADMIN)}function S(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={newadmin:e.username},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/admin?resource=").concat(h.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call setGroupAdmin",e),i.hj.call(this,m,c.fI.SET_GROUP_ADMIN)}var b=S;function A(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/admin/").concat(f,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeAdmin",e),i.hj.call(this,m,c.fI.REMOVE_GROUP_ADMIN)}var C=A;function N(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"?version=v3&resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call destroyGroup",e),i.hj.call(this,f,c.fI.DISSOLVE_GROUP)}var w=N;function M(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/quit?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call quitGroup",e),i.hj.call(this,f,c.fI.QUIT_GROUP)}var k=M;function U(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(e.users))throw Error('Invalid parameter: "users"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=e.groupId,u={usernames:e.users},l=this.context,p=l.orgName,h=l.appName,d=l.accessToken,f=l.jid,m={url:"".concat(this.apiUrl,"/").concat(p,"/").concat(h,"/chatgroups/").concat(r,"/invite?resource=").concat(f.clientResource),type:"POST",data:JSON.stringify(u),dataType:"json",headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call inviteUsersToGroup",e),i.hj.call(this,m,c.fI.INVITE_TO_GROUP)}var x=U;function P(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(e.groupId,"/apply?resource=").concat(h.clientResource),type:"POST",dataType:"json",data:JSON.stringify({message:e.message||""}),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call joinGroup",e),i.hj.call(this,d,c.fI.JOIN_GROUP)}function L(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.applicant||""===e.applicant)throw Error('Invalid parameter: "applicant"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={applicant:e.applicant,verifyResult:!0,reason:"no clue"},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/apply_verify?resource=").concat(h.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call agreeJoinGroup",e),i.hj.call(this,m,c.fI.AGREE_JOIN_GROUP)}var j=L;function D(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.applicant||""===e.applicant)throw Error('Invalid parameter: "applicant"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={applicant:e.applicant,verifyResult:!1,reason:e.reason||""},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/apply_verify?resource=").concat(h.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call rejectGroupJoinRequest",e),i.hj.call(this,m,c.fI.REJECT_JOIN_GROUP)}var G=D;function B(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.invitee||""===e.invitee)throw Error('Invalid parameter: "invitee"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={invitee:e.invitee,verifyResult:!0},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/invite_verify?resource=").concat(h.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call acceptGroupInvite",e),i.hj.call(this,m,c.fI.AGREE_INVITE_GROUP)}var H=B;function F(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.invitee||""===e.invitee)throw Error('Invalid parameter: "invitee"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={invitee:e.invitee,verifyResult:!1},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/invite_verify?resource=").concat(h.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call rejectGroupInvite",e),i.hj.call(this,m,c.fI.REJECT_INVITE_GROUP)}var W=F;function q(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=e.groupId,u=e.username,l=this.context,p=l.orgName,h=l.appName,d=l.accessToken,f=l.jid,m={url:"".concat(this.apiUrl,"/").concat(p,"/").concat(h,"/chatgroups/").concat(r,"/users/").concat(u,"?resource=").concat(f.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeGroupMember",e),i.hj.call(this,m,c.fI.REMOVE_GROUP_MEMBER)}var Z=q;function K(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(e.users))throw Error('Invalid parameter: "users"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f=e.users.join(","),m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/users/").concat(f,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeGroupMembers",e),i.hj.call(this,m,c.fI.MULTI_REMOVE_GROUP_MEMBER)}var V=K;function z(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if("number"!=typeof e.muteDuration)throw Error('Invalid parameter: "muteDuration"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={usernames:[e.username],mute_duration:e.muteDuration},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/mute?resource=").concat(h.clientResource),dataType:"json",type:"POST",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},data:JSON.stringify(f),success:e.success,error:e.error};return s.kg.debug("Call muteGroupMember",e),i.hj.call(this,m,c.fI.MUTE_GROUP_MEMBER)}var J=z;function X(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/mute/").concat(f,"?resource=").concat(h.clientResource),dataType:"json",type:"DELETE",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call unmuteGroupMember",e),i.hj.call(this,m,c.fI.UNMUTE_GROUP_MEMBER)}var Y=X;function $(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.groupId,d={url:this.apiUrl+"/"+u+"/"+l+"/chatgroups/"+h+"/mute",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getGroupMuteList",e),i.hj.call(this,d,c.fI.GET_GROUP_MUTE_LIST)}var Q=$,ee=$;function te(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/blocks/users/").concat(f,"?resource=").concat(h.clientResource),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call blockGroupMember",e),i.hj.call(this,m,c.fI.BLOCK_GROUP_MEMBER)}var re=te;function ne(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(e.usernames))throw Error('Invalid parameter: "usernames"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={usernames:e.usernames},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/blocks/users?resource=").concat(h.clientResource),data:JSON.stringify(f),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call blockGroupMembers",e),i.hj.call(this,m,c.fI.BLOCK_GROUP_MEMBERS)}var oe=ne;function ie(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/blocks/users/").concat(f,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call unblockGroupMember",e),i.hj.call(this,m,c.fI.UNBLOCK_GROUP_MEMBER)}var ae=ie;function se(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(e.usernames))throw Error('Invalid parameter: "usernames"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f=e.usernames.join(","),m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/blocks/users/").concat(f,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call unblockGroupMembers",e),i.hj.call(this,m,c.fI.UNBLOCK_GROUP_MEMBERS)}var ce=se;function ue(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.groupId,d={url:this.apiUrl+"/"+u+"/"+l+"/chatgroups/"+h+"/blocks/users",type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getGroupBlacklist",e),i.hj.call(this,d,c.fI.GET_GROUP_BLACK_LIST)}var le=ue,pe=ue;function he(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/ban?resource=").concat(h.clientResource),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call disableSendGroupMsg",e),i.hj.call(this,f,c.fI.DISABLED_SEND_GROUP_MSG)}function de(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/ban?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call enableSendGroupMsg",e),i.hj.call(this,f,c.fI.ENABLE_SEND_GROUP_MSG)}function fe(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(e.users))throw Error('Invalid parameter: "users"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={usernames:e.users},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/white/users?resource=").concat(h.clientResource),type:"POST",data:JSON.stringify(f),dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call addUsersToGroupWhitelist",e),i.hj.call(this,m,c.fI.ADD_USERS_TO_GROUP_WHITE)}var me=fe;function ye(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.userName||""===e.userName)throw Error('Invalid parameter: "userName"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/white/users/").concat(e.userName,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeGroupAllowlistMember",e),i.hj.call(this,f,c.fI.REMOVE_GROUP_WHITE_MEMBER)}var ge=ye,ve=ye;function Ee(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.groupId,d={url:this.apiUrl+"/"+u+"/"+l+"/chatgroups/"+h+"/white/users",type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getGroupAllowlist",e),i.hj.call(this,d,c.fI.GET_GROUP_WHITE_LIST)}var _e=Ee;function Te(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.userName||""===e.userName)throw Error('Invalid parameter: "userName"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.groupId,d={url:this.apiUrl+"/"+u+"/"+l+"/chatgroups/"+h+"/white/users/"+e.userName,type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call isInGroupAllowlist",e),i.hj.call(this,d,c.fI.IS_IN_GROUP_WHITE_LIST)}var Oe=Te,Re=Te;function Ie(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.msgId||""===e.msgId)throw Error('Invalid parameter: "msgId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h={url:this.apiUrl+"/"+u+"/"+l+"/chatgroups/"+e.groupId+"/acks/"+e.msgId,dataType:"json",type:"GET",data:{limit:500,key:void 0},headers:{Authorization:"Bearer "+p},success:e.success,error:e.error};return s.kg.debug("Call getGroupMsgReadUser",e),i.hj.call(this,h,c.fI.GET_GROUP_MSG_READ_USER)}function Se(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.groupId,d={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"/announcement"),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call fetchGroupAnnouncement",e),i.hj.call(this,d,c.fI.GET_GROUP_ANN)}function be(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.announcement)throw Error('Invalid parameter: "announcement"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={announcement:e.announcement},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/announcement?resource=").concat(h.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call updateGroupAnnouncement",e),i.hj.call(this,m,c.fI.UPDATE_GROUP_ANN)}function Ae(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("object"!==u(e.file))throw Error('Invalid parameter: "file"');if(a.XZ.call(this)){var t=this.context,r=t.orgName,n=t.appName,o=t.accessToken,l=t.jid,p=e.groupId;(0,i.cT)({uploadUrl:"".concat(this.apiUrl,"/").concat(r,"/").concat(n,"/chatgroups/").concat(p,"/share_files?resource=").concat(l.clientResource),onFileUploadProgress:e.onFileUploadProgress,onFileUploadComplete:e.onFileUploadComplete,onFileUploadError:e.onFileUploadError,onFileUploadCanceled:e.onFileUploadCanceled,accessToken:o,apiUrl:this.apiUrl,file:e.file,appKey:this.context.appKey},c.fI.UPLOAD_GROUP_FILE),s.kg.debug("Call uploadGroupSharedFile",e)}}function Ce(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.fileId||""===e.fileId)throw Error('Invalid parameter: "file"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f=e.fileId,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/share_files/").concat(f,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call deleteGroupSharedFile",e),i.hj.call(this,m,c.fI.DELETE_GROUP_FILE)}function Ne(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.pageNum||1,d=e.pageSize||10,f=e.groupId,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(f,"/share_files?pagenum=").concat(h,"&pagesize=").concat(d),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getGroupSharedFilelist",e),i.hj.call(this,m,c.fI.GET_GROUP_FILE_LIST)}var we=Ne;function Me(e){var t=this.context,r=t.orgName,n=t.appName,o=t.accessToken,a=this.apiUrl,u=e.groupId,l=e.fileId;i.LR.call(this,{url:"".concat(a,"/").concat(r,"/").concat(n,"/chatgroups/").concat(u,"/share_files/").concat(l),onFileDownloadComplete:e.onFileDownloadComplete,onFileDownloadError:e.onFileDownloadError,accessToken:o,id:l,secret:e.secret},c.fI.DOWN_GROUP_FILE),s.kg.debug("Call downloadGroupSharedFile",e)}},7486:function(e,t,r){"use strict";r.r(t),r.d(t,{acceptContactInvite:function(){return G},acceptInvitation:function(){return D},addContact:function(){return P},addReaction:function(){return J},addToBlackList:function(){return F},addUsersToBlacklist:function(){return W},addUsersToBlocklist:function(){return q},declineContactInvite:function(){return H},declineInvitation:function(){return B},deleteContact:function(){return j},deleteConversation:function(){return b},deleteReaction:function(){return X},deleteSession:function(){return S},fetchHistoryMessages:function(){return k},fetchUserInfoById:function(){return N},getBlacklist:function(){return g},getBlocklist:function(){return v},getChatToken:function(){return M},getContacts:function(){return _},getConversationlist:function(){return I},getHistoryMessages:function(){return x},getReactionDetail:function(){return Q},getReactionList:function(){return Y},getReactionlist:function(){return $},getRoster:function(){return E},getSessionList:function(){return R},recallMessage:function(){return z},removeFromBlackList:function(){return Z},removeRoster:function(){return L},removeUserFromBlackList:function(){return K},removeUserFromBlocklist:function(){return V},reportMessage:function(){return ee},updateCurrentUserNick:function(){return w},updateOwnUserInfo:function(){return A},updateUserInfo:function(){return C},uploadPushToken:function(){return O},uploadToken:function(){return T}}),r(8327),r(900),r(3814),r(514),r(4201),r(6864),r(1685),r(2486),r(4261),r(1362),r(7988),r(7095),r(9889),r(3535),r(8134),r(3022),r(8668);var n=r(1222),o=r(3365),i=r(7480),a=r(7551),s=r(983),c=r(5163),u=r(5491),l=r.n(u),p=r(6916),h=r(3681),d=r(2006),f=function(){return f=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},f.apply(this,arguments)},m=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},y=function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function g(e){if(!n.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l={url:this.apiUrl+"/"+s+"/"+c+"/users/"+this.user+"/blocks/users",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+u},success:function(t){var r={};t.data.forEach((function(e){r[e]={name:e}})),"function"==typeof(null==e?void 0:e.success)&&e.success(t)},error:function(t){"function"==typeof(null==e?void 0:e.error)&&e.error(t)}};return p.kg.debug("Call getBlocklist"),a.hj.call(this,l,h.fI.GET_BLACK_LIST)}var v=g,E=_;function _(e){var t=this;if(!n.XZ.call(this)){var r=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(r)}var s=this.context,c=s.orgName,u=s.appName,l=s.accessToken,d={url:this.apiUrl+"/"+c+"/"+u+"/users/"+this.user+"/contacts/users",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+l},success:function(r){var n=[];r.data.forEach((function(e){n.push({name:e,subscription:"both",jid:t.context.jid})})),"function"==typeof(null==e?void 0:e.success)&&e.success(n)},error:function(t){"function"==typeof(null==e?void 0:e.error)&&e.error(t)}};return p.kg.debug("Call getContacts"),a.hj.call(this,d,h.fI.GET_CONTACTS)}function T(e){if("string"!=typeof e.deviceId||""===e.deviceId)throw Error('Invalid parameter: "deviceId"');if("string"!=typeof e.deviceToken||""===e.deviceToken)throw Error('Invalid parameter: "deviceToken"');if("string"!=typeof e.notifierName||""===e.notifierName)throw Error('Invalid parameter: "notifierName"');if(!n.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/users/").concat(this.user),type:"PUT",data:JSON.stringify({device_id:e.deviceId,device_token:e.deviceToken,notifier_name:e.notifierName}),dataType:"json",headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"},success:e.success,error:e.error};return p.kg.debug("Call uploadPushToken",e),a.hj.call(this,l,h.fI.UPLOAD_PUSH_TOKEN)}var O=T;function R(e){if(!n.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/users/").concat(this.user,"/user_channels"),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"},success:e&&(null==e?void 0:e.success),error:e&&(null==e?void 0:e.error)};return p.kg.debug("Call getSessionList"),a.hj.call(this,l,h.fI.GET_SESSION_LIST)}function I(e){if(!n.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/users/").concat(this.user,"/user_channels"),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"},success:e&&(null==e?void 0:e.success),error:e&&(null==e?void 0:e.error)};return p.kg.debug("Call getConversationlist"),a.hj.call(this,l,h.fI.GET_SESSION_LIST).then((function(e){return function(e){var t=e.data.channel_infos;return null==t||t.forEach((function(e){e.meta&&"{}"!==JSON.stringify(e.meta)?(e.meta.payload=JSON.parse(e.meta.payload),e.lastMessage=(0,d.w)(e.meta)):e.lastMessage=e.meta,delete e.meta})),e}(e)}))}function S(e){if(e&&"string"!=typeof e.channel)throw Error("Invalid parameter channel: ".concat(e.channel));if(e&&"singleChat"!==e.chatType&&"groupChat"!==e.chatType)throw Error("Invalid parameter chatType: ".concat(e.chatType));if(e&&"boolean"!=typeof e.deleteRoam)throw Error("Invalid parameter deleteRoam: ".concat(e.deleteRoam));if(!n.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r,s=this.context,c=s.orgName,u=s.appName,l=s.accessToken;r="singleChat"===e.chatType?"chat":"groupChat";var d={url:"".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/users/").concat(this.user,"/user_channel"),dataType:"json",type:"DELETE",data:JSON.stringify({channel:e.channel,type:r,delete_roam:e.deleteRoam}),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:e.success,error:e.error};return p.kg.debug("Call deleteSession",e),a.hj.call(this,d,h.fI.DELETE_SESSION)}var b=S;function A(e,t){if(!n.XZ.call(this)){var r=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(r)}var s=this.context,c=s.orgName,u=s.appName,l=s.accessToken,d=["nickname","avatarurl","mail","phone","gender","sign","birth","ext"],f={};if("undefined"!=typeof wx||"undefined"!=typeof qq)if("string"==typeof e&&void 0!==t){if(!d.includes(e))throw new Error("illegal key, only these keys: nickname, avatarurl, mail, phone, gender, sign, birth, ext are allowed");f[e]=t}else{if("[object Object]"!==Object.prototype.toString.call(e))throw new Error("illegal params");d.forEach((function(t){d.includes(t)&&void 0!==e[t]&&(f[t]=e[t])}))}else if("string"==typeof e){if(!d.includes(e))throw new Error("illegal key, only these keys: nickname, avatarurl, mail, phone, gender, sign, birth, ext are allowed");f=e+"="+t}else{if("[object Object]"!==Object.prototype.toString.call(e))throw new Error("illegal params");var m=[];d.forEach((function(t){if(d.includes(t)&&void 0!==e[t]){var r=encodeURIComponent(t),n=encodeURIComponent(e[t]);m.push(r+"="+n)}})),f=m.join("&")}var y={url:"".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/metadata/user/").concat(this.user),type:"PUT",data:f,dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/x-www-form-urlencoded"}};return p.kg.debug("Call updateOwnUserInfo",e),a.hj.call(this,y,h.fI.UPDATE_USER_INFO)}var C=A;function N(e,t){if(!n.XZ.call(this)){var r=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(r)}var s,c=this.context,u=c.orgName,l=c.appName,d=c.accessToken,f=[];if("string"==typeof e)f=[e];else{if("[object Array]"!==Object.prototype.toString.call(e))throw new Error("illegal params");f=e}s="string"==typeof t?[t]:t&&"[object Array]"===Object.prototype.toString.call(t)?t:["nickname","avatarurl","mail","phone","gender","sign","birth","ext"];var m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/metadata/user/get"),type:"POST",data:JSON.stringify({targets:f,properties:s}),dataType:"json",headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"}};return p.kg.debug("Call fetchUserInfoById",e),a.hj.call(this,m,h.fI.GET_USER_INFO)}function w(e){if(!n.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/users/").concat(this.user),type:"PUT",dataType:"json",data:JSON.stringify({nickname:e}),headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}};return p.kg.debug("Call updateCurrentUserNick",e),a.hj.call(this,l)}function M(e){if("string"!=typeof e||""===e)throw Error('Invalid parameter: "agoraToken"');var t=this.context,r=t.orgName,n=t.appName,o={url:this.apiUrl+"/"+r+"/"+n+"/token",dataType:"json",type:"POST",data:JSON.stringify({grant_type:"agora"}),headers:{Authorization:"Bearer "+e,"Content-Type":"application/json"}};return p.kg.debug("Call getChatToken",e),a.hj.call(this,o,h.fI.SDK_INTERNAL)}function k(e){var t=this;return new Promise((function(r,a){if(!e.queue)throw Error('Invalid parameter: "specified"');if(!n.XZ.call(t)){var s=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(s)}(function e(t){var n=this,o=t.count||20;U.call(this,{count:o,isGroup:!!t.isGroup,queue:t.queue,start:t.start,format:t.format,success:function(i){if(i.msgs.length>=o||i.is_last){var a=i.msgs.splice(0,o).reverse();t.success&&t.success(a),r(a)}else e.call(n,f(f({},t),{start:null}))},fail:function(e){a(e),t.fail&&t.fail(e)}})}).call(t,e),p.kg.debug("Call fetchHistoryMessages",e)}))}function U(e){var t=this,r=e.queue,n=this.mr_cache[r]||(this.mr_cache[r]={msgs:[]}),c=this.context.userId,u=e.start||-1,p=e.count||20;if(n.msgs.length>=p||n.is_last)"function"==typeof e.success&&e.success(n);else{n&&n.next_key&&(u=n.next_key),e.start&&(u=e.start);var d={queue:r+(e.isGroup?"@conference.easemob.com":"@easemob.com"),start:u,end:-1},f=this.context,m=f.orgName,y=f.appName,g={url:this.apiUrl+"/"+m+"/"+y+"/users/"+c+"/messageroaming",dataType:"json",type:"POST",headers:{Authorization:"Bearer "+this.token,"Content-Type":"application/json"},data:JSON.stringify(d),success:function(r){var o=null==r?void 0:r.data;if(!r.data.msgs)return"function"==typeof e.success&&e.success(n),n.is_last=!0,void(n.next_key="");var i=o.msgs,a=i.length;n.is_last=o.is_last,n.next_key=o.next_key;for(var c=function(r){for(var n=[],o=0,i=(r=l().atob(r)).length;o<i;++o)n.push(r.charCodeAt(o));var a=t.context.root.lookup("easemob.pb.Meta");if(1===(a=a.decode(n)).ns)return s.Z.call(t,a,{errorCode:0,reason:""},!0,e.format)},u=0;u<a;u++){var p=c(i[u].msg);p&&n.msgs.push(p)}"function"==typeof e.success&&e.success(n)},error:function r(n){if(n.error&&n.error_description){var a=i.Z.create({type:o.E.WEBIM_CONNCTION_LOAD_CHATROOM_ERROR,message:"fetch history messages error",data:n});t.onError&&t.onError(a)}"function"==typeof e.fail&&e.fail(r)}};a.hj.call(this,g,h.fI.GET_HISTORY_MSG)}}function x(e){var t=this;return new Promise((function(r,c){if("string"!=typeof e.targetId||""===e.targetId)throw Error('"Invalid parameter": "targetId"');if(!n.XZ.call(t))return c(i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"}));var u=t.context,h=u.orgName,d=u.appName,f=u.userId,m="groupChat"===e.chatType||"chatRoom"===e.chatType?"@conference.easemob.com":"@easemob.com",y={queue:e.targetId+m,start:e.cursor||-1,pull_number:e.pageSize||20,isGroup:"groupChat"===e.chatType||"chatRoom"===e.chatType||!1,is_positive:"down"===e.searchDirection,end:-1},g={url:t.apiUrl+"/"+h+"/"+d+"/users/"+f+"/messageroaming",dataType:"json",type:"POST",headers:{Authorization:"Bearer "+t.token,"Content-Type":"application/json"},data:JSON.stringify(y),success:function(e){for(var n=null==e?void 0:e.data,o=n.msgs||[],i=function(e){for(var r=[],n=0,o=(e=l().atob(e)).length;n<o;++n)r.push(e.charCodeAt(n));var i=t.context.root.lookup("easemob.pb.Meta");if(1===(i=i.decode(r)).ns)return s.Z.call(t,i,{errorCode:0,reason:""},!0,!0)},a=[],c=0;c<o.length;c++){var u=i(o[c].msg);u&&a.push(u)}n.msgs=a;var p={cursor:n.next_key,messages:a};r(p)},error:e.fail};a.hj.call(t,g),p.kg.debug("Call getHistoryMessages",e)}))}function P(e,t){var r={id:this.getUniqueId(),to:e,message:t};c.Z.operatRoster.call(this,r,"add"),p.kg.debug("Call addContact",r)}var L=j;function j(e){var t={id:this.getUniqueId(),to:e};c.Z.operatRoster.call(this,t,"remove"),p.kg.debug("Call deleteContact",t)}function D(e){var t={id:this.getUniqueId(),to:e};c.Z.operatRoster.call(this,t,"accept"),p.kg.debug("Call acceptInvitation",t)}var G=D;function B(e){var t={id:this.getUniqueId(),to:e};c.Z.operatRoster.call(this,t,"decline"),p.kg.debug("Call declineContactInvite",t)}var H=B;function F(e){c.Z.operatRoster.call(this,{to:e.name},"ban"),p.kg.debug("Call addUsersToBlocklist",e)}var W=F,q=F;function Z(e){c.Z.operatRoster.call(this,{to:e.name},"allow"),p.kg.debug("Call removeUserFromBlocklist",e)}var K=Z,V=Z;function z(e){var t=this.getUniqueId(),r={id:t,to:e.to};this._msgHash[t]=f({},r);var n="";void 0!==e.chatType?n=e.chatType:void 0!==e.type&&(n="chat"===e.type?"singleChat":e.type);var o={id:t,type:"recall",chatType:n,ackId:e.mid,to:e.to,isChatThread:e.isChatThread||!1,success:e.success,fail:e.fail};return p.kg.debug("Call recallMessage",e),this.mSync.send(o,this)}function J(e){return m(this,void 0,void 0,(function(){var t,r,s,c,u,l,p,h,d;return y(this,(function(f){switch(f.label){case 0:if("string"!=typeof e.messageId||!e.messageId)throw Error("Invalid parameter messageId: ".concat(e.messageId));if("string"!=typeof e.reaction||!e.reaction)throw Error("Invalid parameter reaction: ".concat(e.reaction));return n.XZ.call(this)?(r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l=e.reaction,p=e.messageId,h={msgId:p,message:l},d={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/reaction/user/").concat(this.user),type:"POST",data:JSON.stringify(h),dataType:"json",headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}},[4,a.hj.call(this,d)]):(t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"}),[2,Promise.reject(t)]);case 1:return f.sent(),[2]}}))}))}function X(e){return m(this,void 0,void 0,(function(){var t,r,s,c,u,l,p,h;return y(this,(function(d){switch(d.label){case 0:if("string"!=typeof e.reaction||!e.reaction)throw Error("Invalid parameter reactionId: ".concat(e.reaction));return n.XZ.call(this)?(r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l=e.messageId,p=e.reaction,h={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/reaction/user/").concat(this.user,"?msgId=").concat(l,"&message=").concat(p),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}},[4,a.hj.call(this,h)]):(t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"}),[2,Promise.reject(t)]);case 1:return d.sent(),[2]}}))}))}function Y(e){if("string"!=typeof e.chatType||!e.chatType)throw Error("Invalid parameter chatType: ".concat(e.chatType));if(!e.messageId)throw Error("Invalid parameter messageId: ".concat(e.messageId));if(!n.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l=e.chatType,p=e.messageId,h={msgIdList:"string"==typeof p?[p]:p,msgType:"singleChat"===l?"chat":"groupchat",groupId:e.groupId||null},d={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/reaction/user/").concat(this.user),type:"GET",data:h,dataType:"json",headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}};return a.hj.call(this,d).then((function(e){var t=e.data;return null==t||t.forEach((function(e){null==e||e.reactionList.forEach((function(e){e.isAddedBySelf=e.state,delete e.state,delete e.reactionId}))})),e}))}var $=Y;function Q(e){if("string"!=typeof e.reaction||!e.reaction)throw Error("Invalid parameter reaction: ".concat(e.reaction));if("string"!=typeof e.messageId||!e.messageId)throw Error("Invalid parameter messageId: ".concat(e.messageId));if(!n.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l=e.cursor,p=e.pageSize,h={msgId:e.messageId,message:e.reaction,currentPage:l||null,pageSize:p||20},d={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/reaction/user/").concat(this.user,"/detail"),type:"GET",data:h,dataType:"json",headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}};return a.hj.call(this,d).then((function(e){return e.data.isAddedBySelf=e.data.state,delete e.data.state,delete e.data.reactionId,e}))}function ee(e){return m(this,void 0,void 0,(function(){var t,r,s,c,u,l,p,h,d,f,m;return y(this,(function(y){switch(y.label){case 0:if("string"!=typeof e.reportType||!e.reportType)throw Error("Invalid parameter reportType: ".concat(e.reportType));if("string"!=typeof e.messageId||!e.messageId)throw Error("Invalid parameter messageId: ".concat(e.messageId));if("string"!=typeof e.reportReason||!e.reportReason)throw Error("Invalid parameter messageId: ".concat(e.reportReason));return n.XZ.call(this)?(r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l=e.reportType,p=e.reportReason,h=e.messageId,d={username:this.user,reportType:l,reportReason:p},f="".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/user/").concat(this.user,"/moderation/report/message/").concat(h),m={url:f,type:"POST",data:JSON.stringify(d),dataType:"json",headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}},[4,a.hj.call(this,m)]):(t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"}),[2,Promise.reject(t)]);case 1:return y.sent(),[2]}}))}))}},6369:function(e,t,r){"use strict";r.r(t),r.d(t,{getPresenceStatus:function(){return d},getSubscribedPresenceList:function(){return p},getSubscribedPresencelist:function(){return h},publishPresence:function(){return c},subscribePresence:function(){return u},unsubscribePresence:function(){return l}}),r(514),r(4201),r(900),r(3814),r(7095),r(3529);var n=r(7551),o=r(1222),i=r(7480),a=r(3365),s=r(6916);function c(e){if("string"!=typeof e.description)throw Error('Invalid parameter: "description"');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.accessToken,u=r.orgName,l=r.appName,p=r.userId,h=this.context.jid.clientResource,d={ext:e.description},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/users/").concat(p,"/presence/").concat(h,"/1"),type:"POST",dataType:"json",data:JSON.stringify(d),headers:{Authorization:"Bearer "+c,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call publishPresence:",e),n.hj.call(this,f)}function u(e){if(!Array.isArray(e.usernames))throw Error('Invalid parameter: "usernames"');if(!e.usernames.length)throw Error('"usernames" can not be empty');if("number"!=typeof e.expiry)throw Error('Invalid parameter: "expiry"');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.orgName,u=r.appName,l=r.userId,p=r.accessToken,h={usernames:e.usernames},d={url:"".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/users/").concat(l,"/presence/").concat(e.expiry),type:"POST",dataType:"json",data:JSON.stringify(h),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call subscribePresence:",e),n.hj.call(this,d)}function l(e){if(!Array.isArray(e.usernames))throw Error('Invalid parameter: "usernames"');if(!e.usernames.length)throw Error('"usernames" can not be empty');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.orgName,u=r.appName,l=r.userId,p=r.accessToken,h=(e.usernames,{url:"".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/users/").concat(l,"/presence"),type:"DELETE",dataType:"json",data:JSON.stringify(e.usernames),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error});return s.kg.debug("Call unsubscribePresence:",e),n.hj.call(this,h)}function p(e){if("number"!=typeof e.pageNum||"number"!=typeof e.pageSize)throw Error('Invalid parameter: "pageNum or pageSize"');if(e.pageNum<0||e.pageSize<0)throw Error('"pageNum" should >= 0 and "pageSize" should >= 0');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.orgName,u=r.appName,l=r.userId,p=r.accessToken,h={url:"".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/users/").concat(l,"/presence/sublist?pageNum=").concat(e.pageNum,"&pageSize=").concat(e.pageSize),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getSubscribedPresenceList:",e),n.hj.call(this,h)}var h=p;function d(e){if(!Array.isArray(e.usernames))throw Error('Invalid parameter: "usernames"');if(!e.usernames.length)throw Error('"usernames" can not be empty');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r={usernames:e.usernames},c=this.context,u=c.orgName,l=c.appName,p=c.userId,h=c.accessToken,d={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/users/").concat(p,"/presence"),type:"POST",dataType:"json",data:JSON.stringify(r),headers:{Authorization:"Bearer "+h,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getPresenceStatus:",e),n.hj.call(this,d)}},223:function(e,t,r){"use strict";r.r(t),r.d(t,{clearRemindTypeForConversation:function(){return p},getPushPerformLanguage:function(){return m},getSilentModeForAll:function(){return u},getSilentModeForConversation:function(){return h},getSilentModeForConversations:function(){return d},setPushPerformLanguage:function(){return f},setSilentModeForAll:function(){return c},setSilentModeForConversation:function(){return l}}),r(3786),r(900),r(3814),r(7095),r(3529),r(1362),r(7988),r(3535);var n=r(7551),o=r(1222),i=r(7480),a=r(3365),s=r(6916);function c(e){if(!(e.options instanceof Object))throw Error('Invalid parameter: "options"');var t=e.options.paramType;if("number"!=typeof t||t<0||t>2)throw Error('Invalid parameter: "options of paramType"');if(0===t){if("string"!=typeof e.options.remindType)throw Error('Invalid parameter: "options of remindType"')}else if(1===t){if("number"!=typeof e.options.duration)throw Error('Invalid parameter: "options of duration"')}else if(2===t){var r=e.options,c=r.startTime,u=r.endTime;if(!(c instanceof Object&&Object.keys(c).length))throw Error('Invalid parameter: "options of startTime"');if(!c.hours||"number"!=typeof c.hours||!c.minutes||"number"!=typeof c.minutes)throw Error('Invalid parameter: "options of startTime of hours or minutes"');if(!(u instanceof Object&&Object.keys(u).length))throw Error('Invalid parameter: "options of endTime"');if(!u.hours||"number"!=typeof u.hours||!u.minutes||"number"!=typeof u.minutes)throw Error('Invalid parameter: "options of endTime of hours or minutes"')}if(!o.XZ.call(this)){var l=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(l)}var p=this.context,h=p.accessToken,d=p.orgName,f=p.appName,m=p.userId,y={};switch(t){case 0:y={type:e.options.remindType};break;case 1:y={ignoreDuration:e.options.duration};break;case 2:var g=e.options;c=g.startTime,u=g.endTime,y={ignoreInterval:"".concat(c.hours,":").concat(c.minutes,"-").concat(u.hours,":").concat(u.minutes)}}var v={url:"".concat(this.apiUrl,"/").concat(d,"/").concat(f,"/users/").concat(m,"/notification/user/").concat(m),type:"PUT",dataType:"json",data:JSON.stringify(y),headers:{Authorization:"Bearer "+h,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call setSilentModeForAll:",e),n.hj.call(this,v)}function u(e){if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.accessToken,u=r.orgName,l=r.appName,p=r.userId,h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/users/").concat(p,"/notification/user/").concat(p),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+c,"Content-Type":"application/json"},success:null==e?void 0:e.success,error:null==e?void 0:e.error};return s.kg.debug("Call getSilentModeForAll:",e),n.hj.call(this,h)}function l(e){if("string"!=typeof e.conversationId||!e.conversationId)throw Error('Invalid parameter: "conversationId"');if("string"!=typeof e.type||!e.type)throw Error('Invalid parameter: "type"');if(!(e.options instanceof Object))throw Error('Invalid parameter: "options"');var t=e.options.paramType;if("number"!=typeof t||t<0||t>2)throw Error('Invalid parameter: "options of paramType"');if(0===t){if("string"!=typeof e.options.remindType)throw Error('Invalid parameter: "options of remindType"')}else if(1===t){if("number"!=typeof e.options.duration)throw Error('Invalid parameter: "options of duration"')}else if(2===t){var r=e.options,c=r.startTime,u=r.endTime;if(!(c instanceof Object&&Object.keys(c).length))throw Error('Invalid parameter: "options of startTime"');if(!c.hours||"number"!=typeof c.hours||!c.minutes||"number"!=typeof c.minutes)throw Error('Invalid parameter: "options of startTime of hours or minutes"');if(!(u instanceof Object&&Object.keys(u).length))throw Error('Invalid parameter: "options of endTime"');if(!u.hours||"number"!=typeof u.hours||!u.minutes||"number"!=typeof u.minutes)throw Error('Invalid parameter: "options of endTime of hours or minutes"')}if(!o.XZ.call(this)){var l=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(l)}var p=this.context,h=p.accessToken,d=p.orgName,f=p.appName,m=p.userId,y="chatgroup",g={};switch(t){case 0:g={type:e.options.remindType};break;case 1:g={ignoreDuration:e.options.duration};break;case 2:var v=e.options;c=v.startTime,u=v.endTime,g={ignoreInterval:"".concat(c.hours,":").concat(c.minutes,"-").concat(u.hours,":").concat(u.minutes)}}"singleChat"===e.type&&(y="user");var E={url:"".concat(this.apiUrl,"/").concat(d,"/").concat(f,"/users/").concat(m,"/notification/").concat(y,"/").concat(e.conversationId),type:"PUT",dataType:"json",data:JSON.stringify(g),headers:{Authorization:"Bearer "+h,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call setSilentModeForConversation:",e),n.hj.call(this,E)}function p(e){if("string"!=typeof e.conversationId||!e.conversationId)throw Error('Invalid parameter: "conversationId"');if("string"!=typeof e.type||!e.type)throw Error('Invalid parameter: "type"');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.accessToken,u=r.orgName,l=r.appName,p=r.userId,h="chatgroup";"singleChat"===e.type&&(h="user");var d={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/users/").concat(p,"/notification/").concat(h,"/").concat(e.conversationId),type:"PUT",dataType:"json",data:JSON.stringify({type:"DEFAULT"}),headers:{Authorization:"Bearer "+c,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call clearRemindTypeForConversation:",e),n.hj.call(this,d)}function h(e){if("string"!=typeof e.conversationId||!e.conversationId)throw Error('Invalid parameter: "conversationId"');if("string"!=typeof e.type||!e.type)throw Error('Invalid parameter: "type"');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.accessToken,u=r.orgName,l=r.appName,p=r.userId,h="chatgroup";"singleChat"===e.type&&(h="user");var d={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/users/").concat(p,"/notification/").concat(h,"/").concat(e.conversationId),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+c,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getSilentModeForConversation:",e),n.hj.call(this,d)}function d(e){if(!Array.isArray(e.conversationList))throw Error('Invalid parameter: "conversationList"');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.accessToken,u=r.orgName,l=r.appName,p=r.userId,h=[],d=[];e.conversationList.forEach((function(e){"singleChat"===e.type?h.push(e.id):d.push(e.id)}));var f=h.length?h.join(","):"",m=d.length?d.join(","):"",y={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/users/").concat(p,"/notification?user=").concat(f,"&group=").concat(m),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+c,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getSilentModeForConversations:",e),n.hj.call(this,y)}function f(e){if("string"!=typeof e.language||!e.language)throw Error('Invalid parameter: "language"');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r={translationLanguage:e.language},c=this.context,u=c.accessToken,l=c.orgName,p=c.appName,h=c.userId,d={url:"".concat(this.apiUrl,"/").concat(l,"/").concat(p,"/users/").concat(h,"/notification/language"),type:"PUT",dataType:"json",data:JSON.stringify(r),headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call setPushPerformLanguage:",e),n.hj.call(this,d)}function m(e){if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.accessToken,u=r.orgName,l=r.appName,p=r.userId,h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/users/").concat(p,"/notification/language"),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+c,"Content-Type":"application/json"},success:null==e?void 0:e.success,error:null==e?void 0:e.error};return s.kg.debug("Call getPushPerformLanguage:",e),n.hj.call(this,h)}},318:function(e,t,r){"use strict";r.r(t),r.d(t,{changeChatThreadName:function(){return f},createChatThread:function(){return l},destroyChatThread:function(){return d},getChatThreadDetail:function(){return _},getChatThreadLastMessage:function(){return E},getChatThreadMembers:function(){return m},getChatThreads:function(){return v},getJoinedChatThreads:function(){return g},joinChatThread:function(){return p},leaveChatThread:function(){return h},removeChatThreadMember:function(){return y}}),r(900),r(3814),r(514),r(4201),r(6864),r(1685),r(2486),r(4261),r(8668),r(7095),r(1362),r(7988),r(3529);var n=r(3365),o=r(7480),i=r(7551),a=r(1222),s=r(2006),c=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},u=function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function l(e){if("string"!=typeof e.name||""===e.name)throw Error("Invalid parameter name: ".concat(e.name));if("string"!=typeof e.messageId||""===e.messageId)throw Error("Invalid parameter messageId: ".concat(e.messageId));if("string"!=typeof e.parentId||""===e.parentId)throw Error("Invalid parameter parentId: ".concat(e.parentId));if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l=r.jid,p={name:e.name,msg_id:e.messageId,group_id:e.parentId,owner:this.user},h={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/thread?resource=").concat(l.clientResource),type:"POST",dataType:"json",data:JSON.stringify(p),headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}};return i.hj.call(this,h).then((function(e){var t=e.data.thread_id;return e.data={chatThreadId:t},e}))}function p(e){if("string"!=typeof e.chatThreadId||""===e.chatThreadId)throw Error("Invalid parameter chatThreadId: ".concat(e.chatThreadId));if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l=r.jid,p={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/thread/").concat(e.chatThreadId,"/user/").concat(this.user,"/join?resource=").concat(l.clientResource),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}};return i.hj.call(this,p).then((function(e){var t=e.data.detail;return t.messageId=t.msgId,t.parentId=t.groupId,delete t.msgId,delete t.groupId,e}))}function h(e){return c(this,void 0,void 0,(function(){var t,r,s,c,l,p,h;return u(this,(function(u){switch(u.label){case 0:if("string"!=typeof e.chatThreadId||""===e.chatThreadId)throw Error("Invalid parameter chatThreadId: ".concat(e.chatThreadId));return a.XZ.call(this)?(r=this.context,s=r.orgName,c=r.appName,l=r.accessToken,p=r.jid,h={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/thread/").concat(e.chatThreadId,"/user/").concat(this.user,"/quit?resource=").concat(p.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"}},[4,i.hj.call(this,h)]):(t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"}),[2,Promise.reject(t)]);case 1:return u.sent(),[2]}}))}))}function d(e){return c(this,void 0,void 0,(function(){var t,r,s,c,l,p,h;return u(this,(function(u){switch(u.label){case 0:if("string"!=typeof e.chatThreadId||""===e.chatThreadId)throw Error("Invalid parameter chatThreadId: ".concat(e.chatThreadId));return a.XZ.call(this)?(r=this.context,s=r.orgName,c=r.appName,l=r.accessToken,p=r.jid,h={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/thread/").concat(e.chatThreadId,"?resource=").concat(p.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"}},[4,i.hj.call(this,h)]):(t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"}),[2,Promise.reject(t)]);case 1:return u.sent(),[2]}}))}))}function f(e){if("string"!=typeof e.chatThreadId||""===e.chatThreadId)throw Error("Invalid parameter chatThreadId: ".concat(e.chatThreadId));if("string"!=typeof e.name||""===e.name)throw Error("Invalid parameter name: ".concat(e.name));if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l=r.jid,p={name:e.name},h={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/thread/").concat(e.chatThreadId,"?resource=").concat(l.clientResource),type:"PUT",dataType:"json",data:JSON.stringify(p),headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}};return i.hj.call(this,h)}function m(e){if("string"!=typeof e.chatThreadId||""===e.chatThreadId)throw Error("Invalid parameter chatThreadId: ".concat(e.chatThreadId));if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l={limit:e.pageSize||20,cursor:e.cursor||""},p={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/thread/").concat(e.chatThreadId,"/users"),type:"GET",dataType:"json",data:l,headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}};return i.hj.call(this,p)}function y(e){if("string"!=typeof e.chatThreadId||""===e.chatThreadId)throw Error("Invalid parameter chatThreadId: ".concat(e.chatThreadId));if("string"!=typeof e.username||""===e.username)throw Error("Invalid parameter username: ".concat(e.username));if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l=r.jid,p={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/thread/").concat(e.chatThreadId,"/users/").concat(e.username,"?resource=").concat(l.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}};return i.hj.call(this,p)}function g(e){if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l={limit:e.pageSize||20,cursor:e.cursor||""},p={url:e.parentId?"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/threads/chatgroups/").concat(e.parentId,"/user/").concat(this.user):"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/threads/user/").concat(this.user),type:"GET",dataType:"json",data:l,headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}};return i.hj.call(this,p).then((function(e){var t=e.entities;return null==t||t.forEach((function(e){e.parentId=e.groupId,e.messageId=e.msgId,delete e.groupId,delete e.msgId})),e}))}function v(e){if("string"!=typeof e.parentId||""===e.parentId)throw Error("Invalid parameter parentId: ".concat(e.parentId));if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l={cursor:e.cursor||"",limit:e.pageSize||20},p={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/threads/chatgroups/").concat(e.parentId),type:"GET",dataType:"json",data:l,headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}};return i.hj.call(this,p).then((function(e){var t=e.entities;return null==t||t.forEach((function(e){e.parentId=e.groupId,e.messageId=e.msgId,delete e.groupId,delete e.msgId})),e}))}function E(e){if(!Array.isArray(e.chatThreadIds))throw Error("Invalid parameter chatThreadIds: ".concat(e.chatThreadIds));if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.orgName,u=r.appName,l=r.accessToken,p={threadIds:e.chatThreadIds},h={url:"".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/thread/message"),type:"POST",dataType:"json",data:JSON.stringify(p),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"}};return i.hj.call(this,h).then((function(e){return function(e){var t=e.entities;return null==t||t.forEach((function(e){e.chatThreadId=e.thread_id,e.last_message&&"{}"!==JSON.stringify(e.last_message)?e.lastMessage=(0,s.w)(e.last_message):e.lastMessage=e.last_message,delete e.thread_id,delete e.last_message})),e}(e)}))}function _(e){if("string"!=typeof e.chatThreadId||""===e.chatThreadId)throw Error("Invalid parameter chatThreadId: ".concat(e.chatThreadId));if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/thread/").concat(e.chatThreadId),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}};return i.hj.call(this,l).then((function(e){return e.data.affiliationsCount=e.data.affiliations_count,e.data.messageId=e.data.msgId,e.data.parentId=e.data.groupId,delete e.data.affiliations_count,delete e.data.msgId,delete e.data.groupId,e}))}},606:function(e,t,r){"use strict";r.r(t),r.d(t,{getSupportedLanguages:function(){return c},translateMessage:function(){return u}}),r(900),r(3814),r(7095),r(3529);var n=r(1222),o=r(3365),i=r(7480),a=r(6916),s=r(7551);function c(){if(!n.XZ.call(this)){var e=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,r=t.orgName,c=t.appName,u=t.accessToken,l={url:"".concat(this.apiUrl,"/").concat(r,"/").concat(c,"/users/").concat(this.user,"/translate/support/language"),dataType:"json",type:"GET",headers:{Authorization:"Bearer "+u}};return a.kg.debug("Call getSupportedLanguages"),s.hj.call(this,l)}function u(e){if("string"!=typeof e.text||""===e.text)throw Error('Invalid parameter: "text"');if(!Array.isArray(e.languages))throw Error('Invalid parameter: "language"');if(!n.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.orgName,u=r.appName,l=r.accessToken,p="".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/users/").concat(this.user,"/translate"),h={text:e.text,to:e.languages},d={url:p,dataType:"json",type:"POST",data:JSON.stringify(h),headers:{Authorization:"Bearer "+l}};return a.kg.debug("Call translateMessage"),s.hj.call(this,d)}},1222:function(e,t,r){"use strict";r.d(t,{H7:function(){return u},XZ:function(){return s},_W:function(){return c}}),r(3786),r(1362),r(900),r(7988),r(9889),r(6619);var n=r(3365),o=r(7480);function i(){var e=this.context.appName,t=this.context.orgName;return!(!e||!t)||(this.onError&&this.onError({type:n.E.WEBIM_CONNCTION_AUTH_ERROR,message:"appName or orgName is illegal"}),!1)}function a(){var e;if(!this.context.accessToken){var t=o.Z.create({type:n.E.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,message:"token not assign error"});return this.onError&&this.onError(t),null===(e=this.eventHandler)||void 0===e||e.dispatch("onError",t),!1}return!0}function s(){return a.call(this)&&i.call(this)}function c(e){var t=e.data,r=e.type;return{data:{status:Object.keys(t.errorKeys).length>0?"fail":"success",errorKeys:t.errorKeys,successKeys:t.successKeys},type:r}}function u(e){var t=e.data,r=void 0;return Object.keys(t.errorKeys).length>0&&Object.keys(t.errorKeys).forEach((function(e){var i=t.errorKeys[e];r=i.includes("is not part of you")?o.Z.create({type:n.E.NO_PERMISSION,message:i}):i.includes("size of metadata for this single chatroom exceeds the user defined limit")||i.includes("total size of chatroom metadata for this app exceeds the user defined limit")||i.includes("is exceeding maximum limit")?o.Z.create({type:n.E.MAX_LIMIT,message:i}):i.includes("is not Legal")?o.Z.create({type:n.E.REQUEST_PARAMETER_ERROR,message:i}):i.includes("Failed to update userMetadata. Concurrent updates not allowed")?o.Z.create({type:n.E.OPERATION_NOT_ALLOWED,message:i}):o.Z.create({type:n.E.WEBIM_CONNCTION_AJAX_ERROR,message:i})})),r}},4306:function(e,t,r){"use strict";r.d(t,{$x:function(){return s},F3:function(){return c},Nl:function(){return o},TJ:function(){return i},Wc:function(){return n},el:function(){return a},iB:function(){return u},yK:function(){return l}}),r(1685),r(5724),r(900),r(2486),r(4261);var n=7,o=new Map,i=new Map,a="im",s="32f24ab2ddb74f508aa9286c356cec84",c=1e3,u={INIT:9674,API:9675},l="direct"},3681:function(e,t,r){"use strict";var n,o,i,a,s,c;r.d(t,{C8:function(){return n},aC:function(){return c},c:function(){return i},dd:function(){return s},fI:function(){return o},td:function(){return a}}),function(e){e[e.UNKNOWOPERATION=-1]="UNKNOWOPERATION",e[e.REST_GET_SESSION_LIST=1]="REST_GET_SESSION_LIST",e[e.REST_DEL_SESSION=2]="REST_DEL_SESSION",e[e.REST_GET_HISTORY_MESSAGE=3]="REST_GET_HISTORY_MESSAGE",e[e.REST_OPERATE=10]="REST_OPERATE",e[e.MSYNC_SENDMESSAGE=11]="MSYNC_SENDMESSAGE",e[e.MSYNC_RECALLMESSAGE=12]="MSYNC_RECALLMESSAGE",e[e.MSYNC_OPERATE=20]="MSYNC_OPERATE",e[e.ROSTER_ADD=21]="ROSTER_ADD",e[e.ROSTER_REMOVE=22]="ROSTER_REMOVE",e[e.ROSTER_ACCEPT=23]="ROSTER_ACCEPT",e[e.ROSTER_DECLINE=24]="ROSTER_DECLINE",e[e.ROSTER_BAN=25]="ROSTER_BAN",e[e.ROSTER_ALLOW=26]="ROSTER_ALLOW",e[e.ROSTER_BLACKLIST=27]="ROSTER_BLACKLIST",e[e.ROSTER_CONTACTS=28]="ROSTER_CONTACTS",e[e.ROSTER_OPERATE=30]="ROSTER_OPERATE",e[e.USER_LOGIN=31]="USER_LOGIN",e[e.USER_CREATE=32]="USER_CREATE",e[e.USER_UPDATE_USERINFO=33]="USER_UPDATE_USERINFO",e[e.USER_FETCH_USERINFO=34]="USER_FETCH_USERINFO",e[e.USER_UPDATE_NICK=35]="USER_UPDATE_NICK",e[e.USER_UPLOAD_PUSH_TOKEN=36]="USER_UPLOAD_PUSH_TOKEN",e[e.USER_OPERATE=40]="USER_OPERATE",e[e.GROUP_CREATEGROUP=41]="GROUP_CREATEGROUP",e[e.GROUP_BLOCK_MESSAGE=42]="GROUP_BLOCK_MESSAGE",e[e.GROUP_FETCH_PUBLICGROUPS_WITHCURSOR=43]="GROUP_FETCH_PUBLICGROUPS_WITHCURSOR",e[e.GROUP_FETCH_USERS_GROUP=44]="GROUP_FETCH_USERS_GROUP",e[e.GROUP_CHANGE_OWNER=45]="GROUP_CHANGE_OWNER",e[e.GROUP_FETCH_SPECIFICATION=46]="GROUP_FETCH_SPECIFICATION",e[e.GROUP_CHANGE_GROUPATTRIBUTE=47]="GROUP_CHANGE_GROUPATTRIBUTE",e[e.GROUP_FETCH_MEMEBERS=48]="GROUP_FETCH_MEMEBERS",e[e.GROUP_GET_ADMIN=49]="GROUP_GET_ADMIN",e[e.GROUP_SET_ADMIN=50]="GROUP_SET_ADMIN",e[e.GROUP_REMOVE_ADMIN=51]="GROUP_REMOVE_ADMIN",e[e.GROUP_DESTOTYGROUP=52]="GROUP_DESTOTYGROUP",e[e.GROUP_LEAVEGROUP=53]="GROUP_LEAVEGROUP",e[e.GROUP_INVITE_TO_GROUP=54]="GROUP_INVITE_TO_GROUP",e[e.GROUP_JOIN_PUBLICGROUP=55]="GROUP_JOIN_PUBLICGROUP",e[e.GROUP_ACCEPT_JOINPUBLICGROUPAPPL=56]="GROUP_ACCEPT_JOINPUBLICGROUPAPPL",e[e.GROUP_DECLINE_JOINPUBLICGROUPAPPL=57]="GROUP_DECLINE_JOINPUBLICGROUPAPPL",e[e.GROUP_ACCEPT_INVITATION=58]="GROUP_ACCEPT_INVITATION",e[e.GROUP_DECLINE_INVITATION=59]="GROUP_DECLINE_INVITATION",e[e.GROUP_REMOVE_MEMBER=60]="GROUP_REMOVE_MEMBER",e[e.GROUP_REMOVE_MEMBERS=61]="GROUP_REMOVE_MEMBERS",e[e.GROUP_MUTE_MEMBERS=62]="GROUP_MUTE_MEMBERS",e[e.GROUP_UNMUTE_MEMBERS=63]="GROUP_UNMUTE_MEMBERS",e[e.GROUP_FETCH_MUTES=64]="GROUP_FETCH_MUTES",e[e.GROUP_BLOCK_MEMBER=65]="GROUP_BLOCK_MEMBER",e[e.GROUP_BLOCK_MEMBERS=66]="GROUP_BLOCK_MEMBERS",e[e.GROUP_UNBLOCK_MEMBER=67]="GROUP_UNBLOCK_MEMBER",e[e.GROUP_UNBLOCK_MEMBERS=68]="GROUP_UNBLOCK_MEMBERS",e[e.GROUP_GET_BLOCK_LIST=69]="GROUP_GET_BLOCK_LIST",e[e.GROUP_MUTE_ALLMEMBERS=70]="GROUP_MUTE_ALLMEMBERS",e[e.GROUP_UNMUTE_ALLMEMBERS=71]="GROUP_UNMUTE_ALLMEMBERS",e[e.GROUP_ADD_WHITELIST=72]="GROUP_ADD_WHITELIST",e[e.GROUP_REMOVE_WHITELIST=73]="GROUP_REMOVE_WHITELIST",e[e.GROUP_FETCH_WHITELIST=74]="GROUP_FETCH_WHITELIST",e[e.GROUP_IS_IN_WHITELIST=75]="GROUP_IS_IN_WHITELIST",e[e.GROUP_GET_READ_USERS=76]="GROUP_GET_READ_USERS",e[e.GROUP_FETCH_ANNOUNCEMENT=77]="GROUP_FETCH_ANNOUNCEMENT",e[e.GROUP_UPDATE_ANNOUNCEMENT=78]="GROUP_UPDATE_ANNOUNCEMENT",e[e.GROUP_UPLOAD_SHAREDFILE=79]="GROUP_UPLOAD_SHAREDFILE",e[e.GROUP_DELETE_SHAREDFILE=80]="GROUP_DELETE_SHAREDFILE",e[e.GROUP_FETCH_SHAREDFILE=81]="GROUP_FETCH_SHAREDFILE",e[e.GROUP_DOWNLOAD_SHAREDFILE=82]="GROUP_DOWNLOAD_SHAREDFILE",e[e.GROUP_OPERATE=100]="GROUP_OPERATE",e[e.CHATROOM_FETCH_CHATROOMSWITHPAGE=101]="CHATROOM_FETCH_CHATROOMSWITHPAGE",e[e.CHATROOM_CREATECHATROOM=102]="CHATROOM_CREATECHATROOM",e[e.CHATROOM_DESTORYCHATROOM=103]="CHATROOM_DESTORYCHATROOM",e[e.CHATROOM_FETCH_SPECIFICATION=104]="CHATROOM_FETCH_SPECIFICATION",e[e.CHATROOM_CHANGE_ATTRIBUTE=105]="CHATROOM_CHANGE_ATTRIBUTE",e[e.CHATROOM_REMOVE_MEMBER=106]="CHATROOM_REMOVE_MEMBER",e[e.CHATROOM_REMOVE_MEMBERS=107]="CHATROOM_REMOVE_MEMBERS",e[e.CHATROOM_ADD_MEMBERS=108]="CHATROOM_ADD_MEMBERS",e[e.CHATROOM_JOINCAHTROOM=109]="CHATROOM_JOINCAHTROOM",e[e.CHATROOM_LEAVECAHTROOM=110]="CHATROOM_LEAVECAHTROOM",e[e.CHATROOM_FETCH_MEMBERS=111]="CHATROOM_FETCH_MEMBERS",e[e.CHATROOM_GET_ADMIN=112]="CHATROOM_GET_ADMIN",e[e.CHATROOM_SET_ADMIN=113]="CHATROOM_SET_ADMIN",e[e.CHATROOM_REMOVE_ADMIN=114]="CHATROOM_REMOVE_ADMIN",e[e.CHATROOM_MUTE_USER=115]="CHATROOM_MUTE_USER",e[e.CHATROOM_UNMUTE_USER=116]="CHATROOM_UNMUTE_USER",e[e.CHATROOM_FETCH_MUTES=117]="CHATROOM_FETCH_MUTES",e[e.CHATROOM_BLOCK_USER=118]="CHATROOM_BLOCK_USER",e[e.CHATROOM_BLOCK_USERS=119]="CHATROOM_BLOCK_USERS",e[e.CHATROOM_UNBLOCK_USER=120]="CHATROOM_UNBLOCK_USER",e[e.CHATROOM_UNBLOCK_USERS=121]="CHATROOM_UNBLOCK_USERS",e[e.CHATROOM_FETCH_BANS=122]="CHATROOM_FETCH_BANS",e[e.CHATROOM_MUTE_ALLMEMEBERS=123]="CHATROOM_MUTE_ALLMEMEBERS",e[e.CHATROOM_UNMUTE_ALLMEMEBERS=124]="CHATROOM_UNMUTE_ALLMEMEBERS",e[e.CHATROOM_ADD_WHITELIST=125]="CHATROOM_ADD_WHITELIST",e[e.CHATROOM_REMOVE_WHITELIST=126]="CHATROOM_REMOVE_WHITELIST",e[e.CHATROOM_FETCH_WHITELIST=127]="CHATROOM_FETCH_WHITELIST",e[e.CHATROOM_FETCH_MEMBERIN_WHITELIST=128]="CHATROOM_FETCH_MEMBERIN_WHITELIST",e[e.CHATROOM_FETCH_ANNOUNCEMENT=129]="CHATROOM_FETCH_ANNOUNCEMENT",e[e.CHATROOM_UPDATE_ANNOUNCEMENT=130]="CHATROOM_UPDATE_ANNOUNCEMENT",e[e.CHATROOM_REMOVE_SHARE_FILE=131]="CHATROOM_REMOVE_SHARE_FILE",e[e.CHATROOM_GET_SHARE_FILE_LIST=132]="CHATROOM_GET_SHARE_FILE_LIST",e[e.CHATROOM_UPLOAD_FILE=133]="CHATROOM_UPLOAD_FILE",e[e.CHATROOM_OPERATE=150]="CHATROOM_OPERATE"}(n||(n={})),function(e){e.SDK_INTERNAL="SDK_INTERNAL",e.LOGIN="USER_LOGIN",e.REGISTER="USER_CREATE",e.GET_CHATROOM_LIST="CHATROOM_FETCH_CHATROOMSWITHPAGE",e.CREATE_CHATROOM="CHATROOM_CREATECHATROOM",e.DESTROY_CHATROOM="CHATROOM_DESTORYCHATROOM",e.GET_CHATROOM_DETAIL="CHATROOM_FETCH_SPECIFICATION",e.MODIFY_CHATROOM="CHATROOM_CHANGE_ATTRIBUTE",e.REMOVE_CHATROOM_MEMBER="CHATROOM_REMOVE_MEMBER",e.MULTI_REMOVE_CHATROOM_MEMBER="CHATROOM_REMOVE_MEMBERS",e.ADD_USERS_TO_CHATROOM="CHATROOM_ADD_MEMBERS",e.JOIN_CHATROOM="CHATROOM_JOINCAHTROOM",e.QUIT_CHATROOM="CHATROOM_LEAVECAHTROOM",e.LIST_CHATROOM_MEMBERS="CHATROOM_FETCH_MEMBERS",e.GET_CHATROOM_ADMIN="CHATROOM_GET_ADMIN",e.SET_CHATROOM_ADMIN="CHATROOM_SET_ADMIN",e.REMOVE_CHATROOM_ADMIN="CHATROOM_REMOVE_ADMIN",e.MUTE_CHATROOM_MEMBER="CHATROOM_MUTE_USER",e.REMOVE_MUTE_CHATROOM_MEMBER="CHATROOM_UNMUTE_USER",e.GET_MUTE_CHATROOM_MEMBERS="CHATROOM_FETCH_MUTES",e.SET_CHATROOM_MEMBER_TO_BLACK="CHATROOM_BLOCK_USER",e.MULTI_SET_CHATROOM_MEMBER_TO_BLACK="CHATROOM_BLOCK_USERS",e.REMOVE_CHATROOM_MEMBER_BLACK="CHATROOM_UNBLOCK_USER",e.MULTI_REMOVE_CHATROOM_MEMBER_BLACK="CHATROOM_UNBLOCK_USERS",e.GET_CHATROOM_BLOCK_MEMBERS="CHATROOM_FETCH_BANS",e.DISABLED_CHATROOM_SEND_MSG="CHATROOM_MUTE_ALLMEMEBERS",e.ENABLE_CHATROOM_SEND_MSG="CHATROOM_UNMUTE_ALLMEMEBERS",e.ADD_CHATROOM_WHITE_USERS="CHATROOM_ADD_WHITELIST",e.REMOVE_CHATROOM_WHITE_USERS="CHATROOM_REMOVE_WHITELIST",e.GET_CHATROOM_WHITE_USERS="CHATROOM_FETCH_WHITELIST",e.CHECK_CHATROOM_WHITE_USER="CHATROOM_FETCH_MEMBERIN_WHITELIST",e.GET_CHATROOM_ANN="CHATROOM_FETCH_ANNOUNCEMENT",e.UPDATE_CHATROOM_ANN="CHATROOM_UPDATE_ANNOUNCEMENT",e.DELETE_CHATROOM_FILE="CHATROOM_REMOVE_SHARE_FILE",e.GET_CHATROOM_FILES="CHATROOM_GET_SHARE_FILE_LIST",e.UPLOAD_CHATROOM_FILE="CHATROOM_UPLOAD_FILE",e.GET_CHATROOM_ATTRIBUTES="GET_CHATROOM_ATTRIBUTES",e.SET_CHATROOM_ATTRIBUTE="SET_CHATROOM_ATTRIBUTE",e.SET_CHATROOM_ATTRIBUTES="SET_CHATROOM_ATTRIBUTES",e.REMOVE_CHATROOM_ATTRIBUTE="REMOVE_CHATROOM_ATTRIBUTE",e.REMOVE_CHATROOM_ATTRIBUTES="REMOVE_CHATROOM_ATTRIBUTES",e.CREATE_GROUP="GROUP_CREATEGROUP",e.BLOCK_GROUP="GROUP_BLOCK_MESSAGE",e.LIST_GROUP="GROUP_FETCH_PUBLICGROUPS_WITHCURSOR",e.GET_USER_GROUP="GROUP_FETCH_USERS_GROUP",e.CHANGE_OWNER="GROUP_CHANGE_OWNER",e.GET_GROUP_INFO="GROUP_FETCH_SPECIFICATION",e.MODIFY_GROUP="GROUP_CHANGE_GROUPATTRIBUTE",e.LIST_GROUP_MEMBER="GROUP_FETCH_MEMEBERS",e.GET_GROUP_ADMIN="GROUP_GET_ADMIN",e.SET_GROUP_ADMIN="GROUP_SET_ADMIN",e.REMOVE_GROUP_ADMIN="GROUP_REMOVE_ADMIN",e.DISSOLVE_GROUP="GROUP_DESTOTYGROUP",e.QUIT_GROUP="GROUP_LEAVEGROUP",e.INVITE_TO_GROUP="GROUP_INVITE_TO_GROUP",e.JOIN_GROUP="GROUP_JOIN_PUBLICGROUP",e.AGREE_JOIN_GROUP="GROUP_ACCEPT_JOINPUBLICGROUPAPPL",e.REJECT_JOIN_GROUP="GROUP_DECLINE_JOINPUBLICGROUPAPPL",e.AGREE_INVITE_GROUP="GROUP_ACCEPT_INVITATION",e.REJECT_INVITE_GROUP="GROUP_DECLINE_INVITATION",e.REMOVE_GROUP_MEMBER="GROUP_REMOVE_MEMBER",e.MULTI_REMOVE_GROUP_MEMBER="GROUP_REMOVE_MEMBERS",e.MUTE_GROUP_MEMBER="GROUP_MUTE_MEMBERS",e.UNMUTE_GROUP_MEMBER="GROUP_UNMUTE_MEMBERS",e.GET_GROUP_MUTE_LIST="GROUP_FETCH_MUTES",e.BLOCK_GROUP_MEMBER="GROUP_BLOCK_MEMBER",e.BLOCK_GROUP_MEMBERS="GROUP_BLOCK_MEMBERS",e.UNBLOCK_GROUP_MEMBER="GROUP_UNBLOCK_MEMBER",e.UNBLOCK_GROUP_MEMBERS="GROUP_UNBLOCK_MEMBERS",e.GET_GROUP_BLACK_LIST="GROUP_GET_BLOCK_LIST",e.DISABLED_SEND_GROUP_MSG="GROUP_MUTE_ALLMEMBERS",e.ENABLE_SEND_GROUP_MSG="GROUP_UNMUTE_ALLMEMBERS",e.ADD_USERS_TO_GROUP_WHITE="GROUP_ADD_WHITELIST",e.REMOVE_GROUP_WHITE_MEMBER="GROUP_REMOVE_WHITELIST",e.GET_GROUP_WHITE_LIST="GROUP_FETCH_WHITELIST",e.IS_IN_GROUP_WHITE_LIST="GROUP_IS_IN_WHITELIST",e.GET_GROUP_MSG_READ_USER="GROUP_GET_READ_USERS",e.GET_GROUP_ANN="GROUP_FETCH_ANNOUNCEMENT",e.UPDATE_GROUP_ANN="GROUP_UPDATE_ANNOUNCEMENT",e.UPLOAD_GROUP_FILE="GROUP_UPLOAD_SHAREDFILE",e.DELETE_GROUP_FILE="GROUP_DELETE_SHAREDFILE",e.GET_GROUP_FILE_LIST="GROUP_FETCH_SHAREDFILE",e.DOWN_GROUP_FILE="GROUP_DOWNLOAD_SHAREDFILE",e.GET_SESSION_LIST="REST_GET_SESSION_LIST",e.DELETE_SESSION="REST_DEL_SESSION",e.GET_HISTORY_MSG="REST_GET_HISTORY_MESSAGE",e.UPDATE_USER_INFO="USER_UPDATE_USERINFO",e.GET_USER_INFO="USER_FETCH_USERINFO",e.UPDATE_USER_NICK="USER_UPDATE_NICK",e.UPLOAD_PUSH_TOKEN="USER_UPLOAD_PUSH_TOKEN",e.GET_BLACK_LIST="ROSTER_BLACKLIST",e.GET_CONTACTS="ROSTER_CONTACTS",e.add="ROSTER_ADD",e.remove="ROSTER_REMOVE",e.accept="ROSTER_ACCEPT",e.decline="ROSTER_DECLINE",e.ban="ROSTER_BAN",e.allow="ROSTER_ALLOW",e.SEND_MSG="MSYNC_SENDMESSAGE",e.UPLOAD_MSG_ATTACH="UPLOAD_MSG_ATTACH",e.SEND_RECALL_MSG="MSYNC_RECALLMESSAGE"}(o||(o={})),function(e){e.GET_DNS="REST_DNSLIST",e.LOGIN_BY_AGORA_TOKEN="LOGIN_BY_AGORA_TOKEN",e.LOGIN_BY_PWD="LOGIN_BY_PWD",e.RESISTER="REGISTER"}(i||(i={})),function(e){e[e["5G"]=7]="5G",e[e["4G"]=7]="4G",e[e["3G"]=7]="3G",e[e["2G"]=7]="2G",e[e["SLOW-2G"]=7]="SLOW-2G",e[e.WIFI=2]="WIFI",e[e.LAN=1]="LAN",e[e.DISCONNECTED=0]="DISCONNECTED",e[e.NONE=0]="NONE",e[e.UNKNOWN=-1]="UNKNOWN",e[e["WEBIM UNABLE TO GET"]=-2]="WEBIM UNABLE TO GET"}(a||(a={})),function(e){e[e.success=200]="success",e[e.failed=500]="failed"}(s||(s={})),function(e){e[e.web=0]="web",e[e.native=1]="native"}(c||(c={}))},7480:function(e,t){"use strict";var r=function(){function e(e){this.type=e.type,this.message=e.message,this.data=e.data}return e.create=function(t){return new e(t)},e}();t.Z=r},983:function(e,t,r){"use strict";r(9782),r(900),r(937),r(8453),r(8668),r(1362),r(7988),r(5980),r(7095);var n=r(9168),o=r.n(n),i=r(2006),a=r(7551),s=r(6916),c=r(2591),u={0:"TEXT",1:"IMAGE",2:"VIDEO",3:"LOCATION",4:"VOICE",5:"FILE",6:"COMMAND",7:"CUSTOM"};function l(e){for(var t={},r=0;r<e.length;r++)if(8===e[r].type)t[e[r].key]=JSON.parse(e[r].stringValue);else if(7===e[r].type)t[e[r].key]=e[r].stringValue;else if(6===e[r].type)t[e[r].key]=e[r].doubleValue;else if(5===e[r].type)t[e[r].key]=e[r].floatValue;else if(1===e[r].type){var n=e[r].varintValue,i=new(o())(n.low,n.high,n.unsigned).toString();t[e[r].key]=0!==Number(i)}else 2!==e[r].type&&3!==e[r].type&&4!==e[r].type||(n=e[r].varintValue,i=new(o())(n.low,n.high,n.unsigned).toString(),t[e[r].key]=Number(i));return t}function p(e,t,r){if(this.delivery&&e!==t){var n=this.getUniqueId(),o=new c.Message("delivery",n);o.set({ackId:r,to:e}),s.kg.debug("send delivery ack"),this.send(o.body)}}t.Z=function(e,t,r,n){var c,h,d,f,m,y,g,v=new(o())(e.timestamp.low,e.timestamp.high,e.timestamp.unsigned).toString(),E=this.root.lookup("easemob.pb.MessageBody").decode(e.payload),_=1;if(e.meta&&e.meta.length)switch(a.P6.parseNotify(e.meta).is_online){case 0:_=0;break;case 1:_=1;break;default:_=2}else _=3;var T,O=new(o())(e.id.low,e.id.high,e.id.unsigned).toString(),R=E.ackMessageId?new(o())(E.ackMessageId.low,E.ackMessageId.high,E.ackMessageId.unsigned).toString():"",I="",S=E.from&&E.from.name,b=E.to&&E.to.name;switch(s.kg.debug("thirdMessage:",E),E.type){case 1:I="chat","agoraToken"===this.grantType&&(I="singleChat"),this.delivery&&p.call(this,S,b,O);break;case 2:I="groupchat","agoraToken"===this.grantType&&(I="groupChat");break;case 3:I="chatroom","agoraToken"===this.grantType&&(I="chatRoom"),_=1;break;case 4:I="read_ack";var A=void 0;return E.ext[0]&&JSON.parse(E.ext[0].stringValue)?(A={id:O,type:"read",from:S,to:b,mid:R,groupReadCount:E.ext[0]&&JSON.parse(E.ext[0].stringValue),ackContent:E.ackContent,onlineState:_},this.onReadMessage&&this.onReadMessage(A),void(null===(c=this.eventHandler)||void 0===c||c.dispatch("onReadMessage",A))):(A={id:O,type:"read",from:S,to:b,mid:R,onlineState:_},this.onReadMessage&&this.onReadMessage(A),void(null===(h=this.eventHandler)||void 0===h||h.dispatch("onReadMessage",A)));case 5:I="deliver_ack",this.onDeliveredMessage&&this.onDeliveredMessage({id:O,type:"delivery",from:S,to:b,mid:R,onlineState:_});var C={id:O,type:"delivery",from:S,to:b,mid:R,onlineState:_};return void(null===(d=this.eventHandler)||void 0===d||d.dispatch("onDeliveredMessage",C));case 6:I="recall";var N={id:O,from:S||"admin",to:b,mid:R,onlineState:_};return this.onRecallMessage&&this.onRecallMessage(N),void(null===(f=this.eventHandler)||void 0===f||f.dispatch("onRecallMessage",N));case 7:this.onChannelMessage&&this.onChannelMessage({id:O,type:"channel",chatType:"singleChat",from:S,to:b,time:Number(v),onlineState:_});var w={id:O,type:"channel",chatType:"singleChat",from:S,to:b,time:Number(v),onlineState:_};return void(null===(m=this.eventHandler)||void 0===m||m.dispatch("onChannelMessage",w));default:return void s.kg.error("unexpected message type: ".concat(E.type))}"chat"===I.toLowerCase()||"singleChat"===I?T="singleChat":"groupchat"===I.toLowerCase()||"groupChat"===I?T="groupChat":(T="chatRoom",_=1);for(var M=0;M<E.contents.length;M++){var k={},U={},x=t.errorCode>0,P=t.errorCode,L=t.reason,j=E.contents[M],D={},G=[],B=[],H=null,F=null,W=void 0;if(E.ext&&(D=l(E.ext)),E.meta&&"string"==typeof E.meta){var q=JSON.parse(E.meta);q.reaction&&(G=q.reaction).forEach((function(e){e.isAddedBySelf=e.state,delete e.state})),q.translations&&(B=q.translations),q.thread&&"{}"!==JSON.stringify(q.thread)&&(H={messageId:q.thread.msg_parent_id,parentId:q.thread.muc_parent_id,chatThreadName:q.thread.thread_name}),q.thread_overview&&"{}"!==JSON.stringify(q.thread_overview)&&(F={id:q.thread_overview.id,parentId:q.thread_overview.muc_parent_id,name:q.thread_overview.name,lastMessage:(0,i.w)(q.thread_overview.last_message),createTimestamp:q.thread_overview.create_timestamp,updateTimestamp:q.thread_overview.update_timestamp,messageCount:q.thread_overview.message_count})}switch(j.type){case 0:!(k={id:O,type:I,contentsType:u[j.type],from:S,to:b,data:j.text,ext:D,sourceMsg:j.text,time:v,msgConfig:E.msgConfig,onlineState:_}).msgConfig&&delete E.msgConfig,k.error=x,k.errorText=L,k.errorCode=P,!r&&this.onTextMessage&&this.onTextMessage(k);var Z={id:O,type:"txt",chatType:T,msg:j.text,to:b,from:S,ext:D,time:Number(v),onlineState:_};k.msgConfig&&(Z.msgConfig=k.msgConfig),G.length>0&&(Z.reactions=G),H&&(Z.chatThread=H),F&&(Z.chatThreadOverview=F),B.length>0&&(Z.translations=B),U=Z,!r&&this.eventHandler&&this.eventHandler.dispatch("onTextMessage",Z);break;case 1:var K=(null===(y=null==j?void 0:j.size)||void 0===y?void 0:y.width)||0,V=(null===(g=null==j?void 0:j.size)||void 0===g?void 0:g.height)||0;W=this.useOwnUploadFun?j.remotePath:(j.remotePath&&this.apiUrl+j.remotePath.substr(j.remotePath.indexOf("/",9)))+"?em-redirect=true",j.secretKey&&!this.useOwnUploadFun&&(W="".concat(W,"&share-secret=").concat(j.secretKey)),!(k={id:O,type:I,contentsType:u[j.type],from:S,to:b,url:W,secret:j.secretKey,filename:j.displayName,thumb:this.useOwnUploadFun?"":"".concat(W,"&thumbnail=true"),thumb_secret:j.secretKey,file_length:j.fileLength||"",width:K,height:V,filetype:j.filetype||"",accessToken:this.token,ext:D,time:v,msgConfig:E.msgConfig,onlineState:_}).delay&&delete k.delay,!k.msgConfig&&delete E.msgConfig,k.error=x,k.errorText=L,k.errorCode=P,!r&&this.onPictureMessage&&this.onPictureMessage(k);var z={id:O,type:"img",chatType:T,from:S,to:b,url:W||"",file:{},width:K,height:V,secret:j.secretKey||"",thumb:this.useOwnUploadFun?"":"".concat(W,"&thumbnail=true"),thumb_secret:j.secretKey,ext:D,time:Number(v),onlineState:_};k.msgConfig&&(z.msgConfig=k.msgConfig),G.length>0&&(z.reactions=G),H&&(z.chatThread=H),F&&(z.chatThreadOverview=F),U=z,!r&&this.eventHandler&&this.eventHandler.dispatch("onImageMessage",z);break;case 2:W=this.useOwnUploadFun?j.remotePath:(j.remotePath&&this.apiUrl+j.remotePath.substr(j.remotePath.indexOf("/",9)))+"?em-redirect=true",j.secretKey&&!this.useOwnUploadFun&&(W="".concat(W,"&share-secret=").concat(j.secretKey)),!(k={id:O,type:I,contentsType:u[j.type],from:S,to:b,url:W,secret:j.secretKey,filename:j.displayName,length:j.duration||"",file_length:j.fileLength||"",filetype:j.filetype||"",accessToken:this.token||"",ext:D,time:v,msgConfig:E.msgConfig,onlineState:_}).delay&&delete k.delay,!k.msgConfig&&delete E.msgConfig,k.error=x,k.errorText=L,k.errorCode=P,!r&&this.onVideoMessage&&this.onVideoMessage(k);var J={id:O,type:"video",chatType:T,from:S,to:b,url:W,secret:j.secretKey,filename:j.displayName,length:j.duration||0,file:{},file_length:j.fileLength||0,filetype:j.filetype||"",accessToken:this.token||"",ext:D,time:Number(v),onlineState:_};k.msgConfig&&(J.msgConfig=k.msgConfig),G.length>0&&(J.reactions=G),H&&(J.chatThread=H),F&&(J.chatThreadOverview=F),U=J,!r&&this.eventHandler&&this.eventHandler.dispatch("onVideoMessage",J);break;case 3:!(k={id:O,type:I,contentsType:u[j.type],from:S,to:b,addr:j.address,buildingName:j.buildingName,lat:j.latitude,lng:j.longitude,ext:D,time:v,msgConfig:E.msgConfig,onlineState:_}).delay&&delete k.delay,!k.msgConfig&&delete E.msgConfig,k.error=x,k.errorText=L,k.errorCode=P,!r&&this.onLocationMessage&&this.onLocationMessage(k);var X={id:O,type:"loc",chatType:T,from:S,to:b,buildingName:j.buildingName,addr:j.address,lat:j.latitude,lng:j.longitude,ext:D,time:Number(v),onlineState:_};k.msgConfig&&(X.msgConfig=k.msgConfig),G.length>0&&(X.reactions=G),H&&(X.chatThread=H),F&&(X.chatThreadOverview=F),U=X,!r&&this.eventHandler&&this.eventHandler.dispatch("onLocationMessage",X);break;case 4:W=this.useOwnUploadFun?j.remotePath:(j.remotePath&&this.apiUrl+j.remotePath.substr(j.remotePath.indexOf("/",9)))+"?em-redirect=true",j.secretKey&&!this.useOwnUploadFun&&(W="".concat(W,"&share-secret=").concat(j.secretKey)),!(k={id:O,type:I,contentsType:u[j.type],from:S,to:b,url:W,secret:j.secretKey,filename:j.displayName,file_length:j.fileLength||"",accessToken:this.token||"",ext:D,length:j.duration,time:v,msgConfig:E.msgConfig,onlineState:_}).delay&&delete k.delay,!k.msgConfig&&delete E.msgConfig,k.error=x,k.errorText=L,k.errorCode=P,!r&&this.onAudioMessage&&this.onAudioMessage(k);var Y={id:O,type:"audio",chatType:T,from:S,to:b,url:W,secret:j.secretKey,file:{},filename:j.displayName,length:j.duration||0,file_length:j.fileLength||0,filetype:j.filetype||"",accessToken:this.token||"",ext:D,time:Number(v),onlineState:_};k.msgConfig&&(Y.msgConfig=k.msgConfig),G.length>0&&(Y.reactions=G),H&&(Y.chatThread=H),F&&(Y.chatThreadOverview=F),U=Y,!r&&this.eventHandler&&this.eventHandler.dispatch("onAudioMessage",Y);break;case 5:W=this.useOwnUploadFun?j.remotePath:(j.remotePath&&this.apiUrl+j.remotePath.substr(j.remotePath.indexOf("/",9)))+"?em-redirect=true",j.secretKey&&!this.useOwnUploadFun&&(W="".concat(W,"&share-secret=").concat(j.secretKey)),!(k={id:O,type:I,contentsType:u[j.type],from:S,to:b,url:W,secret:j.secretKey,filename:j.displayName,file_length:j.fileLength,accessToken:this.token||"",ext:D,time:v,msgConfig:E.msgConfig,onlineState:_}).delay&&delete k.delay,!k.msgConfig&&delete E.msgConfig,k.error=x,k.errorText=L,k.errorCode=P,!r&&this.onFileMessage&&this.onFileMessage(k);var $={id:O,type:"file",chatType:T,from:S,to:b,url:W,secret:j.secretKey,file:{},filename:j.displayName,length:j.duration||0,file_length:j.fileLength||0,filetype:j.filetype||"",accessToken:this.token||"",ext:D,time:Number(v),onlineState:_};k.msgConfig&&($.msgConfig=k.msgConfig),G.length>0&&($.reactions=G),H&&($.chatThread=H),F&&($.chatThreadOverview=F),U=$,!r&&this.eventHandler&&this.eventHandler.dispatch("onFileMessage",$);break;case 6:!(k={id:O,type:I,contentsType:u[j.type],from:S,to:b,action:j.action,ext:D,time:v,msgConfig:E.msgConfig,onlineState:_}).msgConfig&&delete E.msgConfig,k.error=x,k.errorText=L,k.errorCode=P,!r&&this.onCmdMessage&&this.onCmdMessage(k);var Q={id:O,type:"cmd",chatType:T,from:S,to:b,action:j.action,ext:D,time:Number(v),onlineState:_};k.msgConfig&&(Q.msgConfig=k.msgConfig),G.length>0&&(Q.reactions=G),H&&(Q.chatThread=H),F&&(Q.chatThreadOverview=F),U=Q,!r&&this.eventHandler&&this.eventHandler.dispatch("onCmdMessage",Q);break;case 7:var ee={},te={};E.contents[0].customExts&&(ee=l(E.contents[0].customExts)),E.contents[0].params&&(te=l(E.contents[0].params)),k={id:O,type:I,contentsType:u[j.type],from:S,to:b,customEvent:j.customEvent,params:te,customExts:ee,ext:D,time:v,onlineState:_},!r&&this.onCustomMessage&&this.onCustomMessage(k);var re={id:O,type:"custom",chatType:T,from:S,to:b,customEvent:j.customEvent,params:te,customExts:ee,ext:D,time:Number(v),onlineState:_};k.msgConfig&&(re.msgConfig=k.msgConfig),G.length>0&&(re.reactions=G),H&&(re.chatThread=H),F&&(re.chatThreadOverview=F),U=re,!r&&this.eventHandler&&this.eventHandler.dispatch("onCustomMessage",re);break;default:s.kg.error("Unknow message type, message:",j)}return n?U:k}}},5163:function(e,t,r){"use strict";r(8668);var n,o=r(6916),i=r(4306),a=r(3681);!function(e){e[e.Add=2]="Add",e[e.Remove=3]="Remove",e[e.Accept=4]="Accept",e[e.Decline=5]="Decline",e[e.Ban=6]="Ban",e[e.Allow=7]="Allow"}(n||(n={}));var s={operatRoster:function(e,t){var r=[],s=this.root.lookup("easemob.pb.RosterBody"),c=s.decode(r);switch(t){case"add":c.operation=n.Add;break;case"remove":c.operation=n.Remove;break;case"accept":c.operation=n.Accept;break;case"decline":c.operation=n.Decline;break;case"ban":c.operation=n.Ban;break;case"allow":c.operation=n.Allow;break;default:o.kg.error("operatRoster:",t)}c.from=this.context.jid;var u=[];if("string"==typeof e.to)u.push({appKey:this.appKey||this.context.appKey,name:e.to,domain:"easemob.com"});else if(e.to instanceof Array)for(var l=0;l<e.to.length;l++)u.push({appKey:this.appKey,name:e.to[l],domain:"easemob.com"});c.to=u,c.reason=e.message||"",c=s.encode(c).finish();var p=this.root.lookup("easemob.pb.Meta").decode(r);p.id=e.id||this.getUniqueId();var h=this.dataReport.geOperateFun({operationName:a.fI[t]});i.Nl.size<=i.F3&&i.Nl.set(p.id,{rpt:h,requestName:a.fI[t]}),p.from=this.context.jid,p.to={domain:"@easemob.com"},p.ns=3,p.payload=c;var d=this.root.lookup("easemob.pb.CommSyncUL"),f=d.decode(r);f.meta=p,f=d.encode(f).finish();var m=this.root.lookup("easemob.pb.MSync"),y=m.decode(r);if(y.version=this.version,y.encryptType=[0],y.command=0,y.guid=this.jid,y.payload=f,y=m.encode(y).finish(),"miniCore"===this.name)this.sock.send(y);else{var g=this.mSync.base64transform(y);this.sock.send(g)}},handleRosterMsg:function(e){var t,r,n,i,a,s,c=this.root.lookup("easemob.pb.RosterBody").decode(e.payload),u={type:"",to:c.to[0].name,from:c.from.name,status:c.reason};switch(c.operation){case 2:u.type="subscribe",this.onContactInvited&&this.onContactInvited(u),null===(t=this.eventHandler)||void 0===t||t.dispatch("onContactInvited",u);break;case 3:u.type="unsubscribed",this.onContactDeleted&&this.onContactDeleted(u),null===(r=this.eventHandler)||void 0===r||r.dispatch("onContactDeleted",u);break;case 4:u.type="subscribed",this.onContactAdded&&this.onContactAdded(u),null===(n=this.eventHandler)||void 0===n||n.dispatch("onContactAdded",u);break;case 5:u.type="unsubscribed",this.onContactRefuse&&this.onContactRefuse(u),null===(i=this.eventHandler)||void 0===i||i.dispatch("onContactRefuse",u);break;case 6:case 7:this.getBlacklist();break;case 8:u.type="subscribed",this.onContactAgreed&&this.onContactAgreed(u),null===(a=this.eventHandler)||void 0===a||a.dispatch("onContactAgreed",u);break;case 9:u.type="unsubscribed",this.onContactRefuse&&this.onContactRefuse(u),null===(s=this.eventHandler)||void 0===s||s.dispatch("onContactRefuse",u);break;default:o.kg.error("handleRosterMsg:",c)}this.onPresence&&u.type&&this.onPresence(u)}};t.Z=s},6916:function(e,t,r){"use strict";function n(){console.log&&(console.log.apply?console.log.apply(console,Array.prototype.slice.call(arguments)):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}r.d(t,{kg:function(){return f}}),r(2657),r(7095),r(8668),r(3535),r(1685),r(900),r(2486),r(4261),r(4838),r(8385),r(7693),r(9782),r(1008),r(7461),r(1362),r(5980),r(514),r(4201),r(6864);var o="undefined"!=typeof window&&void 0!==window.navigator&&/Trident\/|MSIE /.test(window.navigator.userAgent);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var a,s=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},c=function(){},u={};!function(e){e[e.TRACE=0]="TRACE",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(a||(a={}));var l=function(){function e(e,t,r){this.name=e||"defaultLogger",this.currentLevel=0,this.useCookiePersist=!1,this.storageLogLevelKey="loglevel",this.levels=a,this.logMethods=["trace","debug","info","warn","error"],this.methodFactory=r||this.defaultMethodFactory;var n=this._getPersistedLevel();null==n&&(n=null===t?"WARN":t),this.logs=[],this.config={useCache:!1,maxCache:3145728,color:"",background:""},this.logBytes=0,this.setLevel(n,!1,"")}return e.prototype.setConfig=function(e){this.config=e},e.prototype.getLevel=function(){return this.currentLevel},e.prototype.setLevel=function(e,t,r){if("string"==typeof e&&(e=a[e]),void 0===e&&(e=0),!("number"==typeof e&&e>=0&&e<=this.levels.SILENT))throw Error("log.setLevel() called with invalid level: "+e);if(this.currentLevel=e,!1!==t&&this._persistLevel(e),this.replaceLoggingMethods(e,r),"undefined"==typeof console&&e<a.SILENT)throw Error("No console available for logging")},e.prototype.setDefaultLevel=function(e){this._getPersistedLevel()||this.setLevel(e,!1,"")},e.prototype.enableAll=function(e){this.setLevel(this.levels.TRACE,!0,"")},e.prototype.disableAll=function(e){this.setLevel(this.levels.SILENT,!0,"")},e.prototype.getLogs=function(){return this.logs},e.prototype.download=function(){if("undefined"!=typeof window&&"undefined"!=typeof document){var e=this.getLogs().join("\n"),t=new Blob([e],{type:"text/plain;charset=UTF-8"}),r=window.URL.createObjectURL(t),n=document.createElement("a");n.style.display="none",n.href=r,n.setAttribute("download","sdklog"),document.body.appendChild(n),n.click()}},e.prototype._bindMethod=function(e,t,r){var n=this,o=e[t],i=this.getTime();if(r)return this._cacheLog;if("function"==typeof o.bind)return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=n.getTime();o.call.apply(o,s([e,"".concat(a," IM SDK [").concat("log"===t?"debug":t,"]: ")],r,!1)),n.logsCallback&&n.logsCallback({time:a,level:"log"===t?"debug":t,logs:r})};try{return Function.prototype.bind.call(o,e,"".concat(i," IM SDK [").concat("log"===t?"debug":t,"]: "))}catch(t){return function(){return Function.prototype.apply.apply(o,[e,arguments])}}},e.prototype.getTime=function(){var e=new Date;return e.toTimeString().split(" ")[0]+":"+e.getMilliseconds()},e.prototype._cacheLog=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(new Date).toLocaleString()+": ",n="";e.forEach((function(e){"object"===i(e)?n+=JSON.stringify(e)+" ":n+=e+" "})),this._cacheLogCall(r+n)},e.prototype._cacheLogCall=function(e){var t=p(e),r=this.logBytes+t,n=this.config.maxCache;if(!(t>=n)){if(r<n)this.logBytes+=t;else for(var o=r-n,i=0;i<o;){var a=this.logs.shift();void 0!==a&&(i+=p(a))}this.logs.push(e)}},e.prototype._getPersistedLevel=function(){var e;if("undefined"==typeof window)return 5;if("undefined"===(e=window&&window.localStorage&&window.localStorage[this.storageLogLevelKey])){var t=window.document.cookie,r=t.indexOf(encodeURIComponent(this.storageLogLevelKey));-1!==r&&(e=/^([^;]+)/.exec(t.slice(r))[1])}return e||5},e.prototype._persistLevel=function(e){var t=this.logMethods[e]||"SILENT";"undefined"!=typeof window&&(window.localStorage&&(window.localStorage[this.storageLogLevelKey]=t),this.useCookiePersist&&(window.document.cookie=encodeURIComponent(this.storageLogLevelKey)+"="+t+";"))},e.prototype.replaceLoggingMethods=function(e,t){for(var r=0;r<this.logMethods.length;r++){var n=this.logMethods[r];this[n]=r<e?c:this.methodFactory(n,e,t)}this.log=this.debug},e.prototype.defaultMethodFactory=function(e,t,r){return this.realMethod(e)||this.enableLoggingWhenConsoleArrives.apply(this,[e,t,r])},e.prototype.realMethod=function(e){return"debug"===e&&(e="log"),"undefined"!=typeof console&&("trace"===e&&o?n:void 0!==console[e]?this._bindMethod(console,e,this.config.useCache):void 0!==console.log?this._bindMethod(console,"log",this.config.useCache):c)},e.prototype.enableLoggingWhenConsoleArrives=function(e,t,r){return function(){"undefined"!=typeof console&&(this.replaceLoggingMethods.call(this,t,r),this[e].apply(this,arguments))}.bind(this)},e}();function p(e){for(var t=e.length,r=0;r<e.length;r++)e.charCodeAt(r)>255&&t++;return t}var h=new l;h.getLogger=function(e){if("string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");return this};var d="undefined"!=typeof window?window.log:void 0;h.noConflict=function(){return"undefined"!=typeof window&&window.log===h&&(window.log=d),h},h.getLoggers=function(){return u};var f=h},2591:function(e,t,r){"use strict";r.d(t,{Message:function(){return m}});var n=r(7551),o=function(){function e(e){var t=e.id;this.id=t,this.type=e.type}return e.prototype.set=function(e){this.body={id:this.id,ackId:e.id,type:"read",to:e.to,from:e.from||"",chatType:e.chatType}},e.create=function(e){return{id:n.P6.getUniqueId(),chatType:e.chatType,ackId:e.id,type:"read",to:e.to,from:e.from||"",ackContent:e.ackContent,isChatThread:e.isChatThread}},e}(),i=function(){function e(e){this.id=e.id,this.type=e.type}return e.prototype.set=function(e){this.body={id:this.id,ackId:e.ackId,type:"delivery",to:e.to,from:e.from||""}},e.create=function(e){return{id:n.P6.getUniqueId(),ackId:e.ackId,type:"delivery",to:e.to,from:e.from||"",isChatThread:e.isChatThread}},e}(),a=(r(9046),r(9782),function(){function e(e){var t=e.type,r=e.id;this.id=r,this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"channel",to:e.to,from:e.from||"",time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.P6.getUniqueId(),type:"channel",chatType:e.chatType||"singleChat",to:e.to,from:e.from||"",time:Date.now(),isChatThread:e.isChatThread}},e}()),s=(r(3529),function(){function e(e){var t=e.type,r=e.id||n.P6.getUniqueId();this.id=r,this.type=t,this.value=""}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"txt",to:e.to,msg:e.msg,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),isChatThread:e.isChatThread},this.value=e.msg},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){var t,r;return(null===(t=e.msgConfig)||void 0===t?void 0:t.languages)&&Array.isArray(null===(r=e.msgConfig)||void 0===r?void 0:r.languages),{type:"txt",id:n.P6.getUniqueId(),msg:e.msg,to:e.to,from:e.from||"",chatType:e.chatType,ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread}},e}()),c=function(){function e(e){var t=e.type,r=e.id;this.id=r||n.P6.getUniqueId(),this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"cmd",to:e.to,action:e.action,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.P6.getUniqueId(),type:"cmd",to:e.to,from:e.from||"",chatType:e.chatType||"singleChat",action:e.action,time:Date.now(),ext:e.ext,msgConfig:e.msgConfig,isChatThread:e.isChatThread}},e}(),u=function(){function e(e){var t=e.type,r=e.id||n.P6.getUniqueId();this.id=r,this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"custom",to:e.to,customEvent:e.customEvent,customExts:e.customExts,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.P6.getUniqueId(),chatType:e.chatType||"singleChat",type:"custom",to:e.to,customEvent:e.customEvent,customExts:e.customExts,from:e.from||"",ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread}},e}(),l=function(){function e(e){var t=e.type,r=e.id;this.id=r||n.P6.getUniqueId(),this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"loc",to:e.to,addr:e.addr,buildingName:e.buildingName,lat:e.lat,lng:e.lng,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.P6.getUniqueId(),chatType:e.chatType||"singleChat",type:"loc",to:e.to,addr:e.addr,buildingName:e.buildingName,lat:e.lat,lng:e.lng,from:e.from||"",ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread}},e}(),p=function(){function e(e){var t=e.type,r=e.id||n.P6.getUniqueId();this.id=r,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&n.P6.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"img",file:e.file,width:e.width,height:e.height,to:e.to,from:e.from||"",roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.P6.getUniqueId(),chatType:e.chatType,type:"img",url:e.url,width:e.width,height:e.height,file:e.file,to:e.to,from:e.from||"",ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,isChatThread:e.isChatThread}},e}(),h=function(){function e(e){var t=e.type,r=e.id||n.P6.getUniqueId();this.id=r,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&n.P6.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"audio",file:e.file,filename:e.filename,length:e.length,file_length:e.file_length,fileInputId:e.fileInputId,to:e.to,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.P6.getUniqueId(),chatType:e.chatType,type:"audio",filename:e.filename,length:e.length,file:e.file,to:e.to,from:e.from||"",ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,file_length:e.file_length,msgConfig:e.msgConfig,isChatThread:e.isChatThread}},e}(),d=function(){function e(e){var t=e.type,r=e.id;this.id=r,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&n.P6.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"video",file:e.file,filename:e.filename,length:e.length,file_length:e.file_length,fileInputId:e.fileInputId,to:e.to,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),apiUrl:e.apiUrl,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.P6.getUniqueId(),chatType:e.chatType||"singleChat",type:"video",file:e.file,filename:e.filename,length:e.length,file_length:e.file_length,fileInputId:e.fileInputId,to:e.to,from:e.from||"",ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,msgConfig:e.msgConfig,isChatThread:e.isChatThread}},e}(),f=function(){function e(e){var t=e.type,r=e.id;this.id=r,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&n.P6.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"file",file:e.file,filename:e.filename,fileInputId:e.fileInputId,to:e.to,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.P6.getUniqueId(),chatType:e.chatType||"singleChat",type:"file",file:e.file,filename:e.filename,fileInputId:e.fileInputId,to:e.to,from:e.from||"",ext:e.ext,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread}},e}(),m=function(){function e(t,r){return this.type=t,this.id=r||n.P6.getUniqueId(),e.createOldMsg({type:t,id:this.id})}return e.createOldMsg=function(e){switch(e.type){case"read":return new o({type:"read",id:e.id});case"delivery":return new i({type:"delivery",id:e.id});case"channel":return new a({type:"channel",id:e.id});case"txt":return new s({type:"txt",id:e.id});case"cmd":return new c({type:"cmd",id:e.id});case"custom":return new u({type:"custom",id:e.id});case"loc":return new l({type:"loc",id:e.id});case"img":return new p({type:"img",id:e.id});case"audio":return new h({type:"audio",id:e.id});case"video":return new d({type:"video",id:e.id});case"file":return new f({type:"file",id:e.id})}},e.create=function(e){return"txt"!==(t=e).type||"version"in t?function(e){return"img"===e.type&&!("version"in e)}(e)?p.create(e):function(e){return"cmd"===e.type&&!("version"in e)}(e)?c.create(e):function(e){return"file"===e.type&&!("version"in e)}(e)?f.create(e):function(e){return"audio"===e.type&&!("version"in e)}(e)?h.create(e):function(e){return"video"===e.type&&!("version"in e)}(e)?d.create(e):function(e){return"custom"===e.type&&!("version"in e)}(e)?u.create(e):function(e){return"loc"===e.type&&!("version"in e)}(e)?l.create(e):function(e){return"channel"===e.type&&!("version"in e)}(e)?a.create(e):function(e){return"delivery"===e.type&&!("version"in e)}(e)?i.create(e):function(e){return"read"===e.type&&!("version"in e)}(e)?o.create(e):{}:s.create(e);var t},e.prototype.set=function(e){},e}()},3365:function(e,t,r){"use strict";var n;r.d(t,{E:function(){return n}}),function(e){e[e.REQUEST_SUCCESS=0]="REQUEST_SUCCESS",e[e.REQUEST_TIMEOUT=-1]="REQUEST_TIMEOUT",e[e.REQUEST_UNKNOWN=-2]="REQUEST_UNKNOWN",e[e.REQUEST_PARAMETER_ERROR=-3]="REQUEST_PARAMETER_ERROR",e[e.REQUEST_ABORT=-4]="REQUEST_ABORT",e[e.WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR=0]="WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_OPEN_ERROR=1]="WEBIM_CONNCTION_OPEN_ERROR",e[e.WEBIM_CONNCTION_AUTH_ERROR=2]="WEBIM_CONNCTION_AUTH_ERROR",e[e.WEBIM_CONNCTION_OPEN_USERGRID_ERROR=3]="WEBIM_CONNCTION_OPEN_USERGRID_ERROR",e[e.WEBIM_CONNCTION_ATTACH_ERROR=4]="WEBIM_CONNCTION_ATTACH_ERROR",e[e.WEBIM_CONNCTION_ATTACH_USERGRID_ERROR=5]="WEBIM_CONNCTION_ATTACH_USERGRID_ERROR",e[e.WEBIM_CONNCTION_REOPEN_ERROR=6]="WEBIM_CONNCTION_REOPEN_ERROR",e[e.WEBIM_CONNCTION_SERVER_CLOSE_ERROR=7]="WEBIM_CONNCTION_SERVER_CLOSE_ERROR",e[e.WEBIM_CONNCTION_SERVER_ERROR=8]="WEBIM_CONNCTION_SERVER_ERROR",e[e.WEBIM_CONNCTION_IQ_ERROR=9]="WEBIM_CONNCTION_IQ_ERROR",e[e.WEBIM_CONNCTION_PING_ERROR=10]="WEBIM_CONNCTION_PING_ERROR",e[e.WEBIM_CONNCTION_NOTIFYVERSION_ERROR=11]="WEBIM_CONNCTION_NOTIFYVERSION_ERROR",e[e.WEBIM_CONNCTION_GETROSTER_ERROR=12]="WEBIM_CONNCTION_GETROSTER_ERROR",e[e.WEBIM_CONNCTION_CROSSDOMAIN_ERROR=13]="WEBIM_CONNCTION_CROSSDOMAIN_ERROR",e[e.WEBIM_CONNCTION_LISTENING_OUTOF_MAXRETRIES=14]="WEBIM_CONNCTION_LISTENING_OUTOF_MAXRETRIES",e[e.WEBIM_CONNCTION_RECEIVEMSG_CONTENTERROR=15]="WEBIM_CONNCTION_RECEIVEMSG_CONTENTERROR",e[e.WEBIM_CONNCTION_DISCONNECTED=16]="WEBIM_CONNCTION_DISCONNECTED",e[e.WEBIM_CONNCTION_AJAX_ERROR=17]="WEBIM_CONNCTION_AJAX_ERROR",e[e.WEBIM_CONNCTION_JOINROOM_ERROR=18]="WEBIM_CONNCTION_JOINROOM_ERROR",e[e.WEBIM_CONNCTION_GETROOM_ERROR=19]="WEBIM_CONNCTION_GETROOM_ERROR",e[e.WEBIM_CONNCTION_GETROOMINFO_ERROR=20]="WEBIM_CONNCTION_GETROOMINFO_ERROR",e[e.WEBIM_CONNCTION_GETROOMMEMBER_ERROR=21]="WEBIM_CONNCTION_GETROOMMEMBER_ERROR",e[e.WEBIM_CONNCTION_GETROOMOCCUPANTS_ERROR=22]="WEBIM_CONNCTION_GETROOMOCCUPANTS_ERROR",e[e.WEBIM_CONNCTION_LOAD_CHATROOM_ERROR=23]="WEBIM_CONNCTION_LOAD_CHATROOM_ERROR",e[e.WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR=24]="WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR",e[e.WEBIM_CONNCTION_JOINCHATROOM_ERROR=25]="WEBIM_CONNCTION_JOINCHATROOM_ERROR",e[e.WEBIM_CONNCTION_QUITCHATROOM_ERROR=26]="WEBIM_CONNCTION_QUITCHATROOM_ERROR",e[e.WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR=27]="WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR=28]="WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_SESSIONID_NOT_ASSIGN_ERROR=29]="WEBIM_CONNCTION_SESSIONID_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_RID_NOT_ASSIGN_ERROR=30]="WEBIM_CONNCTION_RID_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_CALLBACK_INNER_ERROR=31]="WEBIM_CONNCTION_CALLBACK_INNER_ERROR",e[e.WEBIM_CONNCTION_CLIENT_OFFLINE=32]="WEBIM_CONNCTION_CLIENT_OFFLINE",e[e.WEBIM_CONNCTION_CLIENT_LOGOUT=33]="WEBIM_CONNCTION_CLIENT_LOGOUT",e[e.WEBIM_CONNCTION_CLIENT_TOO_MUCH_ERROR=34]="WEBIM_CONNCTION_CLIENT_TOO_MUCH_ERROR",e[e.WEBIM_CONNECTION_ACCEPT_INVITATION_FROM_GROUP=35]="WEBIM_CONNECTION_ACCEPT_INVITATION_FROM_GROUP",e[e.WEBIM_CONNECTION_DECLINE_INVITATION_FROM_GROUP=36]="WEBIM_CONNECTION_DECLINE_INVITATION_FROM_GROUP",e[e.WEBIM_CONNECTION_ACCEPT_JOIN_GROUP=37]="WEBIM_CONNECTION_ACCEPT_JOIN_GROUP",e[e.WEBIM_CONNECTION_DECLINE_JOIN_GROUP=38]="WEBIM_CONNECTION_DECLINE_JOIN_GROUP",e[e.WEBIM_CONNECTION_CLOSED=39]="WEBIM_CONNECTION_CLOSED",e[e.WEBIM_CONNECTION_ERROR=40]="WEBIM_CONNECTION_ERROR",e[e.MAX_LIMIT=50]="MAX_LIMIT",e[e.MESSAGE_NOT_FOUND=51]="MESSAGE_NOT_FOUND",e[e.NO_PERMISSION=52]="NO_PERMISSION",e[e.OPERATION_UNSUPPORTED=53]="OPERATION_UNSUPPORTED",e[e.OPERATION_NOT_ALLOWED=54]="OPERATION_NOT_ALLOWED",e[e.WEBIM_UPLOADFILE_BROWSER_ERROR=100]="WEBIM_UPLOADFILE_BROWSER_ERROR",e[e.WEBIM_UPLOADFILE_ERROR=101]="WEBIM_UPLOADFILE_ERROR",e[e.WEBIM_UPLOADFILE_NO_LOGIN=102]="WEBIM_UPLOADFILE_NO_LOGIN",e[e.WEBIM_UPLOADFILE_NO_FILE=103]="WEBIM_UPLOADFILE_NO_FILE",e[e.WEBIM_DOWNLOADFILE_ERROR=200]="WEBIM_DOWNLOADFILE_ERROR",e[e.WEBIM_DOWNLOADFILE_NO_LOGIN=201]="WEBIM_DOWNLOADFILE_NO_LOGIN",e[e.WEBIM_DOWNLOADFILE_BROWSER_ERROR=202]="WEBIM_DOWNLOADFILE_BROWSER_ERROR",e[e.USER_NOT_FOUND=204]="USER_NOT_FOUND",e[e.WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE=206]="WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE",e[e.WEBIM_CONNCTION_USER_REMOVED=207]="WEBIM_CONNCTION_USER_REMOVED",e[e.WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD=216]="WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD",e[e.WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE=217]="WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE",e[e.USER_MUTED_BY_ADMIN=219]="USER_MUTED_BY_ADMIN",e[e.USER_NOT_FRIEND=221]="USER_NOT_FRIEND",e[e.WEBIM_MESSAGE_REC_TEXT=300]="WEBIM_MESSAGE_REC_TEXT",e[e.WEBIM_MESSAGE_REC_TEXT_ERROR=301]="WEBIM_MESSAGE_REC_TEXT_ERROR",e[e.WEBIM_MESSAGE_REC_EMOTION=302]="WEBIM_MESSAGE_REC_EMOTION",e[e.WEBIM_MESSAGE_REC_PHOTO=303]="WEBIM_MESSAGE_REC_PHOTO",e[e.WEBIM_MESSAGE_REC_AUDIO=304]="WEBIM_MESSAGE_REC_AUDIO",e[e.WEBIM_MESSAGE_REC_AUDIO_FILE=305]="WEBIM_MESSAGE_REC_AUDIO_FILE",e[e.WEBIM_MESSAGE_REC_VEDIO=306]="WEBIM_MESSAGE_REC_VEDIO",e[e.WEBIM_MESSAGE_REC_VEDIO_FILE=307]="WEBIM_MESSAGE_REC_VEDIO_FILE",e[e.WEBIM_MESSAGE_REC_FILE=308]="WEBIM_MESSAGE_REC_FILE",e[e.WEBIM_MESSAGE_SED_TEXT=309]="WEBIM_MESSAGE_SED_TEXT",e[e.WEBIM_MESSAGE_SED_EMOTION=310]="WEBIM_MESSAGE_SED_EMOTION",e[e.WEBIM_MESSAGE_SED_PHOTO=311]="WEBIM_MESSAGE_SED_PHOTO",e[e.WEBIM_MESSAGE_SED_AUDIO=312]="WEBIM_MESSAGE_SED_AUDIO",e[e.WEBIM_MESSAGE_SED_AUDIO_FILE=313]="WEBIM_MESSAGE_SED_AUDIO_FILE",e[e.WEBIM_MESSAGE_SED_VEDIO=314]="WEBIM_MESSAGE_SED_VEDIO",e[e.WEBIM_MESSAGE_SED_VEDIO_FILE=315]="WEBIM_MESSAGE_SED_VEDIO_FILE",e[e.WEBIM_MESSAGE_SED_FILE=316]="WEBIM_MESSAGE_SED_FILE",e[e.WEBIM_MESSAGE_SED_ERROR=317]="WEBIM_MESSAGE_SED_ERROR",e[e.STATUS_INIT=400]="STATUS_INIT",e[e.STATUS_DOLOGIN_USERGRID=401]="STATUS_DOLOGIN_USERGRID",e[e.STATUS_DOLOGIN_IM=402]="STATUS_DOLOGIN_IM",e[e.STATUS_OPENED=403]="STATUS_OPENED",e[e.STATUS_CLOSING=404]="STATUS_CLOSING",e[e.STATUS_CLOSED=405]="STATUS_CLOSED",e[e.STATUS_ERROR=406]="STATUS_ERROR",e[e.SERVER_BUSY=500]="SERVER_BUSY",e[e.MESSAGE_INCLUDE_ILLEGAL_CONTENT=501]="MESSAGE_INCLUDE_ILLEGAL_CONTENT",e[e.MESSAGE_EXTERNAL_LOGIC_BLOCKED=502]="MESSAGE_EXTERNAL_LOGIC_BLOCKED",e[e.SERVER_UNKNOWN_ERROR=503]="SERVER_UNKNOWN_ERROR",e[e.MESSAGE_RECALL_TIME_LIMIT=504]="MESSAGE_RECALL_TIME_LIMIT",e[e.SERVICE_NOT_ENABLED=505]="SERVICE_NOT_ENABLED",e[e.SERVICE_NOT_ALLOW_MESSAGING=506]="SERVICE_NOT_ALLOW_MESSAGING",e[e.SERVICE_NOT_ALLOW_MESSAGING_MUTE=507]="SERVICE_NOT_ALLOW_MESSAGING_MUTE",e[e.MESSAGE_MODERATION_BLOCKED=508]="MESSAGE_MODERATION_BLOCKED",e[e.MESSAGE_CURRENT_LIMITING=509]="MESSAGE_CURRENT_LIMITING",e[e.GROUP_NOT_EXIST=605]="GROUP_NOT_EXIST",e[e.GROUP_NOT_JOINED=602]="GROUP_NOT_JOINED",e[e.GROUP_MEMBERS_FULL=606]="GROUP_MEMBERS_FULL",e[e.PERMISSION_DENIED=603]="PERMISSION_DENIED",e[e.WEBIM_LOAD_MSG_ERROR=604]="WEBIM_LOAD_MSG_ERROR",e[e.GROUP_ALREADY_JOINED=601]="GROUP_ALREADY_JOINED",e[e.GROUP_MEMBERS_LIMIT=607]="GROUP_MEMBERS_LIMIT",e[e.GROUP_IS_DISABLED=608]="GROUP_IS_DISABLED",e[e.REST_PARAMS_STATUS=700]="REST_PARAMS_STATUS",e[e.CHATROOM_NOT_JOINED=702]="CHATROOM_NOT_JOINED",e[e.CHATROOM_MEMBERS_FULL=704]="CHATROOM_MEMBERS_FULL",e[e.CHATROOM_NOT_EXIST=705]="CHATROOM_NOT_EXIST",e[e.SDK_RUNTIME_ERROR=999]="SDK_RUNTIME_ERROR",e[e.PRESENCE_PARAM_EXCEED=1100]="PRESENCE_PARAM_EXCEED",e[e.REACTION_ALREADY_ADDED=1101]="REACTION_ALREADY_ADDED",e[e.REACTION_CREATING=1102]="REACTION_CREATING",e[e.REACTION_OPERATION_IS_ILLEGAL=1103]="REACTION_OPERATION_IS_ILLEGAL",e[e.TRANSLATION_NOT_VALID=1200]="TRANSLATION_NOT_VALID",e[e.TRANSLATION_TEXT_TOO_LONG=1201]="TRANSLATION_TEXT_TOO_LONG",e[e.TRANSLATION_FAILED=1204]="TRANSLATION_FAILED",e[e.THREAD_NOT_EXIST=1300]="THREAD_NOT_EXIST",e[e.THREAD_ALREADY_EXIST=1301]="THREAD_ALREADY_EXIST"}(n||(n={}))},7551:function(e,t,r){"use strict";r.d(t,{iw:function(){return n},hj:function(){return l},LR:function(){return m},cT:function(){return f},P6:function(){return g}}),r(8327),r(900),r(3814),r(9782),r(9889),r(2657),r(5980),r(8453),r(937),r(1685),r(2486),r(4261),r(4838),r(8385),r(8668),r(1655),r(1008),r(7461),r(6619);var n,o=r(3365),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=r(3681),s=r(6916),c=function(){return c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},c.apply(this,arguments)},u=function(){};function l(e,t){var r,n=this;return new Promise((function(t,n){var a=e.dataType||"text",c=e.success||u,l=e.error||u,p=new XMLHttpRequest;p.ontimeout=function(){n({type:o.E.REQUEST_TIMEOUT,message:"Request Timeout",errorType:"timeout_error",xhr:p})},p.onerror=function(){n({type:o.E.REQUEST_UNKNOWN,message:"Request Unknow Error",errorType:"onerror",xhr:p})},p.onabort=function(){n({type:o.E.REQUEST_ABORT,message:"Request Abort",errorType:"onabort",xhr:p})},p.onreadystatechange=function(){if(4===p.readyState){var e=(new Date).getTime()-r,u=p.status||0,h={elapse:e,httpCode:u};if(200===u){g.ajaxUnconventionalErrorTimes=0;try{switch(a){case"text":return c(p.responseText),void t(p.responseText);case"json":var d=JSON.parse(p.responseText);return d.extraInfo=h,c(d),void t(d);case"xml":return p.responseXML&&p.responseXML.documentElement?(c(p.responseXML.documentElement),void t(p.responseXML.documentElement)):(l({type:o.E.WEBIM_CONNCTION_AJAX_ERROR,data:p.responseText,message:"XHR.responseXML is null or XHR.responseXML.documentElement is null"}),void n({type:o.E.WEBIM_CONNCTION_AJAX_ERROR,data:p.responseText,message:"XHR.responseXML is null or XHR.responseXML.documentElement is null"}));default:l({type:o.E.WEBIM_CONNCTION_AJAX_ERROR,data:p.responseText,message:"Invalid dataType"}),n({type:o.E.WEBIM_CONNCTION_AJAX_ERROR,data:p.responseText,message:"Invalid dataType"})}return t(p.response||p.responseText),void c(p.response||p.responseText,p)}catch(e){n(e)}return}[400,401,403,404,429,500,503].includes(u)||(s.kg.debug("rest api request fail status:",u),g.ajaxUnconventionalErrorTimes++),function(e,t,r,n){var a,s,c,u,l,p,h,d,f,m,y,g,v,E,_,T,O,R,I,S,b=e.response;b&&"string"==typeof b&&(b=JSON.parse(b));var A=e.status,C={elapse:n,httpCode:A,errDesc:null==b?void 0:b.error_description};if(400===A){if(40002===b.error_code)return void t({type:o.E.THREAD_ALREADY_EXIST,message:null==b?void 0:b.error_description,extraInfo:C});if(40009===b.error_code)return void t({type:o.E.OPERATION_UNSUPPORTED,message:null==b?void 0:b.error_description,extraInfo:C});if(60010===b.error_code)return void t({type:o.E.NO_PERMISSION,message:null==b?void 0:b.desc});if(60011===b.error_code)return void t({type:o.E.CHATROOM_NOT_JOINED,message:null==b?void 0:b.desc});if(60012===b.error_code)return void t({type:o.E.MAX_LIMIT,message:null==b?void 0:b.desc});if(null===(a=b.error_description)||void 0===a?void 0:a.includes("are not members of this group"))return(null===(s=e.responseURL)||void 0===s?void 0:s.includes("chatgroups"))?t({type:o.E.GROUP_NOT_JOINED,data:e.response||e.responseText,message:b.error_description,extraInfo:C}):t({type:o.E.CHATROOM_NOT_JOINED,data:e.response||e.responseText,message:b.error_description,extraInfo:C}),void r({type:o.E.WEBIM_CONNCTION_AJAX_ERROR,message:null==b?void 0:b.error_description,data:e.responseText,extraInfo:C});if("the app not open presence"===(null==b?void 0:b.result))return void t({type:o.E.SERVICE_NOT_ENABLED,message:null==b?void 0:b.result,extraInfo:C});switch(null==b?void 0:b.error_description){case"the user is already operation this message":t({type:o.E.REACTION_ALREADY_ADDED,message:null==b?void 0:b.error_description,extraInfo:C});break;case"The quantity has exceeded the limit!":t({type:o.E.MAX_LIMIT,message:null==b?void 0:b.error_description,extraInfo:C});break;case"The user not in this group!":t({type:o.E.GROUP_NOT_JOINED,message:null==b?void 0:b.error_description,extraInfo:C});break;case"the user operation is illegal!":t({type:o.E.REACTION_OPERATION_IS_ILLEGAL,message:null==b?void 0:b.error_description,extraInfo:C});break;case"this appKey is not open reaction service!":t({type:o.E.SERVICE_NOT_ENABLED,message:null==b?void 0:b.error_description,extraInfo:C});break;case"this message is creating reaction, please try again.":t({type:o.E.REACTION_CREATING,message:null==b?void 0:b.error_description,extraInfo:C});break;case"groupId can not be null!":t({type:o.E.GROUP_NOT_EXIST,message:null==b?void 0:b.error_description,extraInfo:C});break;case"The input text is too long.":t({type:o.E.TRANSLATION_TEXT_TOO_LONG,message:null==b?void 0:b.error_description,extraInfo:C});break;case"The target language is not valid.":t({type:o.E.TRANSLATION_NOT_VALID,message:null==b?void 0:b.error_description,extraInfo:C});break;case"report failed, get message by id failed":t({type:o.E.MESSAGE_NOT_FOUND,message:null==b?void 0:b.error_description,extraInfo:C});break;case"ext is too big ":t({type:o.E.PRESENCE_PARAM_EXCEED,message:null==b?void 0:b.error_description,extraInfo:C});break;case"Request body not readable.Please check content type is correct!":t({type:o.E.REQUEST_PARAMETER_ERROR,message:null==b?void 0:b.error_description,extraInfo:C});break;default:t({type:o.E.WEBIM_CONNCTION_AJAX_ERROR,message:null==b?void 0:b.error_description,data:e.responseText,extraInfo:C}),r({type:o.E.WEBIM_CONNCTION_AJAX_ERROR,message:null==b?void 0:b.error_description,data:e.responseText,extraInfo:C})}}else if(401===A)40001===b.error_code?t({type:o.E.NO_PERMISSION,message:null==b?void 0:b.error_description,extraInfo:C}):(r({type:o.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:C}),t({type:o.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:C}));else if(403===A)4e4===b.error_code?t({type:o.E.SERVICE_NOT_ENABLED,message:null==b?void 0:b.error_description,extraInfo:C}):40003===b.error_code||40004===b.error_code?t({type:o.E.THREAD_ALREADY_EXIST,message:null==b?void 0:b.error_description,extraInfo:C}):(40005===b.error_code||40007===b.error_code)&&t({type:o.E.MAX_LIMIT,message:null==b?void 0:b.error_description,extraInfo:C}),"group member list is full!"===b.error_description?(null===(c=e.responseURL)||void 0===c?void 0:c.includes("chatgroups"))?t({type:o.E.GROUP_MEMBERS_FULL,data:e.response||e.responseText,message:b.error_description,extraInfo:C}):t({type:o.E.CHATROOM_MEMBERS_FULL,data:e.response||e.responseText,message:b.error_description,extraInfo:C}):(null===(u=b.error_description)||void 0===u?void 0:u.includes(b.error_description.includes("already in group")))?(null===(l=e.responseURL)||void 0===l?void 0:l.includes("chatgroups"))&&t({type:o.E.GROUP_ALREADY_JOINED,data:e.response||e.responseText,message:b.error_description,extraInfo:C}):(null===(p=b.error_description)||void 0===p?void 0:p.includes("are not members of this group"))?(null===(h=e.responseURL)||void 0===h?void 0:h.includes("chatgroups"))?t({type:o.E.GROUP_NOT_JOINED,data:e.response||e.responseText,message:b.error_description,extraInfo:C}):t({type:o.E.CHATROOM_NOT_JOINED,data:e.response||e.responseText,message:b.error_description,extraInfo:C}):(null===(d=b.error_description)||void 0===d?void 0:d.includes("service not open!"))||(null===(f=b.error_description)||void 0===f?void 0:f.includes("message report not open"))||(null===(m=b.error_description)||void 0===m?void 0:m.includes("messageroaming function not open"))?t({type:o.E.SERVICE_NOT_ENABLED,data:e.response||e.responseText,message:b.error_description,extraInfo:C}):(null===(y=b.error_description)||void 0===y?void 0:y.includes("members size is greater than max user size !"))?t({type:o.E.GROUP_MEMBERS_LIMIT,data:e.response||e.responseText,message:b.error_description,extraInfo:C}):(null===(g=b.error_description)||void 0===g?void 0:g.includes("can not operate this group, reason: group is disabled"))?t({type:o.E.GROUP_IS_DISABLED,data:e.response||e.responseText,message:b.error_description,extraInfo:C}):t({type:o.E.PERMISSION_DENIED,data:e.response||e.responseText,message:"permission denied",extraInfo:i(i({},C),{errDesc:"permission denied"})}),r({type:o.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:C});else if(404===A)40011===b.error_code?t({type:o.E.THREAD_NOT_EXIST,message:null==b?void 0:b.error_description,extraInfo:C}):40012===b.error_code&&t({type:o.E.NO_PERMISSION,message:null==b?void 0:b.error_description,extraInfo:C}),(null===(v=b.error_description)||void 0===v?void 0:v.includes("do not find this group"))||(null===(E=b.error_description)||void 0===E?void 0:E.includes("does not exist"))?(null===(_=e.responseURL)||void 0===_?void 0:_.includes("chatgroups"))?t({type:o.E.GROUP_NOT_EXIST,data:e.response||e.responseText,message:"The chat room dose not exist.",extraInfo:i(i({},C),{errDesc:"The chat room dose not exist."})}):t({type:o.E.CHATROOM_NOT_EXIST,data:e.response||e.responseText,message:"The chat room dose not exist.",extraInfo:i(i({},C),{errDesc:"The chat room dose not exist."})}):(null===(T=b.error_description)||void 0===T?void 0:T.includes("username"))&&(null===(O=b.error_description)||void 0===O?void 0:O.includes("doesn't exist!'"))||(null===(R=b.error_description)||void 0===R?void 0:R.includes("user not found"))?t({type:o.E.USER_NOT_FOUND,data:e.response||e.responseText,message:b.error_description,extraInfo:C}):t({type:o.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.response||e.responseText,message:e.responseText,extraInfo:C}),r({type:o.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.response||e.responseText,message:e.responseText,extraInfo:C});else if(429===A||503===A){if(null===(I=b.error_description)||void 0===I?void 0:I.includes("The request has reached the maximum limit"))return void t({type:o.E.MAX_LIMIT,message:e.responseText,extraInfo:C});t({type:o.E.SERVER_BUSY,data:e.response||e.responseText,message:"Server is busy.",extraInfo:i(i({},C),{errDesc:"Server is busy."})}),r({type:o.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:"Server is busy.",extraInfo:i(i({},C),{errDesc:"Server is busy."})})}else if(500===A){if((40006===b.error_code||40008===b.error_code||40010===b.error_code)&&t({type:o.E.SERVER_UNKNOWN_ERROR,message:null==b?void 0:b.error_description,extraInfo:C}),null===(S=b.error_description)||void 0===S?void 0:S.includes("translte failed!"))return void t({type:o.E.TRANSLATION_FAILED,message:e.responseText,extraInfo:C});t({type:o.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:"",extraInfo:C}),r({type:o.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:"",extraInfo:C})}else t({type:o.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:i(i({},C),{errDesc:"ajax error"})}),r({type:o.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:i(i({},C),{errDesc:"ajax error"})})}(p,n,l,e)}0===p.readyState&&(l({type:o.E.WEBIM_CONNCTION_AJAX_ERROR,data:p.responseText,message:"Request not initialized"}),n({type:o.E.WEBIM_CONNCTION_AJAX_ERROR,data:p.responseText,message:"Request not initialized"}))},e.responseType&&p.responseType&&(p.responseType=e.responseType),e.mimeType&&p.overrideMimeType(e.mimeType);var h=e.type||"POST",d=e.data||null,f="";if("get"===h.toLowerCase()&&d){for(var m in d)d.hasOwnProperty(m)&&(f+=m+"="+d[m]+"&");f=f?f.slice(0,-1):f,e.url+=(e.url.indexOf("?")>0?"&":"?")+(f?f+"&":f)+"_v="+(new Date).getTime(),d=null,f=""}r=(new Date).getTime(),p.open(h,e.url);var y=e.headers||{};for(var v in y["Content-Type"]||(y["Content-Type"]="application/json"),y)y.hasOwnProperty(v)&&p.setRequestHeader(v,y[v]);p.send(d)})).then((function(r){return n.dataReport&&t&&t!==a.fI.SDK_INTERNAL&&n.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:c({isSuccess:1,requestUrl:e.url,requestName:t,requestMethod:e.type},y(r.extraInfo))}),t!==a.fI.SDK_INTERNAL&&delete r.extraInfo,"Object"===p(r)?c(c({},r),{type:o.E.REQUEST_SUCCESS}):{data:r,type:o.E.REQUEST_SUCCESS}})).catch((function(r){throw n.dataReport&&t&&t!==a.fI.SDK_INTERNAL&&n.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:c({isSuccess:0,requestUrl:e.url,requestName:t,requestMethod:e.type},y(r.extraInfo))}),t!==a.fI.SDK_INTERNAL&&delete r.extraInfo,r}))}function p(e){return Object.prototype.toString.call(e).slice(8,-1)}function h(){return"undefined"!=typeof swan&&d(swan)?{platform:n.BAIDU,global:swan}:"undefined"!=typeof tt&&d(tt)?{platform:n.TT,global:tt}:"undefined"!=typeof dd&&d(dd)?{platform:n.DD,global:dd}:"undefined"!=typeof my&&d(my)?{platform:n.ZFB,global:my}:"undefined"!=typeof wx&&d(wx)?{platform:n.WX,global:wx}:"undefined"!=typeof uni&&d(uni)?{platform:n.UNI,global:uni}:"undefined"!=typeof window&&window.WebSocket?{platform:n.WEB,global:window}:{platform:n.NODE,global:r.g||{}}}function d(e){for(var t=["canIUse","getSystemInfo"],r=0,n=t.length;r<n;r++)if(!e[t[r]])return!1;return!0}function f(e,t){var r,n,i=this,s=(new Date).getTime(),c=e.accessToken;if(c){var l=e.appKey,p=[],h="",d="";if(l&&(h=(p=l.split("#"))[0],d=p[1]),h||d){var f=e.apiUrl,m=e.uploadUrl||f+"/"+h+"/"+d+"/chatfiles";if((null===(n=null===(r=null==e?void 0:e.file)||void 0===r?void 0:r.data)||void 0===n?void 0:n.size)<=0)e.onFileUploadError&&e.onFileUploadError({type:o.E.WEBIM_UPLOADFILE_ERROR,message:"fileSize must be greater than 0"});else{var y=new XMLHttpRequest;y.upload&&y.upload.addEventListener("progress",e.onFileUploadProgress||u,!1),y.addEventListener("abort",e.onFileUploadCanceled||u,!1),y.addEventListener("error",(function(e){v({type:o.E.WEBIM_UPLOADFILE_ERROR,data:y})}),!1),y.addEventListener("load",(function(r){try{var n=JSON.parse(y.responseText);if(400===y.status)return v({type:o.E.WEBIM_UPLOADFILE_ERROR,data:n}),!1;try{!function(r){var n=(new Date).getTime()-s;i.dataReport&&t&&[a.fI.UPLOAD_MSG_ATTACH,a.fI.UPLOAD_CHATROOM_FILE,a.fI.UPLOAD_GROUP_FILE].includes(t)&&i.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:{isSuccess:(null==r?void 0:r.error)?0:1,requestMethod:"POST",requestName:t,requestElapse:n,requestUrl:m,code:y.status,codeDesc:(null==r?void 0:r.error_description)||""}}),e.onFileUploadComplete&&e.onFileUploadComplete(r)}(n)}catch(r){v({type:o.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,data:r})}}catch(r){v({type:o.E.WEBIM_UPLOADFILE_ERROR,data:y.responseText})}}),!1),y.open("POST",m),y.setRequestHeader("restrict-access","true"),y.setRequestHeader("Accept","*/*"),y.setRequestHeader("Authorization","Bearer "+c);var g=new FormData;g.append("file",e.file.data),y.send(g)}}else e.onFileUploadError&&e.onFileUploadError({type:o.E.WEBIM_UPLOADFILE_ERROR,message:"AppKey illegal"})}else e.onFileUploadError&&e.onFileUploadError({type:o.E.WEBIM_UPLOADFILE_NO_LOGIN,message:"AccessToken cannot be empty"});function v(r){var n=(new Date).getTime()-s;i.dataReport&&t&&[a.fI.UPLOAD_MSG_ATTACH,a.fI.UPLOAD_CHATROOM_FILE,a.fI.UPLOAD_GROUP_FILE].includes(t)&&i.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:{isSuccess:0,requestMethod:"POST",requestName:t,requestElapse:n,requestUrl:m,code:(null==y?void 0:y.status)||0,codeDesc:"upload file error"}}),e.onFileUploadError&&e.onFileUploadError(r)}}function m(e,t){e.onFileDownloadComplete=e.onFileDownloadComplete||u,e.onFileDownloadError=e.onFileDownloadError||u;var r=(new Date).getTime(),n=new XMLHttpRequest,i=this;n.addEventListener("load",(function(o){var s=(new Date).getTime()-r;i.dataReport&&t&&t===a.fI.DOWN_GROUP_FILE&&i.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:{isSuccess:200===n.status?1:0,requestMethod:"POST",requestName:t,requestElapse:s,requestUrl:null==e?void 0:e.url,code:n.status,codeDesc:200===n.status?"":"download file error"}}),e.onFileDownloadComplete&&e.onFileDownloadComplete(n.response)}),!1),n.addEventListener("error",(function(s){var c=(new Date).getTime()-r;i.dataReport&&t&&t===a.fI.DOWN_GROUP_FILE&&i.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:{isSuccess:0,requestMethod:"POST",requestName:t,requestElapse:c,requestUrl:null==e?void 0:e.url,code:(null==n?void 0:n.status)||0,codeDesc:"download file error"}}),e.onFileDownloadError&&e.onFileDownloadError({type:o.E.WEBIM_DOWNLOADFILE_ERROR,id:e.id,xhr:n})}),!1);var s=e.method||"GET",c=e.responseType||"blob",l=e.mimeType||"text/plain; charset=x-user-defined";n.open(s,e.url),"undefined"!=typeof Blob?n.responseType=c:n.overrideMimeType(l);var p={"X-Requested-With":"XMLHttpRequest",Accept:"application/octet-stream","share-secret":e.secret,Authorization:"Bearer "+this.context.accessToken},h=e.headers||{};for(var d in h)p[d]=h[d];for(var d in p)p[d]&&n.setRequestHeader(d,p[d]);n.send(null)}function y(e){void 0===e&&(e={});var t=e.elapse,r=void 0===t?0:t,n=e.httpCode,o=void 0===n?0:n,i=e.errDesc;return{requestElapse:r,code:o,codeDesc:void 0===i?"":i}}!function(e){e.WEB="web",e.WX="wx",e.ZFB="zfb",e.DD="dd",e.TT="tt",e.BAIDU="baidu",e.QUICK_APP="quick_app",e.UNI="uni",e.NODE="node"}(n||(n={}));var g={autoIncrement:0,ajaxUnconventionalErrorTimes:0,ajax:l,getUniqueId:function(){this.autoIncrement?this.autoIncrement++:this.autoIncrement=1;var e=new Date,t=new Date(2010,1,1);return(e.getTime()-t.getTime()+this.autoIncrement).toString()},getFileUrl:function(e){var t={url:"",filename:"",filetype:"",data:{}},r="string"==typeof e?document.getElementById(e):e;if(window.URL.createObjectURL){if(!r.files)throw Error("this is not HTMLInputElement");var n=r.files;if(n.length>0){var o=n.item(0);t.data=o,t.url=window.URL.createObjectURL(o),t.filename=(null==o?void 0:o.name)||""}}else{if("string"!=typeof e)throw Error("in IE fileInputId must be string");o=document.getElementById(e).value,t.url=o;var i=o.lastIndexOf("/"),a=o.lastIndexOf("\\"),s=Math.max(i,a);t.filename=s<0?o:o.substring(s+1)}var c=t.filename.lastIndexOf(".");return-1!==c&&(t.filetype=t.filename.substring(c+1).toLowerCase()),t},uploadFile:f,flow:function(e){for(var t=e.length,r=t;r--;)if("function"!=typeof e[r])throw new TypeError("Expected a function");return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];for(var o=0,i=t?e[o].apply(this,r):r[0];++o<t;)i=e[o].call(this,i);return i}},listenNetwork:function(e,t){var r=h();if(r.platform!==n.WEB){var o=r.global,i=function(r){r.isConnected?e():t()};o.offNetworkStatusChange&&o.offNetworkStatusChange(i),o.onNetworkStatusChange&&o.onNetworkStatusChange(i)}else"undefined"!=typeof addEventListener&&(window.addEventListener("online",e),window.addEventListener("offline",t))},getEnvInfo:h,wxRequest:function(e,t){var r=this;return new Promise((function(t,r){var n=e.success||u,o=e.error||u,i=e.type||"POST",a=e.data||null,s="",c=(new Date).getTime(),l=g.getEnvInfo();if("get"===i.toLowerCase()&&a){for(var p in a)a.hasOwnProperty(p)&&(s+=p+"="+a[p]+"&");s=s?s.slice(0,-1):s,e.url+=(e.url.indexOf("?")>0?"&":"?")+(s?s+"&":s)+"_v="+(new Date).getTime(),a=null,s=""}var h={url:e.url,data:e.data,method:i,headers:{},success:function(e){var i,a,s,u,l,p={elapse:(new Date).getTime()-c,httpCode:Number((null===(i=e.statusCode)||void 0===i?void 0:i.toString())||(null===(a=e.status)||void 0===a?void 0:a.toString())),errDesc:(null===(s=null==e?void 0:e.data)||void 0===s?void 0:s.error_description)||""};if("200"===(null===(u=e.statusCode)||void 0===u?void 0:u.toString())||"200"===(null===(l=e.status)||void 0===l?void 0:l.toString())){e.data.extraInfo=p;var h=e.data;n(h),t(h)}else e.extraInfo=p,o(h=e),r(h)},complete:function(){},fail:function(e){o(e),r(e)}};if("zfb"===l.platform||"dd"===l.platform?h.headers=e.headers:h.header=e.headers,"dd"===l.platform)return dd.httpRequest(h);l.global.request(h)})).then((function(n){return r.dataReport&&t&&t!==a.fI.SDK_INTERNAL&&r.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:c({isSuccess:1,requestUrl:e.url,requestName:t,requestMethod:e.type},y(n.extraInfo))}),t!==a.fI.SDK_INTERNAL&&delete n.extraInfo,"Object"===p(n)?c(c({},n),{type:o.E.REQUEST_SUCCESS}):{data:n,type:o.E.REQUEST_SUCCESS}})).catch((function(n){throw r.dataReport&&t&&t!==a.fI.SDK_INTERNAL&&r.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:c({isSuccess:0,requestUrl:e.url,requestName:t,requestMethod:e.type},y(n.extraInfo))}),t!==a.fI.SDK_INTERNAL&&delete n.extraInfo,n}))},parseDownloadResponse:function(e){if(!window||!window.URL)throw Error("parseDownloadResponse can be used in broswer only");return e&&e.type&&"application/json"===e.type||0>Object.prototype.toString.call(e).indexOf("Blob")?this.url+"?token=":window.URL.createObjectURL(e)},download:m,parseNotify:function(e){for(var t="",r=0;r<e.length;r++)t+="%"+e[r].toString(16);return JSON.parse(decodeURIComponent(t))},getExtraData:y}},9181:function(e,t,r){var n=r(1045),o=r(7632),i=TypeError;e.exports=function(e){if(n(e))return e;throw i(o(e)+" is not a function")}},7345:function(e,t,r){var n=r(8297),o=r(7632),i=TypeError;e.exports=function(e){if(n(e))return e;throw i(o(e)+" is not a constructor")}},2091:function(e,t,r){var n=r(1045),o=String,i=TypeError;e.exports=function(e){if("object"==typeof e||n(e))return e;throw i("Can't set "+o(e)+" as a prototype")}},4651:function(e,t,r){var n=r(9140),o=r(5565),i=r(4317).f,a=n("unscopables"),s=Array.prototype;null==s[a]&&i(s,a,{configurable:!0,value:o(null)}),e.exports=function(e){s[a][e]=!0}},3025:function(e,t,r){"use strict";var n=r(7957).charAt;e.exports=function(e,t,r){return t+(r?n(e,t).length:1)}},9112:function(e,t,r){var n=r(8931),o=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw o("Incorrect invocation")}},1571:function(e,t,r){var n=r(7809),o=String,i=TypeError;e.exports=function(e){if(n(e))return e;throw i(o(e)+" is not an object")}},6280:function(e){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},9042:function(e,t,r){var n=r(4141);e.exports=n((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},5861:function(e,t,r){"use strict";var n,o,i,a=r(6280),s=r(2931),c=r(2383),u=r(1045),l=r(7809),p=r(1163),h=r(6837),d=r(7632),f=r(6493),m=r(4405),y=r(4317).f,g=r(8931),v=r(2573),E=r(7046),_=r(9140),T=r(858),O=r(7417),R=O.enforce,I=O.get,S=c.Int8Array,b=S&&S.prototype,A=c.Uint8ClampedArray,C=A&&A.prototype,N=S&&v(S),w=b&&v(b),M=Object.prototype,k=c.TypeError,U=_("toStringTag"),x=T("TYPED_ARRAY_TAG"),P=a&&!!E&&"Opera"!==h(c.opera),L=!1,j={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},D={BigInt64Array:8,BigUint64Array:8},G=function(e){var t=v(e);if(l(t)){var r=I(t);return r&&p(r,"TypedArrayConstructor")?r.TypedArrayConstructor:G(t)}},B=function(e){if(!l(e))return!1;var t=h(e);return p(j,t)||p(D,t)};for(n in j)(i=(o=c[n])&&o.prototype)?R(i).TypedArrayConstructor=o:P=!1;for(n in D)(i=(o=c[n])&&o.prototype)&&(R(i).TypedArrayConstructor=o);if((!P||!u(N)||N===Function.prototype)&&(N=function(){throw k("Incorrect invocation")},P))for(n in j)c[n]&&E(c[n],N);if((!P||!w||w===M)&&(w=N.prototype,P))for(n in j)c[n]&&E(c[n].prototype,w);if(P&&v(C)!==w&&E(C,w),s&&!p(w,U))for(n in L=!0,y(w,U,{get:function(){return l(this)?this[x]:void 0}}),j)c[n]&&f(c[n],x,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:P,TYPED_ARRAY_TAG:L&&x,aTypedArray:function(e){if(B(e))return e;throw k("Target is not a typed array")},aTypedArrayConstructor:function(e){if(u(e)&&(!E||g(N,e)))return e;throw k(d(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(s){if(r)for(var o in j){var i=c[o];if(i&&p(i.prototype,e))try{delete i.prototype[e]}catch(r){try{i.prototype[e]=t}catch(e){}}}w[e]&&!r||m(w,e,r?t:P&&b[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,o;if(s){if(E){if(r)for(n in j)if((o=c[n])&&p(o,e))try{delete o[e]}catch(e){}if(N[e]&&!r)return;try{return m(N,e,r?t:P&&N[e]||t)}catch(e){}}for(n in j)!(o=c[n])||o[e]&&!r||m(o,e,t)}},getTypedArrayConstructor:G,isView:function(e){if(!l(e))return!1;var t=h(e);return"DataView"===t||p(j,t)||p(D,t)},isTypedArray:B,TypedArray:N,TypedArrayPrototype:w}},4061:function(e,t,r){"use strict";var n=r(2383),o=r(9720),i=r(2931),a=r(6280),s=r(9684),c=r(6493),u=r(4766),l=r(4141),p=r(9112),h=r(152),d=r(2844),f=r(3577),m=r(9074),y=r(2573),g=r(7046),v=r(1242).f,E=r(4317).f,_=r(9732),T=r(9730),O=r(5125),R=r(7417),I=s.PROPER,S=s.CONFIGURABLE,b=R.get,A=R.set,C="ArrayBuffer",N="Wrong index",w=n.ArrayBuffer,M=w,k=M&&M.prototype,U=n.DataView,x=U&&U.prototype,P=Object.prototype,L=n.Array,j=n.RangeError,D=o(_),G=o([].reverse),B=m.pack,H=m.unpack,F=function(e){return[255&e]},W=function(e){return[255&e,e>>8&255]},q=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Z=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},K=function(e){return B(e,23,4)},V=function(e){return B(e,52,8)},z=function(e,t){E(e.prototype,t,{get:function(){return b(this)[t]}})},J=function(e,t,r,n){var o=f(r),i=b(e);if(o+t>i.byteLength)throw j(N);var a=b(i.buffer).bytes,s=o+i.byteOffset,c=T(a,s,s+t);return n?c:G(c)},X=function(e,t,r,n,o,i){var a=f(r),s=b(e);if(a+t>s.byteLength)throw j(N);for(var c=b(s.buffer).bytes,u=a+s.byteOffset,l=n(+o),p=0;p<t;p++)c[u+p]=l[i?p:t-p-1]};if(a){var Y=I&&w.name!==C;if(l((function(){w(1)}))&&l((function(){new w(-1)}))&&!l((function(){return new w,new w(1.5),new w(NaN),1!=w.length||Y&&!S})))Y&&S&&c(w,"name",C);else{(M=function(e){return p(this,k),new w(f(e))}).prototype=k;for(var $,Q=v(w),ee=0;Q.length>ee;)($=Q[ee++])in M||c(M,$,w[$]);k.constructor=M}g&&y(x)!==P&&g(x,P);var te=new U(new M(2)),re=o(x.setInt8);te.setInt8(0,2147483648),te.setInt8(1,2147483649),!te.getInt8(0)&&te.getInt8(1)||u(x,{setInt8:function(e,t){re(this,e,t<<24>>24)},setUint8:function(e,t){re(this,e,t<<24>>24)}},{unsafe:!0})}else k=(M=function(e){p(this,k);var t=f(e);A(this,{bytes:D(L(t),0),byteLength:t}),i||(this.byteLength=t)}).prototype,x=(U=function(e,t,r){p(this,x),p(e,k);var n=b(e).byteLength,o=h(t);if(o<0||o>n)throw j("Wrong offset");if(o+(r=void 0===r?n-o:d(r))>n)throw j("Wrong length");A(this,{buffer:e,byteLength:r,byteOffset:o}),i||(this.buffer=e,this.byteLength=r,this.byteOffset=o)}).prototype,i&&(z(M,"byteLength"),z(U,"buffer"),z(U,"byteLength"),z(U,"byteOffset")),u(x,{getInt8:function(e){return J(this,1,e)[0]<<24>>24},getUint8:function(e){return J(this,1,e)[0]},getInt16:function(e){var t=J(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=J(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return Z(J(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return Z(J(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return H(J(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return H(J(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){X(this,1,e,F,t)},setUint8:function(e,t){X(this,1,e,F,t)},setInt16:function(e,t){X(this,2,e,W,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){X(this,2,e,W,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){X(this,4,e,q,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){X(this,4,e,q,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){X(this,4,e,K,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){X(this,8,e,V,t,arguments.length>2?arguments[2]:void 0)}});O(M,C),O(U,"DataView"),e.exports={ArrayBuffer:M,DataView:U}},5239:function(e,t,r){"use strict";var n=r(4569),o=r(3943),i=r(2398),a=r(6733),s=Math.min;e.exports=[].copyWithin||function(e,t){var r=n(this),c=i(r),u=o(e,c),l=o(t,c),p=arguments.length>2?arguments[2]:void 0,h=s((void 0===p?c:o(p,c))-l,c-u),d=1;for(l<u&&u<l+h&&(d=-1,l+=h-1,u+=h-1);h-- >0;)l in r?r[u]=r[l]:a(r,u),u+=d,l+=d;return r}},9732:function(e,t,r){"use strict";var n=r(4569),o=r(3943),i=r(2398);e.exports=function(e){for(var t=n(this),r=i(t),a=arguments.length,s=o(a>1?arguments[1]:void 0,r),c=a>2?arguments[2]:void 0,u=void 0===c?r:o(c,r);u>s;)t[s++]=e;return t}},4890:function(e,t,r){"use strict";var n=r(888).forEach,o=r(3070)("forEach");e.exports=o?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},9141:function(e,t,r){var n=r(2398);e.exports=function(e,t){for(var r=0,o=n(t),i=new e(o);o>r;)i[r]=t[r++];return i}},1601:function(e,t,r){"use strict";var n=r(3847),o=r(9107),i=r(4569),a=r(7214),s=r(706),c=r(8297),u=r(2398),l=r(567),p=r(6151),h=r(1328),d=Array;e.exports=function(e){var t=i(e),r=c(this),f=arguments.length,m=f>1?arguments[1]:void 0,y=void 0!==m;y&&(m=n(m,f>2?arguments[2]:void 0));var g,v,E,_,T,O,R=h(t),I=0;if(!R||this===d&&s(R))for(g=u(t),v=r?new this(g):d(g);g>I;I++)O=y?m(t[I],I):t[I],l(v,I,O);else for(T=(_=p(t,R)).next,v=r?new this:[];!(E=o(T,_)).done;I++)O=y?a(_,m,[E.value,I],!0):E.value,l(v,I,O);return v.length=I,v}},7351:function(e,t,r){var n=r(4221),o=r(3943),i=r(2398),a=function(e){return function(t,r,a){var s,c=n(t),u=i(c),l=o(a,u);if(e&&r!=r){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((e||l in c)&&c[l]===r)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},888:function(e,t,r){var n=r(3847),o=r(9720),i=r(3392),a=r(4569),s=r(2398),c=r(5508),u=o([].push),l=function(e){var t=1==e,r=2==e,o=3==e,l=4==e,p=6==e,h=7==e,d=5==e||p;return function(f,m,y,g){for(var v,E,_=a(f),T=i(_),O=n(m,y),R=s(T),I=0,S=g||c,b=t?S(f,R):r||h?S(f,0):void 0;R>I;I++)if((d||I in T)&&(E=O(v=T[I],I,_),e))if(t)b[I]=E;else if(E)switch(e){case 3:return!0;case 5:return v;case 6:return I;case 2:u(b,v)}else switch(e){case 4:return!1;case 7:u(b,v)}return p?-1:o||l?l:b}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},1959:function(e,t,r){"use strict";var n=r(7841),o=r(4221),i=r(152),a=r(2398),s=r(3070),c=Math.min,u=[].lastIndexOf,l=!!u&&1/[1].lastIndexOf(1,-0)<0,p=s("lastIndexOf"),h=l||!p;e.exports=h?function(e){if(l)return n(u,this,arguments)||0;var t=o(this),r=a(t),s=r-1;for(arguments.length>1&&(s=c(s,i(arguments[1]))),s<0&&(s=r+s);s>=0;s--)if(s in t&&t[s]===e)return s||0;return-1}:u},3933:function(e,t,r){var n=r(4141),o=r(9140),i=r(583),a=o("species");e.exports=function(e){return i>=51||!n((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},3070:function(e,t,r){"use strict";var n=r(4141);e.exports=function(e,t){var r=[][e];return!!r&&n((function(){r.call(null,t||function(){return 1},1)}))}},6653:function(e,t,r){var n=r(9181),o=r(4569),i=r(3392),a=r(2398),s=TypeError,c=function(e){return function(t,r,c,u){n(r);var l=o(t),p=i(l),h=a(l),d=e?h-1:0,f=e?-1:1;if(c<2)for(;;){if(d in p){u=p[d],d+=f;break}if(d+=f,e?d<0:h<=d)throw s("Reduce of empty array with no initial value")}for(;e?d>=0:h>d;d+=f)d in p&&(u=r(u,p[d],d,l));return u}};e.exports={left:c(!1),right:c(!0)}},1208:function(e,t,r){"use strict";var n=r(2931),o=r(6833),i=TypeError,a=Object.getOwnPropertyDescriptor,s=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=s?function(e,t){if(o(e)&&!a(e,"length").writable)throw i("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},9730:function(e,t,r){var n=r(3943),o=r(2398),i=r(567),a=Array,s=Math.max;e.exports=function(e,t,r){for(var c=o(e),u=n(t,c),l=n(void 0===r?c:r,c),p=a(s(l-u,0)),h=0;u<l;u++,h++)i(p,h,e[u]);return p.length=h,p}},942:function(e,t,r){var n=r(9720);e.exports=n([].slice)},5416:function(e,t,r){var n=r(9730),o=Math.floor,i=function(e,t){var r=e.length,c=o(r/2);return r<8?a(e,t):s(e,i(n(e,0,c),t),i(n(e,c),t),t)},a=function(e,t){for(var r,n,o=e.length,i=1;i<o;){for(n=i,r=e[i];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==i++&&(e[n]=r)}return e},s=function(e,t,r,n){for(var o=t.length,i=r.length,a=0,s=0;a<o||s<i;)e[a+s]=a<o&&s<i?n(t[a],r[s])<=0?t[a++]:r[s++]:a<o?t[a++]:r[s++];return e};e.exports=i},4908:function(e,t,r){var n=r(6833),o=r(8297),i=r(7809),a=r(9140)("species"),s=Array;e.exports=function(e){var t;return n(e)&&(t=e.constructor,(o(t)&&(t===s||n(t.prototype))||i(t)&&null===(t=t[a]))&&(t=void 0)),void 0===t?s:t}},5508:function(e,t,r){var n=r(4908);e.exports=function(e,t){return new(n(e))(0===t?0:t)}},7214:function(e,t,r){var n=r(1571),o=r(6186);e.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(t){o(e,"throw",t)}}},3802:function(e,t,r){var n=r(9140)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},e(i)}catch(e){}return r}},6027:function(e,t,r){var n=r(9720),o=n({}.toString),i=n("".slice);e.exports=function(e){return i(o(e),8,-1)}},6837:function(e,t,r){var n=r(1247),o=r(1045),i=r(6027),a=r(9140)("toStringTag"),s=Object,c="Arguments"==i(function(){return arguments}());e.exports=n?i:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=s(e),a))?r:c?i(t):"Object"==(n=i(t))&&o(t.callee)?"Arguments":n}},6675:function(e,t,r){"use strict";var n=r(4317).f,o=r(5565),i=r(4766),a=r(3847),s=r(9112),c=r(7323),u=r(5991),l=r(9719),p=r(8174),h=r(4467),d=r(2931),f=r(6811).fastKey,m=r(7417),y=m.set,g=m.getterFor;e.exports={getConstructor:function(e,t,r,l){var p=e((function(e,n){s(e,h),y(e,{type:t,index:o(null),first:void 0,last:void 0,size:0}),d||(e.size=0),c(n)||u(n,e[l],{that:e,AS_ENTRIES:r})})),h=p.prototype,m=g(t),v=function(e,t,r){var n,o,i=m(e),a=E(e,t);return a?a.value=r:(i.last=a={index:o=f(t,!0),key:t,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=a),n&&(n.next=a),d?i.size++:e.size++,"F"!==o&&(i.index[o]=a)),e},E=function(e,t){var r,n=m(e),o=f(t);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==t)return r};return i(h,{clear:function(){for(var e=m(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,d?e.size=0:this.size=0},delete:function(e){var t=this,r=m(t),n=E(t,e);if(n){var o=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=o),o&&(o.previous=i),r.first==n&&(r.first=o),r.last==n&&(r.last=i),d?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=m(this),n=a(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!E(this,e)}}),i(h,r?{get:function(e){var t=E(this,e);return t&&t.value},set:function(e,t){return v(this,0===e?0:e,t)}}:{add:function(e){return v(this,e=0===e?0:e,e)}}),d&&n(h,"size",{get:function(){return m(this).size}}),p},setStrong:function(e,t,r){var n=t+" Iterator",o=g(t),i=g(n);l(e,t,(function(e,t){y(this,{type:n,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?p("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,p(void 0,!0))}),r?"entries":"values",!r,!0),h(t)}}},6202:function(e,t,r){"use strict";var n=r(4866),o=r(2383),i=r(9720),a=r(1122),s=r(4405),c=r(6811),u=r(5991),l=r(9112),p=r(1045),h=r(7323),d=r(7809),f=r(4141),m=r(3802),y=r(5125),g=r(8851);e.exports=function(e,t,r){var v=-1!==e.indexOf("Map"),E=-1!==e.indexOf("Weak"),_=v?"set":"add",T=o[e],O=T&&T.prototype,R=T,I={},S=function(e){var t=i(O[e]);s(O,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(E&&!d(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return E&&!d(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(E&&!d(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})};if(a(e,!p(T)||!(E||O.forEach&&!f((function(){(new T).entries().next()})))))R=r.getConstructor(t,e,v,_),c.enable();else if(a(e,!0)){var b=new R,A=b[_](E?{}:-0,1)!=b,C=f((function(){b.has(1)})),N=m((function(e){new T(e)})),w=!E&&f((function(){for(var e=new T,t=5;t--;)e[_](t,t);return!e.has(-0)}));N||((R=t((function(e,t){l(e,O);var r=g(new T,e,R);return h(t)||u(t,r[_],{that:r,AS_ENTRIES:v}),r}))).prototype=O,O.constructor=R),(C||w)&&(S("delete"),S("has"),v&&S("get")),(w||A)&&S(_),E&&O.clear&&delete O.clear}return I[e]=R,n({global:!0,constructor:!0,forced:R!=T},I),y(R,e),E||r.setStrong(R,e,v),R}},5751:function(e,t,r){var n=r(1163),o=r(5260),i=r(9097),a=r(4317);e.exports=function(e,t,r){for(var s=o(t),c=a.f,u=i.f,l=0;l<s.length;l++){var p=s[l];n(e,p)||r&&n(r,p)||c(e,p,u(t,p))}}},7849:function(e,t,r){var n=r(9140)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[n]=!1,"/./"[e](t)}catch(e){}}return!1}},4667:function(e,t,r){var n=r(4141);e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},8174:function(e){e.exports=function(e,t){return{value:e,done:t}}},6493:function(e,t,r){var n=r(2931),o=r(4317),i=r(2499);e.exports=n?function(e,t,r){return o.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},2499:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},567:function(e,t,r){"use strict";var n=r(7277),o=r(4317),i=r(2499);e.exports=function(e,t,r){var a=n(t);a in e?o.f(e,a,i(0,r)):e[a]=r}},2886:function(e,t,r){var n=r(2511),o=r(4317);e.exports=function(e,t,r){return r.get&&n(r.get,t,{getter:!0}),r.set&&n(r.set,t,{setter:!0}),o.f(e,t,r)}},4405:function(e,t,r){var n=r(1045),o=r(4317),i=r(2511),a=r(5784);e.exports=function(e,t,r,s){s||(s={});var c=s.enumerable,u=void 0!==s.name?s.name:t;if(n(r)&&i(r,u,s),s.global)c?e[t]=r:a(t,r);else{try{s.unsafe?e[t]&&(c=!0):delete e[t]}catch(e){}c?e[t]=r:o.f(e,t,{value:r,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},4766:function(e,t,r){var n=r(4405);e.exports=function(e,t,r){for(var o in t)n(e,o,t[o],r);return e}},5784:function(e,t,r){var n=r(2383),o=Object.defineProperty;e.exports=function(e,t){try{o(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},6733:function(e,t,r){"use strict";var n=r(7632),o=TypeError;e.exports=function(e,t){if(!delete e[t])throw o("Cannot delete property "+n(t)+" of "+n(e))}},2931:function(e,t,r){var n=r(4141);e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},6459:function(e,t,r){var n=r(2383),o=r(7809),i=n.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},7540:function(e){var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},9286:function(e){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},5977:function(e,t,r){var n=r(6459)("span").classList,o=n&&n.constructor&&n.constructor.prototype;e.exports=o===Object.prototype?void 0:o},3975:function(e,t,r){var n=r(9376).match(/firefox\/(\d+)/i);e.exports=!!n&&+n[1]},5830:function(e,t,r){var n=r(3954),o=r(4368);e.exports=!n&&!o&&"object"==typeof window&&"object"==typeof document},3954:function(e){e.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},8482:function(e,t,r){var n=r(9376);e.exports=/MSIE|Trident/.test(n)},3035:function(e,t,r){var n=r(9376),o=r(2383);e.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==o.Pebble},7337:function(e,t,r){var n=r(9376);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},4368:function(e,t,r){var n=r(6027),o=r(2383);e.exports="process"==n(o.process)},678:function(e,t,r){var n=r(9376);e.exports=/web0s(?!.*chrome)/i.test(n)},9376:function(e,t,r){var n=r(7300);e.exports=n("navigator","userAgent")||""},583:function(e,t,r){var n,o,i=r(2383),a=r(9376),s=i.process,c=i.Deno,u=s&&s.versions||c&&c.version,l=u&&u.v8;l&&(o=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=+n[1]),e.exports=o},3701:function(e,t,r){var n=r(9376).match(/AppleWebKit\/(\d+)\./);e.exports=!!n&&+n[1]},7414:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},4866:function(e,t,r){var n=r(2383),o=r(9097).f,i=r(6493),a=r(4405),s=r(5784),c=r(5751),u=r(1122);e.exports=function(e,t){var r,l,p,h,d,f=e.target,m=e.global,y=e.stat;if(r=m?n:y?n[f]||s(f,{}):(n[f]||{}).prototype)for(l in t){if(h=t[l],p=e.dontCallGetSet?(d=o(r,l))&&d.value:r[l],!u(m?l:f+(y?".":"#")+l,e.forced)&&void 0!==p){if(typeof h==typeof p)continue;c(h,p)}(e.sham||p&&p.sham)&&i(h,"sham",!0),a(r,l,h,e)}}},4141:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},2267:function(e,t,r){"use strict";r(1008);var n=r(9720),o=r(4405),i=r(1660),a=r(4141),s=r(9140),c=r(6493),u=s("species"),l=RegExp.prototype;e.exports=function(e,t,r,p){var h=s(e),d=!a((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),f=d&&!a((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[u]=function(){return r},r.flags="",r[h]=/./[h]),r.exec=function(){return t=!0,null},r[h](""),!t}));if(!d||!f||r){var m=n(/./[h]),y=t(h,""[e],(function(e,t,r,o,a){var s=n(e),c=t.exec;return c===i||c===l.exec?d&&!a?{done:!0,value:m(t,r,o)}:{done:!0,value:s(r,t,o)}:{done:!1}}));o(String.prototype,e,y[0]),o(l,h,y[1])}p&&c(l[h],"sham",!0)}},2693:function(e,t,r){var n=r(4141);e.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},7841:function(e,t,r){var n=r(1153),o=Function.prototype,i=o.apply,a=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(i):function(){return a.apply(i,arguments)})},3847:function(e,t,r){var n=r(9720),o=r(9181),i=r(1153),a=n(n.bind);e.exports=function(e,t){return o(e),void 0===t?e:i?a(e,t):function(){return e.apply(t,arguments)}}},1153:function(e,t,r){var n=r(4141);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},8829:function(e,t,r){"use strict";var n=r(9720),o=r(9181),i=r(7809),a=r(1163),s=r(942),c=r(1153),u=Function,l=n([].concat),p=n([].join),h={},d=function(e,t,r){if(!a(h,t)){for(var n=[],o=0;o<t;o++)n[o]="a["+o+"]";h[t]=u("C,a","return new C("+p(n,",")+")")}return h[t](e,r)};e.exports=c?u.bind:function(e){var t=o(this),r=t.prototype,n=s(arguments,1),a=function(){var r=l(n,s(arguments));return this instanceof a?d(t,r.length,r):t.apply(e,r)};return i(r)&&(a.prototype=r),a}},9107:function(e,t,r){var n=r(1153),o=Function.prototype.call;e.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},9684:function(e,t,r){var n=r(2931),o=r(1163),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,s=o(i,"name"),c=s&&"something"===function(){}.name,u=s&&(!n||n&&a(i,"name").configurable);e.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},9720:function(e,t,r){var n=r(1153),o=Function.prototype,i=o.bind,a=o.call,s=n&&i.bind(a,a);e.exports=n?function(e){return e&&s(e)}:function(e){return e&&function(){return a.apply(e,arguments)}}},7300:function(e,t,r){var n=r(2383),o=r(1045),i=function(e){return o(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?i(n[e]):n[e]&&n[e][t]}},1328:function(e,t,r){var n=r(6837),o=r(466),i=r(7323),a=r(9171),s=r(9140)("iterator");e.exports=function(e){if(!i(e))return o(e,s)||o(e,"@@iterator")||a[n(e)]}},6151:function(e,t,r){var n=r(9107),o=r(9181),i=r(1571),a=r(7632),s=r(1328),c=TypeError;e.exports=function(e,t){var r=arguments.length<2?s(e):t;if(o(r))return i(n(r,e));throw c(a(e)+" is not iterable")}},466:function(e,t,r){var n=r(9181),o=r(7323);e.exports=function(e,t){var r=e[t];return o(r)?void 0:n(r)}},2383:function(e,t,r){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},1163:function(e,t,r){var n=r(9720),o=r(4569),i=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},8164:function(e){e.exports={}},1879:function(e,t,r){var n=r(2383);e.exports=function(e,t){var r=n.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}},4530:function(e,t,r){var n=r(7300);e.exports=n("document","documentElement")},688:function(e,t,r){var n=r(2931),o=r(4141),i=r(6459);e.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},9074:function(e){var t=Array,r=Math.abs,n=Math.pow,o=Math.floor,i=Math.log,a=Math.LN2;e.exports={pack:function(e,s,c){var u,l,p,h=t(c),d=8*c-s-1,f=(1<<d)-1,m=f>>1,y=23===s?n(2,-24)-n(2,-77):0,g=e<0||0===e&&1/e<0?1:0,v=0;for((e=r(e))!=e||e===1/0?(l=e!=e?1:0,u=f):(u=o(i(e)/a),e*(p=n(2,-u))<1&&(u--,p*=2),(e+=u+m>=1?y/p:y*n(2,1-m))*p>=2&&(u++,p/=2),u+m>=f?(l=0,u=f):u+m>=1?(l=(e*p-1)*n(2,s),u+=m):(l=e*n(2,m-1)*n(2,s),u=0));s>=8;)h[v++]=255&l,l/=256,s-=8;for(u=u<<s|l,d+=s;d>0;)h[v++]=255&u,u/=256,d-=8;return h[--v]|=128*g,h},unpack:function(e,t){var r,o=e.length,i=8*o-t-1,a=(1<<i)-1,s=a>>1,c=i-7,u=o-1,l=e[u--],p=127&l;for(l>>=7;c>0;)p=256*p+e[u--],c-=8;for(r=p&(1<<-c)-1,p>>=-c,c+=t;c>0;)r=256*r+e[u--],c-=8;if(0===p)p=1-s;else{if(p===a)return r?NaN:l?-1/0:1/0;r+=n(2,t),p-=s}return(l?-1:1)*r*n(2,p-t)}}},3392:function(e,t,r){var n=r(9720),o=r(4141),i=r(6027),a=Object,s=n("".split);e.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?s(e,""):a(e)}:a},8851:function(e,t,r){var n=r(1045),o=r(7809),i=r(7046);e.exports=function(e,t,r){var a,s;return i&&n(a=t.constructor)&&a!==r&&o(s=a.prototype)&&s!==r.prototype&&i(e,s),e}},4554:function(e,t,r){var n=r(9720),o=r(1045),i=r(4480),a=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},6811:function(e,t,r){var n=r(4866),o=r(9720),i=r(8164),a=r(7809),s=r(1163),c=r(4317).f,u=r(1242),l=r(6584),p=r(1773),h=r(858),d=r(2693),f=!1,m=h("meta"),y=0,g=function(e){c(e,m,{value:{objectID:"O"+y++,weakData:{}}})},v=e.exports={enable:function(){v.enable=function(){},f=!0;var e=u.f,t=o([].splice),r={};r[m]=1,e(r).length&&(u.f=function(r){for(var n=e(r),o=0,i=n.length;o<i;o++)if(n[o]===m){t(n,o,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,m)){if(!p(e))return"F";if(!t)return"E";g(e)}return e[m].objectID},getWeakData:function(e,t){if(!s(e,m)){if(!p(e))return!0;if(!t)return!1;g(e)}return e[m].weakData},onFreeze:function(e){return d&&f&&p(e)&&!s(e,m)&&g(e),e}};i[m]=!0},7417:function(e,t,r){var n,o,i,a=r(1849),s=r(2383),c=r(9720),u=r(7809),l=r(6493),p=r(1163),h=r(4480),d=r(6033),f=r(8164),m="Object already initialized",y=s.TypeError,g=s.WeakMap;if(a||h.state){var v=h.state||(h.state=new g),E=c(v.get),_=c(v.has),T=c(v.set);n=function(e,t){if(_(v,e))throw y(m);return t.facade=e,T(v,e,t),t},o=function(e){return E(v,e)||{}},i=function(e){return _(v,e)}}else{var O=d("state");f[O]=!0,n=function(e,t){if(p(e,O))throw y(m);return t.facade=e,l(e,O,t),t},o=function(e){return p(e,O)?e[O]:{}},i=function(e){return p(e,O)}}e.exports={set:n,get:o,has:i,enforce:function(e){return i(e)?o(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!u(t)||(r=o(t)).type!==e)throw y("Incompatible receiver, "+e+" required");return r}}}},706:function(e,t,r){var n=r(9140),o=r(9171),i=n("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[i]===e)}},6833:function(e,t,r){var n=r(6027);e.exports=Array.isArray||function(e){return"Array"==n(e)}},2318:function(e,t,r){var n=r(6837),o=r(9720)("".slice);e.exports=function(e){return"Big"===o(n(e),0,3)}},1045:function(e){e.exports=function(e){return"function"==typeof e}},8297:function(e,t,r){var n=r(9720),o=r(4141),i=r(1045),a=r(6837),s=r(7300),c=r(4554),u=function(){},l=[],p=s("Reflect","construct"),h=/^\s*(?:class|function)\b/,d=n(h.exec),f=!h.exec(u),m=function(e){if(!i(e))return!1;try{return p(u,l,e),!0}catch(e){return!1}},y=function(e){if(!i(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!d(h,c(e))}catch(e){return!0}};y.sham=!0,e.exports=!p||o((function(){var e;return m(m.call)||!m(Object)||!m((function(){e=!0}))||e}))?y:m},1122:function(e,t,r){var n=r(4141),o=r(1045),i=/#|\.prototype\./,a=function(e,t){var r=c[s(e)];return r==l||r!=u&&(o(t)?n(t):!!t)},s=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},c=a.data={},u=a.NATIVE="N",l=a.POLYFILL="P";e.exports=a},6121:function(e,t,r){var n=r(7809),o=Math.floor;e.exports=Number.isInteger||function(e){return!n(e)&&isFinite(e)&&o(e)===e}},7323:function(e){e.exports=function(e){return null==e}},7809:function(e,t,r){var n=r(1045),o="object"==typeof document&&document.all,i=void 0===o&&void 0!==o;e.exports=i?function(e){return"object"==typeof e?null!==e:n(e)||e===o}:function(e){return"object"==typeof e?null!==e:n(e)}},4726:function(e){e.exports=!1},3265:function(e,t,r){var n=r(7809),o=r(6027),i=r(9140)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},6894:function(e,t,r){var n=r(7300),o=r(1045),i=r(8931),a=r(2048),s=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return o(t)&&i(t.prototype,s(e))}},5991:function(e,t,r){var n=r(3847),o=r(9107),i=r(1571),a=r(7632),s=r(706),c=r(2398),u=r(8931),l=r(6151),p=r(1328),h=r(6186),d=TypeError,f=function(e,t){this.stopped=e,this.result=t},m=f.prototype;e.exports=function(e,t,r){var y,g,v,E,_,T,O,R=r&&r.that,I=!(!r||!r.AS_ENTRIES),S=!(!r||!r.IS_RECORD),b=!(!r||!r.IS_ITERATOR),A=!(!r||!r.INTERRUPTED),C=n(t,R),N=function(e){return y&&h(y,"normal",e),new f(!0,e)},w=function(e){return I?(i(e),A?C(e[0],e[1],N):C(e[0],e[1])):A?C(e,N):C(e)};if(S)y=e.iterator;else if(b)y=e;else{if(!(g=p(e)))throw d(a(e)+" is not iterable");if(s(g)){for(v=0,E=c(e);E>v;v++)if((_=w(e[v]))&&u(m,_))return _;return new f(!1)}y=l(e,g)}for(T=S?e.next:y.next;!(O=o(T,y)).done;){try{_=w(O.value)}catch(e){h(y,"throw",e)}if("object"==typeof _&&_&&u(m,_))return _}return new f(!1)}},6186:function(e,t,r){var n=r(9107),o=r(1571),i=r(466);e.exports=function(e,t,r){var a,s;o(e);try{if(!(a=i(e,"return"))){if("throw"===t)throw r;return r}a=n(a,e)}catch(e){s=!0,a=e}if("throw"===t)throw r;if(s)throw a;return o(a),r}},9437:function(e,t,r){"use strict";var n=r(9549).IteratorPrototype,o=r(5565),i=r(2499),a=r(5125),s=r(9171),c=function(){return this};e.exports=function(e,t,r,u){var l=t+" Iterator";return e.prototype=o(n,{next:i(+!u,r)}),a(e,l,!1,!0),s[l]=c,e}},9719:function(e,t,r){"use strict";var n=r(4866),o=r(9107),i=r(4726),a=r(9684),s=r(1045),c=r(9437),u=r(2573),l=r(7046),p=r(5125),h=r(6493),d=r(4405),f=r(9140),m=r(9171),y=r(9549),g=a.PROPER,v=a.CONFIGURABLE,E=y.IteratorPrototype,_=y.BUGGY_SAFARI_ITERATORS,T=f("iterator"),O="keys",R="values",I="entries",S=function(){return this};e.exports=function(e,t,r,a,f,y,b){c(r,t,a);var A,C,N,w=function(e){if(e===f&&P)return P;if(!_&&e in U)return U[e];switch(e){case O:case R:case I:return function(){return new r(this,e)}}return function(){return new r(this)}},M=t+" Iterator",k=!1,U=e.prototype,x=U[T]||U["@@iterator"]||f&&U[f],P=!_&&x||w(f),L="Array"==t&&U.entries||x;if(L&&(A=u(L.call(new e)))!==Object.prototype&&A.next&&(i||u(A)===E||(l?l(A,E):s(A[T])||d(A,T,S)),p(A,M,!0,!0),i&&(m[M]=S)),g&&f==R&&x&&x.name!==R&&(!i&&v?h(U,"name",R):(k=!0,P=function(){return o(x,this)})),f)if(C={values:w(R),keys:y?P:w(O),entries:w(I)},b)for(N in C)(_||k||!(N in U))&&d(U,N,C[N]);else n({target:t,proto:!0,forced:_||k},C);return i&&!b||U[T]===P||d(U,T,P,{name:f}),m[t]=P,C}},9549:function(e,t,r){"use strict";var n,o,i,a=r(4141),s=r(1045),c=r(7809),u=r(5565),l=r(2573),p=r(4405),h=r(9140),d=r(4726),f=h("iterator"),m=!1;[].keys&&("next"in(i=[].keys())?(o=l(l(i)))!==Object.prototype&&(n=o):m=!0),!c(n)||a((function(){var e={};return n[f].call(e)!==e}))?n={}:d&&(n=u(n)),s(n[f])||p(n,f,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:m}},9171:function(e){e.exports={}},2398:function(e,t,r){var n=r(2844);e.exports=function(e){return n(e.length)}},2511:function(e,t,r){var n=r(4141),o=r(1045),i=r(1163),a=r(2931),s=r(9684).CONFIGURABLE,c=r(4554),u=r(7417),l=u.enforce,p=u.get,h=Object.defineProperty,d=a&&!n((function(){return 8!==h((function(){}),"length",{value:8}).length})),f=String(String).split("String"),m=e.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!i(e,"name")||s&&e.name!==t)&&(a?h(e,"name",{value:t,configurable:!0}):e.name=t),d&&r&&i(r,"arity")&&e.length!==r.arity&&h(e,"length",{value:r.arity});try{r&&i(r,"constructor")&&r.constructor?a&&h(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=l(e);return i(n,"source")||(n.source=f.join("string"==typeof t?t:"")),e};Function.prototype.toString=m((function(){return o(this)&&p(this).source||c(this)}),"toString")},3709:function(e){var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){var n=+e;return(n>0?r:t)(n)}},5418:function(e,t,r){var n,o,i,a,s,c,u,l,p=r(2383),h=r(3847),d=r(9097).f,f=r(5515).set,m=r(7337),y=r(3035),g=r(678),v=r(4368),E=p.MutationObserver||p.WebKitMutationObserver,_=p.document,T=p.process,O=p.Promise,R=d(p,"queueMicrotask"),I=R&&R.value;I||(n=function(){var e,t;for(v&&(e=T.domain)&&e.exit();o;){t=o.fn,o=o.next;try{t()}catch(e){throw o?a():i=void 0,e}}i=void 0,e&&e.enter()},m||v||g||!E||!_?!y&&O&&O.resolve?((u=O.resolve(void 0)).constructor=O,l=h(u.then,u),a=function(){l(n)}):v?a=function(){T.nextTick(n)}:(f=h(f,p),a=function(){f(n)}):(s=!0,c=_.createTextNode(""),new E(n).observe(c,{characterData:!0}),a=function(){c.data=s=!s})),e.exports=I||function(e){var t={fn:e,next:void 0};i&&(i.next=t),o||(o=t,a()),i=t}},9636:function(e,t,r){"use strict";var n=r(9181),o=TypeError,i=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw o("Bad Promise constructor");t=e,r=n})),this.resolve=n(t),this.reject=n(r)};e.exports.f=function(e){return new i(e)}},1271:function(e,t,r){var n=r(3265),o=TypeError;e.exports=function(e){if(n(e))throw o("The method doesn't accept regular expressions");return e}},7411:function(e,t,r){"use strict";var n=r(2931),o=r(9720),i=r(9107),a=r(4141),s=r(3555),c=r(6920),u=r(7225),l=r(4569),p=r(3392),h=Object.assign,d=Object.defineProperty,f=o([].concat);e.exports=!h||a((function(){if(n&&1!==h({b:1},h(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),o="abcdefghijklmnopqrst";return e[r]=7,o.split("").forEach((function(e){t[e]=e})),7!=h({},e)[r]||s(h({},t)).join("")!=o}))?function(e,t){for(var r=l(e),o=arguments.length,a=1,h=c.f,d=u.f;o>a;)for(var m,y=p(arguments[a++]),g=h?f(s(y),h(y)):s(y),v=g.length,E=0;v>E;)m=g[E++],n&&!i(d,y,m)||(r[m]=y[m]);return r}:h},5565:function(e,t,r){var n,o=r(1571),i=r(3633),a=r(7414),s=r(8164),c=r(4530),u=r(6459),l=r(6033)("IE_PROTO"),p=function(){},h=function(e){return"<script>"+e+"<\/script>"},d=function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t},f=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t;f="undefined"!=typeof document?document.domain&&n?d(n):((t=u("iframe")).style.display="none",c.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F):d(n);for(var r=a.length;r--;)delete f.prototype[a[r]];return f()};s[l]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(p.prototype=o(e),r=new p,p.prototype=null,r[l]=e):r=f(),void 0===t?r:i.f(r,t)}},3633:function(e,t,r){var n=r(2931),o=r(5957),i=r(4317),a=r(1571),s=r(4221),c=r(3555);t.f=n&&!o?Object.defineProperties:function(e,t){a(e);for(var r,n=s(t),o=c(t),u=o.length,l=0;u>l;)i.f(e,r=o[l++],n[r]);return e}},4317:function(e,t,r){var n=r(2931),o=r(688),i=r(5957),a=r(1571),s=r(7277),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor;t.f=n?i?function(e,t,r){if(a(e),t=s(t),a(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=l(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return u(e,t,r)}:u:function(e,t,r){if(a(e),t=s(t),a(r),o)try{return u(e,t,r)}catch(e){}if("get"in r||"set"in r)throw c("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},9097:function(e,t,r){var n=r(2931),o=r(9107),i=r(7225),a=r(2499),s=r(4221),c=r(7277),u=r(1163),l=r(688),p=Object.getOwnPropertyDescriptor;t.f=n?p:function(e,t){if(e=s(e),t=c(t),l)try{return p(e,t)}catch(e){}if(u(e,t))return a(!o(i.f,e,t),e[t])}},6584:function(e,t,r){var n=r(6027),o=r(4221),i=r(1242).f,a=r(9730),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"Window"==n(e)?function(e){try{return i(e)}catch(e){return a(s)}}(e):i(o(e))}},1242:function(e,t,r){var n=r(6984),o=r(7414).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,o)}},6920:function(e,t){t.f=Object.getOwnPropertySymbols},2573:function(e,t,r){var n=r(1163),o=r(1045),i=r(4569),a=r(6033),s=r(4667),c=a("IE_PROTO"),u=Object,l=u.prototype;e.exports=s?u.getPrototypeOf:function(e){var t=i(e);if(n(t,c))return t[c];var r=t.constructor;return o(r)&&t instanceof r?r.prototype:t instanceof u?l:null}},1773:function(e,t,r){var n=r(4141),o=r(7809),i=r(6027),a=r(9042),s=Object.isExtensible,c=n((function(){s(1)}));e.exports=c||a?function(e){return!!o(e)&&(!a||"ArrayBuffer"!=i(e))&&(!s||s(e))}:s},8931:function(e,t,r){var n=r(9720);e.exports=n({}.isPrototypeOf)},6984:function(e,t,r){var n=r(9720),o=r(1163),i=r(4221),a=r(7351).indexOf,s=r(8164),c=n([].push);e.exports=function(e,t){var r,n=i(e),u=0,l=[];for(r in n)!o(s,r)&&o(n,r)&&c(l,r);for(;t.length>u;)o(n,r=t[u++])&&(~a(l,r)||c(l,r));return l}},3555:function(e,t,r){var n=r(6984),o=r(7414);e.exports=Object.keys||function(e){return n(e,o)}},7225:function(e,t){"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!r.call({1:2},1);t.f=o?function(e){var t=n(this,e);return!!t&&t.enumerable}:r},7046:function(e,t,r){var n=r(9720),o=r(1571),i=r(2091);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return o(r),i(n),t?e(r,n):r.__proto__=n,r}}():void 0)},8389:function(e,t,r){var n=r(2931),o=r(9720),i=r(3555),a=r(4221),s=o(r(7225).f),c=o([].push),u=function(e){return function(t){for(var r,o=a(t),u=i(o),l=u.length,p=0,h=[];l>p;)r=u[p++],n&&!s(o,r)||c(h,e?[r,o[r]]:o[r]);return h}};e.exports={entries:u(!0),values:u(!1)}},4757:function(e,t,r){"use strict";var n=r(1247),o=r(6837);e.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},8434:function(e,t,r){var n=r(9107),o=r(1045),i=r(7809),a=TypeError;e.exports=function(e,t){var r,s;if("string"===t&&o(r=e.toString)&&!i(s=n(r,e)))return s;if(o(r=e.valueOf)&&!i(s=n(r,e)))return s;if("string"!==t&&o(r=e.toString)&&!i(s=n(r,e)))return s;throw a("Can't convert object to primitive value")}},5260:function(e,t,r){var n=r(7300),o=r(9720),i=r(1242),a=r(6920),s=r(1571),c=o([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=i.f(s(e)),r=a.f;return r?c(t,r(e)):t}},5096:function(e,t,r){var n=r(2383);e.exports=n},4393:function(e){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},8583:function(e,t,r){var n=r(2383),o=r(7587),i=r(1045),a=r(1122),s=r(4554),c=r(9140),u=r(5830),l=r(3954),p=r(4726),h=r(583),d=o&&o.prototype,f=c("species"),m=!1,y=i(n.PromiseRejectionEvent),g=a("Promise",(function(){var e=s(o),t=e!==String(o);if(!t&&66===h)return!0;if(p&&(!d.catch||!d.finally))return!0;if(!h||h<51||!/native code/.test(e)){var r=new o((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[f]=n,!(m=r.then((function(){}))instanceof n))return!0}return!t&&(u||l)&&!y}));e.exports={CONSTRUCTOR:g,REJECTION_EVENT:y,SUBCLASSING:m}},7587:function(e,t,r){var n=r(2383);e.exports=n.Promise},6401:function(e,t,r){var n=r(1571),o=r(7809),i=r(9636);e.exports=function(e,t){if(n(e),o(t)&&t.constructor===e)return t;var r=i.f(e);return(0,r.resolve)(t),r.promise}},5431:function(e,t,r){var n=r(7587),o=r(3802),i=r(8583).CONSTRUCTOR;e.exports=i||!o((function(e){n.all(e).then(void 0,(function(){}))}))},1072:function(e){var t=function(){this.head=null,this.tail=null};t.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}},e.exports=t},2146:function(e,t,r){var n=r(9107),o=r(1571),i=r(1045),a=r(6027),s=r(1660),c=TypeError;e.exports=function(e,t){var r=e.exec;if(i(r)){var u=n(r,e,t);return null!==u&&o(u),u}if("RegExp"===a(e))return n(s,e,t);throw c("RegExp#exec called on incompatible receiver")}},1660:function(e,t,r){"use strict";var n,o,i=r(9107),a=r(9720),s=r(9274),c=r(5316),u=r(4233),l=r(6402),p=r(5565),h=r(7417).get,d=r(5629),f=r(2231),m=l("native-string-replace",String.prototype.replace),y=RegExp.prototype.exec,g=y,v=a("".charAt),E=a("".indexOf),_=a("".replace),T=a("".slice),O=(o=/b*/g,i(y,n=/a/,"a"),i(y,o,"a"),0!==n.lastIndex||0!==o.lastIndex),R=u.BROKEN_CARET,I=void 0!==/()??/.exec("")[1];(O||I||R||d||f)&&(g=function(e){var t,r,n,o,a,u,l,d=this,f=h(d),S=s(e),b=f.raw;if(b)return b.lastIndex=d.lastIndex,t=i(g,b,S),d.lastIndex=b.lastIndex,t;var A=f.groups,C=R&&d.sticky,N=i(c,d),w=d.source,M=0,k=S;if(C&&(N=_(N,"y",""),-1===E(N,"g")&&(N+="g"),k=T(S,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==v(S,d.lastIndex-1))&&(w="(?: "+w+")",k=" "+k,M++),r=new RegExp("^(?:"+w+")",N)),I&&(r=new RegExp("^"+w+"$(?!\\s)",N)),O&&(n=d.lastIndex),o=i(y,C?r:d,k),C?o?(o.input=T(o.input,M),o[0]=T(o[0],M),o.index=d.lastIndex,d.lastIndex+=o[0].length):d.lastIndex=0:O&&o&&(d.lastIndex=d.global?o.index+o[0].length:n),I&&o&&o.length>1&&i(m,o[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)})),o&&A)for(o.groups=u=p(null),a=0;a<A.length;a++)u[(l=A[a])[0]]=o[l[1]];return o}),e.exports=g},5316:function(e,t,r){"use strict";var n=r(1571);e.exports=function(){var e=n(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},8040:function(e,t,r){var n=r(9107),o=r(1163),i=r(8931),a=r(5316),s=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in s||o(e,"flags")||!i(s,e)?t:n(a,e)}},4233:function(e,t,r){var n=r(4141),o=r(2383).RegExp,i=n((function(){var e=o("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),a=i||n((function(){return!o("a","y").sticky})),s=i||n((function(){var e=o("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));e.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:i}},5629:function(e,t,r){var n=r(4141),o=r(2383).RegExp;e.exports=n((function(){var e=o(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},2231:function(e,t,r){var n=r(4141),o=r(2383).RegExp;e.exports=n((function(){var e=o("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},6827:function(e,t,r){var n=r(7323),o=TypeError;e.exports=function(e){if(n(e))throw o("Can't call method on "+e);return e}},3257:function(e,t,r){var n=r(2383),o=r(7841),i=r(1045),a=r(9376),s=r(942),c=r(248),u=/MSIE .\./.test(a),l=n.Function,p=function(e){return u?function(t,r){var n=c(arguments.length,1)>2,a=i(t)?t:l(t),u=n?s(arguments,2):void 0;return e(n?function(){o(a,this,u)}:a,r)}:e};e.exports={setTimeout:p(n.setTimeout),setInterval:p(n.setInterval)}},4467:function(e,t,r){"use strict";var n=r(7300),o=r(4317),i=r(9140),a=r(2931),s=i("species");e.exports=function(e){var t=n(e),r=o.f;a&&t&&!t[s]&&r(t,s,{configurable:!0,get:function(){return this}})}},5125:function(e,t,r){var n=r(4317).f,o=r(1163),i=r(9140)("toStringTag");e.exports=function(e,t,r){e&&!r&&(e=e.prototype),e&&!o(e,i)&&n(e,i,{configurable:!0,value:t})}},6033:function(e,t,r){var n=r(6402),o=r(858),i=n("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},4480:function(e,t,r){var n=r(2383),o=r(5784),i="__core-js_shared__",a=n[i]||o(i,{});e.exports=a},6402:function(e,t,r){var n=r(4726),o=r(4480);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.25.1",mode:n?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.1/LICENSE",source:"https://github.com/zloirock/core-js"})},543:function(e,t,r){var n=r(1571),o=r(7345),i=r(7323),a=r(9140)("species");e.exports=function(e,t){var r,s=n(e).constructor;return void 0===s||i(r=n(s)[a])?t:o(r)}},7957:function(e,t,r){var n=r(9720),o=r(152),i=r(9274),a=r(6827),s=n("".charAt),c=n("".charCodeAt),u=n("".slice),l=function(e){return function(t,r){var n,l,p=i(a(t)),h=o(r),d=p.length;return h<0||h>=d?e?"":void 0:(n=c(p,h))<55296||n>56319||h+1===d||(l=c(p,h+1))<56320||l>57343?e?s(p,h):n:e?u(p,h,h+2):l-56320+(n-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},9492:function(e,t,r){"use strict";var n=r(9720),o=2147483647,i=/[^\0-\u007E]/,a=/[.\u3002\uFF0E\uFF61]/g,s="Overflow: input needs wider integers to process",c=RangeError,u=n(a.exec),l=Math.floor,p=String.fromCharCode,h=n("".charCodeAt),d=n([].join),f=n([].push),m=n("".replace),y=n("".split),g=n("".toLowerCase),v=function(e){return e+22+75*(e<26)},E=function(e,t,r){var n=0;for(e=r?l(e/700):e>>1,e+=l(e/t);e>455;)e=l(e/35),n+=36;return l(n+36*e/(e+38))},_=function(e){var t=[];e=function(e){for(var t=[],r=0,n=e.length;r<n;){var o=h(e,r++);if(o>=55296&&o<=56319&&r<n){var i=h(e,r++);56320==(64512&i)?f(t,((1023&o)<<10)+(1023&i)+65536):(f(t,o),r--)}else f(t,o)}return t}(e);var r,n,i=e.length,a=128,u=0,m=72;for(r=0;r<e.length;r++)(n=e[r])<128&&f(t,p(n));var y=t.length,g=y;for(y&&f(t,"-");g<i;){var _=o;for(r=0;r<e.length;r++)(n=e[r])>=a&&n<_&&(_=n);var T=g+1;if(_-a>l((o-u)/T))throw c(s);for(u+=(_-a)*T,a=_,r=0;r<e.length;r++){if((n=e[r])<a&&++u>o)throw c(s);if(n==a){for(var O=u,R=36;;){var I=R<=m?1:R>=m+26?26:R-m;if(O<I)break;var S=O-I,b=36-I;f(t,p(v(I+S%b))),O=l(S/b),R+=36}f(t,p(v(O))),m=E(u,T,g==y),u=0,g++}}u++,a++}return d(t,"")};e.exports=function(e){var t,r,n=[],o=y(m(g(e),a,"."),".");for(t=0;t<o.length;t++)r=o[t],f(n,u(i,r)?"xn--"+_(r):r);return d(n,".")}},3379:function(e,t,r){var n=r(9720),o=r(6827),i=r(9274),a=r(6342),s=n("".replace),c="["+a+"]",u=RegExp("^"+c+c+"*"),l=RegExp(c+c+"*$"),p=function(e){return function(t){var r=i(o(t));return 1&e&&(r=s(r,u,"")),2&e&&(r=s(r,l,"")),r}};e.exports={start:p(1),end:p(2),trim:p(3)}},5793:function(e,t,r){var n=r(583),o=r(4141);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},3706:function(e,t,r){var n=r(9107),o=r(7300),i=r(9140),a=r(4405);e.exports=function(){var e=o("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,s=i("toPrimitive");t&&!t[s]&&a(t,s,(function(e){return n(r,this)}),{arity:1})}},6125:function(e,t,r){var n=r(5793);e.exports=n&&!!Symbol.for&&!!Symbol.keyFor},5515:function(e,t,r){var n,o,i,a,s=r(2383),c=r(7841),u=r(3847),l=r(1045),p=r(1163),h=r(4141),d=r(4530),f=r(942),m=r(6459),y=r(248),g=r(7337),v=r(4368),E=s.setImmediate,_=s.clearImmediate,T=s.process,O=s.Dispatch,R=s.Function,I=s.MessageChannel,S=s.String,b=0,A={};try{n=s.location}catch(e){}var C=function(e){if(p(A,e)){var t=A[e];delete A[e],t()}},N=function(e){return function(){C(e)}},w=function(e){C(e.data)},M=function(e){s.postMessage(S(e),n.protocol+"//"+n.host)};E&&_||(E=function(e){y(arguments.length,1);var t=l(e)?e:R(e),r=f(arguments,1);return A[++b]=function(){c(t,void 0,r)},o(b),b},_=function(e){delete A[e]},v?o=function(e){T.nextTick(N(e))}:O&&O.now?o=function(e){O.now(N(e))}:I&&!g?(a=(i=new I).port2,i.port1.onmessage=w,o=u(a.postMessage,a)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&n&&"file:"!==n.protocol&&!h(M)?(o=M,s.addEventListener("message",w,!1)):o="onreadystatechange"in m("script")?function(e){d.appendChild(m("script")).onreadystatechange=function(){d.removeChild(this),C(e)}}:function(e){setTimeout(N(e),0)}),e.exports={set:E,clear:_}},5890:function(e,t,r){var n=r(9720);e.exports=n(1..valueOf)},3943:function(e,t,r){var n=r(152),o=Math.max,i=Math.min;e.exports=function(e,t){var r=n(e);return r<0?o(r+t,0):i(r,t)}},7386:function(e,t,r){var n=r(55),o=TypeError;e.exports=function(e){var t=n(e,"number");if("number"==typeof t)throw o("Can't convert number to bigint");return BigInt(t)}},3577:function(e,t,r){var n=r(152),o=r(2844),i=RangeError;e.exports=function(e){if(void 0===e)return 0;var t=n(e),r=o(t);if(t!==r)throw i("Wrong length or index");return r}},4221:function(e,t,r){var n=r(3392),o=r(6827);e.exports=function(e){return n(o(e))}},152:function(e,t,r){var n=r(3709);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},2844:function(e,t,r){var n=r(152),o=Math.min;e.exports=function(e){return e>0?o(n(e),9007199254740991):0}},4569:function(e,t,r){var n=r(6827),o=Object;e.exports=function(e){return o(n(e))}},5276:function(e,t,r){var n=r(8090),o=RangeError;e.exports=function(e,t){var r=n(e);if(r%t)throw o("Wrong offset");return r}},8090:function(e,t,r){var n=r(152),o=RangeError;e.exports=function(e){var t=n(e);if(t<0)throw o("The argument can't be less than 0");return t}},55:function(e,t,r){var n=r(9107),o=r(7809),i=r(6894),a=r(466),s=r(8434),c=r(9140),u=TypeError,l=c("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var r,c=a(e,l);if(c){if(void 0===t&&(t="default"),r=n(c,e,t),!o(r)||i(r))return r;throw u("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},7277:function(e,t,r){var n=r(55),o=r(6894);e.exports=function(e){var t=n(e,"string");return o(t)?t:t+""}},1247:function(e,t,r){var n={};n[r(9140)("toStringTag")]="z",e.exports="[object z]"===String(n)},9274:function(e,t,r){var n=r(6837),o=String;e.exports=function(e){if("Symbol"===n(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},7632:function(e){var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},7466:function(e,t,r){"use strict";var n=r(4866),o=r(2383),i=r(9107),a=r(2931),s=r(4412),c=r(5861),u=r(4061),l=r(9112),p=r(2499),h=r(6493),d=r(6121),f=r(2844),m=r(3577),y=r(5276),g=r(7277),v=r(1163),E=r(6837),_=r(7809),T=r(6894),O=r(5565),R=r(8931),I=r(7046),S=r(1242).f,b=r(8607),A=r(888).forEach,C=r(4467),N=r(4317),w=r(9097),M=r(7417),k=r(8851),U=M.get,x=M.set,P=M.enforce,L=N.f,j=w.f,D=Math.round,G=o.RangeError,B=u.ArrayBuffer,H=B.prototype,F=u.DataView,W=c.NATIVE_ARRAY_BUFFER_VIEWS,q=c.TYPED_ARRAY_TAG,Z=c.TypedArray,K=c.TypedArrayPrototype,V=c.aTypedArrayConstructor,z=c.isTypedArray,J="BYTES_PER_ELEMENT",X="Wrong length",Y=function(e,t){V(e);for(var r=0,n=t.length,o=new e(n);n>r;)o[r]=t[r++];return o},$=function(e,t){L(e,t,{get:function(){return U(this)[t]}})},Q=function(e){var t;return R(H,e)||"ArrayBuffer"==(t=E(e))||"SharedArrayBuffer"==t},ee=function(e,t){return z(e)&&!T(t)&&t in e&&d(+t)&&t>=0},te=function(e,t){return t=g(t),ee(e,t)?p(2,e[t]):j(e,t)},re=function(e,t,r){return t=g(t),!(ee(e,t)&&_(r)&&v(r,"value"))||v(r,"get")||v(r,"set")||r.configurable||v(r,"writable")&&!r.writable||v(r,"enumerable")&&!r.enumerable?L(e,t,r):(e[t]=r.value,e)};a?(W||(w.f=te,N.f=re,$(K,"buffer"),$(K,"byteOffset"),$(K,"byteLength"),$(K,"length")),n({target:"Object",stat:!0,forced:!W},{getOwnPropertyDescriptor:te,defineProperty:re}),e.exports=function(e,t,r){var a=e.match(/\d+$/)[0]/8,c=e+(r?"Clamped":"")+"Array",u="get"+e,p="set"+e,d=o[c],g=d,v=g&&g.prototype,E={},T=function(e,t){L(e,t,{get:function(){return function(e,t){var r=U(e);return r.view[u](t*a+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,n){var o=U(e);r&&(n=(n=D(n))<0?0:n>255?255:255&n),o.view[p](t*a+o.byteOffset,n,!0)}(this,t,e)},enumerable:!0})};W?s&&(g=t((function(e,t,r,n){return l(e,v),k(_(t)?Q(t)?void 0!==n?new d(t,y(r,a),n):void 0!==r?new d(t,y(r,a)):new d(t):z(t)?Y(g,t):i(b,g,t):new d(m(t)),e,g)})),I&&I(g,Z),A(S(d),(function(e){e in g||h(g,e,d[e])})),g.prototype=v):(g=t((function(e,t,r,n){l(e,v);var o,s,c,u=0,p=0;if(_(t)){if(!Q(t))return z(t)?Y(g,t):i(b,g,t);o=t,p=y(r,a);var h=t.byteLength;if(void 0===n){if(h%a)throw G(X);if((s=h-p)<0)throw G(X)}else if((s=f(n)*a)+p>h)throw G(X);c=s/a}else c=m(t),o=new B(s=c*a);for(x(e,{buffer:o,byteOffset:p,byteLength:s,length:c,view:new F(o)});u<c;)T(e,u++)})),I&&I(g,Z),v=g.prototype=O(K)),v.constructor!==g&&h(v,"constructor",g),P(v).TypedArrayConstructor=g,q&&h(v,q,c);var R=g!=d;E[c]=g,n({global:!0,constructor:!0,forced:R,sham:!W},E),J in g||h(g,J,a),J in v||h(v,J,a),C(c)}):e.exports=function(){}},4412:function(e,t,r){var n=r(2383),o=r(4141),i=r(3802),a=r(5861).NATIVE_ARRAY_BUFFER_VIEWS,s=n.ArrayBuffer,c=n.Int8Array;e.exports=!a||!o((function(){c(1)}))||!o((function(){new c(-1)}))||!i((function(e){new c,new c(null),new c(1.5),new c(e)}),!0)||o((function(){return 1!==new c(new s(2),1,void 0).length}))},1390:function(e,t,r){var n=r(9141),o=r(7106);e.exports=function(e,t){return n(o(e),t)}},8607:function(e,t,r){var n=r(3847),o=r(9107),i=r(7345),a=r(4569),s=r(2398),c=r(6151),u=r(1328),l=r(706),p=r(2318),h=r(5861).aTypedArrayConstructor,d=r(7386);e.exports=function(e){var t,r,f,m,y,g,v,E,_=i(this),T=a(e),O=arguments.length,R=O>1?arguments[1]:void 0,I=void 0!==R,S=u(T);if(S&&!l(S))for(E=(v=c(T,S)).next,T=[];!(g=o(E,v)).done;)T.push(g.value);for(I&&O>2&&(R=n(R,arguments[2])),r=s(T),f=new(h(_))(r),m=p(f),t=0;r>t;t++)y=I?R(T[t],t):T[t],f[t]=m?d(y):+y;return f}},7106:function(e,t,r){var n=r(5861),o=r(543),i=n.aTypedArrayConstructor,a=n.getTypedArrayConstructor;e.exports=function(e){return i(o(e,a(e)))}},858:function(e,t,r){var n=r(9720),o=0,i=Math.random(),a=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+i,36)}},9677:function(e,t,r){var n=r(4141),o=r(9140),i=r(4726),a=o("iterator");e.exports=!n((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),i&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host}))},2048:function(e,t,r){var n=r(5793);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5957:function(e,t,r){var n=r(2931),o=r(4141);e.exports=n&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},248:function(e){var t=TypeError;e.exports=function(e,r){if(e<r)throw t("Not enough arguments");return e}},1849:function(e,t,r){var n=r(2383),o=r(1045),i=n.WeakMap;e.exports=o(i)&&/native code/.test(String(i))},8225:function(e,t,r){var n=r(5096),o=r(1163),i=r(7216),a=r(4317).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});o(t,e)||a(t,e,{value:i.f(e)})}},7216:function(e,t,r){var n=r(9140);t.f=n},9140:function(e,t,r){var n=r(2383),o=r(6402),i=r(1163),a=r(858),s=r(5793),c=r(2048),u=o("wks"),l=n.Symbol,p=l&&l.for,h=c?l:l&&l.withoutSetter||a;e.exports=function(e){if(!i(u,e)||!s&&"string"!=typeof u[e]){var t="Symbol."+e;s&&i(l,e)?u[e]=l[e]:u[e]=c&&p?p(t):h(t)}return u[e]}},6342:function(e){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},863:function(e,t,r){"use strict";var n=r(4866),o=r(9720),i=r(4141),a=r(4061),s=r(1571),c=r(3943),u=r(2844),l=r(543),p=a.ArrayBuffer,h=a.DataView,d=h.prototype,f=o(p.prototype.slice),m=o(d.getUint8),y=o(d.setUint8);n({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:i((function(){return!new p(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(f&&void 0===t)return f(s(this),e);for(var r=s(this).byteLength,n=c(e,r),o=c(void 0===t?r:t,r),i=new(l(this,p))(u(o-n)),a=new h(this),d=new h(i),g=0;n<o;)y(d,g++,m(a,n++));return i}})},7095:function(e,t,r){"use strict";var n=r(4866),o=r(4141),i=r(6833),a=r(7809),s=r(4569),c=r(2398),u=r(7540),l=r(567),p=r(5508),h=r(3933),d=r(9140),f=r(583),m=d("isConcatSpreadable"),y=f>=51||!o((function(){var e=[];return e[m]=!1,e.concat()[0]!==e})),g=h("concat"),v=function(e){if(!a(e))return!1;var t=e[m];return void 0!==t?!!t:i(e)};n({target:"Array",proto:!0,arity:1,forced:!y||!g},{concat:function(e){var t,r,n,o,i,a=s(this),h=p(a,0),d=0;for(t=-1,n=arguments.length;t<n;t++)if(v(i=-1===t?a:arguments[t]))for(o=c(i),u(d+o),r=0;r<o;r++,d++)r in i&&l(h,d,i[r]);else u(d+1),l(h,d++,i);return h.length=d,h}})},7521:function(e,t,r){"use strict";var n=r(4866),o=r(888).filter;n({target:"Array",proto:!0,forced:!r(3933)("filter")},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},1362:function(e,t,r){"use strict";var n=r(4866),o=r(4890);n({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},9889:function(e,t,r){"use strict";var n=r(4866),o=r(7351).includes,i=r(4141),a=r(4651);n({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},5980:function(e,t,r){"use strict";var n=r(4866),o=r(9720),i=r(7351).indexOf,a=r(3070),s=o([].indexOf),c=!!s&&1/s([1],1,-0)<0,u=a("indexOf");n({target:"Array",proto:!0,forced:c||!u},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return c?s(this,e,t)||0:i(this,e,t)}})},3529:function(e,t,r){r(4866)({target:"Array",stat:!0},{isArray:r(6833)})},1685:function(e,t,r){"use strict";var n=r(4221),o=r(4651),i=r(9171),a=r(7417),s=r(4317).f,c=r(9719),u=r(8174),l=r(4726),p=r(2931),h="Array Iterator",d=a.set,f=a.getterFor(h);e.exports=c(Array,"Array",(function(e,t){d(this,{type:h,target:n(e),index:0,kind:t})}),(function(){var e=f(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,u(void 0,!0)):u("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values");var m=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!l&&p&&"values"!==m.name)try{s(m,"name",{value:"values"})}catch(e){}},3535:function(e,t,r){"use strict";var n=r(4866),o=r(9720),i=r(3392),a=r(4221),s=r(3070),c=o([].join),u=i!=Object,l=s("join",",");n({target:"Array",proto:!0,forced:u||!l},{join:function(e){return c(a(this),void 0===e?",":e)}})},1655:function(e,t,r){var n=r(4866),o=r(1959);n({target:"Array",proto:!0,forced:o!==[].lastIndexOf},{lastIndexOf:o})},7118:function(e,t,r){"use strict";var n=r(4866),o=r(888).map;n({target:"Array",proto:!0,forced:!r(3933)("map")},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},8134:function(e,t,r){"use strict";var n=r(4866),o=r(9720),i=r(6833),a=o([].reverse),s=[1,2];n({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),a(this)}})},2657:function(e,t,r){"use strict";var n=r(4866),o=r(6833),i=r(8297),a=r(7809),s=r(3943),c=r(2398),u=r(4221),l=r(567),p=r(9140),h=r(3933),d=r(942),f=h("slice"),m=p("species"),y=Array,g=Math.max;n({target:"Array",proto:!0,forced:!f},{slice:function(e,t){var r,n,p,h=u(this),f=c(h),v=s(e,f),E=s(void 0===t?f:t,f);if(o(h)&&(r=h.constructor,(i(r)&&(r===y||o(r.prototype))||a(r)&&null===(r=r[m]))&&(r=void 0),r===y||void 0===r))return d(h,v,E);for(n=new(void 0===r?y:r)(g(E-v,0)),p=0;v<E;v++,p++)v in h&&l(n,p,h[v]);return n.length=p,n}})},351:function(e,t,r){"use strict";var n=r(4866),o=r(888).some;n({target:"Array",proto:!0,forced:!r(3070)("some")},{some:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},3022:function(e,t,r){"use strict";var n=r(4866),o=r(4569),i=r(3943),a=r(152),s=r(2398),c=r(1208),u=r(7540),l=r(5508),p=r(567),h=r(6733),d=r(3933)("splice"),f=Math.max,m=Math.min;n({target:"Array",proto:!0,forced:!d},{splice:function(e,t){var r,n,d,y,g,v,E=o(this),_=s(E),T=i(e,_),O=arguments.length;for(0===O?r=n=0:1===O?(r=0,n=_-T):(r=O-2,n=m(f(a(t),0),_-T)),u(_+r-n),d=l(E,n),y=0;y<n;y++)(g=T+y)in E&&p(d,y,E[g]);if(d.length=n,r<n){for(y=T;y<_-n;y++)v=y+r,(g=y+n)in E?E[v]=E[g]:h(E,v);for(y=_;y>_-n+r;y--)h(E,y-1)}else if(r>n)for(y=_-n;y>T;y--)v=y+r-1,(g=y+n-1)in E?E[v]=E[g]:h(E,v);for(y=0;y<r;y++)E[y+T]=arguments[y+2];return c(E,_-n+r),d}})},9046:function(e,t,r){var n=r(4866),o=r(9720),i=Date,a=o(i.prototype.getTime);n({target:"Date",stat:!0},{now:function(){return a(new i)}})},9782:function(e,t,r){var n=r(9720),o=r(4405),i=Date.prototype,a="Invalid Date",s=n(i.toString),c=n(i.getTime);String(new Date(NaN))!=a&&o(i,"toString",(function(){var e=c(this);return e==e?s(this):a}))},7693:function(e,t,r){var n=r(4866),o=r(8829);n({target:"Function",proto:!0,forced:Function.bind!==o},{bind:o})},8668:function(e,t,r){var n=r(2931),o=r(9684).EXISTS,i=r(9720),a=r(4317).f,s=Function.prototype,c=i(s.toString),u=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=i(u.exec);n&&!o&&a(s,"name",{configurable:!0,get:function(){try{return l(u,c(this))[1]}catch(e){return""}}})},7675:function(e,t,r){var n=r(4866),o=r(7300),i=r(7841),a=r(9107),s=r(9720),c=r(4141),u=r(6833),l=r(1045),p=r(7809),h=r(6894),d=r(942),f=r(5793),m=o("JSON","stringify"),y=s(/./.exec),g=s("".charAt),v=s("".charCodeAt),E=s("".replace),_=s(1..toString),T=/[\uD800-\uDFFF]/g,O=/^[\uD800-\uDBFF]$/,R=/^[\uDC00-\uDFFF]$/,I=!f||c((function(){var e=o("Symbol")();return"[null]"!=m([e])||"{}"!=m({a:e})||"{}"!=m(Object(e))})),S=c((function(){return'"\\udf06\\ud834"'!==m("\udf06\ud834")||'"\\udead"'!==m("\udead")})),b=function(e,t){var r=d(arguments),n=t;if((p(t)||void 0!==e)&&!h(e))return u(t)||(t=function(e,t){if(l(n)&&(t=a(n,this,e,t)),!h(t))return t}),r[1]=t,i(m,null,r)},A=function(e,t,r){var n=g(r,t-1),o=g(r,t+1);return y(O,e)&&!y(R,o)||y(R,e)&&!y(O,n)?"\\u"+_(v(e,0),16):e};m&&n({target:"JSON",stat:!0,arity:3,forced:I||S},{stringify:function(e,t,r){var n=d(arguments),o=i(I?b:m,null,n);return S&&"string"==typeof o?E(o,T,A):o}})},5303:function(e,t,r){"use strict";r(6202)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(6675))},5724:function(e,t,r){r(5303)},8453:function(e,t,r){"use strict";var n=r(2931),o=r(2383),i=r(9720),a=r(1122),s=r(4405),c=r(1163),u=r(8851),l=r(8931),p=r(6894),h=r(55),d=r(4141),f=r(1242).f,m=r(9097).f,y=r(4317).f,g=r(5890),v=r(3379).trim,E="Number",_=o.Number,T=_.prototype,O=o.TypeError,R=i("".slice),I=i("".charCodeAt),S=function(e){var t=h(e,"number");return"bigint"==typeof t?t:b(t)},b=function(e){var t,r,n,o,i,a,s,c,u=h(e,"number");if(p(u))throw O("Cannot convert a Symbol value to a number");if("string"==typeof u&&u.length>2)if(u=v(u),43===(t=I(u,0))||45===t){if(88===(r=I(u,2))||120===r)return NaN}else if(48===t){switch(I(u,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+u}for(a=(i=R(u,2)).length,s=0;s<a;s++)if((c=I(i,s))<48||c>o)return NaN;return parseInt(i,n)}return+u};if(a(E,!_(" 0o1")||!_("0b1")||_("+0x1"))){for(var A,C=function(e){var t=arguments.length<1?0:_(S(e)),r=this;return l(T,r)&&d((function(){g(r)}))?u(Object(t),r,C):t},N=n?f(_):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),w=0;N.length>w;w++)c(_,A=N[w])&&!c(C,A)&&y(C,A,m(_,A));C.prototype=T,T.constructor=C,s(o,E,C,{constructor:!0})}},1538:function(e,t,r){r(4866)({target:"Number",stat:!0},{isInteger:r(6121)})},8327:function(e,t,r){var n=r(4866),o=r(7411);n({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},3442:function(e,t,r){var n=r(4866),o=r(2931),i=r(4317).f;n({target:"Object",stat:!0,forced:Object.defineProperty!==i,sham:!o},{defineProperty:i})},7665:function(e,t,r){var n=r(4866),o=r(8389).entries;n({target:"Object",stat:!0},{entries:function(e){return o(e)}})},954:function(e,t,r){var n=r(4866),o=r(5793),i=r(4141),a=r(6920),s=r(4569);n({target:"Object",stat:!0,forced:!o||i((function(){a.f(1)}))},{getOwnPropertySymbols:function(e){var t=a.f;return t?t(s(e)):[]}})},3786:function(e,t,r){var n=r(4866),o=r(4569),i=r(3555);n({target:"Object",stat:!0,forced:r(4141)((function(){i(1)}))},{keys:function(e){return i(o(e))}})},900:function(e,t,r){var n=r(1247),o=r(4405),i=r(4757);n||o(Object.prototype,"toString",i,{unsafe:!0})},9273:function(e,t,r){"use strict";var n=r(4866),o=r(9107),i=r(9181),a=r(9636),s=r(4393),c=r(5991);n({target:"Promise",stat:!0,forced:r(5431)},{all:function(e){var t=this,r=a.f(t),n=r.resolve,u=r.reject,l=s((function(){var r=i(t.resolve),a=[],s=0,l=1;c(e,(function(e){var i=s++,c=!1;l++,o(r,t,e).then((function(e){c||(c=!0,a[i]=e,--l||n(a))}),u)})),--l||n(a)}));return l.error&&u(l.value),r.promise}})},359:function(e,t,r){"use strict";var n=r(4866),o=r(4726),i=r(8583).CONSTRUCTOR,a=r(7587),s=r(7300),c=r(1045),u=r(4405),l=a&&a.prototype;if(n({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(e){return this.then(void 0,e)}}),!o&&c(a)){var p=s("Promise").prototype.catch;l.catch!==p&&u(l,"catch",p,{unsafe:!0})}},5137:function(e,t,r){"use strict";var n,o,i,a=r(4866),s=r(4726),c=r(4368),u=r(2383),l=r(9107),p=r(4405),h=r(7046),d=r(5125),f=r(4467),m=r(9181),y=r(1045),g=r(7809),v=r(9112),E=r(543),_=r(5515).set,T=r(5418),O=r(1879),R=r(4393),I=r(1072),S=r(7417),b=r(7587),A=r(8583),C=r(9636),N="Promise",w=A.CONSTRUCTOR,M=A.REJECTION_EVENT,k=A.SUBCLASSING,U=S.getterFor(N),x=S.set,P=b&&b.prototype,L=b,j=P,D=u.TypeError,G=u.document,B=u.process,H=C.f,F=H,W=!!(G&&G.createEvent&&u.dispatchEvent),q="unhandledrejection",Z=function(e){var t;return!(!g(e)||!y(t=e.then))&&t},K=function(e,t){var r,n,o,i=t.value,a=1==t.state,s=a?e.ok:e.fail,c=e.resolve,u=e.reject,p=e.domain;try{s?(a||(2===t.rejection&&Y(t),t.rejection=1),!0===s?r=i:(p&&p.enter(),r=s(i),p&&(p.exit(),o=!0)),r===e.promise?u(D("Promise-chain cycle")):(n=Z(r))?l(n,r,c,u):c(r)):u(i)}catch(e){p&&!o&&p.exit(),u(e)}},V=function(e,t){e.notified||(e.notified=!0,T((function(){for(var r,n=e.reactions;r=n.get();)K(r,e);e.notified=!1,t&&!e.rejection&&J(e)})))},z=function(e,t,r){var n,o;W?((n=G.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),u.dispatchEvent(n)):n={promise:t,reason:r},!M&&(o=u["on"+e])?o(n):e===q&&O("Unhandled promise rejection",r)},J=function(e){l(_,u,(function(){var t,r=e.facade,n=e.value;if(X(e)&&(t=R((function(){c?B.emit("unhandledRejection",n,r):z(q,r,n)})),e.rejection=c||X(e)?2:1,t.error))throw t.value}))},X=function(e){return 1!==e.rejection&&!e.parent},Y=function(e){l(_,u,(function(){var t=e.facade;c?B.emit("rejectionHandled",t):z("rejectionhandled",t,e.value)}))},$=function(e,t,r){return function(n){e(t,n,r)}},Q=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,V(e,!0))},ee=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw D("Promise can't be resolved itself");var n=Z(t);n?T((function(){var r={done:!1};try{l(n,t,$(ee,r,e),$(Q,r,e))}catch(t){Q(r,t,e)}})):(e.value=t,e.state=1,V(e,!1))}catch(t){Q({done:!1},t,e)}}};if(w&&(j=(L=function(e){v(this,j),m(e),l(n,this);var t=U(this);try{e($(ee,t),$(Q,t))}catch(e){Q(t,e)}}).prototype,(n=function(e){x(this,{type:N,done:!1,notified:!1,parent:!1,reactions:new I,rejection:!1,state:0,value:void 0})}).prototype=p(j,"then",(function(e,t){var r=U(this),n=H(E(this,L));return r.parent=!0,n.ok=!y(e)||e,n.fail=y(t)&&t,n.domain=c?B.domain:void 0,0==r.state?r.reactions.add(n):T((function(){K(n,r)})),n.promise})),o=function(){var e=new n,t=U(e);this.promise=e,this.resolve=$(ee,t),this.reject=$(Q,t)},C.f=H=function(e){return e===L||void 0===e?new o(e):F(e)},!s&&y(b)&&P!==Object.prototype)){i=P.then,k||p(P,"then",(function(e,t){var r=this;return new L((function(e,t){l(i,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete P.constructor}catch(e){}h&&h(P,j)}a({global:!0,constructor:!0,wrap:!0,forced:w},{Promise:L}),d(L,N,!1,!0),f(N)},3814:function(e,t,r){r(5137),r(9273),r(359),r(5886),r(5465),r(1118)},5886:function(e,t,r){"use strict";var n=r(4866),o=r(9107),i=r(9181),a=r(9636),s=r(4393),c=r(5991);n({target:"Promise",stat:!0,forced:r(5431)},{race:function(e){var t=this,r=a.f(t),n=r.reject,u=s((function(){var a=i(t.resolve);c(e,(function(e){o(a,t,e).then(r.resolve,n)}))}));return u.error&&n(u.value),r.promise}})},5465:function(e,t,r){"use strict";var n=r(4866),o=r(9107),i=r(9636);n({target:"Promise",stat:!0,forced:r(8583).CONSTRUCTOR},{reject:function(e){var t=i.f(this);return o(t.reject,void 0,e),t.promise}})},1118:function(e,t,r){"use strict";var n=r(4866),o=r(7300),i=r(4726),a=r(7587),s=r(8583).CONSTRUCTOR,c=r(6401),u=o("Promise"),l=i&&!s;n({target:"Promise",stat:!0,forced:i||s},{resolve:function(e){return c(l&&this===u?a:this,e)}})},1008:function(e,t,r){"use strict";var n=r(4866),o=r(1660);n({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},937:function(e,t,r){"use strict";var n=r(9684).PROPER,o=r(4405),i=r(1571),a=r(9274),s=r(4141),c=r(8040),u="toString",l=RegExp.prototype.toString,p=s((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),h=n&&l.name!=u;(p||h)&&o(RegExp.prototype,u,(function(){var e=i(this);return"/"+a(e.source)+"/"+a(c(e))}),{unsafe:!0})},6619:function(e,t,r){"use strict";var n=r(4866),o=r(9720),i=r(1271),a=r(6827),s=r(9274),c=r(7849),u=o("".indexOf);n({target:"String",proto:!0,forced:!c("includes")},{includes:function(e){return!!~u(s(a(this)),s(i(e)),arguments.length>1?arguments[1]:void 0)}})},2486:function(e,t,r){"use strict";var n=r(7957).charAt,o=r(9274),i=r(7417),a=r(9719),s=r(8174),c="String Iterator",u=i.set,l=i.getterFor(c);a(String,"String",(function(e){u(this,{type:c,string:o(e),index:0})}),(function(){var e,t=l(this),r=t.string,o=t.index;return o>=r.length?s(void 0,!0):(e=n(r,o),t.index+=e.length,s(e,!1))}))},7461:function(e,t,r){"use strict";var n=r(7841),o=r(9107),i=r(9720),a=r(2267),s=r(1571),c=r(7323),u=r(3265),l=r(6827),p=r(543),h=r(3025),d=r(2844),f=r(9274),m=r(466),y=r(9730),g=r(2146),v=r(1660),E=r(4233),_=r(4141),T=E.UNSUPPORTED_Y,O=4294967295,R=Math.min,I=[].push,S=i(/./.exec),b=i(I),A=i("".slice),C=!_((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));a("split",(function(e,t,r){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,r){var i=f(l(this)),a=void 0===r?O:r>>>0;if(0===a)return[];if(void 0===e)return[i];if(!u(e))return o(t,i,e,a);for(var s,c,p,h=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),m=0,g=new RegExp(e.source,d+"g");(s=o(v,g,i))&&!((c=g.lastIndex)>m&&(b(h,A(i,m,s.index)),s.length>1&&s.index<i.length&&n(I,h,y(s,1)),p=s[0].length,m=c,h.length>=a));)g.lastIndex===s.index&&g.lastIndex++;return m===i.length?!p&&S(g,"")||b(h,""):b(h,A(i,m)),h.length>a?y(h,0,a):h}:"0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:o(t,this,e,r)}:t,[function(t,r){var n=l(this),a=c(t)?void 0:m(t,e);return a?o(a,t,n,r):o(i,f(n),t,r)},function(e,n){var o=s(this),a=f(e),c=r(i,o,a,n,i!==t);if(c.done)return c.value;var u=p(o,RegExp),l=o.unicode,m=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(T?"g":"y"),y=new u(T?"^(?:"+o.source+")":o,m),v=void 0===n?O:n>>>0;if(0===v)return[];if(0===a.length)return null===g(y,a)?[a]:[];for(var E=0,_=0,I=[];_<a.length;){y.lastIndex=T?0:_;var S,C=g(y,T?A(a,_):a);if(null===C||(S=R(d(y.lastIndex+(T?_:0)),a.length))===E)_=h(a,_,l);else{if(b(I,A(a,E,_)),I.length===v)return I;for(var N=1;N<=C.length-1;N++)if(b(I,C[N]),I.length===v)return I;_=E=S}}return b(I,A(a,E)),I}]}),!C,T)},9172:function(e,t,r){"use strict";var n=r(4866),o=r(2383),i=r(9107),a=r(9720),s=r(4726),c=r(2931),u=r(5793),l=r(4141),p=r(1163),h=r(8931),d=r(1571),f=r(4221),m=r(7277),y=r(9274),g=r(2499),v=r(5565),E=r(3555),_=r(1242),T=r(6584),O=r(6920),R=r(9097),I=r(4317),S=r(3633),b=r(7225),A=r(4405),C=r(6402),N=r(6033),w=r(8164),M=r(858),k=r(9140),U=r(7216),x=r(8225),P=r(3706),L=r(5125),j=r(7417),D=r(888).forEach,G=N("hidden"),B="Symbol",H=j.set,F=j.getterFor(B),W=Object.prototype,q=o.Symbol,Z=q&&q.prototype,K=o.TypeError,V=o.QObject,z=R.f,J=I.f,X=T.f,Y=b.f,$=a([].push),Q=C("symbols"),ee=C("op-symbols"),te=C("wks"),re=!V||!V.prototype||!V.prototype.findChild,ne=c&&l((function(){return 7!=v(J({},"a",{get:function(){return J(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=z(W,t);n&&delete W[t],J(e,t,r),n&&e!==W&&J(W,t,n)}:J,oe=function(e,t){var r=Q[e]=v(Z);return H(r,{type:B,tag:e,description:t}),c||(r.description=t),r},ie=function(e,t,r){e===W&&ie(ee,t,r),d(e);var n=m(t);return d(r),p(Q,n)?(r.enumerable?(p(e,G)&&e[G][n]&&(e[G][n]=!1),r=v(r,{enumerable:g(0,!1)})):(p(e,G)||J(e,G,g(1,{})),e[G][n]=!0),ne(e,n,r)):J(e,n,r)},ae=function(e,t){d(e);var r=f(t),n=E(r).concat(le(r));return D(n,(function(t){c&&!i(se,r,t)||ie(e,t,r[t])})),e},se=function(e){var t=m(e),r=i(Y,this,t);return!(this===W&&p(Q,t)&&!p(ee,t))&&(!(r||!p(this,t)||!p(Q,t)||p(this,G)&&this[G][t])||r)},ce=function(e,t){var r=f(e),n=m(t);if(r!==W||!p(Q,n)||p(ee,n)){var o=z(r,n);return!o||!p(Q,n)||p(r,G)&&r[G][n]||(o.enumerable=!0),o}},ue=function(e){var t=X(f(e)),r=[];return D(t,(function(e){p(Q,e)||p(w,e)||$(r,e)})),r},le=function(e){var t=e===W,r=X(t?ee:f(e)),n=[];return D(r,(function(e){!p(Q,e)||t&&!p(W,e)||$(n,Q[e])})),n};u||(q=function(){if(h(Z,this))throw K("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?y(arguments[0]):void 0,t=M(e),r=function(e){this===W&&i(r,ee,e),p(this,G)&&p(this[G],t)&&(this[G][t]=!1),ne(this,t,g(1,e))};return c&&re&&ne(W,t,{configurable:!0,set:r}),oe(t,e)},A(Z=q.prototype,"toString",(function(){return F(this).tag})),A(q,"withoutSetter",(function(e){return oe(M(e),e)})),b.f=se,I.f=ie,S.f=ae,R.f=ce,_.f=T.f=ue,O.f=le,U.f=function(e){return oe(k(e),e)},c&&(J(Z,"description",{configurable:!0,get:function(){return F(this).description}}),s||A(W,"propertyIsEnumerable",se,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!u,sham:!u},{Symbol:q}),D(E(te),(function(e){x(e)})),n({target:B,stat:!0,forced:!u},{useSetter:function(){re=!0},useSimple:function(){re=!1}}),n({target:"Object",stat:!0,forced:!u,sham:!c},{create:function(e,t){return void 0===t?v(e):ae(v(e),t)},defineProperty:ie,defineProperties:ae,getOwnPropertyDescriptor:ce}),n({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:ue}),P(),L(q,B),w[G]=!0},4201:function(e,t,r){"use strict";var n=r(4866),o=r(2931),i=r(2383),a=r(9720),s=r(1163),c=r(1045),u=r(8931),l=r(9274),p=r(4317).f,h=r(5751),d=i.Symbol,f=d&&d.prototype;if(o&&c(d)&&(!("description"in f)||void 0!==d().description)){var m={},y=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),t=u(f,this)?new d(e):void 0===e?d():d(e);return""===e&&(m[t]=!0),t};h(y,d),y.prototype=f,f.constructor=y;var g="Symbol(test)"==String(d("test")),v=a(f.valueOf),E=a(f.toString),_=/^Symbol\((.*)\)[^)]+$/,T=a("".replace),O=a("".slice);p(f,"description",{configurable:!0,get:function(){var e=v(this);if(s(m,e))return"";var t=E(e),r=g?O(t,7,-1):T(t,_,"$1");return""===r?void 0:r}}),n({global:!0,constructor:!0,forced:!0},{Symbol:y})}},2718:function(e,t,r){var n=r(4866),o=r(7300),i=r(1163),a=r(9274),s=r(6402),c=r(6125),u=s("string-to-symbol-registry"),l=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!c},{for:function(e){var t=a(e);if(i(u,t))return u[t];var r=o("Symbol")(t);return u[t]=r,l[r]=t,r}})},6864:function(e,t,r){r(8225)("iterator")},514:function(e,t,r){r(9172),r(2718),r(2183),r(7675),r(954)},2183:function(e,t,r){var n=r(4866),o=r(1163),i=r(6894),a=r(7632),s=r(6402),c=r(6125),u=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!c},{keyFor:function(e){if(!i(e))throw TypeError(a(e)+" is not a symbol");if(o(u,e))return u[e]}})},8548:function(e,t,r){"use strict";var n=r(9720),o=r(5861),i=n(r(5239)),a=o.aTypedArray;(0,o.exportTypedArrayMethod)("copyWithin",(function(e,t){return i(a(this),e,t,arguments.length>2?arguments[2]:void 0)}))},6921:function(e,t,r){"use strict";var n=r(5861),o=r(888).every,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("every",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},8346:function(e,t,r){"use strict";var n=r(5861),o=r(9732),i=r(7386),a=r(6837),s=r(9107),c=r(9720),u=r(4141),l=n.aTypedArray,p=n.exportTypedArrayMethod,h=c("".slice);p("fill",(function(e){var t=arguments.length;l(this);var r="Big"===h(a(this),0,3)?i(e):+e;return s(o,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),u((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})))},3849:function(e,t,r){"use strict";var n=r(5861),o=r(888).filter,i=r(1390),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("filter",(function(e){var t=o(a(this),e,arguments.length>1?arguments[1]:void 0);return i(this,t)}))},2728:function(e,t,r){"use strict";var n=r(5861),o=r(888).findIndex,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("findIndex",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},6781:function(e,t,r){"use strict";var n=r(5861),o=r(888).find,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("find",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},3039:function(e,t,r){"use strict";var n=r(5861),o=r(888).forEach,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("forEach",(function(e){o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},2258:function(e,t,r){"use strict";var n=r(5861),o=r(7351).includes,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("includes",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},316:function(e,t,r){"use strict";var n=r(5861),o=r(7351).indexOf,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("indexOf",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},2446:function(e,t,r){"use strict";var n=r(2383),o=r(4141),i=r(9720),a=r(5861),s=r(1685),c=r(9140)("iterator"),u=n.Uint8Array,l=i(s.values),p=i(s.keys),h=i(s.entries),d=a.aTypedArray,f=a.exportTypedArrayMethod,m=u&&u.prototype,y=!o((function(){m[c].call([1])})),g=!!m&&m.values&&m[c]===m.values&&"values"===m.values.name,v=function(){return l(d(this))};f("entries",(function(){return h(d(this))}),y),f("keys",(function(){return p(d(this))}),y),f("values",v,y||!g,{name:"values"}),f(c,v,y||!g,{name:"values"})},695:function(e,t,r){"use strict";var n=r(5861),o=r(9720),i=n.aTypedArray,a=n.exportTypedArrayMethod,s=o([].join);a("join",(function(e){return s(i(this),e)}))},6776:function(e,t,r){"use strict";var n=r(5861),o=r(7841),i=r(1959),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return o(i,a(this),t>1?[e,arguments[1]]:[e])}))},1922:function(e,t,r){"use strict";var n=r(5861),o=r(888).map,i=r(7106),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("map",(function(e){return o(a(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(i(e))(t)}))}))},7146:function(e,t,r){"use strict";var n=r(5861),o=r(6653).right,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return o(i(this),e,t,t>1?arguments[1]:void 0)}))},8844:function(e,t,r){"use strict";var n=r(5861),o=r(6653).left,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return o(i(this),e,t,t>1?arguments[1]:void 0)}))},3641:function(e,t,r){"use strict";var n=r(5861),o=n.aTypedArray,i=n.exportTypedArrayMethod,a=Math.floor;i("reverse",(function(){for(var e,t=this,r=o(t).length,n=a(r/2),i=0;i<n;)e=t[i],t[i++]=t[--r],t[r]=e;return t}))},650:function(e,t,r){"use strict";var n=r(2383),o=r(9107),i=r(5861),a=r(2398),s=r(5276),c=r(4569),u=r(4141),l=n.RangeError,p=n.Int8Array,h=p&&p.prototype,d=h&&h.set,f=i.aTypedArray,m=i.exportTypedArrayMethod,y=!u((function(){var e=new Uint8ClampedArray(2);return o(d,e,{length:1,0:3},1),3!==e[1]})),g=y&&i.NATIVE_ARRAY_BUFFER_VIEWS&&u((function(){var e=new p(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));m("set",(function(e){f(this);var t=s(arguments.length>1?arguments[1]:void 0,1),r=c(e);if(y)return o(d,this,r,t);var n=this.length,i=a(r),u=0;if(i+t>n)throw l("Wrong length");for(;u<i;)this[t+u]=r[u++]}),!y||g)},9951:function(e,t,r){"use strict";var n=r(5861),o=r(7106),i=r(4141),a=r(942),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("slice",(function(e,t){for(var r=a(s(this),e,t),n=o(this),i=0,c=r.length,u=new n(c);c>i;)u[i]=r[i++];return u}),i((function(){new Int8Array(1).slice()})))},2426:function(e,t,r){"use strict";var n=r(5861),o=r(888).some,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("some",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},5488:function(e,t,r){"use strict";var n=r(2383),o=r(9720),i=r(4141),a=r(9181),s=r(5416),c=r(5861),u=r(3975),l=r(8482),p=r(583),h=r(3701),d=c.aTypedArray,f=c.exportTypedArrayMethod,m=n.Uint16Array,y=m&&o(m.prototype.sort),g=!(!y||i((function(){y(new m(2),null)}))&&i((function(){y(new m(2),{})}))),v=!!y&&!i((function(){if(p)return p<74;if(u)return u<67;if(l)return!0;if(h)return h<602;var e,t,r=new m(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(y(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));f("sort",(function(e){return void 0!==e&&a(e),v?y(this,e):s(d(this),function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}}(e))}),!v||g)},8542:function(e,t,r){"use strict";var n=r(5861),o=r(2844),i=r(3943),a=r(7106),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("subarray",(function(e,t){var r=s(this),n=r.length,c=i(e,n);return new(a(r))(r.buffer,r.byteOffset+c*r.BYTES_PER_ELEMENT,o((void 0===t?n:i(t,n))-c))}))},4740:function(e,t,r){"use strict";var n=r(2383),o=r(7841),i=r(5861),a=r(4141),s=r(942),c=n.Int8Array,u=i.aTypedArray,l=i.exportTypedArrayMethod,p=[].toLocaleString,h=!!c&&a((function(){p.call(new c(1))}));l("toLocaleString",(function(){return o(p,h?s(u(this)):u(this),s(arguments))}),a((function(){return[1,2].toLocaleString()!=new c([1,2]).toLocaleString()}))||!a((function(){c.prototype.toLocaleString.call([1,2])})))},4822:function(e,t,r){"use strict";var n=r(5861).exportTypedArrayMethod,o=r(4141),i=r(2383),a=r(9720),s=i.Uint8Array,c=s&&s.prototype||{},u=[].toString,l=a([].join);o((function(){u.call({})}))&&(u=function(){return l(this)});var p=c.toString!=u;n("toString",u,p)},3536:function(e,t,r){r(7466)("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}))},7988:function(e,t,r){var n=r(2383),o=r(9286),i=r(5977),a=r(4890),s=r(6493),c=function(e){if(e&&e.forEach!==a)try{s(e,"forEach",a)}catch(t){e.forEach=a}};for(var u in o)o[u]&&c(n[u]&&n[u].prototype);c(i)},4261:function(e,t,r){var n=r(2383),o=r(9286),i=r(5977),a=r(1685),s=r(6493),c=r(9140),u=c("iterator"),l=c("toStringTag"),p=a.values,h=function(e,t){if(e){if(e[u]!==p)try{s(e,u,p)}catch(t){e[u]=p}if(e[l]||s(e,l,t),o[t])for(var r in a)if(e[r]!==a[r])try{s(e,r,a[r])}catch(t){e[r]=a[r]}}};for(var d in o)h(n[d]&&n[d].prototype,d);h(i,"DOMTokenList")},8259:function(e,t,r){var n=r(4866),o=r(2383),i=r(3257).setInterval;n({global:!0,bind:!0,forced:o.setInterval!==i},{setInterval:i})},2606:function(e,t,r){var n=r(4866),o=r(2383),i=r(3257).setTimeout;n({global:!0,bind:!0,forced:o.setTimeout!==i},{setTimeout:i})},6181:function(e,t,r){r(8259),r(2606)},5709:function(e,t,r){"use strict";r(1685);var n=r(4866),o=r(2383),i=r(9107),a=r(9720),s=r(2931),c=r(9677),u=r(4405),l=r(4766),p=r(5125),h=r(9437),d=r(7417),f=r(9112),m=r(1045),y=r(1163),g=r(3847),v=r(6837),E=r(1571),_=r(7809),T=r(9274),O=r(5565),R=r(2499),I=r(6151),S=r(1328),b=r(248),A=r(9140),C=r(5416),N=A("iterator"),w="URLSearchParams",M="URLSearchParamsIterator",k=d.set,U=d.getterFor(w),x=d.getterFor(M),P=Object.getOwnPropertyDescriptor,L=function(e){if(!s)return o[e];var t=P(o,e);return t&&t.value},j=L("fetch"),D=L("Request"),G=L("Headers"),B=D&&D.prototype,H=G&&G.prototype,F=o.RegExp,W=o.TypeError,q=o.decodeURIComponent,Z=o.encodeURIComponent,K=a("".charAt),V=a([].join),z=a([].push),J=a("".replace),X=a([].shift),Y=a([].splice),$=a("".split),Q=a("".slice),ee=/\+/g,te=Array(4),re=function(e){return te[e-1]||(te[e-1]=F("((?:%[\\da-f]{2}){"+e+"})","gi"))},ne=function(e){try{return q(e)}catch(t){return e}},oe=function(e){var t=J(e,ee," "),r=4;try{return q(t)}catch(e){for(;r;)t=J(t,re(r--),ne);return t}},ie=/[!'()~]|%20/g,ae={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},se=function(e){return ae[e]},ce=function(e){return J(Z(e),ie,se)},ue=h((function(e,t){k(this,{type:M,iterator:I(U(e).entries),kind:t})}),"Iterator",(function(){var e=x(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),le=function(e){this.entries=[],this.url=null,void 0!==e&&(_(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===K(e,0)?Q(e,1):e:T(e)))};le.prototype={type:w,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,o,a,s,c,u=S(e);if(u)for(r=(t=I(e,u)).next;!(n=i(r,t)).done;){if(a=(o=I(E(n.value))).next,(s=i(a,o)).done||(c=i(a,o)).done||!i(a,o).done)throw W("Expected sequence with length 2");z(this.entries,{key:T(s.value),value:T(c.value)})}else for(var l in e)y(e,l)&&z(this.entries,{key:l,value:T(e[l])})},parseQuery:function(e){if(e)for(var t,r,n=$(e,"&"),o=0;o<n.length;)(t=n[o++]).length&&(r=$(t,"="),z(this.entries,{key:oe(X(r)),value:oe(V(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],z(r,ce(e.key)+"="+ce(e.value));return V(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var pe=function(){f(this,he);var e=arguments.length>0?arguments[0]:void 0;k(this,new le(e))},he=pe.prototype;if(l(he,{append:function(e,t){b(arguments.length,2);var r=U(this);z(r.entries,{key:T(e),value:T(t)}),r.updateURL()},delete:function(e){b(arguments.length,1);for(var t=U(this),r=t.entries,n=T(e),o=0;o<r.length;)r[o].key===n?Y(r,o,1):o++;t.updateURL()},get:function(e){b(arguments.length,1);for(var t=U(this).entries,r=T(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){b(arguments.length,1);for(var t=U(this).entries,r=T(e),n=[],o=0;o<t.length;o++)t[o].key===r&&z(n,t[o].value);return n},has:function(e){b(arguments.length,1);for(var t=U(this).entries,r=T(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){b(arguments.length,1);for(var r,n=U(this),o=n.entries,i=!1,a=T(e),s=T(t),c=0;c<o.length;c++)(r=o[c]).key===a&&(i?Y(o,c--,1):(i=!0,r.value=s));i||z(o,{key:a,value:s}),n.updateURL()},sort:function(){var e=U(this);C(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=U(this).entries,n=g(e,arguments.length>1?arguments[1]:void 0),o=0;o<r.length;)n((t=r[o++]).value,t.key,this)},keys:function(){return new ue(this,"keys")},values:function(){return new ue(this,"values")},entries:function(){return new ue(this,"entries")}},{enumerable:!0}),u(he,N,he.entries,{name:"entries"}),u(he,"toString",(function(){return U(this).serialize()}),{enumerable:!0}),p(pe,w),n({global:!0,constructor:!0,forced:!c},{URLSearchParams:pe}),!c&&m(G)){var de=a(H.has),fe=a(H.set),me=function(e){if(_(e)){var t,r=e.body;if(v(r)===w)return t=e.headers?new G(e.headers):new G,de(t,"content-type")||fe(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),O(e,{body:R(0,T(r)),headers:R(0,t)})}return e};if(m(j)&&n({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return j(e,arguments.length>1?me(arguments[1]):{})}}),m(D)){var ye=function(e){return f(this,B),new D(e,arguments.length>1?me(arguments[1]):{})};B.constructor=ye,ye.prototype=B,n({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:ye})}}e.exports={URLSearchParams:pe,getState:U}},8385:function(e,t,r){r(5709)},1672:function(e,t,r){"use strict";r(2486);var n,o=r(4866),i=r(2931),a=r(9677),s=r(2383),c=r(3847),u=r(9720),l=r(4405),p=r(2886),h=r(9112),d=r(1163),f=r(7411),m=r(1601),y=r(9730),g=r(7957).codeAt,v=r(9492),E=r(9274),_=r(5125),T=r(248),O=r(5709),R=r(7417),I=R.set,S=R.getterFor("URL"),b=O.URLSearchParams,A=O.getState,C=s.URL,N=s.TypeError,w=s.parseInt,M=Math.floor,k=Math.pow,U=u("".charAt),x=u(/./.exec),P=u([].join),L=u(1..toString),j=u([].pop),D=u([].push),G=u("".replace),B=u([].shift),H=u("".split),F=u("".slice),W=u("".toLowerCase),q=u([].unshift),Z="Invalid scheme",K="Invalid host",V="Invalid port",z=/[a-z]/i,J=/[\d+-.a-z]/i,X=/\d/,Y=/^0x/i,$=/^[0-7]+$/,Q=/^\d+$/,ee=/^[\da-f]+$/i,te=/[\0\t\n\r #%/:<>?@[\\\]^|]/,re=/[\0\t\n\r #/:<>?@[\\\]^|]/,ne=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,oe=/[\t\n\r]/g,ie=function(e){var t,r,n,o;if("number"==typeof e){for(t=[],r=0;r<4;r++)q(t,e%256),e=M(e/256);return P(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,o=0,i=0;i<8;i++)0!==e[i]?(o>r&&(t=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r&&(t=n,r=o),t}(e),r=0;r<8;r++)o&&0===e[r]||(o&&(o=!1),n===r?(t+=r?":":"::",o=!0):(t+=L(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},ae={},se=f({},ae,{" ":1,'"':1,"<":1,">":1,"`":1}),ce=f({},se,{"#":1,"?":1,"{":1,"}":1}),ue=f({},ce,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),le=function(e,t){var r=g(e,0);return r>32&&r<127&&!d(t,e)?e:encodeURIComponent(e)},pe={ftp:21,file:null,http:80,https:443,ws:80,wss:443},he=function(e,t){var r;return 2==e.length&&x(z,U(e,0))&&(":"==(r=U(e,1))||!t&&"|"==r)},de=function(e){var t;return e.length>1&&he(F(e,0,2))&&(2==e.length||"/"===(t=U(e,2))||"\\"===t||"?"===t||"#"===t)},fe=function(e){return"."===e||"%2e"===W(e)},me={},ye={},ge={},ve={},Ee={},_e={},Te={},Oe={},Re={},Ie={},Se={},be={},Ae={},Ce={},Ne={},we={},Me={},ke={},Ue={},xe={},Pe={},Le=function(e,t,r){var n,o,i,a=E(e);if(t){if(o=this.parse(a))throw N(o);this.searchParams=null}else{if(void 0!==r&&(n=new Le(r,!0)),o=this.parse(a,null,n))throw N(o);(i=A(new b)).bindURL(this),this.searchParams=i}};Le.prototype={type:"URL",parse:function(e,t,r){var o,i,a,s,c,u=this,l=t||me,p=0,h="",f=!1,g=!1,v=!1;for(e=E(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=G(e,ne,"")),e=G(e,oe,""),o=m(e);p<=o.length;){switch(i=o[p],l){case me:if(!i||!x(z,i)){if(t)return Z;l=ge;continue}h+=W(i),l=ye;break;case ye:if(i&&(x(J,i)||"+"==i||"-"==i||"."==i))h+=W(i);else{if(":"!=i){if(t)return Z;h="",l=ge,p=0;continue}if(t&&(u.isSpecial()!=d(pe,h)||"file"==h&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=h,t)return void(u.isSpecial()&&pe[u.scheme]==u.port&&(u.port=null));h="","file"==u.scheme?l=Ce:u.isSpecial()&&r&&r.scheme==u.scheme?l=ve:u.isSpecial()?l=Oe:"/"==o[p+1]?(l=Ee,p++):(u.cannotBeABaseURL=!0,D(u.path,""),l=Ue)}break;case ge:if(!r||r.cannotBeABaseURL&&"#"!=i)return Z;if(r.cannotBeABaseURL&&"#"==i){u.scheme=r.scheme,u.path=y(r.path),u.query=r.query,u.fragment="",u.cannotBeABaseURL=!0,l=Pe;break}l="file"==r.scheme?Ce:_e;continue;case ve:if("/"!=i||"/"!=o[p+1]){l=_e;continue}l=Re,p++;break;case Ee:if("/"==i){l=Ie;break}l=ke;continue;case _e:if(u.scheme=r.scheme,i==n)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=y(r.path),u.query=r.query;else if("/"==i||"\\"==i&&u.isSpecial())l=Te;else if("?"==i)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=y(r.path),u.query="",l=xe;else{if("#"!=i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=y(r.path),u.path.length--,l=ke;continue}u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=y(r.path),u.query=r.query,u.fragment="",l=Pe}break;case Te:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,l=ke;continue}l=Ie}else l=Re;break;case Oe:if(l=Re,"/"!=i||"/"!=U(h,p+1))continue;p++;break;case Re:if("/"!=i&&"\\"!=i){l=Ie;continue}break;case Ie:if("@"==i){f&&(h="%40"+h),f=!0,a=m(h);for(var _=0;_<a.length;_++){var T=a[_];if(":"!=T||v){var O=le(T,ue);v?u.password+=O:u.username+=O}else v=!0}h=""}else if(i==n||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(f&&""==h)return"Invalid authority";p-=m(h).length+1,h="",l=Se}else h+=i;break;case Se:case be:if(t&&"file"==u.scheme){l=we;continue}if(":"!=i||g){if(i==n||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==h)return K;if(t&&""==h&&(u.includesCredentials()||null!==u.port))return;if(s=u.parseHost(h))return s;if(h="",l=Me,t)return;continue}"["==i?g=!0:"]"==i&&(g=!1),h+=i}else{if(""==h)return K;if(s=u.parseHost(h))return s;if(h="",l=Ae,t==be)return}break;case Ae:if(!x(X,i)){if(i==n||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||t){if(""!=h){var R=w(h,10);if(R>65535)return V;u.port=u.isSpecial()&&R===pe[u.scheme]?null:R,h=""}if(t)return;l=Me;continue}return V}h+=i;break;case Ce:if(u.scheme="file","/"==i||"\\"==i)l=Ne;else{if(!r||"file"!=r.scheme){l=ke;continue}if(i==n)u.host=r.host,u.path=y(r.path),u.query=r.query;else if("?"==i)u.host=r.host,u.path=y(r.path),u.query="",l=xe;else{if("#"!=i){de(P(y(o,p),""))||(u.host=r.host,u.path=y(r.path),u.shortenPath()),l=ke;continue}u.host=r.host,u.path=y(r.path),u.query=r.query,u.fragment="",l=Pe}}break;case Ne:if("/"==i||"\\"==i){l=we;break}r&&"file"==r.scheme&&!de(P(y(o,p),""))&&(he(r.path[0],!0)?D(u.path,r.path[0]):u.host=r.host),l=ke;continue;case we:if(i==n||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&he(h))l=ke;else if(""==h){if(u.host="",t)return;l=Me}else{if(s=u.parseHost(h))return s;if("localhost"==u.host&&(u.host=""),t)return;h="",l=Me}continue}h+=i;break;case Me:if(u.isSpecial()){if(l=ke,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=n&&(l=ke,"/"!=i))continue}else u.fragment="",l=Pe;else u.query="",l=xe;break;case ke:if(i==n||"/"==i||"\\"==i&&u.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(c=W(c=h))||"%2e."===c||".%2e"===c||"%2e%2e"===c?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||D(u.path,"")):fe(h)?"/"==i||"\\"==i&&u.isSpecial()||D(u.path,""):("file"==u.scheme&&!u.path.length&&he(h)&&(u.host&&(u.host=""),h=U(h,0)+":"),D(u.path,h)),h="","file"==u.scheme&&(i==n||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)B(u.path);"?"==i?(u.query="",l=xe):"#"==i&&(u.fragment="",l=Pe)}else h+=le(i,ce);break;case Ue:"?"==i?(u.query="",l=xe):"#"==i?(u.fragment="",l=Pe):i!=n&&(u.path[0]+=le(i,ae));break;case xe:t||"#"!=i?i!=n&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":le(i,ae)):(u.fragment="",l=Pe);break;case Pe:i!=n&&(u.fragment+=le(i,se))}p++}},parseHost:function(e){var t,r,n;if("["==U(e,0)){if("]"!=U(e,e.length-1))return K;if(t=function(e){var t,r,n,o,i,a,s,c=[0,0,0,0,0,0,0,0],u=0,l=null,p=0,h=function(){return U(e,p)};if(":"==h()){if(":"!=U(e,1))return;p+=2,l=++u}for(;h();){if(8==u)return;if(":"!=h()){for(t=r=0;r<4&&x(ee,h());)t=16*t+w(h(),16),p++,r++;if("."==h()){if(0==r)return;if(p-=r,u>6)return;for(n=0;h();){if(o=null,n>0){if(!("."==h()&&n<4))return;p++}if(!x(X,h()))return;for(;x(X,h());){if(i=w(h(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;p++}c[u]=256*c[u]+o,2!=++n&&4!=n||u++}if(4!=n)return;break}if(":"==h()){if(p++,!h())return}else if(h())return;c[u++]=t}else{if(null!==l)return;p++,l=++u}}if(null!==l)for(a=u-l,u=7;0!=u&&a>0;)s=c[u],c[u--]=c[l+a-1],c[l+--a]=s;else if(8!=u)return;return c}(F(e,1,-1)),!t)return K;this.host=t}else if(this.isSpecial()){if(e=v(e),x(te,e))return K;if(t=function(e){var t,r,n,o,i,a,s,c=H(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(o=c[n]))return e;if(i=10,o.length>1&&"0"==U(o,0)&&(i=x(Y,o)?16:8,o=F(o,8==i?1:2)),""===o)a=0;else{if(!x(10==i?Q:8==i?$:ee,o))return e;a=w(o,i)}D(r,a)}for(n=0;n<t;n++)if(a=r[n],n==t-1){if(a>=k(256,5-t))return null}else if(a>255)return null;for(s=j(r),n=0;n<r.length;n++)s+=r[n]*k(256,3-n);return s}(e),null===t)return K;this.host=t}else{if(x(re,e))return K;for(t="",r=m(e),n=0;n<r.length;n++)t+=le(r[n],ae);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return d(pe,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&he(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,o=e.host,i=e.port,a=e.path,s=e.query,c=e.fragment,u=t+":";return null!==o?(u+="//",e.includesCredentials()&&(u+=r+(n?":"+n:"")+"@"),u+=ie(o),null!==i&&(u+=":"+i)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?a[0]:a.length?"/"+P(a,"/"):"",null!==s&&(u+="?"+s),null!==c&&(u+="#"+c),u},setHref:function(e){var t=this.parse(e);if(t)throw N(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new je(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+ie(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(E(e)+":",me)},getUsername:function(){return this.username},setUsername:function(e){var t=m(E(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=le(t[r],ue)}},getPassword:function(){return this.password},setPassword:function(e){var t=m(E(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=le(t[r],ue)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?ie(e):ie(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Se)},getHostname:function(){var e=this.host;return null===e?"":ie(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,be)},getPort:function(){var e=this.port;return null===e?"":E(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=E(e))?this.port=null:this.parse(e,Ae))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+P(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Me))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=E(e))?this.query=null:("?"==U(e,0)&&(e=F(e,1)),this.query="",this.parse(e,xe)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=E(e))?("#"==U(e,0)&&(e=F(e,1)),this.fragment="",this.parse(e,Pe)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var je=function(e){var t=h(this,De),r=T(arguments.length,1)>1?arguments[1]:void 0,n=I(t,new Le(e,!1,r));i||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},De=je.prototype,Ge=function(e,t){return{get:function(){return S(this)[e]()},set:t&&function(e){return S(this)[t](e)},configurable:!0,enumerable:!0}};if(i&&(p(De,"href",Ge("serialize","setHref")),p(De,"origin",Ge("getOrigin")),p(De,"protocol",Ge("getProtocol","setProtocol")),p(De,"username",Ge("getUsername","setUsername")),p(De,"password",Ge("getPassword","setPassword")),p(De,"host",Ge("getHost","setHost")),p(De,"hostname",Ge("getHostname","setHostname")),p(De,"port",Ge("getPort","setPort")),p(De,"pathname",Ge("getPathname","setPathname")),p(De,"search",Ge("getSearch","setSearch")),p(De,"searchParams",Ge("getSearchParams")),p(De,"hash",Ge("getHash","setHash"))),l(De,"toJSON",(function(){return S(this).serialize()}),{enumerable:!0}),l(De,"toString",(function(){return S(this).serialize()}),{enumerable:!0}),C){var Be=C.createObjectURL,He=C.revokeObjectURL;Be&&l(je,"createObjectURL",c(Be,C)),He&&l(je,"revokeObjectURL",c(He,C))}_(je,"URL"),o({global:!0,constructor:!0,forced:!a,sham:!i},{URL:je})},4838:function(e,t,r){r(1672)},2937:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},9168:function(e){e.exports=r;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function r(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}function n(e){return!0===(e&&e.__isLong__)}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0}),r.isLong=n;var o={},i={};function a(e,t){var r,n,a;return t?(a=0<=(e>>>=0)&&e<256)&&(n=i[e])?n:(r=c(e,(0|e)<0?-1:0,!0),a&&(i[e]=r),r):(a=-128<=(e|=0)&&e<128)&&(n=o[e])?n:(r=c(e,e<0?-1:0,!1),a&&(o[e]=r),r)}function s(e,t){if(isNaN(e))return t?g:y;if(t){if(e<0)return g;if(e>=d)return O}else{if(e<=-f)return R;if(e+1>=f)return T}return e<0?s(-e,t).neg():c(e%h|0,e/h|0,t)}function c(e,t,n){return new r(e,t,n)}r.fromInt=a,r.fromNumber=s,r.fromBits=c;var u=Math.pow;function l(e,t,r){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return y;if("number"==typeof t?(r=t,t=!1):t=!!t,(r=r||10)<2||36<r)throw RangeError("radix");var n;if((n=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return l(e.substring(1),t,r).neg();for(var o=s(u(r,8)),i=y,a=0;a<e.length;a+=8){var c=Math.min(8,e.length-a),p=parseInt(e.substring(a,a+c),r);if(c<8){var h=s(u(r,c));i=i.mul(h).add(s(p))}else i=(i=i.mul(o)).add(s(p))}return i.unsigned=t,i}function p(e,t){return"number"==typeof e?s(e,t):"string"==typeof e?l(e,t):c(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}r.fromString=l,r.fromValue=p;var h=4294967296,d=h*h,f=d/2,m=a(1<<24),y=a(0);r.ZERO=y;var g=a(0,!0);r.UZERO=g;var v=a(1);r.ONE=v;var E=a(1,!0);r.UONE=E;var _=a(-1);r.NEG_ONE=_;var T=c(-1,2147483647,!1);r.MAX_VALUE=T;var O=c(-1,-1,!0);r.MAX_UNSIGNED_VALUE=O;var R=c(0,-2147483648,!1);r.MIN_VALUE=R;var I=r.prototype;I.toInt=function(){return this.unsigned?this.low>>>0:this.low},I.toNumber=function(){return this.unsigned?(this.high>>>0)*h+(this.low>>>0):this.high*h+(this.low>>>0)},I.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(R)){var t=s(e),r=this.div(t),n=r.mul(t).sub(this);return r.toString(e)+n.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var o=s(u(e,6),this.unsigned),i=this,a="";;){var c=i.div(o),l=(i.sub(c.mul(o)).toInt()>>>0).toString(e);if((i=c).isZero())return l+a;for(;l.length<6;)l="0"+l;a=""+l+a}},I.getHighBits=function(){return this.high},I.getHighBitsUnsigned=function(){return this.high>>>0},I.getLowBits=function(){return this.low},I.getLowBitsUnsigned=function(){return this.low>>>0},I.getNumBitsAbs=function(){if(this.isNegative())return this.eq(R)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},I.isZero=function(){return 0===this.high&&0===this.low},I.eqz=I.isZero,I.isNegative=function(){return!this.unsigned&&this.high<0},I.isPositive=function(){return this.unsigned||this.high>=0},I.isOdd=function(){return 1==(1&this.low)},I.isEven=function(){return 0==(1&this.low)},I.equals=function(e){return n(e)||(e=p(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},I.eq=I.equals,I.notEquals=function(e){return!this.eq(e)},I.neq=I.notEquals,I.ne=I.notEquals,I.lessThan=function(e){return this.comp(e)<0},I.lt=I.lessThan,I.lessThanOrEqual=function(e){return this.comp(e)<=0},I.lte=I.lessThanOrEqual,I.le=I.lessThanOrEqual,I.greaterThan=function(e){return this.comp(e)>0},I.gt=I.greaterThan,I.greaterThanOrEqual=function(e){return this.comp(e)>=0},I.gte=I.greaterThanOrEqual,I.ge=I.greaterThanOrEqual,I.compare=function(e){if(n(e)||(e=p(e)),this.eq(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r?-1:!t&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},I.comp=I.compare,I.negate=function(){return!this.unsigned&&this.eq(R)?R:this.not().add(v)},I.neg=I.negate,I.add=function(e){n(e)||(e=p(e));var t=this.high>>>16,r=65535&this.high,o=this.low>>>16,i=65535&this.low,a=e.high>>>16,s=65535&e.high,u=e.low>>>16,l=0,h=0,d=0,f=0;return d+=(f+=i+(65535&e.low))>>>16,h+=(d+=o+u)>>>16,l+=(h+=r+s)>>>16,l+=t+a,c((d&=65535)<<16|(f&=65535),(l&=65535)<<16|(h&=65535),this.unsigned)},I.subtract=function(e){return n(e)||(e=p(e)),this.add(e.neg())},I.sub=I.subtract,I.multiply=function(e){if(this.isZero())return y;if(n(e)||(e=p(e)),t)return c(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return y;if(this.eq(R))return e.isOdd()?R:y;if(e.eq(R))return this.isOdd()?R:y;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(m)&&e.lt(m))return s(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,o=65535&this.high,i=this.low>>>16,a=65535&this.low,u=e.high>>>16,l=65535&e.high,h=e.low>>>16,d=65535&e.low,f=0,g=0,v=0,E=0;return v+=(E+=a*d)>>>16,g+=(v+=i*d)>>>16,v&=65535,g+=(v+=a*h)>>>16,f+=(g+=o*d)>>>16,g&=65535,f+=(g+=i*h)>>>16,g&=65535,f+=(g+=a*l)>>>16,f+=r*d+o*h+i*l+a*u,c((v&=65535)<<16|(E&=65535),(f&=65535)<<16|(g&=65535),this.unsigned)},I.mul=I.multiply,I.divide=function(e){if(n(e)||(e=p(e)),e.isZero())throw Error("division by zero");var r,o,i;if(t)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?c((this.unsigned?t.div_u:t.div_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?g:y;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return g;if(e.gt(this.shru(1)))return E;i=g}else{if(this.eq(R))return e.eq(v)||e.eq(_)?R:e.eq(R)?v:(r=this.shr(1).div(e).shl(1)).eq(y)?e.isNegative()?v:_:(o=this.sub(e.mul(r)),i=r.add(o.div(e)));if(e.eq(R))return this.unsigned?g:y;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();i=y}for(o=this;o.gte(e);){r=Math.max(1,Math.floor(o.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(r)/Math.LN2),l=a<=48?1:u(2,a-48),h=s(r),d=h.mul(e);d.isNegative()||d.gt(o);)d=(h=s(r-=l,this.unsigned)).mul(e);h.isZero()&&(h=v),i=i.add(h),o=o.sub(d)}return i},I.div=I.divide,I.modulo=function(e){return n(e)||(e=p(e)),t?c((this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},I.mod=I.modulo,I.rem=I.modulo,I.not=function(){return c(~this.low,~this.high,this.unsigned)},I.and=function(e){return n(e)||(e=p(e)),c(this.low&e.low,this.high&e.high,this.unsigned)},I.or=function(e){return n(e)||(e=p(e)),c(this.low|e.low,this.high|e.high,this.unsigned)},I.xor=function(e){return n(e)||(e=p(e)),c(this.low^e.low,this.high^e.high,this.unsigned)},I.shiftLeft=function(e){return n(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?c(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):c(0,this.low<<e-32,this.unsigned)},I.shl=I.shiftLeft,I.shiftRight=function(e){return n(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?c(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):c(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},I.shr=I.shiftRight,I.shiftRightUnsigned=function(e){if(n(e)&&(e=e.toInt()),0==(e&=63))return this;var t=this.high;return e<32?c(this.low>>>e|t<<32-e,t>>>e,this.unsigned):c(32===e?t:t>>>e-32,0,this.unsigned)},I.shru=I.shiftRightUnsigned,I.shr_u=I.shiftRightUnsigned,I.toSigned=function(){return this.unsigned?c(this.low,this.high,!1):this},I.toUnsigned=function(){return this.unsigned?this:c(this.low,this.high,!0)},I.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},I.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},I.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},r.fromBytes=function(e,t,n){return n?r.fromBytesLE(e,t):r.fromBytesBE(e,t)},r.fromBytesLE=function(e,t){return new r(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},r.fromBytesBE=function(e,t){return new r(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},453:function(e,t,r){"use strict";e.exports=r(2833)},4759:function(e){"use strict";e.exports=n;var t,r=/\/|\./;function n(e,t){r.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),n[e]=t}n("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),n("duration",{Duration:t={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),n("timestamp",{Timestamp:t}),n("empty",{Empty:{fields:{}}}),n("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),n("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}),n("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),n.get=function(e){return n[e]||null}},1622:function(e,t,r){"use strict";var n=t,o=r(8052),i=r(3218);function a(e,t,r,n){if(t.resolvedType)if(t.resolvedType instanceof o){e("switch(d%s){",n);for(var i=t.resolvedType.values,a=Object.keys(i),s=0;s<a.length;++s)t.repeated&&i[a[s]]===t.typeDefault&&e("default:"),e("case%j:",a[s])("case %i:",i[a[s]])("m%s=%j",n,i[a[s]])("break");e("}")}else e('if(typeof d%s!=="object")',n)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",n,r,n);else{var c=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":c=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,c)('else if(typeof d%s==="string")',n)("m%s=parseInt(d%s,10)",n,n)('else if(typeof d%s==="number")',n)("m%s=d%s",n,n)('else if(typeof d%s==="object")',n)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",n,n,n,c?"true":"");break;case"bytes":e('if(typeof d%s==="string")',n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s.length)",n)("m%s=d%s",n,n);break;case"string":e("m%s=String(d%s)",n,n);break;case"bool":e("m%s=Boolean(d%s)",n,n)}}return e}function s(e,t,r,n){if(t.resolvedType)t.resolvedType instanceof o?e("d%s=o.enums===String?types[%i].values[m%s]:m%s",n,r,n,n):e("d%s=types[%i].toObject(m%s,o)",n,r,n);else{var i=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",n,n,n,n);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',n)("d%s=o.longs===String?String(m%s):m%s",n,n,n)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",n,n,n,n,i?"true":"",n);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",n,n,n,n,n);break;default:e("d%s=m%s",n,n)}}return e}n.fromObject=function(e){var t=e.fieldsArray,r=i.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return r("return new this.ctor");r("var m=new this.ctor");for(var n=0;n<t.length;++n){var s=t[n].resolve(),c=i.safeProp(s.name);s.map?(r("if(d%s){",c)('if(typeof d%s!=="object")',c)("throw TypeError(%j)",s.fullName+": object expected")("m%s={}",c)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",c),a(r,s,n,c+"[ks[i]]")("}")("}")):s.repeated?(r("if(d%s){",c)("if(!Array.isArray(d%s))",c)("throw TypeError(%j)",s.fullName+": array expected")("m%s=[]",c)("for(var i=0;i<d%s.length;++i){",c),a(r,s,n,c+"[i]")("}")("}")):(s.resolvedType instanceof o||r("if(d%s!=null){",c),a(r,s,n,c),s.resolvedType instanceof o||r("}"))}return r("return m")},n.toObject=function(e){var t=e.fieldsArray.slice().sort(i.compareFieldsById);if(!t.length)return i.codegen()("return {}");for(var r=i.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),n=[],a=[],c=[],u=0;u<t.length;++u)t[u].partOf||(t[u].resolve().repeated?n:t[u].map?a:c).push(t[u]);if(n.length){for(r("if(o.arrays||o.defaults){"),u=0;u<n.length;++u)r("d%s=[]",i.safeProp(n[u].name));r("}")}if(a.length){for(r("if(o.objects||o.defaults){"),u=0;u<a.length;++u)r("d%s={}",i.safeProp(a[u].name));r("}")}if(c.length){for(r("if(o.defaults){"),u=0;u<c.length;++u){var l=c[u],p=i.safeProp(l.name);if(l.resolvedType instanceof o)r("d%s=o.enums===String?%j:%j",p,l.resolvedType.valuesById[l.typeDefault],l.typeDefault);else if(l.long)r("if(util.Long){")("var n=new util.Long(%i,%i,%j)",l.typeDefault.low,l.typeDefault.high,l.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",p)("}else")("d%s=o.longs===String?%j:%i",p,l.typeDefault.toString(),l.typeDefault.toNumber());else if(l.bytes){var h="["+Array.prototype.slice.call(l.typeDefault).join(",")+"]";r("if(o.bytes===String)d%s=%j",p,String.fromCharCode.apply(String,l.typeDefault))("else{")("d%s=%s",p,h)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",p,p)("}")}else r("d%s=%j",p,l.typeDefault)}r("}")}var d=!1;for(u=0;u<t.length;++u){l=t[u];var f=e._fieldsArray.indexOf(l);p=i.safeProp(l.name),l.map?(d||(d=!0,r("var ks2")),r("if(m%s&&(ks2=Object.keys(m%s)).length){",p,p)("d%s={}",p)("for(var j=0;j<ks2.length;++j){"),s(r,l,f,p+"[ks2[j]]")("}")):l.repeated?(r("if(m%s&&m%s.length){",p,p)("d%s=[]",p)("for(var j=0;j<m%s.length;++j){",p),s(r,l,f,p+"[j]")("}")):(r("if(m%s!=null&&m.hasOwnProperty(%j)){",p,l.name),s(r,l,f,p),l.partOf&&r("if(o.oneofs)")("d%s=%j",i.safeProp(l.partOf.name),l.name)),r("}")}return r("return d")}},4514:function(e,t,r){"use strict";e.exports=function(e){var t=i.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter((function(e){return e.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&t("if((t&7)===4)")("break"),t("switch(t>>>3){");for(var r=0;r<e.fieldsArray.length;++r){var s=e._fieldsArray[r].resolve(),c=s.resolvedType instanceof n?"int32":s.type,u="m"+i.safeProp(s.name);t("case %i:",s.id),s.map?(t("if(%s===util.emptyObject)",u)("%s={}",u)("var c2 = r.uint32()+r.pos"),void 0!==o.defaults[s.keyType]?t("k=%j",o.defaults[s.keyType]):t("k=null"),void 0!==o.defaults[c]?t("value=%j",o.defaults[c]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",s.keyType)("case 2:"),void 0===o.basic[c]?t("value=types[%i].decode(r,r.uint32())",r):t("value=r.%s()",c),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==o.long[s.keyType]?t('%s[typeof k==="object"?util.longToHash(k):k]=value',u):t("%s[k]=value",u)):s.repeated?(t("if(!(%s&&%s.length))",u,u)("%s=[]",u),void 0!==o.packed[c]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",u,c)("}else"),void 0===o.basic[c]?t(s.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",u,r):t("%s.push(r.%s())",u,c)):void 0===o.basic[c]?t(s.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",u,r):t("%s=r.%s()",u,c),t("break")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),r=0;r<e._fieldsArray.length;++r){var l=e._fieldsArray[r];l.required&&t("if(!m.hasOwnProperty(%j))",l.name)("throw util.ProtocolError(%j,{instance:m})",a(l))}return t("return m")};var n=r(8052),o=r(7767),i=r(3218);function a(e){return"missing required '"+e.name+"'"}},5701:function(e,t,r){"use strict";e.exports=function(e){for(var t,r=i.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),s=e.fieldsArray.slice().sort(i.compareFieldsById),c=0;c<s.length;++c){var u=s[c].resolve(),l=e._fieldsArray.indexOf(u),p=u.resolvedType instanceof n?"int32":u.type,h=o.basic[p];t="m"+i.safeProp(u.name),u.map?(r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,u.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(u.id<<3|2)>>>0,8|o.mapKey[u.keyType],u.keyType),void 0===h?r("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",l,t):r(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|h,p,t),r("}")("}")):u.repeated?(r("if(%s!=null&&%s.length){",t,t),u.packed&&void 0!==o.packed[p]?r("w.uint32(%i).fork()",(u.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",p,t)("w.ldelim()"):(r("for(var i=0;i<%s.length;++i)",t),void 0===h?a(r,u,l,t+"[i]"):r("w.uint32(%i).%s(%s[i])",(u.id<<3|h)>>>0,p,t)),r("}")):(u.optional&&r("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,u.name),void 0===h?a(r,u,l,t):r("w.uint32(%i).%s(%s)",(u.id<<3|h)>>>0,p,t))}return r("return w")};var n=r(8052),o=r(7767),i=r(3218);function a(e,t,r,n){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",r,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}},8052:function(e,t,r){"use strict";e.exports=a;var n=r(8059);((a.prototype=Object.create(n.prototype)).constructor=a).className="Enum";var o=r(4072),i=r(3218);function a(e,t,r,o,i){if(n.call(this,e,r),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=o,this.comments=i||{},this.reserved=void 0,t)for(var a=Object.keys(t),s=0;s<a.length;++s)"number"==typeof t[a[s]]&&(this.valuesById[this.values[a[s]]=t[a[s]]]=a[s])}a.fromJSON=function(e,t){var r=new a(e,t.values,t.options,t.comment,t.comments);return r.reserved=t.reserved,r},a.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},a.prototype.add=function(e,t,r){if(!i.isString(e))throw TypeError("name must be a string");if(!i.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return this.comments[e]=r||null,this},a.prototype.remove=function(e){if(!i.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this},a.prototype.isReservedId=function(e){return o.isReservedId(this.reserved,e)},a.prototype.isReservedName=function(e){return o.isReservedName(this.reserved,e)}},1676:function(e,t,r){"use strict";e.exports=u;var n=r(8059);((u.prototype=Object.create(n.prototype)).constructor=u).className="Field";var o,i=r(8052),a=r(7767),s=r(3218),c=/^required|optional|repeated$/;function u(e,t,r,o,i,u,l){if(s.isObject(o)?(l=i,u=o,o=i=void 0):s.isObject(i)&&(l=u,u=i,i=void 0),n.call(this,e,u),!s.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!s.isString(r))throw TypeError("type must be a string");if(void 0!==o&&!c.test(o=o.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==i&&!s.isString(i))throw TypeError("extend must be a string");"proto3_optional"===o&&(o="optional"),this.rule=o&&"optional"!==o?o:void 0,this.type=r,this.id=t,this.extend=i||void 0,this.required="required"===o,this.optional=!this.required,this.repeated="repeated"===o,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!s.Long&&void 0!==a.long[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=l}u.fromJSON=function(e,t){return new u(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(u.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),u.prototype.setOption=function(e,t,r){return"packed"===e&&(this._packed=null),n.prototype.setOption.call(this,e,t,r)},u.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return s.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},u.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=a.defaults[this.type])&&(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof o?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof i&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof i)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=s.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;s.base64.test(this.typeDefault)?s.base64.decode(this.typeDefault,e=s.newBuffer(s.base64.length(this.typeDefault)),0):s.utf8.write(this.typeDefault,e=s.newBuffer(s.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=s.emptyObject:this.repeated?this.defaultValue=s.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof o&&(this.parent.ctor.prototype[this.name]=this.defaultValue),n.prototype.resolve.call(this)},u.d=function(e,t,r,n){return"function"==typeof t?t=s.decorateType(t).name:t&&"object"==typeof t&&(t=s.decorateEnum(t).name),function(o,i){s.decorateType(o.constructor).add(new u(i,e,t,r,{default:n}))}},u._configure=function(e){o=e}},1062:function(e,t,r){"use strict";var n=e.exports=r(1585);n.build="light",n.load=function(e,t,r){return"function"==typeof t?(r=t,t=new n.Root):t||(t=new n.Root),t.load(e,r)},n.loadSync=function(e,t){return t||(t=new n.Root),t.loadSync(e)},n.encoder=r(5701),n.decoder=r(4514),n.verifier=r(7227),n.converter=r(1622),n.ReflectionObject=r(8059),n.Namespace=r(4072),n.Root=r(2393),n.Enum=r(8052),n.Type=r(3084),n.Field=r(1676),n.OneOf=r(2631),n.MapField=r(8447),n.Service=r(7484),n.Method=r(3169),n.Message=r(5192),n.wrappers=r(6599),n.types=r(7767),n.util=r(3218),n.ReflectionObject._configure(n.Root),n.Namespace._configure(n.Type,n.Service,n.Enum),n.Root._configure(n.Type),n.Field._configure(n.Type)},1585:function(e,t,r){"use strict";var n=t;function o(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=r(7168),n.BufferWriter=r(4023),n.Reader=r(3124),n.BufferReader=r(8170),n.util=r(1986),n.rpc=r(531),n.roots=r(6742),n.configure=o,o()},2833:function(e,t,r){"use strict";var n=e.exports=r(1062);n.build="full",n.tokenize=r(4993),n.parse=r(9357),n.common=r(4759),n.Root._configure(n.Type,n.parse,n.common)},8447:function(e,t,r){"use strict";e.exports=a;var n=r(1676);((a.prototype=Object.create(n.prototype)).constructor=a).className="MapField";var o=r(7767),i=r(3218);function a(e,t,r,o,a,s){if(n.call(this,e,t,o,void 0,void 0,a,s),!i.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}a.fromJSON=function(e,t){return new a(e,t.id,t.keyType,t.type,t.options,t.comment)},a.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},a.prototype.resolve=function(){if(this.resolved)return this;if(void 0===o.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return n.prototype.resolve.call(this)},a.d=function(e,t,r){return"function"==typeof r?r=i.decorateType(r).name:r&&"object"==typeof r&&(r=i.decorateEnum(r).name),function(n,o){i.decorateType(n.constructor).add(new a(o,e,t,r))}}},5192:function(e,t,r){"use strict";e.exports=o;var n=r(1986);function o(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}o.create=function(e){return this.$type.create(e)},o.encode=function(e,t){return this.$type.encode(e,t)},o.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},o.decode=function(e){return this.$type.decode(e)},o.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},o.verify=function(e){return this.$type.verify(e)},o.fromObject=function(e){return this.$type.fromObject(e)},o.toObject=function(e,t){return this.$type.toObject(e,t)},o.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},3169:function(e,t,r){"use strict";e.exports=i;var n=r(8059);((i.prototype=Object.create(n.prototype)).constructor=i).className="Method";var o=r(3218);function i(e,t,r,i,a,s,c,u,l){if(o.isObject(a)?(c=a,a=s=void 0):o.isObject(s)&&(c=s,s=void 0),void 0!==t&&!o.isString(t))throw TypeError("type must be a string");if(!o.isString(r))throw TypeError("requestType must be a string");if(!o.isString(i))throw TypeError("responseType must be a string");n.call(this,e,c),this.type=t||"rpc",this.requestType=r,this.requestStream=!!a||void 0,this.responseType=i,this.responseStream=!!s||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=u,this.parsedOptions=l}i.fromJSON=function(e,t){return new i(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])},i.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),n.prototype.resolve.call(this))}},4072:function(e,t,r){"use strict";e.exports=p;var n=r(8059);((p.prototype=Object.create(n.prototype)).constructor=p).className="Namespace";var o,i,a,s=r(1676),c=r(2631),u=r(3218);function l(e,t){if(e&&e.length){for(var r={},n=0;n<e.length;++n)r[e[n].name]=e[n].toJSON(t);return r}}function p(e,t){n.call(this,e,t),this.nested=void 0,this._nestedArray=null}function h(e){return e._nestedArray=null,e}p.fromJSON=function(e,t){return new p(e,t.options).addJSON(t.nested)},p.arrayToJSON=l,p.isReservedId=function(e,t){if(e)for(var r=0;r<e.length;++r)if("string"!=typeof e[r]&&e[r][0]<=t&&e[r][1]>t)return!0;return!1},p.isReservedName=function(e,t){if(e)for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1},Object.defineProperty(p.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=u.toArray(this.nested))}}),p.prototype.toJSON=function(e){return u.toObject(["options",this.options,"nested",l(this.nestedArray,e)])},p.prototype.addJSON=function(e){if(e)for(var t,r=Object.keys(e),n=0;n<r.length;++n)t=e[r[n]],this.add((void 0!==t.fields?o.fromJSON:void 0!==t.values?a.fromJSON:void 0!==t.methods?i.fromJSON:void 0!==t.id?s.fromJSON:p.fromJSON)(r[n],t));return this},p.prototype.get=function(e){return this.nested&&this.nested[e]||null},p.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof a)return this.nested[e].values;throw Error("no such enum: "+e)},p.prototype.add=function(e){if(!(e instanceof s&&void 0!==e.extend||e instanceof o||e instanceof a||e instanceof i||e instanceof p||e instanceof c))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof p&&e instanceof p)||t instanceof o||t instanceof i)throw Error("duplicate name '"+e.name+"' in "+this);for(var r=t.nestedArray,n=0;n<r.length;++n)e.add(r[n]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),h(this)},p.prototype.remove=function(e){if(!(e instanceof n))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),h(this)},p.prototype.define=function(e,t){if(u.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var r=this;e.length>0;){var n=e.shift();if(r.nested&&r.nested[n]){if(!((r=r.nested[n])instanceof p))throw Error("path conflicts with non-namespace objects")}else r.add(r=new p(n))}return t&&r.addJSON(t),r},p.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof p?e[t++].resolveAll():e[t++].resolve();return this.resolve()},p.prototype.lookup=function(e,t,r){if("boolean"==typeof t?(r=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),u.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),t);var n=this.get(e[0]);if(n){if(1===e.length){if(!t||t.indexOf(n.constructor)>-1)return n}else if(n instanceof p&&(n=n.lookup(e.slice(1),t,!0)))return n}else for(var o=0;o<this.nestedArray.length;++o)if(this._nestedArray[o]instanceof p&&(n=this._nestedArray[o].lookup(e,t,!0)))return n;return null===this.parent||r?null:this.parent.lookup(e,t)},p.prototype.lookupType=function(e){var t=this.lookup(e,[o]);if(!t)throw Error("no such type: "+e);return t},p.prototype.lookupEnum=function(e){var t=this.lookup(e,[a]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},p.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[o,a]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},p.prototype.lookupService=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},p._configure=function(e,t,r){o=e,i=t,a=r}},8059:function(e,t,r){"use strict";e.exports=i,i.className="ReflectionObject";var n,o=r(3218);function i(e,t){if(!o.isString(e))throw TypeError("name must be a string");if(t&&!o.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(i.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),i.prototype.toJSON=function(){throw Error()},i.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof n&&t._handleAdd(this)},i.prototype.onRemove=function(e){var t=e.root;t instanceof n&&t._handleRemove(this),this.parent=null,this.resolved=!1},i.prototype.resolve=function(){return this.resolved||this.root instanceof n&&(this.resolved=!0),this},i.prototype.getOption=function(e){if(this.options)return this.options[e]},i.prototype.setOption=function(e,t,r){return r&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},i.prototype.setParsedOption=function(e,t,r){this.parsedOptions||(this.parsedOptions=[]);var n=this.parsedOptions;if(r){var i=n.find((function(t){return Object.prototype.hasOwnProperty.call(t,e)}));if(i){var a=i[e];o.setProperty(a,r,t)}else(i={})[e]=o.setProperty({},r,t),n.push(i)}else{var s={};s[e]=t,n.push(s)}return this},i.prototype.setOptions=function(e,t){if(e)for(var r=Object.keys(e),n=0;n<r.length;++n)this.setOption(r[n],e[r[n]],t);return this},i.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},i._configure=function(e){n=e}},2631:function(e,t,r){"use strict";e.exports=a;var n=r(8059);((a.prototype=Object.create(n.prototype)).constructor=a).className="OneOf";var o=r(1676),i=r(3218);function a(e,t,r,o){if(Array.isArray(t)||(r=t,t=void 0),n.call(this,e,r),void 0!==t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=o}function s(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}a.fromJSON=function(e,t){return new a(e,t.oneof,t.options,t.comment)},a.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},a.prototype.add=function(e){if(!(e instanceof o))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,s(this),this},a.prototype.remove=function(e){if(!(e instanceof o))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),(t=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(t,1),e.partOf=null,this},a.prototype.onAdd=function(e){n.prototype.onAdd.call(this,e);for(var t=0;t<this.oneof.length;++t){var r=e.get(this.oneof[t]);r&&!r.partOf&&(r.partOf=this,this.fieldsArray.push(r))}s(this)},a.prototype.onRemove=function(e){for(var t,r=0;r<this.fieldsArray.length;++r)(t=this.fieldsArray[r]).parent&&t.parent.remove(t);n.prototype.onRemove.call(this,e)},a.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,r){i.decorateType(t.constructor).add(new a(r,e)),Object.defineProperty(t,r,{get:i.oneOfGetter(e),set:i.oneOfSetter(e)})}}},9357:function(e,t,r){"use strict";e.exports=I,I.filename=null,I.defaults={keepCase:!1};var n=r(4993),o=r(2393),i=r(3084),a=r(1676),s=r(8447),c=r(2631),u=r(8052),l=r(7484),p=r(3169),h=r(7767),d=r(3218),f=/^[1-9][0-9]*$/,m=/^-?[1-9][0-9]*$/,y=/^0[x][0-9a-fA-F]+$/,g=/^-?0[x][0-9a-fA-F]+$/,v=/^0[0-7]+$/,E=/^-?0[0-7]+$/,_=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,T=/^[a-zA-Z_][a-zA-Z_0-9]*$/,O=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,R=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function I(e,t,r){t instanceof o||(r=t,t=new o),r||(r=I.defaults);var S,b,A,C,N,w=r.preferTrailingComment||!1,M=n(e,r.alternateCommentMode||!1),k=M.next,U=M.push,x=M.peek,P=M.skip,L=M.cmnt,j=!0,D=!1,G=t,B=r.keepCase?function(e){return e}:d.camelCase;function H(e,t,r){var n=I.filename;return r||(I.filename=null),Error("illegal "+(t||"token")+" '"+e+"' ("+(n?n+", ":"")+"line "+M.line+")")}function F(){var e,t=[];do{if('"'!==(e=k())&&"'"!==e)throw H(e);t.push(k()),P(e),e=x()}while('"'===e||"'"===e);return t.join("")}function W(e){var t=k();switch(t){case"'":case'"':return U(t),F();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return function(e,t){var r=1;switch("-"===e.charAt(0)&&(r=-1,e=e.substring(1)),e){case"inf":case"INF":case"Inf":return r*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(f.test(e))return r*parseInt(e,10);if(y.test(e))return r*parseInt(e,16);if(v.test(e))return r*parseInt(e,8);if(_.test(e))return r*parseFloat(e);throw H(e,"number",!0)}(t)}catch(r){if(e&&O.test(t))return t;throw H(t,"value")}}function q(e,t){var r,n;do{!t||'"'!==(r=x())&&"'"!==r?e.push([n=Z(k()),P("to",!0)?Z(k()):n]):e.push(F())}while(P(",",!0));P(";")}function Z(e,t){switch(e){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!t&&"-"===e.charAt(0))throw H(e,"id");if(m.test(e))return parseInt(e,10);if(g.test(e))return parseInt(e,16);if(E.test(e))return parseInt(e,8);throw H(e,"id")}function K(){if(void 0!==S)throw H("package");if(S=k(),!O.test(S))throw H(S,"name");G=G.define(S),P(";")}function V(){var e,t=x();switch(t){case"weak":e=A||(A=[]),k();break;case"public":k();default:e=b||(b=[])}t=F(),P(";"),e.push(t)}function z(){if(P("="),C=F(),!(D="proto3"===C)&&"proto2"!==C)throw H(C,"syntax");P(";")}function J(e,t){switch(t){case"option":return $(e,t),P(";"),!0;case"message":return function(e,t){if(!T.test(t=k()))throw H(t,"type name");var r=new i(t);X(r,(function(e){if(!J(r,e))switch(e){case"map":!function(e){P("<");var t=k();if(void 0===h.mapKey[t])throw H(t,"type");P(",");var r=k();if(!O.test(r))throw H(r,"type");P(">");var n=k();if(!T.test(n))throw H(n,"name");P("=");var o=new s(B(n),Z(k()),t,r);X(o,(function(e){if("option"!==e)throw H(e);$(o,e),P(";")}),(function(){te(o)})),e.add(o)}(r);break;case"required":case"repeated":Y(r,e);break;case"optional":Y(r,D?"proto3_optional":"optional");break;case"oneof":!function(e,t){if(!T.test(t=k()))throw H(t,"name");var r=new c(B(t));X(r,(function(e){"option"===e?($(r,e),P(";")):(U(e),Y(r,"optional"))})),e.add(r)}(r,e);break;case"extensions":q(r.extensions||(r.extensions=[]));break;case"reserved":q(r.reserved||(r.reserved=[]),!0);break;default:if(!D||!O.test(e))throw H(e);U(e),Y(r,"optional")}})),e.add(r)}(e,t),!0;case"enum":return function(e,t){if(!T.test(t=k()))throw H(t,"name");var r=new u(t);X(r,(function(e){switch(e){case"option":$(r,e),P(";");break;case"reserved":q(r.reserved||(r.reserved=[]),!0);break;default:!function(e,t){if(!T.test(t))throw H(t,"name");P("=");var r=Z(k(),!0),n={};X(n,(function(e){if("option"!==e)throw H(e);$(n,e),P(";")}),(function(){te(n)})),e.add(t,r,n.comment)}(r,e)}})),e.add(r)}(e,t),!0;case"service":return function(e,t){if(!T.test(t=k()))throw H(t,"service name");var r=new l(t);X(r,(function(e){if(!J(r,e)){if("rpc"!==e)throw H(e);!function(e,t){var r=L(),n=t;if(!T.test(t=k()))throw H(t,"name");var o,i,a,s,c=t;if(P("("),P("stream",!0)&&(i=!0),!O.test(t=k()))throw H(t);if(o=t,P(")"),P("returns"),P("("),P("stream",!0)&&(s=!0),!O.test(t=k()))throw H(t);a=t,P(")");var u=new p(c,n,o,a,i,s);u.comment=r,X(u,(function(e){if("option"!==e)throw H(e);$(u,e),P(";")})),e.add(u)}(r,e)}})),e.add(r)}(e,t),!0;case"extend":return function(e,t){if(!O.test(t=k()))throw H(t,"reference");var r=t;X(null,(function(t){switch(t){case"required":case"repeated":Y(e,t,r);break;case"optional":Y(e,D?"proto3_optional":"optional",r);break;default:if(!D||!O.test(t))throw H(t);U(t),Y(e,"optional",r)}}))}(e,t),!0}return!1}function X(e,t,r){var n=M.line;if(e&&("string"!=typeof e.comment&&(e.comment=L()),e.filename=I.filename),P("{",!0)){for(var o;"}"!==(o=k());)t(o);P(";",!0)}else r&&r(),P(";"),e&&("string"!=typeof e.comment||w)&&(e.comment=L(n)||e.comment)}function Y(e,t,r){var n=k();if("group"!==n){if(!O.test(n))throw H(n,"type");var o=k();if(!T.test(o))throw H(o,"name");o=B(o),P("=");var s=new a(o,Z(k()),n,t,r);if(X(s,(function(e){if("option"!==e)throw H(e);$(s,e),P(";")}),(function(){te(s)})),"proto3_optional"===t){var u=new c("_"+o);s.setOption("proto3_optional",!0),u.add(s),e.add(u)}else e.add(s);D||!s.repeated||void 0===h.packed[n]&&void 0!==h.basic[n]||s.setOption("packed",!1,!0)}else!function(e,t){var r=k();if(!T.test(r))throw H(r,"name");var n=d.lcFirst(r);r===n&&(r=d.ucFirst(r)),P("=");var o=Z(k()),s=new i(r);s.group=!0;var c=new a(n,o,r,t);c.filename=I.filename,X(s,(function(e){switch(e){case"option":$(s,e),P(";");break;case"required":case"repeated":Y(s,e);break;case"optional":Y(s,D?"proto3_optional":"optional");break;default:throw H(e)}})),e.add(s).add(c)}(e,t)}function $(e,t){var r=P("(",!0);if(!O.test(t=k()))throw H(t,"name");var n,o=t,i=o;r&&(P(")"),i=o="("+o+")",t=x(),R.test(t)&&(n=t.substr(1),o+=t,k())),P("="),function(e,t,r,n){e.setParsedOption&&e.setParsedOption(t,r,n)}(e,i,Q(e,o),n)}function Q(e,t){if(P("{",!0)){for(var r={};!P("}",!0);){if(!T.test(N=k()))throw H(N,"name");var n,o=N;"{"===x()?n=Q(e,t+"."+N):(P(":"),"{"===x()?n=Q(e,t+"."+N):(n=W(!0),ee(e,t+"."+N,n)));var i=r[o];i&&(n=[].concat(i).concat(n)),r[o]=n,P(",",!0)}return r}var a=W(!0);return ee(e,t,a),a}function ee(e,t,r){e.setOption&&e.setOption(t,r)}function te(e){if(P("[",!0)){do{$(e,"option")}while(P(",",!0));P("]")}return e}for(;null!==(N=k());)switch(N){case"package":if(!j)throw H(N);K();break;case"import":if(!j)throw H(N);V();break;case"syntax":if(!j)throw H(N);z();break;case"option":$(G,N),P(";");break;default:if(J(G,N)){j=!1;continue}throw H(N)}return I.filename=null,{package:S,imports:b,weakImports:A,syntax:C,root:t}}},3124:function(e,t,r){"use strict";e.exports=c;var n,o=r(1986),i=o.LongBits,a=o.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var u,l="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},p=function(){return o.Buffer?function(e){return(c.create=function(e){return o.Buffer.isBuffer(e)?new n(e):l(e)})(e)}:l};function h(){var e=new i(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function d(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw s(this,8);return new i(d(this.buf,this.pos+=4),d(this.buf,this.pos+=4))}c.create=p(),c.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,c.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return u}),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return d(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|d(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw s(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,r):t===r?new this.buf.constructor(0):this._slice.call(this.buf,t,r)},c.prototype.string=function(){var e=this.bytes();return a.read(e,0,e.length)},c.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){n=e,c.create=p(),n._configure();var t=o.Long?"toLong":"toNumber";o.merge(c.prototype,{int64:function(){return h.call(this)[t](!1)},uint64:function(){return h.call(this)[t](!0)},sint64:function(){return h.call(this).zzDecode()[t](!1)},fixed64:function(){return f.call(this)[t](!0)},sfixed64:function(){return f.call(this)[t](!1)}})}},8170:function(e,t,r){"use strict";e.exports=i;var n=r(3124);(i.prototype=Object.create(n.prototype)).constructor=i;var o=r(1986);function i(e){n.call(this,e)}i._configure=function(){o.Buffer&&(i.prototype._slice=o.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()},2393:function(e,t,r){"use strict";e.exports=p;var n=r(4072);((p.prototype=Object.create(n.prototype)).constructor=p).className="Root";var o,i,a,s=r(1676),c=r(8052),u=r(2631),l=r(3218);function p(e){n.call(this,"",e),this.deferred=[],this.files=[]}function h(){}p.fromJSON=function(e,t){return t||(t=new p),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},p.prototype.resolvePath=l.path.resolve,p.prototype.fetch=l.fetch,p.prototype.load=function e(t,r,n){"function"==typeof r&&(n=r,r=void 0);var o=this;if(!n)return l.asPromise(e,o,t,r);var s=n===h;function c(e,t){if(n){var r=n;if(n=null,s)throw e;r(e,t)}}function u(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var r=e.substring(t);if(r in a)return r}return null}function p(e,t){try{if(l.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),l.isString(t)){i.filename=e;var n,a=i(t,o,r),p=0;if(a.imports)for(;p<a.imports.length;++p)(n=u(a.imports[p])||o.resolvePath(e,a.imports[p]))&&d(n);if(a.weakImports)for(p=0;p<a.weakImports.length;++p)(n=u(a.weakImports[p])||o.resolvePath(e,a.weakImports[p]))&&d(n,!0)}else o.setOptions(t.options).addJSON(t.nested)}catch(e){c(e)}s||f||c(null,o)}function d(e,t){if(!(o.files.indexOf(e)>-1))if(o.files.push(e),e in a)s?p(e,a[e]):(++f,setTimeout((function(){--f,p(e,a[e])})));else if(s){var r;try{r=l.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||c(e))}p(e,r)}else++f,o.fetch(e,(function(r,i){--f,n&&(r?t?f||c(null,o):c(r):p(e,i))}))}var f=0;l.isString(t)&&(t=[t]);for(var m,y=0;y<t.length;++y)(m=o.resolvePath("",t[y]))&&d(m);if(s)return o;f||c(null,o)},p.prototype.loadSync=function(e,t){if(!l.isNode)throw Error("not supported");return this.load(e,t,h)},p.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(e){return"'extend "+e.extend+"' in "+e.parent.fullName})).join(", "));return n.prototype.resolveAll.call(this)};var d=/^[A-Z]/;function f(e,t){var r=t.parent.lookup(t.extend);if(r){var n=new s(t.fullName,t.id,t.type,t.rule,void 0,t.options);return n.declaringField=t,t.extensionField=n,r.add(n),!0}return!1}p.prototype._handleAdd=function(e){if(e instanceof s)void 0===e.extend||e.extensionField||f(0,e)||this.deferred.push(e);else if(e instanceof c)d.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof u)){if(e instanceof o)for(var t=0;t<this.deferred.length;)f(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var r=0;r<e.nestedArray.length;++r)this._handleAdd(e._nestedArray[r]);d.test(e.name)&&(e.parent[e.name]=e)}},p.prototype._handleRemove=function(e){if(e instanceof s){if(void 0!==e.extend)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof c)d.test(e.name)&&delete e.parent[e.name];else if(e instanceof n){for(var r=0;r<e.nestedArray.length;++r)this._handleRemove(e._nestedArray[r]);d.test(e.name)&&delete e.parent[e.name]}},p._configure=function(e,t,r){o=e,i=t,a=r}},6742:function(e){"use strict";e.exports={}},531:function(e,t,r){"use strict";t.Service=r(9180)},9180:function(e,t,r){"use strict";e.exports=o;var n=r(1986);function o(e,t,r){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(r)}(o.prototype=Object.create(n.EventEmitter.prototype)).constructor=o,o.prototype.rpcCall=function e(t,r,o,i,a){if(!i)throw TypeError("request must be specified");var s=this;if(!a)return n.asPromise(e,s,t,r,o,i);if(s.rpcImpl)try{return s.rpcImpl(t,r[s.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(e,r){if(e)return s.emit("error",e,t),a(e);if(null!==r){if(!(r instanceof o))try{r=o[s.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return s.emit("error",e,t),a(e)}return s.emit("data",r,t),a(null,r)}s.end(!0)}))}catch(e){return s.emit("error",e,t),void setTimeout((function(){a(e)}),0)}else setTimeout((function(){a(Error("already ended"))}),0)},o.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},7484:function(e,t,r){"use strict";e.exports=s;var n=r(4072);((s.prototype=Object.create(n.prototype)).constructor=s).className="Service";var o=r(3169),i=r(3218),a=r(531);function s(e,t){n.call(this,e,t),this.methods={},this._methodsArray=null}function c(e){return e._methodsArray=null,e}s.fromJSON=function(e,t){var r=new s(e,t.options);if(t.methods)for(var n=Object.keys(t.methods),i=0;i<n.length;++i)r.add(o.fromJSON(n[i],t.methods[n[i]]));return t.nested&&r.addJSON(t.nested),r.comment=t.comment,r},s.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return i.toObject(["options",t&&t.options||void 0,"methods",n.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},Object.defineProperty(s.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=i.toArray(this.methods))}}),s.prototype.get=function(e){return this.methods[e]||n.prototype.get.call(this,e)},s.prototype.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return n.prototype.resolve.call(this)},s.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof o?(this.methods[e.name]=e,e.parent=this,c(this)):n.prototype.add.call(this,e)},s.prototype.remove=function(e){if(e instanceof o){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,c(this)}return n.prototype.remove.call(this,e)},s.prototype.create=function(e,t,r){for(var n,o=new a.Service(e,t,r),s=0;s<this.methodsArray.length;++s){var c=i.lcFirst((n=this._methodsArray[s]).resolve().name).replace(/[^$\w_]/g,"");o[c]=i.codegen(["r","c"],i.isReserved(c)?c+"_":c)("return this.rpcCall(m,q,s,r,c)")({m:n,q:n.resolvedRequestType.ctor,s:n.resolvedResponseType.ctor})}return o}},4993:function(e){"use strict";e.exports=p;var t=/[\s{}=;:[\],'"()<>]/g,r=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,n=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,o=/^ *[*/]+ */,i=/^\s*\*?\/*/,a=/\n/g,s=/\s/,c=/\\(.?)/g,u={0:"\0",r:"\r",n:"\n",t:"\t"};function l(e){return e.replace(c,(function(e,t){switch(t){case"\\":case"":return t;default:return u[t]||""}}))}function p(e,c){e=e.toString();var u=0,p=e.length,h=1,d=null,f=null,m=0,y=!1,g=!1,v=[],E=null;function _(e){return Error("illegal "+e+" (line "+h+")")}function T(t){return e.charAt(t)}function O(t,r,n){d=e.charAt(t++),m=h,y=!1,g=n;var s,u=t-(c?2:3);do{if(--u<0||"\n"===(s=e.charAt(u))){y=!0;break}}while(" "===s||"\t"===s);for(var l=e.substring(t,r).split(a),p=0;p<l.length;++p)l[p]=l[p].replace(c?i:o,"").trim();f=l.join("\n").trim()}function R(t){var r=I(t),n=e.substring(t,r);return/^\s*\/{1,2}/.test(n)}function I(e){for(var t=e;t<p&&"\n"!==T(t);)t++;return t}function S(){if(v.length>0)return v.shift();if(E)return function(){var t="'"===E?n:r;t.lastIndex=u-1;var o=t.exec(e);if(!o)throw _("string");return u=t.lastIndex,b(E),E=null,l(o[1])}();var o,i,a,d,f,m=0===u;do{if(u===p)return null;for(o=!1;s.test(a=T(u));)if("\n"===a&&(m=!0,++h),++u===p)return null;if("/"===T(u)){if(++u===p)throw _("comment");if("/"===T(u))if(c){if(d=u,f=!1,R(u)){f=!0;do{if((u=I(u))===p)break;u++}while(R(u))}else u=Math.min(p,I(u)+1);f&&O(d,u,m),h++,o=!0}else{for(f="/"===T(d=u+1);"\n"!==T(++u);)if(u===p)return null;++u,f&&O(d,u-1,m),++h,o=!0}else{if("*"!==(a=T(u)))return"/";d=u+1,f=c||"*"===T(d);do{if("\n"===a&&++h,++u===p)throw _("comment");i=a,a=T(u)}while("*"!==i||"/"!==a);++u,f&&O(d,u-2,m),o=!0}}}while(o);var y=u;if(t.lastIndex=0,!t.test(T(y++)))for(;y<p&&!t.test(T(y));)++y;var g=e.substring(u,u=y);return'"'!==g&&"'"!==g||(E=g),g}function b(e){v.push(e)}function A(){if(!v.length){var e=S();if(null===e)return null;b(e)}return v[0]}return Object.defineProperty({next:S,peek:A,push:b,skip:function(e,t){var r=A();if(r===e)return S(),!0;if(!t)throw _("token '"+r+"', '"+e+"' expected");return!1},cmnt:function(e){var t=null;return void 0===e?m===h-1&&(c||"*"===d||y)&&(t=g?f:null):(m<e&&A(),m!==e||y||!c&&"/"!==d||(t=g?null:f)),t}},"line",{get:function(){return h}})}p.unescape=l},3084:function(e,t,r){"use strict";e.exports=v;var n=r(4072);((v.prototype=Object.create(n.prototype)).constructor=v).className="Type";var o=r(8052),i=r(2631),a=r(1676),s=r(8447),c=r(7484),u=r(5192),l=r(3124),p=r(7168),h=r(3218),d=r(5701),f=r(4514),m=r(7227),y=r(1622),g=r(6599);function v(e,t){n.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function E(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(v.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],n=r.id;if(this._fieldsById[n])throw Error("duplicate id "+n+" in "+this);this._fieldsById[n]=r}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=h.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=h.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=v.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof u||((e.prototype=new u).constructor=e,h.merge(e.prototype,t)),e.$type=e.prototype.$type=this,h.merge(e,u,!0),this._ctor=e;for(var r=0;r<this.fieldsArray.length;++r)this._fieldsArray[r].resolve();var n={};for(r=0;r<this.oneofsArray.length;++r)n[this._oneofsArray[r].resolve().name]={get:h.oneOfGetter(this._oneofsArray[r].oneof),set:h.oneOfSetter(this._oneofsArray[r].oneof)};r&&Object.defineProperties(e.prototype,n)}}}),v.generateConstructor=function(e){for(var t,r=h.codegen(["p"],e.name),n=0;n<e.fieldsArray.length;++n)(t=e._fieldsArray[n]).map?r("this%s={}",h.safeProp(t.name)):t.repeated&&r("this%s=[]",h.safeProp(t.name));return r("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},v.fromJSON=function(e,t){var r=new v(e,t.options);r.extensions=t.extensions,r.reserved=t.reserved;for(var u=Object.keys(t.fields),l=0;l<u.length;++l)r.add((void 0!==t.fields[u[l]].keyType?s.fromJSON:a.fromJSON)(u[l],t.fields[u[l]]));if(t.oneofs)for(u=Object.keys(t.oneofs),l=0;l<u.length;++l)r.add(i.fromJSON(u[l],t.oneofs[u[l]]));if(t.nested)for(u=Object.keys(t.nested),l=0;l<u.length;++l){var p=t.nested[u[l]];r.add((void 0!==p.id?a.fromJSON:void 0!==p.fields?v.fromJSON:void 0!==p.values?o.fromJSON:void 0!==p.methods?c.fromJSON:n.fromJSON)(u[l],p))}return t.extensions&&t.extensions.length&&(r.extensions=t.extensions),t.reserved&&t.reserved.length&&(r.reserved=t.reserved),t.group&&(r.group=!0),t.comment&&(r.comment=t.comment),r},v.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return h.toObject(["options",t&&t.options||void 0,"oneofs",n.arrayToJSON(this.oneofsArray,e),"fields",n.arrayToJSON(this.fieldsArray.filter((function(e){return!e.declaringField})),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},v.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var r=this.oneofsArray;for(t=0;t<r.length;)r[t++].resolve();return n.prototype.resolveAll.call(this)},v.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},v.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof a&&void 0===e.extend){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),E(this)}return e instanceof i?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),E(this)):n.prototype.add.call(this,e)},v.prototype.remove=function(e){if(e instanceof a&&void 0===e.extend){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),E(this)}if(e instanceof i){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),E(this)}return n.prototype.remove.call(this,e)},v.prototype.isReservedId=function(e){return n.isReservedId(this.reserved,e)},v.prototype.isReservedName=function(e){return n.isReservedName(this.reserved,e)},v.prototype.create=function(e){return new this.ctor(e)},v.prototype.setup=function(){for(var e=this.fullName,t=[],r=0;r<this.fieldsArray.length;++r)t.push(this._fieldsArray[r].resolve().resolvedType);this.encode=d(this)({Writer:p,types:t,util:h}),this.decode=f(this)({Reader:l,types:t,util:h}),this.verify=m(this)({types:t,util:h}),this.fromObject=y.fromObject(this)({types:t,util:h}),this.toObject=y.toObject(this)({types:t,util:h});var n=g[e];if(n){var o=Object.create(this);o.fromObject=this.fromObject,this.fromObject=n.fromObject.bind(o),o.toObject=this.toObject,this.toObject=n.toObject.bind(o)}return this},v.prototype.encode=function(e,t){return this.setup().encode(e,t)},v.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},v.prototype.decode=function(e,t){return this.setup().decode(e,t)},v.prototype.decodeDelimited=function(e){return e instanceof l||(e=l.create(e)),this.decode(e,e.uint32())},v.prototype.verify=function(e){return this.setup().verify(e)},v.prototype.fromObject=function(e){return this.setup().fromObject(e)},v.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},v.d=function(e){return function(t){h.decorateType(t,e)}}},7767:function(e,t,r){"use strict";var n=t,o=r(3218),i=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function a(e,t){var r=0,n={};for(t|=0;r<e.length;)n[i[r+t]]=e[r++];return n}n.basic=a([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),n.defaults=a([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",o.emptyArray,null]),n.long=a([0,0,0,1,1],7),n.mapKey=a([0,0,0,5,5,0,0,0,1,1,0,2],2),n.packed=a([1,5,0,0,0,5,5,0,0,0,1,1,0])},3218:function(e,t,r){"use strict";var n,o,i=e.exports=r(1986),a=r(6742);i.codegen=r(4495),i.fetch=r(8551),i.path=r(7460),i.fs=i.inquire("fs"),i.toArray=function(e){if(e){for(var t=Object.keys(e),r=new Array(t.length),n=0;n<t.length;)r[n]=e[t[n++]];return r}return[]},i.toObject=function(e){for(var t={},r=0;r<e.length;){var n=e[r++],o=e[r++];void 0!==o&&(t[n]=o)}return t};var s=/\\/g,c=/"/g;i.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},i.safeProp=function(e){return!/^[$\w_]+$/.test(e)||i.isReserved(e)?'["'+e.replace(s,"\\\\").replace(c,'\\"')+'"]':"."+e},i.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var u=/_([a-z])/g;i.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(u,(function(e,t){return t.toUpperCase()}))},i.compareFieldsById=function(e,t){return e.id-t.id},i.decorateType=function(e,t){if(e.$type)return t&&e.$type.name!==t&&(i.decorateRoot.remove(e.$type),e.$type.name=t,i.decorateRoot.add(e.$type)),e.$type;n||(n=r(3084));var o=new n(t||e.name);return i.decorateRoot.add(o),o.ctor=e,Object.defineProperty(e,"$type",{value:o,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:o,enumerable:!1}),o};var l=0;i.decorateEnum=function(e){if(e.$type)return e.$type;o||(o=r(8052));var t=new o("Enum"+l++,e);return i.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t},i.setProperty=function(e,t,r){if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,r,n){var o=r.shift();if("__proto__"===o)return t;if(r.length>0)t[o]=e(t[o]||{},r,n);else{var i=t[o];i&&(n=[].concat(i).concat(n)),t[o]=n}return t}(e,t=t.split("."),r)},Object.defineProperty(i,"decorateRoot",{get:function(){return a.decorated||(a.decorated=new(r(2393)))}})},2969:function(e,t,r){"use strict";e.exports=o;var n=r(1986);function o(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=o.zero=new o(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var a=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var r=e>>>0,n=(e-r)/4294967296>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new o(r,n)},o.from=function(e){if("number"==typeof e)return o.fromNumber(e);if(n.isString(e)){if(!n.Long)return o.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new o(e.low>>>0,e.high>>>0):i},o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},o.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var s=String.prototype.charCodeAt;o.fromHash=function(e){return e===a?i:new o((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},1986:function(e,t,r){"use strict";var n=t;function o(e,t,r){for(var n=Object.keys(t),o=0;o<n.length;++o)void 0!==e[n[o]]&&r||(e[n[o]]=t[n[o]]);return e}function i(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),r&&o(this,r)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}n.asPromise=r(5317),n.base64=r(8660),n.EventEmitter=r(3745),n.float=r(9059),n.inquire=r(491),n.utf8=r(8375),n.pool=r(8601),n.LongBits=r(2969),n.isNode=Boolean(void 0!==r.g&&r.g&&r.g.process&&r.g.process.versions&&r.g.process.versions.node),n.global=n.isNode&&r.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.isset=n.isSet=function(e,t){var r=e[t];return!(null==r||!e.hasOwnProperty(t))&&("object"!=typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"==typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},n.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},n.merge=o,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=i,n.ProtocolError=i("ProtocolError"),n.oneOfGetter=function(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=1;return function(){for(var e=Object.keys(this),r=e.length-1;r>-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},n.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var e=n.Buffer;e?(n._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},n._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):n._Buffer_from=n._Buffer_allocUnsafe=null}},7227:function(e,t,r){"use strict";e.exports=function(e){var t=o.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),r={};e.oneofsArray.length&&t("var p={}");for(var n=0;n<e.fieldsArray.length;++n){var c=e._fieldsArray[n].resolve(),u="m"+o.safeProp(c.name);if(c.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",u,c.name),c.map)t("if(!util.isObject(%s))",u)("return%j",i(c,"object"))("var k=Object.keys(%s)",u)("for(var i=0;i<k.length;++i){"),s(t,c,"k[i]"),a(t,c,n,u+"[k[i]]")("}");else if(c.repeated)t("if(!Array.isArray(%s))",u)("return%j",i(c,"array"))("for(var i=0;i<%s.length;++i){",u),a(t,c,n,u+"[i]")("}");else{if(c.partOf){var l=o.safeProp(c.partOf.name);1===r[c.partOf.name]&&t("if(p%s===1)",l)("return%j",c.partOf.name+": multiple values"),r[c.partOf.name]=1,t("p%s=1",l)}a(t,c,n,u)}c.optional&&t("}")}return t("return null")};var n=r(8052),o=r(3218);function i(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function a(e,t,r,o){if(t.resolvedType)if(t.resolvedType instanceof n){e("switch(%s){",o)("default:")("return%j",i(t,"enum value"));for(var a=Object.keys(t.resolvedType.values),s=0;s<a.length;++s)e("case %i:",t.resolvedType.values[a[s]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",r,o)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",o)("return%j",i(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",o,o,o,o)("return%j",i(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',o)("return%j",i(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',o)("return%j",i(t,"boolean"));break;case"string":e("if(!util.isString(%s))",o)("return%j",i(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',o,o,o)("return%j",i(t,"buffer"))}return e}function s(e,t,r){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",r)("return%j",i(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",r)("return%j",i(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",r)("return%j",i(t,"boolean key"))}return e}},6599:function(e,t,r){"use strict";var n=t,o=r(5192);n[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),r=this.lookup(t);if(r){var n="."===e["@type"].charAt(0)?e["@type"].substr(1):e["@type"];return-1===n.indexOf("/")&&(n="/"+n),this.create({type_url:n,value:r.encode(r.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var r="",n="";if(t&&t.json&&e.type_url&&e.value){n=e.type_url.substring(e.type_url.lastIndexOf("/")+1),r=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var i=this.lookup(n);i&&(e=i.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof o){var a=e.$type.toObject(e,t);return""===r&&(r="type.googleapis.com/"),n=r+("."===e.$type.fullName[0]?e.$type.fullName.substr(1):e.$type.fullName),a["@type"]=n,a}return this.toObject(e,t)}}},7168:function(e,t,r){"use strict";e.exports=p;var n,o=r(1986),i=o.LongBits,a=o.base64,s=o.utf8;function c(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function u(){}function l(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function p(){this.len=0,this.head=new c(u,0,0),this.tail=this.head,this.states=null}var h=function(){return o.Buffer?function(){return(p.create=function(){return new n})()}:function(){return new p}};function d(e,t,r){t[r]=255&e}function f(e,t){this.len=e,this.next=void 0,this.val=t}function m(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function y(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}p.create=h(),p.alloc=function(e){return new o.Array(e)},o.Array!==Array&&(p.alloc=o.pool(p.alloc,o.Array.prototype.subarray)),p.prototype._push=function(e,t,r){return this.tail=this.tail.next=new c(e,t,r),this.len+=t,this},f.prototype=Object.create(c.prototype),f.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},p.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new f((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},p.prototype.int32=function(e){return e<0?this._push(m,10,i.fromNumber(e)):this.uint32(e)},p.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},p.prototype.uint64=function(e){var t=i.from(e);return this._push(m,t.length(),t)},p.prototype.int64=p.prototype.uint64,p.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(m,t.length(),t)},p.prototype.bool=function(e){return this._push(d,1,e?1:0)},p.prototype.fixed32=function(e){return this._push(y,4,e>>>0)},p.prototype.sfixed32=p.prototype.fixed32,p.prototype.fixed64=function(e){var t=i.from(e);return this._push(y,4,t.lo)._push(y,4,t.hi)},p.prototype.sfixed64=p.prototype.fixed64,p.prototype.float=function(e){return this._push(o.float.writeFloatLE,4,e)},p.prototype.double=function(e){return this._push(o.float.writeDoubleLE,8,e)};var g=o.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};p.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(d,1,0);if(o.isString(e)){var r=p.alloc(t=a.length(e));a.decode(e,r,0),e=r}return this.uint32(t)._push(g,t,e)},p.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t)._push(s.write,t,e):this._push(d,1,0)},p.prototype.fork=function(){return this.states=new l(this),this.head=this.tail=new c(u,0,0),this.len=0,this},p.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},p.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},p.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},p._configure=function(e){n=e,p.create=h(),n._configure()}},4023:function(e,t,r){"use strict";e.exports=i;var n=r(7168);(i.prototype=Object.create(n.prototype)).constructor=i;var o=r(1986);function i(){n.call(this)}function a(e,t,r){e.length<40?o.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}i._configure=function(){i.alloc=o._Buffer_allocUnsafe,i.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]}},i.prototype.bytes=function(e){o.isString(e)&&(e=o._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=o.Buffer.byteLength(e);return this.uint32(t),t&&this._push(a,t,e),this},i._configure()},8878:function(e,t){"use strict";var r=Object.prototype.hasOwnProperty;function n(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function o(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var n,i,a=[];for(i in"string"!=typeof t&&(t="?"),e)if(r.call(e,i)){if((n=e[i])||null!=n&&!isNaN(n)||(n=""),i=o(i),n=o(n),null===i||null===n)continue;a.push(i+"="+n)}return a.length?t+a.join("&"):""},t.parse=function(e){for(var t,r=/([^=?#&]+)=?([^&]*)/g,o={};t=r.exec(e);){var i=n(t[1]),a=n(t[2]);null===i||null===a||i in o||(o[i]=a)}return o}},1384:function(e){"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},8078:function(e,t,r){"use strict";var n=r(3683);e.exports=r(608)(n),"_sockjs_onload"in r.g&&setTimeout(r.g._sockjs_onload,1)},5014:function(e,t,r){"use strict";var n=r(2937),o=r(2789);function i(){o.call(this),this.initEvent("close",!1,!1),this.wasClean=!1,this.code=0,this.reason=""}n(i,o),e.exports=i},9622:function(e,t,r){"use strict";var n=r(2937),o=r(6393);function i(){o.call(this)}n(i,o),i.prototype.removeAllListeners=function(e){e?delete this._listeners[e]:this._listeners={}},i.prototype.once=function(e,t){var r=this,n=!1;this.on(e,(function o(){r.removeListener(e,o),n||(n=!0,t.apply(this,arguments))}))},i.prototype.emit=function(){var e=arguments[0],t=this._listeners[e];if(t){for(var r=arguments.length,n=new Array(r-1),o=1;o<r;o++)n[o-1]=arguments[o];for(var i=0;i<t.length;i++)t[i].apply(this,n)}},i.prototype.on=i.prototype.addListener=o.prototype.addEventListener,i.prototype.removeListener=o.prototype.removeEventListener,e.exports.v=i},2789:function(e){"use strict";function t(e){this.type=e}t.prototype.initEvent=function(e,t,r){return this.type=e,this.bubbles=t,this.cancelable=r,this.timeStamp=+new Date,this},t.prototype.stopPropagation=function(){},t.prototype.preventDefault=function(){},t.CAPTURING_PHASE=1,t.AT_TARGET=2,t.BUBBLING_PHASE=3,e.exports=t},6393:function(e){"use strict";function t(){this._listeners={}}t.prototype.addEventListener=function(e,t){e in this._listeners||(this._listeners[e]=[]);var r=this._listeners[e];-1===r.indexOf(t)&&(r=r.concat([t])),this._listeners[e]=r},t.prototype.removeEventListener=function(e,t){var r=this._listeners[e];if(r){var n=r.indexOf(t);-1===n||(r.length>1?this._listeners[e]=r.slice(0,n).concat(r.slice(n+1)):delete this._listeners[e])}},t.prototype.dispatchEvent=function(){var e=arguments[0],t=e.type,r=1===arguments.length?[e]:Array.apply(null,arguments);if(this["on"+t]&&this["on"+t].apply(this,r),t in this._listeners)for(var n=this._listeners[t],o=0;o<n.length;o++)n[o].apply(this,r)},e.exports=t},3385:function(e,t,r){"use strict";var n=r(2937),o=r(2789);function i(e){o.call(this),this.initEvent("message",!1,!1),this.data=e}n(i,o),e.exports=i},8809:function(e,t,r){"use strict";var n=r(8734);function o(e){this._transport=e,e.on("message",this._transportMessage.bind(this)),e.on("close",this._transportClose.bind(this))}o.prototype._transportClose=function(e,t){n.postMessage("c",JSON.stringify([e,t]))},o.prototype._transportMessage=function(e){n.postMessage("t",e)},o.prototype._send=function(e){this._transport.send(e)},o.prototype._close=function(){this._transport.close(),this._transport.removeAllListeners()},e.exports=o},317:function(e,t,r){"use strict";var n=r(1803),o=r(6831),i=r(8809),a=r(7694),s=r(8734),c=r(1637);e.exports=function(e,t){var r,u={};t.forEach((function(e){e.facadeTransport&&(u[e.facadeTransport.transportName]=e.facadeTransport)})),u[a.transportName]=a,e.bootstrap_iframe=function(){var t;s.currentWindowId=c.hash.slice(1),o.attachEvent("message",(function(o){if(o.source===parent&&(void 0===r&&(r=o.origin),o.origin===r)){var a;try{a=JSON.parse(o.data)}catch(e){return void o.data}if(a.windowId===s.currentWindowId)switch(a.type){case"s":var l;try{l=JSON.parse(a.data)}catch(e){a.data;break}var p=l[0],h=l[1],d=l[2],f=l[3];if(p!==e.version)throw new Error('Incompatible SockJS! Main site uses: "'+p+'", the iframe: "'+e.version+'".');if(!n.isOriginEqual(d,c.href)||!n.isOriginEqual(f,c.href))throw new Error("Can't connect to different domain from within an iframe. ("+c.href+", "+d+", "+f+")");t=new i(new u[h](d,f));break;case"m":t._send(a.data);break;case"c":t&&t._close(),t=null}}})),s.postMessage("s")}}},5263:function(e,t,r){"use strict";var n=r(9622).v,o=r(2937),i=r(7234);function a(e,t){n.call(this);var r=this,o=+new Date;this.xo=new t("GET",e),this.xo.once("finish",(function(e,t){var n,a;if(200===e){if(a=+new Date-o,t)try{n=JSON.parse(t)}catch(e){}i.isObject(n)||(n={})}r.emit("finish",n,a),r.removeAllListeners()}))}o(a,n),a.prototype.close=function(){this.removeAllListeners(),this.xo.close()},e.exports=a},7694:function(e,t,r){"use strict";var n=r(2937),o=r(9622).v,i=r(2458),a=r(5263);function s(e){var t=this;o.call(this),this.ir=new a(e,i),this.ir.once("finish",(function(e,r){t.ir=null,t.emit("message",JSON.stringify([e,r]))}))}n(s,o),s.transportName="iframe-info-receiver",s.prototype.close=function(){this.ir&&(this.ir.close(),this.ir=null),this.removeAllListeners()},e.exports=s},9834:function(e,t,r){"use strict";var n=r(9622).v,o=r(2937),i=r(6831),a=r(6010),s=r(7694);function c(e,t){var o=this;n.call(this);var c=function(){var r=o.ifr=new a(s.transportName,t,e);r.once("message",(function(e){if(e){var t;try{t=JSON.parse(e)}catch(e){return o.emit("finish"),void o.close()}var r=t[0],n=t[1];o.emit("finish",r,n)}o.close()})),r.once("close",(function(){o.emit("finish"),o.close()}))};r.g.document.body?c():i.attachEvent("load",c)}o(c,n),c.enabled=function(){return a.enabled()},c.prototype.close=function(){this.ifr&&this.ifr.close(),this.removeAllListeners(),this.ifr=null},e.exports=c},3639:function(e,t,r){"use strict";var n=r(9622).v,o=r(2937),i=r(1803),a=r(9150),s=r(1278),c=r(2458),u=r(9431),l=r(9834),p=r(5263);function h(e,t){var r=this;n.call(this),setTimeout((function(){r.doXhr(e,t)}),0)}o(h,n),h._getReceiver=function(e,t,r){return r.sameOrigin?new p(t,c):s.enabled?new p(t,s):a.enabled&&r.sameScheme?new p(t,a):l.enabled()?new l(e,t):new p(t,u)},h.prototype.doXhr=function(e,t){var r=this,n=i.addPath(e,"/info");this.xo=h._getReceiver(e,n,t),this.timeoutRef=setTimeout((function(){r._cleanup(!1),r.emit("finish")}),h.timeout),this.xo.once("finish",(function(e,t){r._cleanup(!0),r.emit("finish",e,t)}))},h.prototype._cleanup=function(e){clearTimeout(this.timeoutRef),this.timeoutRef=null,!e&&this.xo&&this.xo.close(),this.xo=null},h.prototype.close=function(){this.removeAllListeners(),this._cleanup(!1)},h.timeout=8e3,e.exports=h},1637:function(e,t,r){"use strict";e.exports=r.g.location||{origin:"http://localhost:80",protocol:"http:",host:"localhost",port:80,href:"http://localhost/",hash:""}},608:function(e,t,r){"use strict";r(1953);var n,o=r(2296),i=r(2937),a=r(6032),s=r(6118),c=r(1803),u=r(6831),l=r(9404),p=r(7234),h=r(6626),d=r(7254),f=r(2789),m=r(6393),y=r(1637),g=r(5014),v=r(3385),E=r(3639);function _(e,t,r){if(!(this instanceof _))return new _(e,t,r);if(arguments.length<1)throw new TypeError("Failed to construct 'SockJS: 1 argument required, but only 0 present");m.call(this),this.readyState=_.CONNECTING,this.extensions="",this.protocol="",(r=r||{}).protocols_whitelist&&d.warn("'protocols_whitelist' is DEPRECATED. Use 'transports' instead."),this._transportsWhitelist=r.transports,this._transportOptions=r.transportOptions||{},this._timeout=r.timeout||0;var n=r.sessionId||8;if("function"==typeof n)this._generateSessionId=n;else{if("number"!=typeof n)throw new TypeError("If sessionId is used in the options, it needs to be a number or a function.");this._generateSessionId=function(){return a.string(n)}}this._server=r.server||a.numberString(1e3);var i=new o(e);if(!i.host||!i.protocol)throw new SyntaxError("The URL '"+e+"' is invalid");if(i.hash)throw new SyntaxError("The URL must not contain a fragment");if("http:"!==i.protocol&&"https:"!==i.protocol)throw new SyntaxError("The URL's scheme must be either 'http:' or 'https:'. '"+i.protocol+"' is not allowed.");var s="https:"===i.protocol;if("https:"===y.protocol&&!s&&!c.isLoopbackAddr(i.hostname))throw new Error("SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS");t?Array.isArray(t)||(t=[t]):t=[];var u=t.sort();u.forEach((function(e,t){if(!e)throw new SyntaxError("The protocols entry '"+e+"' is invalid.");if(t<u.length-1&&e===u[t+1])throw new SyntaxError("The protocols entry '"+e+"' is duplicated.")}));var l=c.getOrigin(y.href);this._origin=l?l.toLowerCase():null,i.set("pathname",i.pathname.replace(/\/+$/,"")),this.url=i.href,this.url,this._urlInfo={nullOrigin:!h.hasDomain(),sameOrigin:c.isOriginEqual(this.url,y.href),sameScheme:c.isSchemeEqual(this.url,y.href)},this._ir=new E(this.url,this._urlInfo),this._ir.once("finish",this._receiveInfo.bind(this))}function T(e){return 1e3===e||e>=3e3&&e<=4999}i(_,m),_.prototype.close=function(e,t){if(e&&!T(e))throw new Error("InvalidAccessError: Invalid code");if(t&&t.length>123)throw new SyntaxError("reason argument has an invalid length");this.readyState!==_.CLOSING&&this.readyState!==_.CLOSED&&this._close(e||1e3,t||"Normal closure",!0)},_.prototype.send=function(e){if("string"!=typeof e&&(e=""+e),this.readyState===_.CONNECTING)throw new Error("InvalidStateError: The connection has not been established yet");this.readyState===_.OPEN&&this._transport.send(s.quote(e))},_.version=r(9534),_.CONNECTING=0,_.OPEN=1,_.CLOSING=2,_.CLOSED=3,_.prototype._receiveInfo=function(e,t){if(this._ir=null,e){this._rto=this.countRTO(t),this._transUrl=e.base_url?e.base_url:this.url,e=p.extend(e,this._urlInfo);var r=n.filterToEnabled(this._transportsWhitelist,e);this._transports=r.main,this._transports.length,this._connect()}else this._close(1002,"Cannot connect to server")},_.prototype._connect=function(){for(var e=this._transports.shift();e;e=this._transports.shift()){if(e.transportName,e.needBody&&(!r.g.document.body||void 0!==r.g.document.readyState&&"complete"!==r.g.document.readyState&&"interactive"!==r.g.document.readyState))return this._transports.unshift(e),void u.attachEvent("load",this._connect.bind(this));var t=Math.max(this._timeout,this._rto*e.roundTrips||5e3);this._transportTimeoutId=setTimeout(this._transportTimeout.bind(this),t);var n=c.addPath(this._transUrl,"/"+this._server+"/"+this._generateSessionId()),o=this._transportOptions[e.transportName],i=new e(n,this._transUrl,o);return i.on("message",this._transportMessage.bind(this)),i.once("close",this._transportClose.bind(this)),i.transportName=e.transportName,void(this._transport=i)}this._close(2e3,"All transports failed",!1)},_.prototype._transportTimeout=function(){this.readyState===_.CONNECTING&&(this._transport&&this._transport.close(),this._transportClose(2007,"Transport timed out"))},_.prototype._transportMessage=function(e){var t,r=this,n=e.slice(0,1),o=e.slice(1);switch(n){case"o":return void this._open();case"h":return this.dispatchEvent(new f("heartbeat")),void this.transport}if(o)try{t=JSON.parse(o)}catch(e){}if(void 0!==t)switch(n){case"a":Array.isArray(t)&&t.forEach((function(e){r.transport,r.dispatchEvent(new v(e))}));break;case"m":this.transport,this.dispatchEvent(new v(t));break;case"c":Array.isArray(t)&&2===t.length&&this._close(t[0],t[1],!0)}},_.prototype._transportClose=function(e,t){this.transport,this._transport&&(this._transport.removeAllListeners(),this._transport=null,this.transport=null),T(e)||2e3===e||this.readyState!==_.CONNECTING?this._close(e,t):this._connect()},_.prototype._open=function(){this._transport&&this._transport.transportName,this.readyState,this.readyState===_.CONNECTING?(this._transportTimeoutId&&(clearTimeout(this._transportTimeoutId),this._transportTimeoutId=null),this.readyState=_.OPEN,this.transport=this._transport.transportName,this.dispatchEvent(new f("open")),this.transport):this._close(1006,"Server lost session")},_.prototype._close=function(e,t,r){this.transport,this.readyState;var n=!1;if(this._ir&&(n=!0,this._ir.close(),this._ir=null),this._transport&&(this._transport.close(),this._transport=null,this.transport=null),this.readyState===_.CLOSED)throw new Error("InvalidStateError: SockJS has already been closed");this.readyState=_.CLOSING,setTimeout(function(){this.readyState=_.CLOSED,n&&this.dispatchEvent(new f("error"));var o=new g("close");o.wasClean=r||!1,o.code=e||1e3,o.reason=t,this.dispatchEvent(o),this.onmessage=this.onclose=this.onerror=null}.bind(this),0)},_.prototype.countRTO=function(e){return e>100?4*e:300+e},e.exports=function(e){return n=l(e),r(317)(_,e),_}},1953:function(){"use strict";var e,t=Array.prototype,r=Object.prototype,n=Function.prototype,o=String.prototype,i=t.slice,a=r.toString,s=function(e){return"[object Function]"===r.toString.call(e)},c=function(e){return"[object String]"===a.call(e)},u=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(e){return!1}}();e=u?function(e,t,r,n){!n&&t in e||Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:r})}:function(e,t,r,n){!n&&t in e||(e[t]=r)};var l=function(t,n,o){for(var i in n)r.hasOwnProperty.call(n,i)&&e(t,i,n[i],o)},p=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)};function h(e){var t=+e;return t!=t?t=0:0!==t&&t!==1/0&&t!==-1/0&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t}function d(){}l(n,{bind:function(e){var t=this;if(!s(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var r=i.call(arguments,1),n=function(){if(this instanceof u){var n=t.apply(this,r.concat(i.call(arguments)));return Object(n)===n?n:this}return t.apply(e,r.concat(i.call(arguments)))},o=Math.max(0,t.length-r.length),a=[],c=0;c<o;c++)a.push("$"+c);var u=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this, arguments); }")(n);return t.prototype&&(d.prototype=t.prototype,u.prototype=new d,d.prototype=null),u}}),l(Array,{isArray:function(e){return"[object Array]"===a.call(e)}});var f,m,y,g=Object("a"),v="a"!==g[0]||!(0 in g);l(t,{forEach:function(e){var t=p(this),r=v&&c(this)?this.split(""):t,n=arguments[1],o=-1,i=r.length>>>0;if(!s(e))throw new TypeError;for(;++o<i;)o in r&&e.call(n,r[o],o,t)}},(f=t.forEach,m=!0,y=!0,f&&(f.call("foo",(function(e,t,r){"object"!=typeof r&&(m=!1)})),f.call([1],(function(){y="string"==typeof this}),"x")),!(f&&m&&y)));var E=Array.prototype.indexOf&&-1!==[0,1].indexOf(1,2);l(t,{indexOf:function(e){var t=v&&c(this)?this.split(""):p(this),r=t.length>>>0;if(!r)return-1;var n=0;for(arguments.length>1&&(n=h(arguments[1])),n=n>=0?n:Math.max(0,r+n);n<r;n++)if(n in t&&t[n]===e)return n;return-1}},E);var _,T=o.split;2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?(_=void 0===/()??/.exec("")[1],o.split=function(e,r){var n=this;if(void 0===e&&0===r)return[];if("[object RegExp]"!==a.call(e))return T.call(this,e,r);var o,i,s,c,u=[],l=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":""),p=0;for(e=new RegExp(e.source,l+"g"),n+="",_||(o=new RegExp("^"+e.source+"$(?!\\s)",l)),r=void 0===r?-1>>>0:r>>>0;(i=e.exec(n))&&!((s=i.index+i[0].length)>p&&(u.push(n.slice(p,i.index)),!_&&i.length>1&&i[0].replace(o,(function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(i[e]=void 0)})),i.length>1&&i.index<n.length&&t.push.apply(u,i.slice(1)),c=i[0].length,p=s,u.length>=r));)e.lastIndex===i.index&&e.lastIndex++;return p===n.length?!c&&e.test("")||u.push(""):u.push(n.slice(p)),u.length>r?u.slice(0,r):u}):"0".split(void 0,0).length&&(o.split=function(e,t){return void 0===e&&0===t?[]:T.call(this,e,t)});var O=o.substr;l(o,{substr:function(e,t){return O.call(this,e<0&&(e=this.length+e)<0?0:e,t)}},"".substr&&"b"!=="0b".substr(-1))},3683:function(e,t,r){"use strict";e.exports=[r(9712),r(8690),r(3358),r(8213),r(4930)(r(8213)),r(651),r(4930)(r(651)),r(3900),r(6685),r(4930)(r(3900)),r(7911)]},771:function(e,t,r){"use strict";var n=r(9622).v,o=r(2937),i=r(6831),a=r(1803),s=r.g.XMLHttpRequest;function c(e,t,r,o){var i=this;n.call(this),setTimeout((function(){i._start(e,t,r,o)}),0)}o(c,n),c.prototype._start=function(e,t,r,n){var o=this;try{this.xhr=new s}catch(e){}if(!this.xhr)return this.emit("finish",0,"no xhr support"),void this._cleanup();t=a.addQuery(t,"t="+ +new Date),this.unloadRef=i.unloadAdd((function(){o._cleanup(!0)}));try{this.xhr.open(e,t,!0),this.timeout&&"timeout"in this.xhr&&(this.xhr.timeout=this.timeout,this.xhr.ontimeout=function(){o.emit("finish",0,""),o._cleanup(!1)})}catch(e){return this.emit("finish",0,""),void this._cleanup(!1)}if(n&&n.noCredentials||!c.supportsCORS||(this.xhr.withCredentials=!0),n&&n.headers)for(var u in n.headers)this.xhr.setRequestHeader(u,n.headers[u]);this.xhr.onreadystatechange=function(){if(o.xhr){var e,t,r=o.xhr;switch(r.readyState,r.readyState){case 3:try{t=r.status,e=r.responseText}catch(e){}1223===t&&(t=204),200===t&&e&&e.length>0&&o.emit("chunk",t,e);break;case 4:1223===(t=r.status)&&(t=204),12005!==t&&12029!==t||(t=0),r.responseText,o.emit("finish",t,r.responseText),o._cleanup(!1)}}};try{o.xhr.send(r)}catch(e){o.emit("finish",0,""),o._cleanup(!1)}},c.prototype._cleanup=function(e){if(this.xhr){if(this.removeAllListeners(),i.unloadDel(this.unloadRef),this.xhr.onreadystatechange=function(){},this.xhr.ontimeout&&(this.xhr.ontimeout=null),e)try{this.xhr.abort()}catch(e){}this.unloadRef=this.xhr=null}},c.prototype.close=function(){this._cleanup(!0)},c.enabled=!!s;var u=["Active"].concat("Object").join("X");!c.enabled&&u in r.g&&(s=function(){try{return new r.g[u]("Microsoft.XMLHTTP")}catch(e){return null}},c.enabled=!!new s);var l=!1;try{l="withCredentials"in new s}catch(e){}c.supportsCORS=l,e.exports=c},1494:function(e,t,r){e.exports=r.g.EventSource},3485:function(e,t,r){"use strict";var n=r.g.WebSocket||r.g.MozWebSocket;e.exports=n?function(e){return new n(e)}:void 0},8213:function(e,t,r){"use strict";var n=r(2937),o=r(2261),i=r(5765),a=r(1278),s=r(1494);function c(e){if(!c.enabled())throw new Error("Transport created when disabled");o.call(this,e,"/eventsource",i,a)}n(c,o),c.enabled=function(){return!!s},c.transportName="eventsource",c.roundTrips=2,e.exports=c},651:function(e,t,r){"use strict";var n=r(2937),o=r(6119),i=r(2458),a=r(2261);function s(e){if(!o.enabled)throw new Error("Transport created when disabled");a.call(this,e,"/htmlfile",o,i)}n(s,a),s.enabled=function(e){return o.enabled&&e.sameOrigin},s.transportName="htmlfile",s.roundTrips=2,e.exports=s},6010:function(e,t,r){"use strict";var n=r(2937),o=r(9622).v,i=r(9534),a=r(1803),s=r(8734),c=r(6831),u=r(6032);function l(e,t,r){if(!l.enabled())throw new Error("Transport created when disabled");o.call(this);var n=this;this.origin=a.getOrigin(r),this.baseUrl=r,this.transUrl=t,this.transport=e,this.windowId=u.string(8);var i=a.addPath(r,"/iframe.html")+"#"+this.windowId;this.iframeObj=s.createIframe(i,(function(e){n.emit("close",1006,"Unable to load an iframe ("+e+")"),n.close()})),this.onmessageCallback=this._message.bind(this),c.attachEvent("message",this.onmessageCallback)}n(l,o),l.prototype.close=function(){if(this.removeAllListeners(),this.iframeObj){c.detachEvent("message",this.onmessageCallback);try{this.postMessage("c")}catch(e){}this.iframeObj.cleanup(),this.iframeObj=null,this.onmessageCallback=this.iframeObj=null}},l.prototype._message=function(e){if(e.data,!a.isOriginEqual(e.origin,this.origin))return e.origin,void this.origin;var t;try{t=JSON.parse(e.data)}catch(t){return void e.data}if(t.windowId!==this.windowId)return t.windowId,void this.windowId;switch(t.type){case"s":this.iframeObj.loaded(),this.postMessage("s",JSON.stringify([i,this.transport,this.transUrl,this.baseUrl]));break;case"t":this.emit("message",t.data);break;case"c":var r;try{r=JSON.parse(t.data)}catch(e){return void t.data}this.emit("close",r[0],r[1]),this.close()}},l.prototype.postMessage=function(e,t){this.iframeObj.post(JSON.stringify({windowId:this.windowId,type:e,data:t||""}),this.origin)},l.prototype.send=function(e){this.postMessage("m",e)},l.enabled=function(){return s.iframeEnabled},l.transportName="iframe",l.roundTrips=2,e.exports=l},7911:function(e,t,r){"use strict";var n=r(2937),o=r(4430),i=r(8003),a=r(605);function s(e){if(!s.enabled())throw new Error("Transport created when disabled");o.call(this,e,"/jsonp",a,i)}n(s,o),s.enabled=function(){return!!r.g.document},s.transportName="jsonp-polling",s.roundTrips=1,s.needBody=!0,e.exports=s},2261:function(e,t,r){"use strict";var n=r(2937),o=r(1803),i=r(4430);function a(e,t,r,n){i.call(this,e,t,function(e){return function(t,r,n){var i={};"string"==typeof r&&(i.headers={"Content-type":"text/plain"});var a=o.addPath(t,"/xhr_send"),s=new e("POST",a,r,i);return s.once("finish",(function(e){if(s=null,200!==e&&204!==e)return n(new Error("http status "+e));n()})),function(){s.close(),s=null;var e=new Error("Aborted");e.code=1e3,n(e)}}}(n),r,n)}n(a,i),e.exports=a},3626:function(e,t,r){"use strict";var n=r(2937),o=r(9622).v;function i(e,t){o.call(this),this.sendBuffer=[],this.sender=t,this.url=e}n(i,o),i.prototype.send=function(e){this.sendBuffer.push(e),this.sendStop||this.sendSchedule()},i.prototype.sendScheduleWait=function(){var e,t=this;this.sendStop=function(){t.sendStop=null,clearTimeout(e)},e=setTimeout((function(){t.sendStop=null,t.sendSchedule()}),25)},i.prototype.sendSchedule=function(){this.sendBuffer.length;var e=this;if(this.sendBuffer.length>0){var t="["+this.sendBuffer.join(",")+"]";this.sendStop=this.sender(this.url,t,(function(t){e.sendStop=null,t?(e.emit("close",t.code||1006,"Sending error: "+t),e.close()):e.sendScheduleWait()})),this.sendBuffer=[]}},i.prototype._cleanup=function(){this.removeAllListeners()},i.prototype.close=function(){this._cleanup(),this.sendStop&&(this.sendStop(),this.sendStop=null)},e.exports=i},4930:function(e,t,r){"use strict";var n=r(2937),o=r(6010),i=r(7234);e.exports=function(e){function t(t,r){o.call(this,e.transportName,t,r)}return n(t,o),t.enabled=function(t,n){if(!r.g.document)return!1;var a=i.extend({},n);return a.sameOrigin=!0,e.enabled(a)&&o.enabled()},t.transportName="iframe-"+e.transportName,t.needBody=!0,t.roundTrips=o.roundTrips+e.roundTrips-1,t.facadeTransport=e,t}},4408:function(e,t,r){"use strict";var n=r(2937),o=r(9622).v;function i(e,t,r){o.call(this),this.Receiver=e,this.receiveUrl=t,this.AjaxObject=r,this._scheduleReceiver()}n(i,o),i.prototype._scheduleReceiver=function(){var e=this,t=this.poll=new this.Receiver(this.receiveUrl,this.AjaxObject);t.on("message",(function(t){e.emit("message",t)})),t.once("close",(function(r,n){e.pollIsClosing,e.poll=t=null,e.pollIsClosing||("network"===n?e._scheduleReceiver():(e.emit("close",r||1006,n),e.removeAllListeners()))}))},i.prototype.abort=function(){this.removeAllListeners(),this.pollIsClosing=!0,this.poll&&this.poll.abort()},e.exports=i},4430:function(e,t,r){"use strict";var n=r(2937),o=r(1803),i=r(3626),a=r(4408);function s(e,t,r,n,s){var c=o.addPath(e,t),u=this;i.call(this,e,r),this.poll=new a(n,c,s),this.poll.on("message",(function(e){u.emit("message",e)})),this.poll.once("close",(function(e,t){u.poll=null,u.emit("close",e,t),u.close()}))}n(s,i),s.prototype.close=function(){i.prototype.close.call(this),this.removeAllListeners(),this.poll&&(this.poll.abort(),this.poll=null)},e.exports=s},5765:function(e,t,r){"use strict";var n=r(2937),o=r(9622).v,i=r(1494);function a(e){o.call(this);var t=this,r=this.es=new i(e);r.onmessage=function(e){e.data,t.emit("message",decodeURI(e.data))},r.onerror=function(e){r.readyState;var n=2!==r.readyState?"network":"permanent";t._cleanup(),t._close(n)}}n(a,o),a.prototype.abort=function(){this._cleanup(),this._close("user")},a.prototype._cleanup=function(){var e=this.es;e&&(e.onmessage=e.onerror=null,e.close(),this.es=null)},a.prototype._close=function(e){var t=this;setTimeout((function(){t.emit("close",null,e),t.removeAllListeners()}),200)},e.exports=a},6119:function(e,t,r){"use strict";var n=r(2937),o=r(8734),i=r(1803),a=r(9622).v,s=r(6032);function c(e){a.call(this);var t=this;o.polluteGlobalNamespace(),this.id="a"+s.string(6),e=i.addQuery(e,"c="+decodeURIComponent(o.WPrefix+"."+this.id)),c.htmlfileEnabled;var n=c.htmlfileEnabled?o.createHtmlfile:o.createIframe;r.g[o.WPrefix][this.id]={start:function(){t.iframeObj.loaded()},message:function(e){t.emit("message",e)},stop:function(){t._cleanup(),t._close("network")}},this.iframeObj=n(e,(function(){t._cleanup(),t._close("permanent")}))}n(c,a),c.prototype.abort=function(){this._cleanup(),this._close("user")},c.prototype._cleanup=function(){this.iframeObj&&(this.iframeObj.cleanup(),this.iframeObj=null),delete r.g[o.WPrefix][this.id]},c.prototype._close=function(e){this.emit("close",null,e),this.removeAllListeners()},c.htmlfileEnabled=!1;var u=["Active"].concat("Object").join("X");if(u in r.g)try{c.htmlfileEnabled=!!new r.g[u]("htmlfile")}catch(e){}c.enabled=c.htmlfileEnabled||o.iframeEnabled,e.exports=c},8003:function(e,t,r){"use strict";var n=r(8734),o=r(6032),i=r(6626),a=r(1803),s=r(2937),c=r(9622).v;function u(e){var t=this;c.call(this),n.polluteGlobalNamespace(),this.id="a"+o.string(6);var i=a.addQuery(e,"c="+encodeURIComponent(n.WPrefix+"."+this.id));r.g[n.WPrefix][this.id]=this._callback.bind(this),this._createScript(i),this.timeoutId=setTimeout((function(){t._abort(new Error("JSONP script loaded abnormally (timeout)"))}),u.timeout)}s(u,c),u.prototype.abort=function(){if(r.g[n.WPrefix][this.id]){var e=new Error("JSONP user aborted read");e.code=1e3,this._abort(e)}},u.timeout=35e3,u.scriptErrorTimeout=1e3,u.prototype._callback=function(e){this._cleanup(),this.aborting||(e&&this.emit("message",e),this.emit("close",null,"network"),this.removeAllListeners())},u.prototype._abort=function(e){this._cleanup(),this.aborting=!0,this.emit("close",e.code,e.message),this.removeAllListeners()},u.prototype._cleanup=function(){if(clearTimeout(this.timeoutId),this.script2&&(this.script2.parentNode.removeChild(this.script2),this.script2=null),this.script){var e=this.script;e.parentNode.removeChild(e),e.onreadystatechange=e.onerror=e.onload=e.onclick=null,this.script=null}delete r.g[n.WPrefix][this.id]},u.prototype._scriptError=function(){var e=this;this.errorTimer||(this.errorTimer=setTimeout((function(){e.loadedOkay||e._abort(new Error("JSONP script loaded abnormally (onerror)"))}),u.scriptErrorTimeout))},u.prototype._createScript=function(e){var t,n=this,a=this.script=r.g.document.createElement("script");if(a.id="a"+o.string(8),a.src=e,a.type="text/javascript",a.charset="UTF-8",a.onerror=this._scriptError.bind(this),a.onload=function(){n._abort(new Error("JSONP script loaded abnormally (onload)"))},a.onreadystatechange=function(){if(a.readyState,/loaded|closed/.test(a.readyState)){if(a&&a.htmlFor&&a.onclick){n.loadedOkay=!0;try{a.onclick()}catch(e){}}a&&n._abort(new Error("JSONP script loaded abnormally (onreadystatechange)"))}},void 0===a.async&&r.g.document.attachEvent)if(i.isOpera())(t=this.script2=r.g.document.createElement("script")).text="try{var a = document.getElementById('"+a.id+"'); if(a)a.onerror();}catch(x){};",a.async=t.async=!1;else{try{a.htmlFor=a.id,a.event="onclick"}catch(e){}a.async=!0}void 0!==a.async&&(a.async=!0);var s=r.g.document.getElementsByTagName("head")[0];s.insertBefore(a,s.firstChild),t&&s.insertBefore(t,s.firstChild)},e.exports=u},6960:function(e,t,r){"use strict";var n=r(2937),o=r(9622).v;function i(e,t){o.call(this);var r=this;this.bufferPosition=0,this.xo=new t("POST",e,null),this.xo.on("chunk",this._chunkHandler.bind(this)),this.xo.once("finish",(function(e,t){r._chunkHandler(e,t),r.xo=null;var n=200===e?"network":"permanent";r.emit("close",null,n),r._cleanup()}))}n(i,o),i.prototype._chunkHandler=function(e,t){if(200===e&&t)for(var r=-1;;this.bufferPosition+=r+1){var n=t.slice(this.bufferPosition);if(-1===(r=n.indexOf("\n")))break;var o=n.slice(0,r);o&&this.emit("message",o)}},i.prototype._cleanup=function(){this.removeAllListeners()},i.prototype.abort=function(){this.xo&&(this.xo.close(),this.emit("close",null,"user"),this.xo=null),this._cleanup()},e.exports=i},605:function(e,t,r){"use strict";var n,o,i=r(6032),a=r(1803);e.exports=function(e,t,s){n||((n=r.g.document.createElement("form")).style.display="none",n.style.position="absolute",n.method="POST",n.enctype="application/x-www-form-urlencoded",n.acceptCharset="UTF-8",(o=r.g.document.createElement("textarea")).name="d",n.appendChild(o),r.g.document.body.appendChild(n));var c="a"+i.string(8);n.target=c,n.action=a.addQuery(a.addPath(e,"/jsonp_send"),"i="+c);var u=function(e){try{return r.g.document.createElement('<iframe name="'+e+'">')}catch(n){var t=r.g.document.createElement("iframe");return t.name=e,t}}(c);u.id=c,u.style.display="none",n.appendChild(u);try{o.value=t}catch(e){}n.submit();var l=function(e){u.onerror&&(u.onreadystatechange=u.onerror=u.onload=null,setTimeout((function(){u.parentNode.removeChild(u),u=null}),500),o.value="",s(e))};return u.onerror=function(){l()},u.onload=function(){l()},u.onreadystatechange=function(e){u.readyState,"complete"===u.readyState&&l()},function(){l(new Error("Aborted"))}}},9150:function(e,t,r){"use strict";var n=r(9622).v,o=r(2937),i=r(6831),a=r(6626),s=r(1803);function c(e,t,r){var o=this;n.call(this),setTimeout((function(){o._start(e,t,r)}),0)}o(c,n),c.prototype._start=function(e,t,n){var o=this,a=new r.g.XDomainRequest;t=s.addQuery(t,"t="+ +new Date),a.onerror=function(){o._error()},a.ontimeout=function(){o._error()},a.onprogress=function(){a.responseText,o.emit("chunk",200,a.responseText)},a.onload=function(){o.emit("finish",200,a.responseText),o._cleanup(!1)},this.xdr=a,this.unloadRef=i.unloadAdd((function(){o._cleanup(!0)}));try{this.xdr.open(e,t),this.timeout&&(this.xdr.timeout=this.timeout),this.xdr.send(n)}catch(e){this._error()}},c.prototype._error=function(){this.emit("finish",0,""),this._cleanup(!1)},c.prototype._cleanup=function(e){if(this.xdr){if(this.removeAllListeners(),i.unloadDel(this.unloadRef),this.xdr.ontimeout=this.xdr.onerror=this.xdr.onprogress=this.xdr.onload=null,e)try{this.xdr.abort()}catch(e){}this.unloadRef=this.xdr=null}},c.prototype.close=function(){this._cleanup(!0)},c.enabled=!(!r.g.XDomainRequest||!a.hasDomain()),e.exports=c},1278:function(e,t,r){"use strict";var n=r(2937),o=r(771);function i(e,t,r,n){o.call(this,e,t,r,n)}n(i,o),i.enabled=o.enabled&&o.supportsCORS,e.exports=i},9431:function(e,t,r){"use strict";var n=r(9622).v;function o(){var e=this;n.call(this),this.to=setTimeout((function(){e.emit("finish",200,"{}")}),o.timeout)}r(2937)(o,n),o.prototype.close=function(){clearTimeout(this.to)},o.timeout=2e3,e.exports=o},2458:function(e,t,r){"use strict";var n=r(2937),o=r(771);function i(e,t,r){o.call(this,e,t,r,{noCredentials:!0})}n(i,o),i.enabled=o.enabled,e.exports=i},9712:function(e,t,r){"use strict";var n=r(6831),o=r(1803),i=r(2937),a=r(9622).v,s=r(3485);function c(e,t,r){if(!c.enabled())throw new Error("Transport created when disabled");a.call(this);var i=this,u=o.addPath(e,"/websocket");u="https"===u.slice(0,5)?"wss"+u.slice(5):"ws"+u.slice(4),this.url=u,this.ws=new s(this.url,[],r),this.ws.onmessage=function(e){e.data,i.emit("message",e.data)},this.unloadRef=n.unloadAdd((function(){i.ws.close()})),this.ws.onclose=function(e){e.code,e.reason,i.emit("close",e.code,e.reason),i._cleanup()},this.ws.onerror=function(e){i.emit("close",1006,"WebSocket connection broken"),i._cleanup()}}i(c,a),c.prototype.send=function(e){var t="["+e+"]";this.ws.send(t)},c.prototype.close=function(){var e=this.ws;this._cleanup(),e&&e.close()},c.prototype._cleanup=function(){var e=this.ws;e&&(e.onmessage=e.onclose=e.onerror=null),n.unloadDel(this.unloadRef),this.unloadRef=this.ws=null,this.removeAllListeners()},c.enabled=function(){return!!s},c.transportName="websocket",c.roundTrips=2,e.exports=c},6685:function(e,t,r){"use strict";var n=r(2937),o=r(2261),i=r(3358),a=r(6960),s=r(9150);function c(e){if(!s.enabled)throw new Error("Transport created when disabled");o.call(this,e,"/xhr",a,s)}n(c,o),c.enabled=i.enabled,c.transportName="xdr-polling",c.roundTrips=2,e.exports=c},3358:function(e,t,r){"use strict";var n=r(2937),o=r(2261),i=r(6960),a=r(9150);function s(e){if(!a.enabled)throw new Error("Transport created when disabled");o.call(this,e,"/xhr_streaming",i,a)}n(s,o),s.enabled=function(e){return!e.cookie_needed&&!e.nullOrigin&&a.enabled&&e.sameScheme},s.transportName="xdr-streaming",s.roundTrips=2,e.exports=s},3900:function(e,t,r){"use strict";var n=r(2937),o=r(2261),i=r(6960),a=r(1278),s=r(2458);function c(e){if(!s.enabled&&!a.enabled)throw new Error("Transport created when disabled");o.call(this,e,"/xhr",i,a)}n(c,o),c.enabled=function(e){return!e.nullOrigin&&(!(!s.enabled||!e.sameOrigin)||a.enabled)},c.transportName="xhr-polling",c.roundTrips=2,e.exports=c},8690:function(e,t,r){"use strict";var n=r(2937),o=r(2261),i=r(6960),a=r(1278),s=r(2458),c=r(6626);function u(e){if(!s.enabled&&!a.enabled)throw new Error("Transport created when disabled");o.call(this,e,"/xhr_streaming",i,a)}n(u,o),u.enabled=function(e){return!e.nullOrigin&&!c.isOpera()&&a.enabled},u.transportName="xhr-streaming",u.roundTrips=2,u.needBody=!!r.g.document,e.exports=u},971:function(e,t,r){"use strict";r.g.crypto&&r.g.crypto.getRandomValues?e.exports.randomBytes=function(e){var t=new Uint8Array(e);return r.g.crypto.getRandomValues(t),t}:e.exports.randomBytes=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=Math.floor(256*Math.random());return t}},6626:function(e,t,r){"use strict";e.exports={isOpera:function(){return r.g.navigator&&/opera/i.test(r.g.navigator.userAgent)},isKonqueror:function(){return r.g.navigator&&/konqueror/i.test(r.g.navigator.userAgent)},hasDomain:function(){if(!r.g.document)return!0;try{return!!r.g.document.domain}catch(e){return!1}}}},6118:function(e){"use strict";var t,r=/[\x00-\x1f\ud800-\udfff\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0b5c-\u0b5d\u0e38-\u0e39\u0f43\u0f4d\u0f52\u0f57\u0f5c\u0f69\u0f72-\u0f76\u0f78\u0f80-\u0f83\u0f93\u0f9d\u0fa2\u0fa7\u0fac\u0fb9\u1939-\u193a\u1a17\u1b6b\u1cda-\u1cdb\u1dc0-\u1dcf\u1dfc\u1dfe\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d\u1fbb\u1fbe\u1fc9\u1fcb\u1fd3\u1fdb\u1fe3\u1feb\u1fee-\u1fef\u1ff9\u1ffb\u1ffd\u2000-\u2001\u20d0-\u20d1\u20d4-\u20d7\u20e7-\u20e9\u2126\u212a-\u212b\u2329-\u232a\u2adc\u302b-\u302c\uaab2-\uaab3\uf900-\ufa0d\ufa10\ufa12\ufa15-\ufa1e\ufa20\ufa22\ufa25-\ufa26\ufa2a-\ufa2d\ufa30-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufb4e\ufff0-\uffff]/g;e.exports={quote:function(e){var n=JSON.stringify(e);return r.lastIndex=0,r.test(n)?(t||(t=function(e){var t,r={},n=[];for(t=0;t<65536;t++)n.push(String.fromCharCode(t));return e.lastIndex=0,n.join("").replace(e,(function(e){return r[e]="\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4),""})),e.lastIndex=0,r}(r)),n.replace(r,(function(e){return t[e]}))):n}}},6831:function(e,t,r){"use strict";var n=r(6032),o={},i=!1,a=r.g.chrome&&r.g.chrome.app&&r.g.chrome.app.runtime;e.exports={attachEvent:function(e,t){void 0!==r.g.addEventListener?r.g.addEventListener(e,t,!1):r.g.document&&r.g.attachEvent&&(r.g.document.attachEvent("on"+e,t),r.g.attachEvent("on"+e,t))},detachEvent:function(e,t){void 0!==r.g.addEventListener?r.g.removeEventListener(e,t,!1):r.g.document&&r.g.detachEvent&&(r.g.document.detachEvent("on"+e,t),r.g.detachEvent("on"+e,t))},unloadAdd:function(e){if(a)return null;var t=n.string(8);return o[t]=e,i&&setTimeout(this.triggerUnloadCallbacks,0),t},unloadDel:function(e){e in o&&delete o[e]},triggerUnloadCallbacks:function(){for(var e in o)o[e](),delete o[e]}},a||e.exports.attachEvent("unload",(function(){i||(i=!0,e.exports.triggerUnloadCallbacks())}))},8734:function(e,t,r){"use strict";var n=r(6831),o=r(6626);e.exports={WPrefix:"_jp",currentWindowId:null,polluteGlobalNamespace:function(){e.exports.WPrefix in r.g||(r.g[e.exports.WPrefix]={})},postMessage:function(t,n){r.g.parent!==r.g&&r.g.parent.postMessage(JSON.stringify({windowId:e.exports.currentWindowId,type:t,data:n||""}),"*")},createIframe:function(e,t){var o,i,a=r.g.document.createElement("iframe"),s=function(){clearTimeout(o);try{a.onload=null}catch(e){}a.onerror=null},c=function(){a&&(s(),setTimeout((function(){a&&a.parentNode.removeChild(a),a=null}),0),n.unloadDel(i))},u=function(e){a&&(c(),t(e))};return a.src=e,a.style.display="none",a.style.position="absolute",a.onerror=function(){u("onerror")},a.onload=function(){clearTimeout(o),o=setTimeout((function(){u("onload timeout")}),2e3)},r.g.document.body.appendChild(a),o=setTimeout((function(){u("timeout")}),15e3),i=n.unloadAdd(c),{post:function(e,t){setTimeout((function(){try{a&&a.contentWindow&&a.contentWindow.postMessage(e,t)}catch(e){}}),0)},cleanup:c,loaded:s}},createHtmlfile:function(t,o){var i,a,s,c=["Active"].concat("Object").join("X"),u=new r.g[c]("htmlfile"),l=function(){clearTimeout(i),s.onerror=null},p=function(){u&&(l(),n.unloadDel(a),s.parentNode.removeChild(s),s=u=null,CollectGarbage())},h=function(e){u&&(p(),o(e))};u.open(),u.write('<html><script>document.domain="'+r.g.document.domain+'";<\/script></html>'),u.close(),u.parentWindow[e.exports.WPrefix]=r.g[e.exports.WPrefix];var d=u.createElement("div");return u.body.appendChild(d),s=u.createElement("iframe"),d.appendChild(s),s.src=t,s.onerror=function(){h("onerror")},i=setTimeout((function(){h("timeout")}),15e3),a=n.unloadAdd(p),{post:function(e,t){try{setTimeout((function(){s&&s.contentWindow&&s.contentWindow.postMessage(e,t)}),0)}catch(e){}},cleanup:p,loaded:l}}},e.exports.iframeEnabled=!1,r.g.document&&(e.exports.iframeEnabled=("function"==typeof r.g.postMessage||"object"==typeof r.g.postMessage)&&!o.isKonqueror())},7254:function(e,t,r){"use strict";var n={};["log","debug","warn"].forEach((function(e){var t;try{t=r.g.console&&r.g.console[e]&&r.g.console[e].apply}catch(e){}n[e]=t?function(){return r.g.console[e].apply(r.g.console,arguments)}:"log"===e?function(){}:n.log})),e.exports=n},7234:function(e){"use strict";e.exports={isObject:function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},extend:function(e){if(!this.isObject(e))return e;for(var t,r,n=1,o=arguments.length;n<o;n++)for(r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}}},6032:function(e,t,r){"use strict";var n=r(971),o="abcdefghijklmnopqrstuvwxyz012345";e.exports={string:function(e){for(var t=o.length,r=n.randomBytes(e),i=[],a=0;a<e;a++)i.push(o.substr(r[a]%t,1));return i.join("")},number:function(e){return Math.floor(Math.random()*e)},numberString:function(e){var t=(""+(e-1)).length;return(new Array(t+1).join("0")+this.number(e)).slice(-t)}}},9404:function(e){"use strict";e.exports=function(e){return{filterToEnabled:function(t,r){var n={main:[],facade:[]};return t?"string"==typeof t&&(t=[t]):t=[],e.forEach((function(e){e&&("websocket"===e.transportName&&!1===r.websocket||(t.length&&-1===t.indexOf(e.transportName)?e.transportName:e.enabled(r)?(e.transportName,n.main.push(e),e.facadeTransport&&n.facade.push(e.facadeTransport)):e.transportName))})),n}}}},1803:function(e,t,r){"use strict";var n=r(2296);e.exports={getOrigin:function(e){if(!e)return null;var t=new n(e);if("file:"===t.protocol)return null;var r=t.port;return r||(r="https:"===t.protocol?"443":"80"),t.protocol+"//"+t.hostname+":"+r},isOriginEqual:function(e,t){return this.getOrigin(e)===this.getOrigin(t)},isSchemeEqual:function(e,t){return e.split(":")[0]===t.split(":")[0]},addPath:function(e,t){var r=e.split("?");return r[0]+t+(r[1]?"?"+r[1]:"")},addQuery:function(e,t){return e+(-1===e.indexOf("?")?"?"+t:"&"+t)},isLoopbackAddr:function(e){return/^127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(e)||/^\[::1\]$/.test(e)}}},9534:function(e){e.exports="1.6.1"},2296:function(e,t,r){"use strict";var n=r(1384),o=r(8878),i=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a=/[\n\r\t]/g,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,l=/^[a-zA-Z]:/;function p(e){return(e||"").toString().replace(i,"")}var h=[["#","hash"],["?","query"],function(e,t){return m(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],d={hash:1,query:1};function f(e){var t,n=("undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{}).location||{},o={},i=typeof(e=e||n);if("blob:"===e.protocol)o=new g(unescape(e.pathname),{});else if("string"===i)for(t in o=new g(e,{}),d)delete o[t];else if("object"===i){for(t in e)t in d||(o[t]=e[t]);void 0===o.slashes&&(o.slashes=s.test(e.href))}return o}function m(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function y(e,t){e=(e=p(e)).replace(a,""),t=t||{};var r,n=u.exec(e),o=n[1]?n[1].toLowerCase():"",i=!!n[2],s=!!n[3],c=0;return i?s?(r=n[2]+n[3]+n[4],c=n[2].length+n[3].length):(r=n[2]+n[4],c=n[2].length):s?(r=n[3]+n[4],c=n[3].length):r=n[4],"file:"===o?c>=2&&(r=r.slice(2)):m(o)?r=n[4]:o?i&&(r=r.slice(2)):c>=2&&m(t.protocol)&&(r=n[4]),{protocol:o,slashes:i||m(o),slashesCount:c,rest:r}}function g(e,t,r){if(e=(e=p(e)).replace(a,""),!(this instanceof g))return new g(e,t,r);var i,s,c,u,d,v,E=h.slice(),_=typeof t,T=this,O=0;for("object"!==_&&"string"!==_&&(r=t,t=null),r&&"function"!=typeof r&&(r=o.parse),i=!(s=y(e||"",t=f(t))).protocol&&!s.slashes,T.slashes=s.slashes||i&&t.slashes,T.protocol=s.protocol||t.protocol||"",e=s.rest,("file:"===s.protocol&&(2!==s.slashesCount||l.test(e))||!s.slashes&&(s.protocol||s.slashesCount<2||!m(T.protocol)))&&(E[3]=[/(.*)/,"pathname"]);O<E.length;O++)"function"!=typeof(u=E[O])?(c=u[0],v=u[1],c!=c?T[v]=e:"string"==typeof c?~(d="@"===c?e.lastIndexOf(c):e.indexOf(c))&&("number"==typeof u[2]?(T[v]=e.slice(0,d),e=e.slice(d+u[2])):(T[v]=e.slice(d),e=e.slice(0,d))):(d=c.exec(e))&&(T[v]=d[1],e=e.slice(0,d.index)),T[v]=T[v]||i&&u[3]&&t[v]||"",u[4]&&(T[v]=T[v].toLowerCase())):e=u(e,T);r&&(T.query=r(T.query)),i&&t.slashes&&"/"!==T.pathname.charAt(0)&&(""!==T.pathname||""!==t.pathname)&&(T.pathname=function(e,t){if(""===e)return t;for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),n=r.length,o=r[n-1],i=!1,a=0;n--;)"."===r[n]?r.splice(n,1):".."===r[n]?(r.splice(n,1),a++):a&&(0===n&&(i=!0),r.splice(n,1),a--);return i&&r.unshift(""),"."!==o&&".."!==o||r.push(""),r.join("/")}(T.pathname,t.pathname)),"/"!==T.pathname.charAt(0)&&m(T.protocol)&&(T.pathname="/"+T.pathname),n(T.port,T.protocol)||(T.host=T.hostname,T.port=""),T.username=T.password="",T.auth&&(~(d=T.auth.indexOf(":"))?(T.username=T.auth.slice(0,d),T.username=encodeURIComponent(decodeURIComponent(T.username)),T.password=T.auth.slice(d+1),T.password=encodeURIComponent(decodeURIComponent(T.password))):T.username=encodeURIComponent(decodeURIComponent(T.auth)),T.auth=T.password?T.username+":"+T.password:T.username),T.origin="file:"!==T.protocol&&m(T.protocol)&&T.host?T.protocol+"//"+T.host:"null",T.href=T.toString()}g.prototype={set:function(e,t,r){var i=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(r||o.parse)(t)),i[e]=t;break;case"port":i[e]=t,n(t,i.protocol)?t&&(i.host=i.hostname+":"+t):(i.host=i.hostname,i[e]="");break;case"hostname":i[e]=t,i.port&&(t+=":"+i.port),i.host=t;break;case"host":i[e]=t,c.test(t)?(t=t.split(":"),i.port=t.pop(),i.hostname=t.join(":")):(i.hostname=t,i.port="");break;case"protocol":i.protocol=t.toLowerCase(),i.slashes=!r;break;case"pathname":case"hash":if(t){var a="pathname"===e?"/":"#";i[e]=t.charAt(0)!==a?a+t:t}else i[e]=t;break;case"username":case"password":i[e]=encodeURIComponent(t);break;case"auth":var s=t.indexOf(":");~s?(i.username=t.slice(0,s),i.username=encodeURIComponent(decodeURIComponent(i.username)),i.password=t.slice(s+1),i.password=encodeURIComponent(decodeURIComponent(i.password))):i.username=encodeURIComponent(decodeURIComponent(t))}for(var u=0;u<h.length;u++){var l=h[u];l[4]&&(i[l[1]]=i[l[1]].toLowerCase())}return i.auth=i.password?i.username+":"+i.password:i.username,i.origin="file:"!==i.protocol&&m(i.protocol)&&i.host?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},toString:function(e){e&&"function"==typeof e||(e=o.stringify);var t,r=this,n=r.host,i=r.protocol;i&&":"!==i.charAt(i.length-1)&&(i+=":");var a=i+(r.protocol&&r.slashes||m(r.protocol)?"//":"");return r.username?(a+=r.username,r.password&&(a+=":"+r.password),a+="@"):r.password?(a+=":"+r.password,a+="@"):"file:"!==r.protocol&&m(r.protocol)&&!n&&"/"!==r.pathname&&(a+="@"),(":"===n[n.length-1]||c.test(r.hostname)&&!r.port)&&(n+=":"),a+=n+r.pathname,(t="object"==typeof r.query?e(r.query):r.query)&&(a+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(a+=r.hash),a}},g.extractProtocol=y,g.location=f,g.trimLeft=p,g.qs=o,e.exports=g}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.amdO={},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return function(){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:function(){return Fe}});var e=__webpack_require__(8078),t=__webpack_require__.n(e),r=__webpack_require__(453),n=__webpack_require__.n(r),o=__webpack_require__(9168),i=__webpack_require__.n(o),a=(__webpack_require__(8327),__webpack_require__(8668),__webpack_require__(1008),__webpack_require__(7461),__webpack_require__(7693),__webpack_require__(3442),__webpack_require__(900),__webpack_require__(3814),__webpack_require__(9046),__webpack_require__(9782),__webpack_require__(6181),__webpack_require__(8453),__webpack_require__(7521),__webpack_require__(3022),__webpack_require__(7480)),s=__webpack_require__(7551),c=__webpack_require__(3365),u=(__webpack_require__(514),__webpack_require__(4201),__webpack_require__(6864),__webpack_require__(1685),__webpack_require__(2486),__webpack_require__(4261),__webpack_require__(937),__webpack_require__(2657),__webpack_require__(351),__webpack_require__(5980),__webpack_require__(863),__webpack_require__(3536),__webpack_require__(8548),__webpack_require__(6921),__webpack_require__(8346),__webpack_require__(3849),__webpack_require__(6781),__webpack_require__(2728),__webpack_require__(3039),__webpack_require__(2258),__webpack_require__(316),__webpack_require__(2446),__webpack_require__(695),__webpack_require__(6776),__webpack_require__(1922),__webpack_require__(8844),__webpack_require__(7146),__webpack_require__(3641),__webpack_require__(650),__webpack_require__(9951),__webpack_require__(2426),__webpack_require__(5488),__webpack_require__(8542),__webpack_require__(4740),__webpack_require__(4822),__webpack_require__(9889),__webpack_require__(6619),__webpack_require__(1538),__webpack_require__(3786),__webpack_require__(3529),__webpack_require__(7118),__webpack_require__(5491)),l=__webpack_require__.n(u),p=__webpack_require__(983),h=__webpack_require__(6916),d=function(e){var t=this.root.lookup("easemob.pb.MUCBody").decode(e.payload),r=t.operation;h.kg.debug("onMucMessage",t),console.log("onMucMessage",t),function(e){var r,n,o,i,a,s=this;if(t.isThread)o={id:t.mucId.name,name:t.mucName,operation:"",parentId:t.mucParentId.name,operator:t.from.name,userName:t.to.length?t.to[0].name:""},i={chatThreadId:t.mucId.name,chatThreadName:t.mucName,operation:"",parentId:t.mucParentId.name};else if(n={type:"",owner:t.from.name,gid:t.mucId.name,from:t.from.name,fromJid:t.from,to:t.to.length?t.to[0].name:"",toJid:t.to,chatroom:t.isChatroom,status:t.status},a={operation:"",id:t.mucId.name,from:t.from.name},t.isChatroom&&(null===(r=null==t?void 0:t.eventInfo)||void 0===r?void 0:r.ext)){var c=JSON.parse(t.eventInfo.ext).properties;a.attributes=c}return({44:function(){var e;a.operation="removeChatRoomAttributes",null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomEvent",a)},43:function(){var e;a.operation="updateChatRoomAttributes",null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomEvent",a)},42:function(){},41:function(){},40:function(){},39:function(){},38:function(){var e;i.operation="chatThreadNameUpdate",null===(e=s.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},37:function(){var e;o.operation="userRemove",null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatThreadChange",o)},36:function(){var e;i.operation="chatThreadLeave",null===(e=s.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},35:function(){var e;i.operation="chatThreadJoin",null===(e=s.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},34:function(){var e;i.operation="chatThreadDestroy",null===(e=s.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},33:function(){var e;i.operation="chatThreadCreate",null===(e=s.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},32:function(){var e,r,o,i;n.type=t.isChatroom?"rmChatRoomMute":"rmGroupMute",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="unmuteAllMembers",t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},31:function(){var e,r,o,i;n.type=t.isChatroom?"muteChatRoom":"muteGroup",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="muteAllMembers",t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},30:function(){var e,r,o,i;n.type=t.isChatroom?"rmUserFromChatRoomWhiteList":"rmUserFromGroupWhiteList",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="removeAllowlistMember",t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},29:function(){var e,r,o,i;n.type=t.isChatroom?"addUserToChatRoomWhiteList":"addUserToGroupWhiteList",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="addUserToAllowlist",t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},28:function(){var e,r,o,i;n.type="deleteFile",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="deleteFile",t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},27:function(){var e,r,o,i;n.type="uploadFile",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="uploadFile",t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},26:function(){var e,r,o,i;n.type="deleteAnnouncement",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="deleteAnnouncement",t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},25:function(){var e,r,o,i;n.type="updateAnnouncement",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="updateAnnouncement",t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},24:function(){var e,r,o,i;n.type="removeMute",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="unmuteMember",t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},23:function(){var e,r,o,i;n.type="addMute",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="muteMember",t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},22:function(){var e,r,o,i;n.type="removeAdmin",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="removeAdmin",t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},21:function(){var e,r,o,i;n.type="addAdmin",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="setAdmin",t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},20:function(){var e,r,o,i;n.type="changeOwner",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="changeOwner",t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},19:function(){var e,r,o,i;n.type="direct_joined",n.groupName=t.mucName,s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="directJoined",a.name=t.mucName,t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},18:function(){var e,r,o,i;n.type=t.isChatroom?"leaveChatRoom":"leaveGroup",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="memberAbsence",t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},17:function(){var e,r,o,i;n.type=t.isChatroom?"memberJoinChatRoomSuccess":"memberJoinPublicGroupSuccess",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="memberPresence",t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},16:function(){var e,r;n.type="unblock",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},15:function(){var e,r;n.type="block",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},14:function(){var e,r,o,i;n.type="update",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="updateInfo",t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},13:function(){var e,r,o,i;n.type="allow",n.reason=t.reason,s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="unblockMember",t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},12:function(){var e,r;n.type="ban",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},11:function(){var e,r;n.type="getBlackList",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},10:function(){var e,r,o,i;n.type="removedFromGroup",n.kicked=n.to,s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="removeMember",t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},9:function(){var e,r,o,i;n.type="invite_decline",n.kicked=n.to,s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="rejectInvite",t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},8:function(){var e,r,o,i;n.type="invite_accept",n.kicked=n.to,s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="acceptInvite",t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},7:function(){var e,r,o,i;n.type="invite",n.kicked=n.to,n.groupName=t.mucName,s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="inviteToJoin",a.name=t.mucName,t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},6:function(){var e,r;n.type="joinPublicGroupDeclined",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},5:function(){var e,r,o,i;n.type="joinPublicGroupSuccess",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="acceptRequest",t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},4:function(){var e,r,o,i;n.type="joinGroupNotifications",n.reason=t.reason,s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="requestToJoin",t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},3:function(){var e,r;n.type="leave",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},2:function(){var e,r;n.type="join",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},1:function(){var e,r,o,i;n.type="deleteGroupChat",s.onPresence&&s.onPresence(n),t.isChatroom?null===(e=s.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=s.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="destroy",t.isChatroom?null===(o=s.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=s.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)}}[e]||function(){console.error("No match operation ".concat(e))})()}.call(this,r)},f=__webpack_require__(5163),m=function(e){var t,r,n,o,i,s,u=this.root.lookup("easemob.pb.StatisticsBody").decode(e.payload);switch(u.operation){case 0:this.onStatisticMessage&&this.onStatisticMessage(u),null===(t=this.eventHandler)||void 0===t||t.dispatch("onStatisticMessage",u);break;case 1:s=a.Z.create({type:c.E.WEBIM_CONNCTION_USER_REMOVED,message:"user has been removed"}),this.logOut=!0,this.onError&&this.onError(s),null===(r=this.eventHandler)||void 0===r||r.dispatch("onError",s);break;case 2:s=a.Z.create({type:c.E.WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE,message:"the user is already logged on another device"}),this.logOut=!0,this.onError&&this.onError(s),null===(n=this.eventHandler)||void 0===n||n.dispatch("onError",s);break;case 3:s=a.Z.create({type:c.E.WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD,message:"the user was kicked by changing password"}),this.logOut=!0,this.onError&&this.onError(s),null===(o=this.eventHandler)||void 0===o||o.dispatch("onError",s);break;case 4:s=a.Z.create({type:c.E.WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE,message:"the user was kicked by other device"}),this.logOut=!0,this.onError&&this.onError(s),null===(i=this.eventHandler)||void 0===i||i.dispatch("onError",s);break;default:h.kg.error("handleStatisticsMsg:",u)}},y=(__webpack_require__(1362),__webpack_require__(7988),__webpack_require__(7665),__webpack_require__(2006));function g(e){var t,r=[],n=[];e.data&&e.data.values&&e.data.values.forEach((function(e){Object.entries(e.status).forEach((function(e){n.push({device:e[0],status:Number(e[1])})})),r.push({userId:e.uid,lastTime:Number(e.last_time),expire:Number(e.expiry),ext:e.ext,statusDetails:n})})),this.onPresenceStatusChange&&this.onPresenceStatusChange(r),null===(t=this.eventHandler)||void 0===t||t.dispatch("onPresenceStatusChange",r)}function v(e){var t=this;e.data.forEach((function(e){var r,n={from:e.from,to:e.to,chatType:"chat"===e.channel_type?"singleChat":"groupChat",messageId:e.messageId,reactions:e.reactions,ts:e.ts};null===(r=t.eventHandler)||void 0===r||r.dispatch("onReactionChange",n)}))}function E(e){var t,r,n,o;if(e.data){var i=e.data,a={id:i.id||"",name:i.name||"",parentId:i.muc_parent_id||"",messageId:i.msg_parent_id||"",timestamp:i.timestamp||0,operator:i.from||"",operation:""};switch(i.operation){case"create":a.operation="create",a.createTimestamp=a.timestamp,a.messageCount=0,null===(t=this.eventHandler)||void 0===t||t.dispatch("onChatThreadChange",a);break;case"update_msg":a.operation="update",a.messageCount=i.message_count,i.last_message&&"{}"!==JSON.stringify(i.last_message)?a.lastMessage=(0,y.w)(i.last_message):"{}"===JSON.stringify(i.last_message)&&(a.lastMessage={}),null===(r=this.eventHandler)||void 0===r||r.dispatch("onChatThreadChange",a);break;case"update":a.operation="update",a.messageCount=i.message_count,null===(n=this.eventHandler)||void 0===n||n.dispatch("onChatThreadChange",a);break;case"delete":a.operation="destroy",null===(o=this.eventHandler)||void 0===o||o.dispatch("onChatThreadChange",a)}}}var _=function(e){var t=s.P6.parseNotify(e.payload);switch(e.from.name,e.to.name,t.type){case"presence":g.call(this,t);break;case"reaction":v.call(this,t);break;case"thread":E.call(this,t);break;default:h.kg.error("unexpected notify type: ".concat(t.type))}},T=__webpack_require__(4306),O=__webpack_require__(3681);function R(e){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}var I=function(){return I=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},I.apply(this,arguments)};function S(){var e="webim",t="",r="",n=[],o=(new Date).valueOf();"webim"===this.deviceId?(r="random_"+o.toString(),e=this.deviceId+"_"+r,t=this.deviceId):e=t=r="webim_"+this.deviceId,this.context.jid&&(this.context.jid.clientResource=e);var i=this.root.lookup("easemob.pb.Provision"),a=i.decode(n);a.compressType=this.compressType,a.encryptType=this.encryptType,a.osType=this.osType,a.version=this.version,a.deviceName=t,a.resource=e,a.deviceUuid=r,a.auth="$t$"+this.token,a.actionVersion="v2.0",a=i.encode(a).finish();var s=this.root.lookup("easemob.pb.MSync"),c=s.decode(n);return c.version=this.version,c.guid=this.context.jid,c.auth="$t$"+this.token,c.command=3,c.deviceId=t,c.serviceId=this.dataReport.getServiceId(),c.encryptType=this.encryptType,c.payload=a,s.encode(c).finish()}function b(e,t){var r=this,n=s.P6.getEnvInfo();if("web"===n.platform||"zfb"===n.platform||"dd"===n.platform){for(var o="",i=0;i<e.length;i++)o+=String.fromCharCode(e[i]);return o=l().btoa(o),"web"===n.platform?o:{data:o,isBuffer:!1,complete:function(){},fail:function(e){"sendSocketMessage:fail taskID not exist"!==e.errMsg&&"SocketTast.send:fail SocketTask.readyState is not OPEN"!==e.errMsg||(h.kg.debug("send message fail and reconnect"),r.reconnect()),t&&r._msgHash&&r._msgHash[t]&&r._msgHash[t].fail({id:t})}}}var a=e;return{data:a.buffer.slice(a.byteOffset,a.byteOffset+a.byteLength),fail:function(e){"sendSocketMessage:fail taskID not exist"!==e.errMsg&&"SocketTast.send:fail SocketTask.readyState is not OPEN"!==e.errMsg||r.reconnect(),t&&r._msgHash&&r._msgHash[t]&&r._msgHash[t].fail({id:t})}}}function A(e,t){switch(e.ns){case 0:m.call(this,e);break;case 1:p.Z.call(this,e,t);break;case 2:d.call(this,e);break;case 3:f.Z.handleRosterMsg.call(this,e);break;case 4:this.registerConfrIQHandler&&this.registerConfrIQHandler(e,t,this);break;case 5:_.call(this,e);break;default:h.kg.error("distributeMeta",e)}}function C(e,t){for(var r=function(r){var o=new(i())(e[r].id.low,e[r].id.high,e[r].id.unsigned).toString();if(n._load_msg_cache.some((function(e){return e.msgId===o})))return"continue";var a=e[r].from.name,s=e[r].to?e[r].to.name:"",c=!!e[r].to&&-1!==e[r].to.domain.indexOf("conference");n._load_msg_cache.length<=n.max_cache_length||n._load_msg_cache.shift(),n._load_msg_cache.push({msgId:o,from:a,to:s,isGroup:c}),A.call(n,e[r],t)},n=this,o=0;o<e.length;o++)r(o)}function N(e){var t=this.root.lookup("easemob.pb.CommUnreadDL");if(t=t.decode(e.payload),"agoraToken"===this.grantType){var r=new(i())(t.timestamp.low,t.timestamp.high,t.timestamp.unsigned).toString();this.compareTokenExpireTime(Number(r),this.expirationTime)}if(0===t.unread.length)j.call(this);else for(var n=0;n<t.unread.length;n++)k.call(this,t.unread[n].queue)}function w(){var e=[],t=this.root.lookup("easemob.pb.StatisticsBody"),r=t.decode(e);r.operation=0,r=t.encode(r).finish();var n=this.root.lookup("easemob.pb.Meta").decode(e);n.id=(new Date).valueOf(),n.ns=0,n.payload=r;var o=this.root.lookup("easemob.pb.CommSyncUL"),i=o.decode(e);i.meta=n,i=o.encode(i).finish();var a=this.root.lookup("easemob.pb.MSync"),s=a.decode(e);return s.version=this.version,s.encryptType=[0],s.command=0,s.payload=i,a.encode(s).finish()}function M(e){var t=[],r=this.root.lookup("easemob.pb.CommSyncUL"),n=r.decode(t);n.queue=e,n=r.encode(n).finish();var o=this.root.lookup("easemob.pb.MSync"),i=o.decode(t);return i.version=this.version,i.encryptType=this.encryptType,i.command=0,i.payload=n,o.encode(i).finish()}function k(e){h.kg.debug("sendBackqueue");var t=M.call(this,e);Y.call(this,t)}function U(e,t){var r=[],n=this.root.lookup("easemob.pb.CommSyncUL"),o=n.decode(r);o.queue=t,o.key=new(i())(e.low,e.high,e.unsigned).toString(),o=n.encode(o).finish();var a=this.root.lookup("easemob.pb.MSync"),s=a.decode(r);return s.version=this.version,s.encryptType=this.encryptType,s.command=0,s.payload=o,a.encode(s).finish()}function x(e,t){h.kg.debug("sendLastSession");var r=U.call(this,e,t);Y.call(this,r)}function P(e){var t,r=this.root.lookup("easemob.pb.Provision").decode(e.payload);if(this.context.jid&&(this.context.jid.clientResource=r.resource),this.clientResource=r.resource,0===r.status.errorCode){if(this.onOpened&&this.onOpened(),null===(t=this.eventHandler)||void 0===t||t.dispatch("onConnected"),"agoraToken"===this.grantType){var n=Date.now();this.expiresIn=this.expirationTime-n,this.tokenExpireTimeCountDown(this.expiresIn)}L.call(this),G.call(this),D.call(this),j.call(this)}else this.onError&&this.onError({type:c.E.WEBIM_CONNECTION_ERROR,message:"provision error",data:r})}function L(){if(this.unSendMsgArr.length>0){for(var e=0;e<this.unSendMsgArr.length;e++){var t=this.unSendMsgArr[e];X.call(this,t)}this.unSendMsgArr=[]}}function j(){var e=w.call(this);Y.call(this,e)}function D(){var e=H.call(this);Y.call(this,e)}function G(){var e=this;B.call(this),this.heartBeatID=setInterval((function(){D.call(e)}),this.heartBeatWait)}function B(){clearInterval(this.heartBeatID)}function H(){var e=this.root.lookup("easemob.pb.MSync"),t=e.decode([]);return t.version=this.version,t.encryptType=this.encryptType,t.command=1,e.encode(t).finish()}function F(e,t){return e.some((function(e){return e.name===t.name}))}function W(e){var t=this,r=this.root.lookup("easemob.pb.CommNotice").decode(e.payload);F(this._queues,r.queue)||this.clientResource===r.queue.clientResource&&r.queue.name===this.context.userId||(this._queues.push(r.queue),this.qTimer&&clearTimeout(this.qTimer),this.qTimer=setTimeout((function(){var e=r.queue;F(t._queues,e)&&(k.call(t,r.queue),h.kg.debug("⬇q:",e))}),1e4),1===this._queues.length&&k.call(this,r.queue))}function q(e){return t=this,r=void 0,o=function(){var t,r,n,o,i,a,c,u;return function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(p){switch(p.label){case 0:if(t=s.P6.getEnvInfo(),"miniCore"!==this.name)return[3,7];u=this.root.lookup("easemob.pb.MSync"),r=void 0,p.label=1;case 1:return p.trys.push([1,5,,6]),"[object Blob]"!==Object.prototype.toString.call(e.data)?[3,3]:[4,e.data.arrayBuffer()];case 2:return r=p.sent(),[3,4];case 3:h.kg.debug("received message: ".concat(e.data)),p.label=4;case 4:return[3,6];case 5:throw p.sent(),new Error("decode message fail.");case 6:return n=new Uint8Array(r),[2,u.decode(n)];case 7:if("web"===t.platform||"zfb"===t.platform||"dd"===t.platform){for(o=l().atob(e.data),i=[],a=0,c=o.length;a<c;++a)i.push(o.charCodeAt(a));return[2,(u=this.root.lookup("easemob.pb.MSync")).decode(i)]}return[2,(u=this.root.lookup("easemob.pb.MSync")).decode(e.data)];case 8:return[2]}}))},new((n=void 0)||(n=Promise))((function(e,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function s(e){try{c(o.throw(e))}catch(e){i(e)}}function c(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r:new n((function(e){e(r)}))).then(a,s)}c((o=o.apply(t,r||[])).next())}));var t,r,n,o}function Z(e){var t=this;e.then((function(e){switch(e.command){case 0:K.call(t,e);break;case 1:N.call(t,e);break;case 2:W.call(t,e);break;case 3:P.call(t,e);break;default:h.kg.error("unexpected msync command: ".concat(e.command))}}))}function K(e){var t,r,n,o,s,u,l=this.root.lookup("easemob.pb.CommSyncDL");l=l.decode(e.payload);var p=new(i())(l.serverId.low,l.serverId.high,l.serverId.unsigned).toString(),h=new(i())(l.metaId.low,l.metaId.high,l.metaId.unsigned).toString();if(0!==l.metas.length)try{C.call(this,l.metas,l.status)}catch(e){this.onError&&this.onError({type:c.E.WEBIM_LOAD_MSG_ERROR,message:"decode message error",data:e})}finally{if(l.isLast){var d=-1;(y=this._queues.some((function(e,t){return e.name===l.name&&(d=t,!0)})))&&d>0&&this._queues.splice(d,1),this._queues.length>0&&(k.call(this,this._queues[0]),this.qTimer&&clearTimeout(this.qTimer))}else x.call(this,l.nextKey,l.queue)}else if(l.isLast){var f=-1;(y=this._queues.some((function(e,t){return e.name===l.queue.name&&(f=t,!0)})))&&this._queues.splice(f,1),this._queues.length>0&&(k.call(this,this._queues[0]),this.qTimer&&clearTimeout(this.qTimer))}else if(l.status&&0===l.status.errorCode){var m=-1,y=this._queues.some((function(e,t){var r;return e.name===(null===(r=l.queue)||void 0===r?void 0:r.name)&&(m=t,!0)}));if(y&&this._queues.splice(m,1),this._queues.length>0&&(k.call(this,this._queues[0]),this.qTimer&&clearTimeout(this.qTimer)),(E=T.Nl.get(h))&&((0,E.rpt)({isEndApi:!0,data:{isSuccess:1,requestName:E.requestName,requestMethod:"WEBSOCKET",requestUrl:this.url,code:O.dd.success}}),T.Nl.delete(h)),this._msgHash[h]){T.TJ.has(h)&&(T.TJ.get(h).rpt({isEndApi:!0,data:{isSuccess:1,requestMethod:"WEBSOCKET",requestUrl:this.url,code:O.dd.success,msgId:p}}),T.TJ.delete(h));try{(null===(t=this._msgHash[h])||void 0===t?void 0:t.resolve)instanceof Function&&this._msgHash[h].resolve({localMsgId:h,serverMsgId:p}),(null===(r=this._msgHash[h])||void 0===r?void 0:r.success)instanceof Function&&this._msgHash[h].success(h,p)}catch(e){this.onError&&this.onError({type:c.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing success function error",data:e})}this.onReceivedMessage&&this.onReceivedMessage({id:h,mid:p,to:this._msgHash[h].to,time:0}),null===(n=this.eventHandler)||void 0===n||n.dispatch("onReceivedMessage",{id:h,mid:p,to:this._msgHash[h].to}),delete this._msgHash[h]}}else if(l.status&&15===l.status.errorCode)(null===(o=this._msgHash[h])||void 0===o?void 0:o.fail)instanceof Function&&this._msgHash[h].fail({type:c.E.SERVICE_NOT_ALLOW_MESSAGING_MUTE,reason:"you were muted"}),this._msgHash[h].reject instanceof Function&&this._msgHash[h].reject({type:c.E.SERVICE_NOT_ALLOW_MESSAGING_MUTE,reason:"you were muted"});else if(l.status&&1===l.status.errorCode){var g=void 0;switch(l.status.reason){case"blocked":g=c.E.PERMISSION_DENIED;break;case"group not found":g=c.E.GROUP_NOT_EXIST;break;case"not in group or chatroom":g=c.E.GROUP_NOT_JOINED;break;case"exceed recall time limit":g=c.E.MESSAGE_RECALL_TIME_LIMIT;break;case"message recall disabled":g=c.E.SERVICE_NOT_ENABLED;break;case"not in group or chatroom white list":g=c.E.SERVICE_NOT_ALLOW_MESSAGING;break;case"nonroster":g=c.E.USER_NOT_FRIEND,l.status.reason="not contact";break;case"group is disabled":g=c.E.GROUP_IS_DISABLED,l.status.reason="group is disabled";break;default:g=l.status.reason.includes("moderation")?c.E.MESSAGE_MODERATION_BLOCKED:c.E.SERVER_UNKNOWN_ERROR}if(this._msgHash[h]){var v=a.Z.create({type:g,message:l.status.reason||"",data:{id:h,mid:p}});this._msgHash[h].reject instanceof Function&&this._msgHash[h].reject(v),this._msgHash[h].fail instanceof Function&&this._msgHash[h].fail({type:g,reason:l.status.reason?l.status.reason:"",data:{id:h,mid:p}})}}else if(l.status&&7===l.status.errorCode)"sensitive words"===l.status.reason&&this._msgHash[h]?(v=a.Z.create({type:c.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,message:"sensitive words",data:{id:h,mid:p}}),this._msgHash[h].reject instanceof Function&&this._msgHash[h].reject(v),this._msgHash[h].fail instanceof Function&&this._msgHash[h].fail({type:c.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,data:{id:h,mid:p,reason:"sensitive words"}})):"blocked by mod_antispam"===l.status.reason&&this._msgHash[h]?(v=a.Z.create({type:c.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,message:"blocked by mod_antispam",data:{id:h,mid:p}}),this._msgHash[h].reject instanceof Function&&this._msgHash[h].reject(v),this._msgHash[h].fail instanceof Function&&this._msgHash[h].fail({type:c.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,data:{id:h,mid:p,reason:"blocked by mod_antispam"}})):"user is mute"===l.status.reason&&this._msgHash[h]?(v=a.Z.create({type:c.E.USER_MUTED_BY_ADMIN,message:"user is mute",data:{id:h,mid:p}}),this._msgHash[h].reject instanceof Function&&this._msgHash[h].reject(v),this._msgHash[h].fail instanceof Function&&this._msgHash[h].fail(v)):"traffic limit"===l.status.reason&&this._msgHash[h]&&(v=a.Z.create({type:c.E.MESSAGE_CURRENT_LIMITING,message:"traffic limit",data:{id:h,mid:p}}),this._msgHash[h].reject instanceof Function&&this._msgHash[h].reject(v),this._msgHash[h].fail instanceof Function&&this._msgHash[h].fail(v));else if(l.status&&19===l.status.errorCode)this._msgHash[h]&&(T.TJ.has(h)&&(T.TJ.get(h).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:c.E.MESSAGE_EXTERNAL_LOGIC_BLOCKED,codeDesc:l.status.reason||"",msgId:p}}),T.TJ.delete(h)),v=a.Z.create({type:c.E.MESSAGE_EXTERNAL_LOGIC_BLOCKED,message:l.status.reason||"",data:{id:h,mid:p}}),this._msgHash[h].reject instanceof Function&&this._msgHash[h].reject(v),this._msgHash[h].fail instanceof Function&&this._msgHash[h].fail({type:c.E.MESSAGE_EXTERNAL_LOGIC_BLOCKED,data:{id:h,mid:p,reason:l.status.reason}}));else if(this._msgHash[h]){T.TJ.has(h)&&(T.TJ.get(h).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:c.E.WEBIM_LOAD_MSG_ERROR,codeDesc:(null===(s=l.status)||void 0===s?void 0:s.reason)||"",msgId:p}}),T.TJ.delete(h));try{v=a.Z.create({type:c.E.WEBIM_LOAD_MSG_ERROR,message:(null===(u=l.status)||void 0===u?void 0:u.reason)||"",data:{id:h,mid:p,reason:l.status&&l.status.reason}}),this._msgHash[h].reject instanceof Function&&this._msgHash[h].reject(v),this._msgHash[h].fail instanceof Function&&this._msgHash[h].fail({type:c.E.WEBIM_LOAD_MSG_ERROR,data:{errorCode:l.status&&l.status.errorCode,reason:l.status&&l.status.reason}})}catch(e){this.onError&&this.onError({type:c.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing fail function error",data:e})}delete this._msgHash[h]}else{var E;T.TJ.has(h)&&(T.TJ.get(h).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:c.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,codeDesc:"on message error",msgId:p}}),T.TJ.delete(h)),(E=T.Nl.get(h))&&((0,E.rpt)({isEndApi:!0,data:{isSuccess:0,requestName:E.requestName,requestMethod:"WEBSOCKET",requestUrl:this.url,code:O.dd.failed,codeDesc:"on message error"}}),T.Nl.delete(h)),this.onError&&this.onError({type:c.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"on message error"})}}function V(e){var t=[],r=this.root.lookup("easemob.pb.KeyValue"),n=[];for(var o in e){var i=r.decode(t);i.key=o,"object"===R(e[o])?(i.type=8,i.stringValue=JSON.stringify(e[o])):"string"==typeof e[o]?(i.type=7,i.stringValue=e[o]):"boolean"==typeof e[o]?(i.type=1,i.varintValue=!0===e[o]?1:0):Number.isInteger(e[o])?(i.type=2,i.varintValue=e[o]):(i.type=6,i.doubleValue=e[o]),n.push(i)}return n}function z(e){var t,r,n=[];if(this.root){var o,i=this.root.lookup("easemob.pb.MessageBody.Content").decode(n);switch(o=!e.group&&"groupchat"!==(null===(t=null==e?void 0:e.chatType)||void 0===t?void 0:t.toLowerCase())||e.roomType?e.group&&e.roomType||"chatroom"===(null===(r=null==e?void 0:e.chatType)||void 0===r?void 0:r.toLowerCase())?"chatRoom":"singleChat":"groupChat",e.type){case"txt":i.type=0,i.text=e.msg;break;case"img":i.type=1,e.body?(i.displayName=e.body.filename,i.remotePath=e.body.url,i.secretKey=e.body.secret,i.fileLength=e.body.file_length,i.size=e.body.size,i.thumbnailDisplayName=e.body.filename):e.file?(i.displayName=e.file.filename,i.remotePath=e.file.url,i.secretKey=e.file.secret,i.fileLength=e.file.file_length,i.size=e.file.size,i.thumbnailDisplayName=e.file.filename):(i.displayName=e.filename,i.remotePath=e.url,i.secretKey=e.secret,i.fileLength=e.file_length,i.size=e.size,i.thumbnailDisplayName=e.filename);break;case"video":i.type=2,i.displayName=e.body.filename,i.remotePath=e.body.url,i.secretKey=e.body.secret,i.fileLength=e.body.file_length,i.duration=e.body.length,i.thumbnailDisplayName=e.body.filename;break;case"loc":i.type=3,i.latitude=e.lat,i.longitude=e.lng,i.address=e.addr,i.buildingName=e.buildingName,i.latitude=e.lat;break;case"audio":i.type=4,i.displayName=e.body.filename,i.remotePath=e.body.url,i.secretKey=e.body.secret,i.fileLength=e.body.file_length,i.duration=e.body.length,i.thumbnailDisplayName=e.body.filename;break;case"file":i.type=5,i.displayName=e.body.filename,i.remotePath=e.body.url,i.secretKey=e.body.secret,i.fileLength=e.body.file_length,i.size=e.body.size,i.thumbnailDisplayName=e.body.filename;break;case"cmd":i.type=6,i.action=e.action;break;case"custom":i.type=7,i.customEvent=e.customEvent,i.customExts=V.call(this,e.customExts)}var a=[];e.ext&&(a=V.call(this,e.ext));var s=this.root.lookup("easemob.pb.MessageBody"),u=s.decode(n);u.from={name:this.context.jid.name},u.to={name:e.to},"channel"===e.type?u.type=7:"recall"===e.type?(u.type=6,u.ackMessageId=e.ackId):"delivery"===e.type?(u.type=5,u.ackMessageId=e.ackId):"read"===e.type?(u.type=4,u.ackMessageId=e.ackId,"groupChat"===o&&(u.msgConfig={allowGroupAck:!0},u.ackContent=e.ackContent)):"chatRoom"===o?u.type=3:"groupChat"===o?(u.type=2,e.msgConfig&&(u.msgConfig={allowGroupAck:!0})):"singleChat"===o&&(u.type=1),u.contents=[i],u.ext=a;var l=function(e){var t={};return"translations"in e&&(t.translations=e.translations),"isChatThread"in e&&e.isChatThread&&(t.thread={}),Object.keys(t).length>0?JSON.stringify(t):""}(e);l&&(u.meta=l),u=s.encode(u).finish();var p=this.root.lookup("easemob.pb.Meta").decode(n);p.id=e.id;var h="easemob.com";"chatRoom"!==o&&"groupChat"!==o||(h="conference.easemob.com"),p.to={appKey:this.appKey,name:e.to,domain:h},p.ns=1,p.payload=u;var d=this.root.lookup("easemob.pb.CommSyncUL"),f=d.decode(n);f.meta=p,f=d.encode(f).finish();var m=this.root.lookup("easemob.pb.MSync"),y=m.decode(n);return y.version=this.version,y.encryptType=this.encryptType,y.command=0,y.payload=f,m.encode(y).finish()}e.fail&&e.fail({type:c.E.WEBIM_CONNCTION_CLIENT_OFFLINE,message:"Not logged in"})}function J(e){var t=this;if(!e.file)return e;var r=I({},e);return r.accessToken=this.token,r.appKey=this.appKey,r.apiUrl=this.apiUrl,r.body&&r.body.url?z.call(this,r):new Promise((function(n,o){var i=r.onFileUploadComplete;r.onFileUploadComplete=function(n){var o;if(n.entities[0]["file-metadata"]){var a=n.entities[0]["file-metadata"]["content-length"];r.file_length=a,r.filetype=n.entities[0]["file-metadata"]["content-type"],a>204800&&(r.thumbnail=!0)}r.body={type:r.type||"file",secret:n.entities[0]["share-secret"],filename:r.file.filename||r.filename,url:(t.isHttpDNS?t.apiUrl+n.uri.substr(n.uri.indexOf("/",9)):n.uri)+"/"+n.entities[0].uuid,length:r.length||0,filetype:r.filetype||r.file.filetype,file_length:(null===(o=null==r?void 0:r.ext)||void 0===o?void 0:o.file_length)||0,size:{width:r.width||0,height:r.height||0}},r.file.url=n.uri,e.secret=n.entities[0]["share-secret"];var s=(t.isHttpDNS?t.apiUrl+n.uri.substr(n.uri.indexOf("/",9)):n.uri)+"/"+n.entities[0].uuid;e.url=s,n.url=s,"img"===r.type&&(e.thumb="".concat(s,"?thumbnail=true"),n.thumb="".concat(s,"?thumbnail=true")),i instanceof Function&&i(n,r.id);var c=z.call(t,r);T.TJ.size<=T.F3&&T.TJ.set(r.id,{rpt:t.dataReport.geOperateFun({operationName:O.fI.SEND_MSG})}),Y.call(t,c)},s.P6.uploadFile.call(t,r,O.fI.UPLOAD_MSG_ATTACH)}))}function X(e){var t=this;return new Promise((function(r,n){var o,i;if(t.logOut)return n({type:c.E.WEBIM_CONNECTION_CLOSED,message:"not login"});var a="file"===e.type||"img"===e.type||"audio"===e.type||"video"===e.type,s="delivery"===e.type||"read"===e.type||"channel"===e.type;if(e.id&&((!a&&!s||a&&t.useOwnUploadFun)&&T.TJ.size<=T.F3&&T.TJ.set(e.id,{rpt:t.dataReport.geOperateFun({operationName:"recall"===e.type?O.fI.SEND_RECALL_MSG:O.fI.SEND_MSG})}),t._msgHash[e.id]=I(I({},e),{resolve:r,reject:n})),a&&e.file)return J.call(t,e);if("txt"===e.type&&(null===(o=e.msgConfig)||void 0===o?void 0:o.languages)&&Array.isArray(null===(i=e.msgConfig)||void 0===i?void 0:i.languages)&&e.msgConfig.languages.length>0){var u=t.translateMessage||t.translation.translateMessage;if(!u)throw new Error("there is no method to translate message");u({text:e.msg,languages:e.msgConfig.languages}).then((function(r){var n,o=null===(n=r.data[0])||void 0===n?void 0:n.translations;o=o.map((function(e){return{code:e.to,text:e.text}})),e.translations=o;var i=z.call(t,e);Y.call(t,i,e.id)})).catch((function(e){n(e)}))}else{var l=z.call(t,e);Y.call(t,l,e.id)}}))}function Y(e,t){if(!this.isOpened())return this.unSendMsgArr.push(e),!this.logOut&&this.autoReconnectNumTotal<this.autoReconnectNumMax&&(this.autoReconnectNumTotal<=this.socketHost.length&&this.isHttpDNS||!this.isHttpDNS)&&(h.kg.debug("need to reconnect",this.autoReconnectNumTotal,this.autoReconnectNumMax),this.offLineSendConnecting=!0,this.reconnect()),void(this.onError&&this.onError({type:c.E.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"}));var r;r="miniCore"===this.name?e:b.call(this,e,t),this.sock.send(r)}var $=function(e,t){return e.send=X,e.sendMsg=X,h.kg.debug("init Msync by ".concat(e.name)),{generateProvision:S.bind(e),base64transform:b.bind(e),distributeMeta:A.bind(e),decodeMeta:C.bind(e),decodeUnreadDL:N.bind(e),_rebuild:w.bind(e),_lastsession:U.bind(e),receiveProvision:P.bind(e),isInQueue:F.bind(e),decodeNotice:W.bind(e),decodeMSync:q.bind(e),distributeMSync:Z.bind(e),encodeChatMsg:z.bind(e),upLoadFile:J.bind(e),send:X.bind(e),stopHeartBeat:B.bind(e)}},Q=function(){function e(e,t,r){this.handlerData={},this.handlerData={},e.addEventHandler=this.addEventHandler.bind(this),e.removeEventHandler=this.removeEventHandler.bind(this)}return e.prototype.addEventHandler=function(e,t){this.handlerData[e]=t},e.prototype.removeEventHandler=function(e){delete this.handlerData[e]},e.prototype.dispatch=function(e,t){for(var r in h.kg.debug("dispatch event: "+e,t||""),this.handlerData){var n=this.handlerData[r][e];n&&n(t)}},e}(),ee=function(){};function te(e){this.onOpened=e.onOpened||ee,this.onPresence=e.onPresence||ee,this.onTextMessage=e.onTextMessage||ee,this.onPictureMessage=e.onPictureMessage||ee,this.onAudioMessage=e.onAudioMessage||ee,this.onVideoMessage=e.onVideoMessage||ee,this.onFileMessage=e.onFileMessage||ee,this.onLocationMessage=e.onLocationMessage||ee,this.onCmdMessage=e.onCmdMessage||ee,this.onCustomMessage=e.onCustomMessage||ee,this.onReceivedMessage=e.onReceivedMessage||ee,this.onDeliveredMessage=e.onDeliveredMessage||ee,this.onReadMessage=e.onReadMessage||ee,this.onRecallMessage=e.onRecallMessage||ee,this.onChannelMessage=e.onChannelMessage||ee,this.onError=e.onError||ee,this.onOffline=e.onOffline||ee,this.onOnline=e.onOnline||ee,this.onStatisticMessage=e.onStatisticMessage||ee,this.onContactInvited=e.onContactInvited||ee,this.onContactAgreed=e.onContactAgreed||ee,this.onContactRefuse=e.onContactRefuse||ee,this.onContactDeleted=e.onContactDeleted||ee,this.onContactAdded=e.onContactAdded||ee,this.onTokenWillExpire=e.onTokenWillExpire||ee,this.onTokenExpired=e.onTokenExpired||ee,this.onClosed=e.onClosed||ee,this.onPresenceStatusChange=e.onPresenceStatusChange||ee}__webpack_require__(7095);var re={biz:"",debug:!1,token:""},ne="https://data-reporting.agora.io/report",oe="https://data-reporting.sh.agoralab.co/report",ie=function(e){var t=Number(O.C8[e]);return t===O.C8.USER_LOGIN?"MANUALLOGIN":t===O.C8.MSYNC_SENDMESSAGE?"SENDMESSAGE":t>O.C8.UNKNOWOPERATION&&t<O.C8.REST_OPERATE?"REST":t>O.C8.REST_OPERATE&&t<O.C8.MSYNC_OPERATE?"MESSAGE":t>O.C8.MSYNC_OPERATE&&t<O.C8.ROSTER_OPERATE?"ROSTER":t>O.C8.ROSTER_OPERATE&&t<O.C8.USER_OPERATE?"USER":t>O.C8.USER_OPERATE&&t<O.C8.GROUP_OPERATE?"GROUP":t>O.C8.GROUP_OPERATE&&t<O.C8.CHATROOM_OPERATE?"CHATROOM":"OPERATION"},ae=function(){return(new Date).getTime()},se=function(e){return[s.iw.BAIDU,s.iw.WX,s.iw.DD,s.iw.ZFB,s.iw.TT,s.iw.QUICK_APP,s.iw.UNI].includes(e.platform)},ce=function(){return e=1,t=99999,e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e))+e;var e,t},ue={},le=1e3,pe=function(){function e(e){this.eventQueue=[],this.stock=le,this.config=e,this.governor()}return e.prototype.add=function(e){this.stock<=0?console.warn("Event Report limit ".concat(le," per minute")):(this.eventQueue.push(e),this.consume(),this.stock-=1)},e.prototype.consume=function(){var e=this;0!==this.eventQueue.length&&(this.timer&&this.eventQueue.length<=10&&clearTimeout(this.timer),this.timer=setTimeout((function(){var t,r=e.eventQueue.splice(0,10),n=r.filter((function(e){return e.appId===r[0].appId})),o=r.filter((function(e){return e.appId!==r[0].appId}));(t=e.eventQueue).unshift.apply(t,o),e.batchSend(n)}),1e3))},e.prototype.governor=function(){var e=this,t=setInterval((function(){e.stock=le}),6e4);"undefined"!=typeof addEventListener&&addEventListener("beforeunload",(function(){clearInterval(t)}))},e.prototype.batchSend=function(e){var t,r;if(void 0===e&&(e=[]),0!==e.length)try{var n=e.map((function(e){e.biz,e.appId;var t=e.eventId,r=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["biz","appId","eventId"]);return{eventId:Number(t),body:r}}));!function(e,t){try{var r=t.biz,n=t.appId,o=t.data,i=t.debug,a=t.onSuccess;if(!r)throw new Error("biz is not defined");ue.global||(ue=s.P6.getEnvInfo());var c=ue;if(se(c)){var u={url:i?oe:ne,data:o,method:"POST",success:function(){null==a||a()},fail:function(){},complete:function(){}},l={token:e,appid:null!=n?n:"",sendts:"".concat(Math.floor((new Date).getTime()/1e3)),biz:r,debug:"".concat(i)};if("zfb"===c.platform||"dd"===c.platform?u.headers=l:u.header=l,"dd"===c.platform)return c.global.httpRequest(u);c.global.request(u)}else{var p=new XMLHttpRequest;p.onreadystatechange=function(){2===p.readyState&&(null==a||a())},p.open("POST",i?oe:ne),p.setRequestHeader("Content-Type","application/json"),p.setRequestHeader("token",e),p.setRequestHeader("appid",null!=n?n:""),p.setRequestHeader("sendts","".concat(Math.floor((new Date).getTime()/1e3))),p.setRequestHeader("biz",r),p.setRequestHeader("debug","".concat(i)),p.send(JSON.stringify(o))}}catch(e){console.error(e)}}(this.config.token,{biz:null===(t=e[0])||void 0===t?void 0:t.biz,appId:null===(r=e[0])||void 0===r?void 0:r.appId,data:n,debug:this.config.debug,onSuccess:this.consume.bind(this)})}catch(e){console.error(e)}},e}(),he=function(){return he=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},he.apply(this,arguments)},de=new(function(){function e(e){this.inited=!1,this.appId="",this.biz="",this.eventQueue={},this.config=re,e&&this.init(e)}return e.prototype.init=function(e){var t;if(void 0===e&&(e={}),!e.biz||!e.token)throw new Error("Event Report: biz or token is not defined");try{this.appId=null!==(t=e.appId)&&void 0!==t?t:"",this.biz=e.biz,this.config=he(he({},re),e),this.eventQueue=new pe(this.config),this.log(e),this.inited=!0}catch(e){console.error(e)}},e.prototype.send=function(e,t,r){var n;if(void 0===t&&(t={}),this.inited){var o=he(he({},t),{eventId:Number(e),biz:this.biz,appId:null!==(n=null==r?void 0:r.appId)&&void 0!==n?n:this.appId});this.eventQueue.add(o),this.log(o)}else console.error("Event Report: init is not called")},e.prototype.log=function(e){try{if(this.config.debug){var t=e.payload,r=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["payload"]);console.log("%c Event Report: ".concat(this.config.biz," "),"background: #8A97FC; color: #fff"),console.table(r),t&&(console.info("payload:"),console.table(t))}}catch(e){console.error(e)}},e}()),fe=function(){return fe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},fe.apply(this,arguments)},me={requestName:"",subrequestid:"1",requestMethod:"GET",requestUrl:"",requestElapse:0,code:0,codeDesc:"",isLastApi:0,isSuccess:1},ye=function(){function e(e){this.platform=s.P6.getEnvInfo(),this.isReportDt=e.isReport||!1,this.isCollectDt=!0,se(this.platform)&&!this.isReportDt&&(this.isCollectDt=!1),this.eventQueue=[],this.accessChannel=T.yK,this.options=function(e,t){t.platform||(t=s.P6.getEnvInfo());var r=e.org,n=e.appkey,o=e.deviceId,i=e.sdkVersion,a=(null===navigator||void 0===navigator?void 0:navigator.userAgent)||"".concat(t.platform,"_mini_program");return{org:r,appkey:n,deviceId:o,sdkServiceId:"sid_".concat(s.P6.getUniqueId(),"_").concat(ce()),did:a,sdkVersion:i,os:T.Wc,sdkProduct:O.aC.web}}(e,this.platform),this.sid=this.options.sdkServiceId,this.init(e)}return e.getInstance=function(){return e.instance},e.prototype.getServiceId=function(){return this.sid||"sid_0"},e.prototype.setIsReportDt=function(e){this.isReportDt=e,e&&this.rptEventQueue()},e.prototype.setIsCollectDt=function(e){this.isCollectDt=e,e||(this.eventQueue=[])},e.prototype.rptEventQueue=function(){var e=this;this.eventQueue.length&&this.eventQueue.forEach((function(t,r){de.send(t.eventId,t.dt),r>=e.eventQueue.length-1&&(e.eventQueue=[])}))},e.prototype.init=function(t){e.instance||(e.instance=this,de.init({biz:T.el,token:T.$x,appId:t.appkey,debug:!1}),this.reportInit())},e.prototype.reportInit=function(){if(this.isCollectDt){var e=this.options,t=e.did,r=e.os,n=e.sdkVersion,o=e.deviceId;this.reportData(T.iB.INIT,{did:t,os:r,sdkVersion:n,deviceId:o})}},e.prototype.geOperateFun=function(e){var t=this;if(!this.isCollectDt)return function(){};var r=1,n=0,o="",i=ae(),a=e.uid,c=e.operationName;a&&(this.uid=a);var u={uid:this.uid,operationId:"opr_".concat(s.P6.getUniqueId(),"_").concat(ce()),requestid:"req_".concat(s.P6.getUniqueId(),"_").concat(ce()),operationName:c};return function(e){var a,l,p,h;if(e.data.isSuccess?(n=0,o=""):(0===e.data.code&&(e.data.code=-1),n=null!==(a=e.data.code)&&void 0!==a?a:n,o=null!==(l=e.data.codeDesc)&&void 0!==l?l:o),(null===(p=e.data)||void 0===p?void 0:p.accessChannel)&&(t.accessChannel=null===(h=e.data)||void 0===h?void 0:h.accessChannel),e.isRetry?(r++,e.data.subrequestid="".concat(r)):(u.requestid="req_".concat(s.P6.getUniqueId(),"_").concat(ce()),r=1),e.data.isLastApi){var d=ae();e.data.requestElapse=d-i,e.data.requestMethod="",e.data.subrequestid="0",e.data.code=200===n?0:n,e.data.codeDesc=o}else e.data.requestName||(e.data.requestName=c);e.data.requestElapse||(e.data.requestElapse=ae()-i),t.reportData.call(t,T.iB.API,fe(fe(fe(fe({},me),u),e.data),{accessChannel:t.accessChannel,operationType:ie(c)})),e.isEndApi&&t.reportData.call(t,T.iB.API,fe(fe(fe({},u),me),{isSuccess:e.data.isSuccess,isLastApi:1,subrequestid:"0",requestMethod:"",code:200===n?0:n,codeDesc:o,requestElapse:e.data.requestElapse,accessChannel:t.accessChannel,operationType:ie(c)}))}},e.prototype.reportData=function(e,t){return r=this,n=void 0,i=function(){var r,n,o,i,a,c,u,l;return function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(p){switch(p.label){case 0:return p.trys.push([0,3,,4]),r=ae(),n=0,e!==T.iB.API?[3,2]:[4,(h=this.platform,new Promise((function(e){var t;h.platform||(h=s.P6.getEnvInfo());var r="";if(h.platform===s.iw.WEB){var n=navigator.connection;(null==n?void 0:n.type)?(null==n||n.type,r=O.td.WIFI):(null==n?void 0:n.effectiveType)&&(r=O.td[n.effectiveType.toLocaleUpperCase()]),e(r)}else h.platform===s.iw.NODE?(r=O.td.UNKNOWN,e(r)):null===(t=h.global)||void 0===t||t.getNetworkType({success:function(t){r=O.td[t.networkType.toLocaleUpperCase()],e(r)}})})))];case 1:n=p.sent(),p.label=2;case 2:return o=this.options,i=o.appkey,a=o.sdkServiceId,c=o.sdkProduct,u=fe({lts:r,net:n,appkey:i,sdkServiceId:a,sdkProduct:c},t),this.isReportDt?de.send(e,u):this.isCollectDt&&this.eventQueue.push({eventId:e,dt:u}),[3,4];case 3:return l=p.sent(),console.warn(l),[3,4];case 4:return[2]}var h}))},new((o=void 0)||(o=Promise))((function(e,t){function a(e){try{c(i.next(e))}catch(e){t(e)}}function s(e){try{c(i.throw(e))}catch(e){t(e)}}function c(t){var r;t.done?e(t.value):(r=t.value,r instanceof o?r:new o((function(e){e(r)}))).then(a,s)}c((i=i.apply(r,n||[])).next())}));var r,n,o,i},e}(),ge=__webpack_require__(7486),ve=__webpack_require__(556),Ee=__webpack_require__(7800),_e=__webpack_require__(6369),Te=__webpack_require__(223),Oe=__webpack_require__(318),Re=__webpack_require__(606),Ie=function(){return Ie=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ie.apply(this,arguments)},Se=s.P6.getEnvInfo(),be="web"===Se.platform,Ae=function(){},Ce=function(){function e(t){var r;if(this.name="connection",this.isDebug=t.isDebug||!1,this.isReport=!1,this.isHttpDNS=void 0===t.isHttpDNS?be:t.isHttpDNS,this.heartBeatWait=t.heartBeatWait||3e4,this.autoReconnectNumMax=t.autoReconnectNumMax||5,this.refreshDNSIntervals=this.autoReconnectNumMax<5?this.autoReconnectNumMax:5,this.delivery=t.delivery||!1,this.dnsArr=["https://rs.easemob.com","https://rs.chat.agora.io","http://59.110.89.59","http://39.97.193.190","http://39.97.193.187"],this.dnsIndex=0,this.dnsTotal=this.dnsArr.length,this.restHosts=[],this.restTotal=0,this.restIndex=0,this.hostIndex=0,this.socketHost=[],this.hostTotal=0,this.times=1,this.autoReconnectNumTotal=0,this.domain="easemob.com",this.appKey=t.appKey,this.appName="",this.orgName="",this.token="",this.grantType="",this.apiUrl=t.apiUrl||"",this.url=t.url||"",this.https=t.https||"undefined"!=typeof window&&"https:"===(null===(r=window.location)||void 0===r?void 0:r.protocol),this.version="4.0.9",this.deviceId=t.deviceId||"webim",this.osType=16,this.useOwnUploadFun=t.useOwnUploadFun||!1,this.compressType=[0],this.encryptType=[0],this.clientResource="",this.expiresIn=0,this.expirationTime=0,this.logOut=!0,this.context={jid:{appKey:"",clientResource:"",domain:"easemob.com",name:""},userId:"",appKey:"",status:0,restTokenData:"",appName:"",orgName:"",root:{},accessToken:""},this._msgHash={},this._msgPromiseHash={},this._queues=[],this._load_msg_cache=[],this.unSendMsgArr=[],this.mr_cache={},"string"!=typeof this.appKey||2!==this.appKey.split("#").length)throw Error("Illegal appKey: ".concat(this.appKey));var n=this.appKey.split("#");this.orgName=n[0],this.appName=n[1],this.listen=te.bind(this),this.mSync=this.usePlugin($),this.eventHandler=this.usePlugin(Q),Object.assign(e.prototype,ge),Object.assign(e.prototype,ve),Object.assign(e.prototype,Ee),Object.assign(e.prototype,_e),Object.assign(e.prototype,Te),Object.assign(e.prototype,Oe),Object.assign(e.prototype,Re),this.dataReport=new ye({appkey:this.appKey,org:this.orgName,sdkVersion:this.version,deviceId:this.deviceId,isReport:this.isReport});var o=0,i=this;Object.defineProperty(s.P6,"ajaxUnconventionalErrorTimes",{set:function(e){0!==e&&(h.kg.debug("rest api request fail times: ".concat(e)),(o=e)%5==0&&this.isHttpDNS&&(h.kg.debug("refresh dns config when rest request fail."),Le.call(i,"refresh",{},{})))},get:function(){return o}})}return e.prototype.usePlugin=function(e,t){if(!t)return new e(this);this[t]=new e(this)},e.prototype.listen=function(e){},e.prototype.addEventHandler=function(e,t){},e.prototype.removeEventHandler=function(e){},e.prototype.registerUser=function(e){var t=this;return new Promise((function(r,n){var o=t.dataReport.geOperateFun({uid:e.username,operationName:O.fI.REGISTER});if(t.isHttpDNS){t.dnsIndex=0;var i=Ie(Ie({},e),{user:e.username,pwd:e.password,promise:{resolve:r,reject:n}});Le.call(t,"signup",i,{rpt:o})}else i=Ie(Ie({},e),{promise:{resolve:r,reject:n}}),Ne.call(t,i,{rpt:o})}))},e.prototype.open=function(e){var t=this;return h.kg.debug("open"),new Promise((function(r,n){if(xe.call(t,e)){e.accessToken&&(t.token=e.accessToken);var o=Ie(Ie({},e),{promise:{resolve:r,reject:n}}),i=t.dataReport.geOperateFun({uid:e.user,operationName:O.fI.LOGIN});t.isHttpDNS?Le.call(t,"login",o,{rpt:i}):we.call(t,o,{rpt:i})}}))},e.prototype.isOpened=function(){return this.sock&&1===this.sock.readyState||!1},e.prototype.close=function(){this.logOut=!0,this.context.status=c.E.STATUS_CLOSING,this.sock&&this.sock.close(),this.stopHeartBeat(),this.context.status=c.E.STATUS_CLOSED,this._load_msg_cache=[],this.unSendMsgArr=[],this._queues=[],this._msgHash={},this.mr_cache={}},e.prototype.stopHeartBeat=function(){clearInterval(this.heartBeatID)},e.prototype._checkOpenParams=function(e){return xe.call(this,e)},e.prototype.clear=function(){this.restTotal=0,this.restIndex=0,this.hostIndex=0,this.hostTotal=0},e.prototype.heartBeat=function(){},e.prototype.renewToken=function(e){var t=this;return this.isOpened()?this.getChatToken(e).then((function(e){var r=Date.now();return t.expirationTime=e.expire_timestamp,t.expiresIn=e.expire_timestamp-r,t.token=e.access_token,t.context.accessToken=e.access_token,t.clearTokenTimeout(),t.tokenExpireTimeCountDown(t.expiresIn),{status:!0,token:e.access_token,expire:e.expire_timestamp}})):Promise.reject({status:!1})},e.prototype.clearTokenTimeout=function(){h.kg.debug("clearTokenTimeout"),this.tokenWillExpireTimer&&clearTimeout(this.tokenWillExpireTimer),this.tokenExpiredTimer&&clearTimeout(this.tokenExpiredTimer)},e.prototype.tokenExpireTimeCountDown=function(e){var t=this;this.tokenWillExpireTimer=setTimeout((function(){var e;t.onTokenWillExpire&&t.onTokenWillExpire(),null===(e=t.eventHandler)||void 0===e||e.dispatch("onTokenWillExpire"),h.kg.info("onTokenWillExpire")}),e/2),this.tokenExpiredTimer=setTimeout((function(){var e;h.kg.info("onTokenExpired"),t.onTokenExpired&&t.onTokenExpired(),null===(e=t.eventHandler)||void 0===e||e.dispatch("onTokenExpired"),t.close()}),e)},e.prototype.compareTokenExpireTime=function(e,t){var r,n=Number(t)-Number(e);h.kg.debug("compareTokenExpireTime",n),n<=this.expiresIn/2&&n>0?(this.onTokenWillExpire&&this.onTokenWillExpire(),null===(r=this.eventHandler)||void 0===r||r.dispatch("onTokenWillExpire"),h.kg.info("onTokenWillExpire")):n<=0&&(this.closeByTokenExpired(),h.kg.info("closeByTokenExpired"))},e.prototype.closeByTokenExpired=function(){var e;h.kg.info("closed By TokenExpired"),this.onTokenExpired&&this.onTokenExpired(),null===(e=this.eventHandler)||void 0===e||e.dispatch("onTokenExpired"),this.close()},e.prototype.reconnect=function(){var e=this;h.kg.info("reconnect: time",this.times),h.kg.info("reconnect sock.readyState: ",this.sock.readyState),0!==this.sock.readyState&&1!==this.sock.readyState&&(this.isHttpDNS&&(this.hostIndex,this.socketHost.length),this.hostIndex++,this.hostIndex>=this.socketHost.length-1&&(this.hostIndex=this.socketHost.length-1),setTimeout((function(){h.kg.info("login sock.readyState: ",e.sock.readyState),1!==e.sock.readyState&&(e.sock.close(),Ue.call(e,{access_token:e.context.accessToken}),e.autoReconnectInterval+=e.times*e.times,e.times++)}),500*this.times),this.autoReconnectNumTotal++)},e.prototype.send=function(e){return Promise.resolve(null)},e.max_cache_length=100,e._getSock=function(){},e}();function Ne(e,t){var r=this,n=t.rpt,o=t.isRetry,i=e.promise,u=this.apiUrl+"/"+this.orgName+"/"+this.appName+"/users",l={requestName:O.c.RESISTER,requestUrl:u},p=e.error||Ae;if(!this.orgName&&!this.appName){var h=a.Z.create({type:c.E.WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR,message:"signup error"});p(h)}var d={headers:{"Content-type":"application/json"},url:u,dataType:"json",data:JSON.stringify({username:e.username,password:e.password,nickname:e.nickname||""}),success:function(t){e.success&&e.success(t);var r=Ie(Ie({},t),{type:c.E.REQUEST_SUCCESS});i.resolve&&i.resolve(r);var a=t.extraInfo,s=a.httpCode,u=a.elapse;n({isEndApi:!0,isRetry:o,data:Ie(Ie({},{requestElapse:u,isSuccess:1,code:s}),l)})},error:function(t){var a=t.extraInfo,s=a.elapse,c=a.httpCode,u=a.errDesc;return n({isRetry:o,data:Ie(Ie({},{requestElapse:s,isSuccess:0,code:c,codeDesc:u}),l)}),r.isHttpDNS&&r.restIndex+1<r.restTotal?(r.restIndex++,je.call(r),Ne.call(r,e,{rpt:n,isRetry:o}),Promise.reject(t)):(n({data:{isLastApi:1,isSuccess:0}}),r.clear(),i.reject&&i.reject(t),p(t))}};return s.P6.ajax(d).catch((function(e){i.reject&&i.reject(e)}))}function we(e,t){var r=this;if(xe.call(this,e)&&!this.isOpened()){var n=t.rpt,o=t.isRetry;Pe.call(this,e),this.user=e.user;var i=e.promise,u=this.context.appName,l=this.context.orgName,p=this.apiUrl+"/"+l+"/"+u+"/token";if(e.agoraToken)this.grantType="agoraToken",this.getChatToken(e.agoraToken).then((function(t){h.kg.info("getChatToken result:",t),r.expirationTime=t.expire_timestamp,r.token=t.access_token,r.context.accessToken=t.access_token,r.context.restTokenData=t.access_token;var o=t.extraInfo,a=o.httpCode,s=o.elapse;i.resolve({accessToken:t.access_token,expireTimestamp:t.expire_timestamp});var c={requestName:O.c.LOGIN_BY_AGORA_TOKEN,requestUrl:p,requestElapse:s,isSuccess:1,code:a};n({data:c}),Ue.call(r,Ie(Ie({},e),{access_token:t.access_token}),n)})).catch((function(e){var t,o=a.Z.create({type:c.E.WEBIM_CONNCTION_GETROSTER_ERROR,message:"get chat token fail",data:e});i.reject(o),r.onError&&r.onError(o),null===(t=r.eventHandler)||void 0===t||t.dispatch("onError",o);var s=e.extraInfo,u=s.elapse,l=s.httpCode,h=s.errDesc,d={requestName:O.c.LOGIN_BY_AGORA_TOKEN,requestUrl:p,requestElapse:u,isSuccess:0,code:l,codeDesc:h};n({data:d}),n({data:{isLastApi:1,isSuccess:0}})}));else if(e.accessToken)this.grantType="accessToken",this.token=e.accessToken,this.context.accessToken=e.accessToken,this.context.restTokenData=e.accessToken,i.resolve({accessToken:e.accessToken}),Ue.call(this,e,n);else{this.grantType="password";var d={grant_type:"password",username:e.user,password:e.pwd,timestamp:+new Date},f=JSON.stringify(d),m={headers:{"Content-type":"application/json"},url:p,dataType:"json",data:f,success:function(t){"function"==typeof e.success&&e.success(t),r.token=t.access_token,r.context.restTokenData=t.access_token,r.context.accessToken=t.access_token,i.resolve({accessToken:t.access_token,duration:t.expires_in});var a=t.extraInfo,s=a.httpCode,c=a.elapse,u={requestName:O.c.LOGIN_BY_PWD,requestElapse:c,requestUrl:p,isSuccess:1,code:s};n({isRetry:o,data:u}),Ue.call(r,t,n)}||Ae,error:function(t){var s,u=t.extraInfo,l=u.elapse,h=u.httpCode,d=u.errDesc,f={requestName:O.c.LOGIN_BY_PWD,requestElapse:l,requestUrl:p,isSuccess:0,code:h,codeDesc:d};if(n({isRetry:o,data:f}),r.isHttpDNS&&r.restIndex+1<r.restTotal)return r.restIndex++,je.call(r),void we.call(r,e,{rpt:n,isRetry:!0});n({data:{isLastApi:1,isSuccess:0}}),r.clear(),t.error&&t.error_description?(s=a.Z.create({type:c.E.WEBIM_CONNCTION_OPEN_USERGRID_ERROR,message:t.error_description,data:t}),r.onError&&r.onError(s)):(s=a.Z.create({type:c.E.WEBIM_CONNCTION_OPEN_ERROR,message:t.error_description,data:t}),r.onError&&r.onError(s)),"function"==typeof e.error&&e.error(s),i.reject(s)}||Ae,version:"4.0.8"};s.P6.ajax(m).catch((function(e){console.warn(e)}))}s.P6.listenNetwork(Me.bind(this),ke.bind(this))}}function Me(){var e;h.kg.debug("online"),this.onOnline&&this.onOnline(),null===(e=this.eventHandler)||void 0===e||e.dispatch("onOnline"),this.sock&&1!==this.sock.readyState&&(h.kg.debug("sock.readyState:",this.sock.readyState),this.reconnect())}function ke(){var e;h.kg.debug("offline"),this.onOffline&&this.onOffline(),null===(e=this.eventHandler)||void 0===e||e.dispatch("onOffline")}function Ue(e,t){var r=this,n=this._getSock();this.sock=n;var o=function(){var e;h.kg.debug("websockt onOpen"),r.logOut=!1,t&&t({data:{isLastApi:1,isSuccess:1,accessChannel:null===(e=r.socketHost[r.hostIndex])||void 0===e?void 0:e.channel}}),"zfb"!==Se.platform&&"dd"!==Se.platform||(r.sock.readyState=1);var o=s.P6.flow([r.mSync.generateProvision,r.mSync.base64transform])();try{n.send(o)}catch(e){var i=a.Z.create({type:c.E.SDK_RUNTIME_ERROR,message:"send message error",data:e});r.onError&&r.onError(i)}},i=function(){var e,t;if(h.kg.debug("websocket onClose"),"zfb"!==Se.platform&&"dd"!==Se.platform||(r.sock.readyState=3),!r.logOut&&r.autoReconnectNumTotal<r.autoReconnectNumMax){r.reconnect();var n={type:c.E.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"};r.onError&&r.onError(n),r.autoReconnectNumTotal%r.refreshDNSIntervals==0&&"web"===Se.platform&&r.isHttpDNS&&(h.kg.debug("refresh dns config when websocket close"),Le.call(r,"refresh",{},{}))}else r.logOut?(r.clear(),r.onClosed&&r.onClosed(),null===(e=r.eventHandler)||void 0===e||e.dispatch("onDisconnected"),r.mSync.stopHeartBeat(),r.autoReconnectInterval=0,r.times=1,r.autoReconnectNumTotal=0,r.hostIndex=0):(n={type:c.E.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"},r.onError&&r.onError(n),r.onClosed&&r.onClosed(),null===(t=r.eventHandler)||void 0===t||t.dispatch("onDisconnected"),r.mSync.stopHeartBeat(),h.kg.debug("reconnect fail"),r.autoReconnectInterval=0,r.times=1,r.autoReconnectNumTotal=0,r.hostIndex=0)},u=function(e){var t=r.mSync,n=t.decodeMSync,o=t.distributeMSync;s.P6.flow([n,o])(e)};"web"===Se.platform?(n.onopen=o,n.onclose=i,n.onmessage=u):(n.onOpen(o),n.onMessage(u),n.onClose(i),n.onError((function(e){var n;h.kg.debug("mini program sock on error",e),r.onError&&r.onError({type:c.E.WEBIM_CONNECTION_ERROR,message:"on socket error",data:e}),!r.logOut&&r.autoReconnectNumTotal<r.autoReconnectNumMax&&(h.kg.debug("sock.onError reconnect",r.autoReconnectNumTotal,r.autoReconnectNumMax),r.reconnect(),r.autoReconnectNumTotal%r.refreshDNSIntervals==0&&"web"===Se.platform&&r.isHttpDNS&&(h.kg.debug("refresh dns config when websocket error"),Le.call(r,"refresh",{},{}))),t&&t({data:{isLastApi:1,isSuccess:0,accessChannel:null===(n=r.socketHost[r.hostIndex])||void 0===n?void 0:n.channel}})})))}function xe(e){if(""===e.user){var t=a.Z.create({type:c.E.WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR,message:"the user cannot be empty"});return this.onError&&this.onError(t),!1}var r=this.appKey.split("#");return!(2!==r.length||!r[0]||!r[1])||(t=a.Z.create({type:c.E.WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR,message:"the appKey is illegal"}),this.onError&&this.onError(t),!1)}function Pe(e){this.context.jid={appKey:this.appKey,name:e.user,domain:this.domain,clientResource:this.clientResource};var t=this.appKey.split("#"),r=t[0],n=t[1];this.context.root=this.root,this.context.userId=e.user,this.context.appKey=this.appKey,this.context.appName=n,this.context.orgName=r}function Le(e,t,r){var n=this,o=r.rpt,i=r.isRetry,a=this.dnsArr[this.dnsIndex]+"/easemob/server.json",c={url:a,dataType:"json",type:"GET",data:{app_key:encodeURIComponent(this.appKey)},success:function(r){var s=r.extraInfo,c=s.elapse,u=s.httpCode,l={requestUrl:a,requestName:O.c.GET_DNS,requestElapse:c,isSuccess:1,code:u};"true"===(null==r?void 0:r.enableDataReport)?(n.dataReport.setIsCollectDt(!0),n.dataReport.setIsReportDt(!0)):(n.dataReport.setIsReportDt(!1),n.dataReport.setIsCollectDt(!1)),o&&o({isRetry:i,data:l});var p=r.rest.hosts,d=n.https?"https":"http";if(h.kg.info("httpType: "+d),!p)return Promise.reject(!1);for(var f=p.filter((function(e){if(e.protocol===d)return e})),m=0;m<f.length;m++)if(f[m].protocol===d){var y=f[m];f.splice(m,1),f.unshift(y)}n.restHosts=f,n.restTotal=f.length;var g=r["msync-ws"].hosts;if(!g)return Promise.reject(!1);var v=g.filter((function(e){return e.protocol===d&&e}));n.socketHost=v,n.hostTotal=v.length,je.call(n),"refresh"!==e&&("login"===e?we.call(n,t,{rpt:o}):Ne.call(n,t,{rpt:o}))}||Ae,error:function(r){var s=r.extraInfo,c=s.elapse,u=s.httpCode,l=s.errDesc,p={requestUrl:a,requestName:O.c.GET_DNS,isSuccess:0,code:u,codeDesc:l,requestElapse:c};o&&o({isRetry:i,data:p}),h.kg.debug("getHttpDNS fail: "+n.dnsIndex),n.dnsIndex++,n.dnsIndex<n.dnsTotal&&Le.call(n,e,t,{rpt:o,isRetry:!0})}||Ae};return s.P6.ajax(c).catch((function(e){console.warn(e)}))}function je(){var e,t;if(this.restIndex>this.restTotal)return h.kg.debug("restIndex > restTotal"),"";var r="",n=this.restHosts[this.restIndex],o=n.domain,i=n.ip,a=n.port,s=this.https?"https:":"http:";return i&&"undefined"!=typeof window&&"http:"===(null===(e=null===window||void 0===window?void 0:window.location)||void 0===e?void 0:e.protocol)?r=s+"//"+i+":"+a:(r=s+"//"+o,a&&"80"!==a&&"443"!==a&&(r+=":".concat(a)),"undefined"==typeof window||window.location||(r="https://"+o),"undefined"!=typeof window&&window.location&&"file:"===(null===(t=window.location)||void 0===t?void 0:t.protocol)&&(r="https://"+o)),"undefined"==typeof window&&(r=s+"//"+o),this.apiUrl=r,r}var De=__webpack_require__(2591);n().util.Long=i(),n().configure();var Ge=n().Root.fromJSON({nested:{easemob:{nested:{pb:{nested:{MessageBody:{fields:{type:{type:"Type",id:1},from:{type:"JID",id:2},to:{type:"JID",id:3},contents:{rule:"repeated",type:"Content",id:4},ext:{rule:"repeated",type:"KeyValue",id:5},ackMessageId:{type:"uint64",id:6},msgConfig:{type:"MessageConfig",id:7},ackContent:{type:"string",id:8},meta:{type:"string",id:9}},nested:{Content:{fields:{type:{type:"Type",id:1},text:{type:"string",id:2},latitude:{type:"double",id:3},longitude:{type:"double",id:4},address:{type:"string",id:5},displayName:{type:"string",id:6},remotePath:{type:"string",id:7},secretKey:{type:"string",id:8},fileLength:{type:"int32",id:9},action:{type:"string",id:10},params:{rule:"repeated",type:"KeyValue",id:11},duration:{type:"int32",id:12},size:{type:"Size",id:13},thumbnailRemotePath:{type:"string",id:14},thumbnailSecretKey:{type:"string",id:15},thumbnailDisplayName:{type:"string",id:16},thumbnailFileLength:{type:"int32",id:17},thumbnailSize:{type:"Size",id:18},customEvent:{type:"string",id:19},customExts:{rule:"repeated",type:"KeyValue",id:20},buildingName:{type:"string",id:21}},nested:{Type:{values:{TEXT:0,IMAGE:1,VIDEO:2,LOCATION:3,VOICE:4,FILE:5,COMMAND:6,CUSTOM:7}},Size:{fields:{width:{type:"double",id:1},height:{type:"double",id:2}}}}},Type:{values:{NORMAL:0,CHAT:1,GROUPCHAT:2,CHATROOM:3,READ_ACK:4,DELIVER_ACK:5,RECALL:6,CHANNEL_ACK:7}},MessageConfig:{fields:{allowGroupAck:{type:"bool",id:1}}}}},KeyValue:{oneofs:{value:{oneof:["varintValue","floatValue","doubleValue","stringValue"]}},fields:{key:{type:"string",id:1},type:{type:"ValueType",id:2},varintValue:{type:"int64",id:3},floatValue:{type:"float",id:4},doubleValue:{type:"double",id:5},stringValue:{type:"string",id:6}},nested:{ValueType:{values:{BOOL:1,INT:2,UINT:3,LLINT:4,FLOAT:5,DOUBLE:6,STRING:7,JSON_STRING:8}}}},JID:{fields:{appKey:{type:"string",id:1},name:{type:"string",id:2},domain:{type:"string",id:3},clientResource:{type:"string",id:4}}},ConferenceBody:{fields:{sessionId:{type:"string",id:1},operation:{type:"Operation",id:2},conferenceId:{type:"string",id:3},type:{type:"Type",id:4},content:{type:"string",id:5},network:{type:"string",id:6},version:{type:"string",id:7},identity:{type:"Identity",id:8},duration:{type:"string",id:9},peerName:{type:"string",id:10},endReason:{type:"EndReason",id:11},status:{type:"Status",id:12},isDirect:{type:"bool",id:13},controlType:{type:"StreamControlType",id:14},routeFlag:{type:"int32",id:15},routeKey:{type:"string",id:16}},nested:{Status:{fields:{errorCode:{type:"int32",id:1}}},Operation:{values:{JOIN:0,INITIATE:1,ACCEPT_INITIATE:2,ANSWER:3,TERMINATE:4,REMOVE:5,STREAM_CONTROL:6,MEDIA_REQUEST:7}},Type:{values:{VOICE:0,VIDEO:1}},Identity:{values:{CALLER:0,CALLEE:1}},EndReason:{values:{HANGUP:0,NORESPONSE:1,REJECT:2,BUSY:3,FAIL:4,UNSUPPORTED:5,OFFLINE:6}},StreamControlType:{values:{PAUSE_VOICE:0,RESUME_VOICE:1,PAUSE_VIDEO:2,RESUME_VIDEO:3}}}},MSync:{fields:{version:{type:"Version",id:1,options:{default:"MSYNC_V1"}},guid:{type:"JID",id:2},auth:{type:"string",id:3},compressAlgorimth:{type:"uint32",id:4},crypto:{type:"uint32",id:5},userAgent:{type:"string",id:6},pov:{type:"uint64",id:7},command:{type:"Command",id:8},deviceId:{type:"uint32",id:10},encryptType:{rule:"repeated",type:"EncryptType",id:11,options:{packed:!1}},encryptKey:{type:"string",id:12},payload:{type:"bytes",id:9}},nested:{Version:{values:{MSYNC_V1:0,MSYNC_V2:1}},Command:{values:{SYNC:0,UNREAD:1,NOTICE:2,PROVISION:3}}}},EncryptType:{values:{ENCRYPT_NONE:0,ENCRYPT_AES_128_CBC:1,ENCRYPT_AES_256_CBC:2}},CommSyncUL:{fields:{meta:{type:"Meta",id:1},key:{type:"uint64",id:2},queue:{type:"JID",id:3},isRoam:{type:"bool",id:4},lastFullRoamKey:{type:"uint64",id:5}}},CommSyncDL:{fields:{status:{type:"Status",id:1},metaId:{type:"uint64",id:2},serverId:{type:"uint64",id:3},metas:{rule:"repeated",type:"Meta",id:4},nextKey:{type:"uint64",id:5},queue:{type:"JID",id:6},isLast:{type:"bool",id:7},timestamp:{type:"uint64",id:8},isRoam:{type:"bool",id:9}}},CommNotice:{fields:{queue:{type:"JID",id:1}}},CommUnreadUL:{fields:{}},CommUnreadDL:{fields:{status:{type:"Status",id:1},unread:{rule:"repeated",type:"MetaQueue",id:2},timestamp:{type:"uint64",id:3}}},MetaQueue:{fields:{queue:{type:"JID",id:1},n:{type:"uint32",id:2}}},Meta:{fields:{id:{type:"uint64",id:1},from:{type:"JID",id:2},to:{type:"JID",id:3},timestamp:{type:"uint64",id:4},ns:{type:"NameSpace",id:5},payload:{type:"bytes",id:6},routetype:{type:"RouteType",id:7},ext:{type:"KeyValue",id:8},meta:{type:"bytes",id:9}},nested:{NameSpace:{values:{STATISTIC:0,CHAT:1,MUC:2,ROSTER:3,CONFERENCE:4,NOTIFY:5,QUERY:6}},RouteType:{values:{ROUTE_ALL:0,ROUTE_ONLINE:1}}}},Status:{fields:{errorCode:{type:"ErrorCode",id:1},reason:{type:"string",id:2},redirectInfo:{rule:"repeated",type:"RedirectInfo",id:3}},nested:{ErrorCode:{values:{OK:0,FAIL:1,UNAUTHORIZED:2,MISSING_PARAMETER:3,WRONG_PARAMETER:4,REDIRECT:5,TOKEN_EXPIRED:6,PERMISSION_DENIED:7,NO_ROUTE:8,UNKNOWN_COMMAND:9,PB_PARSER_ERROR:10,BIND_ANOTHER_DEVICE:11,IM_FORBIDDEN:12,TOO_MANY_DEVICES:13,PLATFORM_LIMIT:14,USER_MUTED:15,ENCRYPT_DISABLE:16,ENCRYPT_ENABLE:17,DECRYPT_FAILURE:18,PERMISSION_DENIED_EXTERNAL:19}}}},RedirectInfo:{fields:{host:{type:"string",id:1},port:{type:"uint32",id:2}}},Provision:{fields:{osType:{type:"OsType",id:1},version:{type:"string",id:2},networkType:{type:"NetworkType",id:3},appSign:{type:"string",id:4},compressType:{rule:"repeated",type:"CompressType",id:5,options:{packed:!1}},encryptType:{rule:"repeated",type:"EncryptType",id:6,options:{packed:!1}},encryptKey:{type:"string",id:7},status:{type:"Status",id:8},deviceUuid:{type:"string",id:9},isManualLogin:{type:"bool",id:10},password:{type:"string",id:11},deviceName:{type:"string",id:12},resource:{type:"string",id:13},auth:{type:"string",id:14},serviceId:{type:"string",id:16},actionVersion:{type:"string",id:17}},nested:{OsType:{values:{OS_IOS:0,OS_ANDROID:1,OS_LINUX:2,OS_OSX:3,OS_WIN:4,OS_OTHER:16}},NetworkType:{values:{NETWORK_NONE:0,NETWORK_WIFI:1,NETWORK_4G:2,NETWORK_3G:3,NETWORK_2G:4,NETWORK_WIRE:5}},CompressType:{values:{COMPRESS_NONE:0,COMPRESS_ZLIB:1}}}},MUCBody:{fields:{mucId:{type:"JID",id:1},operation:{type:"Operation",id:2},from:{type:"JID",id:3},to:{rule:"repeated",type:"JID",id:4},setting:{type:"Setting",id:5},reason:{type:"string",id:6},isChatroom:{type:"bool",id:7},status:{type:"Status",id:8},isThread:{type:"bool",id:9},mucParentId:{type:"JID",id:10},mucName:{type:"string",id:11}},nested:{Operation:{values:{CREATE:0,DESTROY:1,JOIN:2,LEAVE:3,APPLY:4,APPLY_ACCEPT:5,APPLY_DECLINE:6,INVITE:7,INVITE_ACCEPT:8,INVITE_DECLINE:9,KICK:10,GET_BLACKLIST:11,BAN:12,ALLOW:13,UPDATE:14,BLOCK:15,UNBLOCK:16,PRESENCE:17,ABSENCE:18,DIRECT_JOINED:19,ASSIGN_OWNER:20,ADD_ADMIN:21,REMOVE_ADMIN:22,ADD_MUTE:23,REMOVE_MUTE:24,UPDATE_ANNOUNCEMENT:25,DELETE_ANNOUNCEMENT:26,UPLOAD_FILE:27,DELETE_FILE:28,ADD_USER_WHITE_LIST:29,REMOVE_USER_WHITE_LIST:30,BAN_GROUP:31,REMOVE_BAN_GROUP:32,THREAD_CREATE:33,THREAD_DESTROY:34,THREAD_JOIN:35,THREAD_LEAVE:36,THREAD_KICK:37,THREAD_UPDATE:38,THREAD_PRESENCE:39,THREAD_ABSENCE:40,DISABLE_GROUP:41,ABLE_GROUP:42,SET_METADATA:43,DELETE_METADATA:44}},Setting:{fields:{name:{type:"string",id:1},desc:{type:"string",id:2},type:{type:"Type",id:3},maxUsers:{type:"int32",id:4},owner:{type:"string",id:5}},nested:{Type:{values:{PRIVATE_OWNER_INVITE:0,PRIVATE_MEMBER_INVITE:1,PUBLIC_JOIN_APPROVAL:2,PUBLIC_JOIN_OPEN:3,PUBLIC_ANONYMOUS:4}}}},Status:{fields:{errorCode:{type:"ErrorCode",id:1},description:{type:"string",id:2}},nested:{ErrorCode:{values:{OK:0,PERMISSION_DENIED:1,WRONG_PARAMETER:2,MUC_NOT_EXIST:3,USER_NOT_EXIST:4,UNKNOWN:5}}}}}},RosterBody:{fields:{operation:{type:"Operation",id:1},status:{type:"Status",id:2},from:{type:"JID",id:3},to:{rule:"repeated",type:"JID",id:4},reason:{type:"string",id:5},rosterVer:{type:"string",id:6},biDirection:{type:"bool",id:7}},nested:{Operation:{values:{GET_ROSTER:0,GET_BLACKLIST:1,ADD:2,REMOVE:3,ACCEPT:4,DECLINE:5,BAN:6,ALLOW:7,REMOTE_ACCEPT:8,REMOTE_DECLINE:9}},Status:{fields:{errorCode:{type:"ErrorCode",id:1},description:{type:"string",id:2}},nested:{ErrorCode:{values:{OK:0,USER_NOT_EXIST:1,USER_ALREADY_FRIEND:2,USER_ALREADY_BLACKLIST:3}}}}}},StatisticsBody:{fields:{operation:{type:"Operation",id:1},os:{type:"OsType",id:2},version:{type:"string",id:3},network:{type:"NetworkType",id:4},imTime:{type:"uint32",id:5},chatTime:{type:"uint32",id:6},location:{type:"string",id:7}},nested:{Operation:{values:{INFORMATION:0,USER_REMOVED:1,USER_LOGIN_ANOTHER_DEVICE:2,USER_KICKED_BY_CHANGE_PASSWORD:3,USER_KICKED_BY_OTHER_DEVICE:4}},OsType:{values:{OS_IOS:0,OS_ANDROID:1,OS_LINUX:2,OS_OSX:3,OS_WIN:4,OS_OTHER:16}},NetworkType:{values:{NETWORK_NONE:0,NETWORK_WIFI:1,NETWORK_4G:2,NETWORK_3G:3,NETWORK_2G:4,NETWORK_WIRE:5}}}}}}}}}});Ce.prototype.root=Ge;var Be=h.kg.getLogger("IM-SDK-LOG");Be.setConfig({useCache:!1,maxCache:3145728,color:"",background:""}),Be.enableAll(),Ce.prototype._getSock=function(){if(this.isHttpDNS){var e=this.socketHost[this.hostIndex];if(!e)throw this.autoReconnectInterval=0,this.times=1,this.autoReconnectNumTotal=0,this.hostIndex=0,this.onClosed&&this.onClosed(),new Error("No connected domain name when get websocket.");var r=e.domain,n=e.ip,o="",i=e.port;o=r||n,i&&"80"!==i&&"443"!==i&&(o+=":"+i),o&&(this.url="//"+o+"/ws");var a=this.https?"https:":"http:";this.url=a+this.url}return new(t())(this.url)},Ce.prototype.getUniqueId=s.P6.getUniqueId;var He={connection:Ce,message:De.Message,utils:s.P6,logger:Be,statusCode:c.E};"undefined"!=typeof window&&(window.WebIM=He);var Fe=He}(),__webpack_exports__}()}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.websdk=t():e.websdk=t()}(this,(function(){return function(){var __webpack_modules__={5317:function(e){"use strict";e.exports=function(e,t){for(var r=new Array(arguments.length-1),n=0,o=2,i=!0;o<arguments.length;)r[n++]=arguments[o++];return new Promise((function(o,a){r[n]=function(e){if(i)if(i=!1,e)a(e);else{for(var t=new Array(arguments.length-1),r=0;r<t.length;)t[r++]=arguments[r];o.apply(null,t)}};try{e.apply(t||null,r)}catch(e){i&&(i=!1,a(e))}}))}},8660:function(e,t){"use strict";var r=t;r.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var n=new Array(64),o=new Array(123),i=0;i<64;)o[n[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;r.encode=function(e,t,r){for(var o,i=null,a=[],s=0,c=0;t<r;){var u=e[t++];switch(c){case 0:a[s++]=n[u>>2],o=(3&u)<<4,c=1;break;case 1:a[s++]=n[o|u>>4],o=(15&u)<<2,c=2;break;case 2:a[s++]=n[o|u>>6],a[s++]=n[63&u],c=0}s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,a)),s=0)}return c&&(a[s++]=n[o],a[s++]=61,1===c&&(a[s++]=61)),i?(s&&i.push(String.fromCharCode.apply(String,a.slice(0,s))),i.join("")):String.fromCharCode.apply(String,a.slice(0,s))};var a="invalid encoding";r.decode=function(e,t,r){for(var n,i=r,s=0,c=0;c<e.length;){var u=e.charCodeAt(c++);if(61===u&&s>1)break;if(void 0===(u=o[u]))throw Error(a);switch(s){case 0:n=u,s=1;break;case 1:t[r++]=n<<2|(48&u)>>4,n=u,s=2;break;case 2:t[r++]=(15&n)<<4|(60&u)>>2,n=u,s=3;break;case 3:t[r++]=(3&n)<<6|u,s=0}}if(1===s)throw Error(a);return r-i},r.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},4495:function(e){"use strict";function t(e,r){"string"==typeof e&&(r=e,e=void 0);var n=[];function o(e){if("string"!=typeof e){var r=i();if(t.verbose&&console.log("codegen: "+r),r="return "+r,e){for(var a=Object.keys(e),s=new Array(a.length+1),c=new Array(a.length),u=0;u<a.length;)s[u]=a[u],c[u]=e[a[u++]];return s[u]=r,Function.apply(null,s).apply(null,c)}return Function(r)()}for(var l=new Array(arguments.length-1),p=0;p<l.length;)l[p]=arguments[++p];if(p=0,e=e.replace(/%([%dfijs])/g,(function(e,t){var r=l[p++];switch(t){case"d":case"f":return String(Number(r));case"i":return String(Math.floor(r));case"j":return JSON.stringify(r);case"s":return String(r)}return"%"})),p!==l.length)throw Error("parameter count mismatch");return n.push(e),o}function i(t){return"function "+(t||r||"")+"("+(e&&e.join(",")||"")+"){\n "+n.join("\n ")+"\n}"}return o.toString=i,o}e.exports=t,t.verbose=!1},3745:function(e){"use strict";function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],n=0;n<r.length;)r[n].fn===t?r.splice(n,1):++n;return this},t.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},8551:function(e,t,r){"use strict";e.exports=i;var n=r(5317),o=r(491)("fs");function i(e,t,r){return"function"==typeof t?(r=t,t={}):t||(t={}),r?!t.xhr&&o&&o.readFile?o.readFile(e,(function(n,o){return n&&"undefined"!=typeof XMLHttpRequest?i.xhr(e,t,r):n?r(n):r(null,t.binary?o:o.toString("utf8"))})):i.xhr(e,t,r):n(i,this,e,t)}i.xhr=function(e,t,r){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===n.readyState){if(0!==n.status&&200!==n.status)return r(Error("status "+n.status));if(t.binary){var e=n.response;if(!e){e=[];for(var o=0;o<n.responseText.length;++o)e.push(255&n.responseText.charCodeAt(o))}return r(null,"undefined"!=typeof Uint8Array?new Uint8Array(e):e)}return r(null,n.responseText)}},t.binary&&("overrideMimeType"in n&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.responseType="arraybuffer"),n.open("GET",e),n.send()}},9059:function(e){"use strict";function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),n=128===r[3];function o(e,n,o){t[0]=e,n[o]=r[0],n[o+1]=r[1],n[o+2]=r[2],n[o+3]=r[3]}function i(e,n,o){t[0]=e,n[o]=r[3],n[o+1]=r[2],n[o+2]=r[1],n[o+3]=r[0]}function a(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],t[0]}function s(e,n){return r[3]=e[n],r[2]=e[n+1],r[1]=e[n+2],r[0]=e[n+3],t[0]}e.writeFloatLE=n?o:i,e.writeFloatBE=n?i:o,e.readFloatLE=n?a:s,e.readFloatBE=n?s:a}():function(){function t(e,t,r,n){var o=t<0?1:0;if(o&&(t=-t),0===t)e(1/t>0?0:2147483648,r,n);else if(isNaN(t))e(2143289344,r,n);else if(t>34028234663852886e22)e((o<<31|2139095040)>>>0,r,n);else if(t<11754943508222875e-54)e((o<<31|Math.round(t/1401298464324817e-60))>>>0,r,n);else{var i=Math.floor(Math.log(t)/Math.LN2);e((o<<31|i+127<<23|8388607&Math.round(t*Math.pow(2,-i)*8388608))>>>0,r,n)}}function a(e,t,r){var n=e(t,r),o=2*(n>>31)+1,i=n>>>23&255,a=8388607&n;return 255===i?a?NaN:o*(1/0):0===i?1401298464324817e-60*o*a:o*Math.pow(2,i-150)*(a+8388608)}e.writeFloatLE=t.bind(null,r),e.writeFloatBE=t.bind(null,n),e.readFloatLE=a.bind(null,o),e.readFloatBE=a.bind(null,i)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=128===r[7];function o(e,n,o){t[0]=e,n[o]=r[0],n[o+1]=r[1],n[o+2]=r[2],n[o+3]=r[3],n[o+4]=r[4],n[o+5]=r[5],n[o+6]=r[6],n[o+7]=r[7]}function i(e,n,o){t[0]=e,n[o]=r[7],n[o+1]=r[6],n[o+2]=r[5],n[o+3]=r[4],n[o+4]=r[3],n[o+5]=r[2],n[o+6]=r[1],n[o+7]=r[0]}function a(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],r[4]=e[n+4],r[5]=e[n+5],r[6]=e[n+6],r[7]=e[n+7],t[0]}function s(e,n){return r[7]=e[n],r[6]=e[n+1],r[5]=e[n+2],r[4]=e[n+3],r[3]=e[n+4],r[2]=e[n+5],r[1]=e[n+6],r[0]=e[n+7],t[0]}e.writeDoubleLE=n?o:i,e.writeDoubleBE=n?i:o,e.readDoubleLE=n?a:s,e.readDoubleBE=n?s:a}():function(){function t(e,t,r,n,o,i){var a=n<0?1:0;if(a&&(n=-n),0===n)e(0,o,i+t),e(1/n>0?0:2147483648,o,i+r);else if(isNaN(n))e(0,o,i+t),e(2146959360,o,i+r);else if(n>17976931348623157e292)e(0,o,i+t),e((a<<31|2146435072)>>>0,o,i+r);else{var s;if(n<22250738585072014e-324)e((s=n/5e-324)>>>0,o,i+t),e((a<<31|s/4294967296)>>>0,o,i+r);else{var c=Math.floor(Math.log(n)/Math.LN2);1024===c&&(c=1023),e(4503599627370496*(s=n*Math.pow(2,-c))>>>0,o,i+t),e((a<<31|c+1023<<20|1048576*s&1048575)>>>0,o,i+r)}}}function a(e,t,r,n,o){var i=e(n,o+t),a=e(n,o+r),s=2*(a>>31)+1,c=a>>>20&2047,u=4294967296*(1048575&a)+i;return 2047===c?u?NaN:s*(1/0):0===c?5e-324*s*u:s*Math.pow(2,c-1075)*(u+4503599627370496)}e.writeDoubleLE=t.bind(null,r,0,4),e.writeDoubleBE=t.bind(null,n,4,0),e.readDoubleLE=a.bind(null,o,0,4),e.readDoubleBE=a.bind(null,i,4,0)}(),e}function r(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function n(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function o(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function i(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},491:function(module){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},7460:function(e,t){"use strict";var r=t,n=r.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},o=r.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),r=n(e),o="";r&&(o=t.shift()+"/");for(var i=0;i<t.length;)".."===t[i]?i>0&&".."!==t[i-1]?t.splice(--i,2):r?t.splice(i,1):++i:"."===t[i]?t.splice(i,1):++i;return o+t.join("/")};r.resolve=function(e,t,r){return r||(t=o(t)),n(t)?t:(r||(e=o(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?o(e+"/"+t):t)}},8601:function(e){"use strict";e.exports=function(e,t,r){var n=r||8192,o=n>>>1,i=null,a=n;return function(r){if(r<1||r>o)return e(r);a+r>n&&(i=e(n),a=0);var s=t.call(i,a,a+=r);return 7&a&&(a=1+(7|a)),s}}},8375:function(e,t){"use strict";var r=t;r.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)(r=e.charCodeAt(n))<128?t+=1:r<2048?t+=2:55296==(64512&r)&&56320==(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},r.read=function(e,t,r){if(r-t<1)return"";for(var n,o=null,i=[],a=0;t<r;)(n=e[t++])<128?i[a++]=n:n>191&&n<224?i[a++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,i[a++]=55296+(n>>10),i[a++]=56320+(1023&n)):i[a++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),a=0);return o?(a&&o.push(String.fromCharCode.apply(String,i.slice(0,a))),o.join("")):String.fromCharCode.apply(String,i.slice(0,a))},r.write=function(e,t,r){for(var n,o,i=r,a=0;a<e.length;++a)(n=e.charCodeAt(a))<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296==(64512&n)&&56320==(64512&(o=e.charCodeAt(a+1)))?(n=65536+((1023&n)<<10)+(1023&o),++a,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-i}},5491:function(e,t,r){var n,o,i;!function(a){"use strict";if(null!=t&&"number"!=typeof t.nodeType)e.exports=a();else if(null!=r.amdO)o=[],void 0===(i="function"==typeof(n=a)?n.apply(t,o):n)||(e.exports=i);else{var s=a(),c="undefined"!=typeof self?self:$.global;"function"!=typeof c.btoa&&(c.btoa=s.btoa),"function"!=typeof c.atob&&(c.atob=s.atob)}}((function(){"use strict";var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function t(e){this.message=e}return t.prototype=new Error,t.prototype.name="InvalidCharacterError",{btoa:function(r){for(var n,o,i=String(r),a=0,s=e,c="";i.charAt(0|a)||(s="=",a%1);c+=s.charAt(63&n>>8-a%1*8)){if((o=i.charCodeAt(a+=3/4))>255)throw new t("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");n=n<<8|o}return c},atob:function(r){var n=String(r).replace(/[=]+$/,"");if(n.length%4==1)throw new t("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,i,a=0,s=0,c="";i=n.charAt(s++);~i&&(o=a%4?64*o+i:i,a++%4)?c+=String.fromCharCode(255&o>>(-2*a&6)):0)i=e.indexOf(i);return c}}}))},7800:function(e,t,r){"use strict";r.r(t),r.d(t,{addUsersToChatRoom:function(){return E},addUsersToChatRoomAllowlist:function(){return z},addUsersToChatRoomWhitelist:function(){return V},blockChatRoomMember:function(){return P},blockChatRoomMembers:function(){return j},chatRoomBlockMulti:function(){return L},chatRoomBlockSingle:function(){return x},createChatRoom:function(){return p},deleteChatRoomSharedFile:function(){return ie},destroyChatRoom:function(){return h},disableSendChatRoomMsg:function(){return Z},enableSendChatRoomMsg:function(){return K},fetchChatRoomAnnouncement:function(){return re},fetchChatRoomSharedFileList:function(){return ae},getChatRoomAdmin:function(){return S},getChatRoomAllowlist:function(){return Q},getChatRoomAttributes:function(){return ce},getChatRoomBlacklist:function(){return W},getChatRoomBlacklistNew:function(){return F},getChatRoomBlocklist:function(){return q},getChatRoomDetails:function(){return d},getChatRoomMuteList:function(){return k},getChatRoomMuted:function(){return M},getChatRoomMutelist:function(){return U},getChatRoomSharedFilelist:function(){return se},getChatRoomWhitelist:function(){return $},getChatRooms:function(){return l},isChatRoomWhiteUser:function(){return ee},isInChatRoomAllowlist:function(){return te},joinChatRoom:function(){return _},leaveChatRoom:function(){return O},listChatRoomMember:function(){return R},listChatRoomMembers:function(){return I},modifyChatRoom:function(){return f},muteChatRoomMember:function(){return A},quitChatRoom:function(){return T},removeChatRoomAdmin:function(){return C},removeChatRoomAllowlistMember:function(){return Y},removeChatRoomAttribute:function(){return he},removeChatRoomAttributes:function(){return pe},removeChatRoomBlockMulti:function(){return B},removeChatRoomBlockSingle:function(){return D},removeChatRoomMember:function(){return y},removeChatRoomMembers:function(){return v},removeChatRoomWhitelistMember:function(){return X},removeMultiChatRoomMember:function(){return g},removeMuteChatRoomMember:function(){return N},removeSingleChatRoomMember:function(){return m},rmUsersFromChatRoomWhitelist:function(){return J},setChatRoomAdmin:function(){return b},setChatRoomAttribute:function(){return le},setChatRoomAttributes:function(){return ue},unblockChatRoomMember:function(){return G},unblockChatRoomMembers:function(){return H},unmuteChatRoomMember:function(){return w},updateChatRoomAnnouncement:function(){return ne},uploadChatRoomSharedFile:function(){return oe}}),r(900),r(3814),r(8668),r(514),r(4201),r(7095),r(3529),r(3535),r(7521),r(6864),r(1685),r(2486),r(4261);var n=r(3365),o=r(7480),i=r(7551),a=r(1222),s=r(6916),c=r(3681);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function l(e){var t=this;if("number"!=typeof e.pagenum||"number"!=typeof e.pagesize)throw Error("Invalid parameter");if(!a.XZ.call(this)){var r=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(r)}var u={pagenum:e.pagenum||1,pagesize:e.pagesize||20},l=this.context,p=l.orgName,h=l.appName,d=l.accessToken,f={url:this.apiUrl+"/"+p+"/"+h+"/chatrooms",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+d},data:u,success:function(t){"function"==typeof e.success&&e.success(t)},error:function(r){r.error&&r.error_description&&t.onError&&t.onError({type:n.E.WEBIM_CONNCTION_LOAD_CHATROOM_ERROR,message:r.error_description,data:r}),"function"==typeof e.error&&e.error(r)}};return s.kg.debug("Call getChatRooms",e),i.hj.call(this,f,c.fI.GET_CHATROOM_LIST)}function p(e){if("string"!=typeof e.name)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r={name:e.name,description:e.description,maxusers:e.maxusers,owner:this.user,members:e.members},u=this.context,l=u.orgName,p=u.appName,h=(u.accessToken,u.jid),d={url:"".concat(this.apiUrl,"/").concat(l,"/").concat(p,"/chatrooms?resource=").concat(h.clientResource),dataType:"json",type:"POST",data:JSON.stringify(r),headers:{Authorization:"Bearer "+e.token||0,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call createChatRoom",e),i.hj.call(this,d,c.fI.CREATE_CHATROOM)}function h(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=(r.accessToken,r.jid),h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(e.chatRoomId,"?resource=").concat(p.clientResource),dataType:"json",type:"DELETE",headers:{Authorization:"Bearer "+e.token||0},success:e.success,error:e.error};return s.kg.debug("Call destroyChatRoom",e),i.hj.call(this,h,c.fI.DESTROY_CHATROOM)}function d(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h={url:this.apiUrl+"/"+u+"/"+l+"/chatrooms/"+e.chatRoomId,dataType:"json",type:"GET",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getChatRoomDetails",e),i.hj.call(this,h,c.fI.GET_CHATROOM_DETAIL)}function f(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f={groupname:e.chatRoomName,description:e.description,maxusers:e.maxusers},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"?resource=").concat(h.clientResource),type:"PUT",data:JSON.stringify(f),dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call modifyChatRoom",e),i.hj.call(this,m,c.fI.MODIFY_CHATROOM)}function m(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId||"string"!=typeof e.username)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/users/").concat(f,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeChatRoomMember",e),i.hj.call(this,m,c.fI.REMOVE_CHATROOM_MEMBER)}var y=m;function g(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId||!Array.isArray(e.users))throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=e.chatRoomId,u=e.users.join(","),l=this.context,p=l.orgName,h=l.appName,d=l.accessToken,f=l.jid,m={url:"".concat(this.apiUrl,"/").concat(p,"/").concat(h,"/chatrooms/").concat(r,"/users/").concat(u,"?resource=").concat(f.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeChatRoomMembers",e),i.hj.call(this,m,c.fI.MULTI_REMOVE_CHATROOM_MEMBER)}var v=g;function E(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId||!Array.isArray(e.users))throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=e.chatRoomId,u={usernames:e.users},l=this.context,p=l.orgName,h=l.appName,d=l.accessToken,f=l.jid,m={url:"".concat(this.apiUrl,"/").concat(p,"/").concat(h,"/chatrooms/").concat(r,"/users?resource=").concat(f.clientResource),type:"POST",data:JSON.stringify(u),dataType:"json",headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call addUsersToChatRoom",e),i.hj.call(this,m,c.fI.ADD_USERS_TO_CHATROOM)}function _(e){if("string"!=typeof e.roomId||""===e.roomId)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(e.roomId,"/apply?resource=").concat(h.clientResource),dataType:"json",type:"POST",data:JSON.stringify({message:e.message||""}),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call joinChatRoom",e),i.hj.call(this,d,c.fI.JOIN_CHATROOM)}function T(e){var t=this;if("string"!=typeof e.roomId||""===e.roomId)throw Error("Invalid parameter");if(!a.XZ.call(this)){var r=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(r)}var u=this.context,l=u.orgName,p=u.appName,h=u.accessToken,d=u.jid,f={url:"".concat(this.apiUrl,"/").concat(l,"/").concat(p,"/chatrooms/").concat(e.roomId,"/quit?resource=").concat(d.clientResource),dataType:"json",type:"DELETE",headers:{Authorization:"Bearer "+h},success:function(r){t._load_msg_cache=t._load_msg_cache.filter((function(t){return(!t.isGroup||t.to!==e.roomId)&&t})),"function"==typeof e.success&&e.success(r)},error:e.error};return s.kg.debug("Call leaveChatRoom",e),i.hj.call(this,f,c.fI.QUIT_CHATROOM)}var O=T;function R(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(isNaN(e.pageNum)||e.pageNum<=0)throw Error('The parameter "pageNum" should be a positive number');if(isNaN(e.pageSize)||e.pageSize<=0)throw Error('The parameter "pageSize" should be a positive number');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r={pagenum:e.pageNum,pagesize:e.pageSize},u=this.context,l=u.orgName,p=u.appName,h=u.accessToken,d={url:this.apiUrl+"/"+l+"/"+p+"/chatrooms/"+e.chatRoomId+"/users",dataType:"json",type:"GET",data:r,headers:{Authorization:"Bearer "+h,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call listChatRoomMembers",e),i.hj.call(this,d,c.fI.LIST_CHATROOM_MEMBERS)}var I=R;function S(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.chatRoomId,d={url:this.apiUrl+"/"+u+"/"+l+"/chatrooms/"+h+"/admin",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getChatRoomAdmin",e),i.hj.call(this,d,c.fI.GET_CHATROOM_ADMIN)}function b(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f={newadmin:e.username},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/admin?resource=").concat(h.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call setChatRoomAdmin",e),i.hj.call(this,m,c.fI.SET_CHATROOM_ADMIN)}function C(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/admin/").concat(f,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeChatRoomAdmin",e),i.hj.call(this,m,c.fI.REMOVE_CHATROOM_ADMIN)}function A(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if("number"!=typeof e.muteDuration)throw Error('Invalid parameter: "muteDuration"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f={usernames:[e.username],mute_duration:e.muteDuration},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/mute?resource=").concat(h.clientResource),dataType:"json",type:"POST",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},data:JSON.stringify(f),success:e.success,error:e.error};return s.kg.debug("Call muteChatRoomMember",e),i.hj.call(this,m,c.fI.MUTE_CHATROOM_MEMBER)}function N(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/mute/").concat(f,"?resource=").concat(h.clientResource),dataType:"json",type:"DELETE",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call unmuteChatRoomMember",e),i.hj.call(this,m,c.fI.REMOVE_MUTE_CHATROOM_MEMBER)}var w=N;function M(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.chatRoomId,d={url:this.apiUrl+"/"+u+"/"+l+"/chatrooms/"+h+"/mute",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getChatRoomMutelist",e),i.hj.call(this,d,c.fI.GET_MUTE_CHATROOM_MEMBERS)}var k=M,U=M;function x(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/blocks/users/").concat(f,"?resource=").concat(h.clientResource),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call blockChatRoomMember",e),i.hj.call(this,m,c.fI.SET_CHATROOM_MEMBER_TO_BLACK)}var P=x;function L(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!Array.isArray(e.usernames))throw Error('Invalid parameter: "usernames"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f={usernames:e.usernames},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/blocks/users?resource=").concat(h.clientResource),data:JSON.stringify(f),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Chat blockChatRoomMembers:",m),i.hj.call(this,m,c.fI.MULTI_SET_CHATROOM_MEMBER_TO_BLACK)}var j=L;function D(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/blocks/users/").concat(f,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call unblockChatRoomMember",e),i.hj.call(this,m,c.fI.REMOVE_CHATROOM_MEMBER_BLACK)}var G=D;function B(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!Array.isArray(e.usernames))throw Error('Invalid parameter: "usernames"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f=e.usernames.join(","),m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/blocks/users/").concat(f,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call unblockChatRoomMembers",e),i.hj.call(this,m,c.fI.MULTI_REMOVE_CHATROOM_MEMBER_BLACK)}var H=B;function F(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.chatRoomId,d={url:this.apiUrl+"/"+u+"/"+l+"/chatrooms/"+h+"/blocks/users",type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getChatRoomBlocklist",e),i.hj.call(this,d,c.fI.GET_CHATROOM_BLOCK_MEMBERS)}var W=F,q=F;function Z(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/ban?resource=").concat(h.clientResource),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call disableSendChatRoomMsg",e),i.hj.call(this,f,c.fI.DISABLED_CHATROOM_SEND_MSG)}function K(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/ban?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call enableSendChatRoomMsg",e),i.hj.call(this,f,c.fI.ENABLE_CHATROOM_SEND_MSG)}function V(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!Array.isArray(e.users))throw Error('Invalid parameter: "users"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f={usernames:e.users},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/white/users?resource=").concat(h.clientResource),type:"POST",data:JSON.stringify(f),dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call addUsersToChatRoomWhitelist",e),i.hj.call(this,m,c.fI.ADD_USERS_TO_CHATROOM)}var z=V;function J(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if("string"!=typeof e.userName||""===e.userName)throw Error('Invalid parameter: "userName"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.chatRoomId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/white/users/").concat(e.userName,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeChatRoomAllowlistMember",e),i.hj.call(this,f,c.fI.REMOVE_CHATROOM_WHITE_USERS)}var X=J,Y=J;function $(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.chatRoomId,d={url:this.apiUrl+"/"+u+"/"+l+"/chatrooms/"+h+"/white/users",type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getChatRoomAllowlist",e),i.hj.call(this,d,c.fI.GET_CHATROOM_WHITE_USERS)}var Q=$;function ee(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error('Invalid parameter: "chatRoomId"');if("string"!=typeof e.userName||""===e.userName)throw Error('Invalid parameter: "userName"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.chatRoomId,d={url:this.apiUrl+"/"+u+"/"+l+"/chatrooms/"+h+"/white/users/"+e.userName,type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call isInChatRoomAllowlist",e),i.hj.call(this,d,c.fI.CHECK_CHATROOM_WHITE_USER)}var te=ee;function re(e){if("string"!=typeof e.roomId||""===e.roomId)throw Error('Invalid parameter: "roomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.roomId,d={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(h,"/announcement"),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call fetchChatRoomAnnouncement",e),i.hj.call(this,d,c.fI.GET_CHATROOM_ANN)}function ne(e){if("string"!=typeof e.roomId||""===e.roomId)throw Error('Invalid parameter: "roomId"');if("string"!=typeof e.announcement)throw Error('Invalid parameter: "announcement"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.roomId,f={announcement:e.announcement},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/announcement?resource=").concat(h.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call updateChatRoomAnnouncement:",e),i.hj.call(this,m,c.fI.UPDATE_CHATROOM_ANN)}function oe(e){if("string"!=typeof e.roomId||""===e.roomId)throw Error('Invalid parameter: "roomId"');if("object"!==u(e.file))throw Error('Invalid parameter: "file"');if(a.XZ.call(this)){var t=this.context,r=t.orgName,n=t.appName,o=t.accessToken,l=t.jid,p=e.roomId;i.cT.call(this,{uploadUrl:"".concat(this.apiUrl,"/").concat(r,"/").concat(n,"/chatrooms/").concat(p,"/share_files?resource=").concat(l.clientResource),onFileUploadProgress:e.onFileUploadProgress,onFileUploadComplete:e.onFileUploadComplete,onFileUploadError:e.onFileUploadError,onFileUploadCanceled:e.onFileUploadCanceled,accessToken:o,apiUrl:this.apiUrl,file:e.file,appKey:this.context.appKey},c.fI.UPLOAD_CHATROOM_FILE),s.kg.debug("Call uploadChatRoomSharedFile",e)}}function ie(e){if("string"!=typeof e.roomId||""===e.roomId)throw Error('Invalid parameter: "roomId"');if("string"!=typeof e.fileId||""===e.fileId)throw Error('Invalid parameter: "fileId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.roomId,f=e.fileId,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(d,"/share_files/").concat(f,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call deleteChatRoomSharedFile",e),i.hj.call(this,m,c.fI.DELETE_CHATROOM_FILE)}function ae(e){if("string"!=typeof e.roomId||""===e.roomId)throw Error('Invalid parameter: "roomId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.roomId,d={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatrooms/").concat(h,"/share_files"),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json",accept:"application/json"},success:e.success,error:e.error};return s.kg.debug("Call fetchChatRoomSharedFileList",e),i.hj.call(this,d,c.fI.GET_CHATROOM_FILES)}var se=ae;function ce(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter chatRoomId: "+e.chatRoomId);if(e.attributeKeys&&!Array.isArray(e.attributeKeys))throw Error('"Invalid parameter attributeKeys": '+e.attributeKeys);if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.orgName,u=r.appName,l=r.accessToken,p=(r.jid,e.chatRoomId),h={keys:e.attributeKeys},d={url:"".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/metadata/chatroom/").concat(p),type:"POST",dataType:"json",data:JSON.stringify(h),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"}};return s.kg.debug("Call getChatRoomAttributes:",e),i.hj.call(this,d).then((function(e){return{data:e.data,type:e.type}}))}function ue(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter chatRoomId: "+e.chatRoomId);if("object"!==u(e.attributes))throw Error("Invalid parameter attributes: "+e.attributes);if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.orgName,l=r.appName,p=r.accessToken,h=r.userId,d=e.chatRoomId,f=e.attributes,m=e.autoDelete,y=void 0===m||m,g=e.isForced?"/forced":"",v={metaData:f,autoDelete:y?"DELETE":"NO_DELETE"},E={url:"".concat(this.apiUrl,"/").concat(c,"/").concat(l,"/metadata/chatroom/").concat(d,"/user/").concat(h)+g,type:"PUT",dataType:"json",data:JSON.stringify(v),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"}};return s.kg.debug("Call setChatRoomAttributes:",e),i.hj.call(this,E).then((function(e){return(0,a._W)(e)}))}function le(e){var t;if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter chatRoomId: "+e.chatRoomId);if("string"!=typeof e.attributeKey||""===e.attributeKey)throw Error("Invalid parameter attributeKey: "+e.attributeKey);if("string"!=typeof e.attributeValue||""===e.attributeValue)throw Error("Invalid parameter attributeValue: "+e.attributeValue);if(!a.XZ.call(this)){var r=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(r)}var c=this.context,u=c.orgName,l=c.appName,p=c.accessToken,h=c.userId,d=e.chatRoomId,f=e.attributeKey,m=e.attributeValue,y=e.autoDelete,g=void 0===y||y,v=e.isForced?"/forced":"",E={metaData:(t={},t[f]=m,t),autoDelete:g?"DELETE":"NO_DELETE"},_={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/metadata/chatroom/").concat(d,"/user/").concat(h)+v,type:"PUT",dataType:"json",data:JSON.stringify(E),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"}};return s.kg.debug("Call setChatRoomAttribute:",e),i.hj.call(this,_).then((function(e){var t=(0,a.H7)(e);if(t)throw t}))}function pe(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter chatRoomId: "+e.chatRoomId);if(!Array.isArray(e.attributeKeys))throw Error('"Invalid parameter attributes": '+e.attributeKeys);if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.orgName,u=r.appName,l=r.accessToken,p=r.userId,h=e.chatRoomId,d=e.attributeKeys,f=e.isForced?"/forced":"",m={keys:d},y={url:"".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/metadata/chatroom/").concat(h,"/user/").concat(p)+f,type:"DELETE",dataType:"json",data:JSON.stringify(m),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"}};return s.kg.debug("Call removeChatRoomAttributes:",e),i.hj.call(this,y).then((function(e){return(0,a._W)(e)}))}function he(e){if("string"!=typeof e.chatRoomId||""===e.chatRoomId)throw Error("Invalid parameter chatRoomId: "+e.chatRoomId);if("string"!=typeof e.attributeKey||""===e.attributeKey)throw Error('"Invalid parameter attributeKey": '+e.attributeKey);if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.orgName,u=r.appName,l=r.accessToken,p=r.userId,h=e.chatRoomId,d=e.attributeKey,f=e.isForced?"/forced":"",m={keys:[d]},y={url:"".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/metadata/chatroom/").concat(h,"/user/").concat(p)+f,type:"DELETE",dataType:"json",data:JSON.stringify(m),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"}};return s.kg.debug("Call removeChatRoomAttribute:",e),i.hj.call(this,y).then((function(e){var t=(0,a.H7)(e);if(t)throw t}))}},2006:function(e,t,r){"use strict";r.d(t,{w:function(){return i}}),r(8327),r(5980);var n=r(6916),o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)};function i(e){var t,r,i=e.id,a=e.payload,s=e.timestamp,c=e.to,u=a.bodies&&a.bodies.length>0?a.bodies[0]:{},l={},p={},h=a.type?a.type:c.indexOf("@conference.easemob.com")>-1?"groupChat":"singleChat";switch(u.type){case"txt":l={id:i,type:"txt",chatType:h,msg:u.msg||"",to:a.to||"",from:a.from,time:s,ext:a.ext};break;case"img":l={id:i,type:"img",chatType:h,to:a.to,from:a.from,time:s,ext:a.ext,width:(null===(t=u.size)||void 0===t?void 0:t.width)||0,height:(null===(r=u.size)||void 0===r?void 0:r.height)||0,secret:u.secret||"",url:(null==u?void 0:u.url)||"",file:{}};break;case"video":l={id:i,type:"video",chatType:h,from:a.from,to:a.to,url:(null==u?void 0:u.url)||"",secret:u.secret||"",filename:u.filename,length:u.length||0,file:{},file_length:u.fileLength||0,filetype:a.ext.file_type||"",ext:a.ext,time:s};break;case"loc":l={id:i,type:"loc",chatType:h,from:a.from,to:a.to,buildingName:u.buildingName||"",addr:u.addr,lat:u.lat,lng:u.lng,ext:a.ext,time:s};break;case"audio":l={id:i,type:"audio",chatType:h,from:a.from,to:a.to,secret:u.secret||"",ext:a.ext,time:s,url:(null==u?void 0:u.url)||"",file:{},filename:u.filename,length:a.ext.duration||0,file_length:u.fileLength||0,filetype:a.ext.file_type||""};break;case"file":l={id:i,type:"file",chatType:h,from:a.from,to:a.to,ext:a.ext,time:s,url:(null==u?void 0:u.url)||"",secret:u.secret||"",file:{},filename:u.filename||"",length:u.length||0,file_length:u.file_length||0,filetype:a.ext.file_type||""};break;case"cmd":l={id:i,type:"cmd",chatType:h,from:a.from,to:a.to,ext:a.ext,time:s,action:u.action||""};break;case"custom":l={id:i,type:"custom",chatType:h,from:a.from,to:a.to,ext:a.ext,time:s,customEvent:u.customEvent||""};break;default:n.kg.error("unexpected message: ".concat(e))}if(a.msgConfig&&(p.msgConfig=a.msgConfig),null==a?void 0:a.meta){var d=a.meta;d.thread&&(p.chatThread={messageId:d.thread.msg_parent_id,parentId:d.thread.muc_parent_id,chatThreadName:d.thread.thread_name}),d.reactions&&(p.reactions=d.reactions),d.translations&&(p.translations=d.translations)}return o(o({},l),p)}},556:function(e,t,r){"use strict";r.r(t),r.d(t,{acceptGroupInvite:function(){return H},acceptGroupJoinRequest:function(){return j},addUsersToGroupAllowlist:function(){return me},addUsersToGroupWhitelist:function(){return fe},agreeInviteIntoGroup:function(){return B},agreeJoinGroup:function(){return L},blockGroup:function(){return h},blockGroupMember:function(){return re},blockGroupMembers:function(){return oe},blockGroupMessages:function(){return d},changeGroupOwner:function(){return E},changeOwner:function(){return v},createGroup:function(){return p},createGroupNew:function(){return l},deleteGroupSharedFile:function(){return Ae},destroyGroup:function(){return w},disableSendGroupMsg:function(){return he},dissolveGroup:function(){return N},downloadGroupSharedFile:function(){return Me},enableSendGroupMsg:function(){return de},fetchGroupAnnouncement:function(){return Se},fetchGroupSharedFileList:function(){return Ne},getGroup:function(){return y},getGroupAdmin:function(){return I},getGroupAllowlist:function(){return _e},getGroupBlacklist:function(){return le},getGroupBlacklistNew:function(){return ue},getGroupBlocklist:function(){return pe},getGroupInfo:function(){return _},getGroupMsgReadUser:function(){return Ie},getGroupMuteList:function(){return Q},getGroupMutelist:function(){return ee},getGroupSharedFilelist:function(){return we},getGroupWhitelist:function(){return Ee},getJoinedGroups:function(){return g},getMuted:function(){return $},getPublicGroups:function(){return m},groupBlockMulti:function(){return ne},groupBlockSingle:function(){return te},inviteToGroup:function(){return U},inviteUsersToGroup:function(){return x},isGroupWhiteUser:function(){return Te},isInGroupAllowlist:function(){return Re},isInGroupWhiteList:function(){return Oe},joinGroup:function(){return P},leaveGroup:function(){return k},listGroupMember:function(){return O},listGroupMembers:function(){return R},listGroups:function(){return f},modifyGroup:function(){return T},mute:function(){return z},muteGroupMember:function(){return J},quitGroup:function(){return M},rejectGroupInvite:function(){return W},rejectGroupJoinRequest:function(){return G},rejectInviteIntoGroup:function(){return F},rejectJoinGroup:function(){return D},removeAdmin:function(){return C},removeGroupAdmin:function(){return A},removeGroupAllowlistMember:function(){return ve},removeGroupBlockMulti:function(){return se},removeGroupBlockSingle:function(){return ie},removeGroupMember:function(){return Z},removeGroupMembers:function(){return V},removeGroupWhitelistMember:function(){return ge},removeMultiGroupMember:function(){return K},removeMute:function(){return X},removeSingleGroupMember:function(){return q},rmUsersFromGroupWhitelist:function(){return ye},setAdmin:function(){return S},setGroupAdmin:function(){return b},unblockGroupMember:function(){return ae},unblockGroupMembers:function(){return ce},unmuteGroupMember:function(){return Y},updateGroupAnnouncement:function(){return be},uploadGroupSharedFile:function(){return Ce}}),r(900),r(3814),r(7095),r(9889),r(6619),r(1362),r(7988),r(8668),r(514),r(4201),r(3529),r(3535),r(6864),r(1685),r(2486),r(4261);var n=r(3365),o=r(7480),i=r(7551),a=r(1222),s=r(6916),c=r(3681);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function l(e){if(!e||!e.data)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups?resource=").concat(h.clientResource),dataType:"json",type:"POST",data:JSON.stringify({owner:this.user,groupname:e.data.groupname,desc:e.data.desc,members:e.data.members,public:e.data.public,approval:e.data.approval,allowinvites:e.data.allowinvites,invite_need_confirm:e.data.inviteNeedConfirm,maxusers:e.data.maxusers}),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:function(t){e.success&&e.success(t)},error:e.error};return s.kg.debug("Call createGroup:",e),i.hj.call(this,d,c.fI.CREATE_GROUP)}var p=l;function h(e){var t;if("string"!=typeof e.groupId||""===e.groupId)throw Error("Invalid parameter");if(!a.XZ.call(this)){var r=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(r)}var u=this.context,l=u.orgName,p=u.appName,h=u.accessToken,d=u.jid,f={entities:[(t={},t["notification_ignore_"+e.groupId]=!0,t)]},m={type:"PUT",url:"".concat(this.apiUrl,"/").concat(l,"/").concat(p,"/users/").concat(this.user,"?resource=").concat(d.clientResource),data:JSON.stringify(f),dataType:"json",headers:{Authorization:"Bearer "+h,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call blockGroupMessages",e),i.hj.call(this,m,c.fI.BLOCK_GROUP)}var d=h;function f(e){if("number"!=typeof e.limit)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h={limit:e.limit,cursor:e.cursor};e.cursor||delete h.cursor;var d={url:this.apiUrl+"/"+u+"/"+l+"/publicchatgroups",type:"GET",dataType:"json",data:h,headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call listGroups",e),i.hj.call(this,d,c.fI.LIST_GROUP)}var m=f;function y(e){if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h={url:this.apiUrl+"/"+u+"/"+l+"/users/"+this.user+"/joined_chatgroups",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e&&(null==e?void 0:e.success),error:e&&(null==e?void 0:e.error)};return s.kg.debug("Call getJoinedGroups",e),i.hj.call(this,h,c.fI.GET_USER_GROUP)}function g(e){if("number"!=typeof e.pageNum||"number"!=typeof e.pageSize)throw Error('Invalid parameter: "pageNum or pageSize"');if(e.pageNum<0||e.pageSize<0)throw Error('"pageNum" should >= 0 and "pageSize" should >= 0');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.needAffiliations||e.needRole?"/chatgroups/user/".concat(this.user,"?pagenum=").concat(e.pageNum,"&pagesize=").concat(e.pageSize,"&needAffiliations=").concat(e.needAffiliations,"&needRole=").concat(e.needRole):"/users/".concat(this.user,"/joined_chatgroups?pagenum=").concat(e.pageNum,"&pagesize=").concat(e.pageSize),d={url:this.apiUrl+"/"+u+"/"+l+h,dataType:"json",type:"GET",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e&&(null==e?void 0:e.success),error:e&&(null==e?void 0:e.error)};return s.kg.debug("Call getGroup",e),i.hj.call(this,d,c.fI.GET_USER_GROUP).then((function(e){var t=e.uri,r=e.entities,n=[];return t.includes("joined_chatgroups")||(r.forEach((function(e){var t={affiliationsCount:e.affiliations_count,groupName:e.name,groupId:e.groupId,role:e.permission,disabled:e.disabled,approval:e.membersonly,allowInvites:e.allowinvites,description:e.description,maxUsers:e.maxusers,public:e.public};n.push(t)})),e.entities=n),e}))}function v(e){if("string"!=typeof e.groupId||"string"!=typeof e.newOwner)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r={newowner:e.newOwner},u=this.context,l=u.orgName,p=u.appName,h=u.accessToken,d=u.jid,f={url:"".concat(this.apiUrl,"/").concat(l,"/").concat(p,"/chatgroups/").concat(e.groupId,"?resource=").concat(d.clientResource),type:"PUT",dataType:"json",headers:{Authorization:"Bearer "+h,"Content-Type":"application/json"},data:JSON.stringify(r),success:e.success,error:e.error};return s.kg.debug("Call changeOwner",e),i.hj.call(this,f,c.fI.CHANGE_OWNER)}var E=v;function _(e){if("string"!=typeof e.groupId&&!Array.isArray(e.groupId))throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h={url:this.apiUrl+"/"+u+"/"+l+"/chatgroups/"+e.groupId+"?joined_time=true",type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getGroupInfo",e),i.hj.call(this,h,c.fI.GET_GROUP_INFO)}function T(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error("Invalid parameter");if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={groupname:e.groupName,description:e.description},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"?resource=").concat(h.clientResource),type:"PUT",data:JSON.stringify(f),dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call modifyGroup",e),i.hj.call(this,m,c.fI.MODIFY_GROUP)}function O(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(isNaN(e.pageNum)||e.pageNum<=0)throw Error('The parameter "pageNum" should be a positive number');if(isNaN(e.pageSize)||e.pageSize<=0)throw Error('The parameter "pageSize" should be a positive number');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r={pagenum:e.pageNum,pagesize:e.pageSize},u=this.context,l=u.orgName,p=u.appName,h=u.accessToken,d={url:this.apiUrl+"/"+l+"/"+p+"/chatgroups/"+e.groupId+"/users",dataType:"json",type:"GET",data:r,headers:{Authorization:"Bearer "+h,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call listGroupMember",e),i.hj.call(this,d,c.fI.LIST_GROUP_MEMBER)}var R=O;function I(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.groupId,d={url:this.apiUrl+"/"+u+"/"+l+"/chatgroups/"+h+"/admin",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getGroupAdmin",e),i.hj.call(this,d,c.fI.GET_GROUP_ADMIN)}function S(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={newadmin:e.username},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/admin?resource=").concat(h.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call setGroupAdmin",e),i.hj.call(this,m,c.fI.SET_GROUP_ADMIN)}var b=S;function C(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/admin/").concat(f,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeAdmin",e),i.hj.call(this,m,c.fI.REMOVE_GROUP_ADMIN)}var A=C;function N(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"?version=v3&resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call destroyGroup",e),i.hj.call(this,f,c.fI.DISSOLVE_GROUP)}var w=N;function M(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/quit?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call quitGroup",e),i.hj.call(this,f,c.fI.QUIT_GROUP)}var k=M;function U(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(e.users))throw Error('Invalid parameter: "users"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=e.groupId,u={usernames:e.users},l=this.context,p=l.orgName,h=l.appName,d=l.accessToken,f=l.jid,m={url:"".concat(this.apiUrl,"/").concat(p,"/").concat(h,"/chatgroups/").concat(r,"/invite?resource=").concat(f.clientResource),type:"POST",data:JSON.stringify(u),dataType:"json",headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call inviteUsersToGroup",e),i.hj.call(this,m,c.fI.INVITE_TO_GROUP)}var x=U;function P(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(e.groupId,"/apply?resource=").concat(h.clientResource),type:"POST",dataType:"json",data:JSON.stringify({message:e.message||""}),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call joinGroup",e),i.hj.call(this,d,c.fI.JOIN_GROUP)}function L(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.applicant||""===e.applicant)throw Error('Invalid parameter: "applicant"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={applicant:e.applicant,verifyResult:!0,reason:"no clue"},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/apply_verify?resource=").concat(h.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call agreeJoinGroup",e),i.hj.call(this,m,c.fI.AGREE_JOIN_GROUP)}var j=L;function D(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.applicant||""===e.applicant)throw Error('Invalid parameter: "applicant"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={applicant:e.applicant,verifyResult:!1,reason:e.reason||""},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/apply_verify?resource=").concat(h.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call rejectGroupJoinRequest",e),i.hj.call(this,m,c.fI.REJECT_JOIN_GROUP)}var G=D;function B(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.invitee||""===e.invitee)throw Error('Invalid parameter: "invitee"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={invitee:e.invitee,verifyResult:!0},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/invite_verify?resource=").concat(h.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call acceptGroupInvite",e),i.hj.call(this,m,c.fI.AGREE_INVITE_GROUP)}var H=B;function F(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.invitee||""===e.invitee)throw Error('Invalid parameter: "invitee"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={invitee:e.invitee,verifyResult:!1},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/invite_verify?resource=").concat(h.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call rejectGroupInvite",e),i.hj.call(this,m,c.fI.REJECT_INVITE_GROUP)}var W=F;function q(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=e.groupId,u=e.username,l=this.context,p=l.orgName,h=l.appName,d=l.accessToken,f=l.jid,m={url:"".concat(this.apiUrl,"/").concat(p,"/").concat(h,"/chatgroups/").concat(r,"/users/").concat(u,"?resource=").concat(f.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeGroupMember",e),i.hj.call(this,m,c.fI.REMOVE_GROUP_MEMBER)}var Z=q;function K(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(e.users))throw Error('Invalid parameter: "users"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f=e.users.join(","),m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/users/").concat(f,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeGroupMembers",e),i.hj.call(this,m,c.fI.MULTI_REMOVE_GROUP_MEMBER)}var V=K;function z(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if("number"!=typeof e.muteDuration)throw Error('Invalid parameter: "muteDuration"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={usernames:[e.username],mute_duration:e.muteDuration},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/mute?resource=").concat(h.clientResource),dataType:"json",type:"POST",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},data:JSON.stringify(f),success:e.success,error:e.error};return s.kg.debug("Call muteGroupMember",e),i.hj.call(this,m,c.fI.MUTE_GROUP_MEMBER)}var J=z;function X(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/mute/").concat(f,"?resource=").concat(h.clientResource),dataType:"json",type:"DELETE",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call unmuteGroupMember",e),i.hj.call(this,m,c.fI.UNMUTE_GROUP_MEMBER)}var Y=X;function $(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.groupId,d={url:this.apiUrl+"/"+u+"/"+l+"/chatgroups/"+h+"/mute",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getGroupMuteList",e),i.hj.call(this,d,c.fI.GET_GROUP_MUTE_LIST)}var Q=$,ee=$;function te(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/blocks/users/").concat(f,"?resource=").concat(h.clientResource),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call blockGroupMember",e),i.hj.call(this,m,c.fI.BLOCK_GROUP_MEMBER)}var re=te;function ne(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(e.usernames))throw Error('Invalid parameter: "usernames"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={usernames:e.usernames},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/blocks/users?resource=").concat(h.clientResource),data:JSON.stringify(f),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call blockGroupMembers",e),i.hj.call(this,m,c.fI.BLOCK_GROUP_MEMBERS)}var oe=ne;function ie(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.username||""===e.username)throw Error('Invalid parameter: "username"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f=e.username,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/blocks/users/").concat(f,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call unblockGroupMember",e),i.hj.call(this,m,c.fI.UNBLOCK_GROUP_MEMBER)}var ae=ie;function se(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(e.usernames))throw Error('Invalid parameter: "usernames"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f=e.usernames.join(","),m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/blocks/users/").concat(f,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call unblockGroupMembers",e),i.hj.call(this,m,c.fI.UNBLOCK_GROUP_MEMBERS)}var ce=se;function ue(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.groupId,d={url:this.apiUrl+"/"+u+"/"+l+"/chatgroups/"+h+"/blocks/users",type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getGroupBlacklist",e),i.hj.call(this,d,c.fI.GET_GROUP_BLACK_LIST)}var le=ue,pe=ue;function he(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/ban?resource=").concat(h.clientResource),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call disableSendGroupMsg",e),i.hj.call(this,f,c.fI.DISABLED_SEND_GROUP_MSG)}function de(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/ban?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call enableSendGroupMsg",e),i.hj.call(this,f,c.fI.ENABLE_SEND_GROUP_MSG)}function fe(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!Array.isArray(e.users))throw Error('Invalid parameter: "users"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={usernames:e.users},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/white/users?resource=").concat(h.clientResource),type:"POST",data:JSON.stringify(f),dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call addUsersToGroupWhitelist",e),i.hj.call(this,m,c.fI.ADD_USERS_TO_GROUP_WHITE)}var me=fe;function ye(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.userName||""===e.userName)throw Error('Invalid parameter: "userName"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/white/users/").concat(e.userName,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call removeGroupAllowlistMember",e),i.hj.call(this,f,c.fI.REMOVE_GROUP_WHITE_MEMBER)}var ge=ye,ve=ye;function Ee(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.groupId,d={url:this.apiUrl+"/"+u+"/"+l+"/chatgroups/"+h+"/white/users",type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getGroupAllowlist",e),i.hj.call(this,d,c.fI.GET_GROUP_WHITE_LIST)}var _e=Ee;function Te(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.userName||""===e.userName)throw Error('Invalid parameter: "userName"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.groupId,d={url:this.apiUrl+"/"+u+"/"+l+"/chatgroups/"+h+"/white/users/"+e.userName,type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call isInGroupAllowlist",e),i.hj.call(this,d,c.fI.IS_IN_GROUP_WHITE_LIST)}var Oe=Te,Re=Te;function Ie(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.msgId||""===e.msgId)throw Error('Invalid parameter: "msgId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h={url:this.apiUrl+"/"+u+"/"+l+"/chatgroups/"+e.groupId+"/acks/"+e.msgId,dataType:"json",type:"GET",data:{limit:500,key:void 0},headers:{Authorization:"Bearer "+p},success:e.success,error:e.error};return s.kg.debug("Call getGroupMsgReadUser",e),i.hj.call(this,h,c.fI.GET_GROUP_MSG_READ_USER)}function Se(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.groupId,d={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(h,"/announcement"),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call fetchGroupAnnouncement",e),i.hj.call(this,d,c.fI.GET_GROUP_ANN)}function be(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.announcement)throw Error('Invalid parameter: "announcement"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f={announcement:e.announcement},m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/announcement?resource=").concat(h.clientResource),type:"POST",dataType:"json",data:JSON.stringify(f),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call updateGroupAnnouncement",e),i.hj.call(this,m,c.fI.UPDATE_GROUP_ANN)}function Ce(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("object"!==u(e.file))throw Error('Invalid parameter: "file"');if(a.XZ.call(this)){var t=this.context,r=t.orgName,n=t.appName,o=t.accessToken,l=t.jid,p=e.groupId;i.cT.call(this,{uploadUrl:"".concat(this.apiUrl,"/").concat(r,"/").concat(n,"/chatgroups/").concat(p,"/share_files?resource=").concat(l.clientResource),onFileUploadProgress:e.onFileUploadProgress,onFileUploadComplete:e.onFileUploadComplete,onFileUploadError:e.onFileUploadError,onFileUploadCanceled:e.onFileUploadCanceled,accessToken:o,apiUrl:this.apiUrl,file:e.file,appKey:this.context.appKey},c.fI.UPLOAD_GROUP_FILE),s.kg.debug("Call uploadGroupSharedFile",e)}}function Ae(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if("string"!=typeof e.fileId||""===e.fileId)throw Error('Invalid parameter: "file"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=r.jid,d=e.groupId,f=e.fileId,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(d,"/share_files/").concat(f,"?resource=").concat(h.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call deleteGroupSharedFile",e),i.hj.call(this,m,c.fI.DELETE_GROUP_FILE)}function Ne(e){if("string"!=typeof e.groupId||""===e.groupId)throw Error('Invalid parameter: "groupId"');if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,u=r.orgName,l=r.appName,p=r.accessToken,h=e.pageNum||1,d=e.pageSize||10,f=e.groupId,m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/chatgroups/").concat(f,"/share_files?pagenum=").concat(h,"&pagesize=").concat(d),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getGroupSharedFilelist",e),i.hj.call(this,m,c.fI.GET_GROUP_FILE_LIST)}var we=Ne;function Me(e){var t=this.context,r=t.orgName,n=t.appName,o=t.accessToken,a=this.apiUrl,u=e.groupId,l=e.fileId;i.LR.call(this,{url:"".concat(a,"/").concat(r,"/").concat(n,"/chatgroups/").concat(u,"/share_files/").concat(l),onFileDownloadComplete:e.onFileDownloadComplete,onFileDownloadError:e.onFileDownloadError,accessToken:o,id:l,secret:e.secret},c.fI.DOWN_GROUP_FILE),s.kg.debug("Call downloadGroupSharedFile",e)}},7486:function(e,t,r){"use strict";r.r(t),r.d(t,{acceptContactInvite:function(){return G},acceptInvitation:function(){return D},addContact:function(){return P},addReaction:function(){return J},addToBlackList:function(){return F},addUsersToBlacklist:function(){return W},addUsersToBlocklist:function(){return q},declineContactInvite:function(){return H},declineInvitation:function(){return B},deleteContact:function(){return j},deleteConversation:function(){return b},deleteReaction:function(){return X},deleteSession:function(){return S},fetchHistoryMessages:function(){return k},fetchUserInfoById:function(){return N},getBlacklist:function(){return g},getBlocklist:function(){return v},getChatToken:function(){return M},getContacts:function(){return _},getConversationlist:function(){return I},getHistoryMessages:function(){return x},getReactionDetail:function(){return Q},getReactionList:function(){return Y},getReactionlist:function(){return $},getRoster:function(){return E},getSessionList:function(){return R},recallMessage:function(){return z},removeFromBlackList:function(){return Z},removeRoster:function(){return L},removeUserFromBlackList:function(){return K},removeUserFromBlocklist:function(){return V},reportMessage:function(){return ee},updateCurrentUserNick:function(){return w},updateOwnUserInfo:function(){return C},updateUserInfo:function(){return A},uploadPushToken:function(){return O},uploadToken:function(){return T}}),r(8327),r(900),r(3814),r(514),r(4201),r(6864),r(1685),r(2486),r(4261),r(1362),r(7988),r(7095),r(9889),r(3535),r(8134),r(3022),r(8668);var n=r(1222),o=r(3365),i=r(7480),a=r(7551),s=r(983),c=r(5163),u=r(5491),l=r.n(u),p=r(6916),h=r(3681),d=r(2006),f=function(){return f=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},f.apply(this,arguments)},m=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},y=function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function g(e){if(!n.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l={url:this.apiUrl+"/"+s+"/"+c+"/users/"+this.user+"/blocks/users",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+u},success:function(t){var r={};t.data.forEach((function(e){r[e]={name:e}})),"function"==typeof(null==e?void 0:e.success)&&e.success(t)},error:function(t){"function"==typeof(null==e?void 0:e.error)&&e.error(t)}};return p.kg.debug("Call getBlocklist"),a.hj.call(this,l,h.fI.GET_BLACK_LIST)}var v=g,E=_;function _(e){var t=this;if(!n.XZ.call(this)){var r=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(r)}var s=this.context,c=s.orgName,u=s.appName,l=s.accessToken,d={url:this.apiUrl+"/"+c+"/"+u+"/users/"+this.user+"/contacts/users",dataType:"json",type:"GET",headers:{Authorization:"Bearer "+l},success:function(r){var n=[];r.data.forEach((function(e){n.push({name:e,subscription:"both",jid:t.context.jid})})),"function"==typeof(null==e?void 0:e.success)&&e.success(n)},error:function(t){"function"==typeof(null==e?void 0:e.error)&&e.error(t)}};return p.kg.debug("Call getContacts"),a.hj.call(this,d,h.fI.GET_CONTACTS)}function T(e){if("string"!=typeof e.deviceId||""===e.deviceId)throw Error('Invalid parameter: "deviceId"');if("string"!=typeof e.deviceToken||""===e.deviceToken)throw Error('Invalid parameter: "deviceToken"');if("string"!=typeof e.notifierName||""===e.notifierName)throw Error('Invalid parameter: "notifierName"');if(!n.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/users/").concat(this.user),type:"PUT",data:JSON.stringify({device_id:e.deviceId,device_token:e.deviceToken,notifier_name:e.notifierName}),dataType:"json",headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"},success:e.success,error:e.error};return p.kg.debug("Call uploadPushToken",e),a.hj.call(this,l,h.fI.UPLOAD_PUSH_TOKEN)}var O=T;function R(e){if(!n.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/users/").concat(this.user,"/user_channels"),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"},success:e&&(null==e?void 0:e.success),error:e&&(null==e?void 0:e.error)};return p.kg.debug("Call getSessionList"),a.hj.call(this,l,h.fI.GET_SESSION_LIST)}function I(e){if(!n.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/users/").concat(this.user,"/user_channels"),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"},success:e&&(null==e?void 0:e.success),error:e&&(null==e?void 0:e.error)};return p.kg.debug("Call getConversationlist"),a.hj.call(this,l,h.fI.GET_SESSION_LIST).then((function(e){return function(e){var t=e.data.channel_infos;return null==t||t.forEach((function(e){e.meta&&"{}"!==JSON.stringify(e.meta)?(e.meta.payload=JSON.parse(e.meta.payload),e.lastMessage=(0,d.w)(e.meta)):e.lastMessage=e.meta,delete e.meta})),e}(e)}))}function S(e){if(e&&"string"!=typeof e.channel)throw Error("Invalid parameter channel: ".concat(e.channel));if(e&&"singleChat"!==e.chatType&&"groupChat"!==e.chatType)throw Error("Invalid parameter chatType: ".concat(e.chatType));if(e&&"boolean"!=typeof e.deleteRoam)throw Error("Invalid parameter deleteRoam: ".concat(e.deleteRoam));if(!n.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r,s=this.context,c=s.orgName,u=s.appName,l=s.accessToken;r="singleChat"===e.chatType?"chat":"groupChat";var d={url:"".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/users/").concat(this.user,"/user_channel"),dataType:"json",type:"DELETE",data:JSON.stringify({channel:e.channel,type:r,delete_roam:e.deleteRoam}),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"},success:e.success,error:e.error};return p.kg.debug("Call deleteSession",e),a.hj.call(this,d,h.fI.DELETE_SESSION)}var b=S;function C(e,t){if(!n.XZ.call(this)){var r=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(r)}var s=this.context,c=s.orgName,u=s.appName,l=s.accessToken,d=["nickname","avatarurl","mail","phone","gender","sign","birth","ext"],f={};if("undefined"!=typeof wx||"undefined"!=typeof qq)if("string"==typeof e&&void 0!==t){if(!d.includes(e))throw new Error("illegal key, only these keys: nickname, avatarurl, mail, phone, gender, sign, birth, ext are allowed");f[e]=t}else{if("[object Object]"!==Object.prototype.toString.call(e))throw new Error("illegal params");d.forEach((function(t){d.includes(t)&&void 0!==e[t]&&(f[t]=e[t])}))}else if("string"==typeof e){if(!d.includes(e))throw new Error("illegal key, only these keys: nickname, avatarurl, mail, phone, gender, sign, birth, ext are allowed");f=e+"="+t}else{if("[object Object]"!==Object.prototype.toString.call(e))throw new Error("illegal params");var m=[];d.forEach((function(t){if(d.includes(t)&&void 0!==e[t]){var r=encodeURIComponent(t),n=encodeURIComponent(e[t]);m.push(r+"="+n)}})),f=m.join("&")}var y={url:"".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/metadata/user/").concat(this.user),type:"PUT",data:f,dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/x-www-form-urlencoded"}};return p.kg.debug("Call updateOwnUserInfo",e),a.hj.call(this,y,h.fI.UPDATE_USER_INFO)}var A=C;function N(e,t){if(!n.XZ.call(this)){var r=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(r)}var s,c=this.context,u=c.orgName,l=c.appName,d=c.accessToken,f=[];if("string"==typeof e)f=[e];else{if("[object Array]"!==Object.prototype.toString.call(e))throw new Error("illegal params");f=e}s="string"==typeof t?[t]:t&&"[object Array]"===Object.prototype.toString.call(t)?t:["nickname","avatarurl","mail","phone","gender","sign","birth","ext"];var m={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/metadata/user/get"),type:"POST",data:JSON.stringify({targets:f,properties:s}),dataType:"json",headers:{Authorization:"Bearer "+d,"Content-Type":"application/json"}};return p.kg.debug("Call fetchUserInfoById",e),a.hj.call(this,m,h.fI.GET_USER_INFO)}function w(e){if(!n.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/users/").concat(this.user),type:"PUT",dataType:"json",data:JSON.stringify({nickname:e}),headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}};return p.kg.debug("Call updateCurrentUserNick",e),a.hj.call(this,l)}function M(e){if("string"!=typeof e||""===e)throw Error('Invalid parameter: "agoraToken"');var t=this.context,r=t.orgName,n=t.appName,o={url:this.apiUrl+"/"+r+"/"+n+"/token",dataType:"json",type:"POST",data:JSON.stringify({grant_type:"agora"}),headers:{Authorization:"Bearer "+e,"Content-Type":"application/json"}};return p.kg.debug("Call getChatToken",e),a.hj.call(this,o,h.fI.SDK_INTERNAL)}function k(e){var t=this;return new Promise((function(r,a){if(!e.queue)throw Error('Invalid parameter: "specified"');if(!n.XZ.call(t)){var s=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(s)}(function e(t){var n=this,o=t.count||20;U.call(this,{count:o,isGroup:!!t.isGroup,queue:t.queue,start:t.start,format:t.format,success:function(i){if(i.msgs.length>=o||i.is_last){var a=i.msgs.splice(0,o).reverse();t.success&&t.success(a),r(a)}else e.call(n,f(f({},t),{start:null}))},fail:function(e){a(e),t.fail&&t.fail(e)}})}).call(t,e),p.kg.debug("Call fetchHistoryMessages",e)}))}function U(e){var t=this,r=e.queue,n=this.mr_cache[r]||(this.mr_cache[r]={msgs:[]}),c=this.context.userId,u=e.start||-1,p=e.count||20;if(n.msgs.length>=p||n.is_last)"function"==typeof e.success&&e.success(n);else{n&&n.next_key&&(u=n.next_key),e.start&&(u=e.start);var d={queue:r+(e.isGroup?"@conference.easemob.com":"@easemob.com"),start:u,end:-1},f=this.context,m=f.orgName,y=f.appName,g={url:this.apiUrl+"/"+m+"/"+y+"/users/"+c+"/messageroaming",dataType:"json",type:"POST",headers:{Authorization:"Bearer "+this.token,"Content-Type":"application/json"},data:JSON.stringify(d),success:function(r){var o=null==r?void 0:r.data;if(!r.data.msgs)return"function"==typeof e.success&&e.success(n),n.is_last=!0,void(n.next_key="");var i=o.msgs,a=i.length;n.is_last=o.is_last,n.next_key=o.next_key;for(var c=function(r){for(var n=[],o=0,i=(r=l().atob(r)).length;o<i;++o)n.push(r.charCodeAt(o));var a=t.context.root.lookup("easemob.pb.Meta");if(1===(a=a.decode(n)).ns)return s.Z.call(t,a,{errorCode:0,reason:""},!0,e.format)},u=0;u<a;u++){var p=c(i[u].msg);p&&n.msgs.push(p)}"function"==typeof e.success&&e.success(n)},error:function r(n){if(n.error&&n.error_description){var a=i.Z.create({type:o.E.WEBIM_CONNCTION_LOAD_CHATROOM_ERROR,message:"fetch history messages error",data:n});t.onError&&t.onError(a)}"function"==typeof e.fail&&e.fail(r)}};a.hj.call(this,g,h.fI.GET_HISTORY_MSG)}}function x(e){var t=this;return new Promise((function(r,c){if("string"!=typeof e.targetId||""===e.targetId)throw Error('"Invalid parameter": "targetId"');if(!n.XZ.call(t))return c(i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"}));var u=t.context,h=u.orgName,d=u.appName,f=u.userId,m="groupChat"===e.chatType||"chatRoom"===e.chatType?"@conference.easemob.com":"@easemob.com",y={queue:e.targetId+m,start:e.cursor||-1,pull_number:e.pageSize||20,isGroup:"groupChat"===e.chatType||"chatRoom"===e.chatType||!1,is_positive:"down"===e.searchDirection,end:-1},g={url:t.apiUrl+"/"+h+"/"+d+"/users/"+f+"/messageroaming",dataType:"json",type:"POST",headers:{Authorization:"Bearer "+t.token,"Content-Type":"application/json"},data:JSON.stringify(y),success:function(e){for(var n=null==e?void 0:e.data,o=n.msgs||[],i=function(e){for(var r=[],n=0,o=(e=l().atob(e)).length;n<o;++n)r.push(e.charCodeAt(n));var i=t.context.root.lookup("easemob.pb.Meta");if(1===(i=i.decode(r)).ns)return s.Z.call(t,i,{errorCode:0,reason:""},!0,!0)},a=[],c=0;c<o.length;c++){var u=i(o[c].msg);u&&a.push(u)}n.msgs=a;var p={cursor:n.next_key,messages:a};r(p)},error:e.fail};a.hj.call(t,g),p.kg.debug("Call getHistoryMessages",e)}))}function P(e,t){var r={id:this.getUniqueId(),to:e,message:t};c.Z.operatRoster.call(this,r,"add"),p.kg.debug("Call addContact",r)}var L=j;function j(e){var t={id:this.getUniqueId(),to:e};c.Z.operatRoster.call(this,t,"remove"),p.kg.debug("Call deleteContact",t)}function D(e){var t={id:this.getUniqueId(),to:e};c.Z.operatRoster.call(this,t,"accept"),p.kg.debug("Call acceptInvitation",t)}var G=D;function B(e){var t={id:this.getUniqueId(),to:e};c.Z.operatRoster.call(this,t,"decline"),p.kg.debug("Call declineContactInvite",t)}var H=B;function F(e){c.Z.operatRoster.call(this,{to:e.name},"ban"),p.kg.debug("Call addUsersToBlocklist",e)}var W=F,q=F;function Z(e){c.Z.operatRoster.call(this,{to:e.name},"allow"),p.kg.debug("Call removeUserFromBlocklist",e)}var K=Z,V=Z;function z(e){var t=this.getUniqueId(),r={id:t,to:e.to};this._msgHash[t]=f({},r);var n="";void 0!==e.chatType?n=e.chatType:void 0!==e.type&&(n="chat"===e.type?"singleChat":e.type);var o={id:t,type:"recall",chatType:n,ackId:e.mid,to:e.to,isChatThread:e.isChatThread||!1,success:e.success,fail:e.fail};return p.kg.debug("Call recallMessage",e),this.mSync.send(o,this)}function J(e){return m(this,void 0,void 0,(function(){var t,r,s,c,u,l,p,h,d;return y(this,(function(f){switch(f.label){case 0:if("string"!=typeof e.messageId||!e.messageId)throw Error("Invalid parameter messageId: ".concat(e.messageId));if("string"!=typeof e.reaction||!e.reaction)throw Error("Invalid parameter reaction: ".concat(e.reaction));return n.XZ.call(this)?(r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l=e.reaction,p=e.messageId,h={msgId:p,message:l},d={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/reaction/user/").concat(this.user),type:"POST",data:JSON.stringify(h),dataType:"json",headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}},[4,a.hj.call(this,d)]):(t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"}),[2,Promise.reject(t)]);case 1:return f.sent(),[2]}}))}))}function X(e){return m(this,void 0,void 0,(function(){var t,r,s,c,u,l,p,h;return y(this,(function(d){switch(d.label){case 0:if("string"!=typeof e.reaction||!e.reaction)throw Error("Invalid parameter reactionId: ".concat(e.reaction));return n.XZ.call(this)?(r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l=e.messageId,p=e.reaction,h={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/reaction/user/").concat(this.user,"?msgId=").concat(l,"&message=").concat(p),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}},[4,a.hj.call(this,h)]):(t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"}),[2,Promise.reject(t)]);case 1:return d.sent(),[2]}}))}))}function Y(e){if("string"!=typeof e.chatType||!e.chatType)throw Error("Invalid parameter chatType: ".concat(e.chatType));if(!e.messageId)throw Error("Invalid parameter messageId: ".concat(e.messageId));if(!n.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l=e.chatType,p=e.messageId,h={msgIdList:"string"==typeof p?[p]:p,msgType:"singleChat"===l?"chat":"groupchat",groupId:e.groupId||null},d={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/reaction/user/").concat(this.user),type:"GET",data:h,dataType:"json",headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}};return a.hj.call(this,d).then((function(e){var t=e.data;return null==t||t.forEach((function(e){null==e||e.reactionList.forEach((function(e){e.isAddedBySelf=e.state,delete e.state,delete e.reactionId}))})),e}))}var $=Y;function Q(e){if("string"!=typeof e.reaction||!e.reaction)throw Error("Invalid parameter reaction: ".concat(e.reaction));if("string"!=typeof e.messageId||!e.messageId)throw Error("Invalid parameter messageId: ".concat(e.messageId));if(!n.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l=e.cursor,p=e.pageSize,h={msgId:e.messageId,message:e.reaction,currentPage:l||null,pageSize:p||20},d={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/reaction/user/").concat(this.user,"/detail"),type:"GET",data:h,dataType:"json",headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}};return a.hj.call(this,d).then((function(e){return e.data.isAddedBySelf=e.data.state,delete e.data.state,delete e.data.reactionId,e}))}function ee(e){return m(this,void 0,void 0,(function(){var t,r,s,c,u,l,p,h,d,f,m;return y(this,(function(y){switch(y.label){case 0:if("string"!=typeof e.reportType||!e.reportType)throw Error("Invalid parameter reportType: ".concat(e.reportType));if("string"!=typeof e.messageId||!e.messageId)throw Error("Invalid parameter messageId: ".concat(e.messageId));if("string"!=typeof e.reportReason||!e.reportReason)throw Error("Invalid parameter messageId: ".concat(e.reportReason));return n.XZ.call(this)?(r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l=e.reportType,p=e.reportReason,h=e.messageId,d={username:this.user,reportType:l,reportReason:p},f="".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/user/").concat(this.user,"/moderation/report/message/").concat(h),m={url:f,type:"POST",data:JSON.stringify(d),dataType:"json",headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}},[4,a.hj.call(this,m)]):(t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"}),[2,Promise.reject(t)]);case 1:return y.sent(),[2]}}))}))}},6369:function(e,t,r){"use strict";r.r(t),r.d(t,{getPresenceStatus:function(){return d},getSubscribedPresenceList:function(){return p},getSubscribedPresencelist:function(){return h},publishPresence:function(){return c},subscribePresence:function(){return u},unsubscribePresence:function(){return l}}),r(514),r(4201),r(900),r(3814),r(7095),r(3529);var n=r(7551),o=r(1222),i=r(7480),a=r(3365),s=r(6916);function c(e){if("string"!=typeof e.description)throw Error('Invalid parameter: "description"');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.accessToken,u=r.orgName,l=r.appName,p=r.userId,h=this.context.jid.clientResource,d={ext:e.description},f={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/users/").concat(p,"/presence/").concat(h,"/1"),type:"POST",dataType:"json",data:JSON.stringify(d),headers:{Authorization:"Bearer "+c,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call publishPresence:",e),n.hj.call(this,f)}function u(e){if(!Array.isArray(e.usernames))throw Error('Invalid parameter: "usernames"');if(!e.usernames.length)throw Error('"usernames" can not be empty');if("number"!=typeof e.expiry)throw Error('Invalid parameter: "expiry"');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.orgName,u=r.appName,l=r.userId,p=r.accessToken,h={usernames:e.usernames},d={url:"".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/users/").concat(l,"/presence/").concat(e.expiry),type:"POST",dataType:"json",data:JSON.stringify(h),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call subscribePresence:",e),n.hj.call(this,d)}function l(e){if(!Array.isArray(e.usernames))throw Error('Invalid parameter: "usernames"');if(!e.usernames.length)throw Error('"usernames" can not be empty');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.orgName,u=r.appName,l=r.userId,p=r.accessToken,h=(e.usernames,{url:"".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/users/").concat(l,"/presence"),type:"DELETE",dataType:"json",data:JSON.stringify(e.usernames),headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error});return s.kg.debug("Call unsubscribePresence:",e),n.hj.call(this,h)}function p(e){if("number"!=typeof e.pageNum||"number"!=typeof e.pageSize)throw Error('Invalid parameter: "pageNum or pageSize"');if(e.pageNum<0||e.pageSize<0)throw Error('"pageNum" should >= 0 and "pageSize" should >= 0');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.orgName,u=r.appName,l=r.userId,p=r.accessToken,h={url:"".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/users/").concat(l,"/presence/sublist?pageNum=").concat(e.pageNum,"&pageSize=").concat(e.pageSize),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+p,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getSubscribedPresenceList:",e),n.hj.call(this,h)}var h=p;function d(e){if(!Array.isArray(e.usernames))throw Error('Invalid parameter: "usernames"');if(!e.usernames.length)throw Error('"usernames" can not be empty');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r={usernames:e.usernames},c=this.context,u=c.orgName,l=c.appName,p=c.userId,h=c.accessToken,d={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/users/").concat(p,"/presence"),type:"POST",dataType:"json",data:JSON.stringify(r),headers:{Authorization:"Bearer "+h,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getPresenceStatus:",e),n.hj.call(this,d)}},223:function(e,t,r){"use strict";r.r(t),r.d(t,{clearRemindTypeForConversation:function(){return p},getPushPerformLanguage:function(){return m},getSilentModeForAll:function(){return u},getSilentModeForConversation:function(){return h},getSilentModeForConversations:function(){return d},setPushPerformLanguage:function(){return f},setSilentModeForAll:function(){return c},setSilentModeForConversation:function(){return l}}),r(3786),r(900),r(3814),r(7095),r(3529),r(1362),r(7988),r(3535);var n=r(7551),o=r(1222),i=r(7480),a=r(3365),s=r(6916);function c(e){if(!(e.options instanceof Object))throw Error('Invalid parameter: "options"');var t=e.options.paramType;if("number"!=typeof t||t<0||t>2)throw Error('Invalid parameter: "options of paramType"');if(0===t){if("string"!=typeof e.options.remindType)throw Error('Invalid parameter: "options of remindType"')}else if(1===t){if("number"!=typeof e.options.duration)throw Error('Invalid parameter: "options of duration"')}else if(2===t){var r=e.options,c=r.startTime,u=r.endTime;if(!(c instanceof Object&&Object.keys(c).length))throw Error('Invalid parameter: "options of startTime"');if(!c.hours||"number"!=typeof c.hours||!c.minutes||"number"!=typeof c.minutes)throw Error('Invalid parameter: "options of startTime of hours or minutes"');if(!(u instanceof Object&&Object.keys(u).length))throw Error('Invalid parameter: "options of endTime"');if(!u.hours||"number"!=typeof u.hours||!u.minutes||"number"!=typeof u.minutes)throw Error('Invalid parameter: "options of endTime of hours or minutes"')}if(!o.XZ.call(this)){var l=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(l)}var p=this.context,h=p.accessToken,d=p.orgName,f=p.appName,m=p.userId,y={};switch(t){case 0:y={type:e.options.remindType};break;case 1:y={ignoreDuration:e.options.duration};break;case 2:var g=e.options;c=g.startTime,u=g.endTime,y={ignoreInterval:"".concat(c.hours,":").concat(c.minutes,"-").concat(u.hours,":").concat(u.minutes)}}var v={url:"".concat(this.apiUrl,"/").concat(d,"/").concat(f,"/users/").concat(m,"/notification/user/").concat(m),type:"PUT",dataType:"json",data:JSON.stringify(y),headers:{Authorization:"Bearer "+h,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call setSilentModeForAll:",e),n.hj.call(this,v)}function u(e){if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.accessToken,u=r.orgName,l=r.appName,p=r.userId,h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/users/").concat(p,"/notification/user/").concat(p),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+c,"Content-Type":"application/json"},success:null==e?void 0:e.success,error:null==e?void 0:e.error};return s.kg.debug("Call getSilentModeForAll:",e),n.hj.call(this,h)}function l(e){if("string"!=typeof e.conversationId||!e.conversationId)throw Error('Invalid parameter: "conversationId"');if("string"!=typeof e.type||!e.type)throw Error('Invalid parameter: "type"');if(!(e.options instanceof Object))throw Error('Invalid parameter: "options"');var t=e.options.paramType;if("number"!=typeof t||t<0||t>2)throw Error('Invalid parameter: "options of paramType"');if(0===t){if("string"!=typeof e.options.remindType)throw Error('Invalid parameter: "options of remindType"')}else if(1===t){if("number"!=typeof e.options.duration)throw Error('Invalid parameter: "options of duration"')}else if(2===t){var r=e.options,c=r.startTime,u=r.endTime;if(!(c instanceof Object&&Object.keys(c).length))throw Error('Invalid parameter: "options of startTime"');if(!c.hours||"number"!=typeof c.hours||!c.minutes||"number"!=typeof c.minutes)throw Error('Invalid parameter: "options of startTime of hours or minutes"');if(!(u instanceof Object&&Object.keys(u).length))throw Error('Invalid parameter: "options of endTime"');if(!u.hours||"number"!=typeof u.hours||!u.minutes||"number"!=typeof u.minutes)throw Error('Invalid parameter: "options of endTime of hours or minutes"')}if(!o.XZ.call(this)){var l=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(l)}var p=this.context,h=p.accessToken,d=p.orgName,f=p.appName,m=p.userId,y="chatgroup",g={};switch(t){case 0:g={type:e.options.remindType};break;case 1:g={ignoreDuration:e.options.duration};break;case 2:var v=e.options;c=v.startTime,u=v.endTime,g={ignoreInterval:"".concat(c.hours,":").concat(c.minutes,"-").concat(u.hours,":").concat(u.minutes)}}"singleChat"===e.type&&(y="user");var E={url:"".concat(this.apiUrl,"/").concat(d,"/").concat(f,"/users/").concat(m,"/notification/").concat(y,"/").concat(e.conversationId),type:"PUT",dataType:"json",data:JSON.stringify(g),headers:{Authorization:"Bearer "+h,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call setSilentModeForConversation:",e),n.hj.call(this,E)}function p(e){if("string"!=typeof e.conversationId||!e.conversationId)throw Error('Invalid parameter: "conversationId"');if("string"!=typeof e.type||!e.type)throw Error('Invalid parameter: "type"');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.accessToken,u=r.orgName,l=r.appName,p=r.userId,h="chatgroup";"singleChat"===e.type&&(h="user");var d={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/users/").concat(p,"/notification/").concat(h,"/").concat(e.conversationId),type:"PUT",dataType:"json",data:JSON.stringify({type:"DEFAULT"}),headers:{Authorization:"Bearer "+c,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call clearRemindTypeForConversation:",e),n.hj.call(this,d)}function h(e){if("string"!=typeof e.conversationId||!e.conversationId)throw Error('Invalid parameter: "conversationId"');if("string"!=typeof e.type||!e.type)throw Error('Invalid parameter: "type"');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.accessToken,u=r.orgName,l=r.appName,p=r.userId,h="chatgroup";"singleChat"===e.type&&(h="user");var d={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/users/").concat(p,"/notification/").concat(h,"/").concat(e.conversationId),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+c,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getSilentModeForConversation:",e),n.hj.call(this,d)}function d(e){if(!Array.isArray(e.conversationList))throw Error('Invalid parameter: "conversationList"');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.accessToken,u=r.orgName,l=r.appName,p=r.userId,h=[],d=[];e.conversationList.forEach((function(e){"singleChat"===e.type?h.push(e.id):d.push(e.id)}));var f=h.length?h.join(","):"",m=d.length?d.join(","):"",y={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/users/").concat(p,"/notification?user=").concat(f,"&group=").concat(m),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+c,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call getSilentModeForConversations:",e),n.hj.call(this,y)}function f(e){if("string"!=typeof e.language||!e.language)throw Error('Invalid parameter: "language"');if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r={translationLanguage:e.language},c=this.context,u=c.accessToken,l=c.orgName,p=c.appName,h=c.userId,d={url:"".concat(this.apiUrl,"/").concat(l,"/").concat(p,"/users/").concat(h,"/notification/language"),type:"PUT",dataType:"json",data:JSON.stringify(r),headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"},success:e.success,error:e.error};return s.kg.debug("Call setPushPerformLanguage:",e),n.hj.call(this,d)}function m(e){if(!o.XZ.call(this)){var t=i.Z.create({type:a.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.accessToken,u=r.orgName,l=r.appName,p=r.userId,h={url:"".concat(this.apiUrl,"/").concat(u,"/").concat(l,"/users/").concat(p,"/notification/language"),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+c,"Content-Type":"application/json"},success:null==e?void 0:e.success,error:null==e?void 0:e.error};return s.kg.debug("Call getPushPerformLanguage:",e),n.hj.call(this,h)}},318:function(e,t,r){"use strict";r.r(t),r.d(t,{changeChatThreadName:function(){return f},createChatThread:function(){return l},destroyChatThread:function(){return d},getChatThreadDetail:function(){return _},getChatThreadLastMessage:function(){return E},getChatThreadMembers:function(){return m},getChatThreads:function(){return v},getJoinedChatThreads:function(){return g},joinChatThread:function(){return p},leaveChatThread:function(){return h},removeChatThreadMember:function(){return y}}),r(900),r(3814),r(514),r(4201),r(6864),r(1685),r(2486),r(4261),r(8668),r(7095),r(1362),r(7988),r(3529);var n=r(3365),o=r(7480),i=r(7551),a=r(1222),s=r(2006),c=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},u=function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function l(e){if("string"!=typeof e.name||""===e.name)throw Error("Invalid parameter name: ".concat(e.name));if("string"!=typeof e.messageId||""===e.messageId)throw Error("Invalid parameter messageId: ".concat(e.messageId));if("string"!=typeof e.parentId||""===e.parentId)throw Error("Invalid parameter parentId: ".concat(e.parentId));if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l=r.jid,p={name:e.name,msg_id:e.messageId,group_id:e.parentId,owner:this.user},h={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/thread?resource=").concat(l.clientResource),type:"POST",dataType:"json",data:JSON.stringify(p),headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}};return i.hj.call(this,h).then((function(e){var t=e.data.thread_id;return e.data={chatThreadId:t},e}))}function p(e){if("string"!=typeof e.chatThreadId||""===e.chatThreadId)throw Error("Invalid parameter chatThreadId: ".concat(e.chatThreadId));if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l=r.jid,p={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/thread/").concat(e.chatThreadId,"/user/").concat(this.user,"/join?resource=").concat(l.clientResource),type:"POST",dataType:"json",headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}};return i.hj.call(this,p).then((function(e){var t=e.data.detail;return t.messageId=t.msgId,t.parentId=t.groupId,delete t.msgId,delete t.groupId,e}))}function h(e){return c(this,void 0,void 0,(function(){var t,r,s,c,l,p,h;return u(this,(function(u){switch(u.label){case 0:if("string"!=typeof e.chatThreadId||""===e.chatThreadId)throw Error("Invalid parameter chatThreadId: ".concat(e.chatThreadId));return a.XZ.call(this)?(r=this.context,s=r.orgName,c=r.appName,l=r.accessToken,p=r.jid,h={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/thread/").concat(e.chatThreadId,"/user/").concat(this.user,"/quit?resource=").concat(p.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"}},[4,i.hj.call(this,h)]):(t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"}),[2,Promise.reject(t)]);case 1:return u.sent(),[2]}}))}))}function d(e){return c(this,void 0,void 0,(function(){var t,r,s,c,l,p,h;return u(this,(function(u){switch(u.label){case 0:if("string"!=typeof e.chatThreadId||""===e.chatThreadId)throw Error("Invalid parameter chatThreadId: ".concat(e.chatThreadId));return a.XZ.call(this)?(r=this.context,s=r.orgName,c=r.appName,l=r.accessToken,p=r.jid,h={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/thread/").concat(e.chatThreadId,"?resource=").concat(p.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"}},[4,i.hj.call(this,h)]):(t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"}),[2,Promise.reject(t)]);case 1:return u.sent(),[2]}}))}))}function f(e){if("string"!=typeof e.chatThreadId||""===e.chatThreadId)throw Error("Invalid parameter chatThreadId: ".concat(e.chatThreadId));if("string"!=typeof e.name||""===e.name)throw Error("Invalid parameter name: ".concat(e.name));if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l=r.jid,p={name:e.name},h={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/thread/").concat(e.chatThreadId,"?resource=").concat(l.clientResource),type:"PUT",dataType:"json",data:JSON.stringify(p),headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}};return i.hj.call(this,h)}function m(e){if("string"!=typeof e.chatThreadId||""===e.chatThreadId)throw Error("Invalid parameter chatThreadId: ".concat(e.chatThreadId));if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l={limit:e.pageSize||20,cursor:e.cursor||""},p={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/thread/").concat(e.chatThreadId,"/users"),type:"GET",dataType:"json",data:l,headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}};return i.hj.call(this,p)}function y(e){if("string"!=typeof e.chatThreadId||""===e.chatThreadId)throw Error("Invalid parameter chatThreadId: ".concat(e.chatThreadId));if("string"!=typeof e.username||""===e.username)throw Error("Invalid parameter username: ".concat(e.username));if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l=r.jid,p={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/thread/").concat(e.chatThreadId,"/users/").concat(e.username,"?resource=").concat(l.clientResource),type:"DELETE",dataType:"json",headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}};return i.hj.call(this,p)}function g(e){if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l={limit:e.pageSize||20,cursor:e.cursor||""},p={url:e.parentId?"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/threads/chatgroups/").concat(e.parentId,"/user/").concat(this.user):"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/threads/user/").concat(this.user),type:"GET",dataType:"json",data:l,headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}};return i.hj.call(this,p).then((function(e){var t=e.entities;return null==t||t.forEach((function(e){e.parentId=e.groupId,e.messageId=e.msgId,delete e.groupId,delete e.msgId})),e}))}function v(e){if("string"!=typeof e.parentId||""===e.parentId)throw Error("Invalid parameter parentId: ".concat(e.parentId));if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l={cursor:e.cursor||"",limit:e.pageSize||20},p={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/threads/chatgroups/").concat(e.parentId),type:"GET",dataType:"json",data:l,headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}};return i.hj.call(this,p).then((function(e){var t=e.entities;return null==t||t.forEach((function(e){e.parentId=e.groupId,e.messageId=e.msgId,delete e.groupId,delete e.msgId})),e}))}function E(e){if(!Array.isArray(e.chatThreadIds))throw Error("Invalid parameter chatThreadIds: ".concat(e.chatThreadIds));if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.orgName,u=r.appName,l=r.accessToken,p={threadIds:e.chatThreadIds},h={url:"".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/thread/message"),type:"POST",dataType:"json",data:JSON.stringify(p),headers:{Authorization:"Bearer "+l,"Content-Type":"application/json"}};return i.hj.call(this,h).then((function(e){return function(e){var t=e.entities;return null==t||t.forEach((function(e){e.chatThreadId=e.thread_id,e.last_message&&"{}"!==JSON.stringify(e.last_message)?e.lastMessage=(0,s.w)(e.last_message):e.lastMessage=e.last_message,delete e.thread_id,delete e.last_message})),e}(e)}))}function _(e){if("string"!=typeof e.chatThreadId||""===e.chatThreadId)throw Error("Invalid parameter chatThreadId: ".concat(e.chatThreadId));if(!a.XZ.call(this)){var t=o.Z.create({type:n.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,s=r.orgName,c=r.appName,u=r.accessToken,l={url:"".concat(this.apiUrl,"/").concat(s,"/").concat(c,"/thread/").concat(e.chatThreadId),type:"GET",dataType:"json",headers:{Authorization:"Bearer "+u,"Content-Type":"application/json"}};return i.hj.call(this,l).then((function(e){return e.data.affiliationsCount=e.data.affiliations_count,e.data.messageId=e.data.msgId,e.data.parentId=e.data.groupId,delete e.data.affiliations_count,delete e.data.msgId,delete e.data.groupId,e}))}},606:function(e,t,r){"use strict";r.r(t),r.d(t,{getSupportedLanguages:function(){return c},translateMessage:function(){return u}}),r(900),r(3814),r(7095),r(3529);var n=r(1222),o=r(3365),i=r(7480),a=r(6916),s=r(7551);function c(){if(!n.XZ.call(this)){var e=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(e)}var t=this.context,r=t.orgName,c=t.appName,u=t.accessToken,l={url:"".concat(this.apiUrl,"/").concat(r,"/").concat(c,"/users/").concat(this.user,"/translate/support/language"),dataType:"json",type:"GET",headers:{Authorization:"Bearer "+u}};return a.kg.debug("Call getSupportedLanguages"),s.hj.call(this,l)}function u(e){if("string"!=typeof e.text||""===e.text)throw Error('Invalid parameter: "text"');if(!Array.isArray(e.languages))throw Error('Invalid parameter: "language"');if(!n.XZ.call(this)){var t=i.Z.create({type:o.E.REST_PARAMS_STATUS,message:"appkey or token error"});return Promise.reject(t)}var r=this.context,c=r.orgName,u=r.appName,l=r.accessToken,p="".concat(this.apiUrl,"/").concat(c,"/").concat(u,"/users/").concat(this.user,"/translate"),h={text:e.text,to:e.languages},d={url:p,dataType:"json",type:"POST",data:JSON.stringify(h),headers:{Authorization:"Bearer "+l}};return a.kg.debug("Call translateMessage"),s.hj.call(this,d)}},1222:function(e,t,r){"use strict";r.d(t,{H7:function(){return u},XZ:function(){return s},_W:function(){return c}}),r(3786),r(1362),r(900),r(7988),r(9889),r(6619);var n=r(3365),o=r(7480);function i(){var e=this.context.appName,t=this.context.orgName;return!(!e||!t)||(this.onError&&this.onError({type:n.E.WEBIM_CONNCTION_AUTH_ERROR,message:"appName or orgName is illegal"}),!1)}function a(){var e;if(!this.context.accessToken){var t=o.Z.create({type:n.E.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,message:"token not assign error"});return this.onError&&this.onError(t),null===(e=this.eventHandler)||void 0===e||e.dispatch("onError",t),!1}return!0}function s(){return a.call(this)&&i.call(this)}function c(e){var t=e.data,r=e.type;return{data:{status:Object.keys(t.errorKeys).length>0?"fail":"success",errorKeys:t.errorKeys,successKeys:t.successKeys},type:r}}function u(e){var t=e.data,r=void 0;return Object.keys(t.errorKeys).length>0&&Object.keys(t.errorKeys).forEach((function(e){var i=t.errorKeys[e];r=i.includes("is not part of you")?o.Z.create({type:n.E.NO_PERMISSION,message:i}):i.includes("size of metadata for this single chatroom exceeds the user defined limit")||i.includes("total size of chatroom metadata for this app exceeds the user defined limit")||i.includes("is exceeding maximum limit")?o.Z.create({type:n.E.MAX_LIMIT,message:i}):i.includes("is not Legal")?o.Z.create({type:n.E.REQUEST_PARAMETER_ERROR,message:i}):i.includes("Failed to update userMetadata. Concurrent updates not allowed")?o.Z.create({type:n.E.OPERATION_NOT_ALLOWED,message:i}):o.Z.create({type:n.E.WEBIM_CONNCTION_AJAX_ERROR,message:i})})),r}},4306:function(e,t,r){"use strict";r.d(t,{$x:function(){return s},F3:function(){return c},Nl:function(){return o},TJ:function(){return i},Wc:function(){return n},el:function(){return a},iB:function(){return u},yK:function(){return l}}),r(1685),r(5724),r(900),r(2486),r(4261);var n=7,o=new Map,i=new Map,a="im",s="32f24ab2ddb74f508aa9286c356cec84",c=1e3,u={INIT:9674,API:9675},l="direct"},3681:function(e,t,r){"use strict";var n,o,i,a,s,c;r.d(t,{C8:function(){return n},aC:function(){return c},c:function(){return i},dd:function(){return s},fI:function(){return o},td:function(){return a}}),function(e){e[e.UNKNOWOPERATION=-1]="UNKNOWOPERATION",e[e.REST_GET_SESSION_LIST=1]="REST_GET_SESSION_LIST",e[e.REST_DEL_SESSION=2]="REST_DEL_SESSION",e[e.REST_GET_HISTORY_MESSAGE=3]="REST_GET_HISTORY_MESSAGE",e[e.REST_OPERATE=10]="REST_OPERATE",e[e.MSYNC_SENDMESSAGE=11]="MSYNC_SENDMESSAGE",e[e.MSYNC_RECALLMESSAGE=12]="MSYNC_RECALLMESSAGE",e[e.MSYNC_OPERATE=20]="MSYNC_OPERATE",e[e.ROSTER_ADD=21]="ROSTER_ADD",e[e.ROSTER_REMOVE=22]="ROSTER_REMOVE",e[e.ROSTER_ACCEPT=23]="ROSTER_ACCEPT",e[e.ROSTER_DECLINE=24]="ROSTER_DECLINE",e[e.ROSTER_BAN=25]="ROSTER_BAN",e[e.ROSTER_ALLOW=26]="ROSTER_ALLOW",e[e.ROSTER_BLACKLIST=27]="ROSTER_BLACKLIST",e[e.ROSTER_CONTACTS=28]="ROSTER_CONTACTS",e[e.ROSTER_OPERATE=30]="ROSTER_OPERATE",e[e.USER_LOGIN=31]="USER_LOGIN",e[e.USER_CREATE=32]="USER_CREATE",e[e.USER_UPDATE_USERINFO=33]="USER_UPDATE_USERINFO",e[e.USER_FETCH_USERINFO=34]="USER_FETCH_USERINFO",e[e.USER_UPDATE_NICK=35]="USER_UPDATE_NICK",e[e.USER_UPLOAD_PUSH_TOKEN=36]="USER_UPLOAD_PUSH_TOKEN",e[e.USER_OPERATE=40]="USER_OPERATE",e[e.GROUP_CREATEGROUP=41]="GROUP_CREATEGROUP",e[e.GROUP_BLOCK_MESSAGE=42]="GROUP_BLOCK_MESSAGE",e[e.GROUP_FETCH_PUBLICGROUPS_WITHCURSOR=43]="GROUP_FETCH_PUBLICGROUPS_WITHCURSOR",e[e.GROUP_FETCH_USERS_GROUP=44]="GROUP_FETCH_USERS_GROUP",e[e.GROUP_CHANGE_OWNER=45]="GROUP_CHANGE_OWNER",e[e.GROUP_FETCH_SPECIFICATION=46]="GROUP_FETCH_SPECIFICATION",e[e.GROUP_CHANGE_GROUPATTRIBUTE=47]="GROUP_CHANGE_GROUPATTRIBUTE",e[e.GROUP_FETCH_MEMEBERS=48]="GROUP_FETCH_MEMEBERS",e[e.GROUP_GET_ADMIN=49]="GROUP_GET_ADMIN",e[e.GROUP_SET_ADMIN=50]="GROUP_SET_ADMIN",e[e.GROUP_REMOVE_ADMIN=51]="GROUP_REMOVE_ADMIN",e[e.GROUP_DESTOTYGROUP=52]="GROUP_DESTOTYGROUP",e[e.GROUP_LEAVEGROUP=53]="GROUP_LEAVEGROUP",e[e.GROUP_INVITE_TO_GROUP=54]="GROUP_INVITE_TO_GROUP",e[e.GROUP_JOIN_PUBLICGROUP=55]="GROUP_JOIN_PUBLICGROUP",e[e.GROUP_ACCEPT_JOINPUBLICGROUPAPPL=56]="GROUP_ACCEPT_JOINPUBLICGROUPAPPL",e[e.GROUP_DECLINE_JOINPUBLICGROUPAPPL=57]="GROUP_DECLINE_JOINPUBLICGROUPAPPL",e[e.GROUP_ACCEPT_INVITATION=58]="GROUP_ACCEPT_INVITATION",e[e.GROUP_DECLINE_INVITATION=59]="GROUP_DECLINE_INVITATION",e[e.GROUP_REMOVE_MEMBER=60]="GROUP_REMOVE_MEMBER",e[e.GROUP_REMOVE_MEMBERS=61]="GROUP_REMOVE_MEMBERS",e[e.GROUP_MUTE_MEMBERS=62]="GROUP_MUTE_MEMBERS",e[e.GROUP_UNMUTE_MEMBERS=63]="GROUP_UNMUTE_MEMBERS",e[e.GROUP_FETCH_MUTES=64]="GROUP_FETCH_MUTES",e[e.GROUP_BLOCK_MEMBER=65]="GROUP_BLOCK_MEMBER",e[e.GROUP_BLOCK_MEMBERS=66]="GROUP_BLOCK_MEMBERS",e[e.GROUP_UNBLOCK_MEMBER=67]="GROUP_UNBLOCK_MEMBER",e[e.GROUP_UNBLOCK_MEMBERS=68]="GROUP_UNBLOCK_MEMBERS",e[e.GROUP_GET_BLOCK_LIST=69]="GROUP_GET_BLOCK_LIST",e[e.GROUP_MUTE_ALLMEMBERS=70]="GROUP_MUTE_ALLMEMBERS",e[e.GROUP_UNMUTE_ALLMEMBERS=71]="GROUP_UNMUTE_ALLMEMBERS",e[e.GROUP_ADD_WHITELIST=72]="GROUP_ADD_WHITELIST",e[e.GROUP_REMOVE_WHITELIST=73]="GROUP_REMOVE_WHITELIST",e[e.GROUP_FETCH_WHITELIST=74]="GROUP_FETCH_WHITELIST",e[e.GROUP_IS_IN_WHITELIST=75]="GROUP_IS_IN_WHITELIST",e[e.GROUP_GET_READ_USERS=76]="GROUP_GET_READ_USERS",e[e.GROUP_FETCH_ANNOUNCEMENT=77]="GROUP_FETCH_ANNOUNCEMENT",e[e.GROUP_UPDATE_ANNOUNCEMENT=78]="GROUP_UPDATE_ANNOUNCEMENT",e[e.GROUP_UPLOAD_SHAREDFILE=79]="GROUP_UPLOAD_SHAREDFILE",e[e.GROUP_DELETE_SHAREDFILE=80]="GROUP_DELETE_SHAREDFILE",e[e.GROUP_FETCH_SHAREDFILE=81]="GROUP_FETCH_SHAREDFILE",e[e.GROUP_DOWNLOAD_SHAREDFILE=82]="GROUP_DOWNLOAD_SHAREDFILE",e[e.GROUP_OPERATE=100]="GROUP_OPERATE",e[e.CHATROOM_FETCH_CHATROOMSWITHPAGE=101]="CHATROOM_FETCH_CHATROOMSWITHPAGE",e[e.CHATROOM_CREATECHATROOM=102]="CHATROOM_CREATECHATROOM",e[e.CHATROOM_DESTORYCHATROOM=103]="CHATROOM_DESTORYCHATROOM",e[e.CHATROOM_FETCH_SPECIFICATION=104]="CHATROOM_FETCH_SPECIFICATION",e[e.CHATROOM_CHANGE_ATTRIBUTE=105]="CHATROOM_CHANGE_ATTRIBUTE",e[e.CHATROOM_REMOVE_MEMBER=106]="CHATROOM_REMOVE_MEMBER",e[e.CHATROOM_REMOVE_MEMBERS=107]="CHATROOM_REMOVE_MEMBERS",e[e.CHATROOM_ADD_MEMBERS=108]="CHATROOM_ADD_MEMBERS",e[e.CHATROOM_JOINCAHTROOM=109]="CHATROOM_JOINCAHTROOM",e[e.CHATROOM_LEAVECAHTROOM=110]="CHATROOM_LEAVECAHTROOM",e[e.CHATROOM_FETCH_MEMBERS=111]="CHATROOM_FETCH_MEMBERS",e[e.CHATROOM_GET_ADMIN=112]="CHATROOM_GET_ADMIN",e[e.CHATROOM_SET_ADMIN=113]="CHATROOM_SET_ADMIN",e[e.CHATROOM_REMOVE_ADMIN=114]="CHATROOM_REMOVE_ADMIN",e[e.CHATROOM_MUTE_USER=115]="CHATROOM_MUTE_USER",e[e.CHATROOM_UNMUTE_USER=116]="CHATROOM_UNMUTE_USER",e[e.CHATROOM_FETCH_MUTES=117]="CHATROOM_FETCH_MUTES",e[e.CHATROOM_BLOCK_USER=118]="CHATROOM_BLOCK_USER",e[e.CHATROOM_BLOCK_USERS=119]="CHATROOM_BLOCK_USERS",e[e.CHATROOM_UNBLOCK_USER=120]="CHATROOM_UNBLOCK_USER",e[e.CHATROOM_UNBLOCK_USERS=121]="CHATROOM_UNBLOCK_USERS",e[e.CHATROOM_FETCH_BANS=122]="CHATROOM_FETCH_BANS",e[e.CHATROOM_MUTE_ALLMEMEBERS=123]="CHATROOM_MUTE_ALLMEMEBERS",e[e.CHATROOM_UNMUTE_ALLMEMEBERS=124]="CHATROOM_UNMUTE_ALLMEMEBERS",e[e.CHATROOM_ADD_WHITELIST=125]="CHATROOM_ADD_WHITELIST",e[e.CHATROOM_REMOVE_WHITELIST=126]="CHATROOM_REMOVE_WHITELIST",e[e.CHATROOM_FETCH_WHITELIST=127]="CHATROOM_FETCH_WHITELIST",e[e.CHATROOM_FETCH_MEMBERIN_WHITELIST=128]="CHATROOM_FETCH_MEMBERIN_WHITELIST",e[e.CHATROOM_FETCH_ANNOUNCEMENT=129]="CHATROOM_FETCH_ANNOUNCEMENT",e[e.CHATROOM_UPDATE_ANNOUNCEMENT=130]="CHATROOM_UPDATE_ANNOUNCEMENT",e[e.CHATROOM_REMOVE_SHARE_FILE=131]="CHATROOM_REMOVE_SHARE_FILE",e[e.CHATROOM_GET_SHARE_FILE_LIST=132]="CHATROOM_GET_SHARE_FILE_LIST",e[e.CHATROOM_UPLOAD_FILE=133]="CHATROOM_UPLOAD_FILE",e[e.CHATROOM_OPERATE=150]="CHATROOM_OPERATE"}(n||(n={})),function(e){e.SDK_INTERNAL="SDK_INTERNAL",e.LOGIN="USER_LOGIN",e.REGISTER="USER_CREATE",e.GET_CHATROOM_LIST="CHATROOM_FETCH_CHATROOMSWITHPAGE",e.CREATE_CHATROOM="CHATROOM_CREATECHATROOM",e.DESTROY_CHATROOM="CHATROOM_DESTORYCHATROOM",e.GET_CHATROOM_DETAIL="CHATROOM_FETCH_SPECIFICATION",e.MODIFY_CHATROOM="CHATROOM_CHANGE_ATTRIBUTE",e.REMOVE_CHATROOM_MEMBER="CHATROOM_REMOVE_MEMBER",e.MULTI_REMOVE_CHATROOM_MEMBER="CHATROOM_REMOVE_MEMBERS",e.ADD_USERS_TO_CHATROOM="CHATROOM_ADD_MEMBERS",e.JOIN_CHATROOM="CHATROOM_JOINCAHTROOM",e.QUIT_CHATROOM="CHATROOM_LEAVECAHTROOM",e.LIST_CHATROOM_MEMBERS="CHATROOM_FETCH_MEMBERS",e.GET_CHATROOM_ADMIN="CHATROOM_GET_ADMIN",e.SET_CHATROOM_ADMIN="CHATROOM_SET_ADMIN",e.REMOVE_CHATROOM_ADMIN="CHATROOM_REMOVE_ADMIN",e.MUTE_CHATROOM_MEMBER="CHATROOM_MUTE_USER",e.REMOVE_MUTE_CHATROOM_MEMBER="CHATROOM_UNMUTE_USER",e.GET_MUTE_CHATROOM_MEMBERS="CHATROOM_FETCH_MUTES",e.SET_CHATROOM_MEMBER_TO_BLACK="CHATROOM_BLOCK_USER",e.MULTI_SET_CHATROOM_MEMBER_TO_BLACK="CHATROOM_BLOCK_USERS",e.REMOVE_CHATROOM_MEMBER_BLACK="CHATROOM_UNBLOCK_USER",e.MULTI_REMOVE_CHATROOM_MEMBER_BLACK="CHATROOM_UNBLOCK_USERS",e.GET_CHATROOM_BLOCK_MEMBERS="CHATROOM_FETCH_BANS",e.DISABLED_CHATROOM_SEND_MSG="CHATROOM_MUTE_ALLMEMEBERS",e.ENABLE_CHATROOM_SEND_MSG="CHATROOM_UNMUTE_ALLMEMEBERS",e.ADD_CHATROOM_WHITE_USERS="CHATROOM_ADD_WHITELIST",e.REMOVE_CHATROOM_WHITE_USERS="CHATROOM_REMOVE_WHITELIST",e.GET_CHATROOM_WHITE_USERS="CHATROOM_FETCH_WHITELIST",e.CHECK_CHATROOM_WHITE_USER="CHATROOM_FETCH_MEMBERIN_WHITELIST",e.GET_CHATROOM_ANN="CHATROOM_FETCH_ANNOUNCEMENT",e.UPDATE_CHATROOM_ANN="CHATROOM_UPDATE_ANNOUNCEMENT",e.DELETE_CHATROOM_FILE="CHATROOM_REMOVE_SHARE_FILE",e.GET_CHATROOM_FILES="CHATROOM_GET_SHARE_FILE_LIST",e.UPLOAD_CHATROOM_FILE="CHATROOM_UPLOAD_FILE",e.CREATE_GROUP="GROUP_CREATEGROUP",e.BLOCK_GROUP="GROUP_BLOCK_MESSAGE",e.LIST_GROUP="GROUP_FETCH_PUBLICGROUPS_WITHCURSOR",e.GET_USER_GROUP="GROUP_FETCH_USERS_GROUP",e.CHANGE_OWNER="GROUP_CHANGE_OWNER",e.GET_GROUP_INFO="GROUP_FETCH_SPECIFICATION",e.MODIFY_GROUP="GROUP_CHANGE_GROUPATTRIBUTE",e.LIST_GROUP_MEMBER="GROUP_FETCH_MEMEBERS",e.GET_GROUP_ADMIN="GROUP_GET_ADMIN",e.SET_GROUP_ADMIN="GROUP_SET_ADMIN",e.REMOVE_GROUP_ADMIN="GROUP_REMOVE_ADMIN",e.DISSOLVE_GROUP="GROUP_DESTOTYGROUP",e.QUIT_GROUP="GROUP_LEAVEGROUP",e.INVITE_TO_GROUP="GROUP_INVITE_TO_GROUP",e.JOIN_GROUP="GROUP_JOIN_PUBLICGROUP",e.AGREE_JOIN_GROUP="GROUP_ACCEPT_JOINPUBLICGROUPAPPL",e.REJECT_JOIN_GROUP="GROUP_DECLINE_JOINPUBLICGROUPAPPL",e.AGREE_INVITE_GROUP="GROUP_ACCEPT_INVITATION",e.REJECT_INVITE_GROUP="GROUP_DECLINE_INVITATION",e.REMOVE_GROUP_MEMBER="GROUP_REMOVE_MEMBER",e.MULTI_REMOVE_GROUP_MEMBER="GROUP_REMOVE_MEMBERS",e.MUTE_GROUP_MEMBER="GROUP_MUTE_MEMBERS",e.UNMUTE_GROUP_MEMBER="GROUP_UNMUTE_MEMBERS",e.GET_GROUP_MUTE_LIST="GROUP_FETCH_MUTES",e.BLOCK_GROUP_MEMBER="GROUP_BLOCK_MEMBER",e.BLOCK_GROUP_MEMBERS="GROUP_BLOCK_MEMBERS",e.UNBLOCK_GROUP_MEMBER="GROUP_UNBLOCK_MEMBER",e.UNBLOCK_GROUP_MEMBERS="GROUP_UNBLOCK_MEMBERS",e.GET_GROUP_BLACK_LIST="GROUP_GET_BLOCK_LIST",e.DISABLED_SEND_GROUP_MSG="GROUP_MUTE_ALLMEMBERS",e.ENABLE_SEND_GROUP_MSG="GROUP_UNMUTE_ALLMEMBERS",e.ADD_USERS_TO_GROUP_WHITE="GROUP_ADD_WHITELIST",e.REMOVE_GROUP_WHITE_MEMBER="GROUP_REMOVE_WHITELIST",e.GET_GROUP_WHITE_LIST="GROUP_FETCH_WHITELIST",e.IS_IN_GROUP_WHITE_LIST="GROUP_IS_IN_WHITELIST",e.GET_GROUP_MSG_READ_USER="GROUP_GET_READ_USERS",e.GET_GROUP_ANN="GROUP_FETCH_ANNOUNCEMENT",e.UPDATE_GROUP_ANN="GROUP_UPDATE_ANNOUNCEMENT",e.UPLOAD_GROUP_FILE="GROUP_UPLOAD_SHAREDFILE",e.DELETE_GROUP_FILE="GROUP_DELETE_SHAREDFILE",e.GET_GROUP_FILE_LIST="GROUP_FETCH_SHAREDFILE",e.DOWN_GROUP_FILE="GROUP_DOWNLOAD_SHAREDFILE",e.GET_SESSION_LIST="REST_GET_SESSION_LIST",e.DELETE_SESSION="REST_DEL_SESSION",e.GET_HISTORY_MSG="REST_GET_HISTORY_MESSAGE",e.UPDATE_USER_INFO="USER_UPDATE_USERINFO",e.GET_USER_INFO="USER_FETCH_USERINFO",e.UPDATE_USER_NICK="USER_UPDATE_NICK",e.UPLOAD_PUSH_TOKEN="USER_UPLOAD_PUSH_TOKEN",e.GET_BLACK_LIST="ROSTER_BLACKLIST",e.GET_CONTACTS="ROSTER_CONTACTS",e.add="ROSTER_ADD",e.remove="ROSTER_REMOVE",e.accept="ROSTER_ACCEPT",e.decline="ROSTER_DECLINE",e.ban="ROSTER_BAN",e.allow="ROSTER_ALLOW",e.SEND_MSG="MSYNC_SENDMESSAGE",e.UPLOAD_MSG_ATTACH="UPLOAD_MSG_ATTACH",e.SEND_RECALL_MSG="MSYNC_RECALLMESSAGE"}(o||(o={})),function(e){e.GET_DNS="REST_DNSLIST",e.LOGIN_BY_AGORA_TOKEN="LOGIN_BY_AGORA_TOKEN",e.LOGIN_BY_PWD="LOGIN_BY_PWD",e.RESISTER="REGISTER"}(i||(i={})),function(e){e[e["5G"]=7]="5G",e[e["4G"]=7]="4G",e[e["3G"]=7]="3G",e[e["2G"]=7]="2G",e[e["SLOW-2G"]=7]="SLOW-2G",e[e.WIFI=2]="WIFI",e[e.LAN=1]="LAN",e[e.DISCONNECTED=0]="DISCONNECTED",e[e.NONE=0]="NONE",e[e.UNKNOWN=-1]="UNKNOWN",e[e["WEBIM UNABLE TO GET"]=-2]="WEBIM UNABLE TO GET"}(a||(a={})),function(e){e[e.success=200]="success",e[e.failed=500]="failed"}(s||(s={})),function(e){e[e.web=0]="web",e[e.native=1]="native"}(c||(c={}))},7480:function(e,t){"use strict";var r=function(){function e(e){this.type=e.type,this.message=e.message,this.data=e.data}return e.create=function(t){return new e(t)},e}();t.Z=r},983:function(e,t,r){"use strict";r(9782),r(900),r(937),r(8453),r(8668),r(1362),r(7988),r(5980),r(7095);var n=r(9168),o=r.n(n),i=r(2006),a=r(7551),s=r(6916),c=r(2591),u={0:"TEXT",1:"IMAGE",2:"VIDEO",3:"LOCATION",4:"VOICE",5:"FILE",6:"COMMAND",7:"CUSTOM"};function l(e){for(var t={},r=0;r<e.length;r++)if(8===e[r].type)t[e[r].key]=JSON.parse(e[r].stringValue);else if(7===e[r].type)t[e[r].key]=e[r].stringValue;else if(6===e[r].type)t[e[r].key]=e[r].doubleValue;else if(5===e[r].type)t[e[r].key]=e[r].floatValue;else if(1===e[r].type){var n=e[r].varintValue,i=new(o())(n.low,n.high,n.unsigned).toString();t[e[r].key]=0!==Number(i)}else 2!==e[r].type&&3!==e[r].type&&4!==e[r].type||(n=e[r].varintValue,i=new(o())(n.low,n.high,n.unsigned).toString(),t[e[r].key]=Number(i));return t}function p(e,t,r){if(this.delivery&&e!==t){var n=this.getUniqueId(),o=new c.Message("delivery",n);o.set({ackId:r,to:e}),s.kg.debug("send delivery ack"),this.send(o.body)}}t.Z=function(e,t,r,n){var c,h,d,f,m,y,g,v=new(o())(e.timestamp.low,e.timestamp.high,e.timestamp.unsigned).toString(),E=this.root.lookup("easemob.pb.MessageBody").decode(e.payload),_=1;if(e.meta&&e.meta.length)switch(a.P6.parseNotify(e.meta).is_online){case 0:_=0;break;case 1:_=1;break;default:_=2}else _=3;var T,O=new(o())(e.id.low,e.id.high,e.id.unsigned).toString(),R=E.ackMessageId?new(o())(E.ackMessageId.low,E.ackMessageId.high,E.ackMessageId.unsigned).toString():"",I="",S=E.from&&E.from.name,b=E.to&&E.to.name;switch(s.kg.debug("thirdMessage:",E),E.type){case 1:I="chat","agoraToken"===this.grantType&&(I="singleChat"),this.delivery&&p.call(this,S,b,O);break;case 2:I="groupchat","agoraToken"===this.grantType&&(I="groupChat");break;case 3:I="chatroom","agoraToken"===this.grantType&&(I="chatRoom"),_=1;break;case 4:I="read_ack";var C=void 0;return E.ext[0]&&JSON.parse(E.ext[0].stringValue)?(C={id:O,type:"read",from:S,to:b,mid:R,groupReadCount:E.ext[0]&&JSON.parse(E.ext[0].stringValue),ackContent:E.ackContent,onlineState:_},this.onReadMessage&&this.onReadMessage(C),void(null===(c=this.eventHandler)||void 0===c||c.dispatch("onReadMessage",C))):(C={id:O,type:"read",from:S,to:b,mid:R,onlineState:_},this.onReadMessage&&this.onReadMessage(C),void(null===(h=this.eventHandler)||void 0===h||h.dispatch("onReadMessage",C)));case 5:I="deliver_ack",this.onDeliveredMessage&&this.onDeliveredMessage({id:O,type:"delivery",from:S,to:b,mid:R,onlineState:_});var A={id:O,type:"delivery",from:S,to:b,mid:R,onlineState:_};return void(null===(d=this.eventHandler)||void 0===d||d.dispatch("onDeliveredMessage",A));case 6:I="recall";var N={id:O,from:S||"admin",to:b,mid:R,onlineState:_};return this.onRecallMessage&&this.onRecallMessage(N),void(null===(f=this.eventHandler)||void 0===f||f.dispatch("onRecallMessage",N));case 7:this.onChannelMessage&&this.onChannelMessage({id:O,type:"channel",chatType:"singleChat",from:S,to:b,time:Number(v),onlineState:_});var w={id:O,type:"channel",chatType:"singleChat",from:S,to:b,time:Number(v),onlineState:_};return void(null===(m=this.eventHandler)||void 0===m||m.dispatch("onChannelMessage",w));default:return void s.kg.error("unexpected message type: ".concat(E.type))}"chat"===I.toLowerCase()||"singleChat"===I?T="singleChat":"groupchat"===I.toLowerCase()||"groupChat"===I?T="groupChat":(T="chatRoom",_=1);for(var M=0;M<E.contents.length;M++){var k={},U={},x=t.errorCode>0,P=t.errorCode,L=t.reason,j=E.contents[M],D={},G=[],B=[],H=null,F=null,W=void 0;if(E.ext&&(D=l(E.ext)),E.meta&&"string"==typeof E.meta){var q=JSON.parse(E.meta);q.reaction&&(G=q.reaction).forEach((function(e){e.isAddedBySelf=e.state,delete e.state})),q.translations&&(B=q.translations),q.thread&&"{}"!==JSON.stringify(q.thread)&&(H={messageId:q.thread.msg_parent_id,parentId:q.thread.muc_parent_id,chatThreadName:q.thread.thread_name}),q.thread_overview&&"{}"!==JSON.stringify(q.thread_overview)&&(F={id:q.thread_overview.id,parentId:q.thread_overview.muc_parent_id,name:q.thread_overview.name,lastMessage:(0,i.w)(q.thread_overview.last_message),createTimestamp:q.thread_overview.create_timestamp,updateTimestamp:q.thread_overview.update_timestamp,messageCount:q.thread_overview.message_count})}switch(j.type){case 0:!(k={id:O,type:I,contentsType:u[j.type],from:S,to:b,data:j.text,ext:D,sourceMsg:j.text,time:v,msgConfig:E.msgConfig,onlineState:_}).msgConfig&&delete E.msgConfig,k.error=x,k.errorText=L,k.errorCode=P,!r&&this.onTextMessage&&this.onTextMessage(k);var Z={id:O,type:"txt",chatType:T,msg:j.text,to:b,from:S,ext:D,time:Number(v),onlineState:_};k.msgConfig&&(Z.msgConfig=k.msgConfig),G.length>0&&(Z.reactions=G),H&&(Z.chatThread=H),F&&(Z.chatThreadOverview=F),B.length>0&&(Z.translations=B),U=Z,!r&&this.eventHandler&&this.eventHandler.dispatch("onTextMessage",Z);break;case 1:var K=(null===(y=null==j?void 0:j.size)||void 0===y?void 0:y.width)||0,V=(null===(g=null==j?void 0:j.size)||void 0===g?void 0:g.height)||0;W=this.useOwnUploadFun?j.remotePath:(j.remotePath&&this.apiUrl+j.remotePath.substr(j.remotePath.indexOf("/",9)))+"?em-redirect=true",j.secretKey&&!this.useOwnUploadFun&&(W="".concat(W,"&share-secret=").concat(j.secretKey)),!(k={id:O,type:I,contentsType:u[j.type],from:S,to:b,url:W,secret:j.secretKey,filename:j.displayName,thumb:this.useOwnUploadFun?"":"".concat(W,"&thumbnail=true"),thumb_secret:j.secretKey,file_length:j.fileLength||"",width:K,height:V,filetype:j.filetype||"",accessToken:this.token,ext:D,time:v,msgConfig:E.msgConfig,onlineState:_}).delay&&delete k.delay,!k.msgConfig&&delete E.msgConfig,k.error=x,k.errorText=L,k.errorCode=P,!r&&this.onPictureMessage&&this.onPictureMessage(k);var z={id:O,type:"img",chatType:T,from:S,to:b,url:W||"",file:{},width:K,height:V,secret:j.secretKey||"",thumb:this.useOwnUploadFun?"":"".concat(W,"&thumbnail=true"),thumb_secret:j.secretKey,ext:D,time:Number(v),onlineState:_};k.msgConfig&&(z.msgConfig=k.msgConfig),G.length>0&&(z.reactions=G),H&&(z.chatThread=H),F&&(z.chatThreadOverview=F),U=z,!r&&this.eventHandler&&this.eventHandler.dispatch("onImageMessage",z);break;case 2:W=this.useOwnUploadFun?j.remotePath:(j.remotePath&&this.apiUrl+j.remotePath.substr(j.remotePath.indexOf("/",9)))+"?em-redirect=true",j.secretKey&&!this.useOwnUploadFun&&(W="".concat(W,"&share-secret=").concat(j.secretKey)),!(k={id:O,type:I,contentsType:u[j.type],from:S,to:b,url:W,secret:j.secretKey,filename:j.displayName,length:j.duration||"",file_length:j.fileLength||"",filetype:j.filetype||"",accessToken:this.token||"",ext:D,time:v,msgConfig:E.msgConfig,onlineState:_}).delay&&delete k.delay,!k.msgConfig&&delete E.msgConfig,k.error=x,k.errorText=L,k.errorCode=P,!r&&this.onVideoMessage&&this.onVideoMessage(k);var J={id:O,type:"video",chatType:T,from:S,to:b,url:W,secret:j.secretKey,filename:j.displayName,length:j.duration||0,file:{},file_length:j.fileLength||0,filetype:j.filetype||"",accessToken:this.token||"",ext:D,time:Number(v),onlineState:_};k.msgConfig&&(J.msgConfig=k.msgConfig),G.length>0&&(J.reactions=G),H&&(J.chatThread=H),F&&(J.chatThreadOverview=F),U=J,!r&&this.eventHandler&&this.eventHandler.dispatch("onVideoMessage",J);break;case 3:!(k={id:O,type:I,contentsType:u[j.type],from:S,to:b,addr:j.address,buildingName:j.buildingName,lat:j.latitude,lng:j.longitude,ext:D,time:v,msgConfig:E.msgConfig,onlineState:_}).delay&&delete k.delay,!k.msgConfig&&delete E.msgConfig,k.error=x,k.errorText=L,k.errorCode=P,!r&&this.onLocationMessage&&this.onLocationMessage(k);var X={id:O,type:"loc",chatType:T,from:S,to:b,buildingName:j.buildingName,addr:j.address,lat:j.latitude,lng:j.longitude,ext:D,time:Number(v),onlineState:_};k.msgConfig&&(X.msgConfig=k.msgConfig),G.length>0&&(X.reactions=G),H&&(X.chatThread=H),F&&(X.chatThreadOverview=F),U=X,!r&&this.eventHandler&&this.eventHandler.dispatch("onLocationMessage",X);break;case 4:W=this.useOwnUploadFun?j.remotePath:(j.remotePath&&this.apiUrl+j.remotePath.substr(j.remotePath.indexOf("/",9)))+"?em-redirect=true",j.secretKey&&!this.useOwnUploadFun&&(W="".concat(W,"&share-secret=").concat(j.secretKey)),!(k={id:O,type:I,contentsType:u[j.type],from:S,to:b,url:W,secret:j.secretKey,filename:j.displayName,file_length:j.fileLength||"",accessToken:this.token||"",ext:D,length:j.duration,time:v,msgConfig:E.msgConfig,onlineState:_}).delay&&delete k.delay,!k.msgConfig&&delete E.msgConfig,k.error=x,k.errorText=L,k.errorCode=P,!r&&this.onAudioMessage&&this.onAudioMessage(k);var Y={id:O,type:"audio",chatType:T,from:S,to:b,url:W,secret:j.secretKey,file:{},filename:j.displayName,length:j.duration||0,file_length:j.fileLength||0,filetype:j.filetype||"",accessToken:this.token||"",ext:D,time:Number(v),onlineState:_};k.msgConfig&&(Y.msgConfig=k.msgConfig),G.length>0&&(Y.reactions=G),H&&(Y.chatThread=H),F&&(Y.chatThreadOverview=F),U=Y,!r&&this.eventHandler&&this.eventHandler.dispatch("onAudioMessage",Y);break;case 5:W=this.useOwnUploadFun?j.remotePath:(j.remotePath&&this.apiUrl+j.remotePath.substr(j.remotePath.indexOf("/",9)))+"?em-redirect=true",j.secretKey&&!this.useOwnUploadFun&&(W="".concat(W,"&share-secret=").concat(j.secretKey)),!(k={id:O,type:I,contentsType:u[j.type],from:S,to:b,url:W,secret:j.secretKey,filename:j.displayName,file_length:j.fileLength,accessToken:this.token||"",ext:D,time:v,msgConfig:E.msgConfig,onlineState:_}).delay&&delete k.delay,!k.msgConfig&&delete E.msgConfig,k.error=x,k.errorText=L,k.errorCode=P,!r&&this.onFileMessage&&this.onFileMessage(k);var $={id:O,type:"file",chatType:T,from:S,to:b,url:W,secret:j.secretKey,file:{},filename:j.displayName,length:j.duration||0,file_length:j.fileLength||0,filetype:j.filetype||"",accessToken:this.token||"",ext:D,time:Number(v),onlineState:_};k.msgConfig&&($.msgConfig=k.msgConfig),G.length>0&&($.reactions=G),H&&($.chatThread=H),F&&($.chatThreadOverview=F),U=$,!r&&this.eventHandler&&this.eventHandler.dispatch("onFileMessage",$);break;case 6:!(k={id:O,type:I,contentsType:u[j.type],from:S,to:b,action:j.action,ext:D,time:v,msgConfig:E.msgConfig,onlineState:_}).msgConfig&&delete E.msgConfig,k.error=x,k.errorText=L,k.errorCode=P,!r&&this.onCmdMessage&&this.onCmdMessage(k);var Q={id:O,type:"cmd",chatType:T,from:S,to:b,action:j.action,ext:D,time:Number(v),onlineState:_};k.msgConfig&&(Q.msgConfig=k.msgConfig),G.length>0&&(Q.reactions=G),H&&(Q.chatThread=H),F&&(Q.chatThreadOverview=F),U=Q,!r&&this.eventHandler&&this.eventHandler.dispatch("onCmdMessage",Q);break;case 7:var ee={},te={};E.contents[0].customExts&&(ee=l(E.contents[0].customExts)),E.contents[0].params&&(te=l(E.contents[0].params)),k={id:O,type:I,contentsType:u[j.type],from:S,to:b,customEvent:j.customEvent,params:te,customExts:ee,ext:D,time:v,onlineState:_},!r&&this.onCustomMessage&&this.onCustomMessage(k);var re={id:O,type:"custom",chatType:T,from:S,to:b,customEvent:j.customEvent,params:te,customExts:ee,ext:D,time:Number(v),onlineState:_};k.msgConfig&&(re.msgConfig=k.msgConfig),G.length>0&&(re.reactions=G),H&&(re.chatThread=H),F&&(re.chatThreadOverview=F),U=re,!r&&this.eventHandler&&this.eventHandler.dispatch("onCustomMessage",re);break;default:s.kg.error("Unknow message type, message:",j)}return n?U:k}}},5163:function(e,t,r){"use strict";r(8668);var n,o=r(6916),i=r(4306),a=r(3681);!function(e){e[e.Add=2]="Add",e[e.Remove=3]="Remove",e[e.Accept=4]="Accept",e[e.Decline=5]="Decline",e[e.Ban=6]="Ban",e[e.Allow=7]="Allow"}(n||(n={}));var s={operatRoster:function(e,t){var r=[],s=this.root.lookup("easemob.pb.RosterBody"),c=s.decode(r);switch(t){case"add":c.operation=n.Add;break;case"remove":c.operation=n.Remove;break;case"accept":c.operation=n.Accept;break;case"decline":c.operation=n.Decline;break;case"ban":c.operation=n.Ban;break;case"allow":c.operation=n.Allow;break;default:o.kg.error("operatRoster:",t)}c.from=this.context.jid;var u=[];if("string"==typeof e.to)u.push({appKey:this.appKey||this.context.appKey,name:e.to,domain:"easemob.com"});else if(e.to instanceof Array)for(var l=0;l<e.to.length;l++)u.push({appKey:this.appKey,name:e.to[l],domain:"easemob.com"});c.to=u,c.reason=e.message||"",c=s.encode(c).finish();var p=this.root.lookup("easemob.pb.Meta").decode(r);p.id=e.id||this.getUniqueId();var h=this.dataReport.geOperateFun({operationName:a.fI[t]});i.Nl.size<=i.F3&&i.Nl.set(p.id,{rpt:h,requestName:a.fI[t]}),p.from=this.context.jid,p.to={domain:"@easemob.com"},p.ns=3,p.payload=c;var d=this.root.lookup("easemob.pb.CommSyncUL"),f=d.decode(r);f.meta=p,f=d.encode(f).finish();var m=this.root.lookup("easemob.pb.MSync"),y=m.decode(r);if(y.version=this.version,y.encryptType=[0],y.command=0,y.guid=this.jid,y.payload=f,y=m.encode(y).finish(),"miniCore"===this.name)this.sock.send(y);else{var g=this.mSync.base64transform(y);this.sock.send(g)}},handleRosterMsg:function(e){var t,r,n,i,a,s,c=this.root.lookup("easemob.pb.RosterBody").decode(e.payload),u={type:"",to:c.to[0].name,from:c.from.name,status:c.reason};switch(c.operation){case 2:u.type="subscribe",this.onContactInvited&&this.onContactInvited(u),null===(t=this.eventHandler)||void 0===t||t.dispatch("onContactInvited",u);break;case 3:u.type="unsubscribed",this.onContactDeleted&&this.onContactDeleted(u),null===(r=this.eventHandler)||void 0===r||r.dispatch("onContactDeleted",u);break;case 4:u.type="subscribed",this.onContactAdded&&this.onContactAdded(u),null===(n=this.eventHandler)||void 0===n||n.dispatch("onContactAdded",u);break;case 5:u.type="unsubscribed",this.onContactRefuse&&this.onContactRefuse(u),null===(i=this.eventHandler)||void 0===i||i.dispatch("onContactRefuse",u);break;case 6:case 7:this.getBlacklist();break;case 8:u.type="subscribed",this.onContactAgreed&&this.onContactAgreed(u),null===(a=this.eventHandler)||void 0===a||a.dispatch("onContactAgreed",u);break;case 9:u.type="unsubscribed",this.onContactRefuse&&this.onContactRefuse(u),null===(s=this.eventHandler)||void 0===s||s.dispatch("onContactRefuse",u);break;default:o.kg.error("handleRosterMsg:",c)}this.onPresence&&u.type&&this.onPresence(u)}};t.Z=s},6916:function(e,t,r){"use strict";function n(){console.log&&(console.log.apply?console.log.apply(console,Array.prototype.slice.call(arguments)):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}r.d(t,{kg:function(){return f}}),r(2657),r(7095),r(8668),r(3535),r(1685),r(900),r(2486),r(4261),r(4838),r(8385),r(7693),r(9782),r(1008),r(7461),r(1362),r(5980),r(514),r(4201),r(6864);var o="undefined"!=typeof window&&void 0!==window.navigator&&/Trident\/|MSIE /.test(window.navigator.userAgent);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var a,s=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},c=function(){},u={};!function(e){e[e.TRACE=0]="TRACE",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(a||(a={}));var l=function(){function e(e,t,r){this.name=e||"defaultLogger",this.currentLevel=0,this.useCookiePersist=!1,this.storageLogLevelKey="loglevel",this.levels=a,this.logMethods=["trace","debug","info","warn","error"],this.methodFactory=r||this.defaultMethodFactory;var n=this._getPersistedLevel();null==n&&(n=null===t?"WARN":t),this.logs=[],this.config={useCache:!1,maxCache:3145728,color:"",background:""},this.logBytes=0,this.setLevel(n,!1,"")}return e.prototype.setConfig=function(e){this.config=e},e.prototype.getLevel=function(){return this.currentLevel},e.prototype.setLevel=function(e,t,r){if("string"==typeof e&&(e=a[e]),void 0===e&&(e=0),!("number"==typeof e&&e>=0&&e<=this.levels.SILENT))throw Error("log.setLevel() called with invalid level: "+e);if(this.currentLevel=e,!1!==t&&this._persistLevel(e),this.replaceLoggingMethods(e,r),"undefined"==typeof console&&e<a.SILENT)throw Error("No console available for logging")},e.prototype.setDefaultLevel=function(e){this._getPersistedLevel()||this.setLevel(e,!1,"")},e.prototype.enableAll=function(e){this.setLevel(this.levels.TRACE,!0,"")},e.prototype.disableAll=function(e){this.setLevel(this.levels.SILENT,!0,"")},e.prototype.getLogs=function(){return this.logs},e.prototype.download=function(){if("undefined"!=typeof window&&"undefined"!=typeof document){var e=this.getLogs().join("\n"),t=new Blob([e],{type:"text/plain;charset=UTF-8"}),r=window.URL.createObjectURL(t),n=document.createElement("a");n.style.display="none",n.href=r,n.setAttribute("download","sdklog"),document.body.appendChild(n),n.click()}},e.prototype._bindMethod=function(e,t,r){var n=this,o=e[t],i=this.getTime();if(r)return this._cacheLog;if("function"==typeof o.bind)return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=n.getTime();o.call.apply(o,s([e,"".concat(a," IM SDK [").concat("log"===t?"debug":t,"]: ")],r,!1)),n.onLog&&n.onLog({time:a,level:"log"===t?"debug":t,logs:r})};try{return Function.prototype.bind.call(o,e,"".concat(i," IM SDK [").concat("log"===t?"debug":t,"]: "))}catch(t){return function(){return Function.prototype.apply.apply(o,[e,arguments])}}},e.prototype.getTime=function(){var e=new Date;return e.toTimeString().split(" ")[0]+":"+e.getMilliseconds()},e.prototype._cacheLog=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(new Date).toLocaleString()+": ",n="";e.forEach((function(e){"object"===i(e)?n+=JSON.stringify(e)+" ":n+=e+" "})),this._cacheLogCall(r+n)},e.prototype._cacheLogCall=function(e){var t=p(e),r=this.logBytes+t,n=this.config.maxCache;if(!(t>=n)){if(r<n)this.logBytes+=t;else for(var o=r-n,i=0;i<o;){var a=this.logs.shift();void 0!==a&&(i+=p(a))}this.logs.push(e)}},e.prototype._getPersistedLevel=function(){var e;if("undefined"==typeof window)return 5;if("undefined"===(e=window&&window.localStorage&&window.localStorage[this.storageLogLevelKey])){var t=window.document.cookie,r=t.indexOf(encodeURIComponent(this.storageLogLevelKey));-1!==r&&(e=/^([^;]+)/.exec(t.slice(r))[1])}return e||5},e.prototype._persistLevel=function(e){var t=this.logMethods[e]||"SILENT";"undefined"!=typeof window&&(window.localStorage&&(window.localStorage[this.storageLogLevelKey]=t),this.useCookiePersist&&(window.document.cookie=encodeURIComponent(this.storageLogLevelKey)+"="+t+";"))},e.prototype.replaceLoggingMethods=function(e,t){for(var r=0;r<this.logMethods.length;r++){var n=this.logMethods[r];this[n]=r<e?c:this.methodFactory(n,e,t)}this.log=this.debug},e.prototype.defaultMethodFactory=function(e,t,r){return this.realMethod(e)||this.enableLoggingWhenConsoleArrives.apply(this,[e,t,r])},e.prototype.realMethod=function(e){return"debug"===e&&(e="log"),"undefined"!=typeof console&&("trace"===e&&o?n:void 0!==console[e]?this._bindMethod(console,e,this.config.useCache):void 0!==console.log?this._bindMethod(console,"log",this.config.useCache):c)},e.prototype.enableLoggingWhenConsoleArrives=function(e,t,r){return function(){"undefined"!=typeof console&&(this.replaceLoggingMethods.call(this,t,r),this[e].apply(this,arguments))}.bind(this)},e}();function p(e){for(var t=e.length,r=0;r<e.length;r++)e.charCodeAt(r)>255&&t++;return t}var h=new l;h.getLogger=function(e){if("string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");return this};var d="undefined"!=typeof window?window.log:void 0;h.noConflict=function(){return"undefined"!=typeof window&&window.log===h&&(window.log=d),h},h.getLoggers=function(){return u};var f=h},2591:function(e,t,r){"use strict";r.d(t,{Message:function(){return m}});var n=r(7551),o=function(){function e(e){var t=e.id;this.id=t,this.type=e.type}return e.prototype.set=function(e){this.body={id:this.id,ackId:e.id,type:"read",to:e.to,from:e.from||"",chatType:e.chatType}},e.create=function(e){return{id:n.P6.getUniqueId(),chatType:e.chatType,ackId:e.id,type:"read",to:e.to,from:e.from||"",ackContent:e.ackContent,isChatThread:e.isChatThread}},e}(),i=function(){function e(e){this.id=e.id,this.type=e.type}return e.prototype.set=function(e){this.body={id:this.id,ackId:e.ackId,type:"delivery",to:e.to,from:e.from||""}},e.create=function(e){return{id:n.P6.getUniqueId(),ackId:e.ackId,type:"delivery",to:e.to,from:e.from||"",isChatThread:e.isChatThread}},e}(),a=(r(9046),r(9782),function(){function e(e){var t=e.type,r=e.id;this.id=r,this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"channel",to:e.to,from:e.from||"",time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.P6.getUniqueId(),type:"channel",chatType:e.chatType||"singleChat",to:e.to,from:e.from||"",time:Date.now(),isChatThread:e.isChatThread}},e}()),s=(r(3529),function(){function e(e){var t=e.type,r=e.id||n.P6.getUniqueId();this.id=r,this.type=t,this.value=""}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"txt",to:e.to,msg:e.msg,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),isChatThread:e.isChatThread},this.value=e.msg},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){var t,r;return(null===(t=e.msgConfig)||void 0===t?void 0:t.languages)&&Array.isArray(null===(r=e.msgConfig)||void 0===r?void 0:r.languages),{type:"txt",id:n.P6.getUniqueId(),msg:e.msg,to:e.to,from:e.from||"",chatType:e.chatType,ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread}},e}()),c=function(){function e(e){var t=e.type,r=e.id;this.id=r||n.P6.getUniqueId(),this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"cmd",to:e.to,action:e.action,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.P6.getUniqueId(),type:"cmd",to:e.to,from:e.from||"",chatType:e.chatType||"singleChat",action:e.action,time:Date.now(),ext:e.ext,msgConfig:e.msgConfig,isChatThread:e.isChatThread}},e}(),u=function(){function e(e){var t=e.type,r=e.id||n.P6.getUniqueId();this.id=r,this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"custom",to:e.to,customEvent:e.customEvent,customExts:e.customExts,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.P6.getUniqueId(),chatType:e.chatType||"singleChat",type:"custom",to:e.to,customEvent:e.customEvent,customExts:e.customExts,from:e.from||"",ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread}},e}(),l=function(){function e(e){var t=e.type,r=e.id;this.id=r||n.P6.getUniqueId(),this.type=t}return e.prototype.set=function(e){this.body={id:this.id,chatType:e.chatType||"singleChat",type:"loc",to:e.to,addr:e.addr,buildingName:e.buildingName,lat:e.lat,lng:e.lng,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now()}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.P6.getUniqueId(),chatType:e.chatType||"singleChat",type:"loc",to:e.to,addr:e.addr,buildingName:e.buildingName,lat:e.lat,lng:e.lng,from:e.from||"",ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread}},e}(),p=function(){function e(e){var t=e.type,r=e.id||n.P6.getUniqueId();this.id=r,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&n.P6.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"img",file:e.file,width:e.width,height:e.height,to:e.to,from:e.from||"",roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.P6.getUniqueId(),chatType:e.chatType,type:"img",url:e.url,width:e.width,height:e.height,file:e.file,to:e.to,from:e.from||"",ext:e.ext,time:Date.now(),msgConfig:e.msgConfig,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,isChatThread:e.isChatThread}},e}(),h=function(){function e(e){var t=e.type,r=e.id||n.P6.getUniqueId();this.id=r,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&n.P6.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"audio",file:e.file,filename:e.filename,length:e.length,file_length:e.file_length,fileInputId:e.fileInputId,to:e.to,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.P6.getUniqueId(),chatType:e.chatType,type:"audio",filename:e.filename,length:e.length,file:e.file,to:e.to,from:e.from||"",ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,file_length:e.file_length,msgConfig:e.msgConfig,isChatThread:e.isChatThread}},e}(),d=function(){function e(e){var t=e.type,r=e.id;this.id=r,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&n.P6.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"video",file:e.file,filename:e.filename,length:e.length,file_length:e.file_length,fileInputId:e.fileInputId,to:e.to,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),apiUrl:e.apiUrl,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.P6.getUniqueId(),chatType:e.chatType||"singleChat",type:"video",file:e.file,filename:e.filename,length:e.length,file_length:e.file_length,fileInputId:e.fileInputId,to:e.to,from:e.from||"",ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,msgConfig:e.msgConfig,isChatThread:e.isChatThread}},e}(),f=function(){function e(e){var t=e.type,r=e.id;this.id=r,this.type=t}return e.prototype.set=function(e){e.file=e.file||e.fileInputId&&n.P6.getFileUrl(e.fileInputId),this.body={id:this.id,chatType:e.chatType||"singleChat",type:"file",file:e.file,filename:e.filename,fileInputId:e.fileInputId,to:e.to,from:e.from,roomType:e.roomType,success:e.success,fail:e.fail,ext:e.ext,time:Date.now(),onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,isChatThread:e.isChatThread}},e.prototype.setChatType=function(e){return!!this.body&&(this.body.chatType=e,!0)},e.prototype.setGroup=function(e){return!!this.body&&(this.body.group=e,!0)},e.create=function(e){return{id:n.P6.getUniqueId(),chatType:e.chatType||"singleChat",type:"file",file:e.file,filename:e.filename,fileInputId:e.fileInputId,to:e.to,from:e.from||"",ext:e.ext,onFileUploadError:e.onFileUploadError,onFileUploadComplete:e.onFileUploadComplete,onFileUploadProgress:e.onFileUploadProgress,body:e.body,time:Date.now(),msgConfig:e.msgConfig,isChatThread:e.isChatThread}},e}(),m=function(){function e(t,r){return this.type=t,this.id=r||n.P6.getUniqueId(),e.createOldMsg({type:t,id:this.id})}return e.createOldMsg=function(e){switch(e.type){case"read":return new o({type:"read",id:e.id});case"delivery":return new i({type:"delivery",id:e.id});case"channel":return new a({type:"channel",id:e.id});case"txt":return new s({type:"txt",id:e.id});case"cmd":return new c({type:"cmd",id:e.id});case"custom":return new u({type:"custom",id:e.id});case"loc":return new l({type:"loc",id:e.id});case"img":return new p({type:"img",id:e.id});case"audio":return new h({type:"audio",id:e.id});case"video":return new d({type:"video",id:e.id});case"file":return new f({type:"file",id:e.id})}},e.create=function(e){return"txt"!==(t=e).type||"version"in t?function(e){return"img"===e.type&&!("version"in e)}(e)?p.create(e):function(e){return"cmd"===e.type&&!("version"in e)}(e)?c.create(e):function(e){return"file"===e.type&&!("version"in e)}(e)?f.create(e):function(e){return"audio"===e.type&&!("version"in e)}(e)?h.create(e):function(e){return"video"===e.type&&!("version"in e)}(e)?d.create(e):function(e){return"custom"===e.type&&!("version"in e)}(e)?u.create(e):function(e){return"loc"===e.type&&!("version"in e)}(e)?l.create(e):function(e){return"channel"===e.type&&!("version"in e)}(e)?a.create(e):function(e){return"delivery"===e.type&&!("version"in e)}(e)?i.create(e):function(e){return"read"===e.type&&!("version"in e)}(e)?o.create(e):{}:s.create(e);var t},e.prototype.set=function(e){},e}()},3365:function(e,t,r){"use strict";var n;r.d(t,{E:function(){return n}}),function(e){e[e.REQUEST_SUCCESS=0]="REQUEST_SUCCESS",e[e.REQUEST_TIMEOUT=-1]="REQUEST_TIMEOUT",e[e.REQUEST_UNKNOWN=-2]="REQUEST_UNKNOWN",e[e.REQUEST_PARAMETER_ERROR=-3]="REQUEST_PARAMETER_ERROR",e[e.REQUEST_ABORT=-4]="REQUEST_ABORT",e[e.WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR=0]="WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_OPEN_ERROR=1]="WEBIM_CONNCTION_OPEN_ERROR",e[e.WEBIM_CONNCTION_AUTH_ERROR=2]="WEBIM_CONNCTION_AUTH_ERROR",e[e.WEBIM_CONNCTION_OPEN_USERGRID_ERROR=3]="WEBIM_CONNCTION_OPEN_USERGRID_ERROR",e[e.WEBIM_CONNCTION_ATTACH_ERROR=4]="WEBIM_CONNCTION_ATTACH_ERROR",e[e.WEBIM_CONNCTION_ATTACH_USERGRID_ERROR=5]="WEBIM_CONNCTION_ATTACH_USERGRID_ERROR",e[e.WEBIM_CONNCTION_REOPEN_ERROR=6]="WEBIM_CONNCTION_REOPEN_ERROR",e[e.WEBIM_CONNCTION_SERVER_CLOSE_ERROR=7]="WEBIM_CONNCTION_SERVER_CLOSE_ERROR",e[e.WEBIM_CONNCTION_SERVER_ERROR=8]="WEBIM_CONNCTION_SERVER_ERROR",e[e.WEBIM_CONNCTION_IQ_ERROR=9]="WEBIM_CONNCTION_IQ_ERROR",e[e.WEBIM_CONNCTION_PING_ERROR=10]="WEBIM_CONNCTION_PING_ERROR",e[e.WEBIM_CONNCTION_NOTIFYVERSION_ERROR=11]="WEBIM_CONNCTION_NOTIFYVERSION_ERROR",e[e.WEBIM_CONNCTION_GETROSTER_ERROR=12]="WEBIM_CONNCTION_GETROSTER_ERROR",e[e.WEBIM_CONNCTION_CROSSDOMAIN_ERROR=13]="WEBIM_CONNCTION_CROSSDOMAIN_ERROR",e[e.WEBIM_CONNCTION_LISTENING_OUTOF_MAXRETRIES=14]="WEBIM_CONNCTION_LISTENING_OUTOF_MAXRETRIES",e[e.WEBIM_CONNCTION_RECEIVEMSG_CONTENTERROR=15]="WEBIM_CONNCTION_RECEIVEMSG_CONTENTERROR",e[e.WEBIM_CONNCTION_DISCONNECTED=16]="WEBIM_CONNCTION_DISCONNECTED",e[e.WEBIM_CONNCTION_AJAX_ERROR=17]="WEBIM_CONNCTION_AJAX_ERROR",e[e.WEBIM_CONNCTION_JOINROOM_ERROR=18]="WEBIM_CONNCTION_JOINROOM_ERROR",e[e.WEBIM_CONNCTION_GETROOM_ERROR=19]="WEBIM_CONNCTION_GETROOM_ERROR",e[e.WEBIM_CONNCTION_GETROOMINFO_ERROR=20]="WEBIM_CONNCTION_GETROOMINFO_ERROR",e[e.WEBIM_CONNCTION_GETROOMMEMBER_ERROR=21]="WEBIM_CONNCTION_GETROOMMEMBER_ERROR",e[e.WEBIM_CONNCTION_GETROOMOCCUPANTS_ERROR=22]="WEBIM_CONNCTION_GETROOMOCCUPANTS_ERROR",e[e.WEBIM_CONNCTION_LOAD_CHATROOM_ERROR=23]="WEBIM_CONNCTION_LOAD_CHATROOM_ERROR",e[e.WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR=24]="WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR",e[e.WEBIM_CONNCTION_JOINCHATROOM_ERROR=25]="WEBIM_CONNCTION_JOINCHATROOM_ERROR",e[e.WEBIM_CONNCTION_QUITCHATROOM_ERROR=26]="WEBIM_CONNCTION_QUITCHATROOM_ERROR",e[e.WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR=27]="WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR=28]="WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_SESSIONID_NOT_ASSIGN_ERROR=29]="WEBIM_CONNCTION_SESSIONID_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_RID_NOT_ASSIGN_ERROR=30]="WEBIM_CONNCTION_RID_NOT_ASSIGN_ERROR",e[e.WEBIM_CONNCTION_CALLBACK_INNER_ERROR=31]="WEBIM_CONNCTION_CALLBACK_INNER_ERROR",e[e.WEBIM_CONNCTION_CLIENT_OFFLINE=32]="WEBIM_CONNCTION_CLIENT_OFFLINE",e[e.WEBIM_CONNCTION_CLIENT_LOGOUT=33]="WEBIM_CONNCTION_CLIENT_LOGOUT",e[e.WEBIM_CONNCTION_CLIENT_TOO_MUCH_ERROR=34]="WEBIM_CONNCTION_CLIENT_TOO_MUCH_ERROR",e[e.WEBIM_CONNECTION_ACCEPT_INVITATION_FROM_GROUP=35]="WEBIM_CONNECTION_ACCEPT_INVITATION_FROM_GROUP",e[e.WEBIM_CONNECTION_DECLINE_INVITATION_FROM_GROUP=36]="WEBIM_CONNECTION_DECLINE_INVITATION_FROM_GROUP",e[e.WEBIM_CONNECTION_ACCEPT_JOIN_GROUP=37]="WEBIM_CONNECTION_ACCEPT_JOIN_GROUP",e[e.WEBIM_CONNECTION_DECLINE_JOIN_GROUP=38]="WEBIM_CONNECTION_DECLINE_JOIN_GROUP",e[e.WEBIM_CONNECTION_CLOSED=39]="WEBIM_CONNECTION_CLOSED",e[e.WEBIM_CONNECTION_ERROR=40]="WEBIM_CONNECTION_ERROR",e[e.MAX_LIMIT=50]="MAX_LIMIT",e[e.MESSAGE_NOT_FOUND=51]="MESSAGE_NOT_FOUND",e[e.NO_PERMISSION=52]="NO_PERMISSION",e[e.OPERATION_UNSUPPORTED=53]="OPERATION_UNSUPPORTED",e[e.OPERATION_NOT_ALLOWED=54]="OPERATION_NOT_ALLOWED",e[e.WEBIM_UPLOADFILE_BROWSER_ERROR=100]="WEBIM_UPLOADFILE_BROWSER_ERROR",e[e.WEBIM_UPLOADFILE_ERROR=101]="WEBIM_UPLOADFILE_ERROR",e[e.WEBIM_UPLOADFILE_NO_LOGIN=102]="WEBIM_UPLOADFILE_NO_LOGIN",e[e.WEBIM_UPLOADFILE_NO_FILE=103]="WEBIM_UPLOADFILE_NO_FILE",e[e.WEBIM_DOWNLOADFILE_ERROR=200]="WEBIM_DOWNLOADFILE_ERROR",e[e.WEBIM_DOWNLOADFILE_NO_LOGIN=201]="WEBIM_DOWNLOADFILE_NO_LOGIN",e[e.WEBIM_DOWNLOADFILE_BROWSER_ERROR=202]="WEBIM_DOWNLOADFILE_BROWSER_ERROR",e[e.USER_NOT_FOUND=204]="USER_NOT_FOUND",e[e.WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE=206]="WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE",e[e.WEBIM_CONNCTION_USER_REMOVED=207]="WEBIM_CONNCTION_USER_REMOVED",e[e.WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD=216]="WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD",e[e.WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE=217]="WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE",e[e.USER_MUTED_BY_ADMIN=219]="USER_MUTED_BY_ADMIN",e[e.USER_NOT_FRIEND=221]="USER_NOT_FRIEND",e[e.WEBIM_MESSAGE_REC_TEXT=300]="WEBIM_MESSAGE_REC_TEXT",e[e.WEBIM_MESSAGE_REC_TEXT_ERROR=301]="WEBIM_MESSAGE_REC_TEXT_ERROR",e[e.WEBIM_MESSAGE_REC_EMOTION=302]="WEBIM_MESSAGE_REC_EMOTION",e[e.WEBIM_MESSAGE_REC_PHOTO=303]="WEBIM_MESSAGE_REC_PHOTO",e[e.WEBIM_MESSAGE_REC_AUDIO=304]="WEBIM_MESSAGE_REC_AUDIO",e[e.WEBIM_MESSAGE_REC_AUDIO_FILE=305]="WEBIM_MESSAGE_REC_AUDIO_FILE",e[e.WEBIM_MESSAGE_REC_VEDIO=306]="WEBIM_MESSAGE_REC_VEDIO",e[e.WEBIM_MESSAGE_REC_VEDIO_FILE=307]="WEBIM_MESSAGE_REC_VEDIO_FILE",e[e.WEBIM_MESSAGE_REC_FILE=308]="WEBIM_MESSAGE_REC_FILE",e[e.WEBIM_MESSAGE_SED_TEXT=309]="WEBIM_MESSAGE_SED_TEXT",e[e.WEBIM_MESSAGE_SED_EMOTION=310]="WEBIM_MESSAGE_SED_EMOTION",e[e.WEBIM_MESSAGE_SED_PHOTO=311]="WEBIM_MESSAGE_SED_PHOTO",e[e.WEBIM_MESSAGE_SED_AUDIO=312]="WEBIM_MESSAGE_SED_AUDIO",e[e.WEBIM_MESSAGE_SED_AUDIO_FILE=313]="WEBIM_MESSAGE_SED_AUDIO_FILE",e[e.WEBIM_MESSAGE_SED_VEDIO=314]="WEBIM_MESSAGE_SED_VEDIO",e[e.WEBIM_MESSAGE_SED_VEDIO_FILE=315]="WEBIM_MESSAGE_SED_VEDIO_FILE",e[e.WEBIM_MESSAGE_SED_FILE=316]="WEBIM_MESSAGE_SED_FILE",e[e.WEBIM_MESSAGE_SED_ERROR=317]="WEBIM_MESSAGE_SED_ERROR",e[e.STATUS_INIT=400]="STATUS_INIT",e[e.STATUS_DOLOGIN_USERGRID=401]="STATUS_DOLOGIN_USERGRID",e[e.STATUS_DOLOGIN_IM=402]="STATUS_DOLOGIN_IM",e[e.STATUS_OPENED=403]="STATUS_OPENED",e[e.STATUS_CLOSING=404]="STATUS_CLOSING",e[e.STATUS_CLOSED=405]="STATUS_CLOSED",e[e.STATUS_ERROR=406]="STATUS_ERROR",e[e.SERVER_BUSY=500]="SERVER_BUSY",e[e.MESSAGE_INCLUDE_ILLEGAL_CONTENT=501]="MESSAGE_INCLUDE_ILLEGAL_CONTENT",e[e.MESSAGE_EXTERNAL_LOGIC_BLOCKED=502]="MESSAGE_EXTERNAL_LOGIC_BLOCKED",e[e.SERVER_UNKNOWN_ERROR=503]="SERVER_UNKNOWN_ERROR",e[e.MESSAGE_RECALL_TIME_LIMIT=504]="MESSAGE_RECALL_TIME_LIMIT",e[e.SERVICE_NOT_ENABLED=505]="SERVICE_NOT_ENABLED",e[e.SERVICE_NOT_ALLOW_MESSAGING=506]="SERVICE_NOT_ALLOW_MESSAGING",e[e.SERVICE_NOT_ALLOW_MESSAGING_MUTE=507]="SERVICE_NOT_ALLOW_MESSAGING_MUTE",e[e.MESSAGE_MODERATION_BLOCKED=508]="MESSAGE_MODERATION_BLOCKED",e[e.MESSAGE_CURRENT_LIMITING=509]="MESSAGE_CURRENT_LIMITING",e[e.GROUP_NOT_EXIST=605]="GROUP_NOT_EXIST",e[e.GROUP_NOT_JOINED=602]="GROUP_NOT_JOINED",e[e.GROUP_MEMBERS_FULL=606]="GROUP_MEMBERS_FULL",e[e.PERMISSION_DENIED=603]="PERMISSION_DENIED",e[e.WEBIM_LOAD_MSG_ERROR=604]="WEBIM_LOAD_MSG_ERROR",e[e.GROUP_ALREADY_JOINED=601]="GROUP_ALREADY_JOINED",e[e.GROUP_MEMBERS_LIMIT=607]="GROUP_MEMBERS_LIMIT",e[e.GROUP_IS_DISABLED=608]="GROUP_IS_DISABLED",e[e.REST_PARAMS_STATUS=700]="REST_PARAMS_STATUS",e[e.CHATROOM_NOT_JOINED=702]="CHATROOM_NOT_JOINED",e[e.CHATROOM_MEMBERS_FULL=704]="CHATROOM_MEMBERS_FULL",e[e.CHATROOM_NOT_EXIST=705]="CHATROOM_NOT_EXIST",e[e.SDK_RUNTIME_ERROR=999]="SDK_RUNTIME_ERROR",e[e.PRESENCE_PARAM_EXCEED=1100]="PRESENCE_PARAM_EXCEED",e[e.REACTION_ALREADY_ADDED=1101]="REACTION_ALREADY_ADDED",e[e.REACTION_CREATING=1102]="REACTION_CREATING",e[e.REACTION_OPERATION_IS_ILLEGAL=1103]="REACTION_OPERATION_IS_ILLEGAL",e[e.TRANSLATION_NOT_VALID=1200]="TRANSLATION_NOT_VALID",e[e.TRANSLATION_TEXT_TOO_LONG=1201]="TRANSLATION_TEXT_TOO_LONG",e[e.TRANSLATION_FAILED=1204]="TRANSLATION_FAILED",e[e.THREAD_NOT_EXIST=1300]="THREAD_NOT_EXIST",e[e.THREAD_ALREADY_EXIST=1301]="THREAD_ALREADY_EXIST"}(n||(n={}))},7551:function(e,t,r){"use strict";r.d(t,{iw:function(){return f},hj:function(){return u},LR:function(){return E},cT:function(){return v},P6:function(){return T}}),r(8327),r(900),r(3814),r(9782),r(9889),r(2657),r(5980),r(8453),r(937),r(1685),r(2486),r(4261),r(4838),r(8385),r(8668),r(1655),r(1008),r(7461),r(6619);var n=r(3365),o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)},i=r(3681),a=r(6916),s=function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)},c=function(){};function u(e,t){var r,u=this;return y().platform===f.WEB?new Promise((function(t,i){var s=e.dataType||"text",u=e.success||c,l=e.error||c,p=new XMLHttpRequest;p.ontimeout=function(){i({type:n.E.REQUEST_TIMEOUT,message:"Request Timeout",errorType:"timeout_error",xhr:p})},p.onerror=function(){i({type:n.E.REQUEST_UNKNOWN,message:"Request Unknow Error",errorType:"onerror",xhr:p})},p.onabort=function(){i({type:n.E.REQUEST_ABORT,message:"Request Abort",errorType:"onabort",xhr:p})},p.onreadystatechange=function(){if(4===p.readyState){var e=(new Date).getTime()-r,c=p.status||0,h={elapse:e,httpCode:c};if(200===c){T.ajaxUnconventionalErrorTimes=0;try{switch(s){case"text":return u(p.responseText),void t(p.responseText);case"json":var d=JSON.parse(p.responseText);return d.extraInfo=h,u(d),void t(d);case"xml":return p.responseXML&&p.responseXML.documentElement?(u(p.responseXML.documentElement),void t(p.responseXML.documentElement)):(l({type:n.E.WEBIM_CONNCTION_AJAX_ERROR,data:p.responseText,message:"XHR.responseXML is null or XHR.responseXML.documentElement is null"}),void i({type:n.E.WEBIM_CONNCTION_AJAX_ERROR,data:p.responseText,message:"XHR.responseXML is null or XHR.responseXML.documentElement is null"}));default:l({type:n.E.WEBIM_CONNCTION_AJAX_ERROR,data:p.responseText,message:"Invalid dataType"}),i({type:n.E.WEBIM_CONNCTION_AJAX_ERROR,data:p.responseText,message:"Invalid dataType"})}return t(p.response||p.responseText),void u(p.response||p.responseText,p)}catch(e){i(e)}return}[400,401,403,404,429,500,503].includes(c)||(a.kg.debug("rest api request fail status:",c),T.ajaxUnconventionalErrorTimes++),function(e,t,r,i){var a,s,c,u,l,p,h,d,f,m,y,g,v,E,_,T,O,R,I,S,b=e.response;b&&"string"==typeof b&&(b=JSON.parse(b));var C=e.status,A={elapse:i,httpCode:C,errDesc:null==b?void 0:b.error_description};if(400===C){if(40002===b.error_code)return void t({type:n.E.THREAD_ALREADY_EXIST,message:null==b?void 0:b.error_description,extraInfo:A});if(40009===b.error_code)return void t({type:n.E.OPERATION_UNSUPPORTED,message:null==b?void 0:b.error_description,extraInfo:A});if(60010===b.error_code)return void t({type:n.E.NO_PERMISSION,message:null==b?void 0:b.desc});if(60011===b.error_code)return void t({type:n.E.CHATROOM_NOT_JOINED,message:null==b?void 0:b.desc});if(60012===b.error_code)return void t({type:n.E.MAX_LIMIT,message:null==b?void 0:b.desc});if(null===(a=b.error_description)||void 0===a?void 0:a.includes("are not members of this group"))return(null===(s=e.responseURL)||void 0===s?void 0:s.includes("chatgroups"))?t({type:n.E.GROUP_NOT_JOINED,data:e.response||e.responseText,message:b.error_description,extraInfo:A}):t({type:n.E.CHATROOM_NOT_JOINED,data:e.response||e.responseText,message:b.error_description,extraInfo:A}),void r({type:n.E.WEBIM_CONNCTION_AJAX_ERROR,message:null==b?void 0:b.error_description,data:e.responseText,extraInfo:A});if("the app not open presence"===(null==b?void 0:b.result))return void t({type:n.E.SERVICE_NOT_ENABLED,message:null==b?void 0:b.result,extraInfo:A});switch(null==b?void 0:b.error_description){case"the user is already operation this message":t({type:n.E.REACTION_ALREADY_ADDED,message:null==b?void 0:b.error_description,extraInfo:A});break;case"The quantity has exceeded the limit!":t({type:n.E.MAX_LIMIT,message:null==b?void 0:b.error_description,extraInfo:A});break;case"The user not in this group!":t({type:n.E.GROUP_NOT_JOINED,message:null==b?void 0:b.error_description,extraInfo:A});break;case"the user operation is illegal!":t({type:n.E.REACTION_OPERATION_IS_ILLEGAL,message:null==b?void 0:b.error_description,extraInfo:A});break;case"this appKey is not open reaction service!":t({type:n.E.SERVICE_NOT_ENABLED,message:null==b?void 0:b.error_description,extraInfo:A});break;case"this message is creating reaction, please try again.":t({type:n.E.REACTION_CREATING,message:null==b?void 0:b.error_description,extraInfo:A});break;case"groupId can not be null!":t({type:n.E.GROUP_NOT_EXIST,message:null==b?void 0:b.error_description,extraInfo:A});break;case"The input text is too long.":t({type:n.E.TRANSLATION_TEXT_TOO_LONG,message:null==b?void 0:b.error_description,extraInfo:A});break;case"The target language is not valid.":t({type:n.E.TRANSLATION_NOT_VALID,message:null==b?void 0:b.error_description,extraInfo:A});break;case"report failed, get message by id failed":t({type:n.E.MESSAGE_NOT_FOUND,message:null==b?void 0:b.error_description,extraInfo:A});break;case"ext is too big ":t({type:n.E.PRESENCE_PARAM_EXCEED,message:null==b?void 0:b.error_description,extraInfo:A});break;case"Request body not readable.Please check content type is correct!":t({type:n.E.REQUEST_PARAMETER_ERROR,message:null==b?void 0:b.error_description,extraInfo:A});break;default:t({type:n.E.WEBIM_CONNCTION_AJAX_ERROR,message:null==b?void 0:b.error_description,data:e.responseText,extraInfo:A}),r({type:n.E.WEBIM_CONNCTION_AJAX_ERROR,message:null==b?void 0:b.error_description,data:e.responseText,extraInfo:A})}}else if(401===C)40001===b.error_code?t({type:n.E.NO_PERMISSION,message:null==b?void 0:b.error_description,extraInfo:A}):(r({type:n.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:A}),t({type:n.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:A}));else if(403===C)4e4===b.error_code?t({type:n.E.SERVICE_NOT_ENABLED,message:null==b?void 0:b.error_description,extraInfo:A}):40003===b.error_code||40004===b.error_code?t({type:n.E.THREAD_ALREADY_EXIST,message:null==b?void 0:b.error_description,extraInfo:A}):(40005===b.error_code||40007===b.error_code)&&t({type:n.E.MAX_LIMIT,message:null==b?void 0:b.error_description,extraInfo:A}),"group member list is full!"===b.error_description?(null===(c=e.responseURL)||void 0===c?void 0:c.includes("chatgroups"))?t({type:n.E.GROUP_MEMBERS_FULL,data:e.response||e.responseText,message:b.error_description,extraInfo:A}):t({type:n.E.CHATROOM_MEMBERS_FULL,data:e.response||e.responseText,message:b.error_description,extraInfo:A}):(null===(u=b.error_description)||void 0===u?void 0:u.includes(b.error_description.includes("already in group")))?(null===(l=e.responseURL)||void 0===l?void 0:l.includes("chatgroups"))&&t({type:n.E.GROUP_ALREADY_JOINED,data:e.response||e.responseText,message:b.error_description,extraInfo:A}):(null===(p=b.error_description)||void 0===p?void 0:p.includes("are not members of this group"))?(null===(h=e.responseURL)||void 0===h?void 0:h.includes("chatgroups"))?t({type:n.E.GROUP_NOT_JOINED,data:e.response||e.responseText,message:b.error_description,extraInfo:A}):t({type:n.E.CHATROOM_NOT_JOINED,data:e.response||e.responseText,message:b.error_description,extraInfo:A}):(null===(d=b.error_description)||void 0===d?void 0:d.includes("service not open!"))||(null===(f=b.error_description)||void 0===f?void 0:f.includes("message report not open"))||(null===(m=b.error_description)||void 0===m?void 0:m.includes("messageroaming function not open"))?t({type:n.E.SERVICE_NOT_ENABLED,data:e.response||e.responseText,message:b.error_description,extraInfo:A}):(null===(y=b.error_description)||void 0===y?void 0:y.includes("members size is greater than max user size !"))?t({type:n.E.GROUP_MEMBERS_LIMIT,data:e.response||e.responseText,message:b.error_description,extraInfo:A}):(null===(g=b.error_description)||void 0===g?void 0:g.includes("can not operate this group, reason: group is disabled"))?t({type:n.E.GROUP_IS_DISABLED,data:e.response||e.responseText,message:b.error_description,extraInfo:A}):t({type:n.E.PERMISSION_DENIED,data:e.response||e.responseText,message:"permission denied",extraInfo:o(o({},A),{errDesc:"permission denied"})}),r({type:n.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:A});else if(404===C)40011===b.error_code?t({type:n.E.THREAD_NOT_EXIST,message:null==b?void 0:b.error_description,extraInfo:A}):40012===b.error_code&&t({type:n.E.NO_PERMISSION,message:null==b?void 0:b.error_description,extraInfo:A}),(null===(v=b.error_description)||void 0===v?void 0:v.includes("do not find this group"))||(null===(E=b.error_description)||void 0===E?void 0:E.includes("does not exist"))?(null===(_=e.responseURL)||void 0===_?void 0:_.includes("chatgroups"))?t({type:n.E.GROUP_NOT_EXIST,data:e.response||e.responseText,message:"The chat room dose not exist.",extraInfo:o(o({},A),{errDesc:"The chat room dose not exist."})}):t({type:n.E.CHATROOM_NOT_EXIST,data:e.response||e.responseText,message:"The chat room dose not exist.",extraInfo:o(o({},A),{errDesc:"The chat room dose not exist."})}):(null===(T=b.error_description)||void 0===T?void 0:T.includes("username"))&&(null===(O=b.error_description)||void 0===O?void 0:O.includes("doesn't exist!'"))||(null===(R=b.error_description)||void 0===R?void 0:R.includes("user not found"))?t({type:n.E.USER_NOT_FOUND,data:e.response||e.responseText,message:b.error_description,extraInfo:A}):t({type:n.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.response||e.responseText,message:e.responseText,extraInfo:A}),r({type:n.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.response||e.responseText,message:e.responseText,extraInfo:A});else if(429===C||503===C){if(null===(I=b.error_description)||void 0===I?void 0:I.includes("The request has reached the maximum limit"))return void t({type:n.E.MAX_LIMIT,message:e.responseText,extraInfo:A});t({type:n.E.SERVER_BUSY,data:e.response||e.responseText,message:"Server is busy.",extraInfo:o(o({},A),{errDesc:"Server is busy."})}),r({type:n.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:"Server is busy.",extraInfo:o(o({},A),{errDesc:"Server is busy."})})}else if(500===C){if((40006===b.error_code||40008===b.error_code||40010===b.error_code)&&t({type:n.E.SERVER_UNKNOWN_ERROR,message:null==b?void 0:b.error_description,extraInfo:A}),null===(S=b.error_description)||void 0===S?void 0:S.includes("translte failed!"))return void t({type:n.E.TRANSLATION_FAILED,message:e.responseText,extraInfo:A});t({type:n.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:"",extraInfo:A}),r({type:n.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:"",extraInfo:A})}else t({type:n.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:o(o({},A),{errDesc:"ajax error"})}),r({type:n.E.WEBIM_CONNCTION_AJAX_ERROR,data:e.responseText,message:e.responseText,extraInfo:o(o({},A),{errDesc:"ajax error"})})}(p,i,l,e)}0===p.readyState&&(l({type:n.E.WEBIM_CONNCTION_AJAX_ERROR,data:p.responseText,message:"Request not initialized"}),i({type:n.E.WEBIM_CONNCTION_AJAX_ERROR,data:p.responseText,message:"Request not initialized"}))},e.responseType&&p.responseType&&(p.responseType=e.responseType),e.mimeType&&p.overrideMimeType(e.mimeType);var h=e.type||"POST",d=e.data||null,f="";if("get"===h.toLowerCase()&&d){for(var m in d)d.hasOwnProperty(m)&&(f+=m+"="+d[m]+"&");f=f?f.slice(0,-1):f,e.url+=(e.url.indexOf("?")>0?"&":"?")+(f?f+"&":f)+"_v="+(new Date).getTime(),d=null,f=""}r=(new Date).getTime(),p.open(h,e.url);var y=e.headers||{};for(var g in y["Content-Type"]||(y["Content-Type"]="application/json"),y)y.hasOwnProperty(g)&&p.setRequestHeader(g,y[g]);p.send(d)})).then((function(r){return u.dataReport&&t&&t!==i.fI.SDK_INTERNAL&&u.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:s({isSuccess:1,requestUrl:e.url,requestName:t,requestMethod:e.type},_(r.extraInfo))}),t!==i.fI.SDK_INTERNAL&&delete r.extraInfo,"Object"===l(r)?s(s({},r),{type:n.E.REQUEST_SUCCESS}):{data:r,type:n.E.REQUEST_SUCCESS}})).catch((function(r){throw u.dataReport&&t&&t!==i.fI.SDK_INTERNAL&&u.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:s({isSuccess:0,requestUrl:e.url,requestName:t,requestMethod:e.type},_(r.extraInfo))}),t!==i.fI.SDK_INTERNAL&&delete r.extraInfo,r})):p.call(this,e)}function l(e){return Object.prototype.toString.call(e).slice(8,-1)}function p(e,t){var r=this;return new Promise((function(t,r){var n=e.success||c,o=e.error||c,i=e.type||"POST",a=e.data||null,s="",u=(new Date).getTime(),l=T.getEnvInfo();if("get"===i.toLowerCase()&&a){for(var p in a)a.hasOwnProperty(p)&&(s+=p+"="+a[p]+"&");s=s?s.slice(0,-1):s,e.url+=(e.url.indexOf("?")>0?"&":"?")+(s?s+"&":s)+"_v="+(new Date).getTime(),a=null,s=""}var h={url:e.url,data:e.data,method:i,headers:{},success:function(e){var i,a,s,c,l,p={elapse:(new Date).getTime()-u,httpCode:Number((null===(i=e.statusCode)||void 0===i?void 0:i.toString())||(null===(a=e.status)||void 0===a?void 0:a.toString())),errDesc:(null===(s=null==e?void 0:e.data)||void 0===s?void 0:s.error_description)||""};if("200"===(null===(c=e.statusCode)||void 0===c?void 0:c.toString())||"200"===(null===(l=e.status)||void 0===l?void 0:l.toString())){e.data.extraInfo=p;var h=e.data;n(h),t(h)}else e.extraInfo=p,o(h=e),r(h)},complete:function(){},fail:function(e){o(e),r(e)}};if("zfb"===l.platform||"dd"===l.platform?h.headers=e.headers:h.header=e.headers,"dd"===l.platform)return dd.httpRequest(h);l.global.request(h)})).then((function(o){return r.dataReport&&t&&t!==i.fI.SDK_INTERNAL&&r.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:s({isSuccess:1,requestUrl:e.url,requestName:t,requestMethod:e.type},_(o.extraInfo))}),t!==i.fI.SDK_INTERNAL&&delete o.extraInfo,"Object"===l(o)?s(s({},o),{type:n.E.REQUEST_SUCCESS}):{data:o,type:n.E.REQUEST_SUCCESS}})).catch((function(n){throw r.dataReport&&t&&t!==i.fI.SDK_INTERNAL&&r.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:s({isSuccess:0,requestUrl:e.url,requestName:t,requestMethod:e.type},_(n.extraInfo))}),t!==i.fI.SDK_INTERNAL&&delete n.extraInfo,n}))}var h,d,f,m=(h=function(e,t){var r=y();if(r.platform!==f.WEB){var n=r.global,o=function(r){r.isConnected?e():t()};n.offNetworkStatusChange&&n.offNetworkStatusChange(o),n.onNetworkStatusChange&&n.onNetworkStatusChange(o)}else"undefined"!=typeof addEventListener&&(window.addEventListener("online",e),window.addEventListener("offline",t))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!h)return d;d=h.apply(void 0,e),h=null});function y(){return"undefined"!=typeof swan&&g(swan)?{platform:f.BAIDU,global:swan}:"undefined"!=typeof tt&&g(tt)?{platform:f.TT,global:tt}:"undefined"!=typeof dd&&g(dd)?{platform:f.DD,global:dd}:"undefined"!=typeof my&&g(my)?{platform:f.ZFB,global:my}:"undefined"!=typeof wx&&g(wx)?{platform:f.WX,global:wx}:"undefined"!=typeof uni&&g(uni)?{platform:f.UNI,global:uni}:"undefined"!=typeof window&&window.WebSocket?{platform:f.WEB,global:window}:{platform:f.NODE,global:r.g||{}}}function g(e){for(var t=["canIUse","getSystemInfo"],r=0,n=t.length;r<n;r++)if(!e[t[r]])return!1;return!0}function v(e,t){var r,o,a=this,s=(new Date).getTime(),u=e.accessToken;if(u){var l=e.appKey,p=[],h="",d="";if(l&&(h=(p=l.split("#"))[0],d=p[1]),h||d){var f=e.apiUrl,m=e.uploadUrl||f+"/"+h+"/"+d+"/chatfiles";if((null===(o=null===(r=null==e?void 0:e.file)||void 0===r?void 0:r.data)||void 0===o?void 0:o.size)<=0)e.onFileUploadError&&e.onFileUploadError({type:n.E.WEBIM_UPLOADFILE_ERROR,message:"fileSize must be greater than 0"});else{var y=new XMLHttpRequest;y.upload&&y.upload.addEventListener("progress",e.onFileUploadProgress||c,!1),y.addEventListener("abort",e.onFileUploadCanceled||c,!1),y.addEventListener("error",(function(e){v({type:n.E.WEBIM_UPLOADFILE_ERROR,data:y})}),!1),y.addEventListener("load",(function(r){try{var o=JSON.parse(y.responseText);if(400===y.status)return v({type:n.E.WEBIM_UPLOADFILE_ERROR,data:o}),!1;try{!function(r){var n=(new Date).getTime()-s;a.dataReport&&t&&[i.fI.UPLOAD_MSG_ATTACH,i.fI.UPLOAD_CHATROOM_FILE,i.fI.UPLOAD_GROUP_FILE].includes(t)&&a.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:{isSuccess:(null==r?void 0:r.error)?0:1,requestMethod:"POST",requestName:t,requestElapse:n,requestUrl:m,code:y.status,codeDesc:(null==r?void 0:r.error_description)||""}}),e.onFileUploadComplete&&e.onFileUploadComplete(r)}(o)}catch(r){v({type:n.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,data:r})}}catch(r){v({type:n.E.WEBIM_UPLOADFILE_ERROR,data:y.responseText})}}),!1),y.open("POST",m),y.setRequestHeader("restrict-access","true"),y.setRequestHeader("Accept","*/*"),y.setRequestHeader("Authorization","Bearer "+u);var g=new FormData;g.append("file",e.file.data),y.send(g)}}else e.onFileUploadError&&e.onFileUploadError({type:n.E.WEBIM_UPLOADFILE_ERROR,message:"AppKey illegal"})}else e.onFileUploadError&&e.onFileUploadError({type:n.E.WEBIM_UPLOADFILE_NO_LOGIN,message:"AccessToken cannot be empty"});function v(r){var n=(new Date).getTime()-s;a.dataReport&&t&&[i.fI.UPLOAD_MSG_ATTACH,i.fI.UPLOAD_CHATROOM_FILE,i.fI.UPLOAD_GROUP_FILE].includes(t)&&a.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:{isSuccess:0,requestMethod:"POST",requestName:t,requestElapse:n,requestUrl:m,code:(null==y?void 0:y.status)||0,codeDesc:"upload file error"}}),e.onFileUploadError&&e.onFileUploadError(r)}}function E(e,t){e.onFileDownloadComplete=e.onFileDownloadComplete||c,e.onFileDownloadError=e.onFileDownloadError||c;var r=(new Date).getTime(),o=new XMLHttpRequest,a=this;o.addEventListener("load",(function(n){var s=(new Date).getTime()-r;a.dataReport&&t&&t===i.fI.DOWN_GROUP_FILE&&a.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:{isSuccess:200===o.status?1:0,requestMethod:"POST",requestName:t,requestElapse:s,requestUrl:null==e?void 0:e.url,code:o.status,codeDesc:200===o.status?"":"download file error"}}),e.onFileDownloadComplete&&e.onFileDownloadComplete(o.response)}),!1),o.addEventListener("error",(function(s){var c=(new Date).getTime()-r;a.dataReport&&t&&t===i.fI.DOWN_GROUP_FILE&&a.dataReport.geOperateFun({operationName:t})({isEndApi:!0,data:{isSuccess:0,requestMethod:"POST",requestName:t,requestElapse:c,requestUrl:null==e?void 0:e.url,code:(null==o?void 0:o.status)||0,codeDesc:"download file error"}}),e.onFileDownloadError&&e.onFileDownloadError({type:n.E.WEBIM_DOWNLOADFILE_ERROR,id:e.id,xhr:o})}),!1);var s=e.method||"GET",u=e.responseType||"blob",l=e.mimeType||"text/plain; charset=x-user-defined";o.open(s,e.url),"undefined"!=typeof Blob?o.responseType=u:o.overrideMimeType(l);var p={"X-Requested-With":"XMLHttpRequest",Accept:"application/octet-stream","share-secret":e.secret,Authorization:"Bearer "+this.context.accessToken},h=e.headers||{};for(var d in h)p[d]=h[d];for(var d in p)p[d]&&o.setRequestHeader(d,p[d]);o.send(null)}function _(e){void 0===e&&(e={});var t=e.elapse,r=void 0===t?0:t,n=e.httpCode,o=void 0===n?0:n,i=e.errDesc;return{requestElapse:r,code:o,codeDesc:void 0===i?"":i}}!function(e){e.WEB="web",e.WX="wx",e.ZFB="zfb",e.DD="dd",e.TT="tt",e.BAIDU="baidu",e.QUICK_APP="quick_app",e.UNI="uni",e.NODE="node"}(f||(f={}));var T={autoIncrement:0,ajaxUnconventionalErrorTimes:0,ajax:u,getUniqueId:function(){this.autoIncrement?this.autoIncrement++:this.autoIncrement=1;var e=new Date,t=new Date(2010,1,1);return(e.getTime()-t.getTime()+this.autoIncrement).toString()},getFileUrl:function(e){var t={url:"",filename:"",filetype:"",data:{}},r="string"==typeof e?document.getElementById(e):e;if(window.URL.createObjectURL){if(!r.files)throw Error("this is not HTMLInputElement");var n=r.files;if(n.length>0){var o=n.item(0);t.data=o,t.url=window.URL.createObjectURL(o),t.filename=(null==o?void 0:o.name)||""}}else{if("string"!=typeof e)throw Error("in IE fileInputId must be string");o=document.getElementById(e).value,t.url=o;var i=o.lastIndexOf("/"),a=o.lastIndexOf("\\"),s=Math.max(i,a);t.filename=s<0?o:o.substring(s+1)}var c=t.filename.lastIndexOf(".");return-1!==c&&(t.filetype=t.filename.substring(c+1).toLowerCase()),t},uploadFile:v,flow:function(e){for(var t=e.length,r=t;r--;)if("function"!=typeof e[r])throw new TypeError("Expected a function");return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];for(var o=0,i=t?e[o].apply(this,r):r[0];++o<t;)i=e[o].call(this,i);return i}},listenNetwork:m,getEnvInfo:y,wxRequest:p,parseDownloadResponse:function(e){if(!window||!window.URL)throw Error("parseDownloadResponse can be used in broswer only");return e&&e.type&&"application/json"===e.type||0>Object.prototype.toString.call(e).indexOf("Blob")?this.url+"?token=":window.URL.createObjectURL(e)},download:E,parseNotify:function(e){for(var t="",r=0;r<e.length;r++)t+="%"+e[r].toString(16);return JSON.parse(decodeURIComponent(t))},getExtraData:_}},9181:function(e,t,r){var n=r(1045),o=r(7632),i=TypeError;e.exports=function(e){if(n(e))return e;throw i(o(e)+" is not a function")}},7345:function(e,t,r){var n=r(8297),o=r(7632),i=TypeError;e.exports=function(e){if(n(e))return e;throw i(o(e)+" is not a constructor")}},2091:function(e,t,r){var n=r(1045),o=String,i=TypeError;e.exports=function(e){if("object"==typeof e||n(e))return e;throw i("Can't set "+o(e)+" as a prototype")}},4651:function(e,t,r){var n=r(9140),o=r(5565),i=r(4317).f,a=n("unscopables"),s=Array.prototype;null==s[a]&&i(s,a,{configurable:!0,value:o(null)}),e.exports=function(e){s[a][e]=!0}},3025:function(e,t,r){"use strict";var n=r(7957).charAt;e.exports=function(e,t,r){return t+(r?n(e,t).length:1)}},9112:function(e,t,r){var n=r(8931),o=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw o("Incorrect invocation")}},1571:function(e,t,r){var n=r(7809),o=String,i=TypeError;e.exports=function(e){if(n(e))return e;throw i(o(e)+" is not an object")}},6280:function(e){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},9042:function(e,t,r){var n=r(4141);e.exports=n((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},5861:function(e,t,r){"use strict";var n,o,i,a=r(6280),s=r(2931),c=r(2383),u=r(1045),l=r(7809),p=r(1163),h=r(6837),d=r(7632),f=r(6493),m=r(4405),y=r(4317).f,g=r(8931),v=r(2573),E=r(7046),_=r(9140),T=r(858),O=r(7417),R=O.enforce,I=O.get,S=c.Int8Array,b=S&&S.prototype,C=c.Uint8ClampedArray,A=C&&C.prototype,N=S&&v(S),w=b&&v(b),M=Object.prototype,k=c.TypeError,U=_("toStringTag"),x=T("TYPED_ARRAY_TAG"),P=a&&!!E&&"Opera"!==h(c.opera),L=!1,j={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},D={BigInt64Array:8,BigUint64Array:8},G=function(e){var t=v(e);if(l(t)){var r=I(t);return r&&p(r,"TypedArrayConstructor")?r.TypedArrayConstructor:G(t)}},B=function(e){if(!l(e))return!1;var t=h(e);return p(j,t)||p(D,t)};for(n in j)(i=(o=c[n])&&o.prototype)?R(i).TypedArrayConstructor=o:P=!1;for(n in D)(i=(o=c[n])&&o.prototype)&&(R(i).TypedArrayConstructor=o);if((!P||!u(N)||N===Function.prototype)&&(N=function(){throw k("Incorrect invocation")},P))for(n in j)c[n]&&E(c[n],N);if((!P||!w||w===M)&&(w=N.prototype,P))for(n in j)c[n]&&E(c[n].prototype,w);if(P&&v(A)!==w&&E(A,w),s&&!p(w,U))for(n in L=!0,y(w,U,{get:function(){return l(this)?this[x]:void 0}}),j)c[n]&&f(c[n],x,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:P,TYPED_ARRAY_TAG:L&&x,aTypedArray:function(e){if(B(e))return e;throw k("Target is not a typed array")},aTypedArrayConstructor:function(e){if(u(e)&&(!E||g(N,e)))return e;throw k(d(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(s){if(r)for(var o in j){var i=c[o];if(i&&p(i.prototype,e))try{delete i.prototype[e]}catch(r){try{i.prototype[e]=t}catch(e){}}}w[e]&&!r||m(w,e,r?t:P&&b[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,o;if(s){if(E){if(r)for(n in j)if((o=c[n])&&p(o,e))try{delete o[e]}catch(e){}if(N[e]&&!r)return;try{return m(N,e,r?t:P&&N[e]||t)}catch(e){}}for(n in j)!(o=c[n])||o[e]&&!r||m(o,e,t)}},getTypedArrayConstructor:G,isView:function(e){if(!l(e))return!1;var t=h(e);return"DataView"===t||p(j,t)||p(D,t)},isTypedArray:B,TypedArray:N,TypedArrayPrototype:w}},4061:function(e,t,r){"use strict";var n=r(2383),o=r(9720),i=r(2931),a=r(6280),s=r(9684),c=r(6493),u=r(4766),l=r(4141),p=r(9112),h=r(152),d=r(2844),f=r(3577),m=r(9074),y=r(2573),g=r(7046),v=r(1242).f,E=r(4317).f,_=r(9732),T=r(9730),O=r(5125),R=r(7417),I=s.PROPER,S=s.CONFIGURABLE,b=R.get,C=R.set,A="ArrayBuffer",N="Wrong index",w=n.ArrayBuffer,M=w,k=M&&M.prototype,U=n.DataView,x=U&&U.prototype,P=Object.prototype,L=n.Array,j=n.RangeError,D=o(_),G=o([].reverse),B=m.pack,H=m.unpack,F=function(e){return[255&e]},W=function(e){return[255&e,e>>8&255]},q=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Z=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},K=function(e){return B(e,23,4)},V=function(e){return B(e,52,8)},z=function(e,t){E(e.prototype,t,{get:function(){return b(this)[t]}})},J=function(e,t,r,n){var o=f(r),i=b(e);if(o+t>i.byteLength)throw j(N);var a=b(i.buffer).bytes,s=o+i.byteOffset,c=T(a,s,s+t);return n?c:G(c)},X=function(e,t,r,n,o,i){var a=f(r),s=b(e);if(a+t>s.byteLength)throw j(N);for(var c=b(s.buffer).bytes,u=a+s.byteOffset,l=n(+o),p=0;p<t;p++)c[u+p]=l[i?p:t-p-1]};if(a){var Y=I&&w.name!==A;if(l((function(){w(1)}))&&l((function(){new w(-1)}))&&!l((function(){return new w,new w(1.5),new w(NaN),1!=w.length||Y&&!S})))Y&&S&&c(w,"name",A);else{(M=function(e){return p(this,k),new w(f(e))}).prototype=k;for(var $,Q=v(w),ee=0;Q.length>ee;)($=Q[ee++])in M||c(M,$,w[$]);k.constructor=M}g&&y(x)!==P&&g(x,P);var te=new U(new M(2)),re=o(x.setInt8);te.setInt8(0,2147483648),te.setInt8(1,2147483649),!te.getInt8(0)&&te.getInt8(1)||u(x,{setInt8:function(e,t){re(this,e,t<<24>>24)},setUint8:function(e,t){re(this,e,t<<24>>24)}},{unsafe:!0})}else k=(M=function(e){p(this,k);var t=f(e);C(this,{bytes:D(L(t),0),byteLength:t}),i||(this.byteLength=t)}).prototype,x=(U=function(e,t,r){p(this,x),p(e,k);var n=b(e).byteLength,o=h(t);if(o<0||o>n)throw j("Wrong offset");if(o+(r=void 0===r?n-o:d(r))>n)throw j("Wrong length");C(this,{buffer:e,byteLength:r,byteOffset:o}),i||(this.buffer=e,this.byteLength=r,this.byteOffset=o)}).prototype,i&&(z(M,"byteLength"),z(U,"buffer"),z(U,"byteLength"),z(U,"byteOffset")),u(x,{getInt8:function(e){return J(this,1,e)[0]<<24>>24},getUint8:function(e){return J(this,1,e)[0]},getInt16:function(e){var t=J(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=J(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return Z(J(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return Z(J(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return H(J(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return H(J(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){X(this,1,e,F,t)},setUint8:function(e,t){X(this,1,e,F,t)},setInt16:function(e,t){X(this,2,e,W,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){X(this,2,e,W,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){X(this,4,e,q,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){X(this,4,e,q,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){X(this,4,e,K,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){X(this,8,e,V,t,arguments.length>2?arguments[2]:void 0)}});O(M,A),O(U,"DataView"),e.exports={ArrayBuffer:M,DataView:U}},5239:function(e,t,r){"use strict";var n=r(4569),o=r(3943),i=r(2398),a=r(6733),s=Math.min;e.exports=[].copyWithin||function(e,t){var r=n(this),c=i(r),u=o(e,c),l=o(t,c),p=arguments.length>2?arguments[2]:void 0,h=s((void 0===p?c:o(p,c))-l,c-u),d=1;for(l<u&&u<l+h&&(d=-1,l+=h-1,u+=h-1);h-- >0;)l in r?r[u]=r[l]:a(r,u),u+=d,l+=d;return r}},9732:function(e,t,r){"use strict";var n=r(4569),o=r(3943),i=r(2398);e.exports=function(e){for(var t=n(this),r=i(t),a=arguments.length,s=o(a>1?arguments[1]:void 0,r),c=a>2?arguments[2]:void 0,u=void 0===c?r:o(c,r);u>s;)t[s++]=e;return t}},4890:function(e,t,r){"use strict";var n=r(888).forEach,o=r(3070)("forEach");e.exports=o?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},9141:function(e,t,r){var n=r(2398);e.exports=function(e,t){for(var r=0,o=n(t),i=new e(o);o>r;)i[r]=t[r++];return i}},1601:function(e,t,r){"use strict";var n=r(3847),o=r(9107),i=r(4569),a=r(7214),s=r(706),c=r(8297),u=r(2398),l=r(567),p=r(6151),h=r(1328),d=Array;e.exports=function(e){var t=i(e),r=c(this),f=arguments.length,m=f>1?arguments[1]:void 0,y=void 0!==m;y&&(m=n(m,f>2?arguments[2]:void 0));var g,v,E,_,T,O,R=h(t),I=0;if(!R||this===d&&s(R))for(g=u(t),v=r?new this(g):d(g);g>I;I++)O=y?m(t[I],I):t[I],l(v,I,O);else for(T=(_=p(t,R)).next,v=r?new this:[];!(E=o(T,_)).done;I++)O=y?a(_,m,[E.value,I],!0):E.value,l(v,I,O);return v.length=I,v}},7351:function(e,t,r){var n=r(4221),o=r(3943),i=r(2398),a=function(e){return function(t,r,a){var s,c=n(t),u=i(c),l=o(a,u);if(e&&r!=r){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((e||l in c)&&c[l]===r)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},888:function(e,t,r){var n=r(3847),o=r(9720),i=r(3392),a=r(4569),s=r(2398),c=r(5508),u=o([].push),l=function(e){var t=1==e,r=2==e,o=3==e,l=4==e,p=6==e,h=7==e,d=5==e||p;return function(f,m,y,g){for(var v,E,_=a(f),T=i(_),O=n(m,y),R=s(T),I=0,S=g||c,b=t?S(f,R):r||h?S(f,0):void 0;R>I;I++)if((d||I in T)&&(E=O(v=T[I],I,_),e))if(t)b[I]=E;else if(E)switch(e){case 3:return!0;case 5:return v;case 6:return I;case 2:u(b,v)}else switch(e){case 4:return!1;case 7:u(b,v)}return p?-1:o||l?l:b}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},1959:function(e,t,r){"use strict";var n=r(7841),o=r(4221),i=r(152),a=r(2398),s=r(3070),c=Math.min,u=[].lastIndexOf,l=!!u&&1/[1].lastIndexOf(1,-0)<0,p=s("lastIndexOf"),h=l||!p;e.exports=h?function(e){if(l)return n(u,this,arguments)||0;var t=o(this),r=a(t),s=r-1;for(arguments.length>1&&(s=c(s,i(arguments[1]))),s<0&&(s=r+s);s>=0;s--)if(s in t&&t[s]===e)return s||0;return-1}:u},3933:function(e,t,r){var n=r(4141),o=r(9140),i=r(583),a=o("species");e.exports=function(e){return i>=51||!n((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},3070:function(e,t,r){"use strict";var n=r(4141);e.exports=function(e,t){var r=[][e];return!!r&&n((function(){r.call(null,t||function(){return 1},1)}))}},6653:function(e,t,r){var n=r(9181),o=r(4569),i=r(3392),a=r(2398),s=TypeError,c=function(e){return function(t,r,c,u){n(r);var l=o(t),p=i(l),h=a(l),d=e?h-1:0,f=e?-1:1;if(c<2)for(;;){if(d in p){u=p[d],d+=f;break}if(d+=f,e?d<0:h<=d)throw s("Reduce of empty array with no initial value")}for(;e?d>=0:h>d;d+=f)d in p&&(u=r(u,p[d],d,l));return u}};e.exports={left:c(!1),right:c(!0)}},1208:function(e,t,r){"use strict";var n=r(2931),o=r(6833),i=TypeError,a=Object.getOwnPropertyDescriptor,s=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=s?function(e,t){if(o(e)&&!a(e,"length").writable)throw i("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},9730:function(e,t,r){var n=r(3943),o=r(2398),i=r(567),a=Array,s=Math.max;e.exports=function(e,t,r){for(var c=o(e),u=n(t,c),l=n(void 0===r?c:r,c),p=a(s(l-u,0)),h=0;u<l;u++,h++)i(p,h,e[u]);return p.length=h,p}},942:function(e,t,r){var n=r(9720);e.exports=n([].slice)},5416:function(e,t,r){var n=r(9730),o=Math.floor,i=function(e,t){var r=e.length,c=o(r/2);return r<8?a(e,t):s(e,i(n(e,0,c),t),i(n(e,c),t),t)},a=function(e,t){for(var r,n,o=e.length,i=1;i<o;){for(n=i,r=e[i];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==i++&&(e[n]=r)}return e},s=function(e,t,r,n){for(var o=t.length,i=r.length,a=0,s=0;a<o||s<i;)e[a+s]=a<o&&s<i?n(t[a],r[s])<=0?t[a++]:r[s++]:a<o?t[a++]:r[s++];return e};e.exports=i},4908:function(e,t,r){var n=r(6833),o=r(8297),i=r(7809),a=r(9140)("species"),s=Array;e.exports=function(e){var t;return n(e)&&(t=e.constructor,(o(t)&&(t===s||n(t.prototype))||i(t)&&null===(t=t[a]))&&(t=void 0)),void 0===t?s:t}},5508:function(e,t,r){var n=r(4908);e.exports=function(e,t){return new(n(e))(0===t?0:t)}},7214:function(e,t,r){var n=r(1571),o=r(6186);e.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(t){o(e,"throw",t)}}},3802:function(e,t,r){var n=r(9140)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},e(i)}catch(e){}return r}},6027:function(e,t,r){var n=r(9720),o=n({}.toString),i=n("".slice);e.exports=function(e){return i(o(e),8,-1)}},6837:function(e,t,r){var n=r(1247),o=r(1045),i=r(6027),a=r(9140)("toStringTag"),s=Object,c="Arguments"==i(function(){return arguments}());e.exports=n?i:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=s(e),a))?r:c?i(t):"Object"==(n=i(t))&&o(t.callee)?"Arguments":n}},6675:function(e,t,r){"use strict";var n=r(4317).f,o=r(5565),i=r(4766),a=r(3847),s=r(9112),c=r(7323),u=r(5991),l=r(9719),p=r(8174),h=r(4467),d=r(2931),f=r(6811).fastKey,m=r(7417),y=m.set,g=m.getterFor;e.exports={getConstructor:function(e,t,r,l){var p=e((function(e,n){s(e,h),y(e,{type:t,index:o(null),first:void 0,last:void 0,size:0}),d||(e.size=0),c(n)||u(n,e[l],{that:e,AS_ENTRIES:r})})),h=p.prototype,m=g(t),v=function(e,t,r){var n,o,i=m(e),a=E(e,t);return a?a.value=r:(i.last=a={index:o=f(t,!0),key:t,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=a),n&&(n.next=a),d?i.size++:e.size++,"F"!==o&&(i.index[o]=a)),e},E=function(e,t){var r,n=m(e),o=f(t);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==t)return r};return i(h,{clear:function(){for(var e=m(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,d?e.size=0:this.size=0},delete:function(e){var t=this,r=m(t),n=E(t,e);if(n){var o=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=o),o&&(o.previous=i),r.first==n&&(r.first=o),r.last==n&&(r.last=i),d?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=m(this),n=a(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!E(this,e)}}),i(h,r?{get:function(e){var t=E(this,e);return t&&t.value},set:function(e,t){return v(this,0===e?0:e,t)}}:{add:function(e){return v(this,e=0===e?0:e,e)}}),d&&n(h,"size",{get:function(){return m(this).size}}),p},setStrong:function(e,t,r){var n=t+" Iterator",o=g(t),i=g(n);l(e,t,(function(e,t){y(this,{type:n,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?p("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,p(void 0,!0))}),r?"entries":"values",!r,!0),h(t)}}},6202:function(e,t,r){"use strict";var n=r(4866),o=r(2383),i=r(9720),a=r(1122),s=r(4405),c=r(6811),u=r(5991),l=r(9112),p=r(1045),h=r(7323),d=r(7809),f=r(4141),m=r(3802),y=r(5125),g=r(8851);e.exports=function(e,t,r){var v=-1!==e.indexOf("Map"),E=-1!==e.indexOf("Weak"),_=v?"set":"add",T=o[e],O=T&&T.prototype,R=T,I={},S=function(e){var t=i(O[e]);s(O,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(E&&!d(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return E&&!d(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(E&&!d(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})};if(a(e,!p(T)||!(E||O.forEach&&!f((function(){(new T).entries().next()})))))R=r.getConstructor(t,e,v,_),c.enable();else if(a(e,!0)){var b=new R,C=b[_](E?{}:-0,1)!=b,A=f((function(){b.has(1)})),N=m((function(e){new T(e)})),w=!E&&f((function(){for(var e=new T,t=5;t--;)e[_](t,t);return!e.has(-0)}));N||((R=t((function(e,t){l(e,O);var r=g(new T,e,R);return h(t)||u(t,r[_],{that:r,AS_ENTRIES:v}),r}))).prototype=O,O.constructor=R),(A||w)&&(S("delete"),S("has"),v&&S("get")),(w||C)&&S(_),E&&O.clear&&delete O.clear}return I[e]=R,n({global:!0,constructor:!0,forced:R!=T},I),y(R,e),E||r.setStrong(R,e,v),R}},5751:function(e,t,r){var n=r(1163),o=r(5260),i=r(9097),a=r(4317);e.exports=function(e,t,r){for(var s=o(t),c=a.f,u=i.f,l=0;l<s.length;l++){var p=s[l];n(e,p)||r&&n(r,p)||c(e,p,u(t,p))}}},7849:function(e,t,r){var n=r(9140)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[n]=!1,"/./"[e](t)}catch(e){}}return!1}},4667:function(e,t,r){var n=r(4141);e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},8174:function(e){e.exports=function(e,t){return{value:e,done:t}}},6493:function(e,t,r){var n=r(2931),o=r(4317),i=r(2499);e.exports=n?function(e,t,r){return o.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},2499:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},567:function(e,t,r){"use strict";var n=r(7277),o=r(4317),i=r(2499);e.exports=function(e,t,r){var a=n(t);a in e?o.f(e,a,i(0,r)):e[a]=r}},2886:function(e,t,r){var n=r(2511),o=r(4317);e.exports=function(e,t,r){return r.get&&n(r.get,t,{getter:!0}),r.set&&n(r.set,t,{setter:!0}),o.f(e,t,r)}},4405:function(e,t,r){var n=r(1045),o=r(4317),i=r(2511),a=r(5784);e.exports=function(e,t,r,s){s||(s={});var c=s.enumerable,u=void 0!==s.name?s.name:t;if(n(r)&&i(r,u,s),s.global)c?e[t]=r:a(t,r);else{try{s.unsafe?e[t]&&(c=!0):delete e[t]}catch(e){}c?e[t]=r:o.f(e,t,{value:r,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},4766:function(e,t,r){var n=r(4405);e.exports=function(e,t,r){for(var o in t)n(e,o,t[o],r);return e}},5784:function(e,t,r){var n=r(2383),o=Object.defineProperty;e.exports=function(e,t){try{o(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},6733:function(e,t,r){"use strict";var n=r(7632),o=TypeError;e.exports=function(e,t){if(!delete e[t])throw o("Cannot delete property "+n(t)+" of "+n(e))}},2931:function(e,t,r){var n=r(4141);e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},6459:function(e,t,r){var n=r(2383),o=r(7809),i=n.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},7540:function(e){var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},9286:function(e){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},5977:function(e,t,r){var n=r(6459)("span").classList,o=n&&n.constructor&&n.constructor.prototype;e.exports=o===Object.prototype?void 0:o},3975:function(e,t,r){var n=r(9376).match(/firefox\/(\d+)/i);e.exports=!!n&&+n[1]},5830:function(e,t,r){var n=r(3954),o=r(4368);e.exports=!n&&!o&&"object"==typeof window&&"object"==typeof document},3954:function(e){e.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},8482:function(e,t,r){var n=r(9376);e.exports=/MSIE|Trident/.test(n)},3035:function(e,t,r){var n=r(9376),o=r(2383);e.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==o.Pebble},7337:function(e,t,r){var n=r(9376);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},4368:function(e,t,r){var n=r(6027),o=r(2383);e.exports="process"==n(o.process)},678:function(e,t,r){var n=r(9376);e.exports=/web0s(?!.*chrome)/i.test(n)},9376:function(e,t,r){var n=r(7300);e.exports=n("navigator","userAgent")||""},583:function(e,t,r){var n,o,i=r(2383),a=r(9376),s=i.process,c=i.Deno,u=s&&s.versions||c&&c.version,l=u&&u.v8;l&&(o=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=+n[1]),e.exports=o},3701:function(e,t,r){var n=r(9376).match(/AppleWebKit\/(\d+)\./);e.exports=!!n&&+n[1]},7414:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},4866:function(e,t,r){var n=r(2383),o=r(9097).f,i=r(6493),a=r(4405),s=r(5784),c=r(5751),u=r(1122);e.exports=function(e,t){var r,l,p,h,d,f=e.target,m=e.global,y=e.stat;if(r=m?n:y?n[f]||s(f,{}):(n[f]||{}).prototype)for(l in t){if(h=t[l],p=e.dontCallGetSet?(d=o(r,l))&&d.value:r[l],!u(m?l:f+(y?".":"#")+l,e.forced)&&void 0!==p){if(typeof h==typeof p)continue;c(h,p)}(e.sham||p&&p.sham)&&i(h,"sham",!0),a(r,l,h,e)}}},4141:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},2267:function(e,t,r){"use strict";r(1008);var n=r(9720),o=r(4405),i=r(1660),a=r(4141),s=r(9140),c=r(6493),u=s("species"),l=RegExp.prototype;e.exports=function(e,t,r,p){var h=s(e),d=!a((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),f=d&&!a((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[u]=function(){return r},r.flags="",r[h]=/./[h]),r.exec=function(){return t=!0,null},r[h](""),!t}));if(!d||!f||r){var m=n(/./[h]),y=t(h,""[e],(function(e,t,r,o,a){var s=n(e),c=t.exec;return c===i||c===l.exec?d&&!a?{done:!0,value:m(t,r,o)}:{done:!0,value:s(r,t,o)}:{done:!1}}));o(String.prototype,e,y[0]),o(l,h,y[1])}p&&c(l[h],"sham",!0)}},2693:function(e,t,r){var n=r(4141);e.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},7841:function(e,t,r){var n=r(1153),o=Function.prototype,i=o.apply,a=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(i):function(){return a.apply(i,arguments)})},3847:function(e,t,r){var n=r(9720),o=r(9181),i=r(1153),a=n(n.bind);e.exports=function(e,t){return o(e),void 0===t?e:i?a(e,t):function(){return e.apply(t,arguments)}}},1153:function(e,t,r){var n=r(4141);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},8829:function(e,t,r){"use strict";var n=r(9720),o=r(9181),i=r(7809),a=r(1163),s=r(942),c=r(1153),u=Function,l=n([].concat),p=n([].join),h={},d=function(e,t,r){if(!a(h,t)){for(var n=[],o=0;o<t;o++)n[o]="a["+o+"]";h[t]=u("C,a","return new C("+p(n,",")+")")}return h[t](e,r)};e.exports=c?u.bind:function(e){var t=o(this),r=t.prototype,n=s(arguments,1),a=function(){var r=l(n,s(arguments));return this instanceof a?d(t,r.length,r):t.apply(e,r)};return i(r)&&(a.prototype=r),a}},9107:function(e,t,r){var n=r(1153),o=Function.prototype.call;e.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},9684:function(e,t,r){var n=r(2931),o=r(1163),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,s=o(i,"name"),c=s&&"something"===function(){}.name,u=s&&(!n||n&&a(i,"name").configurable);e.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},9720:function(e,t,r){var n=r(1153),o=Function.prototype,i=o.bind,a=o.call,s=n&&i.bind(a,a);e.exports=n?function(e){return e&&s(e)}:function(e){return e&&function(){return a.apply(e,arguments)}}},7300:function(e,t,r){var n=r(2383),o=r(1045),i=function(e){return o(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?i(n[e]):n[e]&&n[e][t]}},1328:function(e,t,r){var n=r(6837),o=r(466),i=r(7323),a=r(9171),s=r(9140)("iterator");e.exports=function(e){if(!i(e))return o(e,s)||o(e,"@@iterator")||a[n(e)]}},6151:function(e,t,r){var n=r(9107),o=r(9181),i=r(1571),a=r(7632),s=r(1328),c=TypeError;e.exports=function(e,t){var r=arguments.length<2?s(e):t;if(o(r))return i(n(r,e));throw c(a(e)+" is not iterable")}},466:function(e,t,r){var n=r(9181),o=r(7323);e.exports=function(e,t){var r=e[t];return o(r)?void 0:n(r)}},2383:function(e,t,r){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},1163:function(e,t,r){var n=r(9720),o=r(4569),i=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},8164:function(e){e.exports={}},1879:function(e,t,r){var n=r(2383);e.exports=function(e,t){var r=n.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}},4530:function(e,t,r){var n=r(7300);e.exports=n("document","documentElement")},688:function(e,t,r){var n=r(2931),o=r(4141),i=r(6459);e.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},9074:function(e){var t=Array,r=Math.abs,n=Math.pow,o=Math.floor,i=Math.log,a=Math.LN2;e.exports={pack:function(e,s,c){var u,l,p,h=t(c),d=8*c-s-1,f=(1<<d)-1,m=f>>1,y=23===s?n(2,-24)-n(2,-77):0,g=e<0||0===e&&1/e<0?1:0,v=0;for((e=r(e))!=e||e===1/0?(l=e!=e?1:0,u=f):(u=o(i(e)/a),e*(p=n(2,-u))<1&&(u--,p*=2),(e+=u+m>=1?y/p:y*n(2,1-m))*p>=2&&(u++,p/=2),u+m>=f?(l=0,u=f):u+m>=1?(l=(e*p-1)*n(2,s),u+=m):(l=e*n(2,m-1)*n(2,s),u=0));s>=8;)h[v++]=255&l,l/=256,s-=8;for(u=u<<s|l,d+=s;d>0;)h[v++]=255&u,u/=256,d-=8;return h[--v]|=128*g,h},unpack:function(e,t){var r,o=e.length,i=8*o-t-1,a=(1<<i)-1,s=a>>1,c=i-7,u=o-1,l=e[u--],p=127&l;for(l>>=7;c>0;)p=256*p+e[u--],c-=8;for(r=p&(1<<-c)-1,p>>=-c,c+=t;c>0;)r=256*r+e[u--],c-=8;if(0===p)p=1-s;else{if(p===a)return r?NaN:l?-1/0:1/0;r+=n(2,t),p-=s}return(l?-1:1)*r*n(2,p-t)}}},3392:function(e,t,r){var n=r(9720),o=r(4141),i=r(6027),a=Object,s=n("".split);e.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?s(e,""):a(e)}:a},8851:function(e,t,r){var n=r(1045),o=r(7809),i=r(7046);e.exports=function(e,t,r){var a,s;return i&&n(a=t.constructor)&&a!==r&&o(s=a.prototype)&&s!==r.prototype&&i(e,s),e}},4554:function(e,t,r){var n=r(9720),o=r(1045),i=r(4480),a=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},6811:function(e,t,r){var n=r(4866),o=r(9720),i=r(8164),a=r(7809),s=r(1163),c=r(4317).f,u=r(1242),l=r(6584),p=r(1773),h=r(858),d=r(2693),f=!1,m=h("meta"),y=0,g=function(e){c(e,m,{value:{objectID:"O"+y++,weakData:{}}})},v=e.exports={enable:function(){v.enable=function(){},f=!0;var e=u.f,t=o([].splice),r={};r[m]=1,e(r).length&&(u.f=function(r){for(var n=e(r),o=0,i=n.length;o<i;o++)if(n[o]===m){t(n,o,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,m)){if(!p(e))return"F";if(!t)return"E";g(e)}return e[m].objectID},getWeakData:function(e,t){if(!s(e,m)){if(!p(e))return!0;if(!t)return!1;g(e)}return e[m].weakData},onFreeze:function(e){return d&&f&&p(e)&&!s(e,m)&&g(e),e}};i[m]=!0},7417:function(e,t,r){var n,o,i,a=r(1849),s=r(2383),c=r(9720),u=r(7809),l=r(6493),p=r(1163),h=r(4480),d=r(6033),f=r(8164),m="Object already initialized",y=s.TypeError,g=s.WeakMap;if(a||h.state){var v=h.state||(h.state=new g),E=c(v.get),_=c(v.has),T=c(v.set);n=function(e,t){if(_(v,e))throw y(m);return t.facade=e,T(v,e,t),t},o=function(e){return E(v,e)||{}},i=function(e){return _(v,e)}}else{var O=d("state");f[O]=!0,n=function(e,t){if(p(e,O))throw y(m);return t.facade=e,l(e,O,t),t},o=function(e){return p(e,O)?e[O]:{}},i=function(e){return p(e,O)}}e.exports={set:n,get:o,has:i,enforce:function(e){return i(e)?o(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!u(t)||(r=o(t)).type!==e)throw y("Incompatible receiver, "+e+" required");return r}}}},706:function(e,t,r){var n=r(9140),o=r(9171),i=n("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[i]===e)}},6833:function(e,t,r){var n=r(6027);e.exports=Array.isArray||function(e){return"Array"==n(e)}},2318:function(e,t,r){var n=r(6837),o=r(9720)("".slice);e.exports=function(e){return"Big"===o(n(e),0,3)}},1045:function(e){e.exports=function(e){return"function"==typeof e}},8297:function(e,t,r){var n=r(9720),o=r(4141),i=r(1045),a=r(6837),s=r(7300),c=r(4554),u=function(){},l=[],p=s("Reflect","construct"),h=/^\s*(?:class|function)\b/,d=n(h.exec),f=!h.exec(u),m=function(e){if(!i(e))return!1;try{return p(u,l,e),!0}catch(e){return!1}},y=function(e){if(!i(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!d(h,c(e))}catch(e){return!0}};y.sham=!0,e.exports=!p||o((function(){var e;return m(m.call)||!m(Object)||!m((function(){e=!0}))||e}))?y:m},1122:function(e,t,r){var n=r(4141),o=r(1045),i=/#|\.prototype\./,a=function(e,t){var r=c[s(e)];return r==l||r!=u&&(o(t)?n(t):!!t)},s=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},c=a.data={},u=a.NATIVE="N",l=a.POLYFILL="P";e.exports=a},6121:function(e,t,r){var n=r(7809),o=Math.floor;e.exports=Number.isInteger||function(e){return!n(e)&&isFinite(e)&&o(e)===e}},7323:function(e){e.exports=function(e){return null==e}},7809:function(e,t,r){var n=r(1045),o="object"==typeof document&&document.all,i=void 0===o&&void 0!==o;e.exports=i?function(e){return"object"==typeof e?null!==e:n(e)||e===o}:function(e){return"object"==typeof e?null!==e:n(e)}},4726:function(e){e.exports=!1},3265:function(e,t,r){var n=r(7809),o=r(6027),i=r(9140)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},6894:function(e,t,r){var n=r(7300),o=r(1045),i=r(8931),a=r(2048),s=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return o(t)&&i(t.prototype,s(e))}},5991:function(e,t,r){var n=r(3847),o=r(9107),i=r(1571),a=r(7632),s=r(706),c=r(2398),u=r(8931),l=r(6151),p=r(1328),h=r(6186),d=TypeError,f=function(e,t){this.stopped=e,this.result=t},m=f.prototype;e.exports=function(e,t,r){var y,g,v,E,_,T,O,R=r&&r.that,I=!(!r||!r.AS_ENTRIES),S=!(!r||!r.IS_RECORD),b=!(!r||!r.IS_ITERATOR),C=!(!r||!r.INTERRUPTED),A=n(t,R),N=function(e){return y&&h(y,"normal",e),new f(!0,e)},w=function(e){return I?(i(e),C?A(e[0],e[1],N):A(e[0],e[1])):C?A(e,N):A(e)};if(S)y=e.iterator;else if(b)y=e;else{if(!(g=p(e)))throw d(a(e)+" is not iterable");if(s(g)){for(v=0,E=c(e);E>v;v++)if((_=w(e[v]))&&u(m,_))return _;return new f(!1)}y=l(e,g)}for(T=S?e.next:y.next;!(O=o(T,y)).done;){try{_=w(O.value)}catch(e){h(y,"throw",e)}if("object"==typeof _&&_&&u(m,_))return _}return new f(!1)}},6186:function(e,t,r){var n=r(9107),o=r(1571),i=r(466);e.exports=function(e,t,r){var a,s;o(e);try{if(!(a=i(e,"return"))){if("throw"===t)throw r;return r}a=n(a,e)}catch(e){s=!0,a=e}if("throw"===t)throw r;if(s)throw a;return o(a),r}},9437:function(e,t,r){"use strict";var n=r(9549).IteratorPrototype,o=r(5565),i=r(2499),a=r(5125),s=r(9171),c=function(){return this};e.exports=function(e,t,r,u){var l=t+" Iterator";return e.prototype=o(n,{next:i(+!u,r)}),a(e,l,!1,!0),s[l]=c,e}},9719:function(e,t,r){"use strict";var n=r(4866),o=r(9107),i=r(4726),a=r(9684),s=r(1045),c=r(9437),u=r(2573),l=r(7046),p=r(5125),h=r(6493),d=r(4405),f=r(9140),m=r(9171),y=r(9549),g=a.PROPER,v=a.CONFIGURABLE,E=y.IteratorPrototype,_=y.BUGGY_SAFARI_ITERATORS,T=f("iterator"),O="keys",R="values",I="entries",S=function(){return this};e.exports=function(e,t,r,a,f,y,b){c(r,t,a);var C,A,N,w=function(e){if(e===f&&P)return P;if(!_&&e in U)return U[e];switch(e){case O:case R:case I:return function(){return new r(this,e)}}return function(){return new r(this)}},M=t+" Iterator",k=!1,U=e.prototype,x=U[T]||U["@@iterator"]||f&&U[f],P=!_&&x||w(f),L="Array"==t&&U.entries||x;if(L&&(C=u(L.call(new e)))!==Object.prototype&&C.next&&(i||u(C)===E||(l?l(C,E):s(C[T])||d(C,T,S)),p(C,M,!0,!0),i&&(m[M]=S)),g&&f==R&&x&&x.name!==R&&(!i&&v?h(U,"name",R):(k=!0,P=function(){return o(x,this)})),f)if(A={values:w(R),keys:y?P:w(O),entries:w(I)},b)for(N in A)(_||k||!(N in U))&&d(U,N,A[N]);else n({target:t,proto:!0,forced:_||k},A);return i&&!b||U[T]===P||d(U,T,P,{name:f}),m[t]=P,A}},9549:function(e,t,r){"use strict";var n,o,i,a=r(4141),s=r(1045),c=r(7809),u=r(5565),l=r(2573),p=r(4405),h=r(9140),d=r(4726),f=h("iterator"),m=!1;[].keys&&("next"in(i=[].keys())?(o=l(l(i)))!==Object.prototype&&(n=o):m=!0),!c(n)||a((function(){var e={};return n[f].call(e)!==e}))?n={}:d&&(n=u(n)),s(n[f])||p(n,f,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:m}},9171:function(e){e.exports={}},2398:function(e,t,r){var n=r(2844);e.exports=function(e){return n(e.length)}},2511:function(e,t,r){var n=r(4141),o=r(1045),i=r(1163),a=r(2931),s=r(9684).CONFIGURABLE,c=r(4554),u=r(7417),l=u.enforce,p=u.get,h=Object.defineProperty,d=a&&!n((function(){return 8!==h((function(){}),"length",{value:8}).length})),f=String(String).split("String"),m=e.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!i(e,"name")||s&&e.name!==t)&&(a?h(e,"name",{value:t,configurable:!0}):e.name=t),d&&r&&i(r,"arity")&&e.length!==r.arity&&h(e,"length",{value:r.arity});try{r&&i(r,"constructor")&&r.constructor?a&&h(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=l(e);return i(n,"source")||(n.source=f.join("string"==typeof t?t:"")),e};Function.prototype.toString=m((function(){return o(this)&&p(this).source||c(this)}),"toString")},3709:function(e){var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){var n=+e;return(n>0?r:t)(n)}},5418:function(e,t,r){var n,o,i,a,s,c,u,l,p=r(2383),h=r(3847),d=r(9097).f,f=r(5515).set,m=r(7337),y=r(3035),g=r(678),v=r(4368),E=p.MutationObserver||p.WebKitMutationObserver,_=p.document,T=p.process,O=p.Promise,R=d(p,"queueMicrotask"),I=R&&R.value;I||(n=function(){var e,t;for(v&&(e=T.domain)&&e.exit();o;){t=o.fn,o=o.next;try{t()}catch(e){throw o?a():i=void 0,e}}i=void 0,e&&e.enter()},m||v||g||!E||!_?!y&&O&&O.resolve?((u=O.resolve(void 0)).constructor=O,l=h(u.then,u),a=function(){l(n)}):v?a=function(){T.nextTick(n)}:(f=h(f,p),a=function(){f(n)}):(s=!0,c=_.createTextNode(""),new E(n).observe(c,{characterData:!0}),a=function(){c.data=s=!s})),e.exports=I||function(e){var t={fn:e,next:void 0};i&&(i.next=t),o||(o=t,a()),i=t}},9636:function(e,t,r){"use strict";var n=r(9181),o=TypeError,i=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw o("Bad Promise constructor");t=e,r=n})),this.resolve=n(t),this.reject=n(r)};e.exports.f=function(e){return new i(e)}},1271:function(e,t,r){var n=r(3265),o=TypeError;e.exports=function(e){if(n(e))throw o("The method doesn't accept regular expressions");return e}},7411:function(e,t,r){"use strict";var n=r(2931),o=r(9720),i=r(9107),a=r(4141),s=r(3555),c=r(6920),u=r(7225),l=r(4569),p=r(3392),h=Object.assign,d=Object.defineProperty,f=o([].concat);e.exports=!h||a((function(){if(n&&1!==h({b:1},h(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),o="abcdefghijklmnopqrst";return e[r]=7,o.split("").forEach((function(e){t[e]=e})),7!=h({},e)[r]||s(h({},t)).join("")!=o}))?function(e,t){for(var r=l(e),o=arguments.length,a=1,h=c.f,d=u.f;o>a;)for(var m,y=p(arguments[a++]),g=h?f(s(y),h(y)):s(y),v=g.length,E=0;v>E;)m=g[E++],n&&!i(d,y,m)||(r[m]=y[m]);return r}:h},5565:function(e,t,r){var n,o=r(1571),i=r(3633),a=r(7414),s=r(8164),c=r(4530),u=r(6459),l=r(6033)("IE_PROTO"),p=function(){},h=function(e){return"<script>"+e+"<\/script>"},d=function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t},f=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t;f="undefined"!=typeof document?document.domain&&n?d(n):((t=u("iframe")).style.display="none",c.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F):d(n);for(var r=a.length;r--;)delete f.prototype[a[r]];return f()};s[l]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(p.prototype=o(e),r=new p,p.prototype=null,r[l]=e):r=f(),void 0===t?r:i.f(r,t)}},3633:function(e,t,r){var n=r(2931),o=r(5957),i=r(4317),a=r(1571),s=r(4221),c=r(3555);t.f=n&&!o?Object.defineProperties:function(e,t){a(e);for(var r,n=s(t),o=c(t),u=o.length,l=0;u>l;)i.f(e,r=o[l++],n[r]);return e}},4317:function(e,t,r){var n=r(2931),o=r(688),i=r(5957),a=r(1571),s=r(7277),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor;t.f=n?i?function(e,t,r){if(a(e),t=s(t),a(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=l(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return u(e,t,r)}:u:function(e,t,r){if(a(e),t=s(t),a(r),o)try{return u(e,t,r)}catch(e){}if("get"in r||"set"in r)throw c("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},9097:function(e,t,r){var n=r(2931),o=r(9107),i=r(7225),a=r(2499),s=r(4221),c=r(7277),u=r(1163),l=r(688),p=Object.getOwnPropertyDescriptor;t.f=n?p:function(e,t){if(e=s(e),t=c(t),l)try{return p(e,t)}catch(e){}if(u(e,t))return a(!o(i.f,e,t),e[t])}},6584:function(e,t,r){var n=r(6027),o=r(4221),i=r(1242).f,a=r(9730),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"Window"==n(e)?function(e){try{return i(e)}catch(e){return a(s)}}(e):i(o(e))}},1242:function(e,t,r){var n=r(6984),o=r(7414).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,o)}},6920:function(e,t){t.f=Object.getOwnPropertySymbols},2573:function(e,t,r){var n=r(1163),o=r(1045),i=r(4569),a=r(6033),s=r(4667),c=a("IE_PROTO"),u=Object,l=u.prototype;e.exports=s?u.getPrototypeOf:function(e){var t=i(e);if(n(t,c))return t[c];var r=t.constructor;return o(r)&&t instanceof r?r.prototype:t instanceof u?l:null}},1773:function(e,t,r){var n=r(4141),o=r(7809),i=r(6027),a=r(9042),s=Object.isExtensible,c=n((function(){s(1)}));e.exports=c||a?function(e){return!!o(e)&&(!a||"ArrayBuffer"!=i(e))&&(!s||s(e))}:s},8931:function(e,t,r){var n=r(9720);e.exports=n({}.isPrototypeOf)},6984:function(e,t,r){var n=r(9720),o=r(1163),i=r(4221),a=r(7351).indexOf,s=r(8164),c=n([].push);e.exports=function(e,t){var r,n=i(e),u=0,l=[];for(r in n)!o(s,r)&&o(n,r)&&c(l,r);for(;t.length>u;)o(n,r=t[u++])&&(~a(l,r)||c(l,r));return l}},3555:function(e,t,r){var n=r(6984),o=r(7414);e.exports=Object.keys||function(e){return n(e,o)}},7225:function(e,t){"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!r.call({1:2},1);t.f=o?function(e){var t=n(this,e);return!!t&&t.enumerable}:r},7046:function(e,t,r){var n=r(9720),o=r(1571),i=r(2091);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return o(r),i(n),t?e(r,n):r.__proto__=n,r}}():void 0)},8389:function(e,t,r){var n=r(2931),o=r(9720),i=r(3555),a=r(4221),s=o(r(7225).f),c=o([].push),u=function(e){return function(t){for(var r,o=a(t),u=i(o),l=u.length,p=0,h=[];l>p;)r=u[p++],n&&!s(o,r)||c(h,e?[r,o[r]]:o[r]);return h}};e.exports={entries:u(!0),values:u(!1)}},4757:function(e,t,r){"use strict";var n=r(1247),o=r(6837);e.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},8434:function(e,t,r){var n=r(9107),o=r(1045),i=r(7809),a=TypeError;e.exports=function(e,t){var r,s;if("string"===t&&o(r=e.toString)&&!i(s=n(r,e)))return s;if(o(r=e.valueOf)&&!i(s=n(r,e)))return s;if("string"!==t&&o(r=e.toString)&&!i(s=n(r,e)))return s;throw a("Can't convert object to primitive value")}},5260:function(e,t,r){var n=r(7300),o=r(9720),i=r(1242),a=r(6920),s=r(1571),c=o([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=i.f(s(e)),r=a.f;return r?c(t,r(e)):t}},5096:function(e,t,r){var n=r(2383);e.exports=n},4393:function(e){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},8583:function(e,t,r){var n=r(2383),o=r(7587),i=r(1045),a=r(1122),s=r(4554),c=r(9140),u=r(5830),l=r(3954),p=r(4726),h=r(583),d=o&&o.prototype,f=c("species"),m=!1,y=i(n.PromiseRejectionEvent),g=a("Promise",(function(){var e=s(o),t=e!==String(o);if(!t&&66===h)return!0;if(p&&(!d.catch||!d.finally))return!0;if(!h||h<51||!/native code/.test(e)){var r=new o((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[f]=n,!(m=r.then((function(){}))instanceof n))return!0}return!t&&(u||l)&&!y}));e.exports={CONSTRUCTOR:g,REJECTION_EVENT:y,SUBCLASSING:m}},7587:function(e,t,r){var n=r(2383);e.exports=n.Promise},6401:function(e,t,r){var n=r(1571),o=r(7809),i=r(9636);e.exports=function(e,t){if(n(e),o(t)&&t.constructor===e)return t;var r=i.f(e);return(0,r.resolve)(t),r.promise}},5431:function(e,t,r){var n=r(7587),o=r(3802),i=r(8583).CONSTRUCTOR;e.exports=i||!o((function(e){n.all(e).then(void 0,(function(){}))}))},1072:function(e){var t=function(){this.head=null,this.tail=null};t.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}},e.exports=t},2146:function(e,t,r){var n=r(9107),o=r(1571),i=r(1045),a=r(6027),s=r(1660),c=TypeError;e.exports=function(e,t){var r=e.exec;if(i(r)){var u=n(r,e,t);return null!==u&&o(u),u}if("RegExp"===a(e))return n(s,e,t);throw c("RegExp#exec called on incompatible receiver")}},1660:function(e,t,r){"use strict";var n,o,i=r(9107),a=r(9720),s=r(9274),c=r(5316),u=r(4233),l=r(6402),p=r(5565),h=r(7417).get,d=r(5629),f=r(2231),m=l("native-string-replace",String.prototype.replace),y=RegExp.prototype.exec,g=y,v=a("".charAt),E=a("".indexOf),_=a("".replace),T=a("".slice),O=(o=/b*/g,i(y,n=/a/,"a"),i(y,o,"a"),0!==n.lastIndex||0!==o.lastIndex),R=u.BROKEN_CARET,I=void 0!==/()??/.exec("")[1];(O||I||R||d||f)&&(g=function(e){var t,r,n,o,a,u,l,d=this,f=h(d),S=s(e),b=f.raw;if(b)return b.lastIndex=d.lastIndex,t=i(g,b,S),d.lastIndex=b.lastIndex,t;var C=f.groups,A=R&&d.sticky,N=i(c,d),w=d.source,M=0,k=S;if(A&&(N=_(N,"y",""),-1===E(N,"g")&&(N+="g"),k=T(S,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==v(S,d.lastIndex-1))&&(w="(?: "+w+")",k=" "+k,M++),r=new RegExp("^(?:"+w+")",N)),I&&(r=new RegExp("^"+w+"$(?!\\s)",N)),O&&(n=d.lastIndex),o=i(y,A?r:d,k),A?o?(o.input=T(o.input,M),o[0]=T(o[0],M),o.index=d.lastIndex,d.lastIndex+=o[0].length):d.lastIndex=0:O&&o&&(d.lastIndex=d.global?o.index+o[0].length:n),I&&o&&o.length>1&&i(m,o[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)})),o&&C)for(o.groups=u=p(null),a=0;a<C.length;a++)u[(l=C[a])[0]]=o[l[1]];return o}),e.exports=g},5316:function(e,t,r){"use strict";var n=r(1571);e.exports=function(){var e=n(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},8040:function(e,t,r){var n=r(9107),o=r(1163),i=r(8931),a=r(5316),s=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in s||o(e,"flags")||!i(s,e)?t:n(a,e)}},4233:function(e,t,r){var n=r(4141),o=r(2383).RegExp,i=n((function(){var e=o("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),a=i||n((function(){return!o("a","y").sticky})),s=i||n((function(){var e=o("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));e.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:i}},5629:function(e,t,r){var n=r(4141),o=r(2383).RegExp;e.exports=n((function(){var e=o(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},2231:function(e,t,r){var n=r(4141),o=r(2383).RegExp;e.exports=n((function(){var e=o("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},6827:function(e,t,r){var n=r(7323),o=TypeError;e.exports=function(e){if(n(e))throw o("Can't call method on "+e);return e}},3257:function(e,t,r){var n=r(2383),o=r(7841),i=r(1045),a=r(9376),s=r(942),c=r(248),u=/MSIE .\./.test(a),l=n.Function,p=function(e){return u?function(t,r){var n=c(arguments.length,1)>2,a=i(t)?t:l(t),u=n?s(arguments,2):void 0;return e(n?function(){o(a,this,u)}:a,r)}:e};e.exports={setTimeout:p(n.setTimeout),setInterval:p(n.setInterval)}},4467:function(e,t,r){"use strict";var n=r(7300),o=r(4317),i=r(9140),a=r(2931),s=i("species");e.exports=function(e){var t=n(e),r=o.f;a&&t&&!t[s]&&r(t,s,{configurable:!0,get:function(){return this}})}},5125:function(e,t,r){var n=r(4317).f,o=r(1163),i=r(9140)("toStringTag");e.exports=function(e,t,r){e&&!r&&(e=e.prototype),e&&!o(e,i)&&n(e,i,{configurable:!0,value:t})}},6033:function(e,t,r){var n=r(6402),o=r(858),i=n("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},4480:function(e,t,r){var n=r(2383),o=r(5784),i="__core-js_shared__",a=n[i]||o(i,{});e.exports=a},6402:function(e,t,r){var n=r(4726),o=r(4480);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.25.1",mode:n?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.1/LICENSE",source:"https://github.com/zloirock/core-js"})},543:function(e,t,r){var n=r(1571),o=r(7345),i=r(7323),a=r(9140)("species");e.exports=function(e,t){var r,s=n(e).constructor;return void 0===s||i(r=n(s)[a])?t:o(r)}},7957:function(e,t,r){var n=r(9720),o=r(152),i=r(9274),a=r(6827),s=n("".charAt),c=n("".charCodeAt),u=n("".slice),l=function(e){return function(t,r){var n,l,p=i(a(t)),h=o(r),d=p.length;return h<0||h>=d?e?"":void 0:(n=c(p,h))<55296||n>56319||h+1===d||(l=c(p,h+1))<56320||l>57343?e?s(p,h):n:e?u(p,h,h+2):l-56320+(n-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},9492:function(e,t,r){"use strict";var n=r(9720),o=2147483647,i=/[^\0-\u007E]/,a=/[.\u3002\uFF0E\uFF61]/g,s="Overflow: input needs wider integers to process",c=RangeError,u=n(a.exec),l=Math.floor,p=String.fromCharCode,h=n("".charCodeAt),d=n([].join),f=n([].push),m=n("".replace),y=n("".split),g=n("".toLowerCase),v=function(e){return e+22+75*(e<26)},E=function(e,t,r){var n=0;for(e=r?l(e/700):e>>1,e+=l(e/t);e>455;)e=l(e/35),n+=36;return l(n+36*e/(e+38))},_=function(e){var t=[];e=function(e){for(var t=[],r=0,n=e.length;r<n;){var o=h(e,r++);if(o>=55296&&o<=56319&&r<n){var i=h(e,r++);56320==(64512&i)?f(t,((1023&o)<<10)+(1023&i)+65536):(f(t,o),r--)}else f(t,o)}return t}(e);var r,n,i=e.length,a=128,u=0,m=72;for(r=0;r<e.length;r++)(n=e[r])<128&&f(t,p(n));var y=t.length,g=y;for(y&&f(t,"-");g<i;){var _=o;for(r=0;r<e.length;r++)(n=e[r])>=a&&n<_&&(_=n);var T=g+1;if(_-a>l((o-u)/T))throw c(s);for(u+=(_-a)*T,a=_,r=0;r<e.length;r++){if((n=e[r])<a&&++u>o)throw c(s);if(n==a){for(var O=u,R=36;;){var I=R<=m?1:R>=m+26?26:R-m;if(O<I)break;var S=O-I,b=36-I;f(t,p(v(I+S%b))),O=l(S/b),R+=36}f(t,p(v(O))),m=E(u,T,g==y),u=0,g++}}u++,a++}return d(t,"")};e.exports=function(e){var t,r,n=[],o=y(m(g(e),a,"."),".");for(t=0;t<o.length;t++)r=o[t],f(n,u(i,r)?"xn--"+_(r):r);return d(n,".")}},3379:function(e,t,r){var n=r(9720),o=r(6827),i=r(9274),a=r(6342),s=n("".replace),c="["+a+"]",u=RegExp("^"+c+c+"*"),l=RegExp(c+c+"*$"),p=function(e){return function(t){var r=i(o(t));return 1&e&&(r=s(r,u,"")),2&e&&(r=s(r,l,"")),r}};e.exports={start:p(1),end:p(2),trim:p(3)}},5793:function(e,t,r){var n=r(583),o=r(4141);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},3706:function(e,t,r){var n=r(9107),o=r(7300),i=r(9140),a=r(4405);e.exports=function(){var e=o("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,s=i("toPrimitive");t&&!t[s]&&a(t,s,(function(e){return n(r,this)}),{arity:1})}},6125:function(e,t,r){var n=r(5793);e.exports=n&&!!Symbol.for&&!!Symbol.keyFor},5515:function(e,t,r){var n,o,i,a,s=r(2383),c=r(7841),u=r(3847),l=r(1045),p=r(1163),h=r(4141),d=r(4530),f=r(942),m=r(6459),y=r(248),g=r(7337),v=r(4368),E=s.setImmediate,_=s.clearImmediate,T=s.process,O=s.Dispatch,R=s.Function,I=s.MessageChannel,S=s.String,b=0,C={};try{n=s.location}catch(e){}var A=function(e){if(p(C,e)){var t=C[e];delete C[e],t()}},N=function(e){return function(){A(e)}},w=function(e){A(e.data)},M=function(e){s.postMessage(S(e),n.protocol+"//"+n.host)};E&&_||(E=function(e){y(arguments.length,1);var t=l(e)?e:R(e),r=f(arguments,1);return C[++b]=function(){c(t,void 0,r)},o(b),b},_=function(e){delete C[e]},v?o=function(e){T.nextTick(N(e))}:O&&O.now?o=function(e){O.now(N(e))}:I&&!g?(a=(i=new I).port2,i.port1.onmessage=w,o=u(a.postMessage,a)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&n&&"file:"!==n.protocol&&!h(M)?(o=M,s.addEventListener("message",w,!1)):o="onreadystatechange"in m("script")?function(e){d.appendChild(m("script")).onreadystatechange=function(){d.removeChild(this),A(e)}}:function(e){setTimeout(N(e),0)}),e.exports={set:E,clear:_}},5890:function(e,t,r){var n=r(9720);e.exports=n(1..valueOf)},3943:function(e,t,r){var n=r(152),o=Math.max,i=Math.min;e.exports=function(e,t){var r=n(e);return r<0?o(r+t,0):i(r,t)}},7386:function(e,t,r){var n=r(55),o=TypeError;e.exports=function(e){var t=n(e,"number");if("number"==typeof t)throw o("Can't convert number to bigint");return BigInt(t)}},3577:function(e,t,r){var n=r(152),o=r(2844),i=RangeError;e.exports=function(e){if(void 0===e)return 0;var t=n(e),r=o(t);if(t!==r)throw i("Wrong length or index");return r}},4221:function(e,t,r){var n=r(3392),o=r(6827);e.exports=function(e){return n(o(e))}},152:function(e,t,r){var n=r(3709);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},2844:function(e,t,r){var n=r(152),o=Math.min;e.exports=function(e){return e>0?o(n(e),9007199254740991):0}},4569:function(e,t,r){var n=r(6827),o=Object;e.exports=function(e){return o(n(e))}},5276:function(e,t,r){var n=r(8090),o=RangeError;e.exports=function(e,t){var r=n(e);if(r%t)throw o("Wrong offset");return r}},8090:function(e,t,r){var n=r(152),o=RangeError;e.exports=function(e){var t=n(e);if(t<0)throw o("The argument can't be less than 0");return t}},55:function(e,t,r){var n=r(9107),o=r(7809),i=r(6894),a=r(466),s=r(8434),c=r(9140),u=TypeError,l=c("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var r,c=a(e,l);if(c){if(void 0===t&&(t="default"),r=n(c,e,t),!o(r)||i(r))return r;throw u("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},7277:function(e,t,r){var n=r(55),o=r(6894);e.exports=function(e){var t=n(e,"string");return o(t)?t:t+""}},1247:function(e,t,r){var n={};n[r(9140)("toStringTag")]="z",e.exports="[object z]"===String(n)},9274:function(e,t,r){var n=r(6837),o=String;e.exports=function(e){if("Symbol"===n(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},7632:function(e){var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},7466:function(e,t,r){"use strict";var n=r(4866),o=r(2383),i=r(9107),a=r(2931),s=r(4412),c=r(5861),u=r(4061),l=r(9112),p=r(2499),h=r(6493),d=r(6121),f=r(2844),m=r(3577),y=r(5276),g=r(7277),v=r(1163),E=r(6837),_=r(7809),T=r(6894),O=r(5565),R=r(8931),I=r(7046),S=r(1242).f,b=r(8607),C=r(888).forEach,A=r(4467),N=r(4317),w=r(9097),M=r(7417),k=r(8851),U=M.get,x=M.set,P=M.enforce,L=N.f,j=w.f,D=Math.round,G=o.RangeError,B=u.ArrayBuffer,H=B.prototype,F=u.DataView,W=c.NATIVE_ARRAY_BUFFER_VIEWS,q=c.TYPED_ARRAY_TAG,Z=c.TypedArray,K=c.TypedArrayPrototype,V=c.aTypedArrayConstructor,z=c.isTypedArray,J="BYTES_PER_ELEMENT",X="Wrong length",Y=function(e,t){V(e);for(var r=0,n=t.length,o=new e(n);n>r;)o[r]=t[r++];return o},$=function(e,t){L(e,t,{get:function(){return U(this)[t]}})},Q=function(e){var t;return R(H,e)||"ArrayBuffer"==(t=E(e))||"SharedArrayBuffer"==t},ee=function(e,t){return z(e)&&!T(t)&&t in e&&d(+t)&&t>=0},te=function(e,t){return t=g(t),ee(e,t)?p(2,e[t]):j(e,t)},re=function(e,t,r){return t=g(t),!(ee(e,t)&&_(r)&&v(r,"value"))||v(r,"get")||v(r,"set")||r.configurable||v(r,"writable")&&!r.writable||v(r,"enumerable")&&!r.enumerable?L(e,t,r):(e[t]=r.value,e)};a?(W||(w.f=te,N.f=re,$(K,"buffer"),$(K,"byteOffset"),$(K,"byteLength"),$(K,"length")),n({target:"Object",stat:!0,forced:!W},{getOwnPropertyDescriptor:te,defineProperty:re}),e.exports=function(e,t,r){var a=e.match(/\d+$/)[0]/8,c=e+(r?"Clamped":"")+"Array",u="get"+e,p="set"+e,d=o[c],g=d,v=g&&g.prototype,E={},T=function(e,t){L(e,t,{get:function(){return function(e,t){var r=U(e);return r.view[u](t*a+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,n){var o=U(e);r&&(n=(n=D(n))<0?0:n>255?255:255&n),o.view[p](t*a+o.byteOffset,n,!0)}(this,t,e)},enumerable:!0})};W?s&&(g=t((function(e,t,r,n){return l(e,v),k(_(t)?Q(t)?void 0!==n?new d(t,y(r,a),n):void 0!==r?new d(t,y(r,a)):new d(t):z(t)?Y(g,t):i(b,g,t):new d(m(t)),e,g)})),I&&I(g,Z),C(S(d),(function(e){e in g||h(g,e,d[e])})),g.prototype=v):(g=t((function(e,t,r,n){l(e,v);var o,s,c,u=0,p=0;if(_(t)){if(!Q(t))return z(t)?Y(g,t):i(b,g,t);o=t,p=y(r,a);var h=t.byteLength;if(void 0===n){if(h%a)throw G(X);if((s=h-p)<0)throw G(X)}else if((s=f(n)*a)+p>h)throw G(X);c=s/a}else c=m(t),o=new B(s=c*a);for(x(e,{buffer:o,byteOffset:p,byteLength:s,length:c,view:new F(o)});u<c;)T(e,u++)})),I&&I(g,Z),v=g.prototype=O(K)),v.constructor!==g&&h(v,"constructor",g),P(v).TypedArrayConstructor=g,q&&h(v,q,c);var R=g!=d;E[c]=g,n({global:!0,constructor:!0,forced:R,sham:!W},E),J in g||h(g,J,a),J in v||h(v,J,a),A(c)}):e.exports=function(){}},4412:function(e,t,r){var n=r(2383),o=r(4141),i=r(3802),a=r(5861).NATIVE_ARRAY_BUFFER_VIEWS,s=n.ArrayBuffer,c=n.Int8Array;e.exports=!a||!o((function(){c(1)}))||!o((function(){new c(-1)}))||!i((function(e){new c,new c(null),new c(1.5),new c(e)}),!0)||o((function(){return 1!==new c(new s(2),1,void 0).length}))},1390:function(e,t,r){var n=r(9141),o=r(7106);e.exports=function(e,t){return n(o(e),t)}},8607:function(e,t,r){var n=r(3847),o=r(9107),i=r(7345),a=r(4569),s=r(2398),c=r(6151),u=r(1328),l=r(706),p=r(2318),h=r(5861).aTypedArrayConstructor,d=r(7386);e.exports=function(e){var t,r,f,m,y,g,v,E,_=i(this),T=a(e),O=arguments.length,R=O>1?arguments[1]:void 0,I=void 0!==R,S=u(T);if(S&&!l(S))for(E=(v=c(T,S)).next,T=[];!(g=o(E,v)).done;)T.push(g.value);for(I&&O>2&&(R=n(R,arguments[2])),r=s(T),f=new(h(_))(r),m=p(f),t=0;r>t;t++)y=I?R(T[t],t):T[t],f[t]=m?d(y):+y;return f}},7106:function(e,t,r){var n=r(5861),o=r(543),i=n.aTypedArrayConstructor,a=n.getTypedArrayConstructor;e.exports=function(e){return i(o(e,a(e)))}},858:function(e,t,r){var n=r(9720),o=0,i=Math.random(),a=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+i,36)}},9677:function(e,t,r){var n=r(4141),o=r(9140),i=r(4726),a=o("iterator");e.exports=!n((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),i&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host}))},2048:function(e,t,r){var n=r(5793);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5957:function(e,t,r){var n=r(2931),o=r(4141);e.exports=n&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},248:function(e){var t=TypeError;e.exports=function(e,r){if(e<r)throw t("Not enough arguments");return e}},1849:function(e,t,r){var n=r(2383),o=r(1045),i=n.WeakMap;e.exports=o(i)&&/native code/.test(String(i))},8225:function(e,t,r){var n=r(5096),o=r(1163),i=r(7216),a=r(4317).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});o(t,e)||a(t,e,{value:i.f(e)})}},7216:function(e,t,r){var n=r(9140);t.f=n},9140:function(e,t,r){var n=r(2383),o=r(6402),i=r(1163),a=r(858),s=r(5793),c=r(2048),u=o("wks"),l=n.Symbol,p=l&&l.for,h=c?l:l&&l.withoutSetter||a;e.exports=function(e){if(!i(u,e)||!s&&"string"!=typeof u[e]){var t="Symbol."+e;s&&i(l,e)?u[e]=l[e]:u[e]=c&&p?p(t):h(t)}return u[e]}},6342:function(e){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},863:function(e,t,r){"use strict";var n=r(4866),o=r(9720),i=r(4141),a=r(4061),s=r(1571),c=r(3943),u=r(2844),l=r(543),p=a.ArrayBuffer,h=a.DataView,d=h.prototype,f=o(p.prototype.slice),m=o(d.getUint8),y=o(d.setUint8);n({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:i((function(){return!new p(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(f&&void 0===t)return f(s(this),e);for(var r=s(this).byteLength,n=c(e,r),o=c(void 0===t?r:t,r),i=new(l(this,p))(u(o-n)),a=new h(this),d=new h(i),g=0;n<o;)y(d,g++,m(a,n++));return i}})},7095:function(e,t,r){"use strict";var n=r(4866),o=r(4141),i=r(6833),a=r(7809),s=r(4569),c=r(2398),u=r(7540),l=r(567),p=r(5508),h=r(3933),d=r(9140),f=r(583),m=d("isConcatSpreadable"),y=f>=51||!o((function(){var e=[];return e[m]=!1,e.concat()[0]!==e})),g=h("concat"),v=function(e){if(!a(e))return!1;var t=e[m];return void 0!==t?!!t:i(e)};n({target:"Array",proto:!0,arity:1,forced:!y||!g},{concat:function(e){var t,r,n,o,i,a=s(this),h=p(a,0),d=0;for(t=-1,n=arguments.length;t<n;t++)if(v(i=-1===t?a:arguments[t]))for(o=c(i),u(d+o),r=0;r<o;r++,d++)r in i&&l(h,d,i[r]);else u(d+1),l(h,d++,i);return h.length=d,h}})},7521:function(e,t,r){"use strict";var n=r(4866),o=r(888).filter;n({target:"Array",proto:!0,forced:!r(3933)("filter")},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},1362:function(e,t,r){"use strict";var n=r(4866),o=r(4890);n({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},9889:function(e,t,r){"use strict";var n=r(4866),o=r(7351).includes,i=r(4141),a=r(4651);n({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},5980:function(e,t,r){"use strict";var n=r(4866),o=r(9720),i=r(7351).indexOf,a=r(3070),s=o([].indexOf),c=!!s&&1/s([1],1,-0)<0,u=a("indexOf");n({target:"Array",proto:!0,forced:c||!u},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return c?s(this,e,t)||0:i(this,e,t)}})},3529:function(e,t,r){r(4866)({target:"Array",stat:!0},{isArray:r(6833)})},1685:function(e,t,r){"use strict";var n=r(4221),o=r(4651),i=r(9171),a=r(7417),s=r(4317).f,c=r(9719),u=r(8174),l=r(4726),p=r(2931),h="Array Iterator",d=a.set,f=a.getterFor(h);e.exports=c(Array,"Array",(function(e,t){d(this,{type:h,target:n(e),index:0,kind:t})}),(function(){var e=f(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,u(void 0,!0)):u("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values");var m=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!l&&p&&"values"!==m.name)try{s(m,"name",{value:"values"})}catch(e){}},3535:function(e,t,r){"use strict";var n=r(4866),o=r(9720),i=r(3392),a=r(4221),s=r(3070),c=o([].join),u=i!=Object,l=s("join",",");n({target:"Array",proto:!0,forced:u||!l},{join:function(e){return c(a(this),void 0===e?",":e)}})},1655:function(e,t,r){var n=r(4866),o=r(1959);n({target:"Array",proto:!0,forced:o!==[].lastIndexOf},{lastIndexOf:o})},7118:function(e,t,r){"use strict";var n=r(4866),o=r(888).map;n({target:"Array",proto:!0,forced:!r(3933)("map")},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},8134:function(e,t,r){"use strict";var n=r(4866),o=r(9720),i=r(6833),a=o([].reverse),s=[1,2];n({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),a(this)}})},2657:function(e,t,r){"use strict";var n=r(4866),o=r(6833),i=r(8297),a=r(7809),s=r(3943),c=r(2398),u=r(4221),l=r(567),p=r(9140),h=r(3933),d=r(942),f=h("slice"),m=p("species"),y=Array,g=Math.max;n({target:"Array",proto:!0,forced:!f},{slice:function(e,t){var r,n,p,h=u(this),f=c(h),v=s(e,f),E=s(void 0===t?f:t,f);if(o(h)&&(r=h.constructor,(i(r)&&(r===y||o(r.prototype))||a(r)&&null===(r=r[m]))&&(r=void 0),r===y||void 0===r))return d(h,v,E);for(n=new(void 0===r?y:r)(g(E-v,0)),p=0;v<E;v++,p++)v in h&&l(n,p,h[v]);return n.length=p,n}})},351:function(e,t,r){"use strict";var n=r(4866),o=r(888).some;n({target:"Array",proto:!0,forced:!r(3070)("some")},{some:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},3022:function(e,t,r){"use strict";var n=r(4866),o=r(4569),i=r(3943),a=r(152),s=r(2398),c=r(1208),u=r(7540),l=r(5508),p=r(567),h=r(6733),d=r(3933)("splice"),f=Math.max,m=Math.min;n({target:"Array",proto:!0,forced:!d},{splice:function(e,t){var r,n,d,y,g,v,E=o(this),_=s(E),T=i(e,_),O=arguments.length;for(0===O?r=n=0:1===O?(r=0,n=_-T):(r=O-2,n=m(f(a(t),0),_-T)),u(_+r-n),d=l(E,n),y=0;y<n;y++)(g=T+y)in E&&p(d,y,E[g]);if(d.length=n,r<n){for(y=T;y<_-n;y++)v=y+r,(g=y+n)in E?E[v]=E[g]:h(E,v);for(y=_;y>_-n+r;y--)h(E,y-1)}else if(r>n)for(y=_-n;y>T;y--)v=y+r-1,(g=y+n-1)in E?E[v]=E[g]:h(E,v);for(y=0;y<r;y++)E[y+T]=arguments[y+2];return c(E,_-n+r),d}})},9046:function(e,t,r){var n=r(4866),o=r(9720),i=Date,a=o(i.prototype.getTime);n({target:"Date",stat:!0},{now:function(){return a(new i)}})},9782:function(e,t,r){var n=r(9720),o=r(4405),i=Date.prototype,a="Invalid Date",s=n(i.toString),c=n(i.getTime);String(new Date(NaN))!=a&&o(i,"toString",(function(){var e=c(this);return e==e?s(this):a}))},7693:function(e,t,r){var n=r(4866),o=r(8829);n({target:"Function",proto:!0,forced:Function.bind!==o},{bind:o})},8668:function(e,t,r){var n=r(2931),o=r(9684).EXISTS,i=r(9720),a=r(4317).f,s=Function.prototype,c=i(s.toString),u=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=i(u.exec);n&&!o&&a(s,"name",{configurable:!0,get:function(){try{return l(u,c(this))[1]}catch(e){return""}}})},7675:function(e,t,r){var n=r(4866),o=r(7300),i=r(7841),a=r(9107),s=r(9720),c=r(4141),u=r(6833),l=r(1045),p=r(7809),h=r(6894),d=r(942),f=r(5793),m=o("JSON","stringify"),y=s(/./.exec),g=s("".charAt),v=s("".charCodeAt),E=s("".replace),_=s(1..toString),T=/[\uD800-\uDFFF]/g,O=/^[\uD800-\uDBFF]$/,R=/^[\uDC00-\uDFFF]$/,I=!f||c((function(){var e=o("Symbol")();return"[null]"!=m([e])||"{}"!=m({a:e})||"{}"!=m(Object(e))})),S=c((function(){return'"\\udf06\\ud834"'!==m("\udf06\ud834")||'"\\udead"'!==m("\udead")})),b=function(e,t){var r=d(arguments),n=t;if((p(t)||void 0!==e)&&!h(e))return u(t)||(t=function(e,t){if(l(n)&&(t=a(n,this,e,t)),!h(t))return t}),r[1]=t,i(m,null,r)},C=function(e,t,r){var n=g(r,t-1),o=g(r,t+1);return y(O,e)&&!y(R,o)||y(R,e)&&!y(O,n)?"\\u"+_(v(e,0),16):e};m&&n({target:"JSON",stat:!0,arity:3,forced:I||S},{stringify:function(e,t,r){var n=d(arguments),o=i(I?b:m,null,n);return S&&"string"==typeof o?E(o,T,C):o}})},5303:function(e,t,r){"use strict";r(6202)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(6675))},5724:function(e,t,r){r(5303)},8453:function(e,t,r){"use strict";var n=r(2931),o=r(2383),i=r(9720),a=r(1122),s=r(4405),c=r(1163),u=r(8851),l=r(8931),p=r(6894),h=r(55),d=r(4141),f=r(1242).f,m=r(9097).f,y=r(4317).f,g=r(5890),v=r(3379).trim,E="Number",_=o.Number,T=_.prototype,O=o.TypeError,R=i("".slice),I=i("".charCodeAt),S=function(e){var t=h(e,"number");return"bigint"==typeof t?t:b(t)},b=function(e){var t,r,n,o,i,a,s,c,u=h(e,"number");if(p(u))throw O("Cannot convert a Symbol value to a number");if("string"==typeof u&&u.length>2)if(u=v(u),43===(t=I(u,0))||45===t){if(88===(r=I(u,2))||120===r)return NaN}else if(48===t){switch(I(u,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+u}for(a=(i=R(u,2)).length,s=0;s<a;s++)if((c=I(i,s))<48||c>o)return NaN;return parseInt(i,n)}return+u};if(a(E,!_(" 0o1")||!_("0b1")||_("+0x1"))){for(var C,A=function(e){var t=arguments.length<1?0:_(S(e)),r=this;return l(T,r)&&d((function(){g(r)}))?u(Object(t),r,A):t},N=n?f(_):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),w=0;N.length>w;w++)c(_,C=N[w])&&!c(A,C)&&y(A,C,m(_,C));A.prototype=T,T.constructor=A,s(o,E,A,{constructor:!0})}},1538:function(e,t,r){r(4866)({target:"Number",stat:!0},{isInteger:r(6121)})},8327:function(e,t,r){var n=r(4866),o=r(7411);n({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},3442:function(e,t,r){var n=r(4866),o=r(2931),i=r(4317).f;n({target:"Object",stat:!0,forced:Object.defineProperty!==i,sham:!o},{defineProperty:i})},7665:function(e,t,r){var n=r(4866),o=r(8389).entries;n({target:"Object",stat:!0},{entries:function(e){return o(e)}})},954:function(e,t,r){var n=r(4866),o=r(5793),i=r(4141),a=r(6920),s=r(4569);n({target:"Object",stat:!0,forced:!o||i((function(){a.f(1)}))},{getOwnPropertySymbols:function(e){var t=a.f;return t?t(s(e)):[]}})},3786:function(e,t,r){var n=r(4866),o=r(4569),i=r(3555);n({target:"Object",stat:!0,forced:r(4141)((function(){i(1)}))},{keys:function(e){return i(o(e))}})},900:function(e,t,r){var n=r(1247),o=r(4405),i=r(4757);n||o(Object.prototype,"toString",i,{unsafe:!0})},9273:function(e,t,r){"use strict";var n=r(4866),o=r(9107),i=r(9181),a=r(9636),s=r(4393),c=r(5991);n({target:"Promise",stat:!0,forced:r(5431)},{all:function(e){var t=this,r=a.f(t),n=r.resolve,u=r.reject,l=s((function(){var r=i(t.resolve),a=[],s=0,l=1;c(e,(function(e){var i=s++,c=!1;l++,o(r,t,e).then((function(e){c||(c=!0,a[i]=e,--l||n(a))}),u)})),--l||n(a)}));return l.error&&u(l.value),r.promise}})},359:function(e,t,r){"use strict";var n=r(4866),o=r(4726),i=r(8583).CONSTRUCTOR,a=r(7587),s=r(7300),c=r(1045),u=r(4405),l=a&&a.prototype;if(n({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(e){return this.then(void 0,e)}}),!o&&c(a)){var p=s("Promise").prototype.catch;l.catch!==p&&u(l,"catch",p,{unsafe:!0})}},5137:function(e,t,r){"use strict";var n,o,i,a=r(4866),s=r(4726),c=r(4368),u=r(2383),l=r(9107),p=r(4405),h=r(7046),d=r(5125),f=r(4467),m=r(9181),y=r(1045),g=r(7809),v=r(9112),E=r(543),_=r(5515).set,T=r(5418),O=r(1879),R=r(4393),I=r(1072),S=r(7417),b=r(7587),C=r(8583),A=r(9636),N="Promise",w=C.CONSTRUCTOR,M=C.REJECTION_EVENT,k=C.SUBCLASSING,U=S.getterFor(N),x=S.set,P=b&&b.prototype,L=b,j=P,D=u.TypeError,G=u.document,B=u.process,H=A.f,F=H,W=!!(G&&G.createEvent&&u.dispatchEvent),q="unhandledrejection",Z=function(e){var t;return!(!g(e)||!y(t=e.then))&&t},K=function(e,t){var r,n,o,i=t.value,a=1==t.state,s=a?e.ok:e.fail,c=e.resolve,u=e.reject,p=e.domain;try{s?(a||(2===t.rejection&&Y(t),t.rejection=1),!0===s?r=i:(p&&p.enter(),r=s(i),p&&(p.exit(),o=!0)),r===e.promise?u(D("Promise-chain cycle")):(n=Z(r))?l(n,r,c,u):c(r)):u(i)}catch(e){p&&!o&&p.exit(),u(e)}},V=function(e,t){e.notified||(e.notified=!0,T((function(){for(var r,n=e.reactions;r=n.get();)K(r,e);e.notified=!1,t&&!e.rejection&&J(e)})))},z=function(e,t,r){var n,o;W?((n=G.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),u.dispatchEvent(n)):n={promise:t,reason:r},!M&&(o=u["on"+e])?o(n):e===q&&O("Unhandled promise rejection",r)},J=function(e){l(_,u,(function(){var t,r=e.facade,n=e.value;if(X(e)&&(t=R((function(){c?B.emit("unhandledRejection",n,r):z(q,r,n)})),e.rejection=c||X(e)?2:1,t.error))throw t.value}))},X=function(e){return 1!==e.rejection&&!e.parent},Y=function(e){l(_,u,(function(){var t=e.facade;c?B.emit("rejectionHandled",t):z("rejectionhandled",t,e.value)}))},$=function(e,t,r){return function(n){e(t,n,r)}},Q=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,V(e,!0))},ee=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw D("Promise can't be resolved itself");var n=Z(t);n?T((function(){var r={done:!1};try{l(n,t,$(ee,r,e),$(Q,r,e))}catch(t){Q(r,t,e)}})):(e.value=t,e.state=1,V(e,!1))}catch(t){Q({done:!1},t,e)}}};if(w&&(j=(L=function(e){v(this,j),m(e),l(n,this);var t=U(this);try{e($(ee,t),$(Q,t))}catch(e){Q(t,e)}}).prototype,(n=function(e){x(this,{type:N,done:!1,notified:!1,parent:!1,reactions:new I,rejection:!1,state:0,value:void 0})}).prototype=p(j,"then",(function(e,t){var r=U(this),n=H(E(this,L));return r.parent=!0,n.ok=!y(e)||e,n.fail=y(t)&&t,n.domain=c?B.domain:void 0,0==r.state?r.reactions.add(n):T((function(){K(n,r)})),n.promise})),o=function(){var e=new n,t=U(e);this.promise=e,this.resolve=$(ee,t),this.reject=$(Q,t)},A.f=H=function(e){return e===L||void 0===e?new o(e):F(e)},!s&&y(b)&&P!==Object.prototype)){i=P.then,k||p(P,"then",(function(e,t){var r=this;return new L((function(e,t){l(i,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete P.constructor}catch(e){}h&&h(P,j)}a({global:!0,constructor:!0,wrap:!0,forced:w},{Promise:L}),d(L,N,!1,!0),f(N)},3814:function(e,t,r){r(5137),r(9273),r(359),r(5886),r(5465),r(1118)},5886:function(e,t,r){"use strict";var n=r(4866),o=r(9107),i=r(9181),a=r(9636),s=r(4393),c=r(5991);n({target:"Promise",stat:!0,forced:r(5431)},{race:function(e){var t=this,r=a.f(t),n=r.reject,u=s((function(){var a=i(t.resolve);c(e,(function(e){o(a,t,e).then(r.resolve,n)}))}));return u.error&&n(u.value),r.promise}})},5465:function(e,t,r){"use strict";var n=r(4866),o=r(9107),i=r(9636);n({target:"Promise",stat:!0,forced:r(8583).CONSTRUCTOR},{reject:function(e){var t=i.f(this);return o(t.reject,void 0,e),t.promise}})},1118:function(e,t,r){"use strict";var n=r(4866),o=r(7300),i=r(4726),a=r(7587),s=r(8583).CONSTRUCTOR,c=r(6401),u=o("Promise"),l=i&&!s;n({target:"Promise",stat:!0,forced:i||s},{resolve:function(e){return c(l&&this===u?a:this,e)}})},1008:function(e,t,r){"use strict";var n=r(4866),o=r(1660);n({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},937:function(e,t,r){"use strict";var n=r(9684).PROPER,o=r(4405),i=r(1571),a=r(9274),s=r(4141),c=r(8040),u="toString",l=RegExp.prototype.toString,p=s((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),h=n&&l.name!=u;(p||h)&&o(RegExp.prototype,u,(function(){var e=i(this);return"/"+a(e.source)+"/"+a(c(e))}),{unsafe:!0})},6619:function(e,t,r){"use strict";var n=r(4866),o=r(9720),i=r(1271),a=r(6827),s=r(9274),c=r(7849),u=o("".indexOf);n({target:"String",proto:!0,forced:!c("includes")},{includes:function(e){return!!~u(s(a(this)),s(i(e)),arguments.length>1?arguments[1]:void 0)}})},2486:function(e,t,r){"use strict";var n=r(7957).charAt,o=r(9274),i=r(7417),a=r(9719),s=r(8174),c="String Iterator",u=i.set,l=i.getterFor(c);a(String,"String",(function(e){u(this,{type:c,string:o(e),index:0})}),(function(){var e,t=l(this),r=t.string,o=t.index;return o>=r.length?s(void 0,!0):(e=n(r,o),t.index+=e.length,s(e,!1))}))},7461:function(e,t,r){"use strict";var n=r(7841),o=r(9107),i=r(9720),a=r(2267),s=r(1571),c=r(7323),u=r(3265),l=r(6827),p=r(543),h=r(3025),d=r(2844),f=r(9274),m=r(466),y=r(9730),g=r(2146),v=r(1660),E=r(4233),_=r(4141),T=E.UNSUPPORTED_Y,O=4294967295,R=Math.min,I=[].push,S=i(/./.exec),b=i(I),C=i("".slice),A=!_((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));a("split",(function(e,t,r){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,r){var i=f(l(this)),a=void 0===r?O:r>>>0;if(0===a)return[];if(void 0===e)return[i];if(!u(e))return o(t,i,e,a);for(var s,c,p,h=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),m=0,g=new RegExp(e.source,d+"g");(s=o(v,g,i))&&!((c=g.lastIndex)>m&&(b(h,C(i,m,s.index)),s.length>1&&s.index<i.length&&n(I,h,y(s,1)),p=s[0].length,m=c,h.length>=a));)g.lastIndex===s.index&&g.lastIndex++;return m===i.length?!p&&S(g,"")||b(h,""):b(h,C(i,m)),h.length>a?y(h,0,a):h}:"0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:o(t,this,e,r)}:t,[function(t,r){var n=l(this),a=c(t)?void 0:m(t,e);return a?o(a,t,n,r):o(i,f(n),t,r)},function(e,n){var o=s(this),a=f(e),c=r(i,o,a,n,i!==t);if(c.done)return c.value;var u=p(o,RegExp),l=o.unicode,m=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(T?"g":"y"),y=new u(T?"^(?:"+o.source+")":o,m),v=void 0===n?O:n>>>0;if(0===v)return[];if(0===a.length)return null===g(y,a)?[a]:[];for(var E=0,_=0,I=[];_<a.length;){y.lastIndex=T?0:_;var S,A=g(y,T?C(a,_):a);if(null===A||(S=R(d(y.lastIndex+(T?_:0)),a.length))===E)_=h(a,_,l);else{if(b(I,C(a,E,_)),I.length===v)return I;for(var N=1;N<=A.length-1;N++)if(b(I,A[N]),I.length===v)return I;_=E=S}}return b(I,C(a,E)),I}]}),!A,T)},9172:function(e,t,r){"use strict";var n=r(4866),o=r(2383),i=r(9107),a=r(9720),s=r(4726),c=r(2931),u=r(5793),l=r(4141),p=r(1163),h=r(8931),d=r(1571),f=r(4221),m=r(7277),y=r(9274),g=r(2499),v=r(5565),E=r(3555),_=r(1242),T=r(6584),O=r(6920),R=r(9097),I=r(4317),S=r(3633),b=r(7225),C=r(4405),A=r(6402),N=r(6033),w=r(8164),M=r(858),k=r(9140),U=r(7216),x=r(8225),P=r(3706),L=r(5125),j=r(7417),D=r(888).forEach,G=N("hidden"),B="Symbol",H=j.set,F=j.getterFor(B),W=Object.prototype,q=o.Symbol,Z=q&&q.prototype,K=o.TypeError,V=o.QObject,z=R.f,J=I.f,X=T.f,Y=b.f,$=a([].push),Q=A("symbols"),ee=A("op-symbols"),te=A("wks"),re=!V||!V.prototype||!V.prototype.findChild,ne=c&&l((function(){return 7!=v(J({},"a",{get:function(){return J(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=z(W,t);n&&delete W[t],J(e,t,r),n&&e!==W&&J(W,t,n)}:J,oe=function(e,t){var r=Q[e]=v(Z);return H(r,{type:B,tag:e,description:t}),c||(r.description=t),r},ie=function(e,t,r){e===W&&ie(ee,t,r),d(e);var n=m(t);return d(r),p(Q,n)?(r.enumerable?(p(e,G)&&e[G][n]&&(e[G][n]=!1),r=v(r,{enumerable:g(0,!1)})):(p(e,G)||J(e,G,g(1,{})),e[G][n]=!0),ne(e,n,r)):J(e,n,r)},ae=function(e,t){d(e);var r=f(t),n=E(r).concat(le(r));return D(n,(function(t){c&&!i(se,r,t)||ie(e,t,r[t])})),e},se=function(e){var t=m(e),r=i(Y,this,t);return!(this===W&&p(Q,t)&&!p(ee,t))&&(!(r||!p(this,t)||!p(Q,t)||p(this,G)&&this[G][t])||r)},ce=function(e,t){var r=f(e),n=m(t);if(r!==W||!p(Q,n)||p(ee,n)){var o=z(r,n);return!o||!p(Q,n)||p(r,G)&&r[G][n]||(o.enumerable=!0),o}},ue=function(e){var t=X(f(e)),r=[];return D(t,(function(e){p(Q,e)||p(w,e)||$(r,e)})),r},le=function(e){var t=e===W,r=X(t?ee:f(e)),n=[];return D(r,(function(e){!p(Q,e)||t&&!p(W,e)||$(n,Q[e])})),n};u||(q=function(){if(h(Z,this))throw K("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?y(arguments[0]):void 0,t=M(e),r=function(e){this===W&&i(r,ee,e),p(this,G)&&p(this[G],t)&&(this[G][t]=!1),ne(this,t,g(1,e))};return c&&re&&ne(W,t,{configurable:!0,set:r}),oe(t,e)},C(Z=q.prototype,"toString",(function(){return F(this).tag})),C(q,"withoutSetter",(function(e){return oe(M(e),e)})),b.f=se,I.f=ie,S.f=ae,R.f=ce,_.f=T.f=ue,O.f=le,U.f=function(e){return oe(k(e),e)},c&&(J(Z,"description",{configurable:!0,get:function(){return F(this).description}}),s||C(W,"propertyIsEnumerable",se,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!u,sham:!u},{Symbol:q}),D(E(te),(function(e){x(e)})),n({target:B,stat:!0,forced:!u},{useSetter:function(){re=!0},useSimple:function(){re=!1}}),n({target:"Object",stat:!0,forced:!u,sham:!c},{create:function(e,t){return void 0===t?v(e):ae(v(e),t)},defineProperty:ie,defineProperties:ae,getOwnPropertyDescriptor:ce}),n({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:ue}),P(),L(q,B),w[G]=!0},4201:function(e,t,r){"use strict";var n=r(4866),o=r(2931),i=r(2383),a=r(9720),s=r(1163),c=r(1045),u=r(8931),l=r(9274),p=r(4317).f,h=r(5751),d=i.Symbol,f=d&&d.prototype;if(o&&c(d)&&(!("description"in f)||void 0!==d().description)){var m={},y=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),t=u(f,this)?new d(e):void 0===e?d():d(e);return""===e&&(m[t]=!0),t};h(y,d),y.prototype=f,f.constructor=y;var g="Symbol(test)"==String(d("test")),v=a(f.valueOf),E=a(f.toString),_=/^Symbol\((.*)\)[^)]+$/,T=a("".replace),O=a("".slice);p(f,"description",{configurable:!0,get:function(){var e=v(this);if(s(m,e))return"";var t=E(e),r=g?O(t,7,-1):T(t,_,"$1");return""===r?void 0:r}}),n({global:!0,constructor:!0,forced:!0},{Symbol:y})}},2718:function(e,t,r){var n=r(4866),o=r(7300),i=r(1163),a=r(9274),s=r(6402),c=r(6125),u=s("string-to-symbol-registry"),l=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!c},{for:function(e){var t=a(e);if(i(u,t))return u[t];var r=o("Symbol")(t);return u[t]=r,l[r]=t,r}})},6864:function(e,t,r){r(8225)("iterator")},514:function(e,t,r){r(9172),r(2718),r(2183),r(7675),r(954)},2183:function(e,t,r){var n=r(4866),o=r(1163),i=r(6894),a=r(7632),s=r(6402),c=r(6125),u=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!c},{keyFor:function(e){if(!i(e))throw TypeError(a(e)+" is not a symbol");if(o(u,e))return u[e]}})},8548:function(e,t,r){"use strict";var n=r(9720),o=r(5861),i=n(r(5239)),a=o.aTypedArray;(0,o.exportTypedArrayMethod)("copyWithin",(function(e,t){return i(a(this),e,t,arguments.length>2?arguments[2]:void 0)}))},6921:function(e,t,r){"use strict";var n=r(5861),o=r(888).every,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("every",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},8346:function(e,t,r){"use strict";var n=r(5861),o=r(9732),i=r(7386),a=r(6837),s=r(9107),c=r(9720),u=r(4141),l=n.aTypedArray,p=n.exportTypedArrayMethod,h=c("".slice);p("fill",(function(e){var t=arguments.length;l(this);var r="Big"===h(a(this),0,3)?i(e):+e;return s(o,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),u((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})))},3849:function(e,t,r){"use strict";var n=r(5861),o=r(888).filter,i=r(1390),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("filter",(function(e){var t=o(a(this),e,arguments.length>1?arguments[1]:void 0);return i(this,t)}))},2728:function(e,t,r){"use strict";var n=r(5861),o=r(888).findIndex,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("findIndex",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},6781:function(e,t,r){"use strict";var n=r(5861),o=r(888).find,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("find",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},3039:function(e,t,r){"use strict";var n=r(5861),o=r(888).forEach,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("forEach",(function(e){o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},2258:function(e,t,r){"use strict";var n=r(5861),o=r(7351).includes,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("includes",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},316:function(e,t,r){"use strict";var n=r(5861),o=r(7351).indexOf,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("indexOf",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},2446:function(e,t,r){"use strict";var n=r(2383),o=r(4141),i=r(9720),a=r(5861),s=r(1685),c=r(9140)("iterator"),u=n.Uint8Array,l=i(s.values),p=i(s.keys),h=i(s.entries),d=a.aTypedArray,f=a.exportTypedArrayMethod,m=u&&u.prototype,y=!o((function(){m[c].call([1])})),g=!!m&&m.values&&m[c]===m.values&&"values"===m.values.name,v=function(){return l(d(this))};f("entries",(function(){return h(d(this))}),y),f("keys",(function(){return p(d(this))}),y),f("values",v,y||!g,{name:"values"}),f(c,v,y||!g,{name:"values"})},695:function(e,t,r){"use strict";var n=r(5861),o=r(9720),i=n.aTypedArray,a=n.exportTypedArrayMethod,s=o([].join);a("join",(function(e){return s(i(this),e)}))},6776:function(e,t,r){"use strict";var n=r(5861),o=r(7841),i=r(1959),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return o(i,a(this),t>1?[e,arguments[1]]:[e])}))},1922:function(e,t,r){"use strict";var n=r(5861),o=r(888).map,i=r(7106),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("map",(function(e){return o(a(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(i(e))(t)}))}))},7146:function(e,t,r){"use strict";var n=r(5861),o=r(6653).right,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return o(i(this),e,t,t>1?arguments[1]:void 0)}))},8844:function(e,t,r){"use strict";var n=r(5861),o=r(6653).left,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return o(i(this),e,t,t>1?arguments[1]:void 0)}))},3641:function(e,t,r){"use strict";var n=r(5861),o=n.aTypedArray,i=n.exportTypedArrayMethod,a=Math.floor;i("reverse",(function(){for(var e,t=this,r=o(t).length,n=a(r/2),i=0;i<n;)e=t[i],t[i++]=t[--r],t[r]=e;return t}))},650:function(e,t,r){"use strict";var n=r(2383),o=r(9107),i=r(5861),a=r(2398),s=r(5276),c=r(4569),u=r(4141),l=n.RangeError,p=n.Int8Array,h=p&&p.prototype,d=h&&h.set,f=i.aTypedArray,m=i.exportTypedArrayMethod,y=!u((function(){var e=new Uint8ClampedArray(2);return o(d,e,{length:1,0:3},1),3!==e[1]})),g=y&&i.NATIVE_ARRAY_BUFFER_VIEWS&&u((function(){var e=new p(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));m("set",(function(e){f(this);var t=s(arguments.length>1?arguments[1]:void 0,1),r=c(e);if(y)return o(d,this,r,t);var n=this.length,i=a(r),u=0;if(i+t>n)throw l("Wrong length");for(;u<i;)this[t+u]=r[u++]}),!y||g)},9951:function(e,t,r){"use strict";var n=r(5861),o=r(7106),i=r(4141),a=r(942),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("slice",(function(e,t){for(var r=a(s(this),e,t),n=o(this),i=0,c=r.length,u=new n(c);c>i;)u[i]=r[i++];return u}),i((function(){new Int8Array(1).slice()})))},2426:function(e,t,r){"use strict";var n=r(5861),o=r(888).some,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("some",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},5488:function(e,t,r){"use strict";var n=r(2383),o=r(9720),i=r(4141),a=r(9181),s=r(5416),c=r(5861),u=r(3975),l=r(8482),p=r(583),h=r(3701),d=c.aTypedArray,f=c.exportTypedArrayMethod,m=n.Uint16Array,y=m&&o(m.prototype.sort),g=!(!y||i((function(){y(new m(2),null)}))&&i((function(){y(new m(2),{})}))),v=!!y&&!i((function(){if(p)return p<74;if(u)return u<67;if(l)return!0;if(h)return h<602;var e,t,r=new m(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(y(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));f("sort",(function(e){return void 0!==e&&a(e),v?y(this,e):s(d(this),function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}}(e))}),!v||g)},8542:function(e,t,r){"use strict";var n=r(5861),o=r(2844),i=r(3943),a=r(7106),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("subarray",(function(e,t){var r=s(this),n=r.length,c=i(e,n);return new(a(r))(r.buffer,r.byteOffset+c*r.BYTES_PER_ELEMENT,o((void 0===t?n:i(t,n))-c))}))},4740:function(e,t,r){"use strict";var n=r(2383),o=r(7841),i=r(5861),a=r(4141),s=r(942),c=n.Int8Array,u=i.aTypedArray,l=i.exportTypedArrayMethod,p=[].toLocaleString,h=!!c&&a((function(){p.call(new c(1))}));l("toLocaleString",(function(){return o(p,h?s(u(this)):u(this),s(arguments))}),a((function(){return[1,2].toLocaleString()!=new c([1,2]).toLocaleString()}))||!a((function(){c.prototype.toLocaleString.call([1,2])})))},4822:function(e,t,r){"use strict";var n=r(5861).exportTypedArrayMethod,o=r(4141),i=r(2383),a=r(9720),s=i.Uint8Array,c=s&&s.prototype||{},u=[].toString,l=a([].join);o((function(){u.call({})}))&&(u=function(){return l(this)});var p=c.toString!=u;n("toString",u,p)},3536:function(e,t,r){r(7466)("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}))},7988:function(e,t,r){var n=r(2383),o=r(9286),i=r(5977),a=r(4890),s=r(6493),c=function(e){if(e&&e.forEach!==a)try{s(e,"forEach",a)}catch(t){e.forEach=a}};for(var u in o)o[u]&&c(n[u]&&n[u].prototype);c(i)},4261:function(e,t,r){var n=r(2383),o=r(9286),i=r(5977),a=r(1685),s=r(6493),c=r(9140),u=c("iterator"),l=c("toStringTag"),p=a.values,h=function(e,t){if(e){if(e[u]!==p)try{s(e,u,p)}catch(t){e[u]=p}if(e[l]||s(e,l,t),o[t])for(var r in a)if(e[r]!==a[r])try{s(e,r,a[r])}catch(t){e[r]=a[r]}}};for(var d in o)h(n[d]&&n[d].prototype,d);h(i,"DOMTokenList")},8259:function(e,t,r){var n=r(4866),o=r(2383),i=r(3257).setInterval;n({global:!0,bind:!0,forced:o.setInterval!==i},{setInterval:i})},2606:function(e,t,r){var n=r(4866),o=r(2383),i=r(3257).setTimeout;n({global:!0,bind:!0,forced:o.setTimeout!==i},{setTimeout:i})},6181:function(e,t,r){r(8259),r(2606)},5709:function(e,t,r){"use strict";r(1685);var n=r(4866),o=r(2383),i=r(9107),a=r(9720),s=r(2931),c=r(9677),u=r(4405),l=r(4766),p=r(5125),h=r(9437),d=r(7417),f=r(9112),m=r(1045),y=r(1163),g=r(3847),v=r(6837),E=r(1571),_=r(7809),T=r(9274),O=r(5565),R=r(2499),I=r(6151),S=r(1328),b=r(248),C=r(9140),A=r(5416),N=C("iterator"),w="URLSearchParams",M="URLSearchParamsIterator",k=d.set,U=d.getterFor(w),x=d.getterFor(M),P=Object.getOwnPropertyDescriptor,L=function(e){if(!s)return o[e];var t=P(o,e);return t&&t.value},j=L("fetch"),D=L("Request"),G=L("Headers"),B=D&&D.prototype,H=G&&G.prototype,F=o.RegExp,W=o.TypeError,q=o.decodeURIComponent,Z=o.encodeURIComponent,K=a("".charAt),V=a([].join),z=a([].push),J=a("".replace),X=a([].shift),Y=a([].splice),$=a("".split),Q=a("".slice),ee=/\+/g,te=Array(4),re=function(e){return te[e-1]||(te[e-1]=F("((?:%[\\da-f]{2}){"+e+"})","gi"))},ne=function(e){try{return q(e)}catch(t){return e}},oe=function(e){var t=J(e,ee," "),r=4;try{return q(t)}catch(e){for(;r;)t=J(t,re(r--),ne);return t}},ie=/[!'()~]|%20/g,ae={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},se=function(e){return ae[e]},ce=function(e){return J(Z(e),ie,se)},ue=h((function(e,t){k(this,{type:M,iterator:I(U(e).entries),kind:t})}),"Iterator",(function(){var e=x(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),le=function(e){this.entries=[],this.url=null,void 0!==e&&(_(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===K(e,0)?Q(e,1):e:T(e)))};le.prototype={type:w,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,o,a,s,c,u=S(e);if(u)for(r=(t=I(e,u)).next;!(n=i(r,t)).done;){if(a=(o=I(E(n.value))).next,(s=i(a,o)).done||(c=i(a,o)).done||!i(a,o).done)throw W("Expected sequence with length 2");z(this.entries,{key:T(s.value),value:T(c.value)})}else for(var l in e)y(e,l)&&z(this.entries,{key:l,value:T(e[l])})},parseQuery:function(e){if(e)for(var t,r,n=$(e,"&"),o=0;o<n.length;)(t=n[o++]).length&&(r=$(t,"="),z(this.entries,{key:oe(X(r)),value:oe(V(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],z(r,ce(e.key)+"="+ce(e.value));return V(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var pe=function(){f(this,he);var e=arguments.length>0?arguments[0]:void 0;k(this,new le(e))},he=pe.prototype;if(l(he,{append:function(e,t){b(arguments.length,2);var r=U(this);z(r.entries,{key:T(e),value:T(t)}),r.updateURL()},delete:function(e){b(arguments.length,1);for(var t=U(this),r=t.entries,n=T(e),o=0;o<r.length;)r[o].key===n?Y(r,o,1):o++;t.updateURL()},get:function(e){b(arguments.length,1);for(var t=U(this).entries,r=T(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){b(arguments.length,1);for(var t=U(this).entries,r=T(e),n=[],o=0;o<t.length;o++)t[o].key===r&&z(n,t[o].value);return n},has:function(e){b(arguments.length,1);for(var t=U(this).entries,r=T(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){b(arguments.length,1);for(var r,n=U(this),o=n.entries,i=!1,a=T(e),s=T(t),c=0;c<o.length;c++)(r=o[c]).key===a&&(i?Y(o,c--,1):(i=!0,r.value=s));i||z(o,{key:a,value:s}),n.updateURL()},sort:function(){var e=U(this);A(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=U(this).entries,n=g(e,arguments.length>1?arguments[1]:void 0),o=0;o<r.length;)n((t=r[o++]).value,t.key,this)},keys:function(){return new ue(this,"keys")},values:function(){return new ue(this,"values")},entries:function(){return new ue(this,"entries")}},{enumerable:!0}),u(he,N,he.entries,{name:"entries"}),u(he,"toString",(function(){return U(this).serialize()}),{enumerable:!0}),p(pe,w),n({global:!0,constructor:!0,forced:!c},{URLSearchParams:pe}),!c&&m(G)){var de=a(H.has),fe=a(H.set),me=function(e){if(_(e)){var t,r=e.body;if(v(r)===w)return t=e.headers?new G(e.headers):new G,de(t,"content-type")||fe(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),O(e,{body:R(0,T(r)),headers:R(0,t)})}return e};if(m(j)&&n({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return j(e,arguments.length>1?me(arguments[1]):{})}}),m(D)){var ye=function(e){return f(this,B),new D(e,arguments.length>1?me(arguments[1]):{})};B.constructor=ye,ye.prototype=B,n({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:ye})}}e.exports={URLSearchParams:pe,getState:U}},8385:function(e,t,r){r(5709)},1672:function(e,t,r){"use strict";r(2486);var n,o=r(4866),i=r(2931),a=r(9677),s=r(2383),c=r(3847),u=r(9720),l=r(4405),p=r(2886),h=r(9112),d=r(1163),f=r(7411),m=r(1601),y=r(9730),g=r(7957).codeAt,v=r(9492),E=r(9274),_=r(5125),T=r(248),O=r(5709),R=r(7417),I=R.set,S=R.getterFor("URL"),b=O.URLSearchParams,C=O.getState,A=s.URL,N=s.TypeError,w=s.parseInt,M=Math.floor,k=Math.pow,U=u("".charAt),x=u(/./.exec),P=u([].join),L=u(1..toString),j=u([].pop),D=u([].push),G=u("".replace),B=u([].shift),H=u("".split),F=u("".slice),W=u("".toLowerCase),q=u([].unshift),Z="Invalid scheme",K="Invalid host",V="Invalid port",z=/[a-z]/i,J=/[\d+-.a-z]/i,X=/\d/,Y=/^0x/i,$=/^[0-7]+$/,Q=/^\d+$/,ee=/^[\da-f]+$/i,te=/[\0\t\n\r #%/:<>?@[\\\]^|]/,re=/[\0\t\n\r #/:<>?@[\\\]^|]/,ne=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,oe=/[\t\n\r]/g,ie=function(e){var t,r,n,o;if("number"==typeof e){for(t=[],r=0;r<4;r++)q(t,e%256),e=M(e/256);return P(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,o=0,i=0;i<8;i++)0!==e[i]?(o>r&&(t=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r&&(t=n,r=o),t}(e),r=0;r<8;r++)o&&0===e[r]||(o&&(o=!1),n===r?(t+=r?":":"::",o=!0):(t+=L(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},ae={},se=f({},ae,{" ":1,'"':1,"<":1,">":1,"`":1}),ce=f({},se,{"#":1,"?":1,"{":1,"}":1}),ue=f({},ce,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),le=function(e,t){var r=g(e,0);return r>32&&r<127&&!d(t,e)?e:encodeURIComponent(e)},pe={ftp:21,file:null,http:80,https:443,ws:80,wss:443},he=function(e,t){var r;return 2==e.length&&x(z,U(e,0))&&(":"==(r=U(e,1))||!t&&"|"==r)},de=function(e){var t;return e.length>1&&he(F(e,0,2))&&(2==e.length||"/"===(t=U(e,2))||"\\"===t||"?"===t||"#"===t)},fe=function(e){return"."===e||"%2e"===W(e)},me={},ye={},ge={},ve={},Ee={},_e={},Te={},Oe={},Re={},Ie={},Se={},be={},Ce={},Ae={},Ne={},we={},Me={},ke={},Ue={},xe={},Pe={},Le=function(e,t,r){var n,o,i,a=E(e);if(t){if(o=this.parse(a))throw N(o);this.searchParams=null}else{if(void 0!==r&&(n=new Le(r,!0)),o=this.parse(a,null,n))throw N(o);(i=C(new b)).bindURL(this),this.searchParams=i}};Le.prototype={type:"URL",parse:function(e,t,r){var o,i,a,s,c,u=this,l=t||me,p=0,h="",f=!1,g=!1,v=!1;for(e=E(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=G(e,ne,"")),e=G(e,oe,""),o=m(e);p<=o.length;){switch(i=o[p],l){case me:if(!i||!x(z,i)){if(t)return Z;l=ge;continue}h+=W(i),l=ye;break;case ye:if(i&&(x(J,i)||"+"==i||"-"==i||"."==i))h+=W(i);else{if(":"!=i){if(t)return Z;h="",l=ge,p=0;continue}if(t&&(u.isSpecial()!=d(pe,h)||"file"==h&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=h,t)return void(u.isSpecial()&&pe[u.scheme]==u.port&&(u.port=null));h="","file"==u.scheme?l=Ae:u.isSpecial()&&r&&r.scheme==u.scheme?l=ve:u.isSpecial()?l=Oe:"/"==o[p+1]?(l=Ee,p++):(u.cannotBeABaseURL=!0,D(u.path,""),l=Ue)}break;case ge:if(!r||r.cannotBeABaseURL&&"#"!=i)return Z;if(r.cannotBeABaseURL&&"#"==i){u.scheme=r.scheme,u.path=y(r.path),u.query=r.query,u.fragment="",u.cannotBeABaseURL=!0,l=Pe;break}l="file"==r.scheme?Ae:_e;continue;case ve:if("/"!=i||"/"!=o[p+1]){l=_e;continue}l=Re,p++;break;case Ee:if("/"==i){l=Ie;break}l=ke;continue;case _e:if(u.scheme=r.scheme,i==n)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=y(r.path),u.query=r.query;else if("/"==i||"\\"==i&&u.isSpecial())l=Te;else if("?"==i)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=y(r.path),u.query="",l=xe;else{if("#"!=i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=y(r.path),u.path.length--,l=ke;continue}u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=y(r.path),u.query=r.query,u.fragment="",l=Pe}break;case Te:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,l=ke;continue}l=Ie}else l=Re;break;case Oe:if(l=Re,"/"!=i||"/"!=U(h,p+1))continue;p++;break;case Re:if("/"!=i&&"\\"!=i){l=Ie;continue}break;case Ie:if("@"==i){f&&(h="%40"+h),f=!0,a=m(h);for(var _=0;_<a.length;_++){var T=a[_];if(":"!=T||v){var O=le(T,ue);v?u.password+=O:u.username+=O}else v=!0}h=""}else if(i==n||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(f&&""==h)return"Invalid authority";p-=m(h).length+1,h="",l=Se}else h+=i;break;case Se:case be:if(t&&"file"==u.scheme){l=we;continue}if(":"!=i||g){if(i==n||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==h)return K;if(t&&""==h&&(u.includesCredentials()||null!==u.port))return;if(s=u.parseHost(h))return s;if(h="",l=Me,t)return;continue}"["==i?g=!0:"]"==i&&(g=!1),h+=i}else{if(""==h)return K;if(s=u.parseHost(h))return s;if(h="",l=Ce,t==be)return}break;case Ce:if(!x(X,i)){if(i==n||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||t){if(""!=h){var R=w(h,10);if(R>65535)return V;u.port=u.isSpecial()&&R===pe[u.scheme]?null:R,h=""}if(t)return;l=Me;continue}return V}h+=i;break;case Ae:if(u.scheme="file","/"==i||"\\"==i)l=Ne;else{if(!r||"file"!=r.scheme){l=ke;continue}if(i==n)u.host=r.host,u.path=y(r.path),u.query=r.query;else if("?"==i)u.host=r.host,u.path=y(r.path),u.query="",l=xe;else{if("#"!=i){de(P(y(o,p),""))||(u.host=r.host,u.path=y(r.path),u.shortenPath()),l=ke;continue}u.host=r.host,u.path=y(r.path),u.query=r.query,u.fragment="",l=Pe}}break;case Ne:if("/"==i||"\\"==i){l=we;break}r&&"file"==r.scheme&&!de(P(y(o,p),""))&&(he(r.path[0],!0)?D(u.path,r.path[0]):u.host=r.host),l=ke;continue;case we:if(i==n||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&he(h))l=ke;else if(""==h){if(u.host="",t)return;l=Me}else{if(s=u.parseHost(h))return s;if("localhost"==u.host&&(u.host=""),t)return;h="",l=Me}continue}h+=i;break;case Me:if(u.isSpecial()){if(l=ke,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=n&&(l=ke,"/"!=i))continue}else u.fragment="",l=Pe;else u.query="",l=xe;break;case ke:if(i==n||"/"==i||"\\"==i&&u.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(c=W(c=h))||"%2e."===c||".%2e"===c||"%2e%2e"===c?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||D(u.path,"")):fe(h)?"/"==i||"\\"==i&&u.isSpecial()||D(u.path,""):("file"==u.scheme&&!u.path.length&&he(h)&&(u.host&&(u.host=""),h=U(h,0)+":"),D(u.path,h)),h="","file"==u.scheme&&(i==n||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)B(u.path);"?"==i?(u.query="",l=xe):"#"==i&&(u.fragment="",l=Pe)}else h+=le(i,ce);break;case Ue:"?"==i?(u.query="",l=xe):"#"==i?(u.fragment="",l=Pe):i!=n&&(u.path[0]+=le(i,ae));break;case xe:t||"#"!=i?i!=n&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":le(i,ae)):(u.fragment="",l=Pe);break;case Pe:i!=n&&(u.fragment+=le(i,se))}p++}},parseHost:function(e){var t,r,n;if("["==U(e,0)){if("]"!=U(e,e.length-1))return K;if(t=function(e){var t,r,n,o,i,a,s,c=[0,0,0,0,0,0,0,0],u=0,l=null,p=0,h=function(){return U(e,p)};if(":"==h()){if(":"!=U(e,1))return;p+=2,l=++u}for(;h();){if(8==u)return;if(":"!=h()){for(t=r=0;r<4&&x(ee,h());)t=16*t+w(h(),16),p++,r++;if("."==h()){if(0==r)return;if(p-=r,u>6)return;for(n=0;h();){if(o=null,n>0){if(!("."==h()&&n<4))return;p++}if(!x(X,h()))return;for(;x(X,h());){if(i=w(h(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;p++}c[u]=256*c[u]+o,2!=++n&&4!=n||u++}if(4!=n)return;break}if(":"==h()){if(p++,!h())return}else if(h())return;c[u++]=t}else{if(null!==l)return;p++,l=++u}}if(null!==l)for(a=u-l,u=7;0!=u&&a>0;)s=c[u],c[u--]=c[l+a-1],c[l+--a]=s;else if(8!=u)return;return c}(F(e,1,-1)),!t)return K;this.host=t}else if(this.isSpecial()){if(e=v(e),x(te,e))return K;if(t=function(e){var t,r,n,o,i,a,s,c=H(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(o=c[n]))return e;if(i=10,o.length>1&&"0"==U(o,0)&&(i=x(Y,o)?16:8,o=F(o,8==i?1:2)),""===o)a=0;else{if(!x(10==i?Q:8==i?$:ee,o))return e;a=w(o,i)}D(r,a)}for(n=0;n<t;n++)if(a=r[n],n==t-1){if(a>=k(256,5-t))return null}else if(a>255)return null;for(s=j(r),n=0;n<r.length;n++)s+=r[n]*k(256,3-n);return s}(e),null===t)return K;this.host=t}else{if(x(re,e))return K;for(t="",r=m(e),n=0;n<r.length;n++)t+=le(r[n],ae);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return d(pe,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&he(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,o=e.host,i=e.port,a=e.path,s=e.query,c=e.fragment,u=t+":";return null!==o?(u+="//",e.includesCredentials()&&(u+=r+(n?":"+n:"")+"@"),u+=ie(o),null!==i&&(u+=":"+i)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?a[0]:a.length?"/"+P(a,"/"):"",null!==s&&(u+="?"+s),null!==c&&(u+="#"+c),u},setHref:function(e){var t=this.parse(e);if(t)throw N(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new je(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+ie(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(E(e)+":",me)},getUsername:function(){return this.username},setUsername:function(e){var t=m(E(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=le(t[r],ue)}},getPassword:function(){return this.password},setPassword:function(e){var t=m(E(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=le(t[r],ue)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?ie(e):ie(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Se)},getHostname:function(){var e=this.host;return null===e?"":ie(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,be)},getPort:function(){var e=this.port;return null===e?"":E(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=E(e))?this.port=null:this.parse(e,Ce))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+P(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Me))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=E(e))?this.query=null:("?"==U(e,0)&&(e=F(e,1)),this.query="",this.parse(e,xe)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=E(e))?("#"==U(e,0)&&(e=F(e,1)),this.fragment="",this.parse(e,Pe)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var je=function(e){var t=h(this,De),r=T(arguments.length,1)>1?arguments[1]:void 0,n=I(t,new Le(e,!1,r));i||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},De=je.prototype,Ge=function(e,t){return{get:function(){return S(this)[e]()},set:t&&function(e){return S(this)[t](e)},configurable:!0,enumerable:!0}};if(i&&(p(De,"href",Ge("serialize","setHref")),p(De,"origin",Ge("getOrigin")),p(De,"protocol",Ge("getProtocol","setProtocol")),p(De,"username",Ge("getUsername","setUsername")),p(De,"password",Ge("getPassword","setPassword")),p(De,"host",Ge("getHost","setHost")),p(De,"hostname",Ge("getHostname","setHostname")),p(De,"port",Ge("getPort","setPort")),p(De,"pathname",Ge("getPathname","setPathname")),p(De,"search",Ge("getSearch","setSearch")),p(De,"searchParams",Ge("getSearchParams")),p(De,"hash",Ge("getHash","setHash"))),l(De,"toJSON",(function(){return S(this).serialize()}),{enumerable:!0}),l(De,"toString",(function(){return S(this).serialize()}),{enumerable:!0}),A){var Be=A.createObjectURL,He=A.revokeObjectURL;Be&&l(je,"createObjectURL",c(Be,A)),He&&l(je,"revokeObjectURL",c(He,A))}_(je,"URL"),o({global:!0,constructor:!0,forced:!a,sham:!i},{URL:je})},4838:function(e,t,r){r(1672)},2937:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},9168:function(e){e.exports=r;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function r(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}function n(e){return!0===(e&&e.__isLong__)}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0}),r.isLong=n;var o={},i={};function a(e,t){var r,n,a;return t?(a=0<=(e>>>=0)&&e<256)&&(n=i[e])?n:(r=c(e,(0|e)<0?-1:0,!0),a&&(i[e]=r),r):(a=-128<=(e|=0)&&e<128)&&(n=o[e])?n:(r=c(e,e<0?-1:0,!1),a&&(o[e]=r),r)}function s(e,t){if(isNaN(e))return t?g:y;if(t){if(e<0)return g;if(e>=d)return O}else{if(e<=-f)return R;if(e+1>=f)return T}return e<0?s(-e,t).neg():c(e%h|0,e/h|0,t)}function c(e,t,n){return new r(e,t,n)}r.fromInt=a,r.fromNumber=s,r.fromBits=c;var u=Math.pow;function l(e,t,r){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return y;if("number"==typeof t?(r=t,t=!1):t=!!t,(r=r||10)<2||36<r)throw RangeError("radix");var n;if((n=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return l(e.substring(1),t,r).neg();for(var o=s(u(r,8)),i=y,a=0;a<e.length;a+=8){var c=Math.min(8,e.length-a),p=parseInt(e.substring(a,a+c),r);if(c<8){var h=s(u(r,c));i=i.mul(h).add(s(p))}else i=(i=i.mul(o)).add(s(p))}return i.unsigned=t,i}function p(e,t){return"number"==typeof e?s(e,t):"string"==typeof e?l(e,t):c(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}r.fromString=l,r.fromValue=p;var h=4294967296,d=h*h,f=d/2,m=a(1<<24),y=a(0);r.ZERO=y;var g=a(0,!0);r.UZERO=g;var v=a(1);r.ONE=v;var E=a(1,!0);r.UONE=E;var _=a(-1);r.NEG_ONE=_;var T=c(-1,2147483647,!1);r.MAX_VALUE=T;var O=c(-1,-1,!0);r.MAX_UNSIGNED_VALUE=O;var R=c(0,-2147483648,!1);r.MIN_VALUE=R;var I=r.prototype;I.toInt=function(){return this.unsigned?this.low>>>0:this.low},I.toNumber=function(){return this.unsigned?(this.high>>>0)*h+(this.low>>>0):this.high*h+(this.low>>>0)},I.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(R)){var t=s(e),r=this.div(t),n=r.mul(t).sub(this);return r.toString(e)+n.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var o=s(u(e,6),this.unsigned),i=this,a="";;){var c=i.div(o),l=(i.sub(c.mul(o)).toInt()>>>0).toString(e);if((i=c).isZero())return l+a;for(;l.length<6;)l="0"+l;a=""+l+a}},I.getHighBits=function(){return this.high},I.getHighBitsUnsigned=function(){return this.high>>>0},I.getLowBits=function(){return this.low},I.getLowBitsUnsigned=function(){return this.low>>>0},I.getNumBitsAbs=function(){if(this.isNegative())return this.eq(R)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},I.isZero=function(){return 0===this.high&&0===this.low},I.eqz=I.isZero,I.isNegative=function(){return!this.unsigned&&this.high<0},I.isPositive=function(){return this.unsigned||this.high>=0},I.isOdd=function(){return 1==(1&this.low)},I.isEven=function(){return 0==(1&this.low)},I.equals=function(e){return n(e)||(e=p(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},I.eq=I.equals,I.notEquals=function(e){return!this.eq(e)},I.neq=I.notEquals,I.ne=I.notEquals,I.lessThan=function(e){return this.comp(e)<0},I.lt=I.lessThan,I.lessThanOrEqual=function(e){return this.comp(e)<=0},I.lte=I.lessThanOrEqual,I.le=I.lessThanOrEqual,I.greaterThan=function(e){return this.comp(e)>0},I.gt=I.greaterThan,I.greaterThanOrEqual=function(e){return this.comp(e)>=0},I.gte=I.greaterThanOrEqual,I.ge=I.greaterThanOrEqual,I.compare=function(e){if(n(e)||(e=p(e)),this.eq(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r?-1:!t&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},I.comp=I.compare,I.negate=function(){return!this.unsigned&&this.eq(R)?R:this.not().add(v)},I.neg=I.negate,I.add=function(e){n(e)||(e=p(e));var t=this.high>>>16,r=65535&this.high,o=this.low>>>16,i=65535&this.low,a=e.high>>>16,s=65535&e.high,u=e.low>>>16,l=0,h=0,d=0,f=0;return d+=(f+=i+(65535&e.low))>>>16,h+=(d+=o+u)>>>16,l+=(h+=r+s)>>>16,l+=t+a,c((d&=65535)<<16|(f&=65535),(l&=65535)<<16|(h&=65535),this.unsigned)},I.subtract=function(e){return n(e)||(e=p(e)),this.add(e.neg())},I.sub=I.subtract,I.multiply=function(e){if(this.isZero())return y;if(n(e)||(e=p(e)),t)return c(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return y;if(this.eq(R))return e.isOdd()?R:y;if(e.eq(R))return this.isOdd()?R:y;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(m)&&e.lt(m))return s(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,o=65535&this.high,i=this.low>>>16,a=65535&this.low,u=e.high>>>16,l=65535&e.high,h=e.low>>>16,d=65535&e.low,f=0,g=0,v=0,E=0;return v+=(E+=a*d)>>>16,g+=(v+=i*d)>>>16,v&=65535,g+=(v+=a*h)>>>16,f+=(g+=o*d)>>>16,g&=65535,f+=(g+=i*h)>>>16,g&=65535,f+=(g+=a*l)>>>16,f+=r*d+o*h+i*l+a*u,c((v&=65535)<<16|(E&=65535),(f&=65535)<<16|(g&=65535),this.unsigned)},I.mul=I.multiply,I.divide=function(e){if(n(e)||(e=p(e)),e.isZero())throw Error("division by zero");var r,o,i;if(t)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?c((this.unsigned?t.div_u:t.div_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?g:y;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return g;if(e.gt(this.shru(1)))return E;i=g}else{if(this.eq(R))return e.eq(v)||e.eq(_)?R:e.eq(R)?v:(r=this.shr(1).div(e).shl(1)).eq(y)?e.isNegative()?v:_:(o=this.sub(e.mul(r)),i=r.add(o.div(e)));if(e.eq(R))return this.unsigned?g:y;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();i=y}for(o=this;o.gte(e);){r=Math.max(1,Math.floor(o.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(r)/Math.LN2),l=a<=48?1:u(2,a-48),h=s(r),d=h.mul(e);d.isNegative()||d.gt(o);)d=(h=s(r-=l,this.unsigned)).mul(e);h.isZero()&&(h=v),i=i.add(h),o=o.sub(d)}return i},I.div=I.divide,I.modulo=function(e){return n(e)||(e=p(e)),t?c((this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},I.mod=I.modulo,I.rem=I.modulo,I.not=function(){return c(~this.low,~this.high,this.unsigned)},I.and=function(e){return n(e)||(e=p(e)),c(this.low&e.low,this.high&e.high,this.unsigned)},I.or=function(e){return n(e)||(e=p(e)),c(this.low|e.low,this.high|e.high,this.unsigned)},I.xor=function(e){return n(e)||(e=p(e)),c(this.low^e.low,this.high^e.high,this.unsigned)},I.shiftLeft=function(e){return n(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?c(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):c(0,this.low<<e-32,this.unsigned)},I.shl=I.shiftLeft,I.shiftRight=function(e){return n(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?c(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):c(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},I.shr=I.shiftRight,I.shiftRightUnsigned=function(e){if(n(e)&&(e=e.toInt()),0==(e&=63))return this;var t=this.high;return e<32?c(this.low>>>e|t<<32-e,t>>>e,this.unsigned):c(32===e?t:t>>>e-32,0,this.unsigned)},I.shru=I.shiftRightUnsigned,I.shr_u=I.shiftRightUnsigned,I.toSigned=function(){return this.unsigned?c(this.low,this.high,!1):this},I.toUnsigned=function(){return this.unsigned?this:c(this.low,this.high,!0)},I.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},I.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},I.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},r.fromBytes=function(e,t,n){return n?r.fromBytesLE(e,t):r.fromBytesBE(e,t)},r.fromBytesLE=function(e,t){return new r(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},r.fromBytesBE=function(e,t){return new r(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},453:function(e,t,r){"use strict";e.exports=r(2833)},4759:function(e){"use strict";e.exports=n;var t,r=/\/|\./;function n(e,t){r.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),n[e]=t}n("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),n("duration",{Duration:t={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),n("timestamp",{Timestamp:t}),n("empty",{Empty:{fields:{}}}),n("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),n("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}),n("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),n.get=function(e){return n[e]||null}},1622:function(e,t,r){"use strict";var n=t,o=r(8052),i=r(3218);function a(e,t,r,n){if(t.resolvedType)if(t.resolvedType instanceof o){e("switch(d%s){",n);for(var i=t.resolvedType.values,a=Object.keys(i),s=0;s<a.length;++s)t.repeated&&i[a[s]]===t.typeDefault&&e("default:"),e("case%j:",a[s])("case %i:",i[a[s]])("m%s=%j",n,i[a[s]])("break");e("}")}else e('if(typeof d%s!=="object")',n)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",n,r,n);else{var c=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":c=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,c)('else if(typeof d%s==="string")',n)("m%s=parseInt(d%s,10)",n,n)('else if(typeof d%s==="number")',n)("m%s=d%s",n,n)('else if(typeof d%s==="object")',n)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",n,n,n,c?"true":"");break;case"bytes":e('if(typeof d%s==="string")',n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s.length)",n)("m%s=d%s",n,n);break;case"string":e("m%s=String(d%s)",n,n);break;case"bool":e("m%s=Boolean(d%s)",n,n)}}return e}function s(e,t,r,n){if(t.resolvedType)t.resolvedType instanceof o?e("d%s=o.enums===String?types[%i].values[m%s]:m%s",n,r,n,n):e("d%s=types[%i].toObject(m%s,o)",n,r,n);else{var i=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",n,n,n,n);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',n)("d%s=o.longs===String?String(m%s):m%s",n,n,n)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",n,n,n,n,i?"true":"",n);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",n,n,n,n,n);break;default:e("d%s=m%s",n,n)}}return e}n.fromObject=function(e){var t=e.fieldsArray,r=i.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return r("return new this.ctor");r("var m=new this.ctor");for(var n=0;n<t.length;++n){var s=t[n].resolve(),c=i.safeProp(s.name);s.map?(r("if(d%s){",c)('if(typeof d%s!=="object")',c)("throw TypeError(%j)",s.fullName+": object expected")("m%s={}",c)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",c),a(r,s,n,c+"[ks[i]]")("}")("}")):s.repeated?(r("if(d%s){",c)("if(!Array.isArray(d%s))",c)("throw TypeError(%j)",s.fullName+": array expected")("m%s=[]",c)("for(var i=0;i<d%s.length;++i){",c),a(r,s,n,c+"[i]")("}")("}")):(s.resolvedType instanceof o||r("if(d%s!=null){",c),a(r,s,n,c),s.resolvedType instanceof o||r("}"))}return r("return m")},n.toObject=function(e){var t=e.fieldsArray.slice().sort(i.compareFieldsById);if(!t.length)return i.codegen()("return {}");for(var r=i.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),n=[],a=[],c=[],u=0;u<t.length;++u)t[u].partOf||(t[u].resolve().repeated?n:t[u].map?a:c).push(t[u]);if(n.length){for(r("if(o.arrays||o.defaults){"),u=0;u<n.length;++u)r("d%s=[]",i.safeProp(n[u].name));r("}")}if(a.length){for(r("if(o.objects||o.defaults){"),u=0;u<a.length;++u)r("d%s={}",i.safeProp(a[u].name));r("}")}if(c.length){for(r("if(o.defaults){"),u=0;u<c.length;++u){var l=c[u],p=i.safeProp(l.name);if(l.resolvedType instanceof o)r("d%s=o.enums===String?%j:%j",p,l.resolvedType.valuesById[l.typeDefault],l.typeDefault);else if(l.long)r("if(util.Long){")("var n=new util.Long(%i,%i,%j)",l.typeDefault.low,l.typeDefault.high,l.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",p)("}else")("d%s=o.longs===String?%j:%i",p,l.typeDefault.toString(),l.typeDefault.toNumber());else if(l.bytes){var h="["+Array.prototype.slice.call(l.typeDefault).join(",")+"]";r("if(o.bytes===String)d%s=%j",p,String.fromCharCode.apply(String,l.typeDefault))("else{")("d%s=%s",p,h)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",p,p)("}")}else r("d%s=%j",p,l.typeDefault)}r("}")}var d=!1;for(u=0;u<t.length;++u){l=t[u];var f=e._fieldsArray.indexOf(l);p=i.safeProp(l.name),l.map?(d||(d=!0,r("var ks2")),r("if(m%s&&(ks2=Object.keys(m%s)).length){",p,p)("d%s={}",p)("for(var j=0;j<ks2.length;++j){"),s(r,l,f,p+"[ks2[j]]")("}")):l.repeated?(r("if(m%s&&m%s.length){",p,p)("d%s=[]",p)("for(var j=0;j<m%s.length;++j){",p),s(r,l,f,p+"[j]")("}")):(r("if(m%s!=null&&m.hasOwnProperty(%j)){",p,l.name),s(r,l,f,p),l.partOf&&r("if(o.oneofs)")("d%s=%j",i.safeProp(l.partOf.name),l.name)),r("}")}return r("return d")}},4514:function(e,t,r){"use strict";e.exports=function(e){var t=i.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter((function(e){return e.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&t("if((t&7)===4)")("break"),t("switch(t>>>3){");for(var r=0;r<e.fieldsArray.length;++r){var s=e._fieldsArray[r].resolve(),c=s.resolvedType instanceof n?"int32":s.type,u="m"+i.safeProp(s.name);t("case %i:",s.id),s.map?(t("if(%s===util.emptyObject)",u)("%s={}",u)("var c2 = r.uint32()+r.pos"),void 0!==o.defaults[s.keyType]?t("k=%j",o.defaults[s.keyType]):t("k=null"),void 0!==o.defaults[c]?t("value=%j",o.defaults[c]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",s.keyType)("case 2:"),void 0===o.basic[c]?t("value=types[%i].decode(r,r.uint32())",r):t("value=r.%s()",c),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==o.long[s.keyType]?t('%s[typeof k==="object"?util.longToHash(k):k]=value',u):t("%s[k]=value",u)):s.repeated?(t("if(!(%s&&%s.length))",u,u)("%s=[]",u),void 0!==o.packed[c]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",u,c)("}else"),void 0===o.basic[c]?t(s.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",u,r):t("%s.push(r.%s())",u,c)):void 0===o.basic[c]?t(s.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",u,r):t("%s=r.%s()",u,c),t("break")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),r=0;r<e._fieldsArray.length;++r){var l=e._fieldsArray[r];l.required&&t("if(!m.hasOwnProperty(%j))",l.name)("throw util.ProtocolError(%j,{instance:m})",a(l))}return t("return m")};var n=r(8052),o=r(7767),i=r(3218);function a(e){return"missing required '"+e.name+"'"}},5701:function(e,t,r){"use strict";e.exports=function(e){for(var t,r=i.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),s=e.fieldsArray.slice().sort(i.compareFieldsById),c=0;c<s.length;++c){var u=s[c].resolve(),l=e._fieldsArray.indexOf(u),p=u.resolvedType instanceof n?"int32":u.type,h=o.basic[p];t="m"+i.safeProp(u.name),u.map?(r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,u.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(u.id<<3|2)>>>0,8|o.mapKey[u.keyType],u.keyType),void 0===h?r("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",l,t):r(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|h,p,t),r("}")("}")):u.repeated?(r("if(%s!=null&&%s.length){",t,t),u.packed&&void 0!==o.packed[p]?r("w.uint32(%i).fork()",(u.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",p,t)("w.ldelim()"):(r("for(var i=0;i<%s.length;++i)",t),void 0===h?a(r,u,l,t+"[i]"):r("w.uint32(%i).%s(%s[i])",(u.id<<3|h)>>>0,p,t)),r("}")):(u.optional&&r("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,u.name),void 0===h?a(r,u,l,t):r("w.uint32(%i).%s(%s)",(u.id<<3|h)>>>0,p,t))}return r("return w")};var n=r(8052),o=r(7767),i=r(3218);function a(e,t,r,n){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",r,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}},8052:function(e,t,r){"use strict";e.exports=a;var n=r(8059);((a.prototype=Object.create(n.prototype)).constructor=a).className="Enum";var o=r(4072),i=r(3218);function a(e,t,r,o,i){if(n.call(this,e,r),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=o,this.comments=i||{},this.reserved=void 0,t)for(var a=Object.keys(t),s=0;s<a.length;++s)"number"==typeof t[a[s]]&&(this.valuesById[this.values[a[s]]=t[a[s]]]=a[s])}a.fromJSON=function(e,t){var r=new a(e,t.values,t.options,t.comment,t.comments);return r.reserved=t.reserved,r},a.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},a.prototype.add=function(e,t,r){if(!i.isString(e))throw TypeError("name must be a string");if(!i.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return this.comments[e]=r||null,this},a.prototype.remove=function(e){if(!i.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this},a.prototype.isReservedId=function(e){return o.isReservedId(this.reserved,e)},a.prototype.isReservedName=function(e){return o.isReservedName(this.reserved,e)}},1676:function(e,t,r){"use strict";e.exports=u;var n=r(8059);((u.prototype=Object.create(n.prototype)).constructor=u).className="Field";var o,i=r(8052),a=r(7767),s=r(3218),c=/^required|optional|repeated$/;function u(e,t,r,o,i,u,l){if(s.isObject(o)?(l=i,u=o,o=i=void 0):s.isObject(i)&&(l=u,u=i,i=void 0),n.call(this,e,u),!s.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!s.isString(r))throw TypeError("type must be a string");if(void 0!==o&&!c.test(o=o.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==i&&!s.isString(i))throw TypeError("extend must be a string");"proto3_optional"===o&&(o="optional"),this.rule=o&&"optional"!==o?o:void 0,this.type=r,this.id=t,this.extend=i||void 0,this.required="required"===o,this.optional=!this.required,this.repeated="repeated"===o,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!s.Long&&void 0!==a.long[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=l}u.fromJSON=function(e,t){return new u(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(u.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),u.prototype.setOption=function(e,t,r){return"packed"===e&&(this._packed=null),n.prototype.setOption.call(this,e,t,r)},u.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return s.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},u.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=a.defaults[this.type])&&(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof o?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof i&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof i)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=s.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;s.base64.test(this.typeDefault)?s.base64.decode(this.typeDefault,e=s.newBuffer(s.base64.length(this.typeDefault)),0):s.utf8.write(this.typeDefault,e=s.newBuffer(s.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=s.emptyObject:this.repeated?this.defaultValue=s.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof o&&(this.parent.ctor.prototype[this.name]=this.defaultValue),n.prototype.resolve.call(this)},u.d=function(e,t,r,n){return"function"==typeof t?t=s.decorateType(t).name:t&&"object"==typeof t&&(t=s.decorateEnum(t).name),function(o,i){s.decorateType(o.constructor).add(new u(i,e,t,r,{default:n}))}},u._configure=function(e){o=e}},1062:function(e,t,r){"use strict";var n=e.exports=r(1585);n.build="light",n.load=function(e,t,r){return"function"==typeof t?(r=t,t=new n.Root):t||(t=new n.Root),t.load(e,r)},n.loadSync=function(e,t){return t||(t=new n.Root),t.loadSync(e)},n.encoder=r(5701),n.decoder=r(4514),n.verifier=r(7227),n.converter=r(1622),n.ReflectionObject=r(8059),n.Namespace=r(4072),n.Root=r(2393),n.Enum=r(8052),n.Type=r(3084),n.Field=r(1676),n.OneOf=r(2631),n.MapField=r(8447),n.Service=r(7484),n.Method=r(3169),n.Message=r(5192),n.wrappers=r(6599),n.types=r(7767),n.util=r(3218),n.ReflectionObject._configure(n.Root),n.Namespace._configure(n.Type,n.Service,n.Enum),n.Root._configure(n.Type),n.Field._configure(n.Type)},1585:function(e,t,r){"use strict";var n=t;function o(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=r(7168),n.BufferWriter=r(4023),n.Reader=r(3124),n.BufferReader=r(8170),n.util=r(1986),n.rpc=r(531),n.roots=r(6742),n.configure=o,o()},2833:function(e,t,r){"use strict";var n=e.exports=r(1062);n.build="full",n.tokenize=r(4993),n.parse=r(9357),n.common=r(4759),n.Root._configure(n.Type,n.parse,n.common)},8447:function(e,t,r){"use strict";e.exports=a;var n=r(1676);((a.prototype=Object.create(n.prototype)).constructor=a).className="MapField";var o=r(7767),i=r(3218);function a(e,t,r,o,a,s){if(n.call(this,e,t,o,void 0,void 0,a,s),!i.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}a.fromJSON=function(e,t){return new a(e,t.id,t.keyType,t.type,t.options,t.comment)},a.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},a.prototype.resolve=function(){if(this.resolved)return this;if(void 0===o.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return n.prototype.resolve.call(this)},a.d=function(e,t,r){return"function"==typeof r?r=i.decorateType(r).name:r&&"object"==typeof r&&(r=i.decorateEnum(r).name),function(n,o){i.decorateType(n.constructor).add(new a(o,e,t,r))}}},5192:function(e,t,r){"use strict";e.exports=o;var n=r(1986);function o(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}o.create=function(e){return this.$type.create(e)},o.encode=function(e,t){return this.$type.encode(e,t)},o.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},o.decode=function(e){return this.$type.decode(e)},o.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},o.verify=function(e){return this.$type.verify(e)},o.fromObject=function(e){return this.$type.fromObject(e)},o.toObject=function(e,t){return this.$type.toObject(e,t)},o.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},3169:function(e,t,r){"use strict";e.exports=i;var n=r(8059);((i.prototype=Object.create(n.prototype)).constructor=i).className="Method";var o=r(3218);function i(e,t,r,i,a,s,c,u,l){if(o.isObject(a)?(c=a,a=s=void 0):o.isObject(s)&&(c=s,s=void 0),void 0!==t&&!o.isString(t))throw TypeError("type must be a string");if(!o.isString(r))throw TypeError("requestType must be a string");if(!o.isString(i))throw TypeError("responseType must be a string");n.call(this,e,c),this.type=t||"rpc",this.requestType=r,this.requestStream=!!a||void 0,this.responseType=i,this.responseStream=!!s||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=u,this.parsedOptions=l}i.fromJSON=function(e,t){return new i(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])},i.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),n.prototype.resolve.call(this))}},4072:function(e,t,r){"use strict";e.exports=p;var n=r(8059);((p.prototype=Object.create(n.prototype)).constructor=p).className="Namespace";var o,i,a,s=r(1676),c=r(2631),u=r(3218);function l(e,t){if(e&&e.length){for(var r={},n=0;n<e.length;++n)r[e[n].name]=e[n].toJSON(t);return r}}function p(e,t){n.call(this,e,t),this.nested=void 0,this._nestedArray=null}function h(e){return e._nestedArray=null,e}p.fromJSON=function(e,t){return new p(e,t.options).addJSON(t.nested)},p.arrayToJSON=l,p.isReservedId=function(e,t){if(e)for(var r=0;r<e.length;++r)if("string"!=typeof e[r]&&e[r][0]<=t&&e[r][1]>t)return!0;return!1},p.isReservedName=function(e,t){if(e)for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1},Object.defineProperty(p.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=u.toArray(this.nested))}}),p.prototype.toJSON=function(e){return u.toObject(["options",this.options,"nested",l(this.nestedArray,e)])},p.prototype.addJSON=function(e){if(e)for(var t,r=Object.keys(e),n=0;n<r.length;++n)t=e[r[n]],this.add((void 0!==t.fields?o.fromJSON:void 0!==t.values?a.fromJSON:void 0!==t.methods?i.fromJSON:void 0!==t.id?s.fromJSON:p.fromJSON)(r[n],t));return this},p.prototype.get=function(e){return this.nested&&this.nested[e]||null},p.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof a)return this.nested[e].values;throw Error("no such enum: "+e)},p.prototype.add=function(e){if(!(e instanceof s&&void 0!==e.extend||e instanceof o||e instanceof a||e instanceof i||e instanceof p||e instanceof c))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof p&&e instanceof p)||t instanceof o||t instanceof i)throw Error("duplicate name '"+e.name+"' in "+this);for(var r=t.nestedArray,n=0;n<r.length;++n)e.add(r[n]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),h(this)},p.prototype.remove=function(e){if(!(e instanceof n))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),h(this)},p.prototype.define=function(e,t){if(u.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var r=this;e.length>0;){var n=e.shift();if(r.nested&&r.nested[n]){if(!((r=r.nested[n])instanceof p))throw Error("path conflicts with non-namespace objects")}else r.add(r=new p(n))}return t&&r.addJSON(t),r},p.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof p?e[t++].resolveAll():e[t++].resolve();return this.resolve()},p.prototype.lookup=function(e,t,r){if("boolean"==typeof t?(r=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),u.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),t);var n=this.get(e[0]);if(n){if(1===e.length){if(!t||t.indexOf(n.constructor)>-1)return n}else if(n instanceof p&&(n=n.lookup(e.slice(1),t,!0)))return n}else for(var o=0;o<this.nestedArray.length;++o)if(this._nestedArray[o]instanceof p&&(n=this._nestedArray[o].lookup(e,t,!0)))return n;return null===this.parent||r?null:this.parent.lookup(e,t)},p.prototype.lookupType=function(e){var t=this.lookup(e,[o]);if(!t)throw Error("no such type: "+e);return t},p.prototype.lookupEnum=function(e){var t=this.lookup(e,[a]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},p.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[o,a]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},p.prototype.lookupService=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},p._configure=function(e,t,r){o=e,i=t,a=r}},8059:function(e,t,r){"use strict";e.exports=i,i.className="ReflectionObject";var n,o=r(3218);function i(e,t){if(!o.isString(e))throw TypeError("name must be a string");if(t&&!o.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(i.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),i.prototype.toJSON=function(){throw Error()},i.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof n&&t._handleAdd(this)},i.prototype.onRemove=function(e){var t=e.root;t instanceof n&&t._handleRemove(this),this.parent=null,this.resolved=!1},i.prototype.resolve=function(){return this.resolved||this.root instanceof n&&(this.resolved=!0),this},i.prototype.getOption=function(e){if(this.options)return this.options[e]},i.prototype.setOption=function(e,t,r){return r&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},i.prototype.setParsedOption=function(e,t,r){this.parsedOptions||(this.parsedOptions=[]);var n=this.parsedOptions;if(r){var i=n.find((function(t){return Object.prototype.hasOwnProperty.call(t,e)}));if(i){var a=i[e];o.setProperty(a,r,t)}else(i={})[e]=o.setProperty({},r,t),n.push(i)}else{var s={};s[e]=t,n.push(s)}return this},i.prototype.setOptions=function(e,t){if(e)for(var r=Object.keys(e),n=0;n<r.length;++n)this.setOption(r[n],e[r[n]],t);return this},i.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},i._configure=function(e){n=e}},2631:function(e,t,r){"use strict";e.exports=a;var n=r(8059);((a.prototype=Object.create(n.prototype)).constructor=a).className="OneOf";var o=r(1676),i=r(3218);function a(e,t,r,o){if(Array.isArray(t)||(r=t,t=void 0),n.call(this,e,r),void 0!==t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=o}function s(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}a.fromJSON=function(e,t){return new a(e,t.oneof,t.options,t.comment)},a.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},a.prototype.add=function(e){if(!(e instanceof o))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,s(this),this},a.prototype.remove=function(e){if(!(e instanceof o))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),(t=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(t,1),e.partOf=null,this},a.prototype.onAdd=function(e){n.prototype.onAdd.call(this,e);for(var t=0;t<this.oneof.length;++t){var r=e.get(this.oneof[t]);r&&!r.partOf&&(r.partOf=this,this.fieldsArray.push(r))}s(this)},a.prototype.onRemove=function(e){for(var t,r=0;r<this.fieldsArray.length;++r)(t=this.fieldsArray[r]).parent&&t.parent.remove(t);n.prototype.onRemove.call(this,e)},a.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,r){i.decorateType(t.constructor).add(new a(r,e)),Object.defineProperty(t,r,{get:i.oneOfGetter(e),set:i.oneOfSetter(e)})}}},9357:function(e,t,r){"use strict";e.exports=I,I.filename=null,I.defaults={keepCase:!1};var n=r(4993),o=r(2393),i=r(3084),a=r(1676),s=r(8447),c=r(2631),u=r(8052),l=r(7484),p=r(3169),h=r(7767),d=r(3218),f=/^[1-9][0-9]*$/,m=/^-?[1-9][0-9]*$/,y=/^0[x][0-9a-fA-F]+$/,g=/^-?0[x][0-9a-fA-F]+$/,v=/^0[0-7]+$/,E=/^-?0[0-7]+$/,_=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,T=/^[a-zA-Z_][a-zA-Z_0-9]*$/,O=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,R=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function I(e,t,r){t instanceof o||(r=t,t=new o),r||(r=I.defaults);var S,b,C,A,N,w=r.preferTrailingComment||!1,M=n(e,r.alternateCommentMode||!1),k=M.next,U=M.push,x=M.peek,P=M.skip,L=M.cmnt,j=!0,D=!1,G=t,B=r.keepCase?function(e){return e}:d.camelCase;function H(e,t,r){var n=I.filename;return r||(I.filename=null),Error("illegal "+(t||"token")+" '"+e+"' ("+(n?n+", ":"")+"line "+M.line+")")}function F(){var e,t=[];do{if('"'!==(e=k())&&"'"!==e)throw H(e);t.push(k()),P(e),e=x()}while('"'===e||"'"===e);return t.join("")}function W(e){var t=k();switch(t){case"'":case'"':return U(t),F();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return function(e,t){var r=1;switch("-"===e.charAt(0)&&(r=-1,e=e.substring(1)),e){case"inf":case"INF":case"Inf":return r*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(f.test(e))return r*parseInt(e,10);if(y.test(e))return r*parseInt(e,16);if(v.test(e))return r*parseInt(e,8);if(_.test(e))return r*parseFloat(e);throw H(e,"number",!0)}(t)}catch(r){if(e&&O.test(t))return t;throw H(t,"value")}}function q(e,t){var r,n;do{!t||'"'!==(r=x())&&"'"!==r?e.push([n=Z(k()),P("to",!0)?Z(k()):n]):e.push(F())}while(P(",",!0));P(";")}function Z(e,t){switch(e){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!t&&"-"===e.charAt(0))throw H(e,"id");if(m.test(e))return parseInt(e,10);if(g.test(e))return parseInt(e,16);if(E.test(e))return parseInt(e,8);throw H(e,"id")}function K(){if(void 0!==S)throw H("package");if(S=k(),!O.test(S))throw H(S,"name");G=G.define(S),P(";")}function V(){var e,t=x();switch(t){case"weak":e=C||(C=[]),k();break;case"public":k();default:e=b||(b=[])}t=F(),P(";"),e.push(t)}function z(){if(P("="),A=F(),!(D="proto3"===A)&&"proto2"!==A)throw H(A,"syntax");P(";")}function J(e,t){switch(t){case"option":return $(e,t),P(";"),!0;case"message":return function(e,t){if(!T.test(t=k()))throw H(t,"type name");var r=new i(t);X(r,(function(e){if(!J(r,e))switch(e){case"map":!function(e){P("<");var t=k();if(void 0===h.mapKey[t])throw H(t,"type");P(",");var r=k();if(!O.test(r))throw H(r,"type");P(">");var n=k();if(!T.test(n))throw H(n,"name");P("=");var o=new s(B(n),Z(k()),t,r);X(o,(function(e){if("option"!==e)throw H(e);$(o,e),P(";")}),(function(){te(o)})),e.add(o)}(r);break;case"required":case"repeated":Y(r,e);break;case"optional":Y(r,D?"proto3_optional":"optional");break;case"oneof":!function(e,t){if(!T.test(t=k()))throw H(t,"name");var r=new c(B(t));X(r,(function(e){"option"===e?($(r,e),P(";")):(U(e),Y(r,"optional"))})),e.add(r)}(r,e);break;case"extensions":q(r.extensions||(r.extensions=[]));break;case"reserved":q(r.reserved||(r.reserved=[]),!0);break;default:if(!D||!O.test(e))throw H(e);U(e),Y(r,"optional")}})),e.add(r)}(e,t),!0;case"enum":return function(e,t){if(!T.test(t=k()))throw H(t,"name");var r=new u(t);X(r,(function(e){switch(e){case"option":$(r,e),P(";");break;case"reserved":q(r.reserved||(r.reserved=[]),!0);break;default:!function(e,t){if(!T.test(t))throw H(t,"name");P("=");var r=Z(k(),!0),n={};X(n,(function(e){if("option"!==e)throw H(e);$(n,e),P(";")}),(function(){te(n)})),e.add(t,r,n.comment)}(r,e)}})),e.add(r)}(e,t),!0;case"service":return function(e,t){if(!T.test(t=k()))throw H(t,"service name");var r=new l(t);X(r,(function(e){if(!J(r,e)){if("rpc"!==e)throw H(e);!function(e,t){var r=L(),n=t;if(!T.test(t=k()))throw H(t,"name");var o,i,a,s,c=t;if(P("("),P("stream",!0)&&(i=!0),!O.test(t=k()))throw H(t);if(o=t,P(")"),P("returns"),P("("),P("stream",!0)&&(s=!0),!O.test(t=k()))throw H(t);a=t,P(")");var u=new p(c,n,o,a,i,s);u.comment=r,X(u,(function(e){if("option"!==e)throw H(e);$(u,e),P(";")})),e.add(u)}(r,e)}})),e.add(r)}(e,t),!0;case"extend":return function(e,t){if(!O.test(t=k()))throw H(t,"reference");var r=t;X(null,(function(t){switch(t){case"required":case"repeated":Y(e,t,r);break;case"optional":Y(e,D?"proto3_optional":"optional",r);break;default:if(!D||!O.test(t))throw H(t);U(t),Y(e,"optional",r)}}))}(e,t),!0}return!1}function X(e,t,r){var n=M.line;if(e&&("string"!=typeof e.comment&&(e.comment=L()),e.filename=I.filename),P("{",!0)){for(var o;"}"!==(o=k());)t(o);P(";",!0)}else r&&r(),P(";"),e&&("string"!=typeof e.comment||w)&&(e.comment=L(n)||e.comment)}function Y(e,t,r){var n=k();if("group"!==n){if(!O.test(n))throw H(n,"type");var o=k();if(!T.test(o))throw H(o,"name");o=B(o),P("=");var s=new a(o,Z(k()),n,t,r);if(X(s,(function(e){if("option"!==e)throw H(e);$(s,e),P(";")}),(function(){te(s)})),"proto3_optional"===t){var u=new c("_"+o);s.setOption("proto3_optional",!0),u.add(s),e.add(u)}else e.add(s);D||!s.repeated||void 0===h.packed[n]&&void 0!==h.basic[n]||s.setOption("packed",!1,!0)}else!function(e,t){var r=k();if(!T.test(r))throw H(r,"name");var n=d.lcFirst(r);r===n&&(r=d.ucFirst(r)),P("=");var o=Z(k()),s=new i(r);s.group=!0;var c=new a(n,o,r,t);c.filename=I.filename,X(s,(function(e){switch(e){case"option":$(s,e),P(";");break;case"required":case"repeated":Y(s,e);break;case"optional":Y(s,D?"proto3_optional":"optional");break;default:throw H(e)}})),e.add(s).add(c)}(e,t)}function $(e,t){var r=P("(",!0);if(!O.test(t=k()))throw H(t,"name");var n,o=t,i=o;r&&(P(")"),i=o="("+o+")",t=x(),R.test(t)&&(n=t.substr(1),o+=t,k())),P("="),function(e,t,r,n){e.setParsedOption&&e.setParsedOption(t,r,n)}(e,i,Q(e,o),n)}function Q(e,t){if(P("{",!0)){for(var r={};!P("}",!0);){if(!T.test(N=k()))throw H(N,"name");var n,o=N;"{"===x()?n=Q(e,t+"."+N):(P(":"),"{"===x()?n=Q(e,t+"."+N):(n=W(!0),ee(e,t+"."+N,n)));var i=r[o];i&&(n=[].concat(i).concat(n)),r[o]=n,P(",",!0)}return r}var a=W(!0);return ee(e,t,a),a}function ee(e,t,r){e.setOption&&e.setOption(t,r)}function te(e){if(P("[",!0)){do{$(e,"option")}while(P(",",!0));P("]")}return e}for(;null!==(N=k());)switch(N){case"package":if(!j)throw H(N);K();break;case"import":if(!j)throw H(N);V();break;case"syntax":if(!j)throw H(N);z();break;case"option":$(G,N),P(";");break;default:if(J(G,N)){j=!1;continue}throw H(N)}return I.filename=null,{package:S,imports:b,weakImports:C,syntax:A,root:t}}},3124:function(e,t,r){"use strict";e.exports=c;var n,o=r(1986),i=o.LongBits,a=o.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var u,l="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},p=function(){return o.Buffer?function(e){return(c.create=function(e){return o.Buffer.isBuffer(e)?new n(e):l(e)})(e)}:l};function h(){var e=new i(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function d(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw s(this,8);return new i(d(this.buf,this.pos+=4),d(this.buf,this.pos+=4))}c.create=p(),c.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,c.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return u}),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return d(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|d(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw s(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,r):t===r?new this.buf.constructor(0):this._slice.call(this.buf,t,r)},c.prototype.string=function(){var e=this.bytes();return a.read(e,0,e.length)},c.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){n=e,c.create=p(),n._configure();var t=o.Long?"toLong":"toNumber";o.merge(c.prototype,{int64:function(){return h.call(this)[t](!1)},uint64:function(){return h.call(this)[t](!0)},sint64:function(){return h.call(this).zzDecode()[t](!1)},fixed64:function(){return f.call(this)[t](!0)},sfixed64:function(){return f.call(this)[t](!1)}})}},8170:function(e,t,r){"use strict";e.exports=i;var n=r(3124);(i.prototype=Object.create(n.prototype)).constructor=i;var o=r(1986);function i(e){n.call(this,e)}i._configure=function(){o.Buffer&&(i.prototype._slice=o.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()},2393:function(e,t,r){"use strict";e.exports=p;var n=r(4072);((p.prototype=Object.create(n.prototype)).constructor=p).className="Root";var o,i,a,s=r(1676),c=r(8052),u=r(2631),l=r(3218);function p(e){n.call(this,"",e),this.deferred=[],this.files=[]}function h(){}p.fromJSON=function(e,t){return t||(t=new p),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},p.prototype.resolvePath=l.path.resolve,p.prototype.fetch=l.fetch,p.prototype.load=function e(t,r,n){"function"==typeof r&&(n=r,r=void 0);var o=this;if(!n)return l.asPromise(e,o,t,r);var s=n===h;function c(e,t){if(n){var r=n;if(n=null,s)throw e;r(e,t)}}function u(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var r=e.substring(t);if(r in a)return r}return null}function p(e,t){try{if(l.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),l.isString(t)){i.filename=e;var n,a=i(t,o,r),p=0;if(a.imports)for(;p<a.imports.length;++p)(n=u(a.imports[p])||o.resolvePath(e,a.imports[p]))&&d(n);if(a.weakImports)for(p=0;p<a.weakImports.length;++p)(n=u(a.weakImports[p])||o.resolvePath(e,a.weakImports[p]))&&d(n,!0)}else o.setOptions(t.options).addJSON(t.nested)}catch(e){c(e)}s||f||c(null,o)}function d(e,t){if(!(o.files.indexOf(e)>-1))if(o.files.push(e),e in a)s?p(e,a[e]):(++f,setTimeout((function(){--f,p(e,a[e])})));else if(s){var r;try{r=l.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||c(e))}p(e,r)}else++f,o.fetch(e,(function(r,i){--f,n&&(r?t?f||c(null,o):c(r):p(e,i))}))}var f=0;l.isString(t)&&(t=[t]);for(var m,y=0;y<t.length;++y)(m=o.resolvePath("",t[y]))&&d(m);if(s)return o;f||c(null,o)},p.prototype.loadSync=function(e,t){if(!l.isNode)throw Error("not supported");return this.load(e,t,h)},p.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(e){return"'extend "+e.extend+"' in "+e.parent.fullName})).join(", "));return n.prototype.resolveAll.call(this)};var d=/^[A-Z]/;function f(e,t){var r=t.parent.lookup(t.extend);if(r){var n=new s(t.fullName,t.id,t.type,t.rule,void 0,t.options);return n.declaringField=t,t.extensionField=n,r.add(n),!0}return!1}p.prototype._handleAdd=function(e){if(e instanceof s)void 0===e.extend||e.extensionField||f(0,e)||this.deferred.push(e);else if(e instanceof c)d.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof u)){if(e instanceof o)for(var t=0;t<this.deferred.length;)f(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var r=0;r<e.nestedArray.length;++r)this._handleAdd(e._nestedArray[r]);d.test(e.name)&&(e.parent[e.name]=e)}},p.prototype._handleRemove=function(e){if(e instanceof s){if(void 0!==e.extend)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof c)d.test(e.name)&&delete e.parent[e.name];else if(e instanceof n){for(var r=0;r<e.nestedArray.length;++r)this._handleRemove(e._nestedArray[r]);d.test(e.name)&&delete e.parent[e.name]}},p._configure=function(e,t,r){o=e,i=t,a=r}},6742:function(e){"use strict";e.exports={}},531:function(e,t,r){"use strict";t.Service=r(9180)},9180:function(e,t,r){"use strict";e.exports=o;var n=r(1986);function o(e,t,r){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(r)}(o.prototype=Object.create(n.EventEmitter.prototype)).constructor=o,o.prototype.rpcCall=function e(t,r,o,i,a){if(!i)throw TypeError("request must be specified");var s=this;if(!a)return n.asPromise(e,s,t,r,o,i);if(s.rpcImpl)try{return s.rpcImpl(t,r[s.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(e,r){if(e)return s.emit("error",e,t),a(e);if(null!==r){if(!(r instanceof o))try{r=o[s.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return s.emit("error",e,t),a(e)}return s.emit("data",r,t),a(null,r)}s.end(!0)}))}catch(e){return s.emit("error",e,t),void setTimeout((function(){a(e)}),0)}else setTimeout((function(){a(Error("already ended"))}),0)},o.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},7484:function(e,t,r){"use strict";e.exports=s;var n=r(4072);((s.prototype=Object.create(n.prototype)).constructor=s).className="Service";var o=r(3169),i=r(3218),a=r(531);function s(e,t){n.call(this,e,t),this.methods={},this._methodsArray=null}function c(e){return e._methodsArray=null,e}s.fromJSON=function(e,t){var r=new s(e,t.options);if(t.methods)for(var n=Object.keys(t.methods),i=0;i<n.length;++i)r.add(o.fromJSON(n[i],t.methods[n[i]]));return t.nested&&r.addJSON(t.nested),r.comment=t.comment,r},s.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return i.toObject(["options",t&&t.options||void 0,"methods",n.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},Object.defineProperty(s.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=i.toArray(this.methods))}}),s.prototype.get=function(e){return this.methods[e]||n.prototype.get.call(this,e)},s.prototype.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return n.prototype.resolve.call(this)},s.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof o?(this.methods[e.name]=e,e.parent=this,c(this)):n.prototype.add.call(this,e)},s.prototype.remove=function(e){if(e instanceof o){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,c(this)}return n.prototype.remove.call(this,e)},s.prototype.create=function(e,t,r){for(var n,o=new a.Service(e,t,r),s=0;s<this.methodsArray.length;++s){var c=i.lcFirst((n=this._methodsArray[s]).resolve().name).replace(/[^$\w_]/g,"");o[c]=i.codegen(["r","c"],i.isReserved(c)?c+"_":c)("return this.rpcCall(m,q,s,r,c)")({m:n,q:n.resolvedRequestType.ctor,s:n.resolvedResponseType.ctor})}return o}},4993:function(e){"use strict";e.exports=p;var t=/[\s{}=;:[\],'"()<>]/g,r=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,n=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,o=/^ *[*/]+ */,i=/^\s*\*?\/*/,a=/\n/g,s=/\s/,c=/\\(.?)/g,u={0:"\0",r:"\r",n:"\n",t:"\t"};function l(e){return e.replace(c,(function(e,t){switch(t){case"\\":case"":return t;default:return u[t]||""}}))}function p(e,c){e=e.toString();var u=0,p=e.length,h=1,d=null,f=null,m=0,y=!1,g=!1,v=[],E=null;function _(e){return Error("illegal "+e+" (line "+h+")")}function T(t){return e.charAt(t)}function O(t,r,n){d=e.charAt(t++),m=h,y=!1,g=n;var s,u=t-(c?2:3);do{if(--u<0||"\n"===(s=e.charAt(u))){y=!0;break}}while(" "===s||"\t"===s);for(var l=e.substring(t,r).split(a),p=0;p<l.length;++p)l[p]=l[p].replace(c?i:o,"").trim();f=l.join("\n").trim()}function R(t){var r=I(t),n=e.substring(t,r);return/^\s*\/{1,2}/.test(n)}function I(e){for(var t=e;t<p&&"\n"!==T(t);)t++;return t}function S(){if(v.length>0)return v.shift();if(E)return function(){var t="'"===E?n:r;t.lastIndex=u-1;var o=t.exec(e);if(!o)throw _("string");return u=t.lastIndex,b(E),E=null,l(o[1])}();var o,i,a,d,f,m=0===u;do{if(u===p)return null;for(o=!1;s.test(a=T(u));)if("\n"===a&&(m=!0,++h),++u===p)return null;if("/"===T(u)){if(++u===p)throw _("comment");if("/"===T(u))if(c){if(d=u,f=!1,R(u)){f=!0;do{if((u=I(u))===p)break;u++}while(R(u))}else u=Math.min(p,I(u)+1);f&&O(d,u,m),h++,o=!0}else{for(f="/"===T(d=u+1);"\n"!==T(++u);)if(u===p)return null;++u,f&&O(d,u-1,m),++h,o=!0}else{if("*"!==(a=T(u)))return"/";d=u+1,f=c||"*"===T(d);do{if("\n"===a&&++h,++u===p)throw _("comment");i=a,a=T(u)}while("*"!==i||"/"!==a);++u,f&&O(d,u-2,m),o=!0}}}while(o);var y=u;if(t.lastIndex=0,!t.test(T(y++)))for(;y<p&&!t.test(T(y));)++y;var g=e.substring(u,u=y);return'"'!==g&&"'"!==g||(E=g),g}function b(e){v.push(e)}function C(){if(!v.length){var e=S();if(null===e)return null;b(e)}return v[0]}return Object.defineProperty({next:S,peek:C,push:b,skip:function(e,t){var r=C();if(r===e)return S(),!0;if(!t)throw _("token '"+r+"', '"+e+"' expected");return!1},cmnt:function(e){var t=null;return void 0===e?m===h-1&&(c||"*"===d||y)&&(t=g?f:null):(m<e&&C(),m!==e||y||!c&&"/"!==d||(t=g?null:f)),t}},"line",{get:function(){return h}})}p.unescape=l},3084:function(e,t,r){"use strict";e.exports=v;var n=r(4072);((v.prototype=Object.create(n.prototype)).constructor=v).className="Type";var o=r(8052),i=r(2631),a=r(1676),s=r(8447),c=r(7484),u=r(5192),l=r(3124),p=r(7168),h=r(3218),d=r(5701),f=r(4514),m=r(7227),y=r(1622),g=r(6599);function v(e,t){n.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function E(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(v.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],n=r.id;if(this._fieldsById[n])throw Error("duplicate id "+n+" in "+this);this._fieldsById[n]=r}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=h.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=h.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=v.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof u||((e.prototype=new u).constructor=e,h.merge(e.prototype,t)),e.$type=e.prototype.$type=this,h.merge(e,u,!0),this._ctor=e;for(var r=0;r<this.fieldsArray.length;++r)this._fieldsArray[r].resolve();var n={};for(r=0;r<this.oneofsArray.length;++r)n[this._oneofsArray[r].resolve().name]={get:h.oneOfGetter(this._oneofsArray[r].oneof),set:h.oneOfSetter(this._oneofsArray[r].oneof)};r&&Object.defineProperties(e.prototype,n)}}}),v.generateConstructor=function(e){for(var t,r=h.codegen(["p"],e.name),n=0;n<e.fieldsArray.length;++n)(t=e._fieldsArray[n]).map?r("this%s={}",h.safeProp(t.name)):t.repeated&&r("this%s=[]",h.safeProp(t.name));return r("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},v.fromJSON=function(e,t){var r=new v(e,t.options);r.extensions=t.extensions,r.reserved=t.reserved;for(var u=Object.keys(t.fields),l=0;l<u.length;++l)r.add((void 0!==t.fields[u[l]].keyType?s.fromJSON:a.fromJSON)(u[l],t.fields[u[l]]));if(t.oneofs)for(u=Object.keys(t.oneofs),l=0;l<u.length;++l)r.add(i.fromJSON(u[l],t.oneofs[u[l]]));if(t.nested)for(u=Object.keys(t.nested),l=0;l<u.length;++l){var p=t.nested[u[l]];r.add((void 0!==p.id?a.fromJSON:void 0!==p.fields?v.fromJSON:void 0!==p.values?o.fromJSON:void 0!==p.methods?c.fromJSON:n.fromJSON)(u[l],p))}return t.extensions&&t.extensions.length&&(r.extensions=t.extensions),t.reserved&&t.reserved.length&&(r.reserved=t.reserved),t.group&&(r.group=!0),t.comment&&(r.comment=t.comment),r},v.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return h.toObject(["options",t&&t.options||void 0,"oneofs",n.arrayToJSON(this.oneofsArray,e),"fields",n.arrayToJSON(this.fieldsArray.filter((function(e){return!e.declaringField})),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},v.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var r=this.oneofsArray;for(t=0;t<r.length;)r[t++].resolve();return n.prototype.resolveAll.call(this)},v.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},v.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof a&&void 0===e.extend){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),E(this)}return e instanceof i?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),E(this)):n.prototype.add.call(this,e)},v.prototype.remove=function(e){if(e instanceof a&&void 0===e.extend){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),E(this)}if(e instanceof i){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),E(this)}return n.prototype.remove.call(this,e)},v.prototype.isReservedId=function(e){return n.isReservedId(this.reserved,e)},v.prototype.isReservedName=function(e){return n.isReservedName(this.reserved,e)},v.prototype.create=function(e){return new this.ctor(e)},v.prototype.setup=function(){for(var e=this.fullName,t=[],r=0;r<this.fieldsArray.length;++r)t.push(this._fieldsArray[r].resolve().resolvedType);this.encode=d(this)({Writer:p,types:t,util:h}),this.decode=f(this)({Reader:l,types:t,util:h}),this.verify=m(this)({types:t,util:h}),this.fromObject=y.fromObject(this)({types:t,util:h}),this.toObject=y.toObject(this)({types:t,util:h});var n=g[e];if(n){var o=Object.create(this);o.fromObject=this.fromObject,this.fromObject=n.fromObject.bind(o),o.toObject=this.toObject,this.toObject=n.toObject.bind(o)}return this},v.prototype.encode=function(e,t){return this.setup().encode(e,t)},v.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},v.prototype.decode=function(e,t){return this.setup().decode(e,t)},v.prototype.decodeDelimited=function(e){return e instanceof l||(e=l.create(e)),this.decode(e,e.uint32())},v.prototype.verify=function(e){return this.setup().verify(e)},v.prototype.fromObject=function(e){return this.setup().fromObject(e)},v.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},v.d=function(e){return function(t){h.decorateType(t,e)}}},7767:function(e,t,r){"use strict";var n=t,o=r(3218),i=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function a(e,t){var r=0,n={};for(t|=0;r<e.length;)n[i[r+t]]=e[r++];return n}n.basic=a([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),n.defaults=a([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",o.emptyArray,null]),n.long=a([0,0,0,1,1],7),n.mapKey=a([0,0,0,5,5,0,0,0,1,1,0,2],2),n.packed=a([1,5,0,0,0,5,5,0,0,0,1,1,0])},3218:function(e,t,r){"use strict";var n,o,i=e.exports=r(1986),a=r(6742);i.codegen=r(4495),i.fetch=r(8551),i.path=r(7460),i.fs=i.inquire("fs"),i.toArray=function(e){if(e){for(var t=Object.keys(e),r=new Array(t.length),n=0;n<t.length;)r[n]=e[t[n++]];return r}return[]},i.toObject=function(e){for(var t={},r=0;r<e.length;){var n=e[r++],o=e[r++];void 0!==o&&(t[n]=o)}return t};var s=/\\/g,c=/"/g;i.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},i.safeProp=function(e){return!/^[$\w_]+$/.test(e)||i.isReserved(e)?'["'+e.replace(s,"\\\\").replace(c,'\\"')+'"]':"."+e},i.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var u=/_([a-z])/g;i.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(u,(function(e,t){return t.toUpperCase()}))},i.compareFieldsById=function(e,t){return e.id-t.id},i.decorateType=function(e,t){if(e.$type)return t&&e.$type.name!==t&&(i.decorateRoot.remove(e.$type),e.$type.name=t,i.decorateRoot.add(e.$type)),e.$type;n||(n=r(3084));var o=new n(t||e.name);return i.decorateRoot.add(o),o.ctor=e,Object.defineProperty(e,"$type",{value:o,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:o,enumerable:!1}),o};var l=0;i.decorateEnum=function(e){if(e.$type)return e.$type;o||(o=r(8052));var t=new o("Enum"+l++,e);return i.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t},i.setProperty=function(e,t,r){if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,r,n){var o=r.shift();if("__proto__"===o)return t;if(r.length>0)t[o]=e(t[o]||{},r,n);else{var i=t[o];i&&(n=[].concat(i).concat(n)),t[o]=n}return t}(e,t=t.split("."),r)},Object.defineProperty(i,"decorateRoot",{get:function(){return a.decorated||(a.decorated=new(r(2393)))}})},2969:function(e,t,r){"use strict";e.exports=o;var n=r(1986);function o(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=o.zero=new o(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var a=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var r=e>>>0,n=(e-r)/4294967296>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new o(r,n)},o.from=function(e){if("number"==typeof e)return o.fromNumber(e);if(n.isString(e)){if(!n.Long)return o.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new o(e.low>>>0,e.high>>>0):i},o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},o.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var s=String.prototype.charCodeAt;o.fromHash=function(e){return e===a?i:new o((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},1986:function(e,t,r){"use strict";var n=t;function o(e,t,r){for(var n=Object.keys(t),o=0;o<n.length;++o)void 0!==e[n[o]]&&r||(e[n[o]]=t[n[o]]);return e}function i(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),r&&o(this,r)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}n.asPromise=r(5317),n.base64=r(8660),n.EventEmitter=r(3745),n.float=r(9059),n.inquire=r(491),n.utf8=r(8375),n.pool=r(8601),n.LongBits=r(2969),n.isNode=Boolean(void 0!==r.g&&r.g&&r.g.process&&r.g.process.versions&&r.g.process.versions.node),n.global=n.isNode&&r.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.isset=n.isSet=function(e,t){var r=e[t];return!(null==r||!e.hasOwnProperty(t))&&("object"!=typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"==typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},n.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},n.merge=o,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=i,n.ProtocolError=i("ProtocolError"),n.oneOfGetter=function(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=1;return function(){for(var e=Object.keys(this),r=e.length-1;r>-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},n.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var e=n.Buffer;e?(n._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},n._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):n._Buffer_from=n._Buffer_allocUnsafe=null}},7227:function(e,t,r){"use strict";e.exports=function(e){var t=o.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),r={};e.oneofsArray.length&&t("var p={}");for(var n=0;n<e.fieldsArray.length;++n){var c=e._fieldsArray[n].resolve(),u="m"+o.safeProp(c.name);if(c.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",u,c.name),c.map)t("if(!util.isObject(%s))",u)("return%j",i(c,"object"))("var k=Object.keys(%s)",u)("for(var i=0;i<k.length;++i){"),s(t,c,"k[i]"),a(t,c,n,u+"[k[i]]")("}");else if(c.repeated)t("if(!Array.isArray(%s))",u)("return%j",i(c,"array"))("for(var i=0;i<%s.length;++i){",u),a(t,c,n,u+"[i]")("}");else{if(c.partOf){var l=o.safeProp(c.partOf.name);1===r[c.partOf.name]&&t("if(p%s===1)",l)("return%j",c.partOf.name+": multiple values"),r[c.partOf.name]=1,t("p%s=1",l)}a(t,c,n,u)}c.optional&&t("}")}return t("return null")};var n=r(8052),o=r(3218);function i(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function a(e,t,r,o){if(t.resolvedType)if(t.resolvedType instanceof n){e("switch(%s){",o)("default:")("return%j",i(t,"enum value"));for(var a=Object.keys(t.resolvedType.values),s=0;s<a.length;++s)e("case %i:",t.resolvedType.values[a[s]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",r,o)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",o)("return%j",i(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",o,o,o,o)("return%j",i(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',o)("return%j",i(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',o)("return%j",i(t,"boolean"));break;case"string":e("if(!util.isString(%s))",o)("return%j",i(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',o,o,o)("return%j",i(t,"buffer"))}return e}function s(e,t,r){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",r)("return%j",i(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",r)("return%j",i(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",r)("return%j",i(t,"boolean key"))}return e}},6599:function(e,t,r){"use strict";var n=t,o=r(5192);n[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),r=this.lookup(t);if(r){var n="."===e["@type"].charAt(0)?e["@type"].substr(1):e["@type"];return-1===n.indexOf("/")&&(n="/"+n),this.create({type_url:n,value:r.encode(r.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var r="",n="";if(t&&t.json&&e.type_url&&e.value){n=e.type_url.substring(e.type_url.lastIndexOf("/")+1),r=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var i=this.lookup(n);i&&(e=i.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof o){var a=e.$type.toObject(e,t);return""===r&&(r="type.googleapis.com/"),n=r+("."===e.$type.fullName[0]?e.$type.fullName.substr(1):e.$type.fullName),a["@type"]=n,a}return this.toObject(e,t)}}},7168:function(e,t,r){"use strict";e.exports=p;var n,o=r(1986),i=o.LongBits,a=o.base64,s=o.utf8;function c(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function u(){}function l(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function p(){this.len=0,this.head=new c(u,0,0),this.tail=this.head,this.states=null}var h=function(){return o.Buffer?function(){return(p.create=function(){return new n})()}:function(){return new p}};function d(e,t,r){t[r]=255&e}function f(e,t){this.len=e,this.next=void 0,this.val=t}function m(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function y(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}p.create=h(),p.alloc=function(e){return new o.Array(e)},o.Array!==Array&&(p.alloc=o.pool(p.alloc,o.Array.prototype.subarray)),p.prototype._push=function(e,t,r){return this.tail=this.tail.next=new c(e,t,r),this.len+=t,this},f.prototype=Object.create(c.prototype),f.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},p.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new f((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},p.prototype.int32=function(e){return e<0?this._push(m,10,i.fromNumber(e)):this.uint32(e)},p.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},p.prototype.uint64=function(e){var t=i.from(e);return this._push(m,t.length(),t)},p.prototype.int64=p.prototype.uint64,p.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(m,t.length(),t)},p.prototype.bool=function(e){return this._push(d,1,e?1:0)},p.prototype.fixed32=function(e){return this._push(y,4,e>>>0)},p.prototype.sfixed32=p.prototype.fixed32,p.prototype.fixed64=function(e){var t=i.from(e);return this._push(y,4,t.lo)._push(y,4,t.hi)},p.prototype.sfixed64=p.prototype.fixed64,p.prototype.float=function(e){return this._push(o.float.writeFloatLE,4,e)},p.prototype.double=function(e){return this._push(o.float.writeDoubleLE,8,e)};var g=o.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};p.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(d,1,0);if(o.isString(e)){var r=p.alloc(t=a.length(e));a.decode(e,r,0),e=r}return this.uint32(t)._push(g,t,e)},p.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t)._push(s.write,t,e):this._push(d,1,0)},p.prototype.fork=function(){return this.states=new l(this),this.head=this.tail=new c(u,0,0),this.len=0,this},p.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},p.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},p.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},p._configure=function(e){n=e,p.create=h(),n._configure()}},4023:function(e,t,r){"use strict";e.exports=i;var n=r(7168);(i.prototype=Object.create(n.prototype)).constructor=i;var o=r(1986);function i(){n.call(this)}function a(e,t,r){e.length<40?o.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}i._configure=function(){i.alloc=o._Buffer_allocUnsafe,i.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]}},i.prototype.bytes=function(e){o.isString(e)&&(e=o._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=o.Buffer.byteLength(e);return this.uint32(t),t&&this._push(a,t,e),this},i._configure()},8878:function(e,t){"use strict";var r=Object.prototype.hasOwnProperty;function n(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function o(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var n,i,a=[];for(i in"string"!=typeof t&&(t="?"),e)if(r.call(e,i)){if((n=e[i])||null!=n&&!isNaN(n)||(n=""),i=o(i),n=o(n),null===i||null===n)continue;a.push(i+"="+n)}return a.length?t+a.join("&"):""},t.parse=function(e){for(var t,r=/([^=?#&]+)=?([^&]*)/g,o={};t=r.exec(e);){var i=n(t[1]),a=n(t[2]);null===i||null===a||i in o||(o[i]=a)}return o}},1384:function(e){"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},8078:function(e,t,r){"use strict";var n=r(3683);e.exports=r(608)(n),"_sockjs_onload"in r.g&&setTimeout(r.g._sockjs_onload,1)},5014:function(e,t,r){"use strict";var n=r(2937),o=r(2789);function i(){o.call(this),this.initEvent("close",!1,!1),this.wasClean=!1,this.code=0,this.reason=""}n(i,o),e.exports=i},9622:function(e,t,r){"use strict";var n=r(2937),o=r(6393);function i(){o.call(this)}n(i,o),i.prototype.removeAllListeners=function(e){e?delete this._listeners[e]:this._listeners={}},i.prototype.once=function(e,t){var r=this,n=!1;this.on(e,(function o(){r.removeListener(e,o),n||(n=!0,t.apply(this,arguments))}))},i.prototype.emit=function(){var e=arguments[0],t=this._listeners[e];if(t){for(var r=arguments.length,n=new Array(r-1),o=1;o<r;o++)n[o-1]=arguments[o];for(var i=0;i<t.length;i++)t[i].apply(this,n)}},i.prototype.on=i.prototype.addListener=o.prototype.addEventListener,i.prototype.removeListener=o.prototype.removeEventListener,e.exports.v=i},2789:function(e){"use strict";function t(e){this.type=e}t.prototype.initEvent=function(e,t,r){return this.type=e,this.bubbles=t,this.cancelable=r,this.timeStamp=+new Date,this},t.prototype.stopPropagation=function(){},t.prototype.preventDefault=function(){},t.CAPTURING_PHASE=1,t.AT_TARGET=2,t.BUBBLING_PHASE=3,e.exports=t},6393:function(e){"use strict";function t(){this._listeners={}}t.prototype.addEventListener=function(e,t){e in this._listeners||(this._listeners[e]=[]);var r=this._listeners[e];-1===r.indexOf(t)&&(r=r.concat([t])),this._listeners[e]=r},t.prototype.removeEventListener=function(e,t){var r=this._listeners[e];if(r){var n=r.indexOf(t);-1===n||(r.length>1?this._listeners[e]=r.slice(0,n).concat(r.slice(n+1)):delete this._listeners[e])}},t.prototype.dispatchEvent=function(){var e=arguments[0],t=e.type,r=1===arguments.length?[e]:Array.apply(null,arguments);if(this["on"+t]&&this["on"+t].apply(this,r),t in this._listeners)for(var n=this._listeners[t],o=0;o<n.length;o++)n[o].apply(this,r)},e.exports=t},3385:function(e,t,r){"use strict";var n=r(2937),o=r(2789);function i(e){o.call(this),this.initEvent("message",!1,!1),this.data=e}n(i,o),e.exports=i},8809:function(e,t,r){"use strict";var n=r(8734);function o(e){this._transport=e,e.on("message",this._transportMessage.bind(this)),e.on("close",this._transportClose.bind(this))}o.prototype._transportClose=function(e,t){n.postMessage("c",JSON.stringify([e,t]))},o.prototype._transportMessage=function(e){n.postMessage("t",e)},o.prototype._send=function(e){this._transport.send(e)},o.prototype._close=function(){this._transport.close(),this._transport.removeAllListeners()},e.exports=o},317:function(e,t,r){"use strict";var n=r(1803),o=r(6831),i=r(8809),a=r(7694),s=r(8734),c=r(1637);e.exports=function(e,t){var r,u={};t.forEach((function(e){e.facadeTransport&&(u[e.facadeTransport.transportName]=e.facadeTransport)})),u[a.transportName]=a,e.bootstrap_iframe=function(){var t;s.currentWindowId=c.hash.slice(1),o.attachEvent("message",(function(o){if(o.source===parent&&(void 0===r&&(r=o.origin),o.origin===r)){var a;try{a=JSON.parse(o.data)}catch(e){return void o.data}if(a.windowId===s.currentWindowId)switch(a.type){case"s":var l;try{l=JSON.parse(a.data)}catch(e){a.data;break}var p=l[0],h=l[1],d=l[2],f=l[3];if(p!==e.version)throw new Error('Incompatible SockJS! Main site uses: "'+p+'", the iframe: "'+e.version+'".');if(!n.isOriginEqual(d,c.href)||!n.isOriginEqual(f,c.href))throw new Error("Can't connect to different domain from within an iframe. ("+c.href+", "+d+", "+f+")");t=new i(new u[h](d,f));break;case"m":t._send(a.data);break;case"c":t&&t._close(),t=null}}})),s.postMessage("s")}}},5263:function(e,t,r){"use strict";var n=r(9622).v,o=r(2937),i=r(7234);function a(e,t){n.call(this);var r=this,o=+new Date;this.xo=new t("GET",e),this.xo.once("finish",(function(e,t){var n,a;if(200===e){if(a=+new Date-o,t)try{n=JSON.parse(t)}catch(e){}i.isObject(n)||(n={})}r.emit("finish",n,a),r.removeAllListeners()}))}o(a,n),a.prototype.close=function(){this.removeAllListeners(),this.xo.close()},e.exports=a},7694:function(e,t,r){"use strict";var n=r(2937),o=r(9622).v,i=r(2458),a=r(5263);function s(e){var t=this;o.call(this),this.ir=new a(e,i),this.ir.once("finish",(function(e,r){t.ir=null,t.emit("message",JSON.stringify([e,r]))}))}n(s,o),s.transportName="iframe-info-receiver",s.prototype.close=function(){this.ir&&(this.ir.close(),this.ir=null),this.removeAllListeners()},e.exports=s},9834:function(e,t,r){"use strict";var n=r(9622).v,o=r(2937),i=r(6831),a=r(6010),s=r(7694);function c(e,t){var o=this;n.call(this);var c=function(){var r=o.ifr=new a(s.transportName,t,e);r.once("message",(function(e){if(e){var t;try{t=JSON.parse(e)}catch(e){return o.emit("finish"),void o.close()}var r=t[0],n=t[1];o.emit("finish",r,n)}o.close()})),r.once("close",(function(){o.emit("finish"),o.close()}))};r.g.document.body?c():i.attachEvent("load",c)}o(c,n),c.enabled=function(){return a.enabled()},c.prototype.close=function(){this.ifr&&this.ifr.close(),this.removeAllListeners(),this.ifr=null},e.exports=c},3639:function(e,t,r){"use strict";var n=r(9622).v,o=r(2937),i=r(1803),a=r(9150),s=r(1278),c=r(2458),u=r(9431),l=r(9834),p=r(5263);function h(e,t){var r=this;n.call(this),setTimeout((function(){r.doXhr(e,t)}),0)}o(h,n),h._getReceiver=function(e,t,r){return r.sameOrigin?new p(t,c):s.enabled?new p(t,s):a.enabled&&r.sameScheme?new p(t,a):l.enabled()?new l(e,t):new p(t,u)},h.prototype.doXhr=function(e,t){var r=this,n=i.addPath(e,"/info");this.xo=h._getReceiver(e,n,t),this.timeoutRef=setTimeout((function(){r._cleanup(!1),r.emit("finish")}),h.timeout),this.xo.once("finish",(function(e,t){r._cleanup(!0),r.emit("finish",e,t)}))},h.prototype._cleanup=function(e){clearTimeout(this.timeoutRef),this.timeoutRef=null,!e&&this.xo&&this.xo.close(),this.xo=null},h.prototype.close=function(){this.removeAllListeners(),this._cleanup(!1)},h.timeout=8e3,e.exports=h},1637:function(e,t,r){"use strict";e.exports=r.g.location||{origin:"http://localhost:80",protocol:"http:",host:"localhost",port:80,href:"http://localhost/",hash:""}},608:function(e,t,r){"use strict";r(1953);var n,o=r(2296),i=r(2937),a=r(6032),s=r(6118),c=r(1803),u=r(6831),l=r(9404),p=r(7234),h=r(6626),d=r(7254),f=r(2789),m=r(6393),y=r(1637),g=r(5014),v=r(3385),E=r(3639);function _(e,t,r){if(!(this instanceof _))return new _(e,t,r);if(arguments.length<1)throw new TypeError("Failed to construct 'SockJS: 1 argument required, but only 0 present");m.call(this),this.readyState=_.CONNECTING,this.extensions="",this.protocol="",(r=r||{}).protocols_whitelist&&d.warn("'protocols_whitelist' is DEPRECATED. Use 'transports' instead."),this._transportsWhitelist=r.transports,this._transportOptions=r.transportOptions||{},this._timeout=r.timeout||0;var n=r.sessionId||8;if("function"==typeof n)this._generateSessionId=n;else{if("number"!=typeof n)throw new TypeError("If sessionId is used in the options, it needs to be a number or a function.");this._generateSessionId=function(){return a.string(n)}}this._server=r.server||a.numberString(1e3);var i=new o(e);if(!i.host||!i.protocol)throw new SyntaxError("The URL '"+e+"' is invalid");if(i.hash)throw new SyntaxError("The URL must not contain a fragment");if("http:"!==i.protocol&&"https:"!==i.protocol)throw new SyntaxError("The URL's scheme must be either 'http:' or 'https:'. '"+i.protocol+"' is not allowed.");var s="https:"===i.protocol;if("https:"===y.protocol&&!s&&!c.isLoopbackAddr(i.hostname))throw new Error("SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS");t?Array.isArray(t)||(t=[t]):t=[];var u=t.sort();u.forEach((function(e,t){if(!e)throw new SyntaxError("The protocols entry '"+e+"' is invalid.");if(t<u.length-1&&e===u[t+1])throw new SyntaxError("The protocols entry '"+e+"' is duplicated.")}));var l=c.getOrigin(y.href);this._origin=l?l.toLowerCase():null,i.set("pathname",i.pathname.replace(/\/+$/,"")),this.url=i.href,this.url,this._urlInfo={nullOrigin:!h.hasDomain(),sameOrigin:c.isOriginEqual(this.url,y.href),sameScheme:c.isSchemeEqual(this.url,y.href)},this._ir=new E(this.url,this._urlInfo),this._ir.once("finish",this._receiveInfo.bind(this))}function T(e){return 1e3===e||e>=3e3&&e<=4999}i(_,m),_.prototype.close=function(e,t){if(e&&!T(e))throw new Error("InvalidAccessError: Invalid code");if(t&&t.length>123)throw new SyntaxError("reason argument has an invalid length");this.readyState!==_.CLOSING&&this.readyState!==_.CLOSED&&this._close(e||1e3,t||"Normal closure",!0)},_.prototype.send=function(e){if("string"!=typeof e&&(e=""+e),this.readyState===_.CONNECTING)throw new Error("InvalidStateError: The connection has not been established yet");this.readyState===_.OPEN&&this._transport.send(s.quote(e))},_.version=r(9534),_.CONNECTING=0,_.OPEN=1,_.CLOSING=2,_.CLOSED=3,_.prototype._receiveInfo=function(e,t){if(this._ir=null,e){this._rto=this.countRTO(t),this._transUrl=e.base_url?e.base_url:this.url,e=p.extend(e,this._urlInfo);var r=n.filterToEnabled(this._transportsWhitelist,e);this._transports=r.main,this._transports.length,this._connect()}else this._close(1002,"Cannot connect to server")},_.prototype._connect=function(){for(var e=this._transports.shift();e;e=this._transports.shift()){if(e.transportName,e.needBody&&(!r.g.document.body||void 0!==r.g.document.readyState&&"complete"!==r.g.document.readyState&&"interactive"!==r.g.document.readyState))return this._transports.unshift(e),void u.attachEvent("load",this._connect.bind(this));var t=Math.max(this._timeout,this._rto*e.roundTrips||5e3);this._transportTimeoutId=setTimeout(this._transportTimeout.bind(this),t);var n=c.addPath(this._transUrl,"/"+this._server+"/"+this._generateSessionId()),o=this._transportOptions[e.transportName],i=new e(n,this._transUrl,o);return i.on("message",this._transportMessage.bind(this)),i.once("close",this._transportClose.bind(this)),i.transportName=e.transportName,void(this._transport=i)}this._close(2e3,"All transports failed",!1)},_.prototype._transportTimeout=function(){this.readyState===_.CONNECTING&&(this._transport&&this._transport.close(),this._transportClose(2007,"Transport timed out"))},_.prototype._transportMessage=function(e){var t,r=this,n=e.slice(0,1),o=e.slice(1);switch(n){case"o":return void this._open();case"h":return this.dispatchEvent(new f("heartbeat")),void this.transport}if(o)try{t=JSON.parse(o)}catch(e){}if(void 0!==t)switch(n){case"a":Array.isArray(t)&&t.forEach((function(e){r.transport,r.dispatchEvent(new v(e))}));break;case"m":this.transport,this.dispatchEvent(new v(t));break;case"c":Array.isArray(t)&&2===t.length&&this._close(t[0],t[1],!0)}},_.prototype._transportClose=function(e,t){this.transport,this._transport&&(this._transport.removeAllListeners(),this._transport=null,this.transport=null),T(e)||2e3===e||this.readyState!==_.CONNECTING?this._close(e,t):this._connect()},_.prototype._open=function(){this._transport&&this._transport.transportName,this.readyState,this.readyState===_.CONNECTING?(this._transportTimeoutId&&(clearTimeout(this._transportTimeoutId),this._transportTimeoutId=null),this.readyState=_.OPEN,this.transport=this._transport.transportName,this.dispatchEvent(new f("open")),this.transport):this._close(1006,"Server lost session")},_.prototype._close=function(e,t,r){this.transport,this.readyState;var n=!1;if(this._ir&&(n=!0,this._ir.close(),this._ir=null),this._transport&&(this._transport.close(),this._transport=null,this.transport=null),this.readyState===_.CLOSED)throw new Error("InvalidStateError: SockJS has already been closed");this.readyState=_.CLOSING,setTimeout(function(){this.readyState=_.CLOSED,n&&this.dispatchEvent(new f("error"));var o=new g("close");o.wasClean=r||!1,o.code=e||1e3,o.reason=t,this.dispatchEvent(o),this.onmessage=this.onclose=this.onerror=null}.bind(this),0)},_.prototype.countRTO=function(e){return e>100?4*e:300+e},e.exports=function(e){return n=l(e),r(317)(_,e),_}},1953:function(){"use strict";var e,t=Array.prototype,r=Object.prototype,n=Function.prototype,o=String.prototype,i=t.slice,a=r.toString,s=function(e){return"[object Function]"===r.toString.call(e)},c=function(e){return"[object String]"===a.call(e)},u=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(e){return!1}}();e=u?function(e,t,r,n){!n&&t in e||Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:r})}:function(e,t,r,n){!n&&t in e||(e[t]=r)};var l=function(t,n,o){for(var i in n)r.hasOwnProperty.call(n,i)&&e(t,i,n[i],o)},p=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)};function h(e){var t=+e;return t!=t?t=0:0!==t&&t!==1/0&&t!==-1/0&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t}function d(){}l(n,{bind:function(e){var t=this;if(!s(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var r=i.call(arguments,1),n=function(){if(this instanceof u){var n=t.apply(this,r.concat(i.call(arguments)));return Object(n)===n?n:this}return t.apply(e,r.concat(i.call(arguments)))},o=Math.max(0,t.length-r.length),a=[],c=0;c<o;c++)a.push("$"+c);var u=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this, arguments); }")(n);return t.prototype&&(d.prototype=t.prototype,u.prototype=new d,d.prototype=null),u}}),l(Array,{isArray:function(e){return"[object Array]"===a.call(e)}});var f,m,y,g=Object("a"),v="a"!==g[0]||!(0 in g);l(t,{forEach:function(e){var t=p(this),r=v&&c(this)?this.split(""):t,n=arguments[1],o=-1,i=r.length>>>0;if(!s(e))throw new TypeError;for(;++o<i;)o in r&&e.call(n,r[o],o,t)}},(f=t.forEach,m=!0,y=!0,f&&(f.call("foo",(function(e,t,r){"object"!=typeof r&&(m=!1)})),f.call([1],(function(){y="string"==typeof this}),"x")),!(f&&m&&y)));var E=Array.prototype.indexOf&&-1!==[0,1].indexOf(1,2);l(t,{indexOf:function(e){var t=v&&c(this)?this.split(""):p(this),r=t.length>>>0;if(!r)return-1;var n=0;for(arguments.length>1&&(n=h(arguments[1])),n=n>=0?n:Math.max(0,r+n);n<r;n++)if(n in t&&t[n]===e)return n;return-1}},E);var _,T=o.split;2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?(_=void 0===/()??/.exec("")[1],o.split=function(e,r){var n=this;if(void 0===e&&0===r)return[];if("[object RegExp]"!==a.call(e))return T.call(this,e,r);var o,i,s,c,u=[],l=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":""),p=0;for(e=new RegExp(e.source,l+"g"),n+="",_||(o=new RegExp("^"+e.source+"$(?!\\s)",l)),r=void 0===r?-1>>>0:r>>>0;(i=e.exec(n))&&!((s=i.index+i[0].length)>p&&(u.push(n.slice(p,i.index)),!_&&i.length>1&&i[0].replace(o,(function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(i[e]=void 0)})),i.length>1&&i.index<n.length&&t.push.apply(u,i.slice(1)),c=i[0].length,p=s,u.length>=r));)e.lastIndex===i.index&&e.lastIndex++;return p===n.length?!c&&e.test("")||u.push(""):u.push(n.slice(p)),u.length>r?u.slice(0,r):u}):"0".split(void 0,0).length&&(o.split=function(e,t){return void 0===e&&0===t?[]:T.call(this,e,t)});var O=o.substr;l(o,{substr:function(e,t){return O.call(this,e<0&&(e=this.length+e)<0?0:e,t)}},"".substr&&"b"!=="0b".substr(-1))},3683:function(e,t,r){"use strict";e.exports=[r(9712),r(8690),r(3358),r(8213),r(4930)(r(8213)),r(651),r(4930)(r(651)),r(3900),r(6685),r(4930)(r(3900)),r(7911)]},771:function(e,t,r){"use strict";var n=r(9622).v,o=r(2937),i=r(6831),a=r(1803),s=r.g.XMLHttpRequest;function c(e,t,r,o){var i=this;n.call(this),setTimeout((function(){i._start(e,t,r,o)}),0)}o(c,n),c.prototype._start=function(e,t,r,n){var o=this;try{this.xhr=new s}catch(e){}if(!this.xhr)return this.emit("finish",0,"no xhr support"),void this._cleanup();t=a.addQuery(t,"t="+ +new Date),this.unloadRef=i.unloadAdd((function(){o._cleanup(!0)}));try{this.xhr.open(e,t,!0),this.timeout&&"timeout"in this.xhr&&(this.xhr.timeout=this.timeout,this.xhr.ontimeout=function(){o.emit("finish",0,""),o._cleanup(!1)})}catch(e){return this.emit("finish",0,""),void this._cleanup(!1)}if(n&&n.noCredentials||!c.supportsCORS||(this.xhr.withCredentials=!0),n&&n.headers)for(var u in n.headers)this.xhr.setRequestHeader(u,n.headers[u]);this.xhr.onreadystatechange=function(){if(o.xhr){var e,t,r=o.xhr;switch(r.readyState,r.readyState){case 3:try{t=r.status,e=r.responseText}catch(e){}1223===t&&(t=204),200===t&&e&&e.length>0&&o.emit("chunk",t,e);break;case 4:1223===(t=r.status)&&(t=204),12005!==t&&12029!==t||(t=0),r.responseText,o.emit("finish",t,r.responseText),o._cleanup(!1)}}};try{o.xhr.send(r)}catch(e){o.emit("finish",0,""),o._cleanup(!1)}},c.prototype._cleanup=function(e){if(this.xhr){if(this.removeAllListeners(),i.unloadDel(this.unloadRef),this.xhr.onreadystatechange=function(){},this.xhr.ontimeout&&(this.xhr.ontimeout=null),e)try{this.xhr.abort()}catch(e){}this.unloadRef=this.xhr=null}},c.prototype.close=function(){this._cleanup(!0)},c.enabled=!!s;var u=["Active"].concat("Object").join("X");!c.enabled&&u in r.g&&(s=function(){try{return new r.g[u]("Microsoft.XMLHTTP")}catch(e){return null}},c.enabled=!!new s);var l=!1;try{l="withCredentials"in new s}catch(e){}c.supportsCORS=l,e.exports=c},1494:function(e,t,r){e.exports=r.g.EventSource},3485:function(e,t,r){"use strict";var n=r.g.WebSocket||r.g.MozWebSocket;e.exports=n?function(e){return new n(e)}:void 0},8213:function(e,t,r){"use strict";var n=r(2937),o=r(2261),i=r(5765),a=r(1278),s=r(1494);function c(e){if(!c.enabled())throw new Error("Transport created when disabled");o.call(this,e,"/eventsource",i,a)}n(c,o),c.enabled=function(){return!!s},c.transportName="eventsource",c.roundTrips=2,e.exports=c},651:function(e,t,r){"use strict";var n=r(2937),o=r(6119),i=r(2458),a=r(2261);function s(e){if(!o.enabled)throw new Error("Transport created when disabled");a.call(this,e,"/htmlfile",o,i)}n(s,a),s.enabled=function(e){return o.enabled&&e.sameOrigin},s.transportName="htmlfile",s.roundTrips=2,e.exports=s},6010:function(e,t,r){"use strict";var n=r(2937),o=r(9622).v,i=r(9534),a=r(1803),s=r(8734),c=r(6831),u=r(6032);function l(e,t,r){if(!l.enabled())throw new Error("Transport created when disabled");o.call(this);var n=this;this.origin=a.getOrigin(r),this.baseUrl=r,this.transUrl=t,this.transport=e,this.windowId=u.string(8);var i=a.addPath(r,"/iframe.html")+"#"+this.windowId;this.iframeObj=s.createIframe(i,(function(e){n.emit("close",1006,"Unable to load an iframe ("+e+")"),n.close()})),this.onmessageCallback=this._message.bind(this),c.attachEvent("message",this.onmessageCallback)}n(l,o),l.prototype.close=function(){if(this.removeAllListeners(),this.iframeObj){c.detachEvent("message",this.onmessageCallback);try{this.postMessage("c")}catch(e){}this.iframeObj.cleanup(),this.iframeObj=null,this.onmessageCallback=this.iframeObj=null}},l.prototype._message=function(e){if(e.data,!a.isOriginEqual(e.origin,this.origin))return e.origin,void this.origin;var t;try{t=JSON.parse(e.data)}catch(t){return void e.data}if(t.windowId!==this.windowId)return t.windowId,void this.windowId;switch(t.type){case"s":this.iframeObj.loaded(),this.postMessage("s",JSON.stringify([i,this.transport,this.transUrl,this.baseUrl]));break;case"t":this.emit("message",t.data);break;case"c":var r;try{r=JSON.parse(t.data)}catch(e){return void t.data}this.emit("close",r[0],r[1]),this.close()}},l.prototype.postMessage=function(e,t){this.iframeObj.post(JSON.stringify({windowId:this.windowId,type:e,data:t||""}),this.origin)},l.prototype.send=function(e){this.postMessage("m",e)},l.enabled=function(){return s.iframeEnabled},l.transportName="iframe",l.roundTrips=2,e.exports=l},7911:function(e,t,r){"use strict";var n=r(2937),o=r(4430),i=r(8003),a=r(605);function s(e){if(!s.enabled())throw new Error("Transport created when disabled");o.call(this,e,"/jsonp",a,i)}n(s,o),s.enabled=function(){return!!r.g.document},s.transportName="jsonp-polling",s.roundTrips=1,s.needBody=!0,e.exports=s},2261:function(e,t,r){"use strict";var n=r(2937),o=r(1803),i=r(4430);function a(e,t,r,n){i.call(this,e,t,function(e){return function(t,r,n){var i={};"string"==typeof r&&(i.headers={"Content-type":"text/plain"});var a=o.addPath(t,"/xhr_send"),s=new e("POST",a,r,i);return s.once("finish",(function(e){if(s=null,200!==e&&204!==e)return n(new Error("http status "+e));n()})),function(){s.close(),s=null;var e=new Error("Aborted");e.code=1e3,n(e)}}}(n),r,n)}n(a,i),e.exports=a},3626:function(e,t,r){"use strict";var n=r(2937),o=r(9622).v;function i(e,t){o.call(this),this.sendBuffer=[],this.sender=t,this.url=e}n(i,o),i.prototype.send=function(e){this.sendBuffer.push(e),this.sendStop||this.sendSchedule()},i.prototype.sendScheduleWait=function(){var e,t=this;this.sendStop=function(){t.sendStop=null,clearTimeout(e)},e=setTimeout((function(){t.sendStop=null,t.sendSchedule()}),25)},i.prototype.sendSchedule=function(){this.sendBuffer.length;var e=this;if(this.sendBuffer.length>0){var t="["+this.sendBuffer.join(",")+"]";this.sendStop=this.sender(this.url,t,(function(t){e.sendStop=null,t?(e.emit("close",t.code||1006,"Sending error: "+t),e.close()):e.sendScheduleWait()})),this.sendBuffer=[]}},i.prototype._cleanup=function(){this.removeAllListeners()},i.prototype.close=function(){this._cleanup(),this.sendStop&&(this.sendStop(),this.sendStop=null)},e.exports=i},4930:function(e,t,r){"use strict";var n=r(2937),o=r(6010),i=r(7234);e.exports=function(e){function t(t,r){o.call(this,e.transportName,t,r)}return n(t,o),t.enabled=function(t,n){if(!r.g.document)return!1;var a=i.extend({},n);return a.sameOrigin=!0,e.enabled(a)&&o.enabled()},t.transportName="iframe-"+e.transportName,t.needBody=!0,t.roundTrips=o.roundTrips+e.roundTrips-1,t.facadeTransport=e,t}},4408:function(e,t,r){"use strict";var n=r(2937),o=r(9622).v;function i(e,t,r){o.call(this),this.Receiver=e,this.receiveUrl=t,this.AjaxObject=r,this._scheduleReceiver()}n(i,o),i.prototype._scheduleReceiver=function(){var e=this,t=this.poll=new this.Receiver(this.receiveUrl,this.AjaxObject);t.on("message",(function(t){e.emit("message",t)})),t.once("close",(function(r,n){e.pollIsClosing,e.poll=t=null,e.pollIsClosing||("network"===n?e._scheduleReceiver():(e.emit("close",r||1006,n),e.removeAllListeners()))}))},i.prototype.abort=function(){this.removeAllListeners(),this.pollIsClosing=!0,this.poll&&this.poll.abort()},e.exports=i},4430:function(e,t,r){"use strict";var n=r(2937),o=r(1803),i=r(3626),a=r(4408);function s(e,t,r,n,s){var c=o.addPath(e,t),u=this;i.call(this,e,r),this.poll=new a(n,c,s),this.poll.on("message",(function(e){u.emit("message",e)})),this.poll.once("close",(function(e,t){u.poll=null,u.emit("close",e,t),u.close()}))}n(s,i),s.prototype.close=function(){i.prototype.close.call(this),this.removeAllListeners(),this.poll&&(this.poll.abort(),this.poll=null)},e.exports=s},5765:function(e,t,r){"use strict";var n=r(2937),o=r(9622).v,i=r(1494);function a(e){o.call(this);var t=this,r=this.es=new i(e);r.onmessage=function(e){e.data,t.emit("message",decodeURI(e.data))},r.onerror=function(e){r.readyState;var n=2!==r.readyState?"network":"permanent";t._cleanup(),t._close(n)}}n(a,o),a.prototype.abort=function(){this._cleanup(),this._close("user")},a.prototype._cleanup=function(){var e=this.es;e&&(e.onmessage=e.onerror=null,e.close(),this.es=null)},a.prototype._close=function(e){var t=this;setTimeout((function(){t.emit("close",null,e),t.removeAllListeners()}),200)},e.exports=a},6119:function(e,t,r){"use strict";var n=r(2937),o=r(8734),i=r(1803),a=r(9622).v,s=r(6032);function c(e){a.call(this);var t=this;o.polluteGlobalNamespace(),this.id="a"+s.string(6),e=i.addQuery(e,"c="+decodeURIComponent(o.WPrefix+"."+this.id)),c.htmlfileEnabled;var n=c.htmlfileEnabled?o.createHtmlfile:o.createIframe;r.g[o.WPrefix][this.id]={start:function(){t.iframeObj.loaded()},message:function(e){t.emit("message",e)},stop:function(){t._cleanup(),t._close("network")}},this.iframeObj=n(e,(function(){t._cleanup(),t._close("permanent")}))}n(c,a),c.prototype.abort=function(){this._cleanup(),this._close("user")},c.prototype._cleanup=function(){this.iframeObj&&(this.iframeObj.cleanup(),this.iframeObj=null),delete r.g[o.WPrefix][this.id]},c.prototype._close=function(e){this.emit("close",null,e),this.removeAllListeners()},c.htmlfileEnabled=!1;var u=["Active"].concat("Object").join("X");if(u in r.g)try{c.htmlfileEnabled=!!new r.g[u]("htmlfile")}catch(e){}c.enabled=c.htmlfileEnabled||o.iframeEnabled,e.exports=c},8003:function(e,t,r){"use strict";var n=r(8734),o=r(6032),i=r(6626),a=r(1803),s=r(2937),c=r(9622).v;function u(e){var t=this;c.call(this),n.polluteGlobalNamespace(),this.id="a"+o.string(6);var i=a.addQuery(e,"c="+encodeURIComponent(n.WPrefix+"."+this.id));r.g[n.WPrefix][this.id]=this._callback.bind(this),this._createScript(i),this.timeoutId=setTimeout((function(){t._abort(new Error("JSONP script loaded abnormally (timeout)"))}),u.timeout)}s(u,c),u.prototype.abort=function(){if(r.g[n.WPrefix][this.id]){var e=new Error("JSONP user aborted read");e.code=1e3,this._abort(e)}},u.timeout=35e3,u.scriptErrorTimeout=1e3,u.prototype._callback=function(e){this._cleanup(),this.aborting||(e&&this.emit("message",e),this.emit("close",null,"network"),this.removeAllListeners())},u.prototype._abort=function(e){this._cleanup(),this.aborting=!0,this.emit("close",e.code,e.message),this.removeAllListeners()},u.prototype._cleanup=function(){if(clearTimeout(this.timeoutId),this.script2&&(this.script2.parentNode.removeChild(this.script2),this.script2=null),this.script){var e=this.script;e.parentNode.removeChild(e),e.onreadystatechange=e.onerror=e.onload=e.onclick=null,this.script=null}delete r.g[n.WPrefix][this.id]},u.prototype._scriptError=function(){var e=this;this.errorTimer||(this.errorTimer=setTimeout((function(){e.loadedOkay||e._abort(new Error("JSONP script loaded abnormally (onerror)"))}),u.scriptErrorTimeout))},u.prototype._createScript=function(e){var t,n=this,a=this.script=r.g.document.createElement("script");if(a.id="a"+o.string(8),a.src=e,a.type="text/javascript",a.charset="UTF-8",a.onerror=this._scriptError.bind(this),a.onload=function(){n._abort(new Error("JSONP script loaded abnormally (onload)"))},a.onreadystatechange=function(){if(a.readyState,/loaded|closed/.test(a.readyState)){if(a&&a.htmlFor&&a.onclick){n.loadedOkay=!0;try{a.onclick()}catch(e){}}a&&n._abort(new Error("JSONP script loaded abnormally (onreadystatechange)"))}},void 0===a.async&&r.g.document.attachEvent)if(i.isOpera())(t=this.script2=r.g.document.createElement("script")).text="try{var a = document.getElementById('"+a.id+"'); if(a)a.onerror();}catch(x){};",a.async=t.async=!1;else{try{a.htmlFor=a.id,a.event="onclick"}catch(e){}a.async=!0}void 0!==a.async&&(a.async=!0);var s=r.g.document.getElementsByTagName("head")[0];s.insertBefore(a,s.firstChild),t&&s.insertBefore(t,s.firstChild)},e.exports=u},6960:function(e,t,r){"use strict";var n=r(2937),o=r(9622).v;function i(e,t){o.call(this);var r=this;this.bufferPosition=0,this.xo=new t("POST",e,null),this.xo.on("chunk",this._chunkHandler.bind(this)),this.xo.once("finish",(function(e,t){r._chunkHandler(e,t),r.xo=null;var n=200===e?"network":"permanent";r.emit("close",null,n),r._cleanup()}))}n(i,o),i.prototype._chunkHandler=function(e,t){if(200===e&&t)for(var r=-1;;this.bufferPosition+=r+1){var n=t.slice(this.bufferPosition);if(-1===(r=n.indexOf("\n")))break;var o=n.slice(0,r);o&&this.emit("message",o)}},i.prototype._cleanup=function(){this.removeAllListeners()},i.prototype.abort=function(){this.xo&&(this.xo.close(),this.emit("close",null,"user"),this.xo=null),this._cleanup()},e.exports=i},605:function(e,t,r){"use strict";var n,o,i=r(6032),a=r(1803);e.exports=function(e,t,s){n||((n=r.g.document.createElement("form")).style.display="none",n.style.position="absolute",n.method="POST",n.enctype="application/x-www-form-urlencoded",n.acceptCharset="UTF-8",(o=r.g.document.createElement("textarea")).name="d",n.appendChild(o),r.g.document.body.appendChild(n));var c="a"+i.string(8);n.target=c,n.action=a.addQuery(a.addPath(e,"/jsonp_send"),"i="+c);var u=function(e){try{return r.g.document.createElement('<iframe name="'+e+'">')}catch(n){var t=r.g.document.createElement("iframe");return t.name=e,t}}(c);u.id=c,u.style.display="none",n.appendChild(u);try{o.value=t}catch(e){}n.submit();var l=function(e){u.onerror&&(u.onreadystatechange=u.onerror=u.onload=null,setTimeout((function(){u.parentNode.removeChild(u),u=null}),500),o.value="",s(e))};return u.onerror=function(){l()},u.onload=function(){l()},u.onreadystatechange=function(e){u.readyState,"complete"===u.readyState&&l()},function(){l(new Error("Aborted"))}}},9150:function(e,t,r){"use strict";var n=r(9622).v,o=r(2937),i=r(6831),a=r(6626),s=r(1803);function c(e,t,r){var o=this;n.call(this),setTimeout((function(){o._start(e,t,r)}),0)}o(c,n),c.prototype._start=function(e,t,n){var o=this,a=new r.g.XDomainRequest;t=s.addQuery(t,"t="+ +new Date),a.onerror=function(){o._error()},a.ontimeout=function(){o._error()},a.onprogress=function(){a.responseText,o.emit("chunk",200,a.responseText)},a.onload=function(){o.emit("finish",200,a.responseText),o._cleanup(!1)},this.xdr=a,this.unloadRef=i.unloadAdd((function(){o._cleanup(!0)}));try{this.xdr.open(e,t),this.timeout&&(this.xdr.timeout=this.timeout),this.xdr.send(n)}catch(e){this._error()}},c.prototype._error=function(){this.emit("finish",0,""),this._cleanup(!1)},c.prototype._cleanup=function(e){if(this.xdr){if(this.removeAllListeners(),i.unloadDel(this.unloadRef),this.xdr.ontimeout=this.xdr.onerror=this.xdr.onprogress=this.xdr.onload=null,e)try{this.xdr.abort()}catch(e){}this.unloadRef=this.xdr=null}},c.prototype.close=function(){this._cleanup(!0)},c.enabled=!(!r.g.XDomainRequest||!a.hasDomain()),e.exports=c},1278:function(e,t,r){"use strict";var n=r(2937),o=r(771);function i(e,t,r,n){o.call(this,e,t,r,n)}n(i,o),i.enabled=o.enabled&&o.supportsCORS,e.exports=i},9431:function(e,t,r){"use strict";var n=r(9622).v;function o(){var e=this;n.call(this),this.to=setTimeout((function(){e.emit("finish",200,"{}")}),o.timeout)}r(2937)(o,n),o.prototype.close=function(){clearTimeout(this.to)},o.timeout=2e3,e.exports=o},2458:function(e,t,r){"use strict";var n=r(2937),o=r(771);function i(e,t,r){o.call(this,e,t,r,{noCredentials:!0})}n(i,o),i.enabled=o.enabled,e.exports=i},9712:function(e,t,r){"use strict";var n=r(6831),o=r(1803),i=r(2937),a=r(9622).v,s=r(3485);function c(e,t,r){if(!c.enabled())throw new Error("Transport created when disabled");a.call(this);var i=this,u=o.addPath(e,"/websocket");u="https"===u.slice(0,5)?"wss"+u.slice(5):"ws"+u.slice(4),this.url=u,this.ws=new s(this.url,[],r),this.ws.onmessage=function(e){e.data,i.emit("message",e.data)},this.unloadRef=n.unloadAdd((function(){i.ws.close()})),this.ws.onclose=function(e){e.code,e.reason,i.emit("close",e.code,e.reason),i._cleanup()},this.ws.onerror=function(e){i.emit("close",1006,"WebSocket connection broken"),i._cleanup()}}i(c,a),c.prototype.send=function(e){var t="["+e+"]";this.ws.send(t)},c.prototype.close=function(){var e=this.ws;this._cleanup(),e&&e.close()},c.prototype._cleanup=function(){var e=this.ws;e&&(e.onmessage=e.onclose=e.onerror=null),n.unloadDel(this.unloadRef),this.unloadRef=this.ws=null,this.removeAllListeners()},c.enabled=function(){return!!s},c.transportName="websocket",c.roundTrips=2,e.exports=c},6685:function(e,t,r){"use strict";var n=r(2937),o=r(2261),i=r(3358),a=r(6960),s=r(9150);function c(e){if(!s.enabled)throw new Error("Transport created when disabled");o.call(this,e,"/xhr",a,s)}n(c,o),c.enabled=i.enabled,c.transportName="xdr-polling",c.roundTrips=2,e.exports=c},3358:function(e,t,r){"use strict";var n=r(2937),o=r(2261),i=r(6960),a=r(9150);function s(e){if(!a.enabled)throw new Error("Transport created when disabled");o.call(this,e,"/xhr_streaming",i,a)}n(s,o),s.enabled=function(e){return!e.cookie_needed&&!e.nullOrigin&&a.enabled&&e.sameScheme},s.transportName="xdr-streaming",s.roundTrips=2,e.exports=s},3900:function(e,t,r){"use strict";var n=r(2937),o=r(2261),i=r(6960),a=r(1278),s=r(2458);function c(e){if(!s.enabled&&!a.enabled)throw new Error("Transport created when disabled");o.call(this,e,"/xhr",i,a)}n(c,o),c.enabled=function(e){return!e.nullOrigin&&(!(!s.enabled||!e.sameOrigin)||a.enabled)},c.transportName="xhr-polling",c.roundTrips=2,e.exports=c},8690:function(e,t,r){"use strict";var n=r(2937),o=r(2261),i=r(6960),a=r(1278),s=r(2458),c=r(6626);function u(e){if(!s.enabled&&!a.enabled)throw new Error("Transport created when disabled");o.call(this,e,"/xhr_streaming",i,a)}n(u,o),u.enabled=function(e){return!e.nullOrigin&&!c.isOpera()&&a.enabled},u.transportName="xhr-streaming",u.roundTrips=2,u.needBody=!!r.g.document,e.exports=u},971:function(e,t,r){"use strict";r.g.crypto&&r.g.crypto.getRandomValues?e.exports.randomBytes=function(e){var t=new Uint8Array(e);return r.g.crypto.getRandomValues(t),t}:e.exports.randomBytes=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=Math.floor(256*Math.random());return t}},6626:function(e,t,r){"use strict";e.exports={isOpera:function(){return r.g.navigator&&/opera/i.test(r.g.navigator.userAgent)},isKonqueror:function(){return r.g.navigator&&/konqueror/i.test(r.g.navigator.userAgent)},hasDomain:function(){if(!r.g.document)return!0;try{return!!r.g.document.domain}catch(e){return!1}}}},6118:function(e){"use strict";var t,r=/[\x00-\x1f\ud800-\udfff\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0b5c-\u0b5d\u0e38-\u0e39\u0f43\u0f4d\u0f52\u0f57\u0f5c\u0f69\u0f72-\u0f76\u0f78\u0f80-\u0f83\u0f93\u0f9d\u0fa2\u0fa7\u0fac\u0fb9\u1939-\u193a\u1a17\u1b6b\u1cda-\u1cdb\u1dc0-\u1dcf\u1dfc\u1dfe\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d\u1fbb\u1fbe\u1fc9\u1fcb\u1fd3\u1fdb\u1fe3\u1feb\u1fee-\u1fef\u1ff9\u1ffb\u1ffd\u2000-\u2001\u20d0-\u20d1\u20d4-\u20d7\u20e7-\u20e9\u2126\u212a-\u212b\u2329-\u232a\u2adc\u302b-\u302c\uaab2-\uaab3\uf900-\ufa0d\ufa10\ufa12\ufa15-\ufa1e\ufa20\ufa22\ufa25-\ufa26\ufa2a-\ufa2d\ufa30-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufb4e\ufff0-\uffff]/g;e.exports={quote:function(e){var n=JSON.stringify(e);return r.lastIndex=0,r.test(n)?(t||(t=function(e){var t,r={},n=[];for(t=0;t<65536;t++)n.push(String.fromCharCode(t));return e.lastIndex=0,n.join("").replace(e,(function(e){return r[e]="\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4),""})),e.lastIndex=0,r}(r)),n.replace(r,(function(e){return t[e]}))):n}}},6831:function(e,t,r){"use strict";var n=r(6032),o={},i=!1,a=r.g.chrome&&r.g.chrome.app&&r.g.chrome.app.runtime;e.exports={attachEvent:function(e,t){void 0!==r.g.addEventListener?r.g.addEventListener(e,t,!1):r.g.document&&r.g.attachEvent&&(r.g.document.attachEvent("on"+e,t),r.g.attachEvent("on"+e,t))},detachEvent:function(e,t){void 0!==r.g.addEventListener?r.g.removeEventListener(e,t,!1):r.g.document&&r.g.detachEvent&&(r.g.document.detachEvent("on"+e,t),r.g.detachEvent("on"+e,t))},unloadAdd:function(e){if(a)return null;var t=n.string(8);return o[t]=e,i&&setTimeout(this.triggerUnloadCallbacks,0),t},unloadDel:function(e){e in o&&delete o[e]},triggerUnloadCallbacks:function(){for(var e in o)o[e](),delete o[e]}},a||e.exports.attachEvent("unload",(function(){i||(i=!0,e.exports.triggerUnloadCallbacks())}))},8734:function(e,t,r){"use strict";var n=r(6831),o=r(6626);e.exports={WPrefix:"_jp",currentWindowId:null,polluteGlobalNamespace:function(){e.exports.WPrefix in r.g||(r.g[e.exports.WPrefix]={})},postMessage:function(t,n){r.g.parent!==r.g&&r.g.parent.postMessage(JSON.stringify({windowId:e.exports.currentWindowId,type:t,data:n||""}),"*")},createIframe:function(e,t){var o,i,a=r.g.document.createElement("iframe"),s=function(){clearTimeout(o);try{a.onload=null}catch(e){}a.onerror=null},c=function(){a&&(s(),setTimeout((function(){a&&a.parentNode.removeChild(a),a=null}),0),n.unloadDel(i))},u=function(e){a&&(c(),t(e))};return a.src=e,a.style.display="none",a.style.position="absolute",a.onerror=function(){u("onerror")},a.onload=function(){clearTimeout(o),o=setTimeout((function(){u("onload timeout")}),2e3)},r.g.document.body.appendChild(a),o=setTimeout((function(){u("timeout")}),15e3),i=n.unloadAdd(c),{post:function(e,t){setTimeout((function(){try{a&&a.contentWindow&&a.contentWindow.postMessage(e,t)}catch(e){}}),0)},cleanup:c,loaded:s}},createHtmlfile:function(t,o){var i,a,s,c=["Active"].concat("Object").join("X"),u=new r.g[c]("htmlfile"),l=function(){clearTimeout(i),s.onerror=null},p=function(){u&&(l(),n.unloadDel(a),s.parentNode.removeChild(s),s=u=null,CollectGarbage())},h=function(e){u&&(p(),o(e))};u.open(),u.write('<html><script>document.domain="'+r.g.document.domain+'";<\/script></html>'),u.close(),u.parentWindow[e.exports.WPrefix]=r.g[e.exports.WPrefix];var d=u.createElement("div");return u.body.appendChild(d),s=u.createElement("iframe"),d.appendChild(s),s.src=t,s.onerror=function(){h("onerror")},i=setTimeout((function(){h("timeout")}),15e3),a=n.unloadAdd(p),{post:function(e,t){try{setTimeout((function(){s&&s.contentWindow&&s.contentWindow.postMessage(e,t)}),0)}catch(e){}},cleanup:p,loaded:l}}},e.exports.iframeEnabled=!1,r.g.document&&(e.exports.iframeEnabled=("function"==typeof r.g.postMessage||"object"==typeof r.g.postMessage)&&!o.isKonqueror())},7254:function(e,t,r){"use strict";var n={};["log","debug","warn"].forEach((function(e){var t;try{t=r.g.console&&r.g.console[e]&&r.g.console[e].apply}catch(e){}n[e]=t?function(){return r.g.console[e].apply(r.g.console,arguments)}:"log"===e?function(){}:n.log})),e.exports=n},7234:function(e){"use strict";e.exports={isObject:function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},extend:function(e){if(!this.isObject(e))return e;for(var t,r,n=1,o=arguments.length;n<o;n++)for(r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}}},6032:function(e,t,r){"use strict";var n=r(971),o="abcdefghijklmnopqrstuvwxyz012345";e.exports={string:function(e){for(var t=o.length,r=n.randomBytes(e),i=[],a=0;a<e;a++)i.push(o.substr(r[a]%t,1));return i.join("")},number:function(e){return Math.floor(Math.random()*e)},numberString:function(e){var t=(""+(e-1)).length;return(new Array(t+1).join("0")+this.number(e)).slice(-t)}}},9404:function(e){"use strict";e.exports=function(e){return{filterToEnabled:function(t,r){var n={main:[],facade:[]};return t?"string"==typeof t&&(t=[t]):t=[],e.forEach((function(e){e&&("websocket"===e.transportName&&!1===r.websocket||(t.length&&-1===t.indexOf(e.transportName)?e.transportName:e.enabled(r)?(e.transportName,n.main.push(e),e.facadeTransport&&n.facade.push(e.facadeTransport)):e.transportName))})),n}}}},1803:function(e,t,r){"use strict";var n=r(2296);e.exports={getOrigin:function(e){if(!e)return null;var t=new n(e);if("file:"===t.protocol)return null;var r=t.port;return r||(r="https:"===t.protocol?"443":"80"),t.protocol+"//"+t.hostname+":"+r},isOriginEqual:function(e,t){return this.getOrigin(e)===this.getOrigin(t)},isSchemeEqual:function(e,t){return e.split(":")[0]===t.split(":")[0]},addPath:function(e,t){var r=e.split("?");return r[0]+t+(r[1]?"?"+r[1]:"")},addQuery:function(e,t){return e+(-1===e.indexOf("?")?"?"+t:"&"+t)},isLoopbackAddr:function(e){return/^127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(e)||/^\[::1\]$/.test(e)}}},9534:function(e){e.exports="1.6.1"},2296:function(e,t,r){"use strict";var n=r(1384),o=r(8878),i=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a=/[\n\r\t]/g,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,l=/^[a-zA-Z]:/;function p(e){return(e||"").toString().replace(i,"")}var h=[["#","hash"],["?","query"],function(e,t){return m(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],d={hash:1,query:1};function f(e){var t,n=("undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{}).location||{},o={},i=typeof(e=e||n);if("blob:"===e.protocol)o=new g(unescape(e.pathname),{});else if("string"===i)for(t in o=new g(e,{}),d)delete o[t];else if("object"===i){for(t in e)t in d||(o[t]=e[t]);void 0===o.slashes&&(o.slashes=s.test(e.href))}return o}function m(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function y(e,t){e=(e=p(e)).replace(a,""),t=t||{};var r,n=u.exec(e),o=n[1]?n[1].toLowerCase():"",i=!!n[2],s=!!n[3],c=0;return i?s?(r=n[2]+n[3]+n[4],c=n[2].length+n[3].length):(r=n[2]+n[4],c=n[2].length):s?(r=n[3]+n[4],c=n[3].length):r=n[4],"file:"===o?c>=2&&(r=r.slice(2)):m(o)?r=n[4]:o?i&&(r=r.slice(2)):c>=2&&m(t.protocol)&&(r=n[4]),{protocol:o,slashes:i||m(o),slashesCount:c,rest:r}}function g(e,t,r){if(e=(e=p(e)).replace(a,""),!(this instanceof g))return new g(e,t,r);var i,s,c,u,d,v,E=h.slice(),_=typeof t,T=this,O=0;for("object"!==_&&"string"!==_&&(r=t,t=null),r&&"function"!=typeof r&&(r=o.parse),i=!(s=y(e||"",t=f(t))).protocol&&!s.slashes,T.slashes=s.slashes||i&&t.slashes,T.protocol=s.protocol||t.protocol||"",e=s.rest,("file:"===s.protocol&&(2!==s.slashesCount||l.test(e))||!s.slashes&&(s.protocol||s.slashesCount<2||!m(T.protocol)))&&(E[3]=[/(.*)/,"pathname"]);O<E.length;O++)"function"!=typeof(u=E[O])?(c=u[0],v=u[1],c!=c?T[v]=e:"string"==typeof c?~(d="@"===c?e.lastIndexOf(c):e.indexOf(c))&&("number"==typeof u[2]?(T[v]=e.slice(0,d),e=e.slice(d+u[2])):(T[v]=e.slice(d),e=e.slice(0,d))):(d=c.exec(e))&&(T[v]=d[1],e=e.slice(0,d.index)),T[v]=T[v]||i&&u[3]&&t[v]||"",u[4]&&(T[v]=T[v].toLowerCase())):e=u(e,T);r&&(T.query=r(T.query)),i&&t.slashes&&"/"!==T.pathname.charAt(0)&&(""!==T.pathname||""!==t.pathname)&&(T.pathname=function(e,t){if(""===e)return t;for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),n=r.length,o=r[n-1],i=!1,a=0;n--;)"."===r[n]?r.splice(n,1):".."===r[n]?(r.splice(n,1),a++):a&&(0===n&&(i=!0),r.splice(n,1),a--);return i&&r.unshift(""),"."!==o&&".."!==o||r.push(""),r.join("/")}(T.pathname,t.pathname)),"/"!==T.pathname.charAt(0)&&m(T.protocol)&&(T.pathname="/"+T.pathname),n(T.port,T.protocol)||(T.host=T.hostname,T.port=""),T.username=T.password="",T.auth&&(~(d=T.auth.indexOf(":"))?(T.username=T.auth.slice(0,d),T.username=encodeURIComponent(decodeURIComponent(T.username)),T.password=T.auth.slice(d+1),T.password=encodeURIComponent(decodeURIComponent(T.password))):T.username=encodeURIComponent(decodeURIComponent(T.auth)),T.auth=T.password?T.username+":"+T.password:T.username),T.origin="file:"!==T.protocol&&m(T.protocol)&&T.host?T.protocol+"//"+T.host:"null",T.href=T.toString()}g.prototype={set:function(e,t,r){var i=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(r||o.parse)(t)),i[e]=t;break;case"port":i[e]=t,n(t,i.protocol)?t&&(i.host=i.hostname+":"+t):(i.host=i.hostname,i[e]="");break;case"hostname":i[e]=t,i.port&&(t+=":"+i.port),i.host=t;break;case"host":i[e]=t,c.test(t)?(t=t.split(":"),i.port=t.pop(),i.hostname=t.join(":")):(i.hostname=t,i.port="");break;case"protocol":i.protocol=t.toLowerCase(),i.slashes=!r;break;case"pathname":case"hash":if(t){var a="pathname"===e?"/":"#";i[e]=t.charAt(0)!==a?a+t:t}else i[e]=t;break;case"username":case"password":i[e]=encodeURIComponent(t);break;case"auth":var s=t.indexOf(":");~s?(i.username=t.slice(0,s),i.username=encodeURIComponent(decodeURIComponent(i.username)),i.password=t.slice(s+1),i.password=encodeURIComponent(decodeURIComponent(i.password))):i.username=encodeURIComponent(decodeURIComponent(t))}for(var u=0;u<h.length;u++){var l=h[u];l[4]&&(i[l[1]]=i[l[1]].toLowerCase())}return i.auth=i.password?i.username+":"+i.password:i.username,i.origin="file:"!==i.protocol&&m(i.protocol)&&i.host?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},toString:function(e){e&&"function"==typeof e||(e=o.stringify);var t,r=this,n=r.host,i=r.protocol;i&&":"!==i.charAt(i.length-1)&&(i+=":");var a=i+(r.protocol&&r.slashes||m(r.protocol)?"//":"");return r.username?(a+=r.username,r.password&&(a+=":"+r.password),a+="@"):r.password?(a+=":"+r.password,a+="@"):"file:"!==r.protocol&&m(r.protocol)&&!n&&"/"!==r.pathname&&(a+="@"),(":"===n[n.length-1]||c.test(r.hostname)&&!r.port)&&(n+=":"),a+=n+r.pathname,(t="object"==typeof r.query?e(r.query):r.query)&&(a+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(a+=r.hash),a}},g.extractProtocol=y,g.location=f,g.trimLeft=p,g.qs=o,e.exports=g}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.amdO={},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return function(){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:function(){return Fe}});var e=__webpack_require__(8078),t=__webpack_require__.n(e),r=__webpack_require__(453),n=__webpack_require__.n(r),o=__webpack_require__(9168),i=__webpack_require__.n(o),a=(__webpack_require__(8327),__webpack_require__(8668),__webpack_require__(1008),__webpack_require__(7461),__webpack_require__(7693),__webpack_require__(3442),__webpack_require__(900),__webpack_require__(3814),__webpack_require__(9046),__webpack_require__(9782),__webpack_require__(6181),__webpack_require__(8453),__webpack_require__(7521),__webpack_require__(3022),__webpack_require__(7480)),s=__webpack_require__(7551),c=__webpack_require__(3365),u=(__webpack_require__(514),__webpack_require__(4201),__webpack_require__(6864),__webpack_require__(1685),__webpack_require__(2486),__webpack_require__(4261),__webpack_require__(937),__webpack_require__(2657),__webpack_require__(351),__webpack_require__(5980),__webpack_require__(863),__webpack_require__(3536),__webpack_require__(8548),__webpack_require__(6921),__webpack_require__(8346),__webpack_require__(3849),__webpack_require__(6781),__webpack_require__(2728),__webpack_require__(3039),__webpack_require__(2258),__webpack_require__(316),__webpack_require__(2446),__webpack_require__(695),__webpack_require__(6776),__webpack_require__(1922),__webpack_require__(8844),__webpack_require__(7146),__webpack_require__(3641),__webpack_require__(650),__webpack_require__(9951),__webpack_require__(2426),__webpack_require__(5488),__webpack_require__(8542),__webpack_require__(4740),__webpack_require__(4822),__webpack_require__(9889),__webpack_require__(6619),__webpack_require__(1538),__webpack_require__(3786),__webpack_require__(3529),__webpack_require__(7118),__webpack_require__(5491)),l=__webpack_require__.n(u),p=__webpack_require__(983),h=(__webpack_require__(1362),__webpack_require__(7988),__webpack_require__(6916)),d=function(e){var t=this.root.lookup("easemob.pb.MUCBody").decode(e.payload),r=t.operation;h.kg.debug("onMucMessage",t),console.log("onMucMessage",t),function(e){var r,n,o,i,a,s,c=this;return t.isThread?(o={id:t.mucId.name,name:t.mucName,operation:"",parentId:t.mucParentId.name,operator:t.from.name,userName:t.to.length?t.to[0].name:""},i={chatThreadId:t.mucId.name,chatThreadName:t.mucName,operation:"",parentId:t.mucParentId.name}):(n={type:"",owner:t.from.name,gid:t.mucId.name,from:t.from.name,fromJid:t.from,to:t.to.length?t.to[0].name:"",toJid:t.to,chatroom:t.isChatroom,status:t.status},a={operation:"",id:t.mucId.name,from:t.from.name},t.isChatroom&&(null===(r=null==t?void 0:t.eventInfo)||void 0===r?void 0:r.ext)&&(s=JSON.parse(t.eventInfo.ext))),({44:function(){var e;a.operation="removeChatRoomAttributes",a.attributes=s.result.successKeys,s.result.successKeys.length>0&&(null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomEvent",a))},43:function(){var e;a.operation="updateChatRoomAttributes";var t={};s.result.successKeys.forEach((function(e){t[e]=s.properties[e]})),a.attributes=t,s.result.successKeys.length>0&&(null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomEvent",a))},42:function(){},41:function(){},40:function(){},39:function(){},38:function(){var e;i.operation="chatThreadNameUpdate",null===(e=c.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},37:function(){var e;o.operation="userRemove",null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatThreadChange",o)},36:function(){var e;i.operation="chatThreadLeave",null===(e=c.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},35:function(){var e;i.operation="chatThreadJoin",null===(e=c.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},34:function(){var e;i.operation="chatThreadDestroy",null===(e=c.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},33:function(){var e;i.operation="chatThreadCreate",null===(e=c.eventHandler)||void 0===e||e.dispatch("onMultiDeviceEvent",i)},32:function(){var e,r,o,i;n.type=t.isChatroom?"rmChatRoomMute":"rmGroupMute",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="unmuteAllMembers",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},31:function(){var e,r,o,i;n.type=t.isChatroom?"muteChatRoom":"muteGroup",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="muteAllMembers",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},30:function(){var e,r,o,i;n.type=t.isChatroom?"rmUserFromChatRoomWhiteList":"rmUserFromGroupWhiteList",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="removeAllowlistMember",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},29:function(){var e,r,o,i;n.type=t.isChatroom?"addUserToChatRoomWhiteList":"addUserToGroupWhiteList",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="addUserToAllowlist",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},28:function(){var e,r,o,i;n.type="deleteFile",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="deleteFile",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},27:function(){var e,r,o,i;n.type="uploadFile",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="uploadFile",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},26:function(){var e,r,o,i;n.type="deleteAnnouncement",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="deleteAnnouncement",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},25:function(){var e,r,o,i;n.type="updateAnnouncement",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="updateAnnouncement",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},24:function(){var e,r,o,i;n.type="removeMute",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="unmuteMember",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},23:function(){var e,r,o,i;n.type="addMute",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="muteMember",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},22:function(){var e,r,o,i;n.type="removeAdmin",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="removeAdmin",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},21:function(){var e,r,o,i;n.type="addAdmin",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="setAdmin",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},20:function(){var e,r,o,i;n.type="changeOwner",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="changeOwner",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},19:function(){var e,r,o,i;n.type="direct_joined",n.groupName=t.mucName,c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="directJoined",a.name=t.mucName,t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},18:function(){var e,r,o,i;n.type=t.isChatroom?"leaveChatRoom":"leaveGroup",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="memberAbsence",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},17:function(){var e,r,o,i;n.type=t.isChatroom?"memberJoinChatRoomSuccess":"memberJoinPublicGroupSuccess",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="memberPresence",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},16:function(){var e,r;n.type="unblock",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},15:function(){var e,r;n.type="block",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},14:function(){var e,r,o,i;n.type="update",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="updateInfo",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},13:function(){var e,r,o,i;n.type="allow",n.reason=t.reason,c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="unblockMember",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},12:function(){var e,r;n.type="ban",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},11:function(){var e,r;n.type="getBlackList",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},10:function(){var e,r,o,i;n.type="removedFromGroup",n.kicked=n.to,c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="removeMember",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},9:function(){var e,r,o,i;n.type="invite_decline",n.kicked=n.to,c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="rejectInvite",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},8:function(){var e,r,o,i;n.type="invite_accept",n.kicked=n.to,c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="acceptInvite",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},7:function(){var e,r,o,i;n.type="invite",n.kicked=n.to,n.groupName=t.mucName,c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="inviteToJoin",a.name=t.mucName,t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},6:function(){var e,r;n.type="joinPublicGroupDeclined",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},5:function(){var e,r,o,i;n.type="joinPublicGroupSuccess",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="acceptRequest",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},4:function(){var e,r,o,i;n.type="joinGroupNotifications",n.reason=t.reason,c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="requestToJoin",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)},3:function(){var e,r;n.type="leave",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},2:function(){var e,r;n.type="join",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n)},1:function(){var e,r,o,i;n.type="deleteGroupChat",c.onPresence&&c.onPresence(n),t.isChatroom?null===(e=c.eventHandler)||void 0===e||e.dispatch("onChatroomChange",n):null===(r=c.eventHandler)||void 0===r||r.dispatch("onGroupChange",n),a.operation="destroy",t.isChatroom?null===(o=c.eventHandler)||void 0===o||o.dispatch("onChatroomEvent",a):null===(i=c.eventHandler)||void 0===i||i.dispatch("onGroupEvent",a)}}[e]||function(){console.error("No match operation ".concat(e))})()}.call(this,r)},f=__webpack_require__(5163),m=function(e){var t,r,n,o,i,s,u=this.root.lookup("easemob.pb.StatisticsBody").decode(e.payload);switch(u.operation){case 0:this.onStatisticMessage&&this.onStatisticMessage(u),null===(t=this.eventHandler)||void 0===t||t.dispatch("onStatisticMessage",u);break;case 1:s=a.Z.create({type:c.E.WEBIM_CONNCTION_USER_REMOVED,message:"user has been removed"}),this.logOut=!0,this.onError&&this.onError(s),null===(r=this.eventHandler)||void 0===r||r.dispatch("onError",s);break;case 2:s=a.Z.create({type:c.E.WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE,message:"the user is already logged on another device"}),this.logOut=!0,this.onError&&this.onError(s),null===(n=this.eventHandler)||void 0===n||n.dispatch("onError",s);break;case 3:s=a.Z.create({type:c.E.WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD,message:"the user was kicked by changing password"}),this.logOut=!0,this.onError&&this.onError(s),null===(o=this.eventHandler)||void 0===o||o.dispatch("onError",s);break;case 4:s=a.Z.create({type:c.E.WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE,message:"the user was kicked by other device"}),this.logOut=!0,this.onError&&this.onError(s),null===(i=this.eventHandler)||void 0===i||i.dispatch("onError",s);break;default:h.kg.error("handleStatisticsMsg:",u)}},y=(__webpack_require__(7665),__webpack_require__(2006));function g(e){var t,r=[],n=[];e.data&&e.data.values&&e.data.values.forEach((function(e){Object.entries(e.status).forEach((function(e){n.push({device:e[0],status:Number(e[1])})})),r.push({userId:e.uid,lastTime:Number(e.last_time),expire:Number(e.expiry),ext:e.ext,statusDetails:n})})),this.onPresenceStatusChange&&this.onPresenceStatusChange(r),null===(t=this.eventHandler)||void 0===t||t.dispatch("onPresenceStatusChange",r)}function v(e){var t=this;e.data.forEach((function(e){var r,n={from:e.from,to:e.to,chatType:"chat"===e.channel_type?"singleChat":"groupChat",messageId:e.messageId,reactions:e.reactions,ts:e.ts};null===(r=t.eventHandler)||void 0===r||r.dispatch("onReactionChange",n)}))}function E(e){var t,r,n,o;if(e.data){var i=e.data,a={id:i.id||"",name:i.name||"",parentId:i.muc_parent_id||"",messageId:i.msg_parent_id||"",timestamp:i.timestamp||0,operator:i.from||"",operation:""};switch(i.operation){case"create":a.operation="create",a.createTimestamp=a.timestamp,a.messageCount=0,null===(t=this.eventHandler)||void 0===t||t.dispatch("onChatThreadChange",a);break;case"update_msg":a.operation="update",a.messageCount=i.message_count,i.last_message&&"{}"!==JSON.stringify(i.last_message)?a.lastMessage=(0,y.w)(i.last_message):"{}"===JSON.stringify(i.last_message)&&(a.lastMessage={}),null===(r=this.eventHandler)||void 0===r||r.dispatch("onChatThreadChange",a);break;case"update":a.operation="update",a.messageCount=i.message_count,null===(n=this.eventHandler)||void 0===n||n.dispatch("onChatThreadChange",a);break;case"delete":a.operation="destroy",null===(o=this.eventHandler)||void 0===o||o.dispatch("onChatThreadChange",a)}}}var _=function(e){var t=s.P6.parseNotify(e.payload);switch(e.from.name,e.to.name,t.type){case"presence":g.call(this,t);break;case"reaction":v.call(this,t);break;case"thread":E.call(this,t);break;default:h.kg.error("unexpected notify type: ".concat(t.type))}},T=__webpack_require__(4306),O=__webpack_require__(3681);function R(e){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}var I=function(){return I=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},I.apply(this,arguments)};function S(){var e="webim",t="",r="",n=[],o=(new Date).valueOf();"webim"===this.deviceId?(r="random_"+o.toString(),e=this.deviceId+"_"+r,t=this.deviceId):e=t=r="webim_"+this.deviceId,this.context.jid&&(this.context.jid.clientResource=e);var i=this.root.lookup("easemob.pb.Provision"),a=i.decode(n);a.compressType=this.compressType,a.encryptType=this.encryptType,a.osType=this.osType,a.version=this.version,a.deviceName=t,a.resource=e,a.deviceUuid=r,a.auth="$t$"+this.token,a.actionVersion="v2.0",a=i.encode(a).finish();var s=this.root.lookup("easemob.pb.MSync"),c=s.decode(n);return c.version=this.version,c.guid=this.context.jid,c.auth="$t$"+this.token,c.command=3,c.deviceId=t,c.serviceId=this.dataReport.getServiceId(),c.encryptType=this.encryptType,c.payload=a,s.encode(c).finish()}function b(e,t){var r=this,n=s.P6.getEnvInfo();if("web"===n.platform||"zfb"===n.platform||"dd"===n.platform){for(var o="",i=0;i<e.length;i++)o+=String.fromCharCode(e[i]);return o=l().btoa(o),"web"===n.platform?o:{data:o,isBuffer:!1,complete:function(){},fail:function(e){"sendSocketMessage:fail taskID not exist"!==e.errMsg&&"SocketTast.send:fail SocketTask.readyState is not OPEN"!==e.errMsg||(h.kg.debug("send message fail and reconnect"),r.reconnect()),t&&r._msgHash&&r._msgHash[t]&&r._msgHash[t].fail({id:t})}}}var a=e;return{data:a.buffer.slice(a.byteOffset,a.byteOffset+a.byteLength),fail:function(e){"sendSocketMessage:fail taskID not exist"!==e.errMsg&&"SocketTast.send:fail SocketTask.readyState is not OPEN"!==e.errMsg||r.reconnect(),t&&r._msgHash&&r._msgHash[t]&&r._msgHash[t].fail({id:t})}}}function C(e,t){switch(e.ns){case 0:m.call(this,e);break;case 1:p.Z.call(this,e,t);break;case 2:d.call(this,e);break;case 3:f.Z.handleRosterMsg.call(this,e);break;case 4:this.registerConfrIQHandler&&this.registerConfrIQHandler(e,t,this);break;case 5:_.call(this,e);break;default:h.kg.error("distributeMeta",e)}}function A(e,t){for(var r=function(r){var o=new(i())(e[r].id.low,e[r].id.high,e[r].id.unsigned).toString();if(n._load_msg_cache.some((function(e){return e.msgId===o})))return"continue";var a=e[r].from.name,s=e[r].to?e[r].to.name:"",c=!!e[r].to&&-1!==e[r].to.domain.indexOf("conference");n._load_msg_cache.length<=n.max_cache_length||n._load_msg_cache.shift(),n._load_msg_cache.push({msgId:o,from:a,to:s,isGroup:c}),C.call(n,e[r],t)},n=this,o=0;o<e.length;o++)r(o)}function N(e){var t=this.root.lookup("easemob.pb.CommUnreadDL");if(t=t.decode(e.payload),"agoraToken"===this.grantType){var r=new(i())(t.timestamp.low,t.timestamp.high,t.timestamp.unsigned).toString();this.compareTokenExpireTime(Number(r),this.expirationTime)}if(0===t.unread.length)j.call(this);else for(var n=0;n<t.unread.length;n++)k.call(this,t.unread[n].queue)}function w(){var e=[],t=this.root.lookup("easemob.pb.StatisticsBody"),r=t.decode(e);r.operation=0,r=t.encode(r).finish();var n=this.root.lookup("easemob.pb.Meta").decode(e);n.id=(new Date).valueOf(),n.ns=0,n.payload=r;var o=this.root.lookup("easemob.pb.CommSyncUL"),i=o.decode(e);i.meta=n,i=o.encode(i).finish();var a=this.root.lookup("easemob.pb.MSync"),s=a.decode(e);return s.version=this.version,s.encryptType=[0],s.command=0,s.payload=i,a.encode(s).finish()}function M(e){var t=[],r=this.root.lookup("easemob.pb.CommSyncUL"),n=r.decode(t);n.queue=e,n=r.encode(n).finish();var o=this.root.lookup("easemob.pb.MSync"),i=o.decode(t);return i.version=this.version,i.encryptType=this.encryptType,i.command=0,i.payload=n,o.encode(i).finish()}function k(e){h.kg.debug("sendBackqueue");var t=M.call(this,e);Y.call(this,t)}function U(e,t){var r=[],n=this.root.lookup("easemob.pb.CommSyncUL"),o=n.decode(r);o.queue=t,o.key=new(i())(e.low,e.high,e.unsigned).toString(),o=n.encode(o).finish();var a=this.root.lookup("easemob.pb.MSync"),s=a.decode(r);return s.version=this.version,s.encryptType=this.encryptType,s.command=0,s.payload=o,a.encode(s).finish()}function x(e,t){h.kg.debug("sendLastSession");var r=U.call(this,e,t);Y.call(this,r)}function P(e){var t,r=this.root.lookup("easemob.pb.Provision").decode(e.payload);if(this.context.jid&&(this.context.jid.clientResource=r.resource),this.clientResource=r.resource,0===r.status.errorCode){if(this.onOpened&&this.onOpened(),null===(t=this.eventHandler)||void 0===t||t.dispatch("onConnected"),"agoraToken"===this.grantType){var n=Date.now();this.expiresIn=this.expirationTime-n,this.tokenExpireTimeCountDown(this.expiresIn)}L.call(this),G.call(this),D.call(this),j.call(this)}else this.onError&&this.onError({type:c.E.WEBIM_CONNECTION_ERROR,message:"provision error",data:r})}function L(){if(this.unSendMsgArr.length>0){for(var e=0;e<this.unSendMsgArr.length;e++){var t=this.unSendMsgArr[e];X.call(this,t)}this.unSendMsgArr=[]}}function j(){var e=w.call(this);Y.call(this,e)}function D(){var e=H.call(this);Y.call(this,e)}function G(){var e=this;B.call(this),this.heartBeatID=setInterval((function(){D.call(e)}),this.heartBeatWait)}function B(){clearInterval(this.heartBeatID)}function H(){var e=this.root.lookup("easemob.pb.MSync"),t=e.decode([]);return t.version=this.version,t.encryptType=this.encryptType,t.command=1,e.encode(t).finish()}function F(e,t){return e.some((function(e){return e.name===t.name}))}function W(e){var t=this,r=this.root.lookup("easemob.pb.CommNotice").decode(e.payload);F(this._queues,r.queue)||this.clientResource===r.queue.clientResource&&r.queue.name===this.context.userId||(this._queues.push(r.queue),this.qTimer&&clearTimeout(this.qTimer),this.qTimer=setTimeout((function(){var e=r.queue;F(t._queues,e)&&(k.call(t,r.queue),h.kg.debug("⬇q:",e))}),1e4),1===this._queues.length&&k.call(this,r.queue))}function q(e){return t=this,r=void 0,o=function(){var t,r,n,o,i,a,c,u;return function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(p){switch(p.label){case 0:if(t=s.P6.getEnvInfo(),"miniCore"!==this.name)return[3,7];u=this.root.lookup("easemob.pb.MSync"),r=void 0,p.label=1;case 1:return p.trys.push([1,5,,6]),"[object Blob]"!==Object.prototype.toString.call(e.data)?[3,3]:[4,e.data.arrayBuffer()];case 2:return r=p.sent(),[3,4];case 3:h.kg.debug("received message: ".concat(e.data)),p.label=4;case 4:return[3,6];case 5:throw p.sent(),new Error("decode message fail.");case 6:return n=new Uint8Array(r),[2,u.decode(n)];case 7:if("web"===t.platform||"zfb"===t.platform||"dd"===t.platform){for(o=l().atob(e.data),i=[],a=0,c=o.length;a<c;++a)i.push(o.charCodeAt(a));return[2,(u=this.root.lookup("easemob.pb.MSync")).decode(i)]}return[2,(u=this.root.lookup("easemob.pb.MSync")).decode(e.data)];case 8:return[2]}}))},new((n=void 0)||(n=Promise))((function(e,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function s(e){try{c(o.throw(e))}catch(e){i(e)}}function c(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r:new n((function(e){e(r)}))).then(a,s)}c((o=o.apply(t,r||[])).next())}));var t,r,n,o}function Z(e){var t=this;e.then((function(e){switch(e.command){case 0:K.call(t,e);break;case 1:N.call(t,e);break;case 2:W.call(t,e);break;case 3:P.call(t,e);break;default:h.kg.error("unexpected msync command: ".concat(e.command))}}))}function K(e){var t,r,n,o,s,u,l,p,h,d,f=this.root.lookup("easemob.pb.CommSyncDL");f=f.decode(e.payload);var m=new(i())(f.serverId.low,f.serverId.high,f.serverId.unsigned).toString(),y=new(i())(f.metaId.low,f.metaId.high,f.metaId.unsigned).toString();if(0!==f.metas.length)try{A.call(this,f.metas,f.status)}catch(e){var g=a.Z.create({type:c.E.WEBIM_LOAD_MSG_ERROR,message:"decode message error",data:e});this.onError&&this.onError(g),null===(t=this.eventHandler)||void 0===t||t.dispatch("onError",g)}finally{if(f.isLast){var v=-1;(R=this._queues.some((function(e,t){return e.name===f.name&&(v=t,!0)})))&&v>0&&this._queues.splice(v,1),this._queues.length>0&&(k.call(this,this._queues[0]),this.qTimer&&clearTimeout(this.qTimer))}else x.call(this,f.nextKey,f.queue)}else if(f.isLast){var E=-1;(R=this._queues.some((function(e,t){return e.name===f.queue.name&&(E=t,!0)})))&&this._queues.splice(E,1),this._queues.length>0&&(k.call(this,this._queues[0]),this.qTimer&&clearTimeout(this.qTimer))}else if(f.status&&0===f.status.errorCode){var _=-1,R=this._queues.some((function(e,t){var r;return e.name===(null===(r=f.queue)||void 0===r?void 0:r.name)&&(_=t,!0)}));if(R&&this._queues.splice(_,1),this._queues.length>0&&(k.call(this,this._queues[0]),this.qTimer&&clearTimeout(this.qTimer)),(b=T.Nl.get(y))&&((0,b.rpt)({isEndApi:!0,data:{isSuccess:1,requestName:b.requestName,requestMethod:"WEBSOCKET",requestUrl:this.url,code:O.dd.success}}),T.Nl.delete(y)),this._msgHash[y]){T.TJ.has(y)&&(T.TJ.get(y).rpt({isEndApi:!0,data:{isSuccess:1,requestMethod:"WEBSOCKET",requestUrl:this.url,code:O.dd.success,msgId:m}}),T.TJ.delete(y));try{(null===(r=this._msgHash[y])||void 0===r?void 0:r.resolve)instanceof Function&&this._msgHash[y].resolve({localMsgId:y,serverMsgId:m}),(null===(n=this._msgHash[y])||void 0===n?void 0:n.success)instanceof Function&&this._msgHash[y].success(y,m)}catch(e){g=a.Z.create({type:c.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing success function error",data:e}),this.onError&&this.onError(g),null===(o=this.eventHandler)||void 0===o||o.dispatch("onError",g)}this.onReceivedMessage&&this.onReceivedMessage({id:y,mid:m,to:this._msgHash[y].to,time:0}),null===(s=this.eventHandler)||void 0===s||s.dispatch("onReceivedMessage",{id:y,mid:m,to:this._msgHash[y].to}),delete this._msgHash[y]}}else if(f.status&&15===f.status.errorCode)(null===(u=this._msgHash[y])||void 0===u?void 0:u.fail)instanceof Function&&this._msgHash[y].fail({type:c.E.SERVICE_NOT_ALLOW_MESSAGING_MUTE,reason:"you were muted"}),this._msgHash[y].reject instanceof Function&&this._msgHash[y].reject({type:c.E.SERVICE_NOT_ALLOW_MESSAGING_MUTE,reason:"you were muted"});else if(f.status&&1===f.status.errorCode){var I=void 0;switch(f.status.reason){case"blocked":I=c.E.PERMISSION_DENIED;break;case"group not found":I=c.E.GROUP_NOT_EXIST;break;case"not in group or chatroom":I=c.E.GROUP_NOT_JOINED;break;case"exceed recall time limit":I=c.E.MESSAGE_RECALL_TIME_LIMIT;break;case"message recall disabled":I=c.E.SERVICE_NOT_ENABLED;break;case"not in group or chatroom white list":I=c.E.SERVICE_NOT_ALLOW_MESSAGING;break;case"nonroster":I=c.E.USER_NOT_FRIEND,f.status.reason="not contact";break;case"group is disabled":I=c.E.GROUP_IS_DISABLED,f.status.reason="group is disabled";break;default:I=f.status.reason.includes("moderation")?c.E.MESSAGE_MODERATION_BLOCKED:c.E.SERVER_UNKNOWN_ERROR}if(this._msgHash[y]){var S=a.Z.create({type:I,message:f.status.reason||"",data:{id:y,mid:m}});this._msgHash[y].reject instanceof Function&&this._msgHash[y].reject(S),this._msgHash[y].fail instanceof Function&&this._msgHash[y].fail({type:I,reason:f.status.reason?f.status.reason:"",data:{id:y,mid:m}})}}else if(f.status&&7===f.status.errorCode)"sensitive words"===f.status.reason&&this._msgHash[y]?(S=a.Z.create({type:c.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,message:"sensitive words",data:{id:y,mid:m}}),this._msgHash[y].reject instanceof Function&&this._msgHash[y].reject(S),this._msgHash[y].fail instanceof Function&&this._msgHash[y].fail({type:c.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,data:{id:y,mid:m,reason:"sensitive words"}})):"blocked by mod_antispam"===f.status.reason&&this._msgHash[y]?(S=a.Z.create({type:c.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,message:"blocked by mod_antispam",data:{id:y,mid:m}}),this._msgHash[y].reject instanceof Function&&this._msgHash[y].reject(S),this._msgHash[y].fail instanceof Function&&this._msgHash[y].fail({type:c.E.MESSAGE_INCLUDE_ILLEGAL_CONTENT,data:{id:y,mid:m,reason:"blocked by mod_antispam"}})):"user is mute"===f.status.reason&&this._msgHash[y]?(S=a.Z.create({type:c.E.USER_MUTED_BY_ADMIN,message:"user is mute",data:{id:y,mid:m}}),this._msgHash[y].reject instanceof Function&&this._msgHash[y].reject(S),this._msgHash[y].fail instanceof Function&&this._msgHash[y].fail(S)):"traffic limit"===f.status.reason&&this._msgHash[y]&&(S=a.Z.create({type:c.E.MESSAGE_CURRENT_LIMITING,message:"traffic limit",data:{id:y,mid:m}}),this._msgHash[y].reject instanceof Function&&this._msgHash[y].reject(S),this._msgHash[y].fail instanceof Function&&this._msgHash[y].fail(S));else if(f.status&&19===f.status.errorCode)this._msgHash[y]&&(T.TJ.has(y)&&(T.TJ.get(y).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:c.E.MESSAGE_EXTERNAL_LOGIC_BLOCKED,codeDesc:f.status.reason||"",msgId:m}}),T.TJ.delete(y)),S=a.Z.create({type:c.E.MESSAGE_EXTERNAL_LOGIC_BLOCKED,message:f.status.reason||"",data:{id:y,mid:m}}),this._msgHash[y].reject instanceof Function&&this._msgHash[y].reject(S),this._msgHash[y].fail instanceof Function&&this._msgHash[y].fail({type:c.E.MESSAGE_EXTERNAL_LOGIC_BLOCKED,data:{id:y,mid:m,reason:f.status.reason}}));else if(this._msgHash[y]){T.TJ.has(y)&&(T.TJ.get(y).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:c.E.WEBIM_LOAD_MSG_ERROR,codeDesc:(null===(l=f.status)||void 0===l?void 0:l.reason)||"",msgId:m}}),T.TJ.delete(y));try{S=a.Z.create({type:c.E.WEBIM_LOAD_MSG_ERROR,message:(null===(p=f.status)||void 0===p?void 0:p.reason)||"",data:{id:y,mid:m,reason:f.status&&f.status.reason}}),this._msgHash[y].reject instanceof Function&&this._msgHash[y].reject(S),this._msgHash[y].fail instanceof Function&&this._msgHash[y].fail({type:c.E.WEBIM_LOAD_MSG_ERROR,data:{errorCode:f.status&&f.status.errorCode,reason:f.status&&f.status.reason}})}catch(e){g=a.Z.create({type:c.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"when executing fail function error",data:e}),this.onError&&this.onError(g),null===(h=this.eventHandler)||void 0===h||h.dispatch("onError",g)}delete this._msgHash[y]}else{var b;T.TJ.has(y)&&(T.TJ.get(y).rpt({isEndApi:!0,data:{isSuccess:0,requestMethod:"WEBSOCKET",requestUrl:this.url,code:c.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,codeDesc:"on message error",msgId:m}}),T.TJ.delete(y)),(b=T.Nl.get(y))&&((0,b.rpt)({isEndApi:!0,data:{isSuccess:0,requestName:b.requestName,requestMethod:"WEBSOCKET",requestUrl:this.url,code:O.dd.failed,codeDesc:"on message error"}}),T.Nl.delete(y)),g=a.Z.create({type:c.E.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,message:"on message error"}),this.onError&&this.onError(g),null===(d=this.eventHandler)||void 0===d||d.dispatch("onError",g)}}function V(e){var t=[],r=this.root.lookup("easemob.pb.KeyValue"),n=[];for(var o in e){var i=r.decode(t);i.key=o,"object"===R(e[o])?(i.type=8,i.stringValue=JSON.stringify(e[o])):"string"==typeof e[o]?(i.type=7,i.stringValue=e[o]):"boolean"==typeof e[o]?(i.type=1,i.varintValue=!0===e[o]?1:0):Number.isInteger(e[o])?(i.type=2,i.varintValue=e[o]):(i.type=6,i.doubleValue=e[o]),n.push(i)}return n}function z(e){var t,r,n=[];if(this.root){var o,i=this.root.lookup("easemob.pb.MessageBody.Content").decode(n);switch(o=!e.group&&"groupchat"!==(null===(t=null==e?void 0:e.chatType)||void 0===t?void 0:t.toLowerCase())||e.roomType?e.group&&e.roomType||"chatroom"===(null===(r=null==e?void 0:e.chatType)||void 0===r?void 0:r.toLowerCase())?"chatRoom":"singleChat":"groupChat",e.type){case"txt":i.type=0,i.text=e.msg;break;case"img":i.type=1,e.body?(i.displayName=e.body.filename,i.remotePath=e.body.url,i.secretKey=e.body.secret,i.fileLength=e.body.file_length,i.size=e.body.size,i.thumbnailDisplayName=e.body.filename):e.file?(i.displayName=e.file.filename,i.remotePath=e.file.url,i.secretKey=e.file.secret,i.fileLength=e.file.file_length,i.size=e.file.size,i.thumbnailDisplayName=e.file.filename):(i.displayName=e.filename,i.remotePath=e.url,i.secretKey=e.secret,i.fileLength=e.file_length,i.size=e.size,i.thumbnailDisplayName=e.filename);break;case"video":i.type=2,i.displayName=e.body.filename,i.remotePath=e.body.url,i.secretKey=e.body.secret,i.fileLength=e.body.file_length,i.duration=e.body.length,i.thumbnailDisplayName=e.body.filename;break;case"loc":i.type=3,i.latitude=e.lat,i.longitude=e.lng,i.address=e.addr,i.buildingName=e.buildingName,i.latitude=e.lat;break;case"audio":i.type=4,i.displayName=e.body.filename,i.remotePath=e.body.url,i.secretKey=e.body.secret,i.fileLength=e.body.file_length,i.duration=e.body.length,i.thumbnailDisplayName=e.body.filename;break;case"file":i.type=5,i.displayName=e.body.filename,i.remotePath=e.body.url,i.secretKey=e.body.secret,i.fileLength=e.body.file_length,i.size=e.body.size,i.thumbnailDisplayName=e.body.filename;break;case"cmd":i.type=6,i.action=e.action;break;case"custom":i.type=7,i.customEvent=e.customEvent,i.customExts=V.call(this,e.customExts)}var a=[];e.ext&&(a=V.call(this,e.ext));var s=this.root.lookup("easemob.pb.MessageBody"),u=s.decode(n);u.from={name:this.context.jid.name},u.to={name:e.to},"channel"===e.type?u.type=7:"recall"===e.type?(u.type=6,u.ackMessageId=e.ackId):"delivery"===e.type?(u.type=5,u.ackMessageId=e.ackId):"read"===e.type?(u.type=4,u.ackMessageId=e.ackId,"groupChat"===o&&(u.msgConfig={allowGroupAck:!0},u.ackContent=e.ackContent)):"chatRoom"===o?u.type=3:"groupChat"===o?(u.type=2,e.msgConfig&&(u.msgConfig={allowGroupAck:!0})):"singleChat"===o&&(u.type=1),u.contents=[i],u.ext=a;var l=function(e){var t={};return"translations"in e&&(t.translations=e.translations),"isChatThread"in e&&e.isChatThread&&(t.thread={}),Object.keys(t).length>0?JSON.stringify(t):""}(e);l&&(u.meta=l),u=s.encode(u).finish();var p=this.root.lookup("easemob.pb.Meta").decode(n);p.id=e.id;var h="easemob.com";"chatRoom"!==o&&"groupChat"!==o||(h="conference.easemob.com"),p.to={appKey:this.appKey,name:e.to,domain:h},p.ns=1,p.payload=u;var d=this.root.lookup("easemob.pb.CommSyncUL"),f=d.decode(n);f.meta=p,f=d.encode(f).finish();var m=this.root.lookup("easemob.pb.MSync"),y=m.decode(n);return y.version=this.version,y.encryptType=this.encryptType,y.command=0,y.payload=f,m.encode(y).finish()}e.fail&&e.fail({type:c.E.WEBIM_CONNCTION_CLIENT_OFFLINE,message:"Not logged in"})}function J(e){var t=this;if(!e.file)return e;var r=I({},e);return r.accessToken=this.token,r.appKey=this.appKey,r.apiUrl=this.apiUrl,r.body&&r.body.url?z.call(this,r):new Promise((function(n,o){var i=r.onFileUploadComplete;r.onFileUploadComplete=function(n){var o;if(n.entities[0]["file-metadata"]){var a=n.entities[0]["file-metadata"]["content-length"];r.file_length=a,r.filetype=n.entities[0]["file-metadata"]["content-type"],a>204800&&(r.thumbnail=!0)}r.body={type:r.type||"file",secret:n.entities[0]["share-secret"],filename:r.file.filename||r.filename,url:(t.isHttpDNS?t.apiUrl+n.uri.substr(n.uri.indexOf("/",9)):n.uri)+"/"+n.entities[0].uuid,length:r.length||0,filetype:r.filetype||r.file.filetype,file_length:(null===(o=null==r?void 0:r.ext)||void 0===o?void 0:o.file_length)||0,size:{width:r.width||0,height:r.height||0}},r.file.url=n.uri,e.secret=n.entities[0]["share-secret"];var s=(t.isHttpDNS?t.apiUrl+n.uri.substr(n.uri.indexOf("/",9)):n.uri)+"/"+n.entities[0].uuid;e.url=s,n.url=s,"img"===r.type&&(e.thumb="".concat(s,"?thumbnail=true"),n.thumb="".concat(s,"?thumbnail=true")),i instanceof Function&&i(n,r.id);var c=z.call(t,r);T.TJ.size<=T.F3&&T.TJ.set(r.id,{rpt:t.dataReport.geOperateFun({operationName:O.fI.SEND_MSG})}),Y.call(t,c)},s.P6.uploadFile.call(t,r,O.fI.UPLOAD_MSG_ATTACH)}))}function X(e){var t=this;return new Promise((function(r,n){var o,i;if(t.logOut)return n({type:c.E.WEBIM_CONNECTION_CLOSED,message:"not login"});var a="file"===e.type||"img"===e.type||"audio"===e.type||"video"===e.type,s="delivery"===e.type||"read"===e.type||"channel"===e.type;if(e.id&&((!a&&!s||a&&t.useOwnUploadFun)&&T.TJ.size<=T.F3&&T.TJ.set(e.id,{rpt:t.dataReport.geOperateFun({operationName:"recall"===e.type?O.fI.SEND_RECALL_MSG:O.fI.SEND_MSG})}),t._msgHash[e.id]=I(I({},e),{resolve:r,reject:n})),a&&e.file)return J.call(t,e);if("txt"===e.type&&(null===(o=e.msgConfig)||void 0===o?void 0:o.languages)&&Array.isArray(null===(i=e.msgConfig)||void 0===i?void 0:i.languages)&&e.msgConfig.languages.length>0){var u=t.translateMessage||t.translation.translateMessage;if(!u)throw new Error("there is no method to translate message");u({text:e.msg,languages:e.msgConfig.languages}).then((function(r){var n,o=null===(n=r.data[0])||void 0===n?void 0:n.translations;o=o.map((function(e){return{code:e.to,text:e.text}})),e.translations=o;var i=z.call(t,e);Y.call(t,i,e.id)})).catch((function(e){n(e)}))}else{var l=z.call(t,e);Y.call(t,l,e.id)}}))}function Y(e,t){if(!this.isOpened())return this.unSendMsgArr.push(e),!this.logOut&&this.autoReconnectNumTotal<this.autoReconnectNumMax&&(this.autoReconnectNumTotal<=this.socketHost.length&&this.isHttpDNS||!this.isHttpDNS)&&(h.kg.debug("need to reconnect",this.autoReconnectNumTotal,this.autoReconnectNumMax),this.offLineSendConnecting=!0,this.reconnect()),void(this.onError&&this.onError({type:c.E.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"}));var r;r="miniCore"===this.name?e:b.call(this,e,t),this.sock.send(r)}var $=function(e,t){return e.send=X,e.sendMsg=X,h.kg.debug("init Msync by ".concat(e.name)),{generateProvision:S.bind(e),base64transform:b.bind(e),distributeMeta:C.bind(e),decodeMeta:A.bind(e),decodeUnreadDL:N.bind(e),_rebuild:w.bind(e),_lastsession:U.bind(e),receiveProvision:P.bind(e),isInQueue:F.bind(e),decodeNotice:W.bind(e),decodeMSync:q.bind(e),distributeMSync:Z.bind(e),encodeChatMsg:z.bind(e),upLoadFile:J.bind(e),send:X.bind(e),stopHeartBeat:B.bind(e)}},Q=function(){function e(e,t,r){this.handlerData={},this.handlerData={},e.addEventHandler=this.addEventHandler.bind(this),e.removeEventHandler=this.removeEventHandler.bind(this)}return e.prototype.addEventHandler=function(e,t){this.handlerData[e]=t},e.prototype.removeEventHandler=function(e){delete this.handlerData[e]},e.prototype.dispatch=function(e,t){for(var r in h.kg.debug("dispatch event: "+e,t||""),this.handlerData){var n=this.handlerData[r][e];n&&n(t)}},e}(),ee=function(){};function te(e){this.onOpened=e.onOpened||ee,this.onPresence=e.onPresence||ee,this.onTextMessage=e.onTextMessage||ee,this.onPictureMessage=e.onPictureMessage||ee,this.onAudioMessage=e.onAudioMessage||ee,this.onVideoMessage=e.onVideoMessage||ee,this.onFileMessage=e.onFileMessage||ee,this.onLocationMessage=e.onLocationMessage||ee,this.onCmdMessage=e.onCmdMessage||ee,this.onCustomMessage=e.onCustomMessage||ee,this.onReceivedMessage=e.onReceivedMessage||ee,this.onDeliveredMessage=e.onDeliveredMessage||ee,this.onReadMessage=e.onReadMessage||ee,this.onRecallMessage=e.onRecallMessage||ee,this.onChannelMessage=e.onChannelMessage||ee,this.onError=e.onError||ee,this.onOffline=e.onOffline||ee,this.onOnline=e.onOnline||ee,this.onStatisticMessage=e.onStatisticMessage||ee,this.onContactInvited=e.onContactInvited||ee,this.onContactAgreed=e.onContactAgreed||ee,this.onContactRefuse=e.onContactRefuse||ee,this.onContactDeleted=e.onContactDeleted||ee,this.onContactAdded=e.onContactAdded||ee,this.onTokenWillExpire=e.onTokenWillExpire||ee,this.onTokenExpired=e.onTokenExpired||ee,this.onClosed=e.onClosed||ee,this.onPresenceStatusChange=e.onPresenceStatusChange||ee}__webpack_require__(7095);var re={biz:"",debug:!1,token:""},ne="https://data-reporting.agora.io/report",oe="https://data-reporting.sh.agoralab.co/report",ie=function(e){var t=Number(O.C8[e]);return t===O.C8.USER_LOGIN?"MANUALLOGIN":t===O.C8.MSYNC_SENDMESSAGE?"SENDMESSAGE":t>O.C8.UNKNOWOPERATION&&t<O.C8.REST_OPERATE?"REST":t>O.C8.REST_OPERATE&&t<O.C8.MSYNC_OPERATE?"MESSAGE":t>O.C8.MSYNC_OPERATE&&t<O.C8.ROSTER_OPERATE?"ROSTER":t>O.C8.ROSTER_OPERATE&&t<O.C8.USER_OPERATE?"USER":t>O.C8.USER_OPERATE&&t<O.C8.GROUP_OPERATE?"GROUP":t>O.C8.GROUP_OPERATE&&t<O.C8.CHATROOM_OPERATE?"CHATROOM":"OPERATION"},ae=function(){return(new Date).getTime()},se=function(e){return[s.iw.BAIDU,s.iw.WX,s.iw.DD,s.iw.ZFB,s.iw.TT,s.iw.QUICK_APP,s.iw.UNI].includes(e.platform)},ce=function(){return e=1,t=99999,e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e))+e;var e,t},ue={},le=1e3,pe=function(){function e(e){this.eventQueue=[],this.stock=le,this.config=e,this.governor()}return e.prototype.add=function(e){this.stock<=0?console.warn("Event Report limit ".concat(le," per minute")):(this.eventQueue.push(e),this.consume(),this.stock-=1)},e.prototype.consume=function(){var e=this;0!==this.eventQueue.length&&(this.timer&&this.eventQueue.length<=10&&clearTimeout(this.timer),this.timer=setTimeout((function(){var t,r=e.eventQueue.splice(0,10),n=r.filter((function(e){return e.appId===r[0].appId})),o=r.filter((function(e){return e.appId!==r[0].appId}));(t=e.eventQueue).unshift.apply(t,o),e.batchSend(n)}),1e3))},e.prototype.governor=function(){var e=this,t=setInterval((function(){e.stock=le}),6e4);"undefined"!=typeof addEventListener&&addEventListener("beforeunload",(function(){clearInterval(t)}))},e.prototype.batchSend=function(e){var t,r;if(void 0===e&&(e=[]),0!==e.length)try{var n=e.map((function(e){e.biz,e.appId;var t=e.eventId,r=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["biz","appId","eventId"]);return{eventId:Number(t),body:r}}));!function(e,t){try{var r=t.biz,n=t.appId,o=t.data,i=t.debug,a=t.onSuccess;if(!r)throw new Error("biz is not defined");ue.global||(ue=s.P6.getEnvInfo());var c=ue;if(se(c)){var u={url:i?oe:ne,data:o,method:"POST",success:function(){null==a||a()},fail:function(){},complete:function(){}},l={token:e,appid:null!=n?n:"",sendts:"".concat(Math.floor((new Date).getTime()/1e3)),biz:r,debug:"".concat(i)};if("zfb"===c.platform||"dd"===c.platform?u.headers=l:u.header=l,"dd"===c.platform)return c.global.httpRequest(u);c.global.request(u)}else{var p=new XMLHttpRequest;p.onreadystatechange=function(){2===p.readyState&&(null==a||a())},p.open("POST",i?oe:ne),p.setRequestHeader("Content-Type","application/json"),p.setRequestHeader("token",e),p.setRequestHeader("appid",null!=n?n:""),p.setRequestHeader("sendts","".concat(Math.floor((new Date).getTime()/1e3))),p.setRequestHeader("biz",r),p.setRequestHeader("debug","".concat(i)),p.send(JSON.stringify(o))}}catch(e){console.error(e)}}(this.config.token,{biz:null===(t=e[0])||void 0===t?void 0:t.biz,appId:null===(r=e[0])||void 0===r?void 0:r.appId,data:n,debug:this.config.debug,onSuccess:this.consume.bind(this)})}catch(e){console.error(e)}},e}(),he=function(){return he=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},he.apply(this,arguments)},de=new(function(){function e(e){this.inited=!1,this.appId="",this.biz="",this.eventQueue={},this.config=re,e&&this.init(e)}return e.prototype.init=function(e){var t;if(void 0===e&&(e={}),!e.biz||!e.token)throw new Error("Event Report: biz or token is not defined");try{this.appId=null!==(t=e.appId)&&void 0!==t?t:"",this.biz=e.biz,this.config=he(he({},re),e),this.eventQueue=new pe(this.config),this.log(e),this.inited=!0}catch(e){console.error(e)}},e.prototype.send=function(e,t,r){var n;if(void 0===t&&(t={}),this.inited){var o=he(he({},t),{eventId:Number(e),biz:this.biz,appId:null!==(n=null==r?void 0:r.appId)&&void 0!==n?n:this.appId});this.eventQueue.add(o),this.log(o)}else console.error("Event Report: init is not called")},e.prototype.log=function(e){try{if(this.config.debug){var t=e.payload,r=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["payload"]);console.log("%c Event Report: ".concat(this.config.biz," "),"background: #8A97FC; color: #fff"),console.table(r),t&&(console.info("payload:"),console.table(t))}}catch(e){console.error(e)}},e}()),fe=function(){return fe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},fe.apply(this,arguments)},me={requestName:"",subrequestid:"1",requestMethod:"GET",requestUrl:"",requestElapse:0,code:0,codeDesc:"",isLastApi:0,isSuccess:1},ye=function(){function e(e){this.platform=s.P6.getEnvInfo(),this.isReportDt=e.isReport||!1,this.isCollectDt=!0,se(this.platform)&&!this.isReportDt&&(this.isCollectDt=!1),this.eventQueue=[],this.accessChannel=T.yK,this.options=function(e,t){t.platform||(t=s.P6.getEnvInfo());var r=e.org,n=e.appkey,o=e.deviceId,i=e.sdkVersion,a=(null===navigator||void 0===navigator?void 0:navigator.userAgent)||"".concat(t.platform,"_mini_program");return{org:r,appkey:n,deviceId:o,sdkServiceId:"sid_".concat(s.P6.getUniqueId(),"_").concat(ce()),did:a,sdkVersion:i,os:T.Wc,sdkProduct:O.aC.web}}(e,this.platform),this.sid=this.options.sdkServiceId,this.init(e)}return e.getInstance=function(){return e.instance},e.prototype.getServiceId=function(){return this.sid||"sid_0"},e.prototype.setIsReportDt=function(e){this.isReportDt=e,e&&this.rptEventQueue()},e.prototype.setIsCollectDt=function(e){this.isCollectDt=e,e||(this.eventQueue=[])},e.prototype.rptEventQueue=function(){var e=this;this.eventQueue.length&&this.eventQueue.forEach((function(t,r){de.send(t.eventId,t.dt),r>=e.eventQueue.length-1&&(e.eventQueue=[])}))},e.prototype.init=function(t){e.instance||(e.instance=this,de.init({biz:T.el,token:T.$x,appId:t.appkey,debug:!1}),this.reportInit())},e.prototype.reportInit=function(){if(this.isCollectDt){var e=this.options,t=e.did,r=e.os,n=e.sdkVersion,o=e.deviceId;this.reportData(T.iB.INIT,{did:t,os:r,sdkVersion:n,deviceId:o})}},e.prototype.geOperateFun=function(e){var t=this;if(!this.isCollectDt)return function(){};var r=1,n=0,o="",i=ae(),a=e.uid,c=e.operationName;a&&(this.uid=a);var u={uid:this.uid,operationId:"opr_".concat(s.P6.getUniqueId(),"_").concat(ce()),requestid:"req_".concat(s.P6.getUniqueId(),"_").concat(ce()),operationName:c};return function(e){var a,l,p,h;if(e.data.isSuccess?(n=0,o=""):(0===e.data.code&&(e.data.code=-1),n=null!==(a=e.data.code)&&void 0!==a?a:n,o=null!==(l=e.data.codeDesc)&&void 0!==l?l:o),(null===(p=e.data)||void 0===p?void 0:p.accessChannel)&&(t.accessChannel=null===(h=e.data)||void 0===h?void 0:h.accessChannel),e.isRetry?(r++,e.data.subrequestid="".concat(r)):(u.requestid="req_".concat(s.P6.getUniqueId(),"_").concat(ce()),r=1),e.data.isLastApi){var d=ae();e.data.requestElapse=d-i,e.data.requestMethod="",e.data.subrequestid="0",e.data.code=200===n?0:n,e.data.codeDesc=o}else e.data.requestName||(e.data.requestName=c);e.data.requestElapse||(e.data.requestElapse=ae()-i),t.reportData.call(t,T.iB.API,fe(fe(fe(fe({},me),u),e.data),{accessChannel:t.accessChannel,operationType:ie(c)})),e.isEndApi&&t.reportData.call(t,T.iB.API,fe(fe(fe({},u),me),{isSuccess:e.data.isSuccess,isLastApi:1,subrequestid:"0",requestMethod:"",code:200===n?0:n,codeDesc:o,requestElapse:e.data.requestElapse,accessChannel:t.accessChannel,operationType:ie(c)}))}},e.prototype.reportData=function(e,t){return r=this,n=void 0,i=function(){var r,n,o,i,a,c,u,l;return function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(p){switch(p.label){case 0:return p.trys.push([0,3,,4]),r=ae(),n=0,e!==T.iB.API?[3,2]:[4,(h=this.platform,new Promise((function(e){var t;h.platform||(h=s.P6.getEnvInfo());var r="";if(h.platform===s.iw.WEB){var n=navigator.connection;(null==n?void 0:n.type)?(null==n||n.type,r=O.td.WIFI):(null==n?void 0:n.effectiveType)&&(r=O.td[n.effectiveType.toLocaleUpperCase()]),e(r)}else h.platform===s.iw.NODE?(r=O.td.UNKNOWN,e(r)):null===(t=h.global)||void 0===t||t.getNetworkType({success:function(t){r=O.td[t.networkType.toLocaleUpperCase()],e(r)}})})))];case 1:n=p.sent(),p.label=2;case 2:return o=this.options,i=o.appkey,a=o.sdkServiceId,c=o.sdkProduct,u=fe({lts:r,net:n,appkey:i,sdkServiceId:a,sdkProduct:c},t),this.isReportDt?de.send(e,u):this.isCollectDt&&this.eventQueue.push({eventId:e,dt:u}),[3,4];case 3:return l=p.sent(),console.warn(l),[3,4];case 4:return[2]}var h}))},new((o=void 0)||(o=Promise))((function(e,t){function a(e){try{c(i.next(e))}catch(e){t(e)}}function s(e){try{c(i.throw(e))}catch(e){t(e)}}function c(t){var r;t.done?e(t.value):(r=t.value,r instanceof o?r:new o((function(e){e(r)}))).then(a,s)}c((i=i.apply(r,n||[])).next())}));var r,n,o,i},e}(),ge=__webpack_require__(7486),ve=__webpack_require__(556),Ee=__webpack_require__(7800),_e=__webpack_require__(6369),Te=__webpack_require__(223),Oe=__webpack_require__(318),Re=__webpack_require__(606),Ie=function(){return Ie=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ie.apply(this,arguments)},Se=s.P6.getEnvInfo(),be="web"===Se.platform,Ce=function(){},Ae=function(){function e(t){var r;if(this.name="connection",this.isDebug=t.isDebug||!1,this.isReport=!1,this.isHttpDNS=void 0===t.isHttpDNS?be:t.isHttpDNS,this.heartBeatWait=t.heartBeatWait||3e4,this.autoReconnectNumMax=t.autoReconnectNumMax||5,this.refreshDNSIntervals=this.autoReconnectNumMax<5?this.autoReconnectNumMax:5,this.delivery=t.delivery||!1,this.dnsArr=["https://rs.easemob.com","https://rs.chat.agora.io","http://59.110.89.59","http://39.97.193.190","http://39.97.193.187"],this.dnsIndex=0,this.dnsTotal=this.dnsArr.length,this.restHosts=[],this.restTotal=0,this.restIndex=0,this.hostIndex=0,this.socketHost=[],this.hostTotal=0,this.times=1,this.autoReconnectNumTotal=0,this.domain="easemob.com",this.appKey=t.appKey,this.appName="",this.orgName="",this.token="",this.grantType="",this.apiUrl=t.apiUrl||"",this.url=t.url||"",this.https=t.https||"undefined"!=typeof window&&"https:"===(null===(r=window.location)||void 0===r?void 0:r.protocol),this.version="4.1.1",this.deviceId=t.deviceId||"webim",this.osType=16,this.useOwnUploadFun=t.useOwnUploadFun||!1,this.compressType=[0],this.encryptType=[0],this.clientResource="",this.expiresIn=0,this.expirationTime=0,this.logOut=!0,this.context={jid:{appKey:"",clientResource:"",domain:"easemob.com",name:""},userId:"",appKey:"",status:0,restTokenData:"",appName:"",orgName:"",root:{},accessToken:""},this._msgHash={},this._msgPromiseHash={},this._queues=[],this._load_msg_cache=[],this.unSendMsgArr=[],this.mr_cache={},"string"!=typeof this.appKey||2!==this.appKey.split("#").length)throw Error("Illegal appKey: ".concat(this.appKey));var n=this.appKey.split("#");this.orgName=n[0],this.appName=n[1],this.listen=te.bind(this),this.mSync=this.usePlugin($),this.eventHandler=this.usePlugin(Q),Object.assign(e.prototype,ge),Object.assign(e.prototype,ve),Object.assign(e.prototype,Ee),Object.assign(e.prototype,_e),Object.assign(e.prototype,Te),Object.assign(e.prototype,Oe),Object.assign(e.prototype,Re),this.dataReport=new ye({appkey:this.appKey,org:this.orgName,sdkVersion:this.version,deviceId:this.deviceId,isReport:this.isReport});var o=0,i=this;Object.defineProperty(s.P6,"ajaxUnconventionalErrorTimes",{set:function(e){0!==e&&(h.kg.debug("rest api request fail times: ".concat(e)),(o=e)%5==0&&this.isHttpDNS&&(h.kg.debug("refresh dns config when rest request fail."),Le.call(i,"refresh",{},{})))},get:function(){return o}})}return e.prototype.usePlugin=function(e,t){if(!t)return new e(this);this[t]=new e(this)},e.prototype.listen=function(e){},e.prototype.addEventHandler=function(e,t){},e.prototype.removeEventHandler=function(e){},e.prototype.registerUser=function(e){var t=this;return new Promise((function(r,n){var o=t.dataReport.geOperateFun({uid:e.username,operationName:O.fI.REGISTER});if(t.isHttpDNS){t.dnsIndex=0;var i=Ie(Ie({},e),{user:e.username,pwd:e.password,promise:{resolve:r,reject:n}});Le.call(t,"signup",i,{rpt:o})}else i=Ie(Ie({},e),{promise:{resolve:r,reject:n}}),Ne.call(t,i,{rpt:o})}))},e.prototype.open=function(e){var t=this;return h.kg.debug("open"),new Promise((function(r,n){if(xe.call(t,e)){e.accessToken&&(t.token=e.accessToken);var o=Ie(Ie({},e),{promise:{resolve:r,reject:n}}),i=t.dataReport.geOperateFun({uid:e.user,operationName:O.fI.LOGIN});t.isHttpDNS?Le.call(t,"login",o,{rpt:i}):we.call(t,o,{rpt:i})}}))},e.prototype.isOpened=function(){return this.sock&&1===this.sock.readyState||!1},e.prototype.close=function(){this.logOut=!0,this.context.status=c.E.STATUS_CLOSING,this.sock&&this.sock.close(),this.stopHeartBeat(),this.context.status=c.E.STATUS_CLOSED,this._load_msg_cache=[],this.unSendMsgArr=[],this._queues=[],this._msgHash={},this.mr_cache={}},e.prototype.stopHeartBeat=function(){clearInterval(this.heartBeatID)},e.prototype._checkOpenParams=function(e){return xe.call(this,e)},e.prototype.clear=function(){this.restTotal=0,this.restIndex=0,this.hostIndex=0,this.hostTotal=0},e.prototype.heartBeat=function(){},e.prototype.renewToken=function(e){var t=this;return this.isOpened()?this.getChatToken(e).then((function(e){var r=Date.now();return t.expirationTime=e.expire_timestamp,t.expiresIn=e.expire_timestamp-r,t.token=e.access_token,t.context.accessToken=e.access_token,t.clearTokenTimeout(),t.tokenExpireTimeCountDown(t.expiresIn),{status:!0,token:e.access_token,expire:e.expire_timestamp}})):Promise.reject({status:!1})},e.prototype.clearTokenTimeout=function(){h.kg.debug("clearTokenTimeout"),this.tokenWillExpireTimer&&clearTimeout(this.tokenWillExpireTimer),this.tokenExpiredTimer&&clearTimeout(this.tokenExpiredTimer)},e.prototype.tokenExpireTimeCountDown=function(e){var t=this;this.tokenWillExpireTimer=setTimeout((function(){var e;t.onTokenWillExpire&&t.onTokenWillExpire(),null===(e=t.eventHandler)||void 0===e||e.dispatch("onTokenWillExpire"),h.kg.info("onTokenWillExpire")}),e/2),this.tokenExpiredTimer=setTimeout((function(){var e;h.kg.info("onTokenExpired"),t.onTokenExpired&&t.onTokenExpired(),null===(e=t.eventHandler)||void 0===e||e.dispatch("onTokenExpired"),t.close()}),e)},e.prototype.compareTokenExpireTime=function(e,t){var r,n=Number(t)-Number(e);h.kg.debug("compareTokenExpireTime",n),n<=this.expiresIn/2&&n>0?(this.onTokenWillExpire&&this.onTokenWillExpire(),null===(r=this.eventHandler)||void 0===r||r.dispatch("onTokenWillExpire"),h.kg.info("onTokenWillExpire")):n<=0&&(this.closeByTokenExpired(),h.kg.info("closeByTokenExpired"))},e.prototype.closeByTokenExpired=function(){var e;h.kg.info("closed By TokenExpired"),this.onTokenExpired&&this.onTokenExpired(),null===(e=this.eventHandler)||void 0===e||e.dispatch("onTokenExpired"),this.close()},e.prototype.reconnect=function(){var e=this;h.kg.info("reconnect: time",this.times),h.kg.info("reconnect sock.readyState: ",this.sock.readyState),0!==this.sock.readyState&&1!==this.sock.readyState&&(this.isHttpDNS&&(this.hostIndex,this.socketHost.length),this.hostIndex++,this.hostIndex>=this.socketHost.length-1&&(this.hostIndex=this.socketHost.length-1),setTimeout((function(){h.kg.info("login sock.readyState: ",e.sock.readyState),1!==e.sock.readyState&&(e.sock.close(),Ue.call(e,{access_token:e.context.accessToken}),e.autoReconnectInterval+=e.times*e.times,e.times++)}),500*this.times),this.autoReconnectNumTotal++)},e.prototype.send=function(e){return Promise.resolve(null)},e.max_cache_length=100,e._getSock=function(){},e}();function Ne(e,t){var r=this,n=t.rpt,o=t.isRetry,i=e.promise,u=this.apiUrl+"/"+this.orgName+"/"+this.appName+"/users",l={requestName:O.c.RESISTER,requestUrl:u},p=e.error||Ce;if(!this.orgName&&!this.appName){var h=a.Z.create({type:c.E.WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR,message:"signup error"});p(h)}var d={headers:{"Content-type":"application/json"},url:u,dataType:"json",data:JSON.stringify({username:e.username,password:e.password,nickname:e.nickname||""}),success:function(t){e.success&&e.success(t);var r=Ie(Ie({},t),{type:c.E.REQUEST_SUCCESS});i.resolve&&i.resolve(r);var a=t.extraInfo,s=a.httpCode,u=a.elapse;n({isEndApi:!0,isRetry:o,data:Ie(Ie({},{requestElapse:u,isSuccess:1,code:s}),l)})},error:function(t){var a=t.extraInfo,s=a.elapse,c=a.httpCode,u=a.errDesc;return n({isRetry:o,data:Ie(Ie({},{requestElapse:s,isSuccess:0,code:c,codeDesc:u}),l)}),r.isHttpDNS&&r.restIndex+1<r.restTotal?(r.restIndex++,je.call(r),Ne.call(r,e,{rpt:n,isRetry:o}),Promise.reject(t)):(n({data:{isLastApi:1,isSuccess:0}}),r.clear(),i.reject&&i.reject(t),p(t))}};return s.P6.ajax(d).catch((function(e){i.reject&&i.reject(e)}))}function we(e,t){var r=this;if(xe.call(this,e)&&!this.isOpened()){var n=t.rpt,o=t.isRetry;Pe.call(this,e),this.user=e.user;var i=e.promise,u=this.context.appName,l=this.context.orgName,p=this.apiUrl+"/"+l+"/"+u+"/token";if(e.agoraToken)this.grantType="agoraToken",this.getChatToken(e.agoraToken).then((function(t){h.kg.info("getChatToken result:",t),r.expirationTime=t.expire_timestamp,r.token=t.access_token,r.context.accessToken=t.access_token,r.context.restTokenData=t.access_token;var o=t.extraInfo,a=o.httpCode,s=o.elapse;i.resolve({accessToken:t.access_token,expireTimestamp:t.expire_timestamp});var c={requestName:O.c.LOGIN_BY_AGORA_TOKEN,requestUrl:p,requestElapse:s,isSuccess:1,code:a};n({data:c}),Ue.call(r,Ie(Ie({},e),{access_token:t.access_token}),n)})).catch((function(e){var t,o=a.Z.create({type:c.E.WEBIM_CONNCTION_GETROSTER_ERROR,message:"get chat token fail",data:e});i.reject(o),r.onError&&r.onError(o),null===(t=r.eventHandler)||void 0===t||t.dispatch("onError",o);var s=e.extraInfo,u=s.elapse,l=s.httpCode,h=s.errDesc,d={requestName:O.c.LOGIN_BY_AGORA_TOKEN,requestUrl:p,requestElapse:u,isSuccess:0,code:l,codeDesc:h};n({data:d}),n({data:{isLastApi:1,isSuccess:0}})}));else if(e.accessToken)this.grantType="accessToken",this.token=e.accessToken,this.context.accessToken=e.accessToken,this.context.restTokenData=e.accessToken,i.resolve({accessToken:e.accessToken}),Ue.call(this,e,n);else{this.grantType="password";var d={grant_type:"password",username:e.user,password:e.pwd,timestamp:+new Date},f=JSON.stringify(d),m={headers:{"Content-type":"application/json"},url:p,dataType:"json",data:f,success:function(t){"function"==typeof e.success&&e.success(t),r.token=t.access_token,r.context.restTokenData=t.access_token,r.context.accessToken=t.access_token,i.resolve({accessToken:t.access_token,duration:t.expires_in});var a=t.extraInfo,s=a.httpCode,c=a.elapse,u={requestName:O.c.LOGIN_BY_PWD,requestElapse:c,requestUrl:p,isSuccess:1,code:s};n({isRetry:o,data:u}),Ue.call(r,t,n)}||Ce,error:function(t){var s,u=t.extraInfo,l=u.elapse,h=u.httpCode,d=u.errDesc,f={requestName:O.c.LOGIN_BY_PWD,requestElapse:l,requestUrl:p,isSuccess:0,code:h,codeDesc:d};if(n({isRetry:o,data:f}),r.isHttpDNS&&r.restIndex+1<r.restTotal)return r.restIndex++,je.call(r),void we.call(r,e,{rpt:n,isRetry:!0});n({data:{isLastApi:1,isSuccess:0}}),r.clear(),t.error&&t.error_description?(s=a.Z.create({type:c.E.WEBIM_CONNCTION_OPEN_USERGRID_ERROR,message:t.error_description,data:t}),r.onError&&r.onError(s)):(s=a.Z.create({type:c.E.WEBIM_CONNCTION_OPEN_ERROR,message:t.error_description,data:t}),r.onError&&r.onError(s)),"function"==typeof e.error&&e.error(s),i.reject(s)}||Ce,version:"4.0.8"};s.P6.ajax(m).catch((function(e){console.warn(e)}))}s.P6.listenNetwork(Me.bind(this),ke.bind(this))}}function Me(){var e;h.kg.debug("online"),this.onOnline&&this.onOnline(),null===(e=this.eventHandler)||void 0===e||e.dispatch("onOnline"),this.sock&&1!==this.sock.readyState&&(h.kg.debug("sock.readyState:",this.sock.readyState),!this.logOut&&this.reconnect())}function ke(){var e;h.kg.debug("offline"),this.onOffline&&this.onOffline(),null===(e=this.eventHandler)||void 0===e||e.dispatch("onOffline")}function Ue(e,t){var r=this,n=this._getSock();this.sock=n;var o=function(){var e;h.kg.debug("websockt onOpen"),r.logOut=!1,t&&t({data:{isLastApi:1,isSuccess:1,accessChannel:null===(e=r.socketHost[r.hostIndex])||void 0===e?void 0:e.channel}}),"zfb"!==Se.platform&&"dd"!==Se.platform||(r.sock.readyState=1);var o=s.P6.flow([r.mSync.generateProvision,r.mSync.base64transform])();try{n.send(o)}catch(e){var i=a.Z.create({type:c.E.SDK_RUNTIME_ERROR,message:"send message error",data:e});r.onError&&r.onError(i)}},i=function(){var e,t;if(h.kg.debug("websocket onClose"),"zfb"!==Se.platform&&"dd"!==Se.platform||(r.sock.readyState=3),!r.logOut&&r.autoReconnectNumTotal<r.autoReconnectNumMax){r.reconnect();var n={type:c.E.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"};r.onError&&r.onError(n),r.autoReconnectNumTotal%r.refreshDNSIntervals==0&&"web"===Se.platform&&r.isHttpDNS&&(h.kg.debug("refresh dns config when websocket close"),Le.call(r,"refresh",{},{}))}else r.logOut?(r.clear(),r.onClosed&&r.onClosed(),null===(e=r.eventHandler)||void 0===e||e.dispatch("onDisconnected"),r.mSync.stopHeartBeat(),r.autoReconnectInterval=0,r.times=1,r.autoReconnectNumTotal=0,r.hostIndex=0):(n={type:c.E.WEBIM_CONNCTION_DISCONNECTED,message:"websocket has been disconnected"},r.onError&&r.onError(n),r.onClosed&&r.onClosed(),null===(t=r.eventHandler)||void 0===t||t.dispatch("onDisconnected"),r.mSync.stopHeartBeat(),h.kg.debug("reconnect fail"),r.autoReconnectInterval=0,r.times=1,r.autoReconnectNumTotal=0,r.hostIndex=0)},u=function(e){var t=r.mSync,n=t.decodeMSync,o=t.distributeMSync;s.P6.flow([n,o])(e)};"web"===Se.platform?(n.onopen=o,n.onclose=i,n.onmessage=u):(n.onOpen(o),n.onMessage(u),n.onClose(i),n.onError((function(e){var n;h.kg.debug("mini program sock on error",e),r.onError&&r.onError({type:c.E.WEBIM_CONNECTION_ERROR,message:"on socket error",data:e}),!r.logOut&&r.autoReconnectNumTotal<r.autoReconnectNumMax&&3!==r.sock.readyState&&(h.kg.debug("sock.onError reconnect",r.autoReconnectNumTotal,r.autoReconnectNumMax),r.reconnect(),r.autoReconnectNumTotal%r.refreshDNSIntervals==0&&"web"===Se.platform&&r.isHttpDNS&&(h.kg.debug("refresh dns config when websocket error"),Le.call(r,"refresh",{},{}))),t&&t({data:{isLastApi:1,isSuccess:0,accessChannel:null===(n=r.socketHost[r.hostIndex])||void 0===n?void 0:n.channel}})})))}function xe(e){if(""===e.user){var t=a.Z.create({type:c.E.WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR,message:"the user cannot be empty"});return this.onError&&this.onError(t),!1}var r=this.appKey.split("#");return!(2!==r.length||!r[0]||!r[1])||(t=a.Z.create({type:c.E.WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR,message:"the appKey is illegal"}),this.onError&&this.onError(t),!1)}function Pe(e){this.context.jid={appKey:this.appKey,name:e.user,domain:this.domain,clientResource:this.clientResource};var t=this.appKey.split("#"),r=t[0],n=t[1];this.context.root=this.root,this.context.userId=e.user,this.context.appKey=this.appKey,this.context.appName=n,this.context.orgName=r}function Le(e,t,r){var n=this,o=r.rpt,i=r.isRetry,a=this.dnsArr[this.dnsIndex]+"/easemob/server.json",c={url:a,dataType:"json",type:"GET",data:{app_key:encodeURIComponent(this.appKey)},success:function(r){var s=r.extraInfo,c=s.elapse,u=s.httpCode,l={requestUrl:a,requestName:O.c.GET_DNS,requestElapse:c,isSuccess:1,code:u};"true"===(null==r?void 0:r.enableDataReport)?(n.dataReport.setIsCollectDt(!0),n.dataReport.setIsReportDt(!0)):(n.dataReport.setIsReportDt(!1),n.dataReport.setIsCollectDt(!1)),o&&o({isRetry:i,data:l});var p=r.rest.hosts,d=n.https?"https":"http";if(h.kg.info("httpType: "+d),!p)return Promise.reject(!1);for(var f=p.filter((function(e){if(e.protocol===d)return e})),m=0;m<f.length;m++)if(f[m].protocol===d){var y=f[m];f.splice(m,1),f.unshift(y)}n.restHosts=f,n.restTotal=f.length;var g=r["msync-ws"].hosts;if(!g)return Promise.reject(!1);var v=g.filter((function(e){return e.protocol===d&&e}));n.socketHost=v,n.hostTotal=v.length,je.call(n),"refresh"!==e&&("login"===e?we.call(n,t,{rpt:o}):Ne.call(n,t,{rpt:o}))}||Ce,error:function(r){var s=r.extraInfo,c=s.elapse,u=s.httpCode,l=s.errDesc,p={requestUrl:a,requestName:O.c.GET_DNS,isSuccess:0,code:u,codeDesc:l,requestElapse:c};o&&o({isRetry:i,data:p}),h.kg.debug("getHttpDNS fail: "+n.dnsIndex),n.dnsIndex++,n.dnsIndex<n.dnsTotal&&Le.call(n,e,t,{rpt:o,isRetry:!0})}||Ce};return s.P6.ajax(c).catch((function(e){console.warn(e)}))}function je(){var e,t;if(this.restIndex>this.restTotal)return h.kg.debug("restIndex > restTotal"),"";var r="",n=this.restHosts[this.restIndex],o=n.domain,i=n.ip,a=n.port,s=this.https?"https:":"http:";return i&&"undefined"!=typeof window&&"http:"===(null===(e=null===window||void 0===window?void 0:window.location)||void 0===e?void 0:e.protocol)?r=s+"//"+i+":"+a:(r=s+"//"+o,a&&"80"!==a&&"443"!==a&&(r+=":".concat(a)),"undefined"==typeof window||window.location||(r="https://"+o),"undefined"!=typeof window&&window.location&&"file:"===(null===(t=window.location)||void 0===t?void 0:t.protocol)&&(r="https://"+o)),"undefined"==typeof window&&(r=s+"//"+o),this.apiUrl=r,r}var De=__webpack_require__(2591);n().util.Long=i(),n().configure();var Ge=n().Root.fromJSON({nested:{easemob:{nested:{pb:{nested:{MessageBody:{fields:{type:{type:"Type",id:1},from:{type:"JID",id:2},to:{type:"JID",id:3},contents:{rule:"repeated",type:"Content",id:4},ext:{rule:"repeated",type:"KeyValue",id:5},ackMessageId:{type:"uint64",id:6},msgConfig:{type:"MessageConfig",id:7},ackContent:{type:"string",id:8},meta:{type:"string",id:9}},nested:{Content:{fields:{type:{type:"Type",id:1},text:{type:"string",id:2},latitude:{type:"double",id:3},longitude:{type:"double",id:4},address:{type:"string",id:5},displayName:{type:"string",id:6},remotePath:{type:"string",id:7},secretKey:{type:"string",id:8},fileLength:{type:"int32",id:9},action:{type:"string",id:10},params:{rule:"repeated",type:"KeyValue",id:11},duration:{type:"int32",id:12},size:{type:"Size",id:13},thumbnailRemotePath:{type:"string",id:14},thumbnailSecretKey:{type:"string",id:15},thumbnailDisplayName:{type:"string",id:16},thumbnailFileLength:{type:"int32",id:17},thumbnailSize:{type:"Size",id:18},customEvent:{type:"string",id:19},customExts:{rule:"repeated",type:"KeyValue",id:20},buildingName:{type:"string",id:21}},nested:{Type:{values:{TEXT:0,IMAGE:1,VIDEO:2,LOCATION:3,VOICE:4,FILE:5,COMMAND:6,CUSTOM:7}},Size:{fields:{width:{type:"double",id:1},height:{type:"double",id:2}}}}},Type:{values:{NORMAL:0,CHAT:1,GROUPCHAT:2,CHATROOM:3,READ_ACK:4,DELIVER_ACK:5,RECALL:6,CHANNEL_ACK:7}},MessageConfig:{fields:{allowGroupAck:{type:"bool",id:1}}}}},KeyValue:{oneofs:{value:{oneof:["varintValue","floatValue","doubleValue","stringValue"]}},fields:{key:{type:"string",id:1},type:{type:"ValueType",id:2},varintValue:{type:"int64",id:3},floatValue:{type:"float",id:4},doubleValue:{type:"double",id:5},stringValue:{type:"string",id:6}},nested:{ValueType:{values:{BOOL:1,INT:2,UINT:3,LLINT:4,FLOAT:5,DOUBLE:6,STRING:7,JSON_STRING:8}}}},JID:{fields:{appKey:{type:"string",id:1},name:{type:"string",id:2},domain:{type:"string",id:3},clientResource:{type:"string",id:4}}},ConferenceBody:{fields:{sessionId:{type:"string",id:1},operation:{type:"Operation",id:2},conferenceId:{type:"string",id:3},type:{type:"Type",id:4},content:{type:"string",id:5},network:{type:"string",id:6},version:{type:"string",id:7},identity:{type:"Identity",id:8},duration:{type:"string",id:9},peerName:{type:"string",id:10},endReason:{type:"EndReason",id:11},status:{type:"Status",id:12},isDirect:{type:"bool",id:13},controlType:{type:"StreamControlType",id:14},routeFlag:{type:"int32",id:15},routeKey:{type:"string",id:16}},nested:{Status:{fields:{errorCode:{type:"int32",id:1}}},Operation:{values:{JOIN:0,INITIATE:1,ACCEPT_INITIATE:2,ANSWER:3,TERMINATE:4,REMOVE:5,STREAM_CONTROL:6,MEDIA_REQUEST:7}},Type:{values:{VOICE:0,VIDEO:1}},Identity:{values:{CALLER:0,CALLEE:1}},EndReason:{values:{HANGUP:0,NORESPONSE:1,REJECT:2,BUSY:3,FAIL:4,UNSUPPORTED:5,OFFLINE:6}},StreamControlType:{values:{PAUSE_VOICE:0,RESUME_VOICE:1,PAUSE_VIDEO:2,RESUME_VIDEO:3}}}},MSync:{fields:{version:{type:"Version",id:1,options:{default:"MSYNC_V1"}},guid:{type:"JID",id:2},auth:{type:"string",id:3},compressAlgorimth:{type:"uint32",id:4},crypto:{type:"uint32",id:5},userAgent:{type:"string",id:6},pov:{type:"uint64",id:7},command:{type:"Command",id:8},deviceId:{type:"uint32",id:10},encryptType:{rule:"repeated",type:"EncryptType",id:11,options:{packed:!1}},encryptKey:{type:"string",id:12},payload:{type:"bytes",id:9}},nested:{Version:{values:{MSYNC_V1:0,MSYNC_V2:1}},Command:{values:{SYNC:0,UNREAD:1,NOTICE:2,PROVISION:3}}}},EncryptType:{values:{ENCRYPT_NONE:0,ENCRYPT_AES_128_CBC:1,ENCRYPT_AES_256_CBC:2}},CommSyncUL:{fields:{meta:{type:"Meta",id:1},key:{type:"uint64",id:2},queue:{type:"JID",id:3},isRoam:{type:"bool",id:4},lastFullRoamKey:{type:"uint64",id:5}}},CommSyncDL:{fields:{status:{type:"Status",id:1},metaId:{type:"uint64",id:2},serverId:{type:"uint64",id:3},metas:{rule:"repeated",type:"Meta",id:4},nextKey:{type:"uint64",id:5},queue:{type:"JID",id:6},isLast:{type:"bool",id:7},timestamp:{type:"uint64",id:8},isRoam:{type:"bool",id:9}}},CommNotice:{fields:{queue:{type:"JID",id:1}}},CommUnreadUL:{fields:{}},CommUnreadDL:{fields:{status:{type:"Status",id:1},unread:{rule:"repeated",type:"MetaQueue",id:2},timestamp:{type:"uint64",id:3}}},MetaQueue:{fields:{queue:{type:"JID",id:1},n:{type:"uint32",id:2}}},Meta:{fields:{id:{type:"uint64",id:1},from:{type:"JID",id:2},to:{type:"JID",id:3},timestamp:{type:"uint64",id:4},ns:{type:"NameSpace",id:5},payload:{type:"bytes",id:6},routetype:{type:"RouteType",id:7},ext:{type:"KeyValue",id:8},meta:{type:"bytes",id:9}},nested:{NameSpace:{values:{STATISTIC:0,CHAT:1,MUC:2,ROSTER:3,CONFERENCE:4,NOTIFY:5,QUERY:6}},RouteType:{values:{ROUTE_ALL:0,ROUTE_ONLINE:1}}}},Status:{fields:{errorCode:{type:"ErrorCode",id:1},reason:{type:"string",id:2},redirectInfo:{rule:"repeated",type:"RedirectInfo",id:3}},nested:{ErrorCode:{values:{OK:0,FAIL:1,UNAUTHORIZED:2,MISSING_PARAMETER:3,WRONG_PARAMETER:4,REDIRECT:5,TOKEN_EXPIRED:6,PERMISSION_DENIED:7,NO_ROUTE:8,UNKNOWN_COMMAND:9,PB_PARSER_ERROR:10,BIND_ANOTHER_DEVICE:11,IM_FORBIDDEN:12,TOO_MANY_DEVICES:13,PLATFORM_LIMIT:14,USER_MUTED:15,ENCRYPT_DISABLE:16,ENCRYPT_ENABLE:17,DECRYPT_FAILURE:18,PERMISSION_DENIED_EXTERNAL:19}}}},RedirectInfo:{fields:{host:{type:"string",id:1},port:{type:"uint32",id:2}}},Provision:{fields:{osType:{type:"OsType",id:1},version:{type:"string",id:2},networkType:{type:"NetworkType",id:3},appSign:{type:"string",id:4},compressType:{rule:"repeated",type:"CompressType",id:5,options:{packed:!1}},encryptType:{rule:"repeated",type:"EncryptType",id:6,options:{packed:!1}},encryptKey:{type:"string",id:7},status:{type:"Status",id:8},deviceUuid:{type:"string",id:9},isManualLogin:{type:"bool",id:10},password:{type:"string",id:11},deviceName:{type:"string",id:12},resource:{type:"string",id:13},auth:{type:"string",id:14},serviceId:{type:"string",id:16},actionVersion:{type:"string",id:17}},nested:{OsType:{values:{OS_IOS:0,OS_ANDROID:1,OS_LINUX:2,OS_OSX:3,OS_WIN:4,OS_OTHER:16}},NetworkType:{values:{NETWORK_NONE:0,NETWORK_WIFI:1,NETWORK_4G:2,NETWORK_3G:3,NETWORK_2G:4,NETWORK_WIRE:5}},CompressType:{values:{COMPRESS_NONE:0,COMPRESS_ZLIB:1}}}},MUCBody:{fields:{mucId:{type:"JID",id:1},operation:{type:"Operation",id:2},from:{type:"JID",id:3},to:{rule:"repeated",type:"JID",id:4},setting:{type:"Setting",id:5},reason:{type:"string",id:6},isChatroom:{type:"bool",id:7},status:{type:"Status",id:8},isThread:{type:"bool",id:9},mucParentId:{type:"JID",id:10},mucName:{type:"string",id:11},eventInfo:{type:"EventInfo",id:12}},nested:{Operation:{values:{CREATE:0,DESTROY:1,JOIN:2,LEAVE:3,APPLY:4,APPLY_ACCEPT:5,APPLY_DECLINE:6,INVITE:7,INVITE_ACCEPT:8,INVITE_DECLINE:9,KICK:10,GET_BLACKLIST:11,BAN:12,ALLOW:13,UPDATE:14,BLOCK:15,UNBLOCK:16,PRESENCE:17,ABSENCE:18,DIRECT_JOINED:19,ASSIGN_OWNER:20,ADD_ADMIN:21,REMOVE_ADMIN:22,ADD_MUTE:23,REMOVE_MUTE:24,UPDATE_ANNOUNCEMENT:25,DELETE_ANNOUNCEMENT:26,UPLOAD_FILE:27,DELETE_FILE:28,ADD_USER_WHITE_LIST:29,REMOVE_USER_WHITE_LIST:30,BAN_GROUP:31,REMOVE_BAN_GROUP:32,THREAD_CREATE:33,THREAD_DESTROY:34,THREAD_JOIN:35,THREAD_LEAVE:36,THREAD_KICK:37,THREAD_UPDATE:38,THREAD_PRESENCE:39,THREAD_ABSENCE:40,DISABLE_GROUP:41,ABLE_GROUP:42,SET_METADATA:43,DELETE_METADATA:44}},Setting:{fields:{name:{type:"string",id:1},desc:{type:"string",id:2},type:{type:"Type",id:3},maxUsers:{type:"int32",id:4},owner:{type:"string",id:5}},nested:{Type:{values:{PRIVATE_OWNER_INVITE:0,PRIVATE_MEMBER_INVITE:1,PUBLIC_JOIN_APPROVAL:2,PUBLIC_JOIN_OPEN:3,PUBLIC_ANONYMOUS:4}}}},Status:{fields:{errorCode:{type:"ErrorCode",id:1},description:{type:"string",id:2}},nested:{ErrorCode:{values:{OK:0,PERMISSION_DENIED:1,WRONG_PARAMETER:2,MUC_NOT_EXIST:3,USER_NOT_EXIST:4,UNKNOWN:5}}}},EventInfo:{fields:{eventType:{type:"EventType",id:1,options:{default:"EVENT_NONE"}},ext:{type:"string",id:2}},nested:{EventType:{values:{EVENT_NONE:0,CIRCLE_CHANNEL:1}}}}}},RosterBody:{fields:{operation:{type:"Operation",id:1},status:{type:"Status",id:2},from:{type:"JID",id:3},to:{rule:"repeated",type:"JID",id:4},reason:{type:"string",id:5},rosterVer:{type:"string",id:6},biDirection:{type:"bool",id:7}},nested:{Operation:{values:{GET_ROSTER:0,GET_BLACKLIST:1,ADD:2,REMOVE:3,ACCEPT:4,DECLINE:5,BAN:6,ALLOW:7,REMOTE_ACCEPT:8,REMOTE_DECLINE:9}},Status:{fields:{errorCode:{type:"ErrorCode",id:1},description:{type:"string",id:2}},nested:{ErrorCode:{values:{OK:0,USER_NOT_EXIST:1,USER_ALREADY_FRIEND:2,USER_ALREADY_BLACKLIST:3}}}}}},StatisticsBody:{fields:{operation:{type:"Operation",id:1},os:{type:"OsType",id:2},version:{type:"string",id:3},network:{type:"NetworkType",id:4},imTime:{type:"uint32",id:5},chatTime:{type:"uint32",id:6},location:{type:"string",id:7}},nested:{Operation:{values:{INFORMATION:0,USER_REMOVED:1,USER_LOGIN_ANOTHER_DEVICE:2,USER_KICKED_BY_CHANGE_PASSWORD:3,USER_KICKED_BY_OTHER_DEVICE:4}},OsType:{values:{OS_IOS:0,OS_ANDROID:1,OS_LINUX:2,OS_OSX:3,OS_WIN:4,OS_OTHER:16}},NetworkType:{values:{NETWORK_NONE:0,NETWORK_WIFI:1,NETWORK_4G:2,NETWORK_3G:3,NETWORK_2G:4,NETWORK_WIRE:5}}}}}}}}}});Ae.prototype.root=Ge;var Be=h.kg.getLogger("defaultLogger");Be.setConfig({useCache:!1,maxCache:3145728,color:"",background:""}),Be.enableAll(),Ae.prototype._getSock=function(){if(this.isHttpDNS){var e=this.socketHost[this.hostIndex];if(!e)throw this.autoReconnectInterval=0,this.times=1,this.autoReconnectNumTotal=0,this.hostIndex=0,this.onClosed&&this.onClosed(),new Error("No connected domain name when get websocket.");var r=e.domain,n=e.ip,o="",i=e.port;o=r||n,i&&"80"!==i&&"443"!==i&&(o+=":"+i),o&&(this.url="//"+o+"/ws");var a=this.https?"https:":"http:";this.url=a+this.url}return new(t())(this.url)},Ae.prototype.getUniqueId=s.P6.getUniqueId;var He={connection:Ae,message:De.Message,utils:s.P6,logger:Be,statusCode:c.E};"undefined"!=typeof window&&(window.WebIM=He);var Fe=He}(),__webpack_exports__}()}));