From 6dc02bbd46fdf3c31b6c0ffcc51851183b07ec4d Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Tue, 20 Jun 2023 15:28:57 +0800 Subject: [PATCH] chore(push): update domian --- .../vue-cli-plugin-uni/packages/uni-push/dist/uni-push.es.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vue-cli-plugin-uni/packages/uni-push/dist/uni-push.es.js b/packages/vue-cli-plugin-uni/packages/uni-push/dist/uni-push.es.js index ad1fe48fc3..b6eed85e53 100644 --- a/packages/vue-cli-plugin-uni/packages/uni-push/dist/uni-push.es.js +++ b/packages/vue-cli-plugin-uni/packages/uni-push/dist/uni-push.es.js @@ -96,7 +96,7 @@ var gtpushMin = { // #ifndef MP-ALIPAY null===e||void 0===e||e.onClose(t); // #endif - }}}}e["default"]=r;},4486:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(3854));class s{constructor(){this.systemInfo=wx.getSystemInfoSync();}os(){return n.default.getStr(this.systemInfo,"platform")}osVersion(){return n.default.getStr(this.systemInfo,"system")}model(){return n.default.getStr(this.systemInfo,"model")}brand(){return n.default.getStr(this.systemInfo,"brand")}platform(){return "MP-WEIXIN"}platformVersion(){return n.default.getStr(this.systemInfo,"version")}language(){return n.default.getStr(this.systemInfo,"language")}platformId(){if(wx.canIUse("getAccountInfoSync"))return wx.getAccountInfoSync().miniProgram.appId;return ""}getNetworkType(t){wx.getNetworkType({success:e=>{var r;null===(r=t.success)||void 0===r||r.call(t.success,{networkType:e.networkType});},fail:t.fail});}onNetworkStatusChange(t){wx.onNetworkStatusChange(t);}}e["default"]=s;},5867:(t,e)=>{Object.defineProperty(e,"__esModule",{value:true});class r{set(t){wx.setStorage(t);}setSync(t,e){wx.setStorageSync(t,e);}get(t){wx.getStorage(t);}getSync(t){return wx.getStorageSync(t)}}e["default"]=r;},7006:(t,e)=>{Object.defineProperty(e,"__esModule",{value:true});class r{connect(t){let e=wx.connectSocket({url:t.url,header:t.header,protocols:t.protocols,success:t.success,fail:t.fail,complete:t.complete});return {onOpen:e.onOpen,send:e.send,onMessage:e.onMessage,onError:e.onError,onClose:e.onClose,close:e.close}}}e["default"]=r;},6893:(t,e)=>{Object.defineProperty(e,"__esModule",{value:true});var r;(function(t){t.SDK_VERSION="GTMP-2.0.4.dcloud";t.DEFAULT_SOCKET_URL="wss://wshzn.getui.net:5223/nws";t.SOCKET_PROTOCOL_VERSION="1.0";t.SERVER_PUBLIC_KEY="MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhAJp1rROuvBF7sBSnvLaesj2iFhMcY8aXyLvpnNLKs2wjL3JmEnyr++SlVa35liUlzi83tnAFkn3A9GB7pHBNzawyUkBh8WUhq5bnFIkk2RaDa6+5MpG84DEv52p7RR+aWwIDAQAB";t.SERVER_PUBLIC_KEY_ID="69d747c4b9f641baf4004be4297e9f3b";t.ID_U_2_G=true;})(r||(r={}));e["default"]=r;},7555:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(7002));const s=i(r(529));const a=i(r(6379));class o{static init(t){var e;if(this.inited)return;try{this.checkAppid(t.appid);this.inited=true;s.default.info(`init: appid=${t.appid}`);a.default.init(t);n.default.connect();}catch(r){this.inited=false;null===(e=t.onError)||void 0===e||e.call(t.onError,{error:r});throw r}}static enableSocket(t){this.checkInit();n.default.enableSocket(t);}static checkInit(){if(!this.inited)throw new Error(`not init, please invoke init method firstly`)}static checkAppid(t){if(null==t||void 0==t||""==t.trim())throw new Error(`invalid appid ${t}`)}}o.inited=false;e["default"]=o;},6379:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(6667));const s=i(r(8506));const a=i(r(6893));const o=i(r(7002));const u=i(r(529));const c=i(r(4685));const l=i(r(2323));class f{static init(t){var e;if(a.default.ID_U_2_G)this.appid=l.default.to_getui(t.appid);else this.appid=t.appid;this.onError=t.onError;this.onClientId=t.onClientId;this.onlineState=t.onlineState;this.onPushMsg=t.onPushMsg;if(this.appid!=s.default.getSync(s.default.KEY_APPID,this.appid)){u.default.info("appid changed, clear session and cid");s.default.setSync(s.default.KEY_CID,"");s.default.setSync(s.default.KEY_SESSION,"");}s.default.setSync(s.default.KEY_APPID,this.appid);this.cid=s.default.getSync(s.default.KEY_CID,this.cid);if(this.cid)null===(e=this.onClientId)||void 0===e||e.call(this.onClientId,{cid:f.cid});this.session=s.default.getSync(s.default.KEY_SESSION,this.session);this.deviceId=s.default.getSync(s.default.KEY_DEVICE_ID,this.deviceId);this.regId=s.default.getSync(s.default.KEY_REGID,this.regId);if(!this.regId){this.regId=this.createRegId();s.default.set({key:s.default.KEY_REGID,data:this.regId});}this.socketUrl=s.default.getSync(s.default.KEY_SOCKET_URL,this.socketUrl);let r=this;c.default.getNetworkType({success:t=>{r.networkType=t.networkType;r.networkConnected="none"!=r.networkType&&""!=r.networkType;}});c.default.onNetworkStatusChange((t=>{r.networkConnected=t.isConnected;r.networkType=t.networkType;if(r.networkConnected)o.default.reconnect(100);}));}static createRegId(){return `M-V${n.default.md5Hex(this.getUuid())}-${(new Date).getTime()}`}static getUuid(){return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){let e=16*Math.random()|0,r="x"===t?e:3&e|8;return r.toString(16)}))}}f.appid="";f.cid="";f.regId="";f.session="";f.deviceId="";f.packetId=1;f.online=false;f.socketUrl=a.default.DEFAULT_SOCKET_URL;f.publicKeyId=a.default.SERVER_PUBLIC_KEY_ID;f.publicKey=a.default.SERVER_PUBLIC_KEY;f.lastAliasTime=0;f.networkConnected=true;f.networkType="none";e["default"]=f;},9586:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};var n,s;Object.defineProperty(e,"__esModule",{value:true});const a=i(r(661));const o=r(4198);const u=i(r(6379));class c extends a.default{constructor(){super(...arguments);this.actionMsgData=new l;}static initActionMsg(t,...e){super.initMsg(t);t.command=a.default.Command.CLIENT_MSG;t.data=t.actionMsgData=l.create();return t}static parseActionMsg(t,e){super.parseMsg(t,e);t.actionMsgData=l.parse(t.data);return t}send(){setTimeout((()=>{var t;if(c.waitingLoginMsgMap.has(this.actionMsgData.msgId)||c.waitingResponseMsgMap.has(this.actionMsgData.msgId)){c.waitingLoginMsgMap.delete(this.actionMsgData.msgId);c.waitingResponseMsgMap.delete(this.actionMsgData.msgId);null===(t=this.callback)||void 0===t||t.call(this.callback,{resultCode:o.ErrorCode.TIME_OUT,message:"waiting time out"});}}),1e4);if(!u.default.online){c.waitingLoginMsgMap.set(this.actionMsgData.msgId,this);return}if(this.actionMsgData.msgAction!=c.ClientAction.RECEIVED)c.waitingResponseMsgMap.set(this.actionMsgData.msgId,this);super.send();}receive(){}static sendWaitingMessages(){let t=this.waitingLoginMsgMap.keys();let e;while(e=t.next(),!e.done){let t=this.waitingLoginMsgMap.get(e.value);this.waitingLoginMsgMap.delete(e.value);null===t||void 0===t||t.send();}}static getWaitingResponseMessage(t){return c.waitingResponseMsgMap.get(t)}static removeWaitingResponseMessage(t){let e=c.waitingResponseMsgMap.get(t);if(e)c.waitingResponseMsgMap.delete(t);return e}}c.ServerAction=(n=class{},n.PUSH_MESSAGE="pushmessage",n.REDIRECT_SERVER="redirect_server",n.ADD_PHONE_INFO_RESULT="addphoneinfo",n.SET_MODE_RESULT="set_mode_result",n.SET_TAG_RESULT="settag_result",n.BIND_ALIAS_RESULT="response_bind",n.UNBIND_ALIAS_RESULT="response_unbind",n.FEED_BACK_RESULT="pushmessage_feedback",n.RECEIVED="received",n);c.ClientAction=(s=class{},s.ADD_PHONE_INFO="addphoneinfo",s.SET_MODE="set_mode",s.FEED_BACK="pushmessage_feedback",s.SET_TAGS="set_tag",s.BIND_ALIAS="bind_alias",s.UNBIND_ALIAS="unbind_alias",s.RECEIVED="received",s);c.waitingLoginMsgMap=new Map;c.waitingResponseMsgMap=new Map;class l{constructor(){this.appId="";this.cid="";this.msgId="";this.msgAction="";this.msgData="";this.msgExtraData="";}static create(){let t=new l;t.appId=u.default.appid;t.cid=u.default.cid;t.msgId=(2147483647&(new Date).getTime()).toString();return t}static parse(t){let e=new l;let r=JSON.parse(t);e.appId=r.appId;e.cid=r.cid;e.msgId=r.msgId;e.msgAction=r.msgAction;e.msgData=r.msgData;e.msgExtraData=r.msgExtraData;return e}}e["default"]=c;},4516:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(4685));const s=i(r(8506));const a=i(r(6893));const o=r(4198);const u=i(r(9586));const c=i(r(6379));class l extends u.default{constructor(){super(...arguments);this.addPhoneInfoData=new f;}static create(){let t=new l;super.initActionMsg(t);t.callback=e=>{if(e.resultCode!=o.ErrorCode.SUCCESS&&e.resultCode!=o.ErrorCode.REPEAT_MESSAGE)setTimeout((function(){t.send();}),30*1e3);else s.default.set({key:s.default.KEY_ADD_PHONE_INFO_TIME,data:(new Date).getTime()});};t.actionMsgData.msgAction=u.default.ClientAction.ADD_PHONE_INFO;t.addPhoneInfoData=f.create();t.actionMsgData.msgData=JSON.stringify(t.addPhoneInfoData);return t}send(){let t=(new Date).getTime();let e=s.default.getSync(s.default.KEY_ADD_PHONE_INFO_TIME,0);if(t-e<24*60*60*1e3)return;super.send();}}class f{constructor(){this.model="";this.brand="";this.system_version="";this.version="";this.deviceid="";this.type="";}static create(){let t=new f;t.model=n.default.model();t.brand=n.default.brand();t.system_version=n.default.osVersion();t.version=a.default.SDK_VERSION;t.device_token="";t.imei="";t.oaid="";t.mac="";t.idfa="";t.type="MINIPROGRAM";t.deviceid=`${t.type}-${c.default.deviceId}`;t.extra={os:n.default.os(),platform:n.default.platform(),platformVersion:n.default.platformVersion(),platformId:n.default.platformId(),language:n.default.language(),userAgent:n.default.userAgent()};return t}}e["default"]=l;},8723:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};var n,s;Object.defineProperty(e,"__esModule",{value:true});const a=i(r(6379));const o=r(4198);const u=i(r(9586));class c extends u.default{constructor(){super(...arguments);this.feedbackData=new l;}static create(t,e){let r=new c;super.initActionMsg(r);r.callback=t=>{if(t.resultCode!=o.ErrorCode.SUCCESS&&t.resultCode!=o.ErrorCode.REPEAT_MESSAGE)setTimeout((function(){r.send();}),30*1e3);};r.feedbackData=l.create(t,e);r.actionMsgData.msgAction=u.default.ClientAction.FEED_BACK;r.actionMsgData.msgData=JSON.stringify(r.feedbackData);return r}send(){super.send();}}c.ActionId=(n=class{},n.RECEIVE="0",n.MP_RECEIVE="210000",n.WEB_RECEIVE="220000",n.BEGIN="1",n);c.RESULT=(s=class{},s.OK="ok",s);class l{constructor(){this.messageid="";this.appkey="";this.appid="";this.taskid="";this.actionid="";this.result="";this.timestamp="";}static create(t,e){let r=new l;r.messageid=t.pushMessageData.messageid;r.appkey=t.pushMessageData.appKey;r.appid=a.default.appid;r.taskid=t.pushMessageData.taskId;r.actionid=e;r.result=c.RESULT.OK;r.timestamp=(new Date).getTime().toString();return r}}e["default"]=c;},6362:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(661));class s extends n.default{static create(){let t=new s;super.initMsg(t);t.command=n.default.Command.HEART_BEAT;return t}}e["default"]=s;},1386:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(6667));const s=i(r(6379));const a=i(r(661));class o extends a.default{constructor(){super(...arguments);this.keyNegotiateData=new u;}static create(){let t=new o;super.initMsg(t);t.command=a.default.Command.KEY_NEGOTIATE;n.default.resetKey();t.data=t.keyNegotiateData=u.create();return t}send(){super.send();}}class u{constructor(){this.appId="";this.rsaPublicKeyId="";this.algorithm="";this.secretKey="";this.iv="";}static create(){let t=new u;t.appId=s.default.appid;t.rsaPublicKeyId=s.default.publicKeyId;t.algorithm="AES";t.secretKey=n.default.getEncryptedSecretKey();t.iv=n.default.getEncryptedIV();return t}}e["default"]=o;},1280:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(661));const s=i(r(6667));const a=i(r(8858));const o=i(r(529));const u=i(r(6379));class c extends n.default{constructor(){super(...arguments);this.keyNegotiateResultData=new l;}static parse(t){let e=new c;super.parseMsg(e,t);e.keyNegotiateResultData=l.parse(e.data);return e}receive(){var t,e;if(0!=this.keyNegotiateResultData.errorCode){o.default.error(`key negotiate fail: ${this.data}`);null===(t=u.default.onError)||void 0===t||t.call(u.default.onError,{error:`key negotiate fail: ${this.data}`});return}let r=this.keyNegotiateResultData.encryptType.split("/");if(!s.default.algorithmMap.has(r[0].trim().toLowerCase())||!s.default.modeMap.has(r[1].trim().toLowerCase())||!s.default.paddingMap.has(r[2].trim().toLowerCase())){o.default.error(`key negotiate fail: ${this.data}`);null===(e=u.default.onError)||void 0===e||e.call(u.default.onError,{error:`key negotiate fail: ${this.data}`});return}s.default.setEncryptParams(r[0].trim().toLowerCase(),r[1].trim().toLowerCase(),r[2].trim().toLowerCase());a.default.create().send();}}class l{constructor(){this.errorCode=-1;this.errorMsg="";this.encryptType="";}static parse(t){let e=new l;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;e.encryptType=r.encryptType;return e}}e["default"]=c;},8858:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(6379));const s=i(r(6667));const a=i(r(661));const o=i(r(4534));class u extends a.default{constructor(){super(...arguments);this.loginData=new c;}static create(){let t=new u;super.initMsg(t);t.command=a.default.Command.LOGIN;t.data=t.loginData=c.create();return t}send(){if(!this.loginData.session||n.default.cid!=s.default.md5Hex(this.loginData.session)){o.default.create().send();return}super.send();}}class c{constructor(){this.appId="";this.session="";}static create(){let t=new c;t.appId=n.default.appid;t.session=n.default.session;return t}}e["default"]=u;},1606:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(8506));const s=i(r(661));const a=i(r(6379));const o=i(r(9586));const u=i(r(4516));const c=i(r(8858));class l extends s.default{constructor(){super(...arguments);this.loginResultData=new f;}static parse(t){let e=new l;super.parseMsg(e,t);e.loginResultData=f.parse(e.data);return e}receive(){var t;if(0!=this.loginResultData.errorCode){this.data;a.default.session=a.default.cid="";n.default.setSync(n.default.KEY_CID,"");n.default.setSync(n.default.KEY_SESSION,"");c.default.create().send();return}if(!a.default.online){a.default.online=true;null===(t=a.default.onlineState)||void 0===t||t.call(a.default.onlineState,{online:a.default.online});}o.default.sendWaitingMessages();u.default.create().send();}}class f{constructor(){this.errorCode=-1;this.errorMsg="";this.session="";}static parse(t){let e=new f;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;e.session=r.session;return e}}e["default"]=l;},661:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};var n;Object.defineProperty(e,"__esModule",{value:true});const s=i(r(9593));const a=i(r(7002));const o=i(r(6893));const u=i(r(6379));class c{constructor(){this.version="";this.command=0;this.packetId=0;this.timeStamp=0;this.data="";this.signature="";}static initMsg(t,...e){t.version=o.default.SOCKET_PROTOCOL_VERSION;t.command=0;t.timeStamp=(new Date).getTime();return t}static parseMsg(t,e){let r=JSON.parse(e);t.version=r.version;t.command=r.command;t.packetId=r.packetId;t.timeStamp=r.timeStamp;t.data=r.data;t.signature=r.signature;return t}stringify(){return JSON.stringify(this,["version","command","packetId","timeStamp","data","signature"])}send(){if(!a.default.isAvailable())return;this.packetId=u.default.packetId++;if(this.temp)this.data=this.temp;else this.temp=this.data;this.data=JSON.stringify(this.data);this.stringify();if(this.command!=c.Command.HEART_BEAT){s.default.sign(this);if(this.data&&this.command!=c.Command.KEY_NEGOTIATE)s.default.encrypt(this);}a.default.send(this.stringify());}}c.Command=(n=class{},n.HEART_BEAT=0,n.KEY_NEGOTIATE=1,n.KEY_NEGOTIATE_RESULT=16,n.REGISTER=2,n.REGISTER_RESULT=32,n.LOGIN=3,n.LOGIN_RESULT=48,n.LOGOUT=4,n.LOGOUT_RESULT=64,n.CLIENT_MSG=5,n.SERVER_MSG=80,n.SERVER_CLOSE=96,n.REDIRECT_SERVER=112,n);e["default"]=c;},9593:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(6667));var s;(function(t){function e(t){t.data=n.default.encrypt(t.data);}t.encrypt=e;function r(t){t.data=n.default.decrypt(t.data);}t.decrypt=r;function i(t){t.signature=n.default.sha256(`${t.timeStamp}${t.packetId}${t.command}${t.data}`);}t.sign=i;function s(t){let e=n.default.sha256(`${t.timeStamp}${t.packetId}${t.command}${t.data}`);if(t.signature!=e)throw new Error(`msg signature vierfy failed`)}t.verify=s;})(s||(s={}));e["default"]=s;},4054:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(1280));const s=i(r(1606));const a=i(r(661));const o=i(r(1277));const u=i(r(910));const c=i(r(9538));const l=i(r(9479));const f=i(r(6755));const h=i(r(2918));const d=i(r(9586));const v=i(r(9510));const p=i(r(4626));const g=i(r(7562));const y=i(r(9593));const m=i(r(9586));const w=i(r(9519));const S=i(r(8947));class _{static receiveMessage(t){let e=a.default.parseMsg(new a.default,t);if(e.command==a.default.Command.HEART_BEAT)return;if(e.command!=a.default.Command.KEY_NEGOTIATE_RESULT&&e.command!=a.default.Command.SERVER_CLOSE&&e.command!=a.default.Command.REDIRECT_SERVER)y.default.decrypt(e);if(e.command!=a.default.Command.SERVER_CLOSE&&e.command!=a.default.Command.REDIRECT_SERVER)y.default.verify(e);switch(e.command){case a.default.Command.KEY_NEGOTIATE_RESULT:n.default.parse(e.stringify()).receive();break;case a.default.Command.REGISTER_RESULT:o.default.parse(e.stringify()).receive();break;case a.default.Command.LOGIN_RESULT:s.default.parse(e.stringify()).receive();break;case a.default.Command.SERVER_MSG:this.receiveActionMsg(e.stringify());break;case a.default.Command.SERVER_CLOSE:S.default.parse(e.stringify()).receive();break;case a.default.Command.REDIRECT_SERVER:h.default.parse(e.stringify()).receive();break;}}static receiveActionMsg(t){let e=m.default.parseActionMsg(new m.default,t);if(e.actionMsgData.msgAction!=d.default.ServerAction.RECEIVED&&e.actionMsgData.msgAction!=d.default.ServerAction.REDIRECT_SERVER){let t=JSON.parse(e.actionMsgData.msgData);w.default.create(t.id).send();}switch(e.actionMsgData.msgAction){case d.default.ServerAction.PUSH_MESSAGE:f.default.parse(t).receive();break;case d.default.ServerAction.ADD_PHONE_INFO_RESULT:u.default.parse(t).receive();break;case d.default.ServerAction.SET_MODE_RESULT:v.default.parse(t).receive();break;case d.default.ServerAction.SET_TAG_RESULT:p.default.parse(t).receive();break;case d.default.ServerAction.BIND_ALIAS_RESULT:c.default.parse(t).receive();break;case d.default.ServerAction.UNBIND_ALIAS_RESULT:g.default.parse(t).receive();break;case d.default.ServerAction.FEED_BACK_RESULT:l.default.parse(t).receive();break;case d.default.ServerAction.RECEIVED:w.default.parse(t).receive();break}}}e["default"]=_;},9519:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=r(4198);const s=i(r(6379));const a=i(r(9586));class o extends a.default{constructor(){super(...arguments);this.receivedData=new u;}static create(t){let e=new o;super.initActionMsg(e);e.callback=t=>{if(t.resultCode!=n.ErrorCode.SUCCESS&&t.resultCode!=n.ErrorCode.REPEAT_MESSAGE)setTimeout((function(){e.send();}),3*1e3);};e.actionMsgData.msgAction=a.default.ClientAction.RECEIVED;e.receivedData=u.create(t);e.actionMsgData.msgData=JSON.stringify(e.receivedData);return e}static parse(t){let e=new o;super.parseActionMsg(e,t);e.receivedData=u.parse(e.data);return e}receive(){var t;let e=a.default.getWaitingResponseMessage(this.actionMsgData.msgId);if(e&&e.actionMsgData.msgAction==a.default.ClientAction.ADD_PHONE_INFO||e&&e.actionMsgData.msgAction==a.default.ClientAction.FEED_BACK){a.default.removeWaitingResponseMessage(e.actionMsgData.msgId);null===(t=e.callback)||void 0===t||t.call(e.callback,{resultCode:n.ErrorCode.SUCCESS,message:"received"});}}send(){super.send();}}class u{constructor(){this.msgId="";this.cid="";}static create(t){let e=new u;e.cid=s.default.cid;e.msgId=t;return e}static parse(t){let e=new u;let r=JSON.parse(t);e.cid=r.cid;e.msgId=r.msgId;return e}}e["default"]=o;},2918:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});e.RedirectServerData=void 0;const n=i(r(7002));const s=i(r(8506));const a=i(r(661));class o extends a.default{constructor(){super(...arguments);this.redirectServerData=new u;}static parse(t){let e=new o;super.parseMsg(e,t);e.redirectServerData=u.parse(e.data);return e}receive(){this.redirectServerData;s.default.setSync(s.default.KEY_REDIRECT_SERVER,JSON.stringify(this.redirectServerData));n.default.close("redirect server");n.default.reconnect(this.redirectServerData.delay);}}class u{constructor(){this.addressList=[];this.delay=0;this.loc="";this.conf="";this.time=0;}static parse(t){let e=new u;let r=JSON.parse(t);e.addressList=r.addressList;e.delay=r.delay;e.loc=r.loc;e.conf=r.conf;e.time=r.time?r.time:(new Date).getTime();return e}}e.RedirectServerData=u;e["default"]=o;},4534:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(6379));const s=i(r(661));class a extends s.default{constructor(){super(...arguments);this.registerData=new o;}static create(){let t=new a;super.initMsg(t);t.command=s.default.Command.REGISTER;t.data=t.registerData=o.create();return t}send(){super.send();}}class o{constructor(){this.appId="";this.regId="";}static create(){let t=new o;t.appId=n.default.appid;t.regId=n.default.regId;return t}}e["default"]=a;},1277:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(661));const s=i(r(8506));const a=i(r(6379));const o=i(r(8858));const u=i(r(529));class c extends n.default{constructor(){super(...arguments);this.registerResultData=new l;}static parse(t){let e=new c;super.parseMsg(e,t);e.registerResultData=l.parse(e.data);return e}receive(){var t,e;if(0!=this.registerResultData.errorCode||!this.registerResultData.cid||!this.registerResultData.session){u.default.error(`register fail: ${this.data}`);null===(t=a.default.onError)||void 0===t||t.call(a.default.onError,{error:`register fail: ${this.data}`});return}if(a.default.cid!=this.registerResultData.cid)s.default.setSync(s.default.KEY_ADD_PHONE_INFO_TIME,0);a.default.cid=this.registerResultData.cid;null===(e=a.default.onClientId)||void 0===e||e.call(a.default.onClientId,{cid:a.default.cid});s.default.set({key:s.default.KEY_CID,data:a.default.cid});a.default.session=this.registerResultData.session;s.default.set({key:s.default.KEY_SESSION,data:a.default.session});a.default.deviceId=this.registerResultData.deviceId;s.default.set({key:s.default.KEY_DEVICE_ID,data:a.default.deviceId});o.default.create().send();}}class l{constructor(){this.errorCode=-1;this.errorMsg="";this.cid="";this.session="";this.deviceId="";this.regId="";}static parse(t){let e=new l;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;e.cid=r.cid;e.session=r.session;e.deviceId=r.deviceId;e.regId=r.regId;return e}}e["default"]=c;},8947:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(7002));const s=i(r(529));const a=i(r(661));class o extends a.default{constructor(){super(...arguments);this.serverCloseData=new u;}static parse(t){let e=new o;super.parseMsg(e,t);e.serverCloseData=u.parse(e.data);return e}receive(){JSON.stringify(this.serverCloseData);let t=`server close ${this.serverCloseData.code}`;if(20==this.serverCloseData.code||23==this.serverCloseData.code||24==this.serverCloseData.code){n.default.allowReconnect=false;n.default.close(t);}else if(21==this.serverCloseData.code)this.safeClose21(t);else {n.default.allowReconnect=true;n.default.close(t);n.default.reconnect(10);}}safeClose21(t){try{if("undefined"!=typeof document)if(document.hasFocus()&&"visible"==document.visibilityState){n.default.allowReconnect=true;n.default.close(t);n.default.reconnect(10);return}n.default.allowReconnect=false;n.default.close(t);}catch(e){s.default.error(`ServerClose t1`,e);n.default.allowReconnect=false;n.default.close(`${t} error`);}}}class u{constructor(){this.code=-1;this.msg="";}static parse(t){let e=new u;let r=JSON.parse(t);e.code=r.code;e.msg=r.msg;return e}}e["default"]=o;},910:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(8506));const s=i(r(9586));class a extends s.default{constructor(){super(...arguments);this.addPhoneInfoResultData=new o;}static parse(t){let e=new a;super.parseActionMsg(e,t);e.addPhoneInfoResultData=o.parse(e.actionMsgData.msgData);return e}receive(){var t;this.addPhoneInfoResultData;let e=s.default.removeWaitingResponseMessage(this.actionMsgData.msgId);if(e)null===(t=e.callback)||void 0===t||t.call(e.callback,{resultCode:this.addPhoneInfoResultData.errorCode,message:this.addPhoneInfoResultData.errorMsg});n.default.set({key:n.default.KEY_ADD_PHONE_INFO_TIME,data:(new Date).getTime()});}}class o{constructor(){this.errorCode=-1;this.errorMsg="";}static parse(t){let e=new o;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;return e}}e["default"]=a;},9538:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(8506));const s=i(r(529));const a=i(r(9586));class o extends a.default{constructor(){super(...arguments);this.bindAliasResultData=new u;}static parse(t){let e=new o;super.parseActionMsg(e,t);e.bindAliasResultData=u.parse(e.actionMsgData.msgData);return e}receive(){var t;s.default.info(`bind alias result`,this.bindAliasResultData);let e=a.default.removeWaitingResponseMessage(this.actionMsgData.msgId);if(e)null===(t=e.callback)||void 0===t||t.call(e.callback,{resultCode:this.bindAliasResultData.errorCode,message:this.bindAliasResultData.errorMsg});n.default.set({key:n.default.KEY_BIND_ALIAS_TIME,data:(new Date).getTime()});}}class u{constructor(){this.errorCode=-1;this.errorMsg="";}static parse(t){let e=new u;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;return e}}e["default"]=o;},9479:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=r(4198);const s=i(r(9586));class a extends s.default{constructor(){super(...arguments);this.feedbackResultData=new o;}static parse(t){let e=new a;super.parseActionMsg(e,t);e.feedbackResultData=o.parse(e.actionMsgData.msgData);return e}receive(){var t;this.feedbackResultData;let e=s.default.removeWaitingResponseMessage(this.actionMsgData.msgId);if(e)null===(t=e.callback)||void 0===t||t.call(e.callback,{resultCode:n.ErrorCode.SUCCESS,message:"received"});}}class o{constructor(){this.actionId="";this.taskId="";this.result="";}static parse(t){let e=new o;let r=JSON.parse(t);e.actionId=r.actionId;e.taskId=r.taskId;e.result=r.result;return e}}e["default"]=a;},6755:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};var n;Object.defineProperty(e,"__esModule",{value:true});const s=i(r(6379));const a=i(r(9586));const o=i(r(8723));class u extends a.default{constructor(){super(...arguments);this.pushMessageData=new c;}static parse(t){let e=new u;super.parseActionMsg(e,t);e.pushMessageData=c.parse(e.actionMsgData.msgData);return e}receive(){var t;this.pushMessageData;if(this.pushMessageData.appId!=s.default.appid||!this.pushMessageData.messageid||!this.pushMessageData.taskId)this.stringify();o.default.create(this,o.default.ActionId.RECEIVE).send();o.default.create(this,o.default.ActionId.MP_RECEIVE).send();if(this.actionMsgData.msgExtraData&&s.default.onPushMsg)null===(t=s.default.onPushMsg)||void 0===t||t.call(s.default.onPushMsg,{message:this.actionMsgData.msgExtraData});}}class c{constructor(){this.id="";this.appKey="";this.appId="";this.messageid="";this.taskId="";this.actionChain=[];this.cdnType="";}static parse(t){let e=new c;let r=JSON.parse(t);e.id=r.id;e.appKey=r.appKey;e.appId=r.appId;e.messageid=r.messageid;e.taskId=r.taskId;e.actionChain=r.actionChain;e.cdnType=r.cdnType;return e}}(n=class{},n.GO_TO="goto",n.TRANSMIT="transmit",n);e["default"]=u;},9510:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(9586));class s extends n.default{constructor(){super(...arguments);this.setModeResultData=new a;}static parse(t){let e=new s;super.parseActionMsg(e,t);e.setModeResultData=a.parse(e.actionMsgData.msgData);return e}receive(){var t;this.setModeResultData;let e=n.default.removeWaitingResponseMessage(this.actionMsgData.msgId);if(e)null===(t=e.callback)||void 0===t||t.call(e.callback,{resultCode:this.setModeResultData.errorCode,message:this.setModeResultData.errorMsg});}}class a{constructor(){this.errorCode=-1;this.errorMsg="";}static parse(t){let e=new a;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;return e}}e["default"]=s;},4626:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(8506));const s=i(r(529));const a=i(r(9586));class o extends a.default{constructor(){super(...arguments);this.setTagResultData=new u;}static parse(t){let e=new o;super.parseActionMsg(e,t);e.setTagResultData=u.parse(e.actionMsgData.msgData);return e}receive(){var t;s.default.info(`set tag result`,this.setTagResultData);let e=a.default.removeWaitingResponseMessage(this.actionMsgData.msgId);if(e)null===(t=e.callback)||void 0===t||t.call(e.callback,{resultCode:this.setTagResultData.errorCode,message:this.setTagResultData.errorMsg});n.default.set({key:n.default.KEY_SET_TAG_TIME,data:(new Date).getTime()});}}class u{constructor(){this.errorCode=0;this.errorMsg="";}static parse(t){let e=new u;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;return e}}e["default"]=o;},7562:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(8506));const s=i(r(529));const a=i(r(9586));class o extends a.default{constructor(){super(...arguments);this.unbindAliasResultData=new u;}static parse(t){let e=new o;super.parseActionMsg(e,t);e.unbindAliasResultData=u.parse(e.actionMsgData.msgData);return e}receive(){var t;s.default.info(`unbind alias result`,this.unbindAliasResultData);let e=a.default.removeWaitingResponseMessage(this.actionMsgData.msgId);if(e)null===(t=e.callback)||void 0===t||t.call(e.callback,{resultCode:this.unbindAliasResultData.errorCode,message:this.unbindAliasResultData.errorMsg});n.default.set({key:n.default.KEY_BIND_ALIAS_TIME,data:(new Date).getTime()});}}class u{constructor(){this.errorCode=-1;this.errorMsg="";}static parse(t){let e=new u;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;return e}}e["default"]=o;},8227:(t,e)=>{Object.defineProperty(e,"__esModule",{value:true});class r{constructor(t){this.delay=10;this.delay=t;}start(){this.cancel();let t=this;this.timer=setInterval((function(){t.run();}),this.delay);}cancel(){if(this.timer)clearInterval(this.timer);}}e["default"]=r;},7167:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};var n;Object.defineProperty(e,"__esModule",{value:true});const s=i(r(6362));const a=i(r(8227));class o extends a.default{static getInstance(){return o.InstanceHolder.instance}run(){s.default.create().send();}refresh(){this.delay=60*1e3;this.start();}}o.INTERVAL=60*1e3;o.InstanceHolder=(n=class{},n.instance=new o(o.INTERVAL),n);e["default"]=o;},2323:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(4736));const s=i(r(6667));var a;(function(t){let e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";let r=(0, n.default)("9223372036854775808");function i(t){let e=a(t);let r=o(e);let i=r[1];let n=r[0];return u(i)+u(n)}t.to_getui=i;function a(t){let e=s.default.md5Hex(t);let r=c(e);r[6]&=15;r[6]|=48;r[8]&=63;r[8]|=128;return r}function o(t){let e=(0, n.default)(0);let r=(0, n.default)(0);for(let r=0;r<8;r++)e=e.multiply(256).plus((0, n.default)(255&t[r]));for(let e=8;e<16;e++)r=r.multiply(256).plus((0, n.default)(255&t[e]));return [e,r]}function u(t){if(t>=r)t=r.multiply(2).minus(t);let i="";for(;t>(0, n.default)(0);t=t.divide(62))i+=e.charAt(Number(t.divmod(62).remainder));return i}function c(t){let e=t.length;if(e%2!=0)return [];let r=new Array;for(let i=0;i{Object.defineProperty(e,"__esModule",{value:true});class r{static info(...t){if(this.debugMode)console.info(`[GtPush]`,t);}static warn(...t){console.warn(`[GtPush]`,t);}static error(...t){console.error(`[GtPush]`,t);}}r.debugMode=false;e["default"]=r;},3854:(t,e)=>{Object.defineProperty(e,"__esModule",{value:true});class r{static getStr(t,e){try{if(!t||void 0===t[e])return "";return t[e]}catch(t){}return ""}}e["default"]=r;},2620:(t,e,r)=>{r.r(e);r.d(e,{JSEncrypt:()=>wt,default:()=>St});var i="0123456789abcdefghijklmnopqrstuvwxyz";function n(t){return i.charAt(t)}function s(t,e){return t&e}function a(t,e){return t|e}function o(t,e){return t^e}function u(t,e){return t&~e}function c(t){if(0==t)return -1;var e=0;if(0==(65535&t)){t>>=16;e+=16;}if(0==(255&t)){t>>=8;e+=8;}if(0==(15&t)){t>>=4;e+=4;}if(0==(3&t)){t>>=2;e+=2;}if(0==(1&t))++e;return e}function l(t){var e=0;while(0!=t){t&=t-1;++e;}return e}var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var h="=";function d(t){var e;var r;var i="";for(e=0;e+3<=t.length;e+=3){r=parseInt(t.substring(e,e+3),16);i+=f.charAt(r>>6)+f.charAt(63&r);}if(e+1==t.length){r=parseInt(t.substring(e,e+1),16);i+=f.charAt(r<<2);}else if(e+2==t.length){r=parseInt(t.substring(e,e+2),16);i+=f.charAt(r>>2)+f.charAt((3&r)<<4);}while((3&i.length)>0)i+=h;return i}function v(t){var e="";var r;var i=0;var s=0;for(r=0;r>2);s=3&a;i=1;}else if(1==i){e+=n(s<<2|a>>4);s=15&a;i=2;}else if(2==i){e+=n(s);e+=n(a>>2);s=3&a;i=3;}else {e+=n(s<<2|a>>4);e+=n(15&a);i=0;}}if(1==i)e+=n(s<<2);return e}var g;var y={decode:function(t){var e;if(void 0===g){var r="0123456789ABCDEF";var i=" \f\n\r\t \u2028\u2029";g={};for(e=0;e<16;++e)g[r.charAt(e)]=e;r=r.toLowerCase();for(e=10;e<16;++e)g[r.charAt(e)]=e;for(e=0;e=2){n[n.length]=s;s=0;a=0;}else s<<=4;}if(a)throw new Error("Hex encoding incomplete: 4 bits missing");return n}};var m;var w={decode:function(t){var e;if(void 0===m){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var i="= \f\n\r\t \u2028\u2029";m=Object.create(null);for(e=0;e<64;++e)m[r.charAt(e)]=e;m["-"]=62;m["_"]=63;for(e=0;e=4){n[n.length]=s>>16;n[n.length]=s>>8&255;n[n.length]=255&s;s=0;a=0;}else s<<=6;}switch(a){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:n[n.length]=s>>10;break;case 3:n[n.length]=s>>16;n[n.length]=s>>8&255;break}return n},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=w.re.exec(t);if(e)if(e[1])t=e[1];else if(e[2])t=e[2];else throw new Error("RegExp out of sync");return w.decode(t)}};var S=1e13;var _=function(){function t(t){this.buf=[+t||0];}t.prototype.mulAdd=function(t,e){var r=this.buf;var i=r.length;var n;var s;for(n=0;n0)r[n]=e;};t.prototype.sub=function(t){var e=this.buf;var r=e.length;var i;var n;for(i=0;i=0;--i)r+=(S+e[i]).toString().substring(1);return r};t.prototype.valueOf=function(){var t=this.buf;var e=0;for(var r=t.length-1;r>=0;--r)e=e*S+t[r];return e};t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this};return t}();var b="…";var E=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;var D=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function M(t,e){if(t.length>e)t=t.substring(0,e)+b;return t}var T=function(){function t(e,r){this.hexDigits="0123456789ABCDEF";if(e instanceof t){this.enc=e.enc;this.pos=e.pos;}else {this.enc=e;this.pos=r;}}t.prototype.get=function(t){if(void 0===t)t=this.pos++;if(t>=this.enc.length)throw new Error("Requesting byte offset "+t+" on a stream of length "+this.enc.length);return "string"===typeof this.enc?this.enc.charCodeAt(t):this.enc[t]};t.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)};t.prototype.hexDump=function(t,e,r){var i="";for(var n=t;n176)return false}return true};t.prototype.parseStringISO=function(t,e){var r="";for(var i=t;i191&&n<224)r+=String.fromCharCode((31&n)<<6|63&this.get(i++));else r+=String.fromCharCode((15&n)<<12|(63&this.get(i++))<<6|63&this.get(i++));}return r};t.prototype.parseStringBMP=function(t,e){var r="";var i;var n;for(var s=t;s127;var n=i?255:0;var s;var a="";while(r==n&&++t4){a=r;s<<=3;while(0==(128&(+a^n))){a=+a<<1;--s;}a="("+s+" bit)\n";}if(i)r-=256;var o=new _(r);for(var u=t+1;u=c;--l)a+=u>>l&1?"1":"0";if(a.length>r)return s+M(a,r)}return s+a};t.prototype.parseOctetString=function(t,e,r){if(this.isASCII(t,e))return M(this.parseStringISO(t,e),r);var i=e-t;var n="("+i+" byte)\n";r/=2;if(i>r)e=t+r;for(var s=t;sr)n+=b;return n};t.prototype.parseOID=function(t,e,r){var i="";var n=new _;var s=0;for(var a=t;ar)return M(i,r);n=new _;s=0;}}if(s>0)i+=".incomplete";return i};return t}();var I=function(){function t(t,e,r,i,n){if(!(i instanceof A))throw new Error("Invalid tag value.");this.stream=t;this.header=e;this.length=r;this.tag=i;this.sub=n;}t.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return "EOC";case 1:return "BOOLEAN";case 2:return "INTEGER";case 3:return "BIT_STRING";case 4:return "OCTET_STRING";case 5:return "NULL";case 6:return "OBJECT_IDENTIFIER";case 7:return "ObjectDescriptor";case 8:return "EXTERNAL";case 9:return "REAL";case 10:return "ENUMERATED";case 11:return "EMBEDDED_PDV";case 12:return "UTF8String";case 16:return "SEQUENCE";case 17:return "SET";case 18:return "NumericString";case 19:return "PrintableString";case 20:return "TeletexString";case 21:return "VideotexString";case 22:return "IA5String";case 23:return "UTCTime";case 24:return "GeneralizedTime";case 25:return "GraphicString";case 26:return "VisibleString";case 27:return "GeneralString";case 28:return "UniversalString";case 30:return "BMPString"}return "Universal_"+this.tag.tagNumber.toString();case 1:return "Application_"+this.tag.tagNumber.toString();case 2:return "["+this.tag.tagNumber.toString()+"]";case 3:return "Private_"+this.tag.tagNumber.toString()}};t.prototype.content=function(t){if(void 0===this.tag)return null;if(void 0===t)t=1/0;var e=this.posContent();var r=Math.abs(this.length);if(!this.tag.isUniversal()){if(null!==this.sub)return "("+this.sub.length+" elem)";return this.stream.parseOctetString(e,e+r,t)}switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+r);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+r,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+r,t);case 6:return this.stream.parseOID(e,e+r,t);case 16:case 17:if(null!==this.sub)return "("+this.sub.length+" elem)";else return "(no elem)";case 12:return M(this.stream.parseStringUTF(e,e+r),t);case 18:case 19:case 20:case 21:case 22:case 26:return M(this.stream.parseStringISO(e,e+r),t);case 30:return M(this.stream.parseStringBMP(e,e+r),t);case 23:case 24:return this.stream.parseTime(e,e+r,23==this.tag.tagNumber)}return null};t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"};t.prototype.toPrettyString=function(t){if(void 0===t)t="";var e=t+this.typeName()+" @"+this.stream.pos;if(this.length>=0)e+="+";e+=this.length;if(this.tag.tagConstructed)e+=" (constructed)";else if(this.tag.isUniversal()&&(3==this.tag.tagNumber||4==this.tag.tagNumber)&&null!==this.sub)e+=" (encapsulates)";e+="\n";if(null!==this.sub){t+=" ";for(var r=0,i=this.sub.length;r6)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===r)return null;e=0;for(var i=0;i>6;this.tagConstructed=0!==(32&e);this.tagNumber=31&e;if(31==this.tagNumber){var r=new _;do{e=t.get();r.mulAdd(128,127&e);}while(128&e);this.tagNumber=r.simplify();}}t.prototype.isUniversal=function(){return 0===this.tagClass};t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber};return t}();var x;var R=0xdeadbeefcafe;var B=15715070==(16777215&R);var O=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997];var k=(1<<26)/O[O.length-1];var C=function(){function t(t,e,r){if(null!=t)if("number"==typeof t)this.fromNumber(t,e,r);else if(null==e&&"string"!=typeof t)this.fromString(t,256);else this.fromString(t,e);}t.prototype.toString=function(t){if(this.s<0)return "-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else if(4==t)e=2;else return this.toRadix(t);var r=(1<0){if(u>u)>0){s=true;a=n(i);}while(o>=0){if(u>(u+=this.DB-e);}else {i=this[o]>>(u-=e)&r;if(u<=0){u+=this.DB;--o;}}if(i>0)s=true;if(s)a+=n(i);}}return s?a:"0"};t.prototype.negate=function(){var e=H();t.ZERO.subTo(this,e);return e};t.prototype.abs=function(){return this.s<0?this.negate():this};t.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;e=r-t.t;if(0!=e)return this.s<0?-e:e;while(--r>=0)if(0!=(e=this[r]-t[r]))return e;return 0};t.prototype.bitLength=function(){if(this.t<=0)return 0;return this.DB*(this.t-1)+W(this[this.t-1]^this.s&this.DM)};t.prototype.mod=function(e){var r=H();this.abs().divRemTo(e,null,r);if(this.s<0&&r.compareTo(t.ZERO)>0)e.subTo(r,r);return r};t.prototype.modPowInt=function(t,e){var r;if(t<256||e.isEven())r=new P(e);else r=new V(e);return this.exp(t,r)};t.prototype.clone=function(){var t=H();this.copyTo(t);return t};t.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;else if(0==this.t)return -1}else if(1==this.t)return this[0];else if(0==this.t)return 0;return (this[1]&(1<<32-this.DB)-1)<>24};t.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16};t.prototype.signum=function(){if(this.s<0)return -1;else if(this.t<=0||1==this.t&&this[0]<=0)return 0;else return 1};t.prototype.toByteArray=function(){var t=this.t;var e=[];e[0]=this.s;var r=this.DB-t*this.DB%8;var i;var n=0;if(t-- >0){if(r>r)!=(this.s&this.DM)>>r)e[n++]=i|this.s<=0){if(r<8){i=(this[t]&(1<>(r+=this.DB-8);}else {i=this[t]>>(r-=8)&255;if(r<=0){r+=this.DB;--t;}}if(0!=(128&i))i|=-256;if(0==n&&(128&this.s)!=(128&i))++n;if(n>0||i!=this.s)e[n++]=i;}}return e};t.prototype.equals=function(t){return 0==this.compareTo(t)};t.prototype.min=function(t){return this.compareTo(t)<0?this:t};t.prototype.max=function(t){return this.compareTo(t)>0?this:t};t.prototype.and=function(t){var e=H();this.bitwiseTo(t,s,e);return e};t.prototype.or=function(t){var e=H();this.bitwiseTo(t,a,e);return e};t.prototype.xor=function(t){var e=H();this.bitwiseTo(t,o,e);return e};t.prototype.andNot=function(t){var e=H();this.bitwiseTo(t,u,e);return e};t.prototype.not=function(){var t=H();for(var e=0;e=this.t)return 0!=this.s;return 0!=(this[e]&1<1){var l=H();s.sqrTo(a[1],l);while(o<=c){a[o]=H();s.mulTo(l,a[o-2],a[o]);o+=2;}}var f=t.t-1;var h;var d=true;var v=H();var p;r=W(t[f])-1;while(f>=0){if(r>=u)h=t[f]>>r-u&c;else {h=(t[f]&(1<0)h|=t[f-1]>>this.DB+r-u;}o=i;while(0==(1&h)){h>>=1;--o;}if((r-=o)<0){r+=this.DB;--f;}if(d){a[h].copyTo(n);d=false;}else {while(o>1){s.sqrTo(n,v);s.sqrTo(v,n);o-=2;}if(o>0)s.sqrTo(n,v);else {p=n;n=v;v=p;}s.mulTo(v,a[h],n);}while(f>=0&&0==(t[f]&1<=0){i.subTo(n,i);if(r)s.subTo(o,s);a.subTo(u,a);}else {n.subTo(i,n);if(r)o.subTo(s,o);u.subTo(a,u);}}if(0!=n.compareTo(t.ONE))return t.ZERO;if(u.compareTo(e)>=0)return u.subtract(e);if(u.signum()<0)u.addTo(e,u);else return u;if(u.signum()<0)return u.add(e);else return u};t.prototype.pow=function(t){return this.exp(t,new N)};t.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone();var r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var i=e;e=r;r=i;}var n=e.getLowestSetBit();var s=r.getLowestSetBit();if(s<0)return e;if(n0){e.rShiftTo(s,e);r.rShiftTo(s,r);}while(e.signum()>0){if((n=e.getLowestSetBit())>0)e.rShiftTo(n,e);if((n=r.getLowestSetBit())>0)r.rShiftTo(n,r);if(e.compareTo(r)>=0){e.subTo(r,e);e.rShiftTo(1,e);}else {r.subTo(e,r);r.rShiftTo(1,r);}}if(s>0)r.lShiftTo(s,r);return r};t.prototype.isProbablePrime=function(t){var e;var r=this.abs();if(1==r.t&&r[0]<=O[O.length-1]){for(e=0;e=0;--e)t[e]=this[e];t.t=this.t;t.s=this.s;};t.prototype.fromInt=function(t){this.t=1;this.s=t<0?-1:0;if(t>0)this[0]=t;else if(t<-1)this[0]=t+this.DV;else this.t=0;};t.prototype.fromString=function(e,r){var i;if(16==r)i=4;else if(8==r)i=3;else if(256==r)i=8;else if(2==r)i=1;else if(32==r)i=5;else if(4==r)i=2;else {this.fromRadix(e,r);return}this.t=0;this.s=0;var n=e.length;var s=false;var a=0;while(--n>=0){var o=8==i?255&+e[n]:G(e,n);if(o<0){if("-"==e.charAt(n))s=true;continue}s=false;if(0==a)this[this.t++]=o;else if(a+i>this.DB){this[this.t-1]|=(o&(1<>this.DB-a;}else this[this.t-1]|=o<=this.DB)a-=this.DB;}if(8==i&&0!=(128&+e[0])){this.s=-1;if(a>0)this[this.t-1]|=(1<0&&this[this.t-1]==t)--this.t;};t.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t;e.s=this.s;};t.prototype.drShiftTo=function(t,e){for(var r=t;r=0;--o){e[o+s+1]=this[o]>>i|a;a=(this[o]&n)<=0;--o)e[o]=0;e[s]=a;e.t=this.t+s+1;e.s=this.s;e.clamp();};t.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t){e.t=0;return}var i=t%this.DB;var n=this.DB-i;var s=(1<>i;for(var a=r+1;a>i;}if(i>0)e[this.t-r-1]|=(this.s&s)<>=this.DB;}if(t.t>=this.DB;}i+=this.s;}else {i+=this.s;while(r>=this.DB;}i-=t.s;}e.s=i<0?-1:0;if(i<-1)e[r++]=this.DV+i;else if(i>0)e[r++]=i;e.t=r;e.clamp();};t.prototype.multiplyTo=function(e,r){var i=this.abs();var n=e.abs();var s=i.t;r.t=s+n.t;while(--s>=0)r[s]=0;for(s=0;s=0)t[r]=0;for(r=0;r=e.DV){t[r+e.t]-=e.DV;t[r+e.t+1]=1;}}if(t.t>0)t[t.t-1]+=e.am(r,e[r],t,2*r,0,1);t.s=0;t.clamp();};t.prototype.divRemTo=function(e,r,i){var n=e.abs();if(n.t<=0)return;var s=this.abs();if(s.t0){n.lShiftTo(c,a);s.lShiftTo(c,i);}else {n.copyTo(a);s.copyTo(i);}var l=a.t;var f=a[l-1];if(0==f)return;var h=f*(1<1?a[l-2]>>this.F2:0);var d=this.FV/h;var v=(1<=0){i[i.t++]=1;i.subTo(m,i);}t.ONE.dlShiftTo(l,m);m.subTo(a,a);while(a.t=0){var w=i[--g]==f?this.DM:Math.floor(i[g]*d+(i[g-1]+p)*v);if((i[g]+=a.am(0,w,i,y,0,l))0)i.rShiftTo(c,i);if(o<0)t.ZERO.subTo(i,i);};t.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;e=e*(2-(15&t)*e)&15;e=e*(2-(255&t)*e)&255;e=e*(2-((65535&t)*e&65535))&65535;e=e*(2-t*e%this.DV)%this.DV;return e>0?this.DV-e:-e};t.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)};t.prototype.exp=function(e,r){if(e>4294967295||e<1)return t.ONE;var i=H();var n=H();var s=r.convert(this);var a=W(e)-1;s.copyTo(i);while(--a>=0){r.sqrTo(i,n);if((e&1<0)r.mulTo(n,s,i);else {var o=i;i=n;n=o;}}return r.revert(i)};t.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))};t.prototype.toRadix=function(t){if(null==t)t=10;if(0==this.signum()||t<2||t>36)return "0";var e=this.chunkSize(t);var r=Math.pow(t,e);var i=Y(r);var n=H();var s=H();var a="";this.divRemTo(i,n,s);while(n.signum()>0){a=(r+s.intValue()).toString(t).substr(1)+a;n.divRemTo(i,n,s);}return s.intValue().toString(t)+a};t.prototype.fromRadix=function(e,r){this.fromInt(0);if(null==r)r=10;var i=this.chunkSize(r);var n=Math.pow(r,i);var s=false;var a=0;var o=0;for(var u=0;u=i){this.dMultiply(n);this.dAddOffset(o,0);a=0;o=0;}}if(a>0){this.dMultiply(Math.pow(r,a));this.dAddOffset(o,0);}if(s)t.ZERO.subTo(this,this);};t.prototype.fromNumber=function(e,r,i){if("number"==typeof r)if(e<2)this.fromInt(1);else {this.fromNumber(e,i);if(!this.testBit(e-1))this.bitwiseTo(t.ONE.shiftLeft(e-1),a,this);if(this.isEven())this.dAddOffset(1,0);while(!this.isProbablePrime(r)){this.dAddOffset(2,0);if(this.bitLength()>e)this.subTo(t.ONE.shiftLeft(e-1),this);}}else {var n=[];var s=7&e;n.length=(e>>3)+1;r.nextBytes(n);if(s>0)n[0]&=(1<>=this.DB;}if(t.t>=this.DB;}i+=this.s;}else {i+=this.s;while(r>=this.DB;}i+=t.s;}e.s=i<0?-1:0;if(i>0)e[r++]=i;else if(i<-1)e[r++]=this.DV+i;e.t=r;e.clamp();};t.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t);++this.t;this.clamp();};t.prototype.dAddOffset=function(t,e){if(0==t)return;while(this.t<=e)this[this.t++]=0;this[e]+=t;while(this[e]>=this.DV){this[e]-=this.DV;if(++e>=this.t)this[this.t++]=0;++this[e];}};t.prototype.multiplyLowerTo=function(t,e,r){var i=Math.min(this.t+t.t,e);r.s=0;r.t=i;while(i>0)r[--i]=0;for(var n=r.t-this.t;i=0)r[i]=0;for(i=Math.max(e-this.t,0);i0)if(0==e)r=this[0]%t;else for(var i=this.t-1;i>=0;--i)r=(e*r+this[i])%t;return r};t.prototype.millerRabin=function(e){var r=this.subtract(t.ONE);var i=r.getLowestSetBit();if(i<=0)return false;var n=r.shiftRight(i);e=e+1>>1;if(e>O.length)e=O.length;var s=H();for(var a=0;a0){r.rShiftTo(a,r);i.rShiftTo(a,i);}var o=function(){if((s=r.getLowestSetBit())>0)r.rShiftTo(s,r);if((s=i.getLowestSetBit())>0)i.rShiftTo(s,i);if(r.compareTo(i)>=0){r.subTo(i,r);r.rShiftTo(1,r);}else {i.subTo(r,i);i.rShiftTo(1,i);}if(!(r.signum()>0)){if(a>0)i.lShiftTo(a,i);setTimeout((function(){e(i);}),0);}else setTimeout(o,0);};setTimeout(o,10);};t.prototype.fromNumberAsync=function(e,r,i,n){if("number"==typeof r)if(e<2)this.fromInt(1);else {this.fromNumber(e,i);if(!this.testBit(e-1))this.bitwiseTo(t.ONE.shiftLeft(e-1),a,this);if(this.isEven())this.dAddOffset(1,0);var s=this;var o=function(){s.dAddOffset(2,0);if(s.bitLength()>e)s.subTo(t.ONE.shiftLeft(e-1),s);if(s.isProbablePrime(r))setTimeout((function(){n();}),0);else setTimeout(o,0);};setTimeout(o,0);}else {var u=[];var c=7&e;u.length=(e>>3)+1;r.nextBytes(u);if(c>0)u[0]&=(1<=0)return t.mod(this.m);else return t};t.prototype.revert=function(t){return t};t.prototype.reduce=function(t){t.divRemTo(this.m,null,t);};t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r);this.reduce(r);};t.prototype.sqrTo=function(t,e){t.squareTo(e);this.reduce(e);};return t}();var V=function(){function t(t){this.m=t;this.mp=t.invDigit();this.mpl=32767&this.mp;this.mph=this.mp>>15;this.um=(1<0)this.m.subTo(e,e);return e};t.prototype.revert=function(t){var e=H();t.copyTo(e);this.reduce(e);return e};t.prototype.reduce=function(t){while(t.t<=this.mt2)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;r=e+this.m.t;t[r]+=this.m.am(0,i,t,e,0,this.m.t);while(t[r]>=t.DV){t[r]-=t.DV;t[++r]++;}}t.clamp();t.drShiftTo(this.m.t,t);if(t.compareTo(this.m)>=0)t.subTo(this.m,t);};t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r);this.reduce(r);};t.prototype.sqrTo=function(t,e){t.squareTo(e);this.reduce(e);};return t}();var L=function(){function t(t){this.m=t;this.r2=H();this.q3=H();C.ONE.dlShiftTo(2*t.t,this.r2);this.mu=this.r2.divide(t);}t.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);else if(t.compareTo(this.m)<0)return t;else {var e=H();t.copyTo(e);this.reduce(e);return e}};t.prototype.revert=function(t){return t};t.prototype.reduce=function(t){t.drShiftTo(this.m.t-1,this.r2);if(t.t>this.m.t+1){t.t=this.m.t+1;t.clamp();}this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);while(t.compareTo(this.r2)<0)t.dAddOffset(1,this.m.t+1);t.subTo(this.r2,t);while(t.compareTo(this.m)>=0)t.subTo(this.m,t);};t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r);this.reduce(r);};t.prototype.sqrTo=function(t,e){t.squareTo(e);this.reduce(e);};return t}();function H(){return new C(null)}function U(t,e){return new C(t,e)}var K="undefined"!==typeof navigator;if(K&&B&&"Microsoft Internet Explorer"==navigator.appName){C.prototype.am=function t(e,r,i,n,s,a){var o=32767&r;var u=r>>15;while(--a>=0){var c=32767&this[e];var l=this[e++]>>15;var f=u*c+l*o;c=o*c+((32767&f)<<15)+i[n]+(1073741823&s);s=(c>>>30)+(f>>>15)+u*l+(s>>>30);i[n++]=1073741823&c;}return s};x=30;}else if(K&&B&&"Netscape"!=navigator.appName){C.prototype.am=function t(e,r,i,n,s,a){while(--a>=0){var o=r*this[e++]+i[n]+s;s=Math.floor(o/67108864);i[n++]=67108863&o;}return s};x=26;}else {C.prototype.am=function t(e,r,i,n,s,a){var o=16383&r;var u=r>>14;while(--a>=0){var c=16383&this[e];var l=this[e++]>>14;var f=u*c+l*o;c=o*c+((16383&f)<<14)+i[n]+s;s=(c>>28)+(f>>14)+u*l;i[n++]=268435455&c;}return s};x=28;}C.prototype.DB=x;C.prototype.DM=(1<>>16)){t=r;e+=16;}if(0!=(r=t>>8)){t=r;e+=8;}if(0!=(r=t>>4)){t=r;e+=4;}if(0!=(r=t>>2)){t=r;e+=2;}if(0!=(r=t>>1)){t=r;e+=1;}return e}C.ZERO=Y(0);C.ONE=Y(1);var J=function(){function t(){this.i=0;this.j=0;this.S=[];}t.prototype.init=function(t){var e;var r;var i;for(e=0;e<256;++e)this.S[e]=e;r=0;for(e=0;e<256;++e){r=r+this.S[e]+t[e%t.length]&255;i=this.S[e];this.S[e]=this.S[r];this.S[r]=i;}this.i=0;this.j=0;};t.prototype.next=function(){var t;this.i=this.i+1&255;this.j=this.j+this.S[this.i]&255;t=this.S[this.i];this.S[this.i]=this.S[this.j];this.S[this.j]=t;return this.S[t+this.S[this.i]&255]};return t}();function Z(){return new J}var $=256;var X;var Q=null;var tt;if(null==Q){Q=[];tt=0;}function nt(){if(null==X){X=Z();while(tt<$){var t=Math.floor(65536*Math.random());Q[tt++]=255&t;}X.init(Q);for(tt=0;tt=0&&e>0){var n=t.charCodeAt(i--);if(n<128)r[--e]=n;else if(n>127&&n<2048){r[--e]=63&n|128;r[--e]=n>>6|192;}else {r[--e]=63&n|128;r[--e]=n>>6&63|128;r[--e]=n>>12|224;}}r[--e]=0;var s=new st;var a=[];while(e>2){a[0]=0;while(0==a[0])s.nextBytes(a);r[--e]=a[0];}r[--e]=2;r[--e]=0;return new C(r)}var ut=function(){function t(){this.n=null;this.e=0;this.d=null;this.p=null;this.q=null;this.dmp1=null;this.dmq1=null;this.coeff=null;}t.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)};t.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);var e=t.mod(this.p).modPow(this.dmp1,this.p);var r=t.mod(this.q).modPow(this.dmq1,this.q);while(e.compareTo(r)<0)e=e.add(this.p);return e.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)};t.prototype.setPublic=function(t,e){if(null!=t&&null!=e&&t.length>0&&e.length>0){this.n=U(t,16);this.e=parseInt(e,16);}else console.error("Invalid RSA public key");};t.prototype.encrypt=function(t){var e=this.n.bitLength()+7>>3;var r=ot(t,e);if(null==r)return null;var i=this.doPublic(r);if(null==i)return null;var n=i.toString(16);var s=n.length;for(var a=0;a<2*e-s;a++)n="0"+n;return n};t.prototype.setPrivate=function(t,e,r){if(null!=t&&null!=e&&t.length>0&&e.length>0){this.n=U(t,16);this.e=parseInt(e,16);this.d=U(r,16);}else console.error("Invalid RSA private key");};t.prototype.setPrivateEx=function(t,e,r,i,n,s,a,o){if(null!=t&&null!=e&&t.length>0&&e.length>0){this.n=U(t,16);this.e=parseInt(e,16);this.d=U(r,16);this.p=U(i,16);this.q=U(n,16);this.dmp1=U(s,16);this.dmq1=U(a,16);this.coeff=U(o,16);}else console.error("Invalid RSA private key");};t.prototype.generate=function(t,e){var r=new st;var i=t>>1;this.e=parseInt(e,16);var n=new C(e,16);for(;;){for(;;){this.p=new C(t-i,1,r);if(0==this.p.subtract(C.ONE).gcd(n).compareTo(C.ONE)&&this.p.isProbablePrime(10))break}for(;;){this.q=new C(i,1,r);if(0==this.q.subtract(C.ONE).gcd(n).compareTo(C.ONE)&&this.q.isProbablePrime(10))break}if(this.p.compareTo(this.q)<=0){var s=this.p;this.p=this.q;this.q=s;}var a=this.p.subtract(C.ONE);var o=this.q.subtract(C.ONE);var u=a.multiply(o);if(0==u.gcd(n).compareTo(C.ONE)){this.n=this.p.multiply(this.q);this.d=n.modInverse(u);this.dmp1=this.d.mod(a);this.dmq1=this.d.mod(o);this.coeff=this.q.modInverse(this.p);break}}};t.prototype.decrypt=function(t){var e=U(t,16);var r=this.doPrivate(e);if(null==r)return null;return ct(r,this.n.bitLength()+7>>3)};t.prototype.generateAsync=function(t,e,r){var i=new st;var n=t>>1;this.e=parseInt(e,16);var s=new C(e,16);var a=this;var o=function(){var e=function(){if(a.p.compareTo(a.q)<=0){var t=a.p;a.p=a.q;a.q=t;}var e=a.p.subtract(C.ONE);var i=a.q.subtract(C.ONE);var n=e.multiply(i);if(0==n.gcd(s).compareTo(C.ONE)){a.n=a.p.multiply(a.q);a.d=s.modInverse(n);a.dmp1=a.d.mod(e);a.dmq1=a.d.mod(i);a.coeff=a.q.modInverse(a.p);setTimeout((function(){r();}),0);}else setTimeout(o,0);};var u=function(){a.q=H();a.q.fromNumberAsync(n,1,i,(function(){a.q.subtract(C.ONE).gcda(s,(function(t){if(0==t.compareTo(C.ONE)&&a.q.isProbablePrime(10))setTimeout(e,0);else setTimeout(u,0);}));}));};var c=function(){a.p=H();a.p.fromNumberAsync(t-n,1,i,(function(){a.p.subtract(C.ONE).gcda(s,(function(t){if(0==t.compareTo(C.ONE)&&a.p.isProbablePrime(10))setTimeout(u,0);else setTimeout(c,0);}));}));};setTimeout(c,0);};setTimeout(o,0);};t.prototype.sign=function(t,e,r){var i=ht(r);var n=i+e(t).toString();var s=at(n,this.n.bitLength()/4);if(null==s)return null;var a=this.doPrivate(s);if(null==a)return null;var o=a.toString(16);if(0==(1&o.length))return o;else return "0"+o};t.prototype.verify=function(t,e,r){var i=U(e,16);var n=this.doPublic(i);if(null==n)return null;var s=n.toString(16).replace(/^1f+00/,"");var a=dt(s);return a==r(t).toString()};t.prototype.encryptLong=function(t){var e=this;var r="";var i=(this.n.bitLength()+7>>3)-11;var n=this.setSplitChn(t,i);n.forEach((function(t){r+=e.encrypt(t);}));return r};t.prototype.decryptLong=function(t){var e="";var r=this.n.bitLength()+7>>3;var i=2*r;if(t.length>i){var n=t.match(new RegExp(".{1,"+i+"}","g"))||[];var s=[];for(var a=0;ae){var o=t.substring(0,s);r.push(o);return this.setSplitChn(t.substring(s),e,r)}}r.push(t);return r};return t}();function ct(t,e){var r=t.toByteArray();var i=0;while(i=r.length)return null;var n="";while(++i191&&s<224){n+=String.fromCharCode((31&s)<<6|63&r[i+1]);++i;}else {n+=String.fromCharCode((15&s)<<12|(63&r[i+1])<<6|63&r[i+2]);i+=2;}}return n}function lt(t,e){var r=[];for(var i=0;i=s.length)return null;r=r.concat(s.slice(a+1));}var o=r;var u=-1;var c="";while(++u191&&l<224){c+=String.fromCharCode((31&l)<<6|63&o[u+1]);++u;}else {c+=String.fromCharCode((15&l)<<12|(63&o[u+1])<<6|63&o[u+2]);u+=2;}}return c}var ft={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function ht(t){return ft[t]||""}function dt(t){for(var e in ft)if(ft.hasOwnProperty(e)){var r=ft[e];var i=r.length;if(t.substr(0,i)==r)return t.substr(i)}return t}var vt={};vt.lang={extend:function(t,e,r){if(!e||!t)throw new Error("YAHOO.lang.extend failed, please check that "+"all dependencies are included.");var i=function(){};i.prototype=e.prototype;t.prototype=new i;t.prototype.constructor=t;t.superclass=e.prototype;if(e.prototype.constructor==Object.prototype.constructor)e.prototype.constructor=e;if(r){var n;for(n in r)t.prototype[n]=r[n];var s=function(){},a=["toString","valueOf"];try{if(/MSIE/.test(navigator.userAgent))s=function(t,e){for(n=0;n15)throw "ASN.1 length too long to represent by 8x: n = "+t.toString(16);var i=128+r;return i.toString(16)+e}};this.getEncodedHex=function(){if(null==this.hTLV||this.isModified){this.hV=this.getFreshValueHex();this.hL=this.getLengthHexFromValue();this.hTLV=this.hT+this.hL+this.hV;this.isModified=false;}return this.hTLV};this.getValueHex=function(){this.getEncodedHex();return this.hV};this.getFreshValueHex=function(){return ""};};pt.asn1.DERAbstractString=function(t){pt.asn1.DERAbstractString.superclass.constructor.call(this);this.getString=function(){return this.s};this.setString=function(t){this.hTLV=null;this.isModified=true;this.s=t;this.hV=stohex(this.s);};this.setStringHex=function(t){this.hTLV=null;this.isModified=true;this.s=null;this.hV=t;};this.getFreshValueHex=function(){return this.hV};if("undefined"!=typeof t)if("string"==typeof t)this.setString(t);else if("undefined"!=typeof t["str"])this.setString(t["str"]);else if("undefined"!=typeof t["hex"])this.setStringHex(t["hex"]);};vt.lang.extend(pt.asn1.DERAbstractString,pt.asn1.ASN1Object);pt.asn1.DERAbstractTime=function(t){pt.asn1.DERAbstractTime.superclass.constructor.call(this);this.localDateToUTC=function(t){utc=t.getTime()+6e4*t.getTimezoneOffset();var e=new Date(utc);return e};this.formatDate=function(t,e,r){var i=this.zeroPadding;var n=this.localDateToUTC(t);var s=String(n.getFullYear());if("utc"==e)s=s.substr(2,2);var a=i(String(n.getMonth()+1),2);var o=i(String(n.getDate()),2);var u=i(String(n.getHours()),2);var c=i(String(n.getMinutes()),2);var l=i(String(n.getSeconds()),2);var f=s+a+o+u+c+l;if(true===r){var h=n.getMilliseconds();if(0!=h){var d=i(String(h),3);d=d.replace(/[0]+$/,"");f=f+"."+d;}}return f+"Z"};this.zeroPadding=function(t,e){if(t.length>=e)return t;return new Array(e-t.length+1).join("0")+t};this.getString=function(){return this.s};this.setString=function(t){this.hTLV=null;this.isModified=true;this.s=t;this.hV=stohex(t);};this.setByDateValue=function(t,e,r,i,n,s){var a=new Date(Date.UTC(t,e-1,r,i,n,s,0));this.setByDate(a);};this.getFreshValueHex=function(){return this.hV};};vt.lang.extend(pt.asn1.DERAbstractTime,pt.asn1.ASN1Object);pt.asn1.DERAbstractStructured=function(t){pt.asn1.DERAbstractString.superclass.constructor.call(this);this.setByASN1ObjectArray=function(t){this.hTLV=null;this.isModified=true;this.asn1Array=t;};this.appendASN1Object=function(t){this.hTLV=null;this.isModified=true;this.asn1Array.push(t);};this.asn1Array=new Array;if("undefined"!=typeof t)if("undefined"!=typeof t["array"])this.asn1Array=t["array"];};vt.lang.extend(pt.asn1.DERAbstractStructured,pt.asn1.ASN1Object);pt.asn1.DERBoolean=function(){pt.asn1.DERBoolean.superclass.constructor.call(this);this.hT="01";this.hTLV="0101ff";};vt.lang.extend(pt.asn1.DERBoolean,pt.asn1.ASN1Object);pt.asn1.DERInteger=function(t){pt.asn1.DERInteger.superclass.constructor.call(this);this.hT="02";this.setByBigInteger=function(t){this.hTLV=null;this.isModified=true;this.hV=pt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t);};this.setByInteger=function(t){var e=new C(String(t),10);this.setByBigInteger(e);};this.setValueHex=function(t){this.hV=t;};this.getFreshValueHex=function(){return this.hV};if("undefined"!=typeof t)if("undefined"!=typeof t["bigint"])this.setByBigInteger(t["bigint"]);else if("undefined"!=typeof t["int"])this.setByInteger(t["int"]);else if("number"==typeof t)this.setByInteger(t);else if("undefined"!=typeof t["hex"])this.setValueHex(t["hex"]);};vt.lang.extend(pt.asn1.DERInteger,pt.asn1.ASN1Object);pt.asn1.DERBitString=function(t){if(void 0!==t&&"undefined"!==typeof t.obj){var e=pt.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex();}pt.asn1.DERBitString.superclass.constructor.call(this);this.hT="03";this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null;this.isModified=true;this.hV=t;};this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7{}};var e={};function r(i){var n=e[i];if(void 0!==n)return n.exports;var s=e[i]={id:i,loaded:false,exports:{}};t[i].call(s.exports,s,s.exports,r);s.loaded=true;return s.exports}(()=>{r.d=(t,e)=>{for(var i in e)if(r.o(e,i)&&!r.o(t,i))Object.defineProperty(t,i,{enumerable:true,get:e[i]});};})();(()=>{r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}();})();(()=>{r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);})();(()=>{r.r=t=>{if("undefined"!==typeof Symbol&&Symbol.toStringTag)Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});Object.defineProperty(t,"__esModule",{value:true});};})();(()=>{r.nmd=t=>{t.paths=[];if(!t.children)t.children=[];return t};})();var i=r(9021);return i})())); + }}}}e["default"]=r;},4486:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(3854));class s{constructor(){this.systemInfo=wx.getSystemInfoSync();}os(){return n.default.getStr(this.systemInfo,"platform")}osVersion(){return n.default.getStr(this.systemInfo,"system")}model(){return n.default.getStr(this.systemInfo,"model")}brand(){return n.default.getStr(this.systemInfo,"brand")}platform(){return "MP-WEIXIN"}platformVersion(){return n.default.getStr(this.systemInfo,"version")}language(){return n.default.getStr(this.systemInfo,"language")}platformId(){if(wx.canIUse("getAccountInfoSync"))return wx.getAccountInfoSync().miniProgram.appId;return ""}getNetworkType(t){wx.getNetworkType({success:e=>{var r;null===(r=t.success)||void 0===r||r.call(t.success,{networkType:e.networkType});},fail:t.fail});}onNetworkStatusChange(t){wx.onNetworkStatusChange(t);}}e["default"]=s;},5867:(t,e)=>{Object.defineProperty(e,"__esModule",{value:true});class r{set(t){wx.setStorage(t);}setSync(t,e){wx.setStorageSync(t,e);}get(t){wx.getStorage(t);}getSync(t){return wx.getStorageSync(t)}}e["default"]=r;},7006:(t,e)=>{Object.defineProperty(e,"__esModule",{value:true});class r{connect(t){let e=wx.connectSocket({url:t.url,header:t.header,protocols:t.protocols,success:t.success,fail:t.fail,complete:t.complete});return {onOpen:e.onOpen,send:e.send,onMessage:e.onMessage,onError:e.onError,onClose:e.onClose,close:e.close}}}e["default"]=r;},6893:(t,e)=>{Object.defineProperty(e,"__esModule",{value:true});var r;(function(t){t.SDK_VERSION="GTMP-2.0.4.dcloud";t.DEFAULT_SOCKET_URL="wss://wshzn.gepush.com:5223/nws";t.SOCKET_PROTOCOL_VERSION="1.0";t.SERVER_PUBLIC_KEY="MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhAJp1rROuvBF7sBSnvLaesj2iFhMcY8aXyLvpnNLKs2wjL3JmEnyr++SlVa35liUlzi83tnAFkn3A9GB7pHBNzawyUkBh8WUhq5bnFIkk2RaDa6+5MpG84DEv52p7RR+aWwIDAQAB";t.SERVER_PUBLIC_KEY_ID="69d747c4b9f641baf4004be4297e9f3b";t.ID_U_2_G=true;})(r||(r={}));e["default"]=r;},7555:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(7002));const s=i(r(529));const a=i(r(6379));class o{static init(t){var e;if(this.inited)return;try{this.checkAppid(t.appid);this.inited=true;s.default.info(`init: appid=${t.appid}`);a.default.init(t);n.default.connect();}catch(r){this.inited=false;null===(e=t.onError)||void 0===e||e.call(t.onError,{error:r});throw r}}static enableSocket(t){this.checkInit();n.default.enableSocket(t);}static checkInit(){if(!this.inited)throw new Error(`not init, please invoke init method firstly`)}static checkAppid(t){if(null==t||void 0==t||""==t.trim())throw new Error(`invalid appid ${t}`)}}o.inited=false;e["default"]=o;},6379:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(6667));const s=i(r(8506));const a=i(r(6893));const o=i(r(7002));const u=i(r(529));const c=i(r(4685));const l=i(r(2323));class f{static init(t){var e;if(a.default.ID_U_2_G)this.appid=l.default.to_getui(t.appid);else this.appid=t.appid;this.onError=t.onError;this.onClientId=t.onClientId;this.onlineState=t.onlineState;this.onPushMsg=t.onPushMsg;if(this.appid!=s.default.getSync(s.default.KEY_APPID,this.appid)){u.default.info("appid changed, clear session and cid");s.default.setSync(s.default.KEY_CID,"");s.default.setSync(s.default.KEY_SESSION,"");}s.default.setSync(s.default.KEY_APPID,this.appid);this.cid=s.default.getSync(s.default.KEY_CID,this.cid);if(this.cid)null===(e=this.onClientId)||void 0===e||e.call(this.onClientId,{cid:f.cid});this.session=s.default.getSync(s.default.KEY_SESSION,this.session);this.deviceId=s.default.getSync(s.default.KEY_DEVICE_ID,this.deviceId);this.regId=s.default.getSync(s.default.KEY_REGID,this.regId);if(!this.regId){this.regId=this.createRegId();s.default.set({key:s.default.KEY_REGID,data:this.regId});}this.socketUrl=s.default.getSync(s.default.KEY_SOCKET_URL,this.socketUrl);let r=this;c.default.getNetworkType({success:t=>{r.networkType=t.networkType;r.networkConnected="none"!=r.networkType&&""!=r.networkType;}});c.default.onNetworkStatusChange((t=>{r.networkConnected=t.isConnected;r.networkType=t.networkType;if(r.networkConnected)o.default.reconnect(100);}));}static createRegId(){return `M-V${n.default.md5Hex(this.getUuid())}-${(new Date).getTime()}`}static getUuid(){return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){let e=16*Math.random()|0,r="x"===t?e:3&e|8;return r.toString(16)}))}}f.appid="";f.cid="";f.regId="";f.session="";f.deviceId="";f.packetId=1;f.online=false;f.socketUrl=a.default.DEFAULT_SOCKET_URL;f.publicKeyId=a.default.SERVER_PUBLIC_KEY_ID;f.publicKey=a.default.SERVER_PUBLIC_KEY;f.lastAliasTime=0;f.networkConnected=true;f.networkType="none";e["default"]=f;},9586:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};var n,s;Object.defineProperty(e,"__esModule",{value:true});const a=i(r(661));const o=r(4198);const u=i(r(6379));class c extends a.default{constructor(){super(...arguments);this.actionMsgData=new l;}static initActionMsg(t,...e){super.initMsg(t);t.command=a.default.Command.CLIENT_MSG;t.data=t.actionMsgData=l.create();return t}static parseActionMsg(t,e){super.parseMsg(t,e);t.actionMsgData=l.parse(t.data);return t}send(){setTimeout((()=>{var t;if(c.waitingLoginMsgMap.has(this.actionMsgData.msgId)||c.waitingResponseMsgMap.has(this.actionMsgData.msgId)){c.waitingLoginMsgMap.delete(this.actionMsgData.msgId);c.waitingResponseMsgMap.delete(this.actionMsgData.msgId);null===(t=this.callback)||void 0===t||t.call(this.callback,{resultCode:o.ErrorCode.TIME_OUT,message:"waiting time out"});}}),1e4);if(!u.default.online){c.waitingLoginMsgMap.set(this.actionMsgData.msgId,this);return}if(this.actionMsgData.msgAction!=c.ClientAction.RECEIVED)c.waitingResponseMsgMap.set(this.actionMsgData.msgId,this);super.send();}receive(){}static sendWaitingMessages(){let t=this.waitingLoginMsgMap.keys();let e;while(e=t.next(),!e.done){let t=this.waitingLoginMsgMap.get(e.value);this.waitingLoginMsgMap.delete(e.value);null===t||void 0===t||t.send();}}static getWaitingResponseMessage(t){return c.waitingResponseMsgMap.get(t)}static removeWaitingResponseMessage(t){let e=c.waitingResponseMsgMap.get(t);if(e)c.waitingResponseMsgMap.delete(t);return e}}c.ServerAction=(n=class{},n.PUSH_MESSAGE="pushmessage",n.REDIRECT_SERVER="redirect_server",n.ADD_PHONE_INFO_RESULT="addphoneinfo",n.SET_MODE_RESULT="set_mode_result",n.SET_TAG_RESULT="settag_result",n.BIND_ALIAS_RESULT="response_bind",n.UNBIND_ALIAS_RESULT="response_unbind",n.FEED_BACK_RESULT="pushmessage_feedback",n.RECEIVED="received",n);c.ClientAction=(s=class{},s.ADD_PHONE_INFO="addphoneinfo",s.SET_MODE="set_mode",s.FEED_BACK="pushmessage_feedback",s.SET_TAGS="set_tag",s.BIND_ALIAS="bind_alias",s.UNBIND_ALIAS="unbind_alias",s.RECEIVED="received",s);c.waitingLoginMsgMap=new Map;c.waitingResponseMsgMap=new Map;class l{constructor(){this.appId="";this.cid="";this.msgId="";this.msgAction="";this.msgData="";this.msgExtraData="";}static create(){let t=new l;t.appId=u.default.appid;t.cid=u.default.cid;t.msgId=(2147483647&(new Date).getTime()).toString();return t}static parse(t){let e=new l;let r=JSON.parse(t);e.appId=r.appId;e.cid=r.cid;e.msgId=r.msgId;e.msgAction=r.msgAction;e.msgData=r.msgData;e.msgExtraData=r.msgExtraData;return e}}e["default"]=c;},4516:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(4685));const s=i(r(8506));const a=i(r(6893));const o=r(4198);const u=i(r(9586));const c=i(r(6379));class l extends u.default{constructor(){super(...arguments);this.addPhoneInfoData=new f;}static create(){let t=new l;super.initActionMsg(t);t.callback=e=>{if(e.resultCode!=o.ErrorCode.SUCCESS&&e.resultCode!=o.ErrorCode.REPEAT_MESSAGE)setTimeout((function(){t.send();}),30*1e3);else s.default.set({key:s.default.KEY_ADD_PHONE_INFO_TIME,data:(new Date).getTime()});};t.actionMsgData.msgAction=u.default.ClientAction.ADD_PHONE_INFO;t.addPhoneInfoData=f.create();t.actionMsgData.msgData=JSON.stringify(t.addPhoneInfoData);return t}send(){let t=(new Date).getTime();let e=s.default.getSync(s.default.KEY_ADD_PHONE_INFO_TIME,0);if(t-e<24*60*60*1e3)return;super.send();}}class f{constructor(){this.model="";this.brand="";this.system_version="";this.version="";this.deviceid="";this.type="";}static create(){let t=new f;t.model=n.default.model();t.brand=n.default.brand();t.system_version=n.default.osVersion();t.version=a.default.SDK_VERSION;t.device_token="";t.imei="";t.oaid="";t.mac="";t.idfa="";t.type="MINIPROGRAM";t.deviceid=`${t.type}-${c.default.deviceId}`;t.extra={os:n.default.os(),platform:n.default.platform(),platformVersion:n.default.platformVersion(),platformId:n.default.platformId(),language:n.default.language(),userAgent:n.default.userAgent()};return t}}e["default"]=l;},8723:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};var n,s;Object.defineProperty(e,"__esModule",{value:true});const a=i(r(6379));const o=r(4198);const u=i(r(9586));class c extends u.default{constructor(){super(...arguments);this.feedbackData=new l;}static create(t,e){let r=new c;super.initActionMsg(r);r.callback=t=>{if(t.resultCode!=o.ErrorCode.SUCCESS&&t.resultCode!=o.ErrorCode.REPEAT_MESSAGE)setTimeout((function(){r.send();}),30*1e3);};r.feedbackData=l.create(t,e);r.actionMsgData.msgAction=u.default.ClientAction.FEED_BACK;r.actionMsgData.msgData=JSON.stringify(r.feedbackData);return r}send(){super.send();}}c.ActionId=(n=class{},n.RECEIVE="0",n.MP_RECEIVE="210000",n.WEB_RECEIVE="220000",n.BEGIN="1",n);c.RESULT=(s=class{},s.OK="ok",s);class l{constructor(){this.messageid="";this.appkey="";this.appid="";this.taskid="";this.actionid="";this.result="";this.timestamp="";}static create(t,e){let r=new l;r.messageid=t.pushMessageData.messageid;r.appkey=t.pushMessageData.appKey;r.appid=a.default.appid;r.taskid=t.pushMessageData.taskId;r.actionid=e;r.result=c.RESULT.OK;r.timestamp=(new Date).getTime().toString();return r}}e["default"]=c;},6362:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(661));class s extends n.default{static create(){let t=new s;super.initMsg(t);t.command=n.default.Command.HEART_BEAT;return t}}e["default"]=s;},1386:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(6667));const s=i(r(6379));const a=i(r(661));class o extends a.default{constructor(){super(...arguments);this.keyNegotiateData=new u;}static create(){let t=new o;super.initMsg(t);t.command=a.default.Command.KEY_NEGOTIATE;n.default.resetKey();t.data=t.keyNegotiateData=u.create();return t}send(){super.send();}}class u{constructor(){this.appId="";this.rsaPublicKeyId="";this.algorithm="";this.secretKey="";this.iv="";}static create(){let t=new u;t.appId=s.default.appid;t.rsaPublicKeyId=s.default.publicKeyId;t.algorithm="AES";t.secretKey=n.default.getEncryptedSecretKey();t.iv=n.default.getEncryptedIV();return t}}e["default"]=o;},1280:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(661));const s=i(r(6667));const a=i(r(8858));const o=i(r(529));const u=i(r(6379));class c extends n.default{constructor(){super(...arguments);this.keyNegotiateResultData=new l;}static parse(t){let e=new c;super.parseMsg(e,t);e.keyNegotiateResultData=l.parse(e.data);return e}receive(){var t,e;if(0!=this.keyNegotiateResultData.errorCode){o.default.error(`key negotiate fail: ${this.data}`);null===(t=u.default.onError)||void 0===t||t.call(u.default.onError,{error:`key negotiate fail: ${this.data}`});return}let r=this.keyNegotiateResultData.encryptType.split("/");if(!s.default.algorithmMap.has(r[0].trim().toLowerCase())||!s.default.modeMap.has(r[1].trim().toLowerCase())||!s.default.paddingMap.has(r[2].trim().toLowerCase())){o.default.error(`key negotiate fail: ${this.data}`);null===(e=u.default.onError)||void 0===e||e.call(u.default.onError,{error:`key negotiate fail: ${this.data}`});return}s.default.setEncryptParams(r[0].trim().toLowerCase(),r[1].trim().toLowerCase(),r[2].trim().toLowerCase());a.default.create().send();}}class l{constructor(){this.errorCode=-1;this.errorMsg="";this.encryptType="";}static parse(t){let e=new l;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;e.encryptType=r.encryptType;return e}}e["default"]=c;},8858:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(6379));const s=i(r(6667));const a=i(r(661));const o=i(r(4534));class u extends a.default{constructor(){super(...arguments);this.loginData=new c;}static create(){let t=new u;super.initMsg(t);t.command=a.default.Command.LOGIN;t.data=t.loginData=c.create();return t}send(){if(!this.loginData.session||n.default.cid!=s.default.md5Hex(this.loginData.session)){o.default.create().send();return}super.send();}}class c{constructor(){this.appId="";this.session="";}static create(){let t=new c;t.appId=n.default.appid;t.session=n.default.session;return t}}e["default"]=u;},1606:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(8506));const s=i(r(661));const a=i(r(6379));const o=i(r(9586));const u=i(r(4516));const c=i(r(8858));class l extends s.default{constructor(){super(...arguments);this.loginResultData=new f;}static parse(t){let e=new l;super.parseMsg(e,t);e.loginResultData=f.parse(e.data);return e}receive(){var t;if(0!=this.loginResultData.errorCode){this.data;a.default.session=a.default.cid="";n.default.setSync(n.default.KEY_CID,"");n.default.setSync(n.default.KEY_SESSION,"");c.default.create().send();return}if(!a.default.online){a.default.online=true;null===(t=a.default.onlineState)||void 0===t||t.call(a.default.onlineState,{online:a.default.online});}o.default.sendWaitingMessages();u.default.create().send();}}class f{constructor(){this.errorCode=-1;this.errorMsg="";this.session="";}static parse(t){let e=new f;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;e.session=r.session;return e}}e["default"]=l;},661:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};var n;Object.defineProperty(e,"__esModule",{value:true});const s=i(r(9593));const a=i(r(7002));const o=i(r(6893));const u=i(r(6379));class c{constructor(){this.version="";this.command=0;this.packetId=0;this.timeStamp=0;this.data="";this.signature="";}static initMsg(t,...e){t.version=o.default.SOCKET_PROTOCOL_VERSION;t.command=0;t.timeStamp=(new Date).getTime();return t}static parseMsg(t,e){let r=JSON.parse(e);t.version=r.version;t.command=r.command;t.packetId=r.packetId;t.timeStamp=r.timeStamp;t.data=r.data;t.signature=r.signature;return t}stringify(){return JSON.stringify(this,["version","command","packetId","timeStamp","data","signature"])}send(){if(!a.default.isAvailable())return;this.packetId=u.default.packetId++;if(this.temp)this.data=this.temp;else this.temp=this.data;this.data=JSON.stringify(this.data);this.stringify();if(this.command!=c.Command.HEART_BEAT){s.default.sign(this);if(this.data&&this.command!=c.Command.KEY_NEGOTIATE)s.default.encrypt(this);}a.default.send(this.stringify());}}c.Command=(n=class{},n.HEART_BEAT=0,n.KEY_NEGOTIATE=1,n.KEY_NEGOTIATE_RESULT=16,n.REGISTER=2,n.REGISTER_RESULT=32,n.LOGIN=3,n.LOGIN_RESULT=48,n.LOGOUT=4,n.LOGOUT_RESULT=64,n.CLIENT_MSG=5,n.SERVER_MSG=80,n.SERVER_CLOSE=96,n.REDIRECT_SERVER=112,n);e["default"]=c;},9593:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(6667));var s;(function(t){function e(t){t.data=n.default.encrypt(t.data);}t.encrypt=e;function r(t){t.data=n.default.decrypt(t.data);}t.decrypt=r;function i(t){t.signature=n.default.sha256(`${t.timeStamp}${t.packetId}${t.command}${t.data}`);}t.sign=i;function s(t){let e=n.default.sha256(`${t.timeStamp}${t.packetId}${t.command}${t.data}`);if(t.signature!=e)throw new Error(`msg signature vierfy failed`)}t.verify=s;})(s||(s={}));e["default"]=s;},4054:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(1280));const s=i(r(1606));const a=i(r(661));const o=i(r(1277));const u=i(r(910));const c=i(r(9538));const l=i(r(9479));const f=i(r(6755));const h=i(r(2918));const d=i(r(9586));const v=i(r(9510));const p=i(r(4626));const g=i(r(7562));const y=i(r(9593));const m=i(r(9586));const w=i(r(9519));const S=i(r(8947));class _{static receiveMessage(t){let e=a.default.parseMsg(new a.default,t);if(e.command==a.default.Command.HEART_BEAT)return;if(e.command!=a.default.Command.KEY_NEGOTIATE_RESULT&&e.command!=a.default.Command.SERVER_CLOSE&&e.command!=a.default.Command.REDIRECT_SERVER)y.default.decrypt(e);if(e.command!=a.default.Command.SERVER_CLOSE&&e.command!=a.default.Command.REDIRECT_SERVER)y.default.verify(e);switch(e.command){case a.default.Command.KEY_NEGOTIATE_RESULT:n.default.parse(e.stringify()).receive();break;case a.default.Command.REGISTER_RESULT:o.default.parse(e.stringify()).receive();break;case a.default.Command.LOGIN_RESULT:s.default.parse(e.stringify()).receive();break;case a.default.Command.SERVER_MSG:this.receiveActionMsg(e.stringify());break;case a.default.Command.SERVER_CLOSE:S.default.parse(e.stringify()).receive();break;case a.default.Command.REDIRECT_SERVER:h.default.parse(e.stringify()).receive();break;}}static receiveActionMsg(t){let e=m.default.parseActionMsg(new m.default,t);if(e.actionMsgData.msgAction!=d.default.ServerAction.RECEIVED&&e.actionMsgData.msgAction!=d.default.ServerAction.REDIRECT_SERVER){let t=JSON.parse(e.actionMsgData.msgData);w.default.create(t.id).send();}switch(e.actionMsgData.msgAction){case d.default.ServerAction.PUSH_MESSAGE:f.default.parse(t).receive();break;case d.default.ServerAction.ADD_PHONE_INFO_RESULT:u.default.parse(t).receive();break;case d.default.ServerAction.SET_MODE_RESULT:v.default.parse(t).receive();break;case d.default.ServerAction.SET_TAG_RESULT:p.default.parse(t).receive();break;case d.default.ServerAction.BIND_ALIAS_RESULT:c.default.parse(t).receive();break;case d.default.ServerAction.UNBIND_ALIAS_RESULT:g.default.parse(t).receive();break;case d.default.ServerAction.FEED_BACK_RESULT:l.default.parse(t).receive();break;case d.default.ServerAction.RECEIVED:w.default.parse(t).receive();break}}}e["default"]=_;},9519:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=r(4198);const s=i(r(6379));const a=i(r(9586));class o extends a.default{constructor(){super(...arguments);this.receivedData=new u;}static create(t){let e=new o;super.initActionMsg(e);e.callback=t=>{if(t.resultCode!=n.ErrorCode.SUCCESS&&t.resultCode!=n.ErrorCode.REPEAT_MESSAGE)setTimeout((function(){e.send();}),3*1e3);};e.actionMsgData.msgAction=a.default.ClientAction.RECEIVED;e.receivedData=u.create(t);e.actionMsgData.msgData=JSON.stringify(e.receivedData);return e}static parse(t){let e=new o;super.parseActionMsg(e,t);e.receivedData=u.parse(e.data);return e}receive(){var t;let e=a.default.getWaitingResponseMessage(this.actionMsgData.msgId);if(e&&e.actionMsgData.msgAction==a.default.ClientAction.ADD_PHONE_INFO||e&&e.actionMsgData.msgAction==a.default.ClientAction.FEED_BACK){a.default.removeWaitingResponseMessage(e.actionMsgData.msgId);null===(t=e.callback)||void 0===t||t.call(e.callback,{resultCode:n.ErrorCode.SUCCESS,message:"received"});}}send(){super.send();}}class u{constructor(){this.msgId="";this.cid="";}static create(t){let e=new u;e.cid=s.default.cid;e.msgId=t;return e}static parse(t){let e=new u;let r=JSON.parse(t);e.cid=r.cid;e.msgId=r.msgId;return e}}e["default"]=o;},2918:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});e.RedirectServerData=void 0;const n=i(r(7002));const s=i(r(8506));const a=i(r(661));class o extends a.default{constructor(){super(...arguments);this.redirectServerData=new u;}static parse(t){let e=new o;super.parseMsg(e,t);e.redirectServerData=u.parse(e.data);return e}receive(){this.redirectServerData;s.default.setSync(s.default.KEY_REDIRECT_SERVER,JSON.stringify(this.redirectServerData));n.default.close("redirect server");n.default.reconnect(this.redirectServerData.delay);}}class u{constructor(){this.addressList=[];this.delay=0;this.loc="";this.conf="";this.time=0;}static parse(t){let e=new u;let r=JSON.parse(t);e.addressList=r.addressList;e.delay=r.delay;e.loc=r.loc;e.conf=r.conf;e.time=r.time?r.time:(new Date).getTime();return e}}e.RedirectServerData=u;e["default"]=o;},4534:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(6379));const s=i(r(661));class a extends s.default{constructor(){super(...arguments);this.registerData=new o;}static create(){let t=new a;super.initMsg(t);t.command=s.default.Command.REGISTER;t.data=t.registerData=o.create();return t}send(){super.send();}}class o{constructor(){this.appId="";this.regId="";}static create(){let t=new o;t.appId=n.default.appid;t.regId=n.default.regId;return t}}e["default"]=a;},1277:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(661));const s=i(r(8506));const a=i(r(6379));const o=i(r(8858));const u=i(r(529));class c extends n.default{constructor(){super(...arguments);this.registerResultData=new l;}static parse(t){let e=new c;super.parseMsg(e,t);e.registerResultData=l.parse(e.data);return e}receive(){var t,e;if(0!=this.registerResultData.errorCode||!this.registerResultData.cid||!this.registerResultData.session){u.default.error(`register fail: ${this.data}`);null===(t=a.default.onError)||void 0===t||t.call(a.default.onError,{error:`register fail: ${this.data}`});return}if(a.default.cid!=this.registerResultData.cid)s.default.setSync(s.default.KEY_ADD_PHONE_INFO_TIME,0);a.default.cid=this.registerResultData.cid;null===(e=a.default.onClientId)||void 0===e||e.call(a.default.onClientId,{cid:a.default.cid});s.default.set({key:s.default.KEY_CID,data:a.default.cid});a.default.session=this.registerResultData.session;s.default.set({key:s.default.KEY_SESSION,data:a.default.session});a.default.deviceId=this.registerResultData.deviceId;s.default.set({key:s.default.KEY_DEVICE_ID,data:a.default.deviceId});o.default.create().send();}}class l{constructor(){this.errorCode=-1;this.errorMsg="";this.cid="";this.session="";this.deviceId="";this.regId="";}static parse(t){let e=new l;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;e.cid=r.cid;e.session=r.session;e.deviceId=r.deviceId;e.regId=r.regId;return e}}e["default"]=c;},8947:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(7002));const s=i(r(529));const a=i(r(661));class o extends a.default{constructor(){super(...arguments);this.serverCloseData=new u;}static parse(t){let e=new o;super.parseMsg(e,t);e.serverCloseData=u.parse(e.data);return e}receive(){JSON.stringify(this.serverCloseData);let t=`server close ${this.serverCloseData.code}`;if(20==this.serverCloseData.code||23==this.serverCloseData.code||24==this.serverCloseData.code){n.default.allowReconnect=false;n.default.close(t);}else if(21==this.serverCloseData.code)this.safeClose21(t);else {n.default.allowReconnect=true;n.default.close(t);n.default.reconnect(10);}}safeClose21(t){try{if("undefined"!=typeof document)if(document.hasFocus()&&"visible"==document.visibilityState){n.default.allowReconnect=true;n.default.close(t);n.default.reconnect(10);return}n.default.allowReconnect=false;n.default.close(t);}catch(e){s.default.error(`ServerClose t1`,e);n.default.allowReconnect=false;n.default.close(`${t} error`);}}}class u{constructor(){this.code=-1;this.msg="";}static parse(t){let e=new u;let r=JSON.parse(t);e.code=r.code;e.msg=r.msg;return e}}e["default"]=o;},910:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(8506));const s=i(r(9586));class a extends s.default{constructor(){super(...arguments);this.addPhoneInfoResultData=new o;}static parse(t){let e=new a;super.parseActionMsg(e,t);e.addPhoneInfoResultData=o.parse(e.actionMsgData.msgData);return e}receive(){var t;this.addPhoneInfoResultData;let e=s.default.removeWaitingResponseMessage(this.actionMsgData.msgId);if(e)null===(t=e.callback)||void 0===t||t.call(e.callback,{resultCode:this.addPhoneInfoResultData.errorCode,message:this.addPhoneInfoResultData.errorMsg});n.default.set({key:n.default.KEY_ADD_PHONE_INFO_TIME,data:(new Date).getTime()});}}class o{constructor(){this.errorCode=-1;this.errorMsg="";}static parse(t){let e=new o;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;return e}}e["default"]=a;},9538:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(8506));const s=i(r(529));const a=i(r(9586));class o extends a.default{constructor(){super(...arguments);this.bindAliasResultData=new u;}static parse(t){let e=new o;super.parseActionMsg(e,t);e.bindAliasResultData=u.parse(e.actionMsgData.msgData);return e}receive(){var t;s.default.info(`bind alias result`,this.bindAliasResultData);let e=a.default.removeWaitingResponseMessage(this.actionMsgData.msgId);if(e)null===(t=e.callback)||void 0===t||t.call(e.callback,{resultCode:this.bindAliasResultData.errorCode,message:this.bindAliasResultData.errorMsg});n.default.set({key:n.default.KEY_BIND_ALIAS_TIME,data:(new Date).getTime()});}}class u{constructor(){this.errorCode=-1;this.errorMsg="";}static parse(t){let e=new u;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;return e}}e["default"]=o;},9479:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=r(4198);const s=i(r(9586));class a extends s.default{constructor(){super(...arguments);this.feedbackResultData=new o;}static parse(t){let e=new a;super.parseActionMsg(e,t);e.feedbackResultData=o.parse(e.actionMsgData.msgData);return e}receive(){var t;this.feedbackResultData;let e=s.default.removeWaitingResponseMessage(this.actionMsgData.msgId);if(e)null===(t=e.callback)||void 0===t||t.call(e.callback,{resultCode:n.ErrorCode.SUCCESS,message:"received"});}}class o{constructor(){this.actionId="";this.taskId="";this.result="";}static parse(t){let e=new o;let r=JSON.parse(t);e.actionId=r.actionId;e.taskId=r.taskId;e.result=r.result;return e}}e["default"]=a;},6755:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};var n;Object.defineProperty(e,"__esModule",{value:true});const s=i(r(6379));const a=i(r(9586));const o=i(r(8723));class u extends a.default{constructor(){super(...arguments);this.pushMessageData=new c;}static parse(t){let e=new u;super.parseActionMsg(e,t);e.pushMessageData=c.parse(e.actionMsgData.msgData);return e}receive(){var t;this.pushMessageData;if(this.pushMessageData.appId!=s.default.appid||!this.pushMessageData.messageid||!this.pushMessageData.taskId)this.stringify();o.default.create(this,o.default.ActionId.RECEIVE).send();o.default.create(this,o.default.ActionId.MP_RECEIVE).send();if(this.actionMsgData.msgExtraData&&s.default.onPushMsg)null===(t=s.default.onPushMsg)||void 0===t||t.call(s.default.onPushMsg,{message:this.actionMsgData.msgExtraData});}}class c{constructor(){this.id="";this.appKey="";this.appId="";this.messageid="";this.taskId="";this.actionChain=[];this.cdnType="";}static parse(t){let e=new c;let r=JSON.parse(t);e.id=r.id;e.appKey=r.appKey;e.appId=r.appId;e.messageid=r.messageid;e.taskId=r.taskId;e.actionChain=r.actionChain;e.cdnType=r.cdnType;return e}}(n=class{},n.GO_TO="goto",n.TRANSMIT="transmit",n);e["default"]=u;},9510:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(9586));class s extends n.default{constructor(){super(...arguments);this.setModeResultData=new a;}static parse(t){let e=new s;super.parseActionMsg(e,t);e.setModeResultData=a.parse(e.actionMsgData.msgData);return e}receive(){var t;this.setModeResultData;let e=n.default.removeWaitingResponseMessage(this.actionMsgData.msgId);if(e)null===(t=e.callback)||void 0===t||t.call(e.callback,{resultCode:this.setModeResultData.errorCode,message:this.setModeResultData.errorMsg});}}class a{constructor(){this.errorCode=-1;this.errorMsg="";}static parse(t){let e=new a;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;return e}}e["default"]=s;},4626:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(8506));const s=i(r(529));const a=i(r(9586));class o extends a.default{constructor(){super(...arguments);this.setTagResultData=new u;}static parse(t){let e=new o;super.parseActionMsg(e,t);e.setTagResultData=u.parse(e.actionMsgData.msgData);return e}receive(){var t;s.default.info(`set tag result`,this.setTagResultData);let e=a.default.removeWaitingResponseMessage(this.actionMsgData.msgId);if(e)null===(t=e.callback)||void 0===t||t.call(e.callback,{resultCode:this.setTagResultData.errorCode,message:this.setTagResultData.errorMsg});n.default.set({key:n.default.KEY_SET_TAG_TIME,data:(new Date).getTime()});}}class u{constructor(){this.errorCode=0;this.errorMsg="";}static parse(t){let e=new u;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;return e}}e["default"]=o;},7562:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(8506));const s=i(r(529));const a=i(r(9586));class o extends a.default{constructor(){super(...arguments);this.unbindAliasResultData=new u;}static parse(t){let e=new o;super.parseActionMsg(e,t);e.unbindAliasResultData=u.parse(e.actionMsgData.msgData);return e}receive(){var t;s.default.info(`unbind alias result`,this.unbindAliasResultData);let e=a.default.removeWaitingResponseMessage(this.actionMsgData.msgId);if(e)null===(t=e.callback)||void 0===t||t.call(e.callback,{resultCode:this.unbindAliasResultData.errorCode,message:this.unbindAliasResultData.errorMsg});n.default.set({key:n.default.KEY_BIND_ALIAS_TIME,data:(new Date).getTime()});}}class u{constructor(){this.errorCode=-1;this.errorMsg="";}static parse(t){let e=new u;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;return e}}e["default"]=o;},8227:(t,e)=>{Object.defineProperty(e,"__esModule",{value:true});class r{constructor(t){this.delay=10;this.delay=t;}start(){this.cancel();let t=this;this.timer=setInterval((function(){t.run();}),this.delay);}cancel(){if(this.timer)clearInterval(this.timer);}}e["default"]=r;},7167:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};var n;Object.defineProperty(e,"__esModule",{value:true});const s=i(r(6362));const a=i(r(8227));class o extends a.default{static getInstance(){return o.InstanceHolder.instance}run(){s.default.create().send();}refresh(){this.delay=60*1e3;this.start();}}o.INTERVAL=60*1e3;o.InstanceHolder=(n=class{},n.instance=new o(o.INTERVAL),n);e["default"]=o;},2323:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(4736));const s=i(r(6667));var a;(function(t){let e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";let r=(0, n.default)("9223372036854775808");function i(t){let e=a(t);let r=o(e);let i=r[1];let n=r[0];return u(i)+u(n)}t.to_getui=i;function a(t){let e=s.default.md5Hex(t);let r=c(e);r[6]&=15;r[6]|=48;r[8]&=63;r[8]|=128;return r}function o(t){let e=(0, n.default)(0);let r=(0, n.default)(0);for(let r=0;r<8;r++)e=e.multiply(256).plus((0, n.default)(255&t[r]));for(let e=8;e<16;e++)r=r.multiply(256).plus((0, n.default)(255&t[e]));return [e,r]}function u(t){if(t>=r)t=r.multiply(2).minus(t);let i="";for(;t>(0, n.default)(0);t=t.divide(62))i+=e.charAt(Number(t.divmod(62).remainder));return i}function c(t){let e=t.length;if(e%2!=0)return [];let r=new Array;for(let i=0;i{Object.defineProperty(e,"__esModule",{value:true});class r{static info(...t){if(this.debugMode)console.info(`[GtPush]`,t);}static warn(...t){console.warn(`[GtPush]`,t);}static error(...t){console.error(`[GtPush]`,t);}}r.debugMode=false;e["default"]=r;},3854:(t,e)=>{Object.defineProperty(e,"__esModule",{value:true});class r{static getStr(t,e){try{if(!t||void 0===t[e])return "";return t[e]}catch(t){}return ""}}e["default"]=r;},2620:(t,e,r)=>{r.r(e);r.d(e,{JSEncrypt:()=>wt,default:()=>St});var i="0123456789abcdefghijklmnopqrstuvwxyz";function n(t){return i.charAt(t)}function s(t,e){return t&e}function a(t,e){return t|e}function o(t,e){return t^e}function u(t,e){return t&~e}function c(t){if(0==t)return -1;var e=0;if(0==(65535&t)){t>>=16;e+=16;}if(0==(255&t)){t>>=8;e+=8;}if(0==(15&t)){t>>=4;e+=4;}if(0==(3&t)){t>>=2;e+=2;}if(0==(1&t))++e;return e}function l(t){var e=0;while(0!=t){t&=t-1;++e;}return e}var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var h="=";function d(t){var e;var r;var i="";for(e=0;e+3<=t.length;e+=3){r=parseInt(t.substring(e,e+3),16);i+=f.charAt(r>>6)+f.charAt(63&r);}if(e+1==t.length){r=parseInt(t.substring(e,e+1),16);i+=f.charAt(r<<2);}else if(e+2==t.length){r=parseInt(t.substring(e,e+2),16);i+=f.charAt(r>>2)+f.charAt((3&r)<<4);}while((3&i.length)>0)i+=h;return i}function v(t){var e="";var r;var i=0;var s=0;for(r=0;r>2);s=3&a;i=1;}else if(1==i){e+=n(s<<2|a>>4);s=15&a;i=2;}else if(2==i){e+=n(s);e+=n(a>>2);s=3&a;i=3;}else {e+=n(s<<2|a>>4);e+=n(15&a);i=0;}}if(1==i)e+=n(s<<2);return e}var g;var y={decode:function(t){var e;if(void 0===g){var r="0123456789ABCDEF";var i=" \f\n\r\t \u2028\u2029";g={};for(e=0;e<16;++e)g[r.charAt(e)]=e;r=r.toLowerCase();for(e=10;e<16;++e)g[r.charAt(e)]=e;for(e=0;e=2){n[n.length]=s;s=0;a=0;}else s<<=4;}if(a)throw new Error("Hex encoding incomplete: 4 bits missing");return n}};var m;var w={decode:function(t){var e;if(void 0===m){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var i="= \f\n\r\t \u2028\u2029";m=Object.create(null);for(e=0;e<64;++e)m[r.charAt(e)]=e;m["-"]=62;m["_"]=63;for(e=0;e=4){n[n.length]=s>>16;n[n.length]=s>>8&255;n[n.length]=255&s;s=0;a=0;}else s<<=6;}switch(a){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:n[n.length]=s>>10;break;case 3:n[n.length]=s>>16;n[n.length]=s>>8&255;break}return n},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=w.re.exec(t);if(e)if(e[1])t=e[1];else if(e[2])t=e[2];else throw new Error("RegExp out of sync");return w.decode(t)}};var S=1e13;var _=function(){function t(t){this.buf=[+t||0];}t.prototype.mulAdd=function(t,e){var r=this.buf;var i=r.length;var n;var s;for(n=0;n0)r[n]=e;};t.prototype.sub=function(t){var e=this.buf;var r=e.length;var i;var n;for(i=0;i=0;--i)r+=(S+e[i]).toString().substring(1);return r};t.prototype.valueOf=function(){var t=this.buf;var e=0;for(var r=t.length-1;r>=0;--r)e=e*S+t[r];return e};t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this};return t}();var b="…";var E=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;var D=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function M(t,e){if(t.length>e)t=t.substring(0,e)+b;return t}var T=function(){function t(e,r){this.hexDigits="0123456789ABCDEF";if(e instanceof t){this.enc=e.enc;this.pos=e.pos;}else {this.enc=e;this.pos=r;}}t.prototype.get=function(t){if(void 0===t)t=this.pos++;if(t>=this.enc.length)throw new Error("Requesting byte offset "+t+" on a stream of length "+this.enc.length);return "string"===typeof this.enc?this.enc.charCodeAt(t):this.enc[t]};t.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)};t.prototype.hexDump=function(t,e,r){var i="";for(var n=t;n176)return false}return true};t.prototype.parseStringISO=function(t,e){var r="";for(var i=t;i191&&n<224)r+=String.fromCharCode((31&n)<<6|63&this.get(i++));else r+=String.fromCharCode((15&n)<<12|(63&this.get(i++))<<6|63&this.get(i++));}return r};t.prototype.parseStringBMP=function(t,e){var r="";var i;var n;for(var s=t;s127;var n=i?255:0;var s;var a="";while(r==n&&++t4){a=r;s<<=3;while(0==(128&(+a^n))){a=+a<<1;--s;}a="("+s+" bit)\n";}if(i)r-=256;var o=new _(r);for(var u=t+1;u=c;--l)a+=u>>l&1?"1":"0";if(a.length>r)return s+M(a,r)}return s+a};t.prototype.parseOctetString=function(t,e,r){if(this.isASCII(t,e))return M(this.parseStringISO(t,e),r);var i=e-t;var n="("+i+" byte)\n";r/=2;if(i>r)e=t+r;for(var s=t;sr)n+=b;return n};t.prototype.parseOID=function(t,e,r){var i="";var n=new _;var s=0;for(var a=t;ar)return M(i,r);n=new _;s=0;}}if(s>0)i+=".incomplete";return i};return t}();var I=function(){function t(t,e,r,i,n){if(!(i instanceof A))throw new Error("Invalid tag value.");this.stream=t;this.header=e;this.length=r;this.tag=i;this.sub=n;}t.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return "EOC";case 1:return "BOOLEAN";case 2:return "INTEGER";case 3:return "BIT_STRING";case 4:return "OCTET_STRING";case 5:return "NULL";case 6:return "OBJECT_IDENTIFIER";case 7:return "ObjectDescriptor";case 8:return "EXTERNAL";case 9:return "REAL";case 10:return "ENUMERATED";case 11:return "EMBEDDED_PDV";case 12:return "UTF8String";case 16:return "SEQUENCE";case 17:return "SET";case 18:return "NumericString";case 19:return "PrintableString";case 20:return "TeletexString";case 21:return "VideotexString";case 22:return "IA5String";case 23:return "UTCTime";case 24:return "GeneralizedTime";case 25:return "GraphicString";case 26:return "VisibleString";case 27:return "GeneralString";case 28:return "UniversalString";case 30:return "BMPString"}return "Universal_"+this.tag.tagNumber.toString();case 1:return "Application_"+this.tag.tagNumber.toString();case 2:return "["+this.tag.tagNumber.toString()+"]";case 3:return "Private_"+this.tag.tagNumber.toString()}};t.prototype.content=function(t){if(void 0===this.tag)return null;if(void 0===t)t=1/0;var e=this.posContent();var r=Math.abs(this.length);if(!this.tag.isUniversal()){if(null!==this.sub)return "("+this.sub.length+" elem)";return this.stream.parseOctetString(e,e+r,t)}switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+r);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+r,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+r,t);case 6:return this.stream.parseOID(e,e+r,t);case 16:case 17:if(null!==this.sub)return "("+this.sub.length+" elem)";else return "(no elem)";case 12:return M(this.stream.parseStringUTF(e,e+r),t);case 18:case 19:case 20:case 21:case 22:case 26:return M(this.stream.parseStringISO(e,e+r),t);case 30:return M(this.stream.parseStringBMP(e,e+r),t);case 23:case 24:return this.stream.parseTime(e,e+r,23==this.tag.tagNumber)}return null};t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"};t.prototype.toPrettyString=function(t){if(void 0===t)t="";var e=t+this.typeName()+" @"+this.stream.pos;if(this.length>=0)e+="+";e+=this.length;if(this.tag.tagConstructed)e+=" (constructed)";else if(this.tag.isUniversal()&&(3==this.tag.tagNumber||4==this.tag.tagNumber)&&null!==this.sub)e+=" (encapsulates)";e+="\n";if(null!==this.sub){t+=" ";for(var r=0,i=this.sub.length;r6)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===r)return null;e=0;for(var i=0;i>6;this.tagConstructed=0!==(32&e);this.tagNumber=31&e;if(31==this.tagNumber){var r=new _;do{e=t.get();r.mulAdd(128,127&e);}while(128&e);this.tagNumber=r.simplify();}}t.prototype.isUniversal=function(){return 0===this.tagClass};t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber};return t}();var x;var R=0xdeadbeefcafe;var B=15715070==(16777215&R);var O=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997];var k=(1<<26)/O[O.length-1];var C=function(){function t(t,e,r){if(null!=t)if("number"==typeof t)this.fromNumber(t,e,r);else if(null==e&&"string"!=typeof t)this.fromString(t,256);else this.fromString(t,e);}t.prototype.toString=function(t){if(this.s<0)return "-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else if(4==t)e=2;else return this.toRadix(t);var r=(1<0){if(u>u)>0){s=true;a=n(i);}while(o>=0){if(u>(u+=this.DB-e);}else {i=this[o]>>(u-=e)&r;if(u<=0){u+=this.DB;--o;}}if(i>0)s=true;if(s)a+=n(i);}}return s?a:"0"};t.prototype.negate=function(){var e=H();t.ZERO.subTo(this,e);return e};t.prototype.abs=function(){return this.s<0?this.negate():this};t.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;e=r-t.t;if(0!=e)return this.s<0?-e:e;while(--r>=0)if(0!=(e=this[r]-t[r]))return e;return 0};t.prototype.bitLength=function(){if(this.t<=0)return 0;return this.DB*(this.t-1)+W(this[this.t-1]^this.s&this.DM)};t.prototype.mod=function(e){var r=H();this.abs().divRemTo(e,null,r);if(this.s<0&&r.compareTo(t.ZERO)>0)e.subTo(r,r);return r};t.prototype.modPowInt=function(t,e){var r;if(t<256||e.isEven())r=new P(e);else r=new V(e);return this.exp(t,r)};t.prototype.clone=function(){var t=H();this.copyTo(t);return t};t.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;else if(0==this.t)return -1}else if(1==this.t)return this[0];else if(0==this.t)return 0;return (this[1]&(1<<32-this.DB)-1)<>24};t.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16};t.prototype.signum=function(){if(this.s<0)return -1;else if(this.t<=0||1==this.t&&this[0]<=0)return 0;else return 1};t.prototype.toByteArray=function(){var t=this.t;var e=[];e[0]=this.s;var r=this.DB-t*this.DB%8;var i;var n=0;if(t-- >0){if(r>r)!=(this.s&this.DM)>>r)e[n++]=i|this.s<=0){if(r<8){i=(this[t]&(1<>(r+=this.DB-8);}else {i=this[t]>>(r-=8)&255;if(r<=0){r+=this.DB;--t;}}if(0!=(128&i))i|=-256;if(0==n&&(128&this.s)!=(128&i))++n;if(n>0||i!=this.s)e[n++]=i;}}return e};t.prototype.equals=function(t){return 0==this.compareTo(t)};t.prototype.min=function(t){return this.compareTo(t)<0?this:t};t.prototype.max=function(t){return this.compareTo(t)>0?this:t};t.prototype.and=function(t){var e=H();this.bitwiseTo(t,s,e);return e};t.prototype.or=function(t){var e=H();this.bitwiseTo(t,a,e);return e};t.prototype.xor=function(t){var e=H();this.bitwiseTo(t,o,e);return e};t.prototype.andNot=function(t){var e=H();this.bitwiseTo(t,u,e);return e};t.prototype.not=function(){var t=H();for(var e=0;e=this.t)return 0!=this.s;return 0!=(this[e]&1<1){var l=H();s.sqrTo(a[1],l);while(o<=c){a[o]=H();s.mulTo(l,a[o-2],a[o]);o+=2;}}var f=t.t-1;var h;var d=true;var v=H();var p;r=W(t[f])-1;while(f>=0){if(r>=u)h=t[f]>>r-u&c;else {h=(t[f]&(1<0)h|=t[f-1]>>this.DB+r-u;}o=i;while(0==(1&h)){h>>=1;--o;}if((r-=o)<0){r+=this.DB;--f;}if(d){a[h].copyTo(n);d=false;}else {while(o>1){s.sqrTo(n,v);s.sqrTo(v,n);o-=2;}if(o>0)s.sqrTo(n,v);else {p=n;n=v;v=p;}s.mulTo(v,a[h],n);}while(f>=0&&0==(t[f]&1<=0){i.subTo(n,i);if(r)s.subTo(o,s);a.subTo(u,a);}else {n.subTo(i,n);if(r)o.subTo(s,o);u.subTo(a,u);}}if(0!=n.compareTo(t.ONE))return t.ZERO;if(u.compareTo(e)>=0)return u.subtract(e);if(u.signum()<0)u.addTo(e,u);else return u;if(u.signum()<0)return u.add(e);else return u};t.prototype.pow=function(t){return this.exp(t,new N)};t.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone();var r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var i=e;e=r;r=i;}var n=e.getLowestSetBit();var s=r.getLowestSetBit();if(s<0)return e;if(n0){e.rShiftTo(s,e);r.rShiftTo(s,r);}while(e.signum()>0){if((n=e.getLowestSetBit())>0)e.rShiftTo(n,e);if((n=r.getLowestSetBit())>0)r.rShiftTo(n,r);if(e.compareTo(r)>=0){e.subTo(r,e);e.rShiftTo(1,e);}else {r.subTo(e,r);r.rShiftTo(1,r);}}if(s>0)r.lShiftTo(s,r);return r};t.prototype.isProbablePrime=function(t){var e;var r=this.abs();if(1==r.t&&r[0]<=O[O.length-1]){for(e=0;e=0;--e)t[e]=this[e];t.t=this.t;t.s=this.s;};t.prototype.fromInt=function(t){this.t=1;this.s=t<0?-1:0;if(t>0)this[0]=t;else if(t<-1)this[0]=t+this.DV;else this.t=0;};t.prototype.fromString=function(e,r){var i;if(16==r)i=4;else if(8==r)i=3;else if(256==r)i=8;else if(2==r)i=1;else if(32==r)i=5;else if(4==r)i=2;else {this.fromRadix(e,r);return}this.t=0;this.s=0;var n=e.length;var s=false;var a=0;while(--n>=0){var o=8==i?255&+e[n]:G(e,n);if(o<0){if("-"==e.charAt(n))s=true;continue}s=false;if(0==a)this[this.t++]=o;else if(a+i>this.DB){this[this.t-1]|=(o&(1<>this.DB-a;}else this[this.t-1]|=o<=this.DB)a-=this.DB;}if(8==i&&0!=(128&+e[0])){this.s=-1;if(a>0)this[this.t-1]|=(1<0&&this[this.t-1]==t)--this.t;};t.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t;e.s=this.s;};t.prototype.drShiftTo=function(t,e){for(var r=t;r=0;--o){e[o+s+1]=this[o]>>i|a;a=(this[o]&n)<=0;--o)e[o]=0;e[s]=a;e.t=this.t+s+1;e.s=this.s;e.clamp();};t.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t){e.t=0;return}var i=t%this.DB;var n=this.DB-i;var s=(1<>i;for(var a=r+1;a>i;}if(i>0)e[this.t-r-1]|=(this.s&s)<>=this.DB;}if(t.t>=this.DB;}i+=this.s;}else {i+=this.s;while(r>=this.DB;}i-=t.s;}e.s=i<0?-1:0;if(i<-1)e[r++]=this.DV+i;else if(i>0)e[r++]=i;e.t=r;e.clamp();};t.prototype.multiplyTo=function(e,r){var i=this.abs();var n=e.abs();var s=i.t;r.t=s+n.t;while(--s>=0)r[s]=0;for(s=0;s=0)t[r]=0;for(r=0;r=e.DV){t[r+e.t]-=e.DV;t[r+e.t+1]=1;}}if(t.t>0)t[t.t-1]+=e.am(r,e[r],t,2*r,0,1);t.s=0;t.clamp();};t.prototype.divRemTo=function(e,r,i){var n=e.abs();if(n.t<=0)return;var s=this.abs();if(s.t0){n.lShiftTo(c,a);s.lShiftTo(c,i);}else {n.copyTo(a);s.copyTo(i);}var l=a.t;var f=a[l-1];if(0==f)return;var h=f*(1<1?a[l-2]>>this.F2:0);var d=this.FV/h;var v=(1<=0){i[i.t++]=1;i.subTo(m,i);}t.ONE.dlShiftTo(l,m);m.subTo(a,a);while(a.t=0){var w=i[--g]==f?this.DM:Math.floor(i[g]*d+(i[g-1]+p)*v);if((i[g]+=a.am(0,w,i,y,0,l))0)i.rShiftTo(c,i);if(o<0)t.ZERO.subTo(i,i);};t.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;e=e*(2-(15&t)*e)&15;e=e*(2-(255&t)*e)&255;e=e*(2-((65535&t)*e&65535))&65535;e=e*(2-t*e%this.DV)%this.DV;return e>0?this.DV-e:-e};t.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)};t.prototype.exp=function(e,r){if(e>4294967295||e<1)return t.ONE;var i=H();var n=H();var s=r.convert(this);var a=W(e)-1;s.copyTo(i);while(--a>=0){r.sqrTo(i,n);if((e&1<0)r.mulTo(n,s,i);else {var o=i;i=n;n=o;}}return r.revert(i)};t.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))};t.prototype.toRadix=function(t){if(null==t)t=10;if(0==this.signum()||t<2||t>36)return "0";var e=this.chunkSize(t);var r=Math.pow(t,e);var i=Y(r);var n=H();var s=H();var a="";this.divRemTo(i,n,s);while(n.signum()>0){a=(r+s.intValue()).toString(t).substr(1)+a;n.divRemTo(i,n,s);}return s.intValue().toString(t)+a};t.prototype.fromRadix=function(e,r){this.fromInt(0);if(null==r)r=10;var i=this.chunkSize(r);var n=Math.pow(r,i);var s=false;var a=0;var o=0;for(var u=0;u=i){this.dMultiply(n);this.dAddOffset(o,0);a=0;o=0;}}if(a>0){this.dMultiply(Math.pow(r,a));this.dAddOffset(o,0);}if(s)t.ZERO.subTo(this,this);};t.prototype.fromNumber=function(e,r,i){if("number"==typeof r)if(e<2)this.fromInt(1);else {this.fromNumber(e,i);if(!this.testBit(e-1))this.bitwiseTo(t.ONE.shiftLeft(e-1),a,this);if(this.isEven())this.dAddOffset(1,0);while(!this.isProbablePrime(r)){this.dAddOffset(2,0);if(this.bitLength()>e)this.subTo(t.ONE.shiftLeft(e-1),this);}}else {var n=[];var s=7&e;n.length=(e>>3)+1;r.nextBytes(n);if(s>0)n[0]&=(1<>=this.DB;}if(t.t>=this.DB;}i+=this.s;}else {i+=this.s;while(r>=this.DB;}i+=t.s;}e.s=i<0?-1:0;if(i>0)e[r++]=i;else if(i<-1)e[r++]=this.DV+i;e.t=r;e.clamp();};t.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t);++this.t;this.clamp();};t.prototype.dAddOffset=function(t,e){if(0==t)return;while(this.t<=e)this[this.t++]=0;this[e]+=t;while(this[e]>=this.DV){this[e]-=this.DV;if(++e>=this.t)this[this.t++]=0;++this[e];}};t.prototype.multiplyLowerTo=function(t,e,r){var i=Math.min(this.t+t.t,e);r.s=0;r.t=i;while(i>0)r[--i]=0;for(var n=r.t-this.t;i=0)r[i]=0;for(i=Math.max(e-this.t,0);i0)if(0==e)r=this[0]%t;else for(var i=this.t-1;i>=0;--i)r=(e*r+this[i])%t;return r};t.prototype.millerRabin=function(e){var r=this.subtract(t.ONE);var i=r.getLowestSetBit();if(i<=0)return false;var n=r.shiftRight(i);e=e+1>>1;if(e>O.length)e=O.length;var s=H();for(var a=0;a0){r.rShiftTo(a,r);i.rShiftTo(a,i);}var o=function(){if((s=r.getLowestSetBit())>0)r.rShiftTo(s,r);if((s=i.getLowestSetBit())>0)i.rShiftTo(s,i);if(r.compareTo(i)>=0){r.subTo(i,r);r.rShiftTo(1,r);}else {i.subTo(r,i);i.rShiftTo(1,i);}if(!(r.signum()>0)){if(a>0)i.lShiftTo(a,i);setTimeout((function(){e(i);}),0);}else setTimeout(o,0);};setTimeout(o,10);};t.prototype.fromNumberAsync=function(e,r,i,n){if("number"==typeof r)if(e<2)this.fromInt(1);else {this.fromNumber(e,i);if(!this.testBit(e-1))this.bitwiseTo(t.ONE.shiftLeft(e-1),a,this);if(this.isEven())this.dAddOffset(1,0);var s=this;var o=function(){s.dAddOffset(2,0);if(s.bitLength()>e)s.subTo(t.ONE.shiftLeft(e-1),s);if(s.isProbablePrime(r))setTimeout((function(){n();}),0);else setTimeout(o,0);};setTimeout(o,0);}else {var u=[];var c=7&e;u.length=(e>>3)+1;r.nextBytes(u);if(c>0)u[0]&=(1<=0)return t.mod(this.m);else return t};t.prototype.revert=function(t){return t};t.prototype.reduce=function(t){t.divRemTo(this.m,null,t);};t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r);this.reduce(r);};t.prototype.sqrTo=function(t,e){t.squareTo(e);this.reduce(e);};return t}();var V=function(){function t(t){this.m=t;this.mp=t.invDigit();this.mpl=32767&this.mp;this.mph=this.mp>>15;this.um=(1<0)this.m.subTo(e,e);return e};t.prototype.revert=function(t){var e=H();t.copyTo(e);this.reduce(e);return e};t.prototype.reduce=function(t){while(t.t<=this.mt2)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;r=e+this.m.t;t[r]+=this.m.am(0,i,t,e,0,this.m.t);while(t[r]>=t.DV){t[r]-=t.DV;t[++r]++;}}t.clamp();t.drShiftTo(this.m.t,t);if(t.compareTo(this.m)>=0)t.subTo(this.m,t);};t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r);this.reduce(r);};t.prototype.sqrTo=function(t,e){t.squareTo(e);this.reduce(e);};return t}();var L=function(){function t(t){this.m=t;this.r2=H();this.q3=H();C.ONE.dlShiftTo(2*t.t,this.r2);this.mu=this.r2.divide(t);}t.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);else if(t.compareTo(this.m)<0)return t;else {var e=H();t.copyTo(e);this.reduce(e);return e}};t.prototype.revert=function(t){return t};t.prototype.reduce=function(t){t.drShiftTo(this.m.t-1,this.r2);if(t.t>this.m.t+1){t.t=this.m.t+1;t.clamp();}this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);while(t.compareTo(this.r2)<0)t.dAddOffset(1,this.m.t+1);t.subTo(this.r2,t);while(t.compareTo(this.m)>=0)t.subTo(this.m,t);};t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r);this.reduce(r);};t.prototype.sqrTo=function(t,e){t.squareTo(e);this.reduce(e);};return t}();function H(){return new C(null)}function U(t,e){return new C(t,e)}var K="undefined"!==typeof navigator;if(K&&B&&"Microsoft Internet Explorer"==navigator.appName){C.prototype.am=function t(e,r,i,n,s,a){var o=32767&r;var u=r>>15;while(--a>=0){var c=32767&this[e];var l=this[e++]>>15;var f=u*c+l*o;c=o*c+((32767&f)<<15)+i[n]+(1073741823&s);s=(c>>>30)+(f>>>15)+u*l+(s>>>30);i[n++]=1073741823&c;}return s};x=30;}else if(K&&B&&"Netscape"!=navigator.appName){C.prototype.am=function t(e,r,i,n,s,a){while(--a>=0){var o=r*this[e++]+i[n]+s;s=Math.floor(o/67108864);i[n++]=67108863&o;}return s};x=26;}else {C.prototype.am=function t(e,r,i,n,s,a){var o=16383&r;var u=r>>14;while(--a>=0){var c=16383&this[e];var l=this[e++]>>14;var f=u*c+l*o;c=o*c+((16383&f)<<14)+i[n]+s;s=(c>>28)+(f>>14)+u*l;i[n++]=268435455&c;}return s};x=28;}C.prototype.DB=x;C.prototype.DM=(1<>>16)){t=r;e+=16;}if(0!=(r=t>>8)){t=r;e+=8;}if(0!=(r=t>>4)){t=r;e+=4;}if(0!=(r=t>>2)){t=r;e+=2;}if(0!=(r=t>>1)){t=r;e+=1;}return e}C.ZERO=Y(0);C.ONE=Y(1);var J=function(){function t(){this.i=0;this.j=0;this.S=[];}t.prototype.init=function(t){var e;var r;var i;for(e=0;e<256;++e)this.S[e]=e;r=0;for(e=0;e<256;++e){r=r+this.S[e]+t[e%t.length]&255;i=this.S[e];this.S[e]=this.S[r];this.S[r]=i;}this.i=0;this.j=0;};t.prototype.next=function(){var t;this.i=this.i+1&255;this.j=this.j+this.S[this.i]&255;t=this.S[this.i];this.S[this.i]=this.S[this.j];this.S[this.j]=t;return this.S[t+this.S[this.i]&255]};return t}();function Z(){return new J}var $=256;var X;var Q=null;var tt;if(null==Q){Q=[];tt=0;}function nt(){if(null==X){X=Z();while(tt<$){var t=Math.floor(65536*Math.random());Q[tt++]=255&t;}X.init(Q);for(tt=0;tt=0&&e>0){var n=t.charCodeAt(i--);if(n<128)r[--e]=n;else if(n>127&&n<2048){r[--e]=63&n|128;r[--e]=n>>6|192;}else {r[--e]=63&n|128;r[--e]=n>>6&63|128;r[--e]=n>>12|224;}}r[--e]=0;var s=new st;var a=[];while(e>2){a[0]=0;while(0==a[0])s.nextBytes(a);r[--e]=a[0];}r[--e]=2;r[--e]=0;return new C(r)}var ut=function(){function t(){this.n=null;this.e=0;this.d=null;this.p=null;this.q=null;this.dmp1=null;this.dmq1=null;this.coeff=null;}t.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)};t.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);var e=t.mod(this.p).modPow(this.dmp1,this.p);var r=t.mod(this.q).modPow(this.dmq1,this.q);while(e.compareTo(r)<0)e=e.add(this.p);return e.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)};t.prototype.setPublic=function(t,e){if(null!=t&&null!=e&&t.length>0&&e.length>0){this.n=U(t,16);this.e=parseInt(e,16);}else console.error("Invalid RSA public key");};t.prototype.encrypt=function(t){var e=this.n.bitLength()+7>>3;var r=ot(t,e);if(null==r)return null;var i=this.doPublic(r);if(null==i)return null;var n=i.toString(16);var s=n.length;for(var a=0;a<2*e-s;a++)n="0"+n;return n};t.prototype.setPrivate=function(t,e,r){if(null!=t&&null!=e&&t.length>0&&e.length>0){this.n=U(t,16);this.e=parseInt(e,16);this.d=U(r,16);}else console.error("Invalid RSA private key");};t.prototype.setPrivateEx=function(t,e,r,i,n,s,a,o){if(null!=t&&null!=e&&t.length>0&&e.length>0){this.n=U(t,16);this.e=parseInt(e,16);this.d=U(r,16);this.p=U(i,16);this.q=U(n,16);this.dmp1=U(s,16);this.dmq1=U(a,16);this.coeff=U(o,16);}else console.error("Invalid RSA private key");};t.prototype.generate=function(t,e){var r=new st;var i=t>>1;this.e=parseInt(e,16);var n=new C(e,16);for(;;){for(;;){this.p=new C(t-i,1,r);if(0==this.p.subtract(C.ONE).gcd(n).compareTo(C.ONE)&&this.p.isProbablePrime(10))break}for(;;){this.q=new C(i,1,r);if(0==this.q.subtract(C.ONE).gcd(n).compareTo(C.ONE)&&this.q.isProbablePrime(10))break}if(this.p.compareTo(this.q)<=0){var s=this.p;this.p=this.q;this.q=s;}var a=this.p.subtract(C.ONE);var o=this.q.subtract(C.ONE);var u=a.multiply(o);if(0==u.gcd(n).compareTo(C.ONE)){this.n=this.p.multiply(this.q);this.d=n.modInverse(u);this.dmp1=this.d.mod(a);this.dmq1=this.d.mod(o);this.coeff=this.q.modInverse(this.p);break}}};t.prototype.decrypt=function(t){var e=U(t,16);var r=this.doPrivate(e);if(null==r)return null;return ct(r,this.n.bitLength()+7>>3)};t.prototype.generateAsync=function(t,e,r){var i=new st;var n=t>>1;this.e=parseInt(e,16);var s=new C(e,16);var a=this;var o=function(){var e=function(){if(a.p.compareTo(a.q)<=0){var t=a.p;a.p=a.q;a.q=t;}var e=a.p.subtract(C.ONE);var i=a.q.subtract(C.ONE);var n=e.multiply(i);if(0==n.gcd(s).compareTo(C.ONE)){a.n=a.p.multiply(a.q);a.d=s.modInverse(n);a.dmp1=a.d.mod(e);a.dmq1=a.d.mod(i);a.coeff=a.q.modInverse(a.p);setTimeout((function(){r();}),0);}else setTimeout(o,0);};var u=function(){a.q=H();a.q.fromNumberAsync(n,1,i,(function(){a.q.subtract(C.ONE).gcda(s,(function(t){if(0==t.compareTo(C.ONE)&&a.q.isProbablePrime(10))setTimeout(e,0);else setTimeout(u,0);}));}));};var c=function(){a.p=H();a.p.fromNumberAsync(t-n,1,i,(function(){a.p.subtract(C.ONE).gcda(s,(function(t){if(0==t.compareTo(C.ONE)&&a.p.isProbablePrime(10))setTimeout(u,0);else setTimeout(c,0);}));}));};setTimeout(c,0);};setTimeout(o,0);};t.prototype.sign=function(t,e,r){var i=ht(r);var n=i+e(t).toString();var s=at(n,this.n.bitLength()/4);if(null==s)return null;var a=this.doPrivate(s);if(null==a)return null;var o=a.toString(16);if(0==(1&o.length))return o;else return "0"+o};t.prototype.verify=function(t,e,r){var i=U(e,16);var n=this.doPublic(i);if(null==n)return null;var s=n.toString(16).replace(/^1f+00/,"");var a=dt(s);return a==r(t).toString()};t.prototype.encryptLong=function(t){var e=this;var r="";var i=(this.n.bitLength()+7>>3)-11;var n=this.setSplitChn(t,i);n.forEach((function(t){r+=e.encrypt(t);}));return r};t.prototype.decryptLong=function(t){var e="";var r=this.n.bitLength()+7>>3;var i=2*r;if(t.length>i){var n=t.match(new RegExp(".{1,"+i+"}","g"))||[];var s=[];for(var a=0;ae){var o=t.substring(0,s);r.push(o);return this.setSplitChn(t.substring(s),e,r)}}r.push(t);return r};return t}();function ct(t,e){var r=t.toByteArray();var i=0;while(i=r.length)return null;var n="";while(++i191&&s<224){n+=String.fromCharCode((31&s)<<6|63&r[i+1]);++i;}else {n+=String.fromCharCode((15&s)<<12|(63&r[i+1])<<6|63&r[i+2]);i+=2;}}return n}function lt(t,e){var r=[];for(var i=0;i=s.length)return null;r=r.concat(s.slice(a+1));}var o=r;var u=-1;var c="";while(++u191&&l<224){c+=String.fromCharCode((31&l)<<6|63&o[u+1]);++u;}else {c+=String.fromCharCode((15&l)<<12|(63&o[u+1])<<6|63&o[u+2]);u+=2;}}return c}var ft={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function ht(t){return ft[t]||""}function dt(t){for(var e in ft)if(ft.hasOwnProperty(e)){var r=ft[e];var i=r.length;if(t.substr(0,i)==r)return t.substr(i)}return t}var vt={};vt.lang={extend:function(t,e,r){if(!e||!t)throw new Error("YAHOO.lang.extend failed, please check that "+"all dependencies are included.");var i=function(){};i.prototype=e.prototype;t.prototype=new i;t.prototype.constructor=t;t.superclass=e.prototype;if(e.prototype.constructor==Object.prototype.constructor)e.prototype.constructor=e;if(r){var n;for(n in r)t.prototype[n]=r[n];var s=function(){},a=["toString","valueOf"];try{if(/MSIE/.test(navigator.userAgent))s=function(t,e){for(n=0;n15)throw "ASN.1 length too long to represent by 8x: n = "+t.toString(16);var i=128+r;return i.toString(16)+e}};this.getEncodedHex=function(){if(null==this.hTLV||this.isModified){this.hV=this.getFreshValueHex();this.hL=this.getLengthHexFromValue();this.hTLV=this.hT+this.hL+this.hV;this.isModified=false;}return this.hTLV};this.getValueHex=function(){this.getEncodedHex();return this.hV};this.getFreshValueHex=function(){return ""};};pt.asn1.DERAbstractString=function(t){pt.asn1.DERAbstractString.superclass.constructor.call(this);this.getString=function(){return this.s};this.setString=function(t){this.hTLV=null;this.isModified=true;this.s=t;this.hV=stohex(this.s);};this.setStringHex=function(t){this.hTLV=null;this.isModified=true;this.s=null;this.hV=t;};this.getFreshValueHex=function(){return this.hV};if("undefined"!=typeof t)if("string"==typeof t)this.setString(t);else if("undefined"!=typeof t["str"])this.setString(t["str"]);else if("undefined"!=typeof t["hex"])this.setStringHex(t["hex"]);};vt.lang.extend(pt.asn1.DERAbstractString,pt.asn1.ASN1Object);pt.asn1.DERAbstractTime=function(t){pt.asn1.DERAbstractTime.superclass.constructor.call(this);this.localDateToUTC=function(t){utc=t.getTime()+6e4*t.getTimezoneOffset();var e=new Date(utc);return e};this.formatDate=function(t,e,r){var i=this.zeroPadding;var n=this.localDateToUTC(t);var s=String(n.getFullYear());if("utc"==e)s=s.substr(2,2);var a=i(String(n.getMonth()+1),2);var o=i(String(n.getDate()),2);var u=i(String(n.getHours()),2);var c=i(String(n.getMinutes()),2);var l=i(String(n.getSeconds()),2);var f=s+a+o+u+c+l;if(true===r){var h=n.getMilliseconds();if(0!=h){var d=i(String(h),3);d=d.replace(/[0]+$/,"");f=f+"."+d;}}return f+"Z"};this.zeroPadding=function(t,e){if(t.length>=e)return t;return new Array(e-t.length+1).join("0")+t};this.getString=function(){return this.s};this.setString=function(t){this.hTLV=null;this.isModified=true;this.s=t;this.hV=stohex(t);};this.setByDateValue=function(t,e,r,i,n,s){var a=new Date(Date.UTC(t,e-1,r,i,n,s,0));this.setByDate(a);};this.getFreshValueHex=function(){return this.hV};};vt.lang.extend(pt.asn1.DERAbstractTime,pt.asn1.ASN1Object);pt.asn1.DERAbstractStructured=function(t){pt.asn1.DERAbstractString.superclass.constructor.call(this);this.setByASN1ObjectArray=function(t){this.hTLV=null;this.isModified=true;this.asn1Array=t;};this.appendASN1Object=function(t){this.hTLV=null;this.isModified=true;this.asn1Array.push(t);};this.asn1Array=new Array;if("undefined"!=typeof t)if("undefined"!=typeof t["array"])this.asn1Array=t["array"];};vt.lang.extend(pt.asn1.DERAbstractStructured,pt.asn1.ASN1Object);pt.asn1.DERBoolean=function(){pt.asn1.DERBoolean.superclass.constructor.call(this);this.hT="01";this.hTLV="0101ff";};vt.lang.extend(pt.asn1.DERBoolean,pt.asn1.ASN1Object);pt.asn1.DERInteger=function(t){pt.asn1.DERInteger.superclass.constructor.call(this);this.hT="02";this.setByBigInteger=function(t){this.hTLV=null;this.isModified=true;this.hV=pt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t);};this.setByInteger=function(t){var e=new C(String(t),10);this.setByBigInteger(e);};this.setValueHex=function(t){this.hV=t;};this.getFreshValueHex=function(){return this.hV};if("undefined"!=typeof t)if("undefined"!=typeof t["bigint"])this.setByBigInteger(t["bigint"]);else if("undefined"!=typeof t["int"])this.setByInteger(t["int"]);else if("number"==typeof t)this.setByInteger(t);else if("undefined"!=typeof t["hex"])this.setValueHex(t["hex"]);};vt.lang.extend(pt.asn1.DERInteger,pt.asn1.ASN1Object);pt.asn1.DERBitString=function(t){if(void 0!==t&&"undefined"!==typeof t.obj){var e=pt.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex();}pt.asn1.DERBitString.superclass.constructor.call(this);this.hT="03";this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null;this.isModified=true;this.hV=t;};this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7{}};var e={};function r(i){var n=e[i];if(void 0!==n)return n.exports;var s=e[i]={id:i,loaded:false,exports:{}};t[i].call(s.exports,s,s.exports,r);s.loaded=true;return s.exports}(()=>{r.d=(t,e)=>{for(var i in e)if(r.o(e,i)&&!r.o(t,i))Object.defineProperty(t,i,{enumerable:true,get:e[i]});};})();(()=>{r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}();})();(()=>{r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);})();(()=>{r.r=t=>{if("undefined"!==typeof Symbol&&Symbol.toStringTag)Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});Object.defineProperty(t,"__esModule",{value:true});};})();(()=>{r.nmd=t=>{t.paths=[];if(!t.children)t.children=[];return t};})();var i=r(9021);return i})())); } (gtpushMin)); -- GitLab