var parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c0){var o=n.item(0);t.data=o,t.url=window.URL.createObjectURL(o),t.filename=o.name||""}}else{o=document.getElementById(e).value;t.url=o;var a=o.lastIndexOf("/"),i=o.lastIndexOf("\\"),l=Math.max(a,i);t.filename=l<0?o:o.substring(l+1)}var s=t.filename.lastIndexOf(".");return-1!=s&&(t.filetype=t.filename.substring(s+1).toLowerCase()),t}catch(d){throw d}},getFileSize:function(e){var t=document.getElementById(e),r=0;return t&&t.files&&t.files.length>0&&(r=t.files[0].size),r},trim:function(e){return(e="string"==typeof e?e:"").trim?e.trim():e.replace(/^\s|\s$/g,"")},parseLink:function(e){return e=e.replace(/(https?\:\/\/|www\.)([a-zA-Z0-9-]+(\.[a-zA-Z0-9]+)+)(\:[0-9]{2,4})?\/?((\.[:_0-9a-zA-Z-]+)|[:_0-9a-zA-Z-]*\/?)*\??[:_#@*&%0-9a-zA-Z-\/=]*/gm,function(e){return""+e+""})},parseJSON:function(e){if(window.JSON&&window.JSON.parse)return window.JSON.parse(e+"");var t,r=null,n=f.trim(e+"");return n&&!f.trim(n.replace(/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g,function(e,n,o,a){return t&&n&&(r=0),0===r?e:(t=o||n,r+=!a-!o,"")}))?Function("return "+n)():Function("Invalid JSON: "+e)()},parseUploadResponse:function(e){return e.indexOf("callback")>-1?e.slice(9,-1):e},parseDownloadResponse:function(e){return e&&e.type&&"application/json"===e.type||0>Object.prototype.toString.call(e).indexOf("Blob")?this.url+"?token=":window.URL.createObjectURL(e)},uploadFile:function(e){(e=e||{}).onFileUploadProgress=e.onFileUploadProgress||c,e.onFileUploadComplete=e.onFileUploadComplete||c,e.onFileUploadError=e.onFileUploadError||c,e.onFileUploadCanceled=e.onFileUploadCanceled||c;var t=e.accessToken||this.context.accessToken;if(t){var r,o,a,i=e.appKey||this.context.appKey||"";if(i&&(r=(a=i.split("#"))[0],o=a[1]),r||o){var l=e.apiUrl;this.isHttpDNS&&(l=this.apiUrl);var s=l+"/"+r+"/"+o+"/chatfiles";if(f.isCanUploadFileAsync)if((e.file.data?e.file.data.size:void 0)<=0)e.onFileUploadError({type:n.WEBIM_UPLOADFILE_ERROR,id:e.id});else{var d=f.xmlrequest();d.upload&&d.upload.addEventListener("progress",e.onFileUploadProgress,!1),d.addEventListener?(d.addEventListener("abort",e.onFileUploadCanceled,!1),d.addEventListener("load",function(t){try{var r=f.parseJSON(d.responseText);try{e.onFileUploadComplete(r)}catch(t){e.onFileUploadError({type:n.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,data:t})}}catch(t){e.onFileUploadError({type:n.WEBIM_UPLOADFILE_ERROR,data:d.responseText,id:e.id,xhr:d})}},!1),d.addEventListener("error",function(t){e.onFileUploadError({type:n.WEBIM_UPLOADFILE_ERROR,id:e.id,xhr:d})},!1)):d.onreadystatechange&&(d.onreadystatechange=function(){if(4===d.readyState)if(200===ajax.status)try{var t=f.parseJSON(d.responseText);e.onFileUploadComplete(t)}catch(r){e.onFileUploadError({type:n.WEBIM_UPLOADFILE_ERROR,data:d.responseText,id:e.id,xhr:d})}else e.onFileUploadError({type:n.WEBIM_UPLOADFILE_ERROR,data:d.responseText,id:e.id,xhr:d});else d.abort(),e.onFileUploadCanceled()}),d.open("POST",s),d.setRequestHeader("restrict-access","true"),d.setRequestHeader("Accept","*/*"),d.setRequestHeader("Authorization","Bearer "+t);var p=new FormData;p.append("file",e.file.data),window.XDomainRequest&&(d.readyState=2),d.send(p)}else f.hasFlash&&"function"==typeof e.flashUpload?e.flashUpload&&e.flashUpload(s,e):e.onFileUploadError({type:n.WEBIM_UPLOADFILE_BROWSER_ERROR,id:e.id})}else e.onFileUploadError({type:n.WEBIM_UPLOADFILE_ERROR,id:e.id})}else e.onFileUploadError({type:n.WEBIM_UPLOADFILE_NO_LOGIN,id:e.id})},download:function(e){e.onFileDownloadComplete=e.onFileDownloadComplete||c,e.onFileDownloadError=e.onFileDownloadError||c;var t=e.accessToken||this.context.accessToken,r=f.xmlrequest();if(t){if(f.isCanDownLoadFile){"addEventListener"in r?(r.addEventListener("load",function(t){e.onFileDownloadComplete(r.response,r)},!1),r.addEventListener("error",function(t){e.onFileDownloadError({type:n.WEBIM_DOWNLOADFILE_ERROR,id:e.id,xhr:r})},!1)):"onreadystatechange"in r&&(r.onreadystatechange=function(){4===r.readyState?200===ajax.status?e.onFileDownloadComplete(r.response,r):e.onFileDownloadError({type:n.WEBIM_DOWNLOADFILE_ERROR,id:e.id,xhr:r}):(r.abort(),e.onFileDownloadError({type:n.WEBIM_DOWNLOADFILE_ERROR,id:e.id,xhr:r}))});var o=e.method||"GET",a=e.responseType||"blob",i=e.mimeType||"text/plain; charset=x-user-defined";r.open(o,e.url),"undefined"!=typeof Blob?r.responseType=a:r.overrideMimeType(i);var l={"X-Requested-With":"XMLHttpRequest",Accept:"application/octet-stream","share-secret":e.secret,Authorization:"Bearer "+t},s=e.headers||{};for(var d in s)l[d]=s[d];for(var d in l)l[d]&&r.setRequestHeader(d,l[d]);window.XDomainRequest&&(r.readyState=2),r.send(null)}else e.onFileDownloadComplete()}else e.onFileDownloadError({type:n.WEBIM_DOWNLOADFILE_NO_LOGIN,id:e.id})},parseTextMessage:function(e,t){if("string"==typeof e){if("[object Object]"!==Object.prototype.toString.call(t))return{isemoji:!1,body:[{type:"txt",data:e}]};var r=e,n=[],o=r.match(/\[[^[\]]{2,3}\]/gm);if(!o||o.length<1)return{isemoji:!1,body:[{type:"txt",data:e}]};for(var a=!1,i=0;i0?"&":"?")+(a?a+"&":a)+"_v="+(new Date).getTime(),o=null,a=null}wx.request({url:e.url,data:e.data,header:e.headers,method:n,success:function(e){"200"==e.statusCode?t(e.data):r(e)},complete:function(){},fail:function(e){r(e)}})},ts:function(){var e=new Date,t=e.getHours(),r=e.getMinutes(),n=e.getSeconds();return(t<10?"0"+t:t)+":"+(r<10?"0"+r:r)+":"+(n<10?"0"+n:n)+":"+e.getMilliseconds()+" "},getObjectKey:function(e,t){for(var r in e)if(e[r]==t)return r;return""},sprintf:function(){var e,t,r=arguments,n=r[0]||"";for(e=1,t=r.length;e0)return navigator.plugins["Shockwave Flash"];return 0}(),d=s(),u="undefined"!=typeof FormData,p="undefined"!=typeof Blob,c=d.setRequestHeader||!1,f=d.overrideMimeType||!1,y=c&&u,v=y||l,h=c&&(p||f);Object.keys||(Object.keys=function(){var e=Object.prototype.hasOwnProperty,t=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],o=n.length;return function(a){if("object"!==r(a)&&("function"!=typeof a||null===a))throw new TypeError("Object.keys called on non-object");var i,s,l=[];for(i in a)e.call(a,i)&&l.push(i);if(t)for(s=0;s0){var o=n.item(0);t.data=o,t.url=window.URL.createObjectURL(o),t.filename=o.name||""}}else{o=document.getElementById(e).value;t.url=o;var a=o.lastIndexOf("/"),i=o.lastIndexOf("\\"),s=Math.max(a,i);t.filename=s<0?o:o.substring(s+1)}var l=t.filename.lastIndexOf(".");return-1!=l&&(t.filetype=t.filename.substring(l+1).toLowerCase()),t}catch(d){throw d}},getFileSize:function(e){var t=this.getFileLength(e);if(t>1e7)return!1;var r=Math.round(t/1e3);if(r<1e3)t=r+" KB";else if(r>=1e3){var n=r/1e3;if(n<1e3)t=n.toFixed(1)+" MB";else t=(n/1e3).toFixed(1)+" GB"}return t},getFileLength:function(e){var t=0;if(e)if(e.files)e.files.length>0&&(t=e.files[0].size);else if(e.select&&"ActiveXObject"in window){e.select(),t=(e=new ActiveXObject("Scripting.FileSystemObject").GetFile(e.value)).Size}return t},hasFlash:l,trim:function(e){return(e="string"==typeof e?e:"").trim?e.trim():e.replace(/^\s|\s$/g,"")},parseLink:function(e){return e=e.replace(/(https?\:\/\/|www\.)([a-zA-Z0-9-]+(\.[a-zA-Z0-9]+)+)(\:[0-9]{2,4})?\/?((\.[:_0-9a-zA-Z-]+)|[:_0-9a-zA-Z-]*\/?)*\??[:_#@*&%0-9a-zA-Z-\/=]*/gm,function(e){return""+e+""})},parseJSON:function(e){if(window.JSON&&window.JSON.parse)return window.JSON.parse(e+"");var t,r=null,n=O.trim(e+"");return n&&!O.trim(n.replace(/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g,function(e,n,o,a){return t&&n&&(r=0),0===r?e:(t=o||n,r+=!a-!o,"")}))?Function("return "+n)():Function("Invalid JSON: "+e)()},parseUploadResponse:function(e){return e.indexOf("callback")>-1?e.slice(9,-1):e},parseDownloadResponse:function(e){return e&&e.type&&"application/json"===e.type||0>Object.prototype.toString.call(e).indexOf("Blob")?this.url+"?token=":window.URL.createObjectURL(e)},uploadFile:function(e){(e=e||{}).onFileUploadProgress=e.onFileUploadProgress||n,e.onFileUploadComplete=e.onFileUploadComplete||n,e.onFileUploadError=e.onFileUploadError||n,e.onFileUploadCanceled=e.onFileUploadCanceled||n;var t=e.accessToken||this.context.accessToken;if(t){var r,a,i,s=e.appKey||this.context.appKey||"";if(s&&(r=(i=s.split("#"))[0],a=i[1]),r||a){var l=e.apiUrl;this.isHttpDNS&&(l=this.apiUrl);var d=l+"/"+r+"/"+a+"/chatfiles";if(O.isCanUploadFileAsync)if((e.file.data?e.file.data.size:void 0)<=0)e.onFileUploadError({type:o.WEBIM_UPLOADFILE_ERROR,id:e.id});else{var u=O.xmlrequest();u.upload&&u.upload.addEventListener("progress",e.onFileUploadProgress,!1),u.addEventListener?(u.addEventListener("abort",e.onFileUploadCanceled,!1),u.addEventListener("load",function(t){try{var r=O.parseJSON(u.responseText);try{e.onFileUploadComplete(r)}catch(t){e.onFileUploadError({type:o.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,data:t})}}catch(t){e.onFileUploadError({type:o.WEBIM_UPLOADFILE_ERROR,data:u.responseText,id:e.id,xhr:u})}},!1),u.addEventListener("error",function(t){e.onFileUploadError({type:o.WEBIM_UPLOADFILE_ERROR,id:e.id,xhr:u})},!1)):u.onreadystatechange&&(u.onreadystatechange=function(){if(4===u.readyState)if(200===ajax.status)try{var t=O.parseJSON(u.responseText);e.onFileUploadComplete(t)}catch(r){e.onFileUploadError({type:o.WEBIM_UPLOADFILE_ERROR,data:u.responseText,id:e.id,xhr:u})}else e.onFileUploadError({type:o.WEBIM_UPLOADFILE_ERROR,data:u.responseText,id:e.id,xhr:u});else u.abort(),e.onFileUploadCanceled()}),u.open("POST",d),u.setRequestHeader("restrict-access","true"),u.setRequestHeader("Accept","*/*"),u.setRequestHeader("Authorization","Bearer "+t);var p=new FormData;p.append("file",e.file.data),window.XDomainRequest&&(u.readyState=2),u.send(p)}else O.hasFlash&&"function"==typeof e.flashUpload?e.flashUpload&&e.flashUpload(d,e):e.onFileUploadError({type:o.WEBIM_UPLOADFILE_BROWSER_ERROR,id:e.id})}else e.onFileUploadError({type:o.WEBIM_UPLOADFILE_ERROR,id:e.id})}else e.onFileUploadError({type:o.WEBIM_UPLOADFILE_NO_LOGIN,id:e.id})},download:function(e){e.onFileDownloadComplete=e.onFileDownloadComplete||n,e.onFileDownloadError=e.onFileDownloadError||n;var t=e.accessToken||this.context.accessToken;if(t){if(O.isCanDownLoadFile){var r=O.xmlrequest();"addEventListener"in r?(r.addEventListener("load",function(t){e.onFileDownloadComplete(r.response,r)},!1),r.addEventListener("error",function(t){e.onFileDownloadError({type:o.WEBIM_DOWNLOADFILE_ERROR,id:e.id,xhr:r})},!1)):"onreadystatechange"in r&&(r.onreadystatechange=function(){4===r.readyState?200===ajax.status?e.onFileDownloadComplete(r.response,r):e.onFileDownloadError({type:o.WEBIM_DOWNLOADFILE_ERROR,id:e.id,xhr:r}):(r.abort(),e.onFileDownloadError({type:o.WEBIM_DOWNLOADFILE_ERROR,id:e.id,xhr:r}))});var a=e.method||"GET",i=e.responseType||"blob",s=e.mimeType||"text/plain; charset=x-user-defined";r.open(a,e.url),"undefined"!=typeof Blob?r.responseType=i:r.overrideMimeType(s);var l={"X-Requested-With":"XMLHttpRequest",Accept:"application/octet-stream","share-secret":e.secret,Authorization:"Bearer "+t},d=e.headers||{};for(var u in d)l[u]=d[u];for(var u in l)l[u]&&r.setRequestHeader(u,l[u]);window.XDomainRequest&&(r.readyState=2),r.send(null)}else e.onFileDownloadComplete()}else e.onFileDownloadError({type:o.WEBIM_DOWNLOADFILE_NO_LOGIN,id:e.id})},parseTextMessage:function(e,t){if("string"==typeof e){if("[object Object]"!==Object.prototype.toString.call(t))return{isemoji:!1,body:[{type:"txt",data:e}]};var r=e,n=[],o=r.match(/\[[^[\]]{2,3}\]/gm);if(!o||o.length<1)return{isemoji:!1,body:[{type:"txt",data:e}]};for(var a=!1,i=0;i0?"&":"?")+(i?i+"&":i)+"_v="+(new Date).getTime(),a=null,i=null}console.log("wx.request",e.url),wx.request({url:e.url,data:e.data,header:e.headers,method:o,success:function(e){console.log("wx.request.success",arguments),"200"==e.statusCode?t(e.data):r(e)},complete:function(){console.log("wx.request.complete",arguments)},fail:function(){console.log("wx.request.fail",arguments)}})},ajax:function(e){var t=e.dataType||"text",r=e.success||n,a=e.error||n,i=O.xmlrequest();i.onreadystatechange=function(){if(4!==i.readyState)0===i.readyState&&a({type:o.WEBIM_CONNCTION_AJAX_ERROR,data:i.responseText});else{if(200===(i.status||0)){try{switch(t){case"text":return void r(i.responseText);case"json":var e=O.parseJSON(i.responseText);return void r(e,i);case"xml":return void(i.responseXML&&i.responseXML.documentElement?r(i.responseXML.documentElement,i):a({type:o.WEBIM_CONNCTION_AJAX_ERROR,data:i.responseText}))}r(i.response||i.responseText,i)}catch(n){}return}a({type:o.WEBIM_CONNCTION_AJAX_ERROR,data:i.responseText})}},e.responseType&&i.responseType&&(i.responseType=e.responseType),e.mimeType&&O.hasOverrideMimeType&&i.overrideMimeType(e.mimeType);var s=e.type||"POST",l=e.data||null,d="";if("get"===s.toLowerCase()&&l){for(var u in l)l.hasOwnProperty(u)&&(d+=u+"="+l[u]+"&");d=d?d.slice(0,-1):d,e.url+=(e.url.indexOf("?")>0?"&":"?")+(d?d+"&":d)+"_v="+(new Date).getTime(),l=null,d=null}if(i.open(s,e.url,O.isCanSetRequestHeader),O.isCanSetRequestHeader){var p=e.headers||{};for(var c in p)p.hasOwnProperty(c)&&i.setRequestHeader(c,p[c])}return window.XDomainRequest&&(i.readyState=2),i.send(l),i},ts:function(){var e=new Date,t=e.getHours(),r=e.getMinutes(),n=e.getSeconds();return(t<10?"0"+t:t)+":"+(r<10?"0"+r:r)+":"+(n<10?"0"+n:n)+":"+e.getMilliseconds()+" "},getObjectKey:function(e,t){for(var r in e)if(e[r]==t)return r;return""},sprintf:function(){var e,t,r=arguments,n=r[0]||"";for(e=1,t=r.length;e=this._array_h.length()&&(this._array_h.slice(this._index),this._index=0)),t},head:function(){var t=null,r=this._array_h.length();return r&&(t=this._array_h.at(r-1)),t},tail:function(){var t=null;return this._array_h.length()&&(t=this._array_h.at(this._index)),t},length:function(){return this._array_h.length()-this._index},empty:function(){return 0===this._array_h.length()},clear:function(){this._array_h.clear()}};var n=r;exports.default=n; },{}],"Aofe":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e,t=o(require("../checkEnv"));function o(e){return e&&e.__esModule?e:{default:e}}function a(e){return(a="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})(e)}function n(e){if(e&&"object"==a(e)){var t=[],o=this.context.root.lookup("easemob.pb.KeyValue"),n=[];for(var i in e){var m=o.decode(t);m.key=i,"object"==a(e[i])?(m.type=8,m.stringValue=JSON.stringify(e[i])):"string"==typeof e[i]?(m.type=7,m.stringValue=e[i]):"boolean"==typeof e[i]?(m.type=1,m.varintValue=e[i]):Number.isInteger(e[i])?(m.type=2,m.varintValue=e[i]):(m.type=6,m.doubleValue=e[i]),n.push(m)}return n}}e=t.default?require("../wx/utils").default:require("../utils").default;var i=function(e,t){t.isDebug&&console.log("上行消息:",e);var o=[],i=t.context.root.lookup("easemob.pb.MessageBody.Content").decode(o),m=t.context.root.lookup("easemob.pb.KeyValue"),r=[];switch(e.type){case"txt":i.type=0,i.text=e.msg;break;case"img":i.type=1,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"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.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.size=e.body.size,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.params=n.call(t,e.params),i.customEvent=e.customEvent,i.customExts=n.call(t,e.customExts)}if(e.ext)for(var s in e.ext){var p=m.decode(o);p.key=s,"object"==a(e.ext[s])?(p.type=8,p.stringValue=JSON.stringify(e.ext[s])):"string"==typeof e.ext[s]?(p.type=7,p.stringValue=e.ext[s]):"boolean"==typeof e.ext[s]?(p.type=1,p.varintValue=e.ext[s]):Number.isInteger(e.ext[s])?(p.type=2,p.varintValue=e.ext[s]):(p.type=6,p.doubleValue=e.ext[s]),r.push(p)}var l=t.context.root.lookup("easemob.pb.MessageBody"),y=l.decode(o);"recall"===e.type?(y.type=6,y.from={name:t.context.jid.name},y.to={name:e.to},y.ackMessageId=e.ackId):"delivery"===e.type?(y.type=5,y.from={name:t.context.jid.name},y.to={name:e.to},y.ackMessageId=e.ackId):"read"===e.type?(y.type=4,y.from={name:t.context.jid.name},y.to={name:e.to},y.ackMessageId=e.ackId,e.msgConfig&&"groupchat"===e.group&&!e.roomType&&(y.msgConfig=e.msgConfig,y.ackContent=e.ackContent)):e.group||e.roomType?"groupchat"!==e.group||e.roomType?"groupchat"===e.group&&e.roomType&&(y.type=3,y.from={name:t.context.jid.name},y.to={name:e.to}):(y.type=2,y.from={name:t.context.jid.name},y.to={name:e.to},e.msgConfig&&(y.msgConfig=e.msgConfig)):(y.type=1,y.from={name:t.context.jid.name},y.to={name:e.to}),y.contents=[i],y.ext=r,y=l.encode(y).finish();var c=t.context.root.lookup("easemob.pb.Meta").decode(o);if(c.id=e.id,"recall"===e.type){c.from=t.context.jid;var d="easemob.com";"groupchat"!==e.group&&"chatroom"!==e.group||(d="conference.easemob.com"),c.to={appKey:t.appKey,name:e.to,domain:d}}else if("delivery"===e.type)c.from=t.context.jid,c.to={appKey:t.appKey,name:e.to,domain:"easemob.com"};else if("read"===e.type){c.from=t.context.jid;d="easemob.com";"groupchat"===e.group&&(d="conference.easemob.com"),c.to={appKey:t.appKey,name:e.to,domain:d}}else e.group||e.roomType?"groupchat"!==e.group||e.roomType?"groupchat"===e.group&&e.roomType&&(c.from={appKey:t.appKey,name:t.user,domain:"conference.easemob.com"},c.to={appKey:t.appKey,name:e.to,domain:"conference.easemob.com"}):(c.from={appKey:t.appKey,name:t.user,domain:"conference.easemob.com"},c.to={appKey:t.appKey,name:e.to,domain:"conference.easemob.com"}):(c.from=t.context.jid,c.to={appKey:t.appKey,name:e.to,domain:"easemob.com"});c.ns=1,c.payload=y;var u=t.context.root.lookup("easemob.pb.CommSyncUL"),f=u.decode(o);f.meta=c,f=u.encode(f).finish();var g=t.context.root.lookup("easemob.pb.MSync"),b=g.decode(o);b.version=t.version,b.encryptType=t.encryptType,b.command=0,b.guid=t.context.jid,b.payload=f,b=g.encode(b).finish(),t.sendMSync(b)},m=function(t,o){var a=o||this;if(a.msg=t,t.file){if(a.msg.body&&a.msg.body.url)return void i(a.msg,o);var n=a.msg.onFileUploadComplete;a.msg.onFileUploadComplete=function(e){if(e.entities[0]["file-metadata"]){var t=e.entities[0]["file-metadata"]["content-length"];a.msg.filetype=e.entities[0]["file-metadata"]["content-type"],t>204800&&(a.msg.thumbnail=!0)}a.msg.body={type:a.msg.type||"file",url:(o.isHttpDNS?o.apiUrl+e.uri.substr(e.uri.indexOf("/",9)):e.uri)+"/"+e.entities[0].uuid,secret:e.entities[0]["share-secret"],filename:a.msg.file.filename||a.msg.filename,size:{width:a.msg.width||0,height:a.msg.height||0},length:a.msg.length||0,file_length:a.msg.ext.file_length||0,filetype:a.msg.filetype||a.msg.file.filetype},i(a.msg,o),n instanceof Function&&n(e,a.msg.id)},e.uploadFile.call(o,a.msg)}else i(a.msg,o)},r=m;exports.default=r; },{"../checkEnv":"PkDd","../wx/utils":"a9jn","../utils":"K0yk"}],"YA3p":[function(require,module,exports) { module.exports=t;var i=null;try{i=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(L){}function t(i,t,n){this.low=0|i,this.high=0|t,this.unsigned=!!n}function n(i){return!0===(i&&i.__isLong__)}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0}),t.isLong=n;var h={},s={};function e(i,t){var n,e,r;return t?(r=0<=(i>>>=0)&&i<256)&&(e=s[i])?e:(n=u(i,(0|i)<0?-1:0,!0),r&&(s[i]=n),n):(r=-128<=(i|=0)&&i<128)&&(e=h[i])?e:(n=u(i,i<0?-1:0,!1),r&&(h[i]=n),n)}function r(i,t){if(isNaN(i))return t?N:m;if(t){if(i<0)return N;if(i>=c)return p}else{if(i<=-w)return _;if(i+1>=w)return q}return i<0?r(-i,t).neg():u(i%d|0,i/d|0,t)}function u(i,n,h){return new t(i,n,h)}t.fromInt=e,t.fromNumber=r,t.fromBits=u;var o=Math.pow;function g(i,t,n){if(0===i.length)throw Error("empty string");if("NaN"===i||"Infinity"===i||"+Infinity"===i||"-Infinity"===i)return m;if("number"==typeof t?(n=t,t=!1):t=!!t,(n=n||10)<2||360)throw Error("interior hyphen");if(0===h)return g(i.substring(1),t,n).neg();for(var s=r(o(n,8)),e=m,u=0;u>>0:this.low},B.toNumber=function(){return this.unsigned?(this.high>>>0)*d+(this.low>>>0):this.high*d+(this.low>>>0)},B.toString=function(i){if((i=i||10)<2||36>>0).toString(i);if((e=g).isZero())return f+u;for(;f.length<6;)f="0"+f;u=""+f+u}},B.getHighBits=function(){return this.high},B.getHighBitsUnsigned=function(){return this.high>>>0},B.getLowBits=function(){return this.low},B.getLowBitsUnsigned=function(){return this.low>>>0},B.getNumBitsAbs=function(){if(this.isNegative())return this.eq(_)?64:this.neg().getNumBitsAbs();for(var i=0!=this.high?this.high:this.low,t=31;t>0&&0==(i&1<=0},B.isOdd=function(){return 1==(1&this.low)},B.isEven=function(){return 0==(1&this.low)},B.equals=function(i){return n(i)||(i=f(i)),(this.unsigned===i.unsigned||this.high>>>31!=1||i.high>>>31!=1)&&(this.high===i.high&&this.low===i.low)},B.eq=B.equals,B.notEquals=function(i){return!this.eq(i)},B.neq=B.notEquals,B.ne=B.notEquals,B.lessThan=function(i){return this.comp(i)<0},B.lt=B.lessThan,B.lessThanOrEqual=function(i){return this.comp(i)<=0},B.lte=B.lessThanOrEqual,B.le=B.lessThanOrEqual,B.greaterThan=function(i){return this.comp(i)>0},B.gt=B.greaterThan,B.greaterThanOrEqual=function(i){return this.comp(i)>=0},B.gte=B.greaterThanOrEqual,B.ge=B.greaterThanOrEqual,B.compare=function(i){if(n(i)||(i=f(i)),this.eq(i))return 0;var t=this.isNegative(),h=i.isNegative();return t&&!h?-1:!t&&h?1:this.unsigned?i.high>>>0>this.high>>>0||i.high===this.high&&i.low>>>0>this.low>>>0?-1:1:this.sub(i).isNegative()?-1:1},B.comp=B.compare,B.negate=function(){return!this.unsigned&&this.eq(_)?_:this.not().add(E)},B.neg=B.negate,B.add=function(i){n(i)||(i=f(i));var t=this.high>>>16,h=65535&this.high,s=this.low>>>16,e=65535&this.low,r=i.high>>>16,o=65535&i.high,g=i.low>>>16,l=0,a=0,d=0,c=0;return d+=(c+=e+(65535&i.low))>>>16,a+=(d+=s+g)>>>16,l+=(a+=h+o)>>>16,l+=t+r,u((d&=65535)<<16|(c&=65535),(l&=65535)<<16|(a&=65535),this.unsigned)},B.subtract=function(i){return n(i)||(i=f(i)),this.add(i.neg())},B.sub=B.subtract,B.multiply=function(t){if(this.isZero())return m;if(n(t)||(t=f(t)),i)return u(i.mul(this.low,this.high,t.low,t.high),i.get_high(),this.unsigned);if(t.isZero())return m;if(this.eq(_))return t.isOdd()?_:m;if(t.eq(_))return this.isOdd()?_:m;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(v)&&t.lt(v))return r(this.toNumber()*t.toNumber(),this.unsigned);var h=this.high>>>16,s=65535&this.high,e=this.low>>>16,o=65535&this.low,g=t.high>>>16,l=65535&t.high,a=t.low>>>16,d=65535&t.low,c=0,w=0,N=0,E=0;return N+=(E+=o*d)>>>16,w+=(N+=e*d)>>>16,N&=65535,w+=(N+=o*a)>>>16,c+=(w+=s*d)>>>16,w&=65535,c+=(w+=e*a)>>>16,w&=65535,c+=(w+=o*l)>>>16,c+=h*d+s*a+e*l+o*g,u((N&=65535)<<16|(E&=65535),(c&=65535)<<16|(w&=65535),this.unsigned)},B.mul=B.multiply,B.divide=function(t){if(n(t)||(t=f(t)),t.isZero())throw Error("division by zero");var h,s,e;if(i)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?u((this.unsigned?i.div_u:i.div_s)(this.low,this.high,t.low,t.high),i.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?N:m;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return N;if(t.gt(this.shru(1)))return y;e=N}else{if(this.eq(_))return t.eq(E)||t.eq(b)?_:t.eq(_)?E:(h=this.shr(1).div(t).shl(1)).eq(m)?t.isNegative()?E:b:(s=this.sub(t.mul(h)),e=h.add(s.div(t)));if(t.eq(_))return this.unsigned?N:m;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();e=m}for(s=this;s.gte(t);){h=Math.max(1,Math.floor(s.toNumber()/t.toNumber()));for(var g=Math.ceil(Math.log(h)/Math.LN2),l=g<=48?1:o(2,g-48),a=r(h),d=a.mul(t);d.isNegative()||d.gt(s);)d=(a=r(h-=l,this.unsigned)).mul(t);a.isZero()&&(a=E),e=e.add(a),s=s.sub(d)}return e},B.div=B.divide,B.modulo=function(t){return n(t)||(t=f(t)),i?u((this.unsigned?i.rem_u:i.rem_s)(this.low,this.high,t.low,t.high),i.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},B.mod=B.modulo,B.rem=B.modulo,B.not=function(){return u(~this.low,~this.high,this.unsigned)},B.and=function(i){return n(i)||(i=f(i)),u(this.low&i.low,this.high&i.high,this.unsigned)},B.or=function(i){return n(i)||(i=f(i)),u(this.low|i.low,this.high|i.high,this.unsigned)},B.xor=function(i){return n(i)||(i=f(i)),u(this.low^i.low,this.high^i.high,this.unsigned)},B.shiftLeft=function(i){return n(i)&&(i=i.toInt()),0==(i&=63)?this:i<32?u(this.low<>>32-i,this.unsigned):u(0,this.low<>>i|this.high<<32-i,this.high>>i,this.unsigned):u(this.high>>i-32,this.high>=0?0:-1,this.unsigned)},B.shr=B.shiftRight,B.shiftRightUnsigned=function(i){if(n(i)&&(i=i.toInt()),0===(i&=63))return this;var t=this.high;return i<32?u(this.low>>>i|t<<32-i,t>>>i,this.unsigned):u(32===i?t:t>>>i-32,0,this.unsigned)},B.shru=B.shiftRightUnsigned,B.shr_u=B.shiftRightUnsigned,B.toSigned=function(){return this.unsigned?u(this.low,this.high,!1):this},B.toUnsigned=function(){return this.unsigned?this:u(this.low,this.high,!0)},B.toBytes=function(i){return i?this.toBytesLE():this.toBytesBE()},B.toBytesLE=function(){var i=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&i,i>>>8&255,i>>>16&255,i>>>24]},B.toBytesBE=function(){var i=this.high,t=this.low;return[i>>>24,i>>>16&255,i>>>8&255,255&i,t>>>24,t>>>16&255,t>>>8&255,255&t]},t.fromBytes=function(i,n,h){return h?t.fromBytesLE(i,n):t.fromBytesBE(i,n)},t.fromBytesLE=function(i,n){return new t(i[0]|i[1]<<8|i[2]<<16|i[3]<<24,i[4]|i[5]<<8|i[6]<<16|i[7]<<24,n)},t.fromBytesBE=function(i,n){return new t(i[4]<<24|i[5]<<16|i[6]<<8|i[7],i[0]<<24|i[1]<<16|i[2]<<8|i[3],n)}; },{}],"TvlR":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e,t=i(require("long")),r=i(require("./sendChatMessage")),o=i(require("../status")),s=i(require("../checkEnv")),a=i(require("../message"));function i(e){return e&&e.__esModule?e:{default:e}}e=s.default?require("../wx/utils").default:require("../utils").default;var n=(0,o.default)(),g={0:"TEXT",1:"IMAGE",2:"VIDEO",3:"LOCATION",4:"VOICE",5:"FILE",6:"COMMAND",7:"CUSTOM"},d=function(e,t,o){if(e.delivery&&t.from!==t.to){var s=e.getUniqueId(),i=new a.default("delivery",s);i.set({ackId:o,to:t.from}),(0,r.default)(i.body,e)}},l=function(e){if(e){for(var r=e,o={},s=0;s0,x=o.errorCode,k=o.reason,v=f.contents[p],M=f.from.name,T=f.to.name,b={};f.ext&&(b=l(f.ext));try{switch(v.type){case 0:var E=f.contents[p].text;if(!O)var O={};var _=e.parseTextMessage(E,O&&O.Emoji);_.isemoji?(!(C={id:y,type:c,contentsType:"EMOJI",from:M,to:T,data:_.body,ext:b,time:m,msgConfig:f.msgConfig}).delay&&delete C.delay,!C.msgConfig&&delete f.msgConfig,C.error=h,C.errorText=k,C.errorCode=x,!a&&i.onEmojiMessage(C)):(!(C={id:y,type:c,contentsType:g[v.type],from:M,to:T,data:v.text,ext:b,sourceMsg:v.text,time:m,msgConfig:f.msgConfig}).msgConfig&&delete f.msgConfig,C.error=h,C.errorText=k,C.errorCode=x,!a&&s.onTextMessage(C));break;case 1:if(v.size)var I=v.size.width||0,P=v.size.height||0;!(C={id:y,type:c,contentsType:g[v.type],from:M,to:T,url:v.remotePath&&i.apiUrl+v.remotePath.substr(v.remotePath.indexOf("/",9)),secret:v.secretKey,filename:v.displayName,thumb:v.thumbnailRemotePath,thumb_secret:v.thumbnailSecretKey,file_length:v.fileLength||"",width:I,height:P,filetype:v.filetype||"",accessToken:s.token||"",ext:b,time:m,msgConfig:f.msgConfig}).delay&&delete C.delay,!C.msgConfig&&delete f.msgConfig,C.error=h,C.errorText=k,C.errorCode=x,!a&&s.onPictureMessage(C);break;case 2:!(C={id:y,type:c,contentsType:g[v.type],from:M,to:T,url:v.remotePath&&i.apiUrl+v.remotePath.substr(v.remotePath.indexOf("/",9)),secret:v.secretKey,filename:v.displayName,length:v.duration||"",file_length:v.fileLength||"",filetype:v.filetype||"",accessToken:s.token||"",ext:b,time:m,msgConfig:f.msgConfig}).delay&&delete C.delay,!C.msgConfig&&delete f.msgConfig,C.error=h,C.errorText=k,C.errorCode=x,!a&&s.onVideoMessage(C);break;case 3:!(C={id:y,type:c,contentsType:g[v.type],from:M,to:T,addr:v.address,lat:v.latitude,lng:v.longitude,ext:b,time:m,msgConfig:f.msgConfig}).delay&&delete C.delay,!C.msgConfig&&delete f.msgConfig,C.error=h,C.errorText=k,C.errorCode=x,!a&&s.onLocationMessage(C);break;case 4:!(C={id:y,type:c,contentsType:g[v.type],from:M,to:T,url:v.remotePath&&i.apiUrl+v.remotePath.substr(v.remotePath.indexOf("/",9)),secret:v.secretKey,filename:v.displayName,file_length:v.fileLength||"",accessToken:s.token||"",ext:b,length:v.duration,time:m,msgConfig:f.msgConfig}).delay&&delete C.delay,!C.msgConfig&&delete f.msgConfig,C.error=h,C.errorText=k,C.errorCode=x,!a&&s.onAudioMessage(C);break;case 5:!(C={id:y,type:c,contentsType:g[v.type],from:M,to:T,url:v.remotePath&&i.apiUrl+v.remotePath.substr(v.remotePath.indexOf("/",9)),secret:v.secretKey,filename:v.displayName,file_length:v.fileLength,accessToken:s.token||"",ext:b,time:m,msgConfig:f.msgConfig}).delay&&delete C.delay,!C.msgConfig&&delete f.msgConfig,C.error=h,C.errorText=k,C.errorCode=x,!a&&s.onFileMessage(C);break;case 6:!(C={id:y,contentsType:g[v.type],from:M,to:T,action:v.action,ext:b,time:m,msgConfig:f.msgConfig}).msgConfig&&delete f.msgConfig,C.error=h,C.errorText=k,C.errorCode=x,!a&&s.onCmdMessage(C);break;case 7:var N="",w="";f.contents[0].customExts&&(N=l(f.contents[0].customExts)),f.contents[0].params&&(w=l(f.contents[0].params)),C={id:y,contentsType:g[v.type],from:M,to:T,customEvent:v.customEvent,params:w,customExts:N,ext:b},!a&&s.onCustomMessage(C)}}catch(V){s.onError({type:n.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,data:V})}if(!a&&1===f.type&&s.delivery&&d(s,C,y),a||s.delivery)return C.message_type=c,C}},f=m;exports.default=f; },{"long":"YA3p","./sendChatMessage":"Aofe","../status":"KLYY","../checkEnv":"PkDd","../message":"KTph","../wx/utils":"a9jn","../utils":"K0yk"}],"wnFo":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=n(require("long"));function n(e){return e&&e.__esModule?e:{default:e}}var o=function(n,o,t){var c=t.context.root.lookup("easemob.pb.MUCBody").decode(n.payload);new e.default(n.id.low,n.id.high,n.id.unsigned).toString();!function(e){var n={type:"",owner:c.from.name,gid:c.mucId.name,from:c.from.name,fromJid:c.from,to:c.to.length?c.to[0].name:"",toJid:c.to,chatroom:c.isChatroom,status:c.status};({32:function(){n.type=c.isChatroom?"rmChatRoomMute":"rmGroupMute",t.onPresence(n)},31:function(){n.type=c.isChatroom?"muteChatRoom":"muteGroup",t.onPresence(n)},30:function(){n.type=c.isChatroom?"rmUserFromChatRoomWhiteList":"rmUserFromGroupWhiteList",t.onPresence(n)},29:function(){n.type=c.isChatroom?"addUserToChatRoomWhiteList":"addUserToGroupWhiteList",t.onPresence(n)},28:function(){n.type="deleteFile",t.onPresence(n)},27:function(){n.type="uploadFile",t.onPresence(n)},26:function(){n.type="deleteAnnouncement",t.onPresence(n)},25:function(){n.type="updateAnnouncement",t.onPresence(n)},24:function(){n.type="removeMute",t.onPresence(n)},23:function(){n.type="addMute",t.onPresence(n)},22:function(){n.type="removeAdmin",t.onPresence(n)},21:function(){n.type="addAdmin",t.onPresence(n)},20:function(){n.type="changeOwner",t.onPresence(n)},19:function(){n.type="direct_joined",t.onPresence(n)},18:function(){n.type=c.isChatroom?"leaveChatRoom":"leaveGroup",t.onPresence(n)},17:function(){n.type=c.isChatroom?"memberJoinChatRoomSuccess":"memberJoinPublicGroupSuccess",t.onPresence(n)},16:function(){n.type="unblock",t.onPresence(n)},15:function(){n.type="block",t.onPresence(n)},14:function(){n.type="update",t.onPresence(n)},13:function(){n.type="allow",n.reason=c.reason,t.onPresence(n)},12:function(){n.type="ban",t.onPresence(n)},11:function(){n.type="getBlackList",t.onPresence(n)},10:function(){n.type="removedFromGroup",n.kicked=n.to,t.onPresence(n)},9:function(){n.type="invite_decline",n.kicked=n.to,t.onPresence(n)},8:function(){n.type="invite_accept",n.kicked=n.to,t.onPresence(n)},7:function(){n.type="invite",n.kicked=n.to,t.onPresence(n)},6:function(){n.type="joinPublicGroupDeclined",t.onPresence(n)},5:function(){n.type="joinPublicGroupSuccess",t.onPresence(n)},4:function(){n.type="joinGroupNotifications",n.reason=c.reason,t.onPresence(n)},3:function(){n.type="leave",t.onPresence(n)},2:function(){n.type="join",t.onPresence(n)},1:function(){n.type="deleteGroupChat",t.onPresence(n)}}[e]||function(){console.log("%c没有匹配".concat(e,"类型"),"background: green")})()}(c.operation)},t=o;exports.default=t; },{"long":"YA3p"}],"UOYe":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=o(require("long"));function o(e){return e&&e.__esModule?e:{default:e}}var a=function(e,o,a){var t=[],n=a.context.root.lookup("easemob.pb.RosterBody"),r=n.decode(t);"add"===o?r.operation=2:"remove"===o?r.operation=3:"accept"===o?r.operation=4:"decline"===o?r.operation=5:"ban"===o?r.operation=6:"allow"===o&&(r.operation=7),r.from=a.context.jid;var s=[];if("string"==typeof e.to)s.push({appKey:a.appKey||a.context.appKey,name:e.to,domain:"easemob.com"});else if(e.to instanceof Array)for(var c=0;c>8-i%1*8)){if((n=a.charCodeAt(i+=.75))>255)throw new r("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");o=o<<8|n}return f}),e.atob||(e.atob=function(e){var o=String(e).replace(/[=]+$/,"");if(o.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,a,i=0,c=0,f="";a=o.charAt(c++);~a&&(n=i%4?64*n+a:a,i++%4)?f+=String.fromCharCode(255&n>>(-2*i&6)):0)a=t.indexOf(a);return f})}(); },{}],"np0Q":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e,r=a(require("./checkEnv")),t=a(require("./chat/handleChatMessage")),s=a(require("./status"));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var n,i=require("Base64"),p=(0,s.default)();n=r.default?require("./wx/utils").default:require("./utils").default;var u=(o(e={mr_cache:[],_fetchMessages:function(e,r){var s=e.accessToken||r.context.accessToken;if(n.isCanSetRequestHeader)if(s){var a=r.apiUrl,o=r.context.appName,u=r.context.orgName;if(!o||!u)return void r.onError({type:p.WEBIM_CONNCTION_AUTH_ERROR});if(!e.queue)return void r.onError({type:"",msg:"queue is not specified"});var c=e.queue,h=this.mr_cache[c]||(this.mr_cache[c]={msgs:[]}),m=r.context.userId,y=-1;if(h.msgs.length>=e.count||h.is_last)return void("function"==typeof e.success&&e.success(h));h&&h.next_key&&(y=h.next_key);var f={queue:c+(e.isGroup?"@conference.easemob.com":"@easemob.com"),start:y,end:-1},l={url:a+"/"+u+"/"+o+"/users/"+m+"/messageroaming",dataType:"json",type:"POST",headers:{Authorization:"Bearer "+s},data:JSON.stringify(f),success:function(s,a){if(s&&s.data){var o=s.data;if(!s.data.msgs)return"function"==typeof e.success&&e.success(h),h.is_last=!0,void(h.next_key="");var n=o.msgs,p=n.length;h.is_last=o.is_last,h.next_key=o.next_key;var u=function(e){for(var s=[],a=0,o=(e=i.atob(e)).length;a=t||r.is_last?e.success&&e.success(n.reverse(r.msgs.splice(0,t))):s()},fail:function(){}},r)}()}else r.onError({type:"",msg:"queue is not specified"})},pagingHistoryMessages:function(e){var r=this,s=e.accessToken||r.context.accessToken;if(n.isCanSetRequestHeader)if(s){var a=r.apiUrl,o=r.context.appName,u=r.context.orgName;if(!o||!u)return void r.onError({type:p.WEBIM_CONNCTION_AUTH_ERROR});if(!e.queue)return void r.onError({type:"",msg:"queue is not specified"});var c=e.queue,h=r.context.userId,m={queue:c+(e.isGroup?"@conference.easemob.com":"@easemob.com"),start:e.start,end:e.end},y={url:a+"/"+u+"/"+o+"/users/"+h+"/messageroaming",dataType:"json",type:"POST",headers:{Authorization:"Bearer "+s},data:JSON.stringify(m),success:function(s,a){if(s&&s.data){var o=s.data;if(!s.data.msgs)return void("function"==typeof e.success&&e.success({msgs:[]}));var n=o.msgs,p=n.length,u=function(e){for(var s=[],a=0,o=(e=i.atob(e)).length;a>>0,this.hi=i>>>0}module.exports=t;var i=t.zero=new t(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var o=t.zeroHash="\0\0\0\0\0\0\0\0";t.fromNumber=function(o){if(0===o)return i;var h=o<0;h&&(o=-o);var r=o>>>0,n=(o-r)/4294967296>>>0;return h&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new t(r,n)},t.from=function(o){return"number"==typeof o?t.fromNumber(o):"string"==typeof o||o instanceof String?t.fromNumber(parseInt(o,10)):o.low||o.high?new t(o.low>>>0,o.high>>>0):i},t.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var i=1+~this.lo>>>0,o=~this.hi>>>0;return i||(o=o+1>>>0),-(i+4294967296*o)}return this.lo+4294967296*this.hi},t.prototype.toLong=function(t){return{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var h=String.prototype.charCodeAt;t.fromHash=function(r){return r===o?i:new t((h.call(r,0)|h.call(r,1)<<8|h.call(r,2)<<16|h.call(r,3)<<24)>>>0,(h.call(r,4)|h.call(r,5)<<8|h.call(r,6)<<16|h.call(r,7)<<24)>>>0)},t.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)},t.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},t.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},t.prototype.length=function(){var t=this.lo,i=(this.lo>>>28|this.hi<<4)>>>0,o=this.hi>>>24;return 0===o?0===i?t<16384?t<128?1:2:t<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:o<128?9:10}; },{}],"8kOt":[function(require,module,exports) { function r(r,n,u){var t=u||8192,e=t>>>1,l=null,o=t;return function(u){if(u<1||u>e)return r(u);o+u>t&&(l=r(t),o=0);var a=n.call(l,o,o+=u);return 7&o&&(o=1+(7|o)),a}}module.exports=r; },{}],"Hofe":[function(require,module,exports) { function n(n){return"undefined"!=typeof Float32Array?function(){var e=new Float32Array([-0]),t=new Uint8Array(e.buffer),r=128===t[3];function o(n,r,o){e[0]=n,r[o]=t[0],r[o+1]=t[1],r[o+2]=t[2],r[o+3]=t[3]}function u(n,r,o){e[0]=n,r[o]=t[3],r[o+1]=t[2],r[o+2]=t[1],r[o+3]=t[0]}function a(n,r){return t[0]=n[r],t[1]=n[r+1],t[2]=n[r+2],t[3]=n[r+3],e[0]}function i(n,r){return t[3]=n[r],t[2]=n[r+1],t[1]=n[r+2],t[0]=n[r+3],e[0]}n.writeFloatLE=r?o:u,n.writeFloatBE=r?u:o,n.readFloatLE=r?a:i,n.readFloatBE=r?i:a}():function(){function u(n,e,t,r){var o=e<0?1:0;if(o&&(e=-e),0===e)n(1/e>0?0:2147483648,t,r);else if(isNaN(e))n(2143289344,t,r);else if(e>3.4028234663852886e38)n((o<<31|2139095040)>>>0,t,r);else if(e<1.1754943508222875e-38)n((o<<31|Math.round(e/1.401298464324817e-45))>>>0,t,r);else{var u=Math.floor(Math.log(e)/Math.LN2);n((o<<31|u+127<<23|8388607&Math.round(e*Math.pow(2,-u)*8388608))>>>0,t,r)}}function a(n,e,t){var r=n(e,t),o=2*(r>>31)+1,u=r>>>23&255,a=8388607&r;return 255===u?a?NaN:o*(1/0):0===u?1.401298464324817e-45*o*a:o*Math.pow(2,u-150)*(a+8388608)}n.writeFloatLE=u.bind(null,e),n.writeFloatBE=u.bind(null,t),n.readFloatLE=a.bind(null,r),n.readFloatBE=a.bind(null,o)}(),"undefined"!=typeof Float64Array?function(){var e=new Float64Array([-0]),t=new Uint8Array(e.buffer),r=128===t[7];function o(n,r,o){e[0]=n,r[o]=t[0],r[o+1]=t[1],r[o+2]=t[2],r[o+3]=t[3],r[o+4]=t[4],r[o+5]=t[5],r[o+6]=t[6],r[o+7]=t[7]}function u(n,r,o){e[0]=n,r[o]=t[7],r[o+1]=t[6],r[o+2]=t[5],r[o+3]=t[4],r[o+4]=t[3],r[o+5]=t[2],r[o+6]=t[1],r[o+7]=t[0]}function a(n,r){return t[0]=n[r],t[1]=n[r+1],t[2]=n[r+2],t[3]=n[r+3],t[4]=n[r+4],t[5]=n[r+5],t[6]=n[r+6],t[7]=n[r+7],e[0]}function i(n,r){return t[7]=n[r],t[6]=n[r+1],t[5]=n[r+2],t[4]=n[r+3],t[3]=n[r+4],t[2]=n[r+5],t[1]=n[r+6],t[0]=n[r+7],e[0]}n.writeDoubleLE=r?o:u,n.writeDoubleBE=r?u:o,n.readDoubleLE=r?a:i,n.readDoubleBE=r?i:a}():function(){function u(n,e,t,r,o,u){var a=r<0?1:0;if(a&&(r=-r),0===r)n(0,o,u+e),n(1/r>0?0:2147483648,o,u+t);else if(isNaN(r))n(0,o,u+e),n(2146959360,o,u+t);else if(r>1.7976931348623157e308)n(0,o,u+e),n((a<<31|2146435072)>>>0,o,u+t);else{var i;if(r<2.2250738585072014e-308)n((i=r/5e-324)>>>0,o,u+e),n((a<<31|i/4294967296)>>>0,o,u+t);else{var l=Math.floor(Math.log(r)/Math.LN2);1024===l&&(l=1023),n(4503599627370496*(i=r*Math.pow(2,-l))>>>0,o,u+e),n((a<<31|l+1023<<20|1048576*i&1048575)>>>0,o,u+t)}}}function a(n,e,t,r,o){var u=n(r,o+e),a=n(r,o+t),i=2*(a>>31)+1,l=a>>>20&2047,f=4294967296*(1048575&a)+u;return 2047===l?f?NaN:i*(1/0):0===l?5e-324*i*f:i*Math.pow(2,l-1075)*(f+4503599627370496)}n.writeDoubleLE=u.bind(null,e,0,4),n.writeDoubleBE=u.bind(null,t,4,0),n.readDoubleLE=a.bind(null,r,0,4),n.readDoubleBE=a.bind(null,o,4,0)}(),n}function e(n,e,t){e[t]=255&n,e[t+1]=n>>>8&255,e[t+2]=n>>>16&255,e[t+3]=n>>>24}function t(n,e,t){e[t]=n>>>24,e[t+1]=n>>>16&255,e[t+2]=n>>>8&255,e[t+3]=255&n}function r(n,e){return(n[e]|n[e+1]<<8|n[e+2]<<16|n[e+3]<<24)>>>0}function o(n,e){return(n[e]<<24|n[e+1]<<16|n[e+2]<<8|n[e+3])>>>0}module.exports=n(n); },{}],"Gmhw":[function(require,module,exports) { "use strict";function n(n,e){for(var r=new Array(arguments.length-1),t=0,l=2,o=!0;l0&&".."!==t[i-1]?t.splice(--i,2):l?t.splice(i,1):++i:"."===t[i]?t.splice(i,1):++i;return n+t.join("/")};e.resolve=function(e,l,n){return n||(l=t(l)),r(l)?l:(n||(e=t(e)),(e=e.replace(/(?:\/|^)[^\/]+$/,"")).length?t(e+"/"+l):l)}; },{}],"lxH0":[function(require,module,exports) { "use strict";var r=module.exports;r.length=function(r){var e=r.length;if(!e)return 0;for(var a=0;--e%4>1&&"="===r.charAt(e);)++a;return Math.ceil(3*r.length)/4-a};for(var e=new Array(64),a=new Array(123),t=0;t<64;)a[e[t]=t<26?t+65:t<52?t+71:t<62?t-4:t-59|43]=t++;r.encode=function(r,a,t){for(var n,o=null,i=[],c=0,s=0;a>2],n=(3&h)<<4,s=1;break;case 1:i[c++]=e[n|h>>4],n=(15&h)<<2,s=2;break;case 2:i[c++]=e[n|h>>6],i[c++]=e[63&h],s=0}c>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),c=0)}return s&&(i[c++]=e[n],i[c++]=61,1===s&&(i[c++]=61)),o?(c&&o.push(String.fromCharCode.apply(String,i.slice(0,c))),o.join("")):String.fromCharCode.apply(String,i.slice(0,c))};var n="invalid encoding";r.decode=function(r,e,t){for(var o,i=t,c=0,s=0;s1)break;if(void 0===(h=a[h]))throw Error(n);switch(c){case 0:o=h,c=1;break;case 1:e[t++]=o<<2|(48&h)>>4,o=h,c=2;break;case 2:e[t++]=(15&o)<<4|(60&h)>>2,o=h,c=3;break;case 3:e[t++]=(3&o)<<6|h,c=0}}if(1===c)throw Error(n);return t-i},r.test=function(r){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(r)}; },{}],"DDeL":[function(require,module,exports) { "use strict";var r=module.exports;r.length=function(r){for(var t=0,e=0,n=0;n191&&n<224?a[i++]=(31&n)<<6|63&r[t++]:n>239&&n<365?(n=((7&n)<<18|(63&r[t++])<<12|(63&r[t++])<<6|63&r[t++])-65536,a[i++]=55296+(n>>10),a[i++]=56320+(1023&n)):a[i++]=(15&n)<<12|(63&r[t++])<<6|63&r[t++],i>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,a)),i=0);return o?(i&&o.push(String.fromCharCode.apply(String,a.slice(0,i))),o.join("")):String.fromCharCode.apply(String,a.slice(0,i))},r.write=function(r,t,e){for(var n,o,a=e,i=0;i>6|192,t[e++]=63&n|128):55296==(64512&n)&&56320==(64512&(o=r.charCodeAt(i+1)))?(n=65536+((1023&n)<<10)+(1023&o),++i,t[e++]=n>>18|240,t[e++]=n>>12&63|128,t[e++]=n>>6&63|128,t[e++]=63&n|128):(t[e++]=n>>12|224,t[e++]=n>>6&63|128,t[e++]=63&n|128);return e-a}; },{}],"IUvN":[function(require,module,exports) { function e(t){return(e="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})(t)}module.exports=s;var t=require("./object");((s.prototype=Object.create(t.prototype)).constructor=s).className="Enum";var r=require("./namespace");function s(r,s,i,o,n){if(t.call(this,r,i),s&&"object"!==e(s))throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=o,this.comments=n||{},this.reserved=void 0,s)for(var u=Object.keys(s),a=0;a-1&&this.oneof.splice(r,1),t.partOf=null,this},o.prototype.onAdd=function(e){r.prototype.onAdd.call(this,e);for(var t=0;t]/g,r=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,t=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,e=/^ *[*\/]+ */,i=/^\s*\*?\/*/,u=/\n/g,l=/\s/,f=/\\(.?)/g,o={0:"\0",r:"\r",n:"\n",t:"\t"};function s(n){return n.replace(f,function(n,r){switch(r){case"\\":case"":return r;default:return o[r]||""}})}function a(f,o){f=f.toString();var a=0,c=f.length,h=1,g=null,v=null,d=0,p=!1,m=[],w=null;function x(n){return Error("illegal "+n+" (line "+h+")")}function b(n){return f.charAt(n)}function k(n,r){g=f.charAt(n++),d=h,p=!1;var t,l=n-(o?2:3);do{if(--l<0||"\n"===(t=f.charAt(l))){p=!0;break}}while(" "===t||"\t"===t);for(var s=f.substring(n,r).split(u),a=0;a0)return m.shift();if(w)return function(){var n="'"===w?t:r;n.lastIndex=a-1;var e=n.exec(f);if(!e)throw x("string");return a=n.lastIndex,y(w),w=null,s(e[1])}();var e,i,u,g,v;do{if(a===c)return null;for(e=!1;l.test(u=b(a));)if("\n"===u&&++h,++a===c)return null;if("/"===b(a)){if(++a===c)throw x("comment");if("/"===b(a))if(o){if(g=a,v=!1,A(a)){v=!0;do{if((a=I(a))===c)break;a++}while(A(a))}else a=Math.min(c,I(a)+1);v&&k(g,a),h++,e=!0}else{for(v="/"===b(g=a+1);"\n"!==b(++a);)if(a===c)return null;++a,v&&k(g,a-1),++h,e=!0}else{if("*"!==(u=b(a)))return"/";g=a+1,v=o||"*"===b(g);do{if("\n"===u&&++h,++a===c)throw x("comment");i=u,u=b(a)}while("*"!==i||"/"!==u);++a,v&&k(g,a-2),e=!0}}}while(e);var d=a;if(n.lastIndex=0,!n.test(b(d++)))for(;d");var n=_();if(!k.test(n))throw S(n,"name");M("=");var i=new a(R(n),B(_()),t,r);P(i,function(e){if("option"!==e)throw S(e);V(i,e),M(";")},function(){ee(i)}),e.add(i)}(n);break;case"required":case"optional":case"repeated":Q(n,e);break;case"oneof":!function(e,t){if(!k.test(t=_()))throw S(t,"name");var r=new i(R(t));P(r,function(e){"option"===e?(V(r,e),M(";")):(E(e),Q(r,"optional"))}),e.add(r)}(n,e);break;case"extensions":X(n.extensions||(n.extensions=[]));break;case"reserved":X(n.reserved||(n.reserved=[]),!0);break;default:if(!K||!b.test(e))throw S(e);E(e),Q(n,"optional")}}),e.add(n)}(e,t),!0;case"enum":return function(e,t){if(!k.test(t=_()))throw S(t,"name");var r=new o(t);P(r,function(e){switch(e){case"option":V(r,e),M(";");break;case"reserved":X(r.reserved||(r.reserved=[]),!0);break;default:!function(e,t){if(!k.test(t))throw S(t,"name");M("=");var r=B(_(),!0),n={};P(n,function(e){if("option"!==e)throw S(e);V(n,e),M(";")},function(){ee(n)}),e.add(t,r,n.comment)}(r,e)}}),e.add(r)}(e,t),!0;case"service":return function(e,t){if(!k.test(t=_()))throw S(t,"service name");var r=new s(t);P(r,function(e){if(!J(r,e)){if("rpc"!==e)throw S(e);!function(e,t){var r=t;if(!k.test(t=_()))throw S(t,"name");var n,a,i,o,s=t;M("("),M("stream",!0)&&(a=!0);if(!b.test(t=_()))throw S(t);n=t,M(")"),M("returns"),M("("),M("stream",!0)&&(o=!0);if(!b.test(t=_()))throw S(t);i=t,M(")");var f=new c(s,r,n,i,a,o);P(f,function(e){if("option"!==e)throw S(e);V(f,e),M(";")}),e.add(f)}(r,e)}}),e.add(r)}(e,t),!0;case"extend":return function(e,t){if(!b.test(t=_()))throw S(t,"reference");var r=t;P(null,function(t){switch(t){case"required":case"repeated":case"optional":Q(e,t,r);break;default:if(!K||!b.test(t))throw S(t);E(t),Q(e,"optional",r)}})}(e,t),!0}return!1}function P(e,t,r){var n=Z.line;if(e&&(e.comment=O(),e.filename=x.filename),M("{",!0)){for(var a;"}"!==(a=_());)t(a);M(";",!0)}else r&&r(),M(";"),e&&"string"!=typeof e.comment&&(e.comment=O(n))}function Q(e,t,a){var i=_();if("group"!==i){if(!b.test(i))throw S(i,"type");var o=_();if(!k.test(o))throw S(o,"name");o=R(o),M("=");var s=new n(o,B(_()),i,t,a);P(s,function(e){if("option"!==e)throw S(e);V(s,e),M(";")},function(){ee(s)}),e.add(s),K||!s.repeated||void 0===f.packed[i]&&void 0!==f.basic[i]||s.setOption("packed",!1,!0)}else!function(e,t){var a=_();if(!k.test(a))throw S(a,"name");var i=u.lcFirst(a);a===i&&(a=u.ucFirst(a));M("=");var o=B(_()),s=new r(a);s.group=!0;var c=new n(i,o,a,t);c.filename=x.filename,P(s,function(e){switch(e){case"option":V(s,e),M(";");break;case"required":case"optional":case"repeated":Q(s,e);break;default:throw S(e)}}),e.add(s).add(c)}(e,t)}function V(e,t){var r=M("(",!0);if(!b.test(t=_()))throw S(t,"name");var n=t;r&&(M(")"),n="("+n+")",t=C(),q.test(t)&&(n+=t,_())),M("="),W(e,n)}function W(e,t){if(M("{",!0))do{if(!k.test(z=_()))throw S(z,"name");"{"===C()?W(e,t+"."+z):(M(":"),"{"===C()?W(e,t+"."+z):Y(e,t+"."+z,U(!0)))}while(!M("}",!0));else Y(e,t,U(!0))}function Y(e,t,r){e.setOption&&e.setOption(t,r)}function ee(e){if(M("[",!0)){do{V(e,"option")}while(M(",",!0));M("]")}return e}for(;null!==(z=_());)switch(z){case"package":if(!j)throw S(z);D();break;case"import":if(!j)throw S(z);G();break;case"syntax":if(!j)throw S(z);H();break;case"option":if(!j)throw S(z);V(L,z),M(";");break;default:if(J(L,z)){j=!1;continue}throw S(z)}return x.filename=null,{package:$,imports:I,weakImports:F,syntax:N,root:y}}x._configure=function(){e=require("./tokenize"),t=require("./root"),r=require("./type"),n=require("./field"),a=require("./mapField"),i=require("./oneof"),o=require("./enum"),s=require("./service"),c=require("./method"),f=require("./types"),u=require("./util")}; },{"./tokenize":"5oGY","./root":"W2Lj","./type":"EOlb","./field":"ixQC","./mapField":"J/IO","./oneof":"ZsNy","./enum":"IUvN","./service":"irfy","./method":"Dw/M","./types":"K1j0","./util":"HQWY"}],"RclE":[function(require,module,exports) { module.exports=t;var e,l=/\/|\./;function t(e,u){l.test(e)||(e="google/protobuf/"+e+".proto",u={nested:{google:{nested:{protobuf:{nested:u}}}}}),t[e]=u}t("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),t("duration",{Duration:e={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),t("timestamp",{Timestamp:e}),t("empty",{Empty:{fields:{}}}),t("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}}}}),t("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}}}}),t("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),t.get=function(e){return t[e]||null}; },{}],"g5I+":[function(require,module,exports) { var t,e,n=module.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}function u(t){if(e===clearTimeout)return clearTimeout(t);if((e===o||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(t);try{return e(t)}catch(n){try{return e.call(null,t)}catch(n){return e.call(this,t)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:r}catch(n){t=r}try{e="function"==typeof clearTimeout?clearTimeout:o}catch(n){e=o}}();var c,s=[],l=!1,a=-1;function f(){l&&c&&(l=!1,c.length?s=c.concat(s):a=-1,s.length&&h())}function h(){if(!l){var t=i(f);l=!0;for(var e=s.length;e;){for(c=s,s=[];++a1)for(var n=1;n-1||(s.names.push(e),e in i&&u(e,i[e]))}u(f.name,f.pbJsonStr)}u.fromJSON=function(e,t){return e="string"==typeof e?JSON.parse(e):e,t||(t=new u),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},u.prototype.resolvePath=l.path.resolve,u.prototype.parseFromPbString=d,u.prototype.load=function e(t,r,n){"function"==typeof r&&(n=r,r=void 0);var s=this;if(!n)return l.asPromise(e,s,t,r);var f=n===p;function a(e,t){if(n){var r=n;if(n=null,f)throw e;r(e,t)}}function u(e,t){try{if(l.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),l.isString(t)){o.filename=e;var n,i=o(t,s,r),u=0;if(i.imports)for(;u-1){var o=e.substring(r);o in i&&(e=o)}if(!(s.files.indexOf(e)>-1))if(s.files.push(e),e in i)f?u(e,i[e]):(++c,setTimeout(function(){--c,u(e,i[e])}));else if(f){var p;try{p=l.fs.readFileSync(e).toString("utf8")}catch(d){return void(t||a(d))}u(e,p)}else++c,l.fetch(e,function(r,o){--c,n&&(r?t?c||a(null,s):a(r):u(e,o))})}var c=0;l.isString(t)&&(t=[t]);for(var m,h=0;h-1&&this.deferred.splice(t,1)}}else if(e instanceof f)c.test(e.name)&&delete e.parent[e.name];else if(e instanceof r){for(var n=0;n=t)return!0;return!1},u.isReservedName=function(e,t){if(e)for(var r=0;r0;){var o=e.shift();if(n.nested&&n.nested[o]){if(!((n=n.nested[o])instanceof u))throw Error("path conflicts with non-namespace objects")}else n.add(n=new u(o))}return t&&n.addJSON(t),n},u.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t-1)return o}else if(o instanceof u&&(o=o.lookup(e.slice(1),t,!0)))return o}else for(var i=0;i "+t.len)}function e(t){this.buf=t,this.pos=0,this.len=t.length}var n="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new e(t);if("undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer)return new e(new Uint8Array(t));throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new e(t);throw Error("illegal buffer")};function h(){var i=new t(0,0),s=0;if(!(this.len-this.pos>4)){for(;s<3;++s){if(this.pos>=this.len)throw o(this);if(i.lo=(i.lo|(127&this.buf[this.pos])<<7*s)>>>0,this.buf[this.pos++]<128)return i}return i.lo=(i.lo|(127&this.buf[this.pos++])<<7*s)>>>0,i}for(;s<4;++s)if(i.lo=(i.lo|(127&this.buf[this.pos])<<7*s)>>>0,this.buf[this.pos++]<128)return i;if(i.lo=(i.lo|(127&this.buf[this.pos])<<28)>>>0,i.hi=(i.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return i;if(s=0,this.len-this.pos>4){for(;s<5;++s)if(i.hi=(i.hi|(127&this.buf[this.pos])<<7*s+3)>>>0,this.buf[this.pos++]<128)return i}else for(;s<5;++s){if(this.pos>=this.len)throw o(this);if(i.hi=(i.hi|(127&this.buf[this.pos])<<7*s+3)>>>0,this.buf[this.pos++]<128)return i}throw Error("invalid varint encoding")}function u(t,i){return(t[i-4]|t[i-3]<<8|t[i-2]<<16|t[i-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw o(this,8);return new t(u(this.buf,this.pos+=4),u(this.buf,this.pos+=4))}e.create=r.Buffer?function(t){return(e.create=function(t){return r.Buffer.isBuffer(t)?new s(t):n(t)})(t)}:n,e.prototype._slice=r.Array.prototype.subarray||r.Array.prototype.slice,e.prototype.uint32=function(){var t=4294967295;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return t;if((this.pos+=5)>this.len)throw this.pos=this.len,o(this,10);return t}}(),e.prototype.int32=function(){return 0|this.uint32()},e.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},e.prototype.bool=function(){return 0!==this.uint32()},e.prototype.fixed32=function(){if(this.pos+4>this.len)throw o(this,4);return u(this.buf,this.pos+=4)},e.prototype.sfixed32=function(){if(this.pos+4>this.len)throw o(this,4);return 0|u(this.buf,this.pos+=4)},e.prototype.float=function(){if(this.pos+4>this.len)throw o(this,4);var t=r.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},e.prototype.double=function(){if(this.pos+8>this.len)throw o(this,4);var t=r.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},e.prototype.bytes=function(){var t=this.uint32(),i=this.pos,s=this.pos+t;if(s>this.len)throw o(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(i,s):i===s?new this.buf.constructor(0):this._slice.call(this.buf,i,s)},e.prototype.string=function(){var t=this.bytes();return i.read(t,0,t.length)},e.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw o(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw o(this)}while(128&this.buf[this.pos++]);return this},e.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4==(t=7&this.uint32()))break;this.skipType(t)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},e._configure=function(){t=require("./longBits"),i=require("./utf8");var s=r.Long?"toLong":"toNumber";r.merge(e.prototype,{int64:function(){return h.call(this)[s](!1)},uint64:function(){return h.call(this)[s](!0)},sint64:function(){return h.call(this).zzDecode()[s](!1)},fixed64:function(){return f.call(this)[s](!0)},sfixed64:function(){return f.call(this)[s](!1)}})}; },{"./util":"HQWY","./longBits":"n7JO","./utf8":"DDeL"}],"rxi2":[function(require,module,exports) { function e(r){return(e="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)}var r,t;function n(e,r){return e.name+": "+r+(e.repeated&&"array"!==r?"[]":e.map&&"object"!==r?"{k:"+e.keyType+"}":"")+" expected"}function i(e,i,a,s){var f=s.types;if(e.resolvedType)if(e.resolvedType instanceof r){if(Object.keys(e.resolvedType.values).indexOf(a)<0)return n(e,"enum value")}else{var o=f[i].verify(a);if(o)return e.name+"."+o}else switch(e.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":if(!t.isInteger(a))return n(e,"integer");break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":if(!(t.isInteger(a)||a&&t.isInteger(a.low)&&t.isInteger(a.high)))return n(e,"integer|Long");break;case"float":case"double":if("number"!=typeof a)return n(e,"number");break;case"bool":if("boolean"!=typeof a)return n(e,"boolean");break;case"string":if(!t.isString(a))return n(e,"string");break;case"bytes":if(!(a&&"number"==typeof a.length||t.isString(a)))return n(e,"buffer")}}function a(e,r){switch(e.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":if(!t.key32Re.test(r))return n(e,"integer key");break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":if(!t.key64Re.test(r))return n(e,"integer|Long key");break;case"bool":if(!t.key2Re.test(r))return n(e,"boolean key")}}function s(r){return function(s){return function(f){var o;if("object"!==e(f)||null===f)return"object expected";var u,c={};r.oneofsArray.length&&(u={});for(var y=0;y>>0).fork().uint32(8|i.mapKey[p.keyType])[p.keyType](m[v]),void 0===y?o[f].encode(c[m[v]],d.uint32(18).fork()).ldelim().ldelim():d.uint32(16|y)[s](c[m[v]]).ldelim()}else if(p.repeated){if(c&&c.length)if(p.packed&&void 0!==i.packed[s]){d.uint32((p.id<<3|2)>>>0).fork();for(var k=0;k>>0)).uint32((p.id<<3|4)>>>0):o[f].encode(c[g],d.uint32((p.id<<3|2)>>>0).fork()).ldelim():d.uint32((p.id<<3|y)>>>0)[s](c[g])}else(!p.optional||null!=c&&r.hasOwnProperty(p.name))&&(p.optional||null!=c&&r.hasOwnProperty(p.name)||console.warn("注意啦!!!很大概率会报错 类型:",r.$type?r.$type.name:"不晓得","没有设置对应的属性:",p.name,"检查是不是proto文件属性设置为了required"),void 0===y?p.resolvedType.group?o[f].encode(c,d.uint32((p.id<<3|3)>>>0)).uint32((p.id<<3|4)>>>0):o[f].encode(c,d.uint32((p.id<<3|2)>>>0).fork()).ldelim():d.uint32((p.id<<3|y)>>>0)[s](c))}return d}}}module.exports=n,n._configure=function(){e=require("./enum"),i=require("./types")}; },{"./enum":"IUvN","./types":"K1j0"}],"vfqs":[function(require,module,exports) { function e(o){return(e="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})(o)}var o,r,n;function t(e){return"missing required '"+e.name+"'"}function i(i){return function(u){var l=u.Reader,s=u.types,p=u.util;return function(u,c){u instanceof l||(u=l.create(u));for(var a,f=void 0===c?u.len:u.pos+c,y=new this.ctor;u.pos>>3,m=0,v=!1;m>>0:a[s]=l[s]>>>0;break;case"int32":case"sint32":case"sfixed32":u?a[s][c]=0|l[s][c]:a[s]=0|l[s];break;case"uint64":m=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":r.Long?u?a[s][c]=r.Long.fromValue(l[s][c]).unsigned=m:a[s]=r.Long.fromValue(l[s]).unsigned=m:"string"==typeof(u?l[s][c]:l[s])?u?a[s][c]=parseInt(l[s][c],10):a[s]=parseInt(l[s],10):"number"==typeof(u?l[s][c]:l[s])?u?a[s][c]=l[s][c]:a[s]=l[s]:"object"===e(u?l[s][c]:l[s])&&(u?a[s][c]=new r.LongBits(l[s][c].low>>>0,l[s][c].high>>>0).toNumber(m):a[s]=new r.LongBits(l[s].low>>>0,l[s].high>>>0).toNumber(m));break;case"bytes":"string"==typeof(u?l[s][c]:l[s])?u?r.base64.decode(l[s][c],a[s][c]=r.newBuffer(r.base64.length(l[s][c])),0):r.base64.decode(l[s],a[s]=r.newBuffer(r.base64.length(l[s])),0):(u?l[s][c]:l[s]).length&&(u?a[s][c]=l[s][c]:a[s]=l[s]);break;case"string":u?a[s][c]=String(l[s][c]):a[s]=String(l[s]);break;case"bool":u?a[s][c]=Boolean(l[s][c]):a[s]=Boolean(l[s])}}}function s(e,n,o,s){var i=s.m,a=s.d,l=s.types,f=s.ksi,c=s.o,u=void 0!==f;if(e.resolvedType)e.resolvedType instanceof t?u?a[o][f]=c.enums===String?l[n].values[i[o][f]]:i[o][f]:a[o]=c.enums===String?l[n].values[i[o]]:i[o]:u?a[o][f]=l[n].toObject(i[o][f],c):a[o]=l[n].toObject(i[o],c);else{var g=!1;switch(e.type){case"double":case"float":u?a[o][f]=c.json&&!isFinite(i[o][f])?String(i[o][f]):i[o][f]:a[o]=c.json&&!isFinite(i[o])?String(i[o]):i[o];break;case"uint64":g=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":"number"==typeof i[o][f]?u?a[o][f]=c.longs===String?String(i[o][f]):i[o][f]:a[o]=c.longs===String?String(i[o]):i[o]:u?a[o][f]=c.longs===String?r.Long.prototype.toString.call(i[o][f]):c.longs===Number?new r.LongBits(i[o][f].low>>>0,i[o][f].high>>>0).toNumber(g):i[o][f]:a[o]=c.longs===String?r.Long.prototype.toString.call(i[o]):c.longs===Number?new r.LongBits(i[o].low>>>0,i[o].high>>>0).toNumber(g):i[o];break;case"bytes":u?a[o][f]=c.bytes===String?r.base64.encode(i[o][f],0,i[o][f].length):c.bytes===Array?Array.prototype.slice.call(i[o][f]):i[o][f]:a[o]=c.bytes===String?r.base64.encode(i[o],0,i[o].length):c.bytes===Array?Array.prototype.slice.call(i[o]):i[o];break;default:u?a[o][f]=i[o][f]:a[o]=i[o]}}}n._configure=function(){t=require("./enum"),r=require("./util")},n.fromObject=function(n){var s=n.fieldsArray;return function(n){return function(i){if(i instanceof this.ctor)return i;if(!s.length)return new this.ctor;for(var a=new this.ctor,l=0;l-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}}}(this._oneofsArray[i].oneof);o[s]={get:d.getter,set:d.setter}}i&&Object.defineProperties(e.prototype,o)}}}),y.generateConstructor=function(e){return function(t){for(var r,i=0;i-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},t.oneOfSetter=function(e){return function(t){for(var r=0;r=65536&&r<=1114111?(n.push(r>>18&7|240),n.push(r>>12&63|128),n.push(r>>6&63|128),n.push(63&r|128)):r>=2048&&r<=65535?(n.push(r>>12&15|224),n.push(r>>6&63|128),n.push(63&r|128)):r>=128&&r<=2047?(n.push(r>>6&31|192),n.push(63&r|128)):n.push(255&r);return n},t.byteToString=function(e){if("string"==typeof e)return e;for(var t="",r=e,n=0;n127;)i[e++]=127&t|128,t>>>=7;i[e]=t}function a(t,i){this.len=t,this.next=void 0,this.val=i}function f(t,i,e){for(;t.hi;)i[e++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)i[e++]=127&t.lo|128,t.lo=t.lo>>>7;i[e++]=t.lo}function c(t,i,e){i[e]=255&t,i[e+1]=t>>>8&255,i[e+2]=t>>>16&255,i[e+3]=t>>>24}u.create=n.Buffer?function(){return(u.create=function(){return new i})()}:function(){return new u},u.alloc=function(t){return new n.Array(t)},n.Array!==Array&&(u.alloc=n.pool(u.alloc,n.Array.prototype.subarray)),u.prototype._push=function(t,i,e){return this.tail=this.tail.next=new r(t,i,e),this.len+=i,this},a.prototype=Object.create(r.prototype),a.prototype.fn=p,u.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new a((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},u.prototype.int32=function(i){return i<0?this._push(f,10,t.fromNumber(i)):this.uint32(i)},u.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},u.prototype.uint64=function(i){var e=t.from(i);return this._push(f,e.length(),e)},u.prototype.int64=u.prototype.uint64,u.prototype.sint64=function(i){var e=t.from(i).zzEncode();return this._push(f,e.length(),e)},u.prototype.bool=function(t){return this._push(l,1,t?1:0)},u.prototype.fixed32=function(t){return this._push(c,4,t>>>0)},u.prototype.sfixed32=u.prototype.fixed32,u.prototype.fixed64=function(i){var e=t.from(i);return this._push(c,4,e.lo)._push(c,4,e.hi)},u.prototype.sfixed64=u.prototype.fixed64,u.prototype.float=function(t){return this._push(n.float.writeFloatLE,4,t)},u.prototype.double=function(t){return this._push(n.float.writeDoubleLE,8,t)};var y=n.Array.prototype.set?function(t,i,e){i.set(t,e)}:function(t,i,e){for(var n=0;n>>0;if(!i)return this._push(l,1,0);if(n.isString(t)){var e=u.alloc(i=o.length(t));o.write(t,e,0),t=e}return this.uint32(i)._push(y,i,t)},u.prototype.string=function(t){var i=o.length(t);return i?this.uint32(i)._push(o.write,i,t):this._push(l,1,0)},u.prototype.fork=function(){return this.states=new h(this),this.head=this.tail=new r(s,0,0),this.len=0,this},u.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 r(s,0,0),this.len=0),this},u.prototype.ldelim=function(){var t=this.head,i=this.tail,e=this.len;return this.reset().uint32(e),e&&(this.tail.next=t.next,this.tail=i,this.len+=e),this},u.prototype.finish=function(){for(var t=this.head.next,i=this.constructor.alloc(this.len),e=0;t;)t.fn(t.val,i,e),e+=t.len,t=t.next;return i},u._configure=function(){t=require("./longBits"),e=require("./base64"),o=require("./utf8")}; },{"./util":"HQWY","./utf8":"DDeL","./longBits":"n7JO","./base64":"lxH0"}],"z2Zv":[function(require,module,exports) { module.exports=function(){var e={};function r(){e.converter._configure(),e.decoder._configure(),e.encoder._configure(),e.Field._configure(),e.MapField._configure(),e.Message._configure(),e.Namespace._configure(),e.Method._configure(),e.ReflectionObject._configure(),e.OneOf._configure(),e.parse._configure(),e.Reader._configure(),e.Root._configure(),e.Service._configure(),e.verifier._configure(),e.Type._configure(),e.types._configure(),e.wrappers._configure(),e.Writer._configure()}if(e.build="minimal",e.Writer=require("./src/writer"),e.encoder=require("./src/encoder"),e.Reader=require("./src/reader"),e.util=require("./src/util"),e.rpc=require("./src/rpc/service"),e.roots=require("./src/roots"),e.verifier=require("./src/verifier"),e.tokenize=require("./src/tokenize"),e.parse=require("./src/parse"),e.common=require("./src/common"),e.ReflectionObject=require("./src/object"),e.Namespace=require("./src/namespace"),e.Root=require("./src/root"),e.Enum=require("./src/enum"),e.Type=require("./src/type"),e.Field=require("./src/field"),e.OneOf=require("./src/oneof"),e.MapField=require("./src/mapField"),e.Service=require("./src/service"),e.Method=require("./src/method"),e.converter=require("./src/converter"),e.decoder=require("./src/decoder"),e.Message=require("./src/message"),e.wrappers=require("./src/wrappers"),e.types=require("./src/types"),e.util=require("./src/util"),e.configure=r,e.load=function(r,i,o){return"function"==typeof i?(o=i,i=new e.Root):i||(i=new e.Root),i.load(r,o)},e.loadSync=function(r,i){return i||(i=new e.Root),i.loadSync(r)},e.parseFromPbString=function(r,i,o){return"function"==typeof i?(o=i,i=new e.Root):i||(i=new e.Root),i.parseFromPbString(r,o)},r(),arguments&&arguments.length)for(var i=0;i1?this._listeners[t]=s.slice(0,i).concat(s.slice(i+1)):delete this._listeners[t])}},t.prototype.dispatchEvent=function(){var t=arguments[0],e=t.type,s=1===arguments.length?[t]:Array.apply(null,arguments);if(this["on"+e]&&this["on"+e].apply(this,s),e in this._listeners)for(var i=this._listeners[e],n=0;n0){var t="["+this.sendBuffer.join(",")+"]";this.sendStop=this.sender(this.url,t,function(t){e.sendStop=null,t?(n("error",t),e.emit("close",t.code||1006,"Sending error: "+t),e.close()):e.sendScheduleWait()}),this.sendBuffer=[]}},s.prototype._cleanup=function(){n("_cleanup"),this.removeAllListeners()},s.prototype.close=function(){n("close"),this._cleanup(),this.sendStop&&(this.sendStop(),this.sendStop=null)},module.exports=s; },{"inherits":"oxw+","events":"6GPx"}],"4XFA":[function(require,module,exports) { "use strict";var e=require("inherits"),s=require("events").EventEmitter,t=function(){};function i(e,i,l){t(i),s.call(this),this.Receiver=e,this.receiveUrl=i,this.AjaxObject=l,this._scheduleReceiver()}e(i,s),i.prototype._scheduleReceiver=function(){t("_scheduleReceiver");var e=this,s=this.poll=new this.Receiver(this.receiveUrl,this.AjaxObject);s.on("message",function(s){t("message",s),e.emit("message",s)}),s.once("close",function(i,l){t("close",i,l,e.pollIsClosing),e.poll=s=null,e.pollIsClosing||("network"===l?e._scheduleReceiver():(e.emit("close",i||1006,l),e.removeAllListeners()))})},i.prototype.abort=function(){t("abort"),this.removeAllListeners(),this.pollIsClosing=!0,this.poll&&this.poll.abort()},module.exports=i; },{"inherits":"oxw+","events":"6GPx"}],"sju2":[function(require,module,exports) { "use strict";var l=require("inherits"),e=require("../../utils/url"),o=require("./buffered-sender"),s=require("./polling"),t=function(){};function i(l,i,r,n,c){var u=e.addPath(l,i);t(u);var p=this;o.call(this,l,r),this.poll=new s(n,u,c),this.poll.on("message",function(l){t("poll message",l),p.emit("message",l)}),this.poll.once("close",function(l,e){t("poll close",l,e),p.poll=null,p.emit("close",l,e),p.close()})}l(i,o),i.prototype.close=function(){o.prototype.close.call(this),t("close"),this.removeAllListeners(),this.poll&&(this.poll.abort(),this.poll=null)},module.exports=i; },{"inherits":"oxw+","../../utils/url":"prkv","./buffered-sender":"o1fQ","./polling":"4XFA"}],"h4sR":[function(require,module,exports) { "use strict";var e=require("inherits"),r=require("../../utils/url"),n=require("./sender-receiver"),t=function(){};function i(e){return function(n,i,u){t("create ajax sender",n,i);var o={};"string"==typeof i&&(o.headers={"Content-type":"text/plain"});var s=r.addPath(n,"/xhr_send"),a=new e("POST",s,i,o);return a.once("finish",function(e){if(t("finish",e),a=null,200!==e&&204!==e)return u(new Error("http status "+e));u()}),function(){t("abort"),a.close(),a=null;var e=new Error("Aborted");e.code=1e3,u(e)}}}function u(e,r,t,u){n.call(this,e,r,i(u),t,u)}e(u,n),module.exports=u; },{"inherits":"oxw+","../../utils/url":"prkv","./sender-receiver":"sju2"}],"kyBw":[function(require,module,exports) { "use strict";var e=require("inherits"),i=require("events").EventEmitter,n=function(){};function t(e,t){n(e),i.call(this);var s=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,i){n("finish",e,i),s._chunkHandler(e,i),s.xo=null;var t=200===e?"network":"permanent";n("close",t),s.emit("close",null,t),s._cleanup()})}e(t,i),t.prototype._chunkHandler=function(e,i){if(n("_chunkHandler",e),200===e&&i)for(var t=-1;;this.bufferPosition+=t+1){var s=i.slice(this.bufferPosition);if(-1===(t=s.indexOf("\n")))break;var o=s.slice(0,t);o&&(n("message",o),this.emit("message",o))}},t.prototype._cleanup=function(){n("_cleanup"),this.removeAllListeners()},t.prototype.abort=function(){n("abort"),this.xo&&(this.xo.close(),n("close"),this.emit("close",null,"user"),this.xo=null),this._cleanup()},module.exports=t; },{"inherits":"oxw+","events":"6GPx"}],"TbCi":[function(require,module,exports) { var global = arguments[3]; var t=arguments[3],e=require("events").EventEmitter,i=require("inherits"),n=require("../../utils/event"),r=require("../../utils/url"),s=t.XMLHttpRequest,h=function(){};function a(t,i,n,r){h(t,i);var s=this;e.call(this),setTimeout(function(){s._start(t,i,n,r)},0)}i(a,e),a.prototype._start=function(t,e,i,u){var o=this;try{this.xhr=new s}catch(l){}if(!this.xhr)return h("no xhr"),this.emit("finish",0,"no xhr support"),void this._cleanup();e=r.addQuery(e,"t="+ +new Date),this.unloadRef=n.unloadAdd(function(){h("unload cleanup"),o._cleanup(!0)});try{this.xhr.open(t,e,!0),this.timeout&&"timeout"in this.xhr&&(this.xhr.timeout=this.timeout,this.xhr.ontimeout=function(){h("xhr timeout"),o.emit("finish",0,""),o._cleanup(!1)})}catch(d){return h("exception",d),this.emit("finish",0,""),void this._cleanup(!1)}if(u&&u.noCredentials||!a.supportsCORS||(h("withCredentials"),this.xhr.withCredentials=!0),u&&u.headers)for(var c in u.headers)this.xhr.setRequestHeader(c,u.headers[c]);this.xhr.onreadystatechange=function(){if(o.xhr){var t,e,i=o.xhr;switch(h("readyState",i.readyState),i.readyState){case 3:try{e=i.status,t=i.responseText}catch(d){}h("status",e),1223===e&&(e=204),200===e&&t&&t.length>0&&(h("chunk"),o.emit("chunk",e,t));break;case 4:e=i.status,h("status",e),1223===e&&(e=204),12005!==e&&12029!==e||(e=0),h("finish",e,i.responseText),o.emit("finish",e,i.responseText),o._cleanup(!1)}}};try{o.xhr.send(i)}catch(d){o.emit("finish",0,""),o._cleanup(!1)}},a.prototype._cleanup=function(t){if(h("cleanup"),this.xhr){if(this.removeAllListeners(),n.unloadDel(this.unloadRef),this.xhr.onreadystatechange=function(){},this.xhr.ontimeout&&(this.xhr.ontimeout=null),t)try{this.xhr.abort()}catch(e){}this.unloadRef=this.xhr=null}},a.prototype.close=function(){h("close"),this._cleanup(!0)},a.enabled=!!s;var u=["Active"].concat("Object").join("X");!a.enabled&&u in t&&(h("overriding xmlhttprequest"),s=function(){try{return new t[u]("Microsoft.XMLHTTP")}catch(e){return null}},a.enabled=!!new s);var o=!1;try{o="withCredentials"in new s}catch(c){}a.supportsCORS=o,module.exports=a; },{"events":"6GPx","inherits":"oxw+","../../utils/event":"q8Q2","../../utils/url":"prkv"}],"TBnt":[function(require,module,exports) { "use strict";var e=require("inherits"),r=require("../driver/xhr");function i(e,i,s,t){r.call(this,e,i,s,t)}e(i,r),i.enabled=r.enabled&&r.supportsCORS,module.exports=i; },{"inherits":"oxw+","../driver/xhr":"TbCi"}],"9mX/":[function(require,module,exports) { "use strict";var e=require("inherits"),r=require("../driver/xhr");function i(e,i,n){r.call(this,e,i,n,{noCredentials:!0})}e(i,r),i.enabled=r.enabled,module.exports=i; },{"inherits":"oxw+","../driver/xhr":"TbCi"}],"+JeF":[function(require,module,exports) { var global = arguments[3]; var r=arguments[3];module.exports={isOpera:function(){return r.navigator&&/opera/i.test(r.navigator.userAgent)},isKonqueror:function(){return r.navigator&&/konqueror/i.test(r.navigator.userAgent)},hasDomain:function(){if(!r.document)return!0;try{return!!r.document.domain}catch(n){return!1}}}; },{}],"a/LL":[function(require,module,exports) { var global = arguments[3]; var e=arguments[3],r=require("inherits"),n=require("./lib/ajax-based"),i=require("./receiver/xhr"),a=require("./sender/xhr-cors"),s=require("./sender/xhr-local"),t=require("../utils/browser");function d(e){if(!s.enabled&&!a.enabled)throw new Error("Transport created when disabled");n.call(this,e,"/xhr_streaming",i,a)}r(d,n),d.enabled=function(e){return!e.nullOrigin&&(!t.isOpera()&&a.enabled)},d.transportName="xhr-streaming",d.roundTrips=2,d.needBody=!!e.document,module.exports=d; },{"inherits":"oxw+","./lib/ajax-based":"h4sR","./receiver/xhr":"kyBw","./sender/xhr-cors":"TBnt","./sender/xhr-local":"9mX/","../utils/browser":"+JeF"}],"VmyL":[function(require,module,exports) { var global = arguments[3]; var t=arguments[3],e=require("events").EventEmitter,r=require("inherits"),o=require("../../utils/event"),i=require("../../utils/browser"),n=require("../../utils/url"),s=function(){};function u(t,r,o){s(t,r);var i=this;e.call(this),setTimeout(function(){i._start(t,r,o)},0)}r(u,e),u.prototype._start=function(e,r,i){s("_start");var u=this,a=new t.XDomainRequest;r=n.addQuery(r,"t="+ +new Date),a.onerror=function(){s("onerror"),u._error()},a.ontimeout=function(){s("ontimeout"),u._error()},a.onprogress=function(){s("progress",a.responseText),u.emit("chunk",200,a.responseText)},a.onload=function(){s("load"),u.emit("finish",200,a.responseText),u._cleanup(!1)},this.xdr=a,this.unloadRef=o.unloadAdd(function(){u._cleanup(!0)});try{this.xdr.open(e,r),this.timeout&&(this.xdr.timeout=this.timeout),this.xdr.send(i)}catch(h){this._error()}},u.prototype._error=function(){this.emit("finish",0,""),this._cleanup(!1)},u.prototype._cleanup=function(t){if(s("cleanup",t),this.xdr){if(this.removeAllListeners(),o.unloadDel(this.unloadRef),this.xdr.ontimeout=this.xdr.onerror=this.xdr.onprogress=this.xdr.onload=null,t)try{this.xdr.abort()}catch(e){}this.unloadRef=this.xdr=null}},u.prototype.close=function(){s("close"),this._cleanup(!0)},u.enabled=!(!t.XDomainRequest||!i.hasDomain()),module.exports=u; },{"events":"6GPx","inherits":"oxw+","../../utils/event":"q8Q2","../../utils/browser":"+JeF","../../utils/url":"prkv"}],"UfBN":[function(require,module,exports) { "use strict";var e=require("inherits"),r=require("./lib/ajax-based"),i=require("./receiver/xhr"),n=require("./sender/xdr");function a(e){if(!n.enabled)throw new Error("Transport created when disabled");r.call(this,e,"/xhr_streaming",i,n)}e(a,r),a.enabled=function(e){return!e.cookie_needed&&!e.nullOrigin&&(n.enabled&&e.sameScheme)},a.transportName="xdr-streaming",a.roundTrips=2,module.exports=a; },{"inherits":"oxw+","./lib/ajax-based":"h4sR","./receiver/xhr":"kyBw","./sender/xdr":"VmyL"}],"YxpD":[function(require,module,exports) { var global = arguments[3]; var e=arguments[3];module.exports=e.EventSource; },{}],"pVdQ":[function(require,module,exports) { "use strict";var e=require("inherits"),t=require("events").EventEmitter,r=require("eventsource"),n=function(){};function o(e){n(e),t.call(this);var o=this,s=this.es=new r(e);s.onmessage=function(e){n("message",e.data),o.emit("message",decodeURI(e.data))},s.onerror=function(e){n("error",s.readyState,e);var t=2!==s.readyState?"network":"permanent";o._cleanup(),o._close(t)}}e(o,t),o.prototype.abort=function(){n("abort"),this._cleanup(),this._close("user")},o.prototype._cleanup=function(){n("cleanup");var e=this.es;e&&(e.onmessage=e.onerror=null,e.close(),this.es=null)},o.prototype._close=function(e){n("close",e);var t=this;setTimeout(function(){t.emit("close",null,e),t.removeAllListeners()},200)},module.exports=o; },{"inherits":"oxw+","events":"6GPx","eventsource":"YxpD"}],"DuLI":[function(require,module,exports) { "use strict";var e=require("inherits"),r=require("./lib/ajax-based"),n=require("./receiver/eventsource"),t=require("./sender/xhr-cors"),i=require("eventsource");function s(e){if(!s.enabled())throw new Error("Transport created when disabled");r.call(this,e,"/eventsource",n,t)}e(s,r),s.enabled=function(){return!!i},s.transportName="eventsource",s.roundTrips=2,module.exports=s; },{"inherits":"oxw+","./lib/ajax-based":"h4sR","./receiver/eventsource":"pVdQ","./sender/xhr-cors":"TBnt","eventsource":"YxpD"}],"r5wZ":[function(require,module,exports) { var define; var global = arguments[3]; var t,e=arguments[3];(function(){var r="function"==typeof t&&t.amd,n={function:!0,object:!0},o=n[typeof exports]&&exports&&!exports.nodeType&&exports,c=n[typeof window]&&window||this,i=o&&n[typeof module]&&module&&!module.nodeType&&"object"==typeof e&&e;function a(t,e){t||(t=c.Object()),e||(e=c.Object());var r=t.Number||c.Number,o=t.String||c.String,i=t.Object||c.Object,l=t.Date||c.Date,f=t.SyntaxError||c.SyntaxError,u=t.TypeError||c.TypeError,s=t.Math||c.Math,h=t.JSON||c.JSON;"object"==typeof h&&h&&(e.stringify=h.stringify,e.parse=h.parse);var p,g,y,b=i.prototype,j=b.toString,d=new l(-0xc782b5b800cec);try{d=-109252==d.getUTCFullYear()&&0===d.getUTCMonth()&&1===d.getUTCDate()&&10==d.getUTCHours()&&37==d.getUTCMinutes()&&6==d.getUTCSeconds()&&708==d.getUTCMilliseconds()}catch(P){}function v(t){if(v[t]!==y)return v[t];var n;if("bug-string-char-index"==t)n="a"!="a"[0];else if("json"==t)n=v("json-stringify")&&v("json-parse");else{var c,i='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==t){var a=e.stringify,f="function"==typeof a&&d;if(f){(c=function(){return 1}).toJSON=c;try{f="0"===a(0)&&"0"===a(new r)&&'""'==a(new o)&&a(j)===y&&a(y)===y&&a()===y&&"1"===a(c)&&"[1]"==a([c])&&"[null]"==a([y])&&"null"==a(null)&&"[null,null,null]"==a([y,j,null])&&a({a:[c,!0,!1,null,"\0\b\n\f\r\t"]})==i&&"1"===a(null,c)&&"[\n 1,\n 2\n]"==a([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==a(new l(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==a(new l(864e13))&&'"-000001-01-01T00:00:00.000Z"'==a(new l(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==a(new l(-1))}catch(P){f=!1}}n=f}if("json-parse"==t){var u=e.parse;if("function"==typeof u)try{if(0===u("0")&&!u(!1)){var s=5==(c=u(i)).a.length&&1===c.a[0];if(s){try{s=!u('"\t"')}catch(P){}if(s)try{s=1!==u("01")}catch(P){}if(s)try{s=1!==u("1.")}catch(P){}}}}catch(P){s=!1}n=s}}return v[t]=!!n}if(!v("json")){var C=v("bug-string-char-index");if(!d)var S=s.floor,O=[0,31,59,90,120,151,181,212,243,273,304,334],A=function(t,e){return O[e]+365*(t-1970)+S((t-1969+(e=+(e>1)))/4)-S((t-1901+e)/100)+S((t-1601+e)/400)};if((p=b.hasOwnProperty)||(p=function(t){var e,r={};return(r.__proto__=null,r.__proto__={toString:1},r).toString!=j?p=function(t){var e=this.__proto__,r=t in(this.__proto__=null,this);return this.__proto__=e,r}:(e=r.constructor,p=function(t){var r=(this.constructor||e).prototype;return t in this&&!(t in r&&this[t]===r[t])}),r=null,p.call(this,t)}),g=function(t,e){var r,o,c,i=0;for(c in(r=function(){this.valueOf=0}).prototype.valueOf=0,o=new r)p.call(o,c)&&i++;return r=o=null,i?g=2==i?function(t,e){var r,n={},o="[object Function]"==j.call(t);for(r in t)o&&"prototype"==r||p.call(n,r)||!(n[r]=1)||!p.call(t,r)||e(r)}:function(t,e){var r,n,o="[object Function]"==j.call(t);for(r in t)o&&"prototype"==r||!p.call(t,r)||(n="constructor"===r)||e(r);(n||p.call(t,r="constructor"))&&e(r)}:(o=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],g=function(t,e){var r,c,i="[object Function]"==j.call(t),a=!i&&"function"!=typeof t.constructor&&n[typeof t.hasOwnProperty]&&t.hasOwnProperty||p;for(r in t)i&&"prototype"==r||!a.call(t,r)||e(r);for(c=o.length;r=o[--c];a.call(t,r)&&e(r));}),g(t,e)},!v("json-stringify")){var w={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},T=function(t,e){return("000000"+(e||0)).slice(-t)},_=function(t){for(var e='"',r=0,n=t.length,o=!C||n>10,c=o&&(C?t.split(""):t);r-1/0&&a<1/0){if(A){for(h=S(a/864e5),f=S(h/365.2425)+1970-1;A(f+1,0)<=h;f++);for(s=S((h-A(f,0))/30.42);A(f,s+1)<=h;s++);h=1+h-A(f,s),d=S((b=(a%864e5+864e5)%864e5)/36e5)%24,v=S(b/6e4)%60,C=S(b/1e3)%60,O=b%1e3}else f=a.getUTCFullYear(),s=a.getUTCMonth(),h=a.getUTCDate(),d=a.getUTCHours(),v=a.getUTCMinutes(),C=a.getUTCSeconds(),O=a.getUTCMilliseconds();a=(f<=0||f>=1e4?(f<0?"-":"+")+T(6,f<0?-f:f):T(4,f))+"-"+T(2,s+1)+"-"+T(2,h)+"T"+T(2,d)+":"+T(2,v)+":"+T(2,C)+"."+T(3,O)+"Z"}else a=null;if(r&&(a=r.call(e,t,a)),null===a)return"null";if("[object Boolean]"==(l=j.call(a)))return""+a;if("[object Number]"==l)return a>-1/0&&a<1/0?""+a:"null";if("[object String]"==l)return _(""+a);if("object"==typeof a){for(J=i.length;J--;)if(i[J]===a)throw u();if(i.push(a),w=[],x=c,c+=o,"[object Array]"==l){for(m=0,J=a.length;m0)for(o="",r>10&&(r=10);o.length=48&&o<=57||o>=97&&o<=102||o>=65&&o<=70||M();t+=J("0x"+c.slice(e,U));break;default:M()}else{if(34==o)break;for(o=c.charCodeAt(U),e=U;o>=32&&92!=o&&34!=o;)o=c.charCodeAt(++U);t+=c.slice(e,U)}if(34==c.charCodeAt(U))return U++,t;M();default:if(e=U,45==o&&(n=!0,o=c.charCodeAt(++U)),o>=48&&o<=57){for(48==o&&((o=c.charCodeAt(U+1))>=48&&o<=57)&&M(),n=!1;U=48&&o<=57);U++);if(46==c.charCodeAt(U)){for(r=++U;r=48&&o<=57);r++);r==U&&M(),U=r}if(101==(o=c.charCodeAt(U))||69==o){for(43!=(o=c.charCodeAt(++U))&&45!=o||U++,r=U;r=48&&o<=57);r++);r==U&&M(),U=r}return+c.slice(e,U)}if(n&&M(),"true"==c.slice(U,U+4))return U+=4,!0;if("false"==c.slice(U,U+5))return U+=5,!1;if("null"==c.slice(U,U+4))return U+=4,null;M()}return"$"},k=function(t){var e,r;if("$"==t&&M(),"string"==typeof t){if("@"==(C?t.charAt(0):t[0]))return t.slice(1);if("["==t){for(e=[];"]"!=(t=F());r||(r=!0))r&&(","==t?"]"==(t=F())&&M():M()),","==t&&M(),e.push(k(t));return e}if("{"==t){for(e={};"}"!=(t=F());r||(r=!0))r&&(","==t?"}"==(t=F())&&M():M()),","!=t&&"string"==typeof t&&"@"==(C?t.charAt(0):t[0])&&":"==F()||M(),e[t.slice(1)]=k(F());return e}M()}return t},D=function(t,e,r){var n=E(t,e,r);n===y?delete t[e]:t[e]=n},E=function(t,e,r){var n,o=t[e];if("object"==typeof o&&o)if("[object Array]"==j.call(o))for(n=o.length;n--;)D(o,n,r);else g(o,function(t){D(o,t,r)});return r.call(t,e,o)};e.parse=function(t,e){var r,n;return U=0,m=""+t,r=k(F()),"$"!=F()&&M(),U=m=null,e&&"[object Function]"==j.call(e)?E(((n={})[""]=r,n),"",e):r}}}return e.runInContext=a,e}if(!i||i.global!==i&&i.window!==i&&i.self!==i||(c=i),o&&!r)a(c,o);else{var l=c.JSON,f=c.JSON3,u=!1,s=a(c,c.JSON3={noConflict:function(){return u||(u=!0,c.JSON=l,c.JSON3=f,l=f=null),s}});c.JSON={parse:s.parse,stringify:s.stringify}}r&&t(function(){return s})}).call(this); },{}],"A8Oj":[function(require,module,exports) { module.exports="1.3.0"; },{}],"lHOv":[function(require,module,exports) { var global = arguments[3]; var e=arguments[3],o=require("./event"),n=require("json3"),t=require("./browser"),r=function(){};module.exports={WPrefix:"_jp",currentWindowId:null,polluteGlobalNamespace:function(){module.exports.WPrefix in e||(e[module.exports.WPrefix]={})},postMessage:function(o,t){e.parent!==e?e.parent.postMessage(n.stringify({windowId:module.exports.currentWindowId,type:o,data:t||""}),"*"):r("Cannot postMessage, no parent window.",o,t)},createIframe:function(n,t){var i,u,a=e.document.createElement("iframe"),l=function(){r("unattach"),clearTimeout(i);try{a.onload=null}catch(e){}a.onerror=null},c=function(){r("cleanup"),a&&(l(),setTimeout(function(){a&&a.parentNode.removeChild(a),a=null},0),o.unloadDel(u))},d=function(e){r("onerror",e),a&&(c(),t(e))};return a.src=n,a.style.display="none",a.style.position="absolute",a.onerror=function(){d("onerror")},a.onload=function(){r("onload"),clearTimeout(i),i=setTimeout(function(){d("onload timeout")},2e3)},e.document.body.appendChild(a),i=setTimeout(function(){d("timeout")},15e3),u=o.unloadAdd(c),{post:function(e,o){r("post",e,o),setTimeout(function(){try{a&&a.contentWindow&&a.contentWindow.postMessage(e,o)}catch(n){}},0)},cleanup:c,loaded:l}},createHtmlfile:function(n,t){var i,u,a,l=["Active"].concat("Object").join("X"),c=new e[l]("htmlfile"),d=function(){clearTimeout(i),a.onerror=null},s=function(){c&&(d(),o.unloadDel(u),a.parentNode.removeChild(a),a=c=null,CollectGarbage())},p=function(e){r("onerror",e),c&&(s(),t(e))};c.open(),c.write('