Socket
Socket
Sign inDemoInstall

qcloud-iotexplorer-appdev-sdk

Package Overview
Dependencies
Maintainers
5
Versions
160
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qcloud-iotexplorer-appdev-sdk - npm Package Compare versions

Comparing version 1.9.2 to 1.9.4

2

lib/AppDevSdk.js

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppDevSdk=exports.AppDevPlugin=void 0;var tslib_1=require("tslib"),event_emitter_for_miniprogram_1=tslib_1.__importDefault(require("event-emitter-for-miniprogram")),modules_1=require("./modules"),utils_1=require("./utils"),utils=tslib_1.__importStar(require("./utils")),constants=tslib_1.__importStar(require("./constants")),ReportLevel={INFO:0,WARN:1,ERROR:2},AppDevPlugin=function(){function e(){}return e.install=function(e){},e}();exports.AppDevPlugin=AppDevPlugin;var AppDevSdk=function(e){function t(t){var n=t.getAccessToken,i=t.appKey,s=void 0===i?"":i,r=t.apiPlatform,o=void 0===r?"":r,a=t.apiRegionId,c=void 0===a?1:a,u=t.debug,l=void 0!==u&&u,d=t.apiUrl,p=t.wsConfig,_=void 0===p?{}:p,g=_.autoReconnect,v=void 0===g||g,h=_.disconnectWhenAppHide,f=void 0===h||h,b=_.connectWhenAppShow,y=void 0===b||b,m=tslib_1.__rest(_,["autoReconnect","disconnectWhenAppHide","connectWhenAppShow"]),w=t.reporter,P=t.plugins,k=void 0===P?[]:P,I=t.defaultUin,D=void 0===I?"unknown":I,A=t.enableAccessTokenCache,E=void 0===A||A,R=e.call(this)||this;R.isManuallyClose=!1,R._defaultFamilyIdPromise=null,R.constants=constants,R.utils=utils,R.plugins={},R._defaultUin=D,R._apiUrl=d,R._debug=l,utils_1.logger.config({debug:l});var T=w||utils_1.noop;return R.reporter={info:function(e,t){void 0===t&&(t={});try{T(e,tslib_1.__assign({level:ReportLevel.INFO},t))}catch(e){utils_1.logger.warn(e)}},warn:function(e,t){void 0===t&&(t={});try{T(e,tslib_1.__assign({level:ReportLevel.WARN},t))}catch(e){utils_1.logger.warn(e)}},error:function(e,t){void 0===t&&(t={});try{T(e,tslib_1.__assign({level:ReportLevel.ERROR},t))}catch(e){utils_1.logger.warn(e)}}},R.ws=new modules_1.IotWebsocket(R,tslib_1.__assign(tslib_1.__assign({},m),{apiPlatform:o})),R.loginManager=new modules_1.LoginManager(R,{getAccessToken:n,appKey:s,enableAccessTokenCache:E}),R._apiPlatform=o,R._apiRegionId=c,R.loginManager.on(constants.EventTypes.LoginStateChange,(function(e){return R.emit(constants.EventTypes.LoginStateChange,{isLogin:e})})),R.ws.on("error",(function(e){utils_1.logger.debug("websocket error",e),R.emit(constants.EventTypes.WsError,e),v&&R._reconnectWs()})),R.ws.on("close",(function(e){var t=void 0===e?{}:e,n=t.code,i=t.reason;utils_1.logger.debug("websocket close",{code:n,reason:i}),R.emit(constants.EventTypes.WsClose,{code:n,reason:i}),v&&R._onWebsocketClose()})),R.ws.on("push",(function(e){return R._handlePushEvent(e)})),utils_1.envDetect.isMiniProgram&&(wx.onAppHide((function(){f&&(R.isManuallyClose=!0,R.ws.disconnect())})),wx.onAppShow((function(){y&&R.isLogin&&R.ws.connect()}))),(null==k?void 0:k.length)&&k.forEach((function(e){return R.usePlugin(e)})),R}return tslib_1.__extends(t,e),t.prototype.usePlugin=function(e){e.install(this)},Object.defineProperty(t.prototype,"userInfo",{get:function(){return this.loginManager.userInfo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLogin",{get:function(){return this.loginManager.isLogin},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this.loginManager.userId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"uin",{get:function(){return this.loginManager.userId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nickName",{get:function(){return this.loginManager.nickName},enumerable:!1,configurable:!0}),t.prototype.init=function(e){return tslib_1.__awaiter(this,void 0,void 0,(function(){var t=this;return tslib_1.__generator(this,(function(n){return e||(e={}),e.reload&&(this._initPromise=null),this.isLogin?[2,Promise.resolve()]:[2,this._initPromise||(this._initPromise=new Promise((function(n,i){return tslib_1.__awaiter(t,void 0,void 0,(function(){var t;return tslib_1.__generator(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,4,5]),[4,this.loginManager.login({reload:e.reload})];case 1:return s.sent(),[4,this.ws.connect()];case 2:return s.sent(),n(),[3,5];case 3:return t=s.sent(),i(utils_1.normalizeError(t)),[3,5];case 4:return this._initPromise=null,[7];case 5:return[2]}}))}))})))]}))}))},t.prototype.getDefaultFamilyId=function(){var e=this;return this._defaultFamilyIdPromise||(this._defaultFamilyIdPromise=new Promise((function(t,n){return tslib_1.__awaiter(e,void 0,void 0,(function(){var e,i,s,r;return tslib_1.__generator(this,(function(o){switch(o.label){case 0:return o.trys.push([0,4,,5]),[4,this.requestApi("AppGetFamilyList",{Offset:0,Limit:100})];case 1:return e=o.sent(),i=e.FamilyList,e.Total?[3,3]:[4,this.requestApi("AppCreateFamily",{Name:this.loginManager.nickName})];case 2:return s=o.sent().Data.FamilyId,[2,t(s)];case 3:return t(i[0].FamilyId),[3,5];case 4:return r=o.sent(),n(r),this._defaultFamilyIdPromise=null,[3,5];case 5:return[2]}}))}))})))},t.prototype.sendWebsocketMessage=function(e,t){return void 0===t&&(t={}),tslib_1.__awaiter(this,void 0,void 0,(function(){return tslib_1.__generator(this,(function(n){switch(n.label){case 0:return[4,this.init()];case 1:return n.sent(),[2,this.ws.send(e,t)]}}))}))},t.prototype.connectWebsocket=function(){return tslib_1.__awaiter(this,void 0,void 0,(function(){return tslib_1.__generator(this,(function(e){switch(e.label){case 0:return[4,this.init()];case 1:return e.sent(),[4,this.ws.connect()];case 2:return e.sent(),[2]}}))}))},t.prototype.disconnectWebsocket=function(){this.ws.disconnect()},t.prototype.subscribeDevices=function(e){return tslib_1.__awaiter(this,void 0,void 0,(function(){var t;return tslib_1.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.ws.connect((e||[]).map((function(e){return"string"==typeof e?e:(null==e?void 0:e.DeviceId)?e.DeviceId:null})).filter(Boolean))];case 1:return n.sent(),[3,3];case 2:return t=n.sent(),utils_1.logger.warn("subscribeDevices fail",t),[3,3];case 3:return[2]}}))}))},t.prototype.requestApi=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var i=n.doNotRetry,s=void 0!==i&&i,r=n.needLogin,o=void 0===r||r,a=n.doNotReport,c=void 0!==a&&a,u=tslib_1.__rest(n,["doNotRetry","needLogin","doNotReport"]);return tslib_1.__awaiter(this,void 0,void 0,(function(){var n,i,r,a,l,d,p;return tslib_1.__generator(this,(function(_){switch(_.label){case 0:return _.trys.push([0,6,,13]),o?[4,this.loginManager.checkLogin()]:[3,2];case 1:_.sent(),_.label=2;case 2:return n=this.loginManager,i=n.accessToken,r=n.userId,t&&"default"===t.FamilyId?(a=t,[4,this.getDefaultFamilyId()]):[3,4];case 3:a.FamilyId=_.sent(),_.label=4;case 4:return l=tslib_1.__assign({uin:this._debug?this._defaultUin:r,RegionId:this._apiRegionId},t),i&&(l.AccessToken=i),this._apiPlatform&&(l.Platform=this._apiPlatform),[4,modules_1.requestTokenApi(e,l,tslib_1.__assign({reporter:this.reporter,doNotReport:c,url:this._apiUrl},u))];case 5:return[2,_.sent()];case 6:if(d=_.sent(),utils_1.logger.debug("requestApi fail",d),!utils_1.isVerifyLoginError(d))return[3,12];if(s)return[3,11];_.label=7;case 7:return _.trys.push([7,9,,10]),[4,this.loginManager.reLogin()];case 8:return _.sent(),[3,10];case 9:return p=_.sent(),utils_1.logger.error("reLogin fail",p),[2,Promise.reject(utils_1.genVerifyLoginFailError(d))];case 10:return[2,this.requestApi(e,t,tslib_1.__assign({doNotRetry:!0},u))];case 11:return[2,Promise.reject(utils_1.genVerifyLoginFailError(d))];case 12:return[2,Promise.reject(utils_1.normalizeError(d))];case 13:return[2]}}))}))},t.prototype._handlePushEvent=function(e){var t,n,i,s;e||(e={}),this.emit(constants.EventTypes.WsPush,e);var r=e.action,o=e.params;o||(o={});var a=o.DeviceId,c=o.Type,u=o.SubType,l=o.Time,d=o.Payload,p=new Date(l).getTime();switch(d&&(d=JSON.parse(utils_1.base64.decode(d))),utils_1.logger.debug("websocket push payload",d),r){case"DeviceChange":switch(c){case"Property":case"Shadow":case"Template":switch(u){case"Report":var _={};try{if(d){var g=d.method,v=d.params,h=d.type,f=d.state;if(h&&"update"===h&&f&&f.reported&&(g="report",v=f.reported),v||(v={}),"report"===g)try{for(var b=tslib_1.__values(Object.keys(v)),y=b.next();!y.done;y=b.next()){_[k=y.value]={Value:v[k],lastUpdate:p,LastUpdate:p}}}catch(e){t={error:e}}finally{try{y&&!y.done&&(n=b.return)&&n.call(b)}finally{if(t)throw t.error}}}}catch(e){utils_1.logger.error("handle report event error",e)}this.emit(constants.EventTypes.WsReport,{deviceId:a,deviceData:_});break;case"Push":_={};try{if(d){g=d.method,v=d.params,h=d.type;var m=d.payload;if(h&&"delta"===h&&m&&m.state&&(g="control",v=m.state),"control"===g&&v){try{for(var w=tslib_1.__values(Object.keys(v)),P=w.next();!P.done;P=w.next()){var k;_[k=P.value]={Value:v[k],LastUpdate:p}}}catch(e){i={error:e}}finally{try{P&&!P.done&&(s=w.return)&&s.call(w)}finally{if(i)throw i.error}}this.emit(constants.EventTypes.WsControl,{deviceId:a,deviceData:_})}}}catch(e){utils_1.logger.error(e)}}break;case"Event":switch(u){case"Report":this.emit(constants.EventTypes.WsEventReport,{Payload:d,deviceId:a})}break;case"Action":switch(u){case"Push":this.emit(constants.EventTypes.WsActionPush,{Payload:d,deviceId:a});break;case"Report":this.emit(constants.EventTypes.WsActionReport,{Payload:d,deviceId:a})}break;case"StatusChange":switch(u){case"Bind":this.emit(constants.EventTypes.WsDeviceBind,{Payload:d,deviceId:a});break;case"Unbind":this.emit(constants.EventTypes.WsDeviceUnbind,{Payload:d,deviceId:a});break;case"Online":case"Offline":var I="Online"===u?1:0;this.emit(constants.EventTypes.WsStatusChange,{deviceId:a,deviceStatus:I});break;default:console.warn("unknown subtype 【"+u+"】 of statusChange")}case"Gateway":switch(u){case"bind":this.emit(constants.EventTypes.WsSubDeviceBind,{gatewayDeviceId:a,subDeviceList:d}),this.emit(constants.EventTypes.WsSubDeviceChange,{gatewayDeviceId:a,subDeviceList:d,action:"bind"});break;case"unbind":this.emit(constants.EventTypes.WsSubDeviceUnbind,{gatewayDeviceId:a,subDeviceList:d}),this.emit(constants.EventTypes.WsSubDeviceChange,{gatewayDeviceId:a,subDeviceList:d,action:"unbind"})}}}},t.prototype._onWebsocketClose=function(){if(!this.isManuallyClose)return this._reconnectWs();this.isManuallyClose=!1},t.prototype._reconnectWs=function(){return tslib_1.__awaiter(this,void 0,void 0,(function(){var e;return tslib_1.__generator(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),utils_1.logger.debug("websocket reconnecting in 2 seconds"),[4,utils_1.delay(2e3)];case 1:return t.sent(),[4,this.ws.connect()];case 2:return t.sent(),[3,4];case 3:return e=t.sent(),utils_1.logger.error("error when reconnect ws",e),[2,Promise.reject(e)];case 4:return[2]}}))}))},t.utils=utils,t.constants=constants,t}(event_emitter_for_miniprogram_1.default);exports.AppDevSdk=AppDevSdk;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppDevSdk=exports.AppDevPlugin=void 0;var tslib_1=require("tslib"),event_emitter_for_miniprogram_1=tslib_1.__importDefault(require("event-emitter-for-miniprogram")),modules_1=require("./modules"),utils_1=require("./utils"),utils=tslib_1.__importStar(require("./utils")),constants=tslib_1.__importStar(require("./constants")),ReportLevel={INFO:0,WARN:1,ERROR:2},AppDevPlugin=function(){function e(){}return e.install=function(e){},e}();exports.AppDevPlugin=AppDevPlugin;var AppDevSdk=function(e){function t(t){var n=t.getAccessToken,i=t.appKey,r=void 0===i?"":i,s=t.apiPlatform,o=void 0===s?"":s,a=t.apiRegionId,c=void 0===a?1:a,u=t.debug,l=void 0!==u&&u,d=t.apiUrl,p=t.wsConfig,_=void 0===p?{}:p,g=_.autoReconnect,v=void 0===g||g,h=_.disconnectWhenAppHide,f=void 0===h||h,b=_.connectWhenAppShow,y=void 0===b||b,m=tslib_1.__rest(_,["autoReconnect","disconnectWhenAppHide","connectWhenAppShow"]),w=t.reporter,P=t.plugins,k=void 0===P?[]:P,I=t.defaultUin,D=void 0===I?"unknown":I,A=t.enableAccessTokenCache,E=void 0===A||A,R=e.call(this)||this;R.isManuallyClose=!1,R._defaultFamilyIdPromise=null,R.constants=constants,R.utils=utils,R.plugins={},R._defaultUin=D,R._apiUrl=d,R._debug=l,utils_1.logger.config({debug:l});var T=w||utils_1.noop;return R.reporter={info:function(e,t){void 0===t&&(t={});try{T(e,tslib_1.__assign({level:ReportLevel.INFO},t))}catch(e){utils_1.logger.warn(e)}},warn:function(e,t){void 0===t&&(t={});try{T(e,tslib_1.__assign({level:ReportLevel.WARN},t))}catch(e){utils_1.logger.warn(e)}},error:function(e,t){void 0===t&&(t={});try{T(e,tslib_1.__assign({level:ReportLevel.ERROR},t))}catch(e){utils_1.logger.warn(e)}}},R.ws=new modules_1.IotWebsocket(R,tslib_1.__assign(tslib_1.__assign({},m),{apiPlatform:o})),R.loginManager=new modules_1.LoginManager(R,{getAccessToken:n,appKey:r,enableAccessTokenCache:E}),R._apiPlatform=o,R._apiRegionId=c,R.loginManager.on(constants.EventTypes.LoginStateChange,(function(e){return R.emit(constants.EventTypes.LoginStateChange,{isLogin:e})})),R.ws.on("error",(function(e){utils_1.logger.debug("websocket error",e),R.emit(constants.EventTypes.WsError,e),v&&R._reconnectWs()})),R.ws.on("close",(function(e){var t=void 0===e?{}:e,n=t.code,i=t.reason;utils_1.logger.debug("websocket close",{code:n,reason:i}),R.emit(constants.EventTypes.WsClose,{code:n,reason:i}),v&&R._onWebsocketClose()})),R.ws.on("push",(function(e){return R._handlePushEvent(e)})),utils_1.envDetect.isMiniProgram&&(wx.onAppHide((function(){f&&(R.isManuallyClose=!0,R.ws.disconnect())})),wx.onAppShow((function(){y&&R.isLogin&&R.ws.connect()}))),(null==k?void 0:k.length)&&k.forEach((function(e){return R.usePlugin(e)})),R}return tslib_1.__extends(t,e),t.prototype.usePlugin=function(e){e.install(this)},Object.defineProperty(t.prototype,"userInfo",{get:function(){return this.loginManager.userInfo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLogin",{get:function(){return this.loginManager.isLogin},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this.loginManager.userId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"uin",{get:function(){return this.loginManager.userId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nickName",{get:function(){return this.loginManager.nickName},enumerable:!1,configurable:!0}),t.prototype.init=function(e){return tslib_1.__awaiter(this,void 0,void 0,(function(){var t=this;return tslib_1.__generator(this,(function(n){return e||(e={}),e.reload&&(this._initPromise=null),this.isLogin?[2,Promise.resolve()]:[2,this._initPromise||(this._initPromise=new Promise((function(n,i){return tslib_1.__awaiter(t,void 0,void 0,(function(){var t;return tslib_1.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,4,5]),[4,this.loginManager.login({reload:e.reload})];case 1:return r.sent(),[4,this.ws.connect()];case 2:return r.sent(),n(),[3,5];case 3:return t=r.sent(),i(utils_1.normalizeError(t)),[3,5];case 4:return this._initPromise=null,[7];case 5:return[2]}}))}))})))]}))}))},t.prototype.getDefaultFamilyId=function(){var e=this;return this._defaultFamilyIdPromise||(this._defaultFamilyIdPromise=new Promise((function(t,n){return tslib_1.__awaiter(e,void 0,void 0,(function(){var e,i,r,s;return tslib_1.__generator(this,(function(o){switch(o.label){case 0:return o.trys.push([0,4,,5]),[4,this.requestApi("AppGetFamilyList",{Offset:0,Limit:100})];case 1:return e=o.sent(),i=e.FamilyList,e.Total?[3,3]:[4,this.requestApi("AppCreateFamily",{Name:this.loginManager.nickName})];case 2:return r=o.sent().Data.FamilyId,[2,t(r)];case 3:return t(i[0].FamilyId),[3,5];case 4:return s=o.sent(),n(s),this._defaultFamilyIdPromise=null,[3,5];case 5:return[2]}}))}))})))},t.prototype.sendWebsocketMessage=function(e,t){return void 0===t&&(t={}),tslib_1.__awaiter(this,void 0,void 0,(function(){return tslib_1.__generator(this,(function(n){switch(n.label){case 0:return[4,this.init()];case 1:return n.sent(),[2,this.ws.send(e,t)]}}))}))},t.prototype.connectWebsocket=function(){return tslib_1.__awaiter(this,void 0,void 0,(function(){return tslib_1.__generator(this,(function(e){switch(e.label){case 0:return[4,this.init()];case 1:return e.sent(),[4,this.ws.connect()];case 2:return e.sent(),[2]}}))}))},t.prototype.disconnectWebsocket=function(){this.ws.disconnect()},t.prototype.subscribeDevices=function(e){return tslib_1.__awaiter(this,void 0,void 0,(function(){var t;return tslib_1.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.ws.connect((e||[]).map((function(e){return"string"==typeof e?e:(null==e?void 0:e.DeviceId)?e.DeviceId:null})).filter(Boolean))];case 1:return n.sent(),[3,3];case 2:return t=n.sent(),utils_1.logger.warn("subscribeDevices fail",t),[3,3];case 3:return[2]}}))}))},t.prototype.requestApi=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var i=n.doNotRetry,r=void 0!==i&&i,s=n.needLogin,o=void 0===s||s,a=n.doNotReport,c=void 0!==a&&a,u=tslib_1.__rest(n,["doNotRetry","needLogin","doNotReport"]);return tslib_1.__awaiter(this,void 0,void 0,(function(){var n,i,s,a,l,d,p;return tslib_1.__generator(this,(function(_){switch(_.label){case 0:return _.trys.push([0,6,,13]),o?[4,this.loginManager.checkLogin()]:[3,2];case 1:_.sent(),_.label=2;case 2:return n=this.loginManager,i=n.accessToken,s=n.userId,t&&"default"===t.FamilyId?(a=t,[4,this.getDefaultFamilyId()]):[3,4];case 3:a.FamilyId=_.sent(),_.label=4;case 4:return l=tslib_1.__assign({uin:this._debug?this._defaultUin:s,RegionId:this._apiRegionId},t),i&&(l.AccessToken=i),this._apiPlatform&&(l.Platform=this._apiPlatform),[4,modules_1.requestTokenApi(e,l,tslib_1.__assign({reporter:this.reporter,doNotReport:c,url:this._apiUrl},u))];case 5:return[2,_.sent()];case 6:if(d=_.sent(),utils_1.logger.debug("requestApi fail",d),!utils_1.isVerifyLoginError(d))return[3,12];if(r)return[3,11];_.label=7;case 7:return _.trys.push([7,9,,10]),[4,this.loginManager.reLogin()];case 8:return _.sent(),[3,10];case 9:return p=_.sent(),utils_1.logger.error("reLogin fail",p),[2,Promise.reject(utils_1.genVerifyLoginFailError(d))];case 10:return[2,this.requestApi(e,t,tslib_1.__assign({doNotRetry:!0},u))];case 11:return[2,Promise.reject(utils_1.genVerifyLoginFailError(d))];case 12:return[2,Promise.reject(utils_1.normalizeError(d))];case 13:return[2]}}))}))},t.prototype._handlePushEvent=function(e){var t,n,i,r;e||(e={}),this.emit(constants.EventTypes.WsPush,e);var s=e.action,o=e.params;o||(o={});var a=o.DeviceId,c=o.Type,u=o.SubType,l=o.Time,d=o.Payload,p=new Date(l).getTime();if(d)try{d=JSON.parse(utils_1.base64.decode(d))}catch(e){return void utils_1.logger.error(e)}if(utils_1.logger.debug("websocket push payload",d),"DeviceChange"===s)switch(c){case"Property":case"Shadow":case"Template":switch(u){case"Report":var _={};try{if(d){var g=d.method,v=d.params,h=d.type,f=d.state;if(h&&"update"===h&&f&&f.reported&&(g="report",v=f.reported),v||(v={}),"report"===g)try{for(var b=tslib_1.__values(Object.keys(v)),y=b.next();!y.done;y=b.next()){_[k=y.value]={Value:v[k],lastUpdate:p,LastUpdate:p}}}catch(e){t={error:e}}finally{try{y&&!y.done&&(n=b.return)&&n.call(b)}finally{if(t)throw t.error}}}}catch(e){utils_1.logger.error("handle report event error",e)}this.emit(constants.EventTypes.WsReport,{deviceId:a,deviceData:_});break;case"Push":_={};try{if(d){g=d.method,v=d.params,h=d.type;var m=d.payload;if(h&&"delta"===h&&m&&m.state&&(g="control",v=m.state),"control"===g&&v){try{for(var w=tslib_1.__values(Object.keys(v)),P=w.next();!P.done;P=w.next()){var k;_[k=P.value]={Value:v[k],LastUpdate:p}}}catch(e){i={error:e}}finally{try{P&&!P.done&&(r=w.return)&&r.call(w)}finally{if(i)throw i.error}}this.emit(constants.EventTypes.WsControl,{deviceId:a,deviceData:_})}}}catch(e){utils_1.logger.error(e)}}break;case"Event":if("Report"===u)this.emit(constants.EventTypes.WsEventReport,{Payload:d,deviceId:a});break;case"Action":switch(u){case"Push":this.emit(constants.EventTypes.WsActionPush,{Payload:d,deviceId:a});break;case"Report":this.emit(constants.EventTypes.WsActionReport,{Payload:d,deviceId:a})}break;case"StatusChange":switch(u){case"Bind":this.emit(constants.EventTypes.WsDeviceBind,{Payload:d,deviceId:a});break;case"Unbind":this.emit(constants.EventTypes.WsDeviceUnbind,{Payload:d,deviceId:a});break;case"Online":case"Offline":var I="Online"===u?1:0;this.emit(constants.EventTypes.WsStatusChange,{deviceId:a,deviceStatus:I});break;default:console.warn("unknown subtype 【"+u+"】 of statusChange")}case"Gateway":switch(u){case"bind":this.emit(constants.EventTypes.WsSubDeviceBind,{gatewayDeviceId:a,subDeviceList:d}),this.emit(constants.EventTypes.WsSubDeviceChange,{gatewayDeviceId:a,subDeviceList:d,action:"bind"});break;case"unbind":this.emit(constants.EventTypes.WsSubDeviceUnbind,{gatewayDeviceId:a,subDeviceList:d}),this.emit(constants.EventTypes.WsSubDeviceChange,{gatewayDeviceId:a,subDeviceList:d,action:"unbind"})}}},t.prototype._onWebsocketClose=function(){if(!this.isManuallyClose)return this._reconnectWs();this.isManuallyClose=!1},t.prototype._reconnectWs=function(){return tslib_1.__awaiter(this,void 0,void 0,(function(){var e;return tslib_1.__generator(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),utils_1.logger.debug("websocket reconnecting in 2 seconds"),[4,utils_1.delay(2e3)];case 1:return t.sent(),[4,this.ws.connect()];case 2:return t.sent(),[3,4];case 3:return e=t.sent(),utils_1.logger.error("error when reconnect ws",e),[2,Promise.reject(e)];case 4:return[2]}}))}))},t.utils=utils,t.constants=constants,t}(event_emitter_for_miniprogram_1.default);exports.AppDevSdk=AppDevSdk;
//# sourceMappingURL=AppDevSdk.js.map

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.byteUtil=void 0;var tslib_1=require("tslib"),ByteUtil=function(){function t(){this.ESPTOUCH_ENCODING_CHARSET="UTF-8"}return t.prototype.toInt8Array=function(t){return"[object ArrayBuffer]"===Object.prototype.toString.call(t)||Array.isArray(t)?new Int8Array(t):t},t.prototype.toUint8Array=function(t){return"[object ArrayBuffer]"===Object.prototype.toString.call(t)||Array.isArray(t)?new Uint8Array(t):t},t.prototype.stringToByteArray=function(t){for(var r=[],e=0,o=0;o<t.length;o++){var n=t.charCodeAt(o);n>255&&(r[e++]=255&n,n>>=8),r[e++]=n}return r},t.prototype.putString2bytes=function(t,r,e,o,n){for(var i=this.stringToByteArray(r),s=0;s<n;s++)t[n+s]=i[s]},t.prototype.convertUint8toByte=function(t){return"string"==typeof t&&(t=t.charCodeAt(0)),new Int8Array([t])[0]},t.prototype.convertUnit8s2Bytes=function(t){for(var r=t.length,e=new Int8Array(r),o=0;o<r;o++)e[o]=this.convertUint8toByte(t[o]);return e},t.prototype.convertNumberToChar=function(t){return new Uint16Array([t])[0]},t.prototype.convertNumberToByte=function(t){return new Int8Array([t])[0]},t.prototype.convertByte2Uint8=function(t){return"string"==typeof t&&(t=t.charCodeAt(0)),255&t},t.prototype.convertBytes2Uint8s=function(t){for(var r=t.length,e=new Uint8Array(r),o=0;o<r;o++)e[o]=this.convertByte2Uint8(t[o]);return e},t.prototype.putbytes2Uint8s=function(t,r,e,o,n){for(var i=0;i<n;i++)t[e+i]=this.convertByte2Uint8(r[o+i])},t.prototype.byteToHex=function(t){var r=(255&t).toString(16);return r.length>1?r:"0"+r},t.prototype.byteArrayToString=function(t){var r=8192;if((t=exports.byteUtil.toUint8Array(t)).length<=r)return String.fromCharCode.apply(null,t);for(var e="",o=0;o<t.length;o+=r){var n=t.slice(o,o+r);e+=String.fromCharCode.apply(null,n)}return e},t.prototype.byteArrayToHex=function(t,r){var e=this;void 0===r&&(r="");var o=[];return t.forEach((function(t){o.push(e.byteToHex(255&t))})),o.join(r||"")},t.prototype.convertByte2HexString=function(t){var r=this.convertByte2Uint8(t);return this.byteToHex(r)},t.prototype.convertU8ToHexString=function(t){return this.byteToHex(t)},t.prototype.splitUint8To2bytes=function(t){if(t<0||t>255)throw"Out of Boundary";var r,e,o=this.convertByte2HexString(t);return o.length>1?(e=parseInt(o.substring(0,1),16),r=parseInt(o.substring(1,2),16)):(e=0,r=parseInt(o.substring(0,1),16)),[e,r]},t.prototype.combine2bytesToOne=function(t,r){if(t<0||t>15||r<0||r>15)throw"Out of Boundary";return t<<4|r},t.prototype.combine2bytesToU16=function(t,r){return this.convertByte2Uint8(t)<<8|this.convertByte2Uint8(r)},t.prototype.getSpecBytesFromChar=function(t){for(var r=new Int8Array(t),e=0;e<t;e++)r[e]=this.convertUint8toByte("1");return r},t.prototype.genSpecBytes=function(t){var r=this.convertByte2Uint8(t);return this.getSpecBytesFromChar(r)},t.prototype.parseBssid=function(t){var r=new Int8Array(tslib_1.__spread(t));return this.getParsedBssid(r)},t.prototype.getParsedBssid=function(t){for(var r,e="",o=0;o<t.length;o++){r=255&t[o],e+=this.byteToHex(r)}return e},t.prototype.parseBssid2bytes=function(t){for(var r=t.split(":"),e=new Int8Array(r.length),o=0;o<r.length;o++)e[o]=parseInt(r[o],16);return e},t.prototype.getStringBytesLength=function(t){for(var r,e=0,o=0;o<t.length;o++)(r=t.charCodeAt(o))<127?e++:e+=r>=128&&r<=2047?2:r>=2048&&r<=65535?3:4;return e},t.prototype.stringToUtf8ByteArray=function(t){for(var r=new Int8Array(this.getStringBytesLength(t)),e=0,o=0;o<t.length;o++){var n=t.charCodeAt(o);n<128?r[e++]=n:n<2048?(r[e++]=n>>6|192,r[e++]=63&n|128):55296==(64512&n)&&o+1<t.length&&56320==(64512&t.charCodeAt(o+1))?(n=65536+((1023&n)<<10)+(1023&t.charCodeAt(++o)),r[e++]=n>>18|240,r[e++]=n>>12&63|128,r[e++]=n>>6&63|128,r[e++]=63&n|128):(r[e++]=n>>12|224,r[e++]=n>>6&63|128,r[e++]=63&n|128)}return r},t.prototype.utf8ByteArrayToString=function(t){for(var r=[],e=0,o=0;e<t.length;){var n=t[e++];if(n<128)r[o++]=String.fromCharCode(n);else if(n>191&&n<224){var i=t[e++];r[o++]=String.fromCharCode((31&n)<<6|63&i)}else if(n>239&&n<365){var s=(7&n)<<18|(63&(i=t[e++]))<<12|(63&(a=t[e++]))<<6|(63&t[e++])-65536;r[o++]=String.fromCharCode(55296+(s>>10)),r[o++]=String.fromCharCode(56320+(1023&s))}else{i=t[e++];var a=t[e++];r[o++]=String.fromCharCode((15&n)<<12|(63&i)<<6|63&a)}}return r.join("")},t.prototype.getBytesByString=function(t){try{switch(this.ESPTOUCH_ENCODING_CHARSET){case"UTF-8":return this.stringToUtf8ByteArray(t)}}catch(t){throw"the charset is invalid"}},t.prototype.hexStringToByteArray=function(t){for(var r=t.length,e=function(t){for(var r=[];t-- >0;)r.push(0);return r}(r/2|0),o=0;o<r;o+=2)e[o/2|0]=this.convertNumberToByte((parseInt(t.charAt(o),16)<<4)+parseInt(t.charAt(o+1),16)|0);return e},t.prototype.hexString2hexArray=function(t){return void 0===t&&(t=""),t.match(/[\da-f]{2}/gi)},t.prototype.hexArray2Float32=function(t,r){if(4!==t.length)throw"hex length is wrong";var e=new Uint32Array([parseInt(t.join(""),16)]),o=new DataView(e.buffer);return void 0===r?o.getFloat32(0):o.getFloat32(0).toFixed(r)},t.prototype.float32ToHexArray=function(t){var r=new Float32Array([t]),e=new DataView(r.buffer).getUint32(0).toString(16);return this.hexString2hexArray(""+"0000000000".slice(0,8-e.length)+e)},t.prototype.hex2Int32=function(t){if("string"==typeof t&&(t=this.hexString2hexArray(t)),4!==t.length)throw"int32 must be 4 bytes";var r=parseInt(t.join(""),16);return new Int32Array([r])[0]},t.prototype.int32ToHex=function(t){var r=new Uint32Array([t])[0].toString(16);return""+"00000000".slice(0,8-r.length)+r},t.prototype.arrayCopy=function(t,r,e,o,n){if(t!==e||o>=r+n)for(;--n>=0;)e[o++]=t[r++];else for(var i=t.slice(r,r+n),s=0;s<n;s++)e[o++]=i[s]},t.prototype.crc8Byte=function(t){for(var r=0,e=255&t,o=0;o<8;++o)0!=(1&(r^e))?(r^=24,r>>=1,r|=128):r>>=1,e>>=1;return this.convertNumberToByte(255&r)},t.prototype.crc8Bytes=function(t,r){for(var e=0,o=0;o<r;++o)e=this.crc8Byte(e^t[o]);return e},t.prototype.base64Encode=function(t){for(var r,e,o,n,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s="",a=0,y=(t=String(t)).length%3;a<t.length;){if((e=t.charCodeAt(a++))>255||(o=t.charCodeAt(a++))>255||(n=t.charCodeAt(a++))>255)throw new TypeError("Failed to execute 'btoa' on 'Window':\n The string to be encoded contains characters outside of the Latin1 range");s+=i.charAt((r=e<<16|o<<8|n)>>18&63)+i.charAt(r>>12&63)+i.charAt(r>>6&63)+i.charAt(63&r)}return y?s.slice(0,y-3)+"===".substring(y):s},t.prototype.testSplitUint8To2bytes=function(){var t=this.splitUint8To2bytes(20);1===t[0]&&4===t[1]?console.log("test_splitUint8To2bytes(): pass"):console.log("test_splitUint8To2bytes(): fail")},t.prototype.testCombine2bytesToOne=function(){20===this.combine2bytesToOne(1,4)?console.log("test_combine2bytesToOne(): pass"):console.log("test_combine2bytesToOne(): fail")},t.prototype.testConvertChar2Uint8=function(){97===this.convertByte2Uint8("a")&&128===this.convertByte2Uint8(-128)&&255===this.convertByte2Uint8(-1)?console.log("test_convertChar2Uint8(): pass"):console.log("test_convertChar2Uint8(): fail")},t.prototype.testConvertUint8toByte=function(){97===this.convertUint8toByte("a")&&-128===this.convertUint8toByte(128)&&-1===this.convertUint8toByte(255)?console.log("test_convertUint8toByte(): pass"):console.log("test_convertUint8toByte(): fail")},t.prototype.testParseBssid=function(){var t=[15,-2,52,-102,-93,-60];console.log(this.parseBssid(t)),"0ffe349aa3c4"===this.parseBssid(t)?console.log("test_parseBssid(): pass"):console.log("test_parseBssid(): fail")},t.prototype.testMain=function(){this.testConvertUint8toByte(),this.testConvertChar2Uint8(),this.testSplitUint8To2bytes(),this.testCombine2bytesToOne(),this.testParseBssid()},t}();exports.byteUtil=new ByteUtil;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.byteUtil=void 0;var tslib_1=require("tslib"),ByteUtil=function(){function t(){this.ESPTOUCH_ENCODING_CHARSET="UTF-8"}return t.prototype.toInt8Array=function(t){return"[object ArrayBuffer]"===Object.prototype.toString.call(t)||Array.isArray(t)?new Int8Array(t):t},t.prototype.toUint8Array=function(t){return"[object ArrayBuffer]"===Object.prototype.toString.call(t)||Array.isArray(t)?new Uint8Array(t):t},t.prototype.stringToByteArray=function(t){for(var r=[],e=0,o=0;o<t.length;o++){var n=t.charCodeAt(o);n>255&&(r[e++]=255&n,n>>=8),r[e++]=n}return r},t.prototype.putString2bytes=function(t,r,e,o,n){for(var i=this.stringToByteArray(r),s=0;s<n;s++)t[n+s]=i[s]},t.prototype.convertUint8toByte=function(t){return"string"==typeof t&&(t=t.charCodeAt(0)),new Int8Array([t])[0]},t.prototype.convertUnit8s2Bytes=function(t){for(var r=t.length,e=new Int8Array(r),o=0;o<r;o++)e[o]=this.convertUint8toByte(t[o]);return e},t.prototype.convertNumberToChar=function(t){return new Uint16Array([t])[0]},t.prototype.convertNumberToByte=function(t){return new Int8Array([t])[0]},t.prototype.convertByte2Uint8=function(t){return"string"==typeof t&&(t=t.charCodeAt(0)),255&t},t.prototype.convertBytes2Uint8s=function(t){for(var r=t.length,e=new Uint8Array(r),o=0;o<r;o++)e[o]=this.convertByte2Uint8(t[o]);return e},t.prototype.putbytes2Uint8s=function(t,r,e,o,n){for(var i=0;i<n;i++)t[e+i]=this.convertByte2Uint8(r[o+i])},t.prototype.byteToHex=function(t){var r=(255&t).toString(16);return r.length>1?r:"0"+r},t.prototype.byteArrayToString=function(t){var r=8192;if((t=exports.byteUtil.toUint8Array(t)).length<=r)return String.fromCharCode.apply(null,t);for(var e="",o=0;o<t.length;o+=r){var n=t.slice(o,o+r);e+=String.fromCharCode.apply(null,n)}return e},t.prototype.byteArrayToHex=function(t,r){var e=this;void 0===r&&(r="");var o=[];return t.forEach((function(t){o.push(e.byteToHex(255&t))})),o.join(r||"")},t.prototype.convertByte2HexString=function(t){var r=this.convertByte2Uint8(t);return this.byteToHex(r)},t.prototype.convertU8ToHexString=function(t){return this.byteToHex(t)},t.prototype.splitUint8To2bytes=function(t){if(t<0||t>255)throw"Out of Boundary";var r,e,o=this.convertByte2HexString(t);return o.length>1?(e=parseInt(o.substring(0,1),16),r=parseInt(o.substring(1,2),16)):(e=0,r=parseInt(o.substring(0,1),16)),[e,r]},t.prototype.combine2bytesToOne=function(t,r){if(t<0||t>15||r<0||r>15)throw"Out of Boundary";return t<<4|r},t.prototype.combine2bytesToU16=function(t,r){return this.convertByte2Uint8(t)<<8|this.convertByte2Uint8(r)},t.prototype.getSpecBytesFromChar=function(t){for(var r=new Int8Array(t),e=0;e<t;e++)r[e]=this.convertUint8toByte("1");return r},t.prototype.genSpecBytes=function(t){var r=this.convertByte2Uint8(t);return this.getSpecBytesFromChar(r)},t.prototype.parseBssid=function(t){var r=new Int8Array(tslib_1.__spread(t));return this.getParsedBssid(r)},t.prototype.getParsedBssid=function(t){for(var r,e="",o=0;o<t.length;o++){r=255&t[o],e+=this.byteToHex(r)}return e},t.prototype.parseBssid2bytes=function(t){for(var r=t.split(":"),e=new Int8Array(r.length),o=0;o<r.length;o++)e[o]=parseInt(r[o],16);return e},t.prototype.getStringBytesLength=function(t){for(var r,e=0,o=0;o<t.length;o++)(r=t.charCodeAt(o))<127?e++:e+=r>=128&&r<=2047?2:r>=2048&&r<=65535?3:4;return e},t.prototype.stringToUtf8ByteArray=function(t){for(var r=new Int8Array(this.getStringBytesLength(t)),e=0,o=0;o<t.length;o++){var n=t.charCodeAt(o);n<128?r[e++]=n:n<2048?(r[e++]=n>>6|192,r[e++]=63&n|128):55296==(64512&n)&&o+1<t.length&&56320==(64512&t.charCodeAt(o+1))?(n=65536+((1023&n)<<10)+(1023&t.charCodeAt(++o)),r[e++]=n>>18|240,r[e++]=n>>12&63|128,r[e++]=n>>6&63|128,r[e++]=63&n|128):(r[e++]=n>>12|224,r[e++]=n>>6&63|128,r[e++]=63&n|128)}return r},t.prototype.utf8ByteArrayToString=function(t){for(var r=[],e=0,o=0;e<t.length;){var n=t[e++];if(n<128)r[o++]=String.fromCharCode(n);else if(n>191&&n<224){var i=t[e++];r[o++]=String.fromCharCode((31&n)<<6|63&i)}else if(n>239&&n<365){var s=(7&n)<<18|(63&(i=t[e++]))<<12|(63&(a=t[e++]))<<6|(63&t[e++])-65536;r[o++]=String.fromCharCode(55296+(s>>10)),r[o++]=String.fromCharCode(56320+(1023&s))}else{i=t[e++];var a=t[e++];r[o++]=String.fromCharCode((15&n)<<12|(63&i)<<6|63&a)}}return r.join("")},t.prototype.getBytesByString=function(t){try{if("UTF-8"===this.ESPTOUCH_ENCODING_CHARSET)return this.stringToUtf8ByteArray(t)}catch(t){throw"the charset is invalid"}},t.prototype.hexStringToByteArray=function(t){for(var r=t.length,e=function(t){for(var r=[];t-- >0;)r.push(0);return r}(r/2|0),o=0;o<r;o+=2)e[o/2|0]=this.convertNumberToByte((parseInt(t.charAt(o),16)<<4)+parseInt(t.charAt(o+1),16)|0);return e},t.prototype.hexString2hexArray=function(t){return void 0===t&&(t=""),t.match(/[\da-f]{2}/gi)},t.prototype.hexArray2Float32=function(t,r){if(4!==t.length)throw"hex length is wrong";var e=new Uint32Array([parseInt(t.join(""),16)]),o=new DataView(e.buffer);return void 0===r?o.getFloat32(0):o.getFloat32(0).toFixed(r)},t.prototype.float32ToHexArray=function(t){var r=new Float32Array([t]),e=new DataView(r.buffer).getUint32(0).toString(16);return this.hexString2hexArray(""+"0000000000".slice(0,8-e.length)+e)},t.prototype.hex2Int32=function(t){if("string"==typeof t&&(t=this.hexString2hexArray(t)),4!==t.length)throw"int32 must be 4 bytes";var r=parseInt(t.join(""),16);return new Int32Array([r])[0]},t.prototype.int32ToHex=function(t){var r=new Uint32Array([t])[0].toString(16);return""+"00000000".slice(0,8-r.length)+r},t.prototype.arrayCopy=function(t,r,e,o,n){if(t!==e||o>=r+n)for(;--n>=0;)e[o++]=t[r++];else for(var i=t.slice(r,r+n),s=0;s<n;s++)e[o++]=i[s]},t.prototype.crc8Byte=function(t){for(var r=0,e=255&t,o=0;o<8;++o)0!=(1&(r^e))?(r^=24,r>>=1,r|=128):r>>=1,e>>=1;return this.convertNumberToByte(255&r)},t.prototype.crc8Bytes=function(t,r){for(var e=0,o=0;o<r;++o)e=this.crc8Byte(e^t[o]);return e},t.prototype.base64Encode=function(t){for(var r,e,o,n,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s="",a=0,y=(t=String(t)).length%3;a<t.length;){if((e=t.charCodeAt(a++))>255||(o=t.charCodeAt(a++))>255||(n=t.charCodeAt(a++))>255)throw new TypeError("Failed to execute 'btoa' on 'Window':\n The string to be encoded contains characters outside of the Latin1 range");s+=i.charAt((r=e<<16|o<<8|n)>>18&63)+i.charAt(r>>12&63)+i.charAt(r>>6&63)+i.charAt(63&r)}return y?s.slice(0,y-3)+"===".substring(y):s},t.prototype.testSplitUint8To2bytes=function(){var t=this.splitUint8To2bytes(20);1===t[0]&&4===t[1]?console.log("test_splitUint8To2bytes(): pass"):console.log("test_splitUint8To2bytes(): fail")},t.prototype.testCombine2bytesToOne=function(){20===this.combine2bytesToOne(1,4)?console.log("test_combine2bytesToOne(): pass"):console.log("test_combine2bytesToOne(): fail")},t.prototype.testConvertChar2Uint8=function(){97===this.convertByte2Uint8("a")&&128===this.convertByte2Uint8(-128)&&255===this.convertByte2Uint8(-1)?console.log("test_convertChar2Uint8(): pass"):console.log("test_convertChar2Uint8(): fail")},t.prototype.testConvertUint8toByte=function(){97===this.convertUint8toByte("a")&&-128===this.convertUint8toByte(128)&&-1===this.convertUint8toByte(255)?console.log("test_convertUint8toByte(): pass"):console.log("test_convertUint8toByte(): fail")},t.prototype.testParseBssid=function(){var t=[15,-2,52,-102,-93,-60];console.log(this.parseBssid(t)),"0ffe349aa3c4"===this.parseBssid(t)?console.log("test_parseBssid(): pass"):console.log("test_parseBssid(): fail")},t.prototype.testMain=function(){this.testConvertUint8toByte(),this.testConvertChar2Uint8(),this.testSplitUint8To2bytes(),this.testCombine2bytesToOne(),this.testParseBssid()},t}();exports.byteUtil=new ByteUtil;
//# sourceMappingURL=byte-util.js.map

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var getCryptoJs=function(){var t,e,r,i=i||function(t,e){var r=Object.create||function(){function t(){}return function(e){var r;return t.prototype=e,r=new t,t.prototype=null,r}}(),i={},n=i.lib={},o=n.Base={extend:function(t){var e=r(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},s=n.WordArray=o.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||c).stringify(this)},concat:function(t){var e=this.words,r=t.words,i=this.sigBytes,n=t.sigBytes;if(this.clamp(),i%4)for(var o=0;o<n;o++){var s=r[o>>>2]>>>24-o%4*8&255;e[i+o>>>2]|=s<<24-(i+o)%4*8}else for(o=0;o<n;o+=4)e[i+o>>>2]=r[o>>>2];return this.sigBytes+=n,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=o.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var r,i=[],n=function(e){e=e;var r=987654321,i=4294967295;return function(){var n=((r=36969*(65535&r)+(r>>16)&i)<<16)+(e=18e3*(65535&e)+(e>>16)&i)&i;return n/=4294967296,(n+=.5)*(t.random()>.5?1:-1)}},o=0;o<e;o+=4){var a=n(4294967296*(r||t.random()));r=987654071*a(),i.push(4294967296*a()|0)}return new s.init(i,e)}}),a=i.enc={},c=a.Hex={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n++){var o=e[n>>>2]>>>24-n%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i<e;i+=2)r[i>>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new s.init(r,e/2)}},h=a.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n++){var o=e[n>>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i<e;i++)r[i>>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new s.init(r,e)}},l=a.Utf8={stringify:function(t){try{return decodeURIComponent(escape(h.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return h.parse(unescape(encodeURIComponent(t)))}},f=n.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=l.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r=this._data,i=r.words,n=r.sigBytes,o=this.blockSize,a=n/(4*o),c=(a=e?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*o,h=t.min(4*c,n);if(c){for(var l=0;l<c;l+=o)this._doProcessBlock(i,l);var f=i.splice(0,c);r.sigBytes-=h}return new s.init(f,h)},clone:function(){var t=o.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),u=(n.Hasher=f.extend({cfg:o.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,r){return new t.init(r).finalize(e)}},_createHmacHelper:function(t){return function(e,r){return new u.HMAC.init(t,r).finalize(e)}}}),i.algo={});return i}(Math);if(function(){var t=i,e=t.lib.WordArray;t.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,i=this._map;t.clamp();for(var n=[],o=0;o<r;o+=3)for(var s=(e[o>>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<r;a++)n.push(i.charAt(s>>>6*(3-a)&63));var c=i.charAt(64);if(c)for(;n.length%4;)n.push(c);return n.join("")},parse:function(t){var r=t.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o<i.length;o++)n[i.charCodeAt(o)]=o}var s=i.charAt(64);if(s){var a=t.indexOf(s);-1!==a&&(r=a)}return function(t,r,i){for(var n=[],o=0,s=0;s<r;s++)if(s%4){var a=i[t.charCodeAt(s-1)]<<s%4*2,c=i[t.charCodeAt(s)]>>>6-s%4*2;n[o>>>2]|=(a|c)<<24-o%4*8,o++}return e.create(n,o)}(t,r,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(t){var e=i,r=e.lib,n=r.WordArray,o=r.Hasher,s=e.algo,a=[];!function(){for(var e=0;e<64;e++)a[e]=4294967296*t.abs(t.sin(e+1))|0}();var c=s.MD5=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r,n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o=this._hash.words,s=t[e+0],c=t[e+1],d=t[e+2],p=t[e+3],_=t[e+4],v=t[e+5],y=t[e+6],g=t[e+7],B=t[e+8],w=t[e+9],k=t[e+10],S=t[e+11],m=t[e+12],x=t[e+13],A=t[e+14],b=t[e+15],H=o[0],z=o[1],C=o[2],D=o[3];H=h(H,z,C,D,s,7,a[0]),D=h(D,H,z,C,c,12,a[1]),C=h(C,D,H,z,d,17,a[2]),z=h(z,C,D,H,p,22,a[3]),H=h(H,z,C,D,_,7,a[4]),D=h(D,H,z,C,v,12,a[5]),C=h(C,D,H,z,y,17,a[6]),z=h(z,C,D,H,g,22,a[7]),H=h(H,z,C,D,B,7,a[8]),D=h(D,H,z,C,w,12,a[9]),C=h(C,D,H,z,k,17,a[10]),z=h(z,C,D,H,S,22,a[11]),H=h(H,z,C,D,m,7,a[12]),D=h(D,H,z,C,x,12,a[13]),C=h(C,D,H,z,A,17,a[14]),H=l(H,z=h(z,C,D,H,b,22,a[15]),C,D,c,5,a[16]),D=l(D,H,z,C,y,9,a[17]),C=l(C,D,H,z,S,14,a[18]),z=l(z,C,D,H,s,20,a[19]),H=l(H,z,C,D,v,5,a[20]),D=l(D,H,z,C,k,9,a[21]),C=l(C,D,H,z,b,14,a[22]),z=l(z,C,D,H,_,20,a[23]),H=l(H,z,C,D,w,5,a[24]),D=l(D,H,z,C,A,9,a[25]),C=l(C,D,H,z,p,14,a[26]),z=l(z,C,D,H,B,20,a[27]),H=l(H,z,C,D,x,5,a[28]),D=l(D,H,z,C,d,9,a[29]),C=l(C,D,H,z,g,14,a[30]),H=f(H,z=l(z,C,D,H,m,20,a[31]),C,D,v,4,a[32]),D=f(D,H,z,C,B,11,a[33]),C=f(C,D,H,z,S,16,a[34]),z=f(z,C,D,H,A,23,a[35]),H=f(H,z,C,D,c,4,a[36]),D=f(D,H,z,C,_,11,a[37]),C=f(C,D,H,z,g,16,a[38]),z=f(z,C,D,H,k,23,a[39]),H=f(H,z,C,D,x,4,a[40]),D=f(D,H,z,C,s,11,a[41]),C=f(C,D,H,z,p,16,a[42]),z=f(z,C,D,H,y,23,a[43]),H=f(H,z,C,D,w,4,a[44]),D=f(D,H,z,C,m,11,a[45]),C=f(C,D,H,z,b,16,a[46]),H=u(H,z=f(z,C,D,H,d,23,a[47]),C,D,s,6,a[48]),D=u(D,H,z,C,g,10,a[49]),C=u(C,D,H,z,A,15,a[50]),z=u(z,C,D,H,v,21,a[51]),H=u(H,z,C,D,m,6,a[52]),D=u(D,H,z,C,p,10,a[53]),C=u(C,D,H,z,k,15,a[54]),z=u(z,C,D,H,c,21,a[55]),H=u(H,z,C,D,B,6,a[56]),D=u(D,H,z,C,b,10,a[57]),C=u(C,D,H,z,y,15,a[58]),z=u(z,C,D,H,x,21,a[59]),H=u(H,z,C,D,_,6,a[60]),D=u(D,H,z,C,S,10,a[61]),C=u(C,D,H,z,d,15,a[62]),z=u(z,C,D,H,w,21,a[63]),o[0]=o[0]+H|0,o[1]=o[1]+z|0,o[2]=o[2]+C|0,o[3]=o[3]+D|0},_doFinalize:function(){var e=this._data,r=e.words,i=8*this._nDataBytes,n=8*e.sigBytes;r[n>>>5]|=128<<24-n%32;var o=t.floor(i/4294967296),s=i;r[15+(n+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(n+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(r.length+1),this._process();for(var a=this._hash,c=a.words,h=0;h<4;h++){var l=c[h];c[h]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function h(t,e,r,i,n,o,s){var a=t+(e&r|~e&i)+n+s;return(a<<o|a>>>32-o)+e}function l(t,e,r,i,n,o,s){var a=t+(e&i|r&~i)+n+s;return(a<<o|a>>>32-o)+e}function f(t,e,r,i,n,o,s){var a=t+(e^r^i)+n+s;return(a<<o|a>>>32-o)+e}function u(t,e,r,i,n,o,s){var a=t+(r^(e|~i))+n+s;return(a<<o|a>>>32-o)+e}e.MD5=o._createHelper(c),e.HmacMD5=o._createHmacHelper(c)}(Math),function(){var t=i,e=t.lib,r=e.WordArray,n=e.Hasher,o=t.algo,s=[],a=o.SHA1=n.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],a=r[3],c=r[4],h=0;h<80;h++){if(h<16)s[h]=0|t[e+h];else{var l=s[h-3]^s[h-8]^s[h-14]^s[h-16];s[h]=l<<1|l>>>31}var f=(i<<5|i>>>27)+c+s[h];f+=h<20?1518500249+(n&o|~n&a):h<40?1859775393+(n^o^a):h<60?(n&o|n&a|o&a)-1894007588:(n^o^a)-899497514,c=a,a=o,o=n<<30|n>>>2,n=i,i=f}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+c|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(i+64>>>9<<4)]=Math.floor(r/4294967296),e[15+(i+64>>>9<<4)]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}});t.SHA1=n._createHelper(a),t.HmacSHA1=n._createHmacHelper(a)}(),function(t){var e=i,r=e.lib,n=r.WordArray,o=r.Hasher,s=e.algo,a=[],c=[];!function(){function e(e){for(var r=t.sqrt(e),i=2;i<=r;i++)if(!(e%i))return!1;return!0}function r(t){return 4294967296*(t-(0|t))|0}for(var i=2,n=0;n<64;)e(i)&&(n<8&&(a[n]=r(t.pow(i,.5))),c[n]=r(t.pow(i,1/3)),n++),i++}();var h=[],l=s.SHA256=o.extend({_doReset:function(){this._hash=new n.init(a.slice(0))},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],a=r[4],l=r[5],f=r[6],u=r[7],d=0;d<64;d++){if(d<16)h[d]=0|t[e+d];else{var p=h[d-15],_=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=h[d-2],y=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;h[d]=_+h[d-7]+y+h[d-16]}var g=i&n^i&o^n&o,B=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),w=u+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&l^~a&f)+c[d]+h[d];u=f,f=l,l=a,a=s+w|0,s=o,o=n,n=i,i=w+(B+g)|0}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+a|0,r[5]=r[5]+l|0,r[6]=r[6]+f|0,r[7]=r[7]+u|0},_doFinalize:function(){var e=this._data,r=e.words,i=8*this._nDataBytes,n=8*e.sigBytes;return r[n>>>5]|=128<<24-n%32,r[14+(n+64>>>9<<4)]=t.floor(i/4294967296),r[15+(n+64>>>9<<4)]=i,e.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=o._createHelper(l),e.HmacSHA256=o._createHmacHelper(l)}(Math),function(){var t=i,e=t.lib.WordArray,r=t.enc;r.Utf16=r.Utf16BE={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n+=2){var o=e[n>>>2]>>>16-n%4*8&65535;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var r=t.length,i=[],n=0;n<r;n++)i[n>>>1]|=t.charCodeAt(n)<<16-n%2*16;return e.create(i,2*r)}};function n(t){return t<<8&4278255360|t>>>8&16711935}r.Utf16LE={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],o=0;o<r;o+=2){var s=n(e[o>>>2]>>>16-o%4*8&65535);i.push(String.fromCharCode(s))}return i.join("")},parse:function(t){for(var r=t.length,i=[],o=0;o<r;o++)i[o>>>1]|=n(t.charCodeAt(o)<<16-o%2*16);return e.create(i,2*r)}}}(),function(){if("function"==typeof ArrayBuffer){var t=i.lib.WordArray,e=t.init;(t.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var r=t.byteLength,i=[],n=0;n<r;n++)i[n>>>2]|=t[n]<<24-n%4*8;e.call(this,i,r)}else e.apply(this,arguments)}).prototype=t}}(),
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var getCryptoJs=function(){var t,e,r,i=i||function(t,e){var r=Object.create||function(){function t(){}return function(e){var r;return t.prototype=e,r=new t,t.prototype=null,r}}(),i={},n=i.lib={},o=n.Base={extend:function(t){var e=r(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},s=n.WordArray=o.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||c).stringify(this)},concat:function(t){var e=this.words,r=t.words,i=this.sigBytes,n=t.sigBytes;if(this.clamp(),i%4)for(var o=0;o<n;o++){var s=r[o>>>2]>>>24-o%4*8&255;e[i+o>>>2]|=s<<24-(i+o)%4*8}else for(o=0;o<n;o+=4)e[i+o>>>2]=r[o>>>2];return this.sigBytes+=n,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=o.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var r,i=[],n=function(e){e=e;var r=987654321,i=4294967295;return function(){var n=((r=36969*(65535&r)+(r>>16)&i)<<16)+(e=18e3*(65535&e)+(e>>16)&i)&i;return n/=4294967296,(n+=.5)*(t.random()>.5?1:-1)}},o=0;o<e;o+=4){var a=n(4294967296*(r||t.random()));r=987654071*a(),i.push(4294967296*a()|0)}return new s.init(i,e)}}),a=i.enc={},c=a.Hex={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n++){var o=e[n>>>2]>>>24-n%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i<e;i+=2)r[i>>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new s.init(r,e/2)}},h=a.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n++){var o=e[n>>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i<e;i++)r[i>>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new s.init(r,e)}},l=a.Utf8={stringify:function(t){try{return decodeURIComponent(escape(h.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return h.parse(unescape(encodeURIComponent(t)))}},f=n.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=l.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r=this._data,i=r.words,n=r.sigBytes,o=this.blockSize,a=n/(4*o),c=(a=e?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*o,h=t.min(4*c,n);if(c){for(var l=0;l<c;l+=o)this._doProcessBlock(i,l);var f=i.splice(0,c);r.sigBytes-=h}return new s.init(f,h)},clone:function(){var t=o.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),u=(n.Hasher=f.extend({cfg:o.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,r){return new t.init(r).finalize(e)}},_createHmacHelper:function(t){return function(e,r){return new u.HMAC.init(t,r).finalize(e)}}}),i.algo={});return i}(Math);if(function(){var t=i,e=t.lib.WordArray;t.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,i=this._map;t.clamp();for(var n=[],o=0;o<r;o+=3)for(var s=(e[o>>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<r;a++)n.push(i.charAt(s>>>6*(3-a)&63));var c=i.charAt(64);if(c)for(;n.length%4;)n.push(c);return n.join("")},parse:function(t){var r=t.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o<i.length;o++)n[i.charCodeAt(o)]=o}var s=i.charAt(64);if(s){var a=t.indexOf(s);-1!==a&&(r=a)}return function(t,r,i){for(var n=[],o=0,s=0;s<r;s++)if(s%4){var a=i[t.charCodeAt(s-1)]<<s%4*2,c=i[t.charCodeAt(s)]>>>6-s%4*2;n[o>>>2]|=(a|c)<<24-o%4*8,o++}return e.create(n,o)}(t,r,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(t){var e=i,r=e.lib,n=r.WordArray,o=r.Hasher,s=e.algo,a=[];!function(){for(var e=0;e<64;e++)a[e]=4294967296*t.abs(t.sin(e+1))|0}();var c=s.MD5=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r,n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o=this._hash.words,s=t[e+0],c=t[e+1],d=t[e+2],p=t[e+3],_=t[e+4],v=t[e+5],y=t[e+6],g=t[e+7],B=t[e+8],w=t[e+9],k=t[e+10],S=t[e+11],m=t[e+12],x=t[e+13],A=t[e+14],b=t[e+15],H=o[0],z=o[1],C=o[2],D=o[3];H=h(H,z,C,D,s,7,a[0]),D=h(D,H,z,C,c,12,a[1]),C=h(C,D,H,z,d,17,a[2]),z=h(z,C,D,H,p,22,a[3]),H=h(H,z,C,D,_,7,a[4]),D=h(D,H,z,C,v,12,a[5]),C=h(C,D,H,z,y,17,a[6]),z=h(z,C,D,H,g,22,a[7]),H=h(H,z,C,D,B,7,a[8]),D=h(D,H,z,C,w,12,a[9]),C=h(C,D,H,z,k,17,a[10]),z=h(z,C,D,H,S,22,a[11]),H=h(H,z,C,D,m,7,a[12]),D=h(D,H,z,C,x,12,a[13]),C=h(C,D,H,z,A,17,a[14]),H=l(H,z=h(z,C,D,H,b,22,a[15]),C,D,c,5,a[16]),D=l(D,H,z,C,y,9,a[17]),C=l(C,D,H,z,S,14,a[18]),z=l(z,C,D,H,s,20,a[19]),H=l(H,z,C,D,v,5,a[20]),D=l(D,H,z,C,k,9,a[21]),C=l(C,D,H,z,b,14,a[22]),z=l(z,C,D,H,_,20,a[23]),H=l(H,z,C,D,w,5,a[24]),D=l(D,H,z,C,A,9,a[25]),C=l(C,D,H,z,p,14,a[26]),z=l(z,C,D,H,B,20,a[27]),H=l(H,z,C,D,x,5,a[28]),D=l(D,H,z,C,d,9,a[29]),C=l(C,D,H,z,g,14,a[30]),H=f(H,z=l(z,C,D,H,m,20,a[31]),C,D,v,4,a[32]),D=f(D,H,z,C,B,11,a[33]),C=f(C,D,H,z,S,16,a[34]),z=f(z,C,D,H,A,23,a[35]),H=f(H,z,C,D,c,4,a[36]),D=f(D,H,z,C,_,11,a[37]),C=f(C,D,H,z,g,16,a[38]),z=f(z,C,D,H,k,23,a[39]),H=f(H,z,C,D,x,4,a[40]),D=f(D,H,z,C,s,11,a[41]),C=f(C,D,H,z,p,16,a[42]),z=f(z,C,D,H,y,23,a[43]),H=f(H,z,C,D,w,4,a[44]),D=f(D,H,z,C,m,11,a[45]),C=f(C,D,H,z,b,16,a[46]),H=u(H,z=f(z,C,D,H,d,23,a[47]),C,D,s,6,a[48]),D=u(D,H,z,C,g,10,a[49]),C=u(C,D,H,z,A,15,a[50]),z=u(z,C,D,H,v,21,a[51]),H=u(H,z,C,D,m,6,a[52]),D=u(D,H,z,C,p,10,a[53]),C=u(C,D,H,z,k,15,a[54]),z=u(z,C,D,H,c,21,a[55]),H=u(H,z,C,D,B,6,a[56]),D=u(D,H,z,C,b,10,a[57]),C=u(C,D,H,z,y,15,a[58]),z=u(z,C,D,H,x,21,a[59]),H=u(H,z,C,D,_,6,a[60]),D=u(D,H,z,C,S,10,a[61]),C=u(C,D,H,z,d,15,a[62]),z=u(z,C,D,H,w,21,a[63]),o[0]=o[0]+H|0,o[1]=o[1]+z|0,o[2]=o[2]+C|0,o[3]=o[3]+D|0},_doFinalize:function(){var e=this._data,r=e.words,i=8*this._nDataBytes,n=8*e.sigBytes;r[n>>>5]|=128<<24-n%32;var o=t.floor(i/4294967296),s=i;r[15+(n+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(n+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(r.length+1),this._process();for(var a=this._hash,c=a.words,h=0;h<4;h++){var l=c[h];c[h]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function h(t,e,r,i,n,o,s){var a=t+(e&r|~e&i)+n+s;return(a<<o|a>>>32-o)+e}function l(t,e,r,i,n,o,s){var a=t+(e&i|r&~i)+n+s;return(a<<o|a>>>32-o)+e}function f(t,e,r,i,n,o,s){var a=t+(e^r^i)+n+s;return(a<<o|a>>>32-o)+e}function u(t,e,r,i,n,o,s){var a=t+(r^(e|~i))+n+s;return(a<<o|a>>>32-o)+e}e.MD5=o._createHelper(c),e.HmacMD5=o._createHmacHelper(c)}(Math),function(){var t=i,e=t.lib,r=e.WordArray,n=e.Hasher,o=t.algo,s=[],a=o.SHA1=n.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],a=r[3],c=r[4],h=0;h<80;h++){if(h<16)s[h]=0|t[e+h];else{var l=s[h-3]^s[h-8]^s[h-14]^s[h-16];s[h]=l<<1|l>>>31}var f=(i<<5|i>>>27)+c+s[h];f+=h<20?1518500249+(n&o|~n&a):h<40?1859775393+(n^o^a):h<60?(n&o|n&a|o&a)-1894007588:(n^o^a)-899497514,c=a,a=o,o=n<<30|n>>>2,n=i,i=f}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+c|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(i+64>>>9<<4)]=Math.floor(r/4294967296),e[15+(i+64>>>9<<4)]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}});t.SHA1=n._createHelper(a),t.HmacSHA1=n._createHmacHelper(a)}(),function(t){var e=i,r=e.lib,n=r.WordArray,o=r.Hasher,s=e.algo,a=[],c=[];!function(){function e(e){for(var r=t.sqrt(e),i=2;i<=r;i++)if(!(e%i))return!1;return!0}function r(t){return 4294967296*(t-(0|t))|0}for(var i=2,n=0;n<64;)e(i)&&(n<8&&(a[n]=r(t.pow(i,.5))),c[n]=r(t.pow(i,1/3)),n++),i++}();var h=[],l=s.SHA256=o.extend({_doReset:function(){this._hash=new n.init(a.slice(0))},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],a=r[4],l=r[5],f=r[6],u=r[7],d=0;d<64;d++){if(d<16)h[d]=0|t[e+d];else{var p=h[d-15],_=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=h[d-2],y=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;h[d]=_+h[d-7]+y+h[d-16]}var g=i&n^i&o^n&o,B=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),w=u+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&l^~a&f)+c[d]+h[d];u=f,f=l,l=a,a=s+w|0,s=o,o=n,n=i,i=w+(B+g)|0}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+a|0,r[5]=r[5]+l|0,r[6]=r[6]+f|0,r[7]=r[7]+u|0},_doFinalize:function(){var e=this._data,r=e.words,i=8*this._nDataBytes,n=8*e.sigBytes;return r[n>>>5]|=128<<24-n%32,r[14+(n+64>>>9<<4)]=t.floor(i/4294967296),r[15+(n+64>>>9<<4)]=i,e.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=o._createHelper(l),e.HmacSHA256=o._createHmacHelper(l)}(Math),function(){var t=i,e=t.lib.WordArray,r=t.enc;r.Utf16=r.Utf16BE={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n+=2){var o=e[n>>>2]>>>16-n%4*8&65535;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var r=t.length,i=[],n=0;n<r;n++)i[n>>>1]|=t.charCodeAt(n)<<16-n%2*16;return e.create(i,2*r)}};function n(t){return t<<8&4278255360|t>>>8&16711935}r.Utf16LE={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],o=0;o<r;o+=2){var s=n(e[o>>>2]>>>16-o%4*8&65535);i.push(String.fromCharCode(s))}return i.join("")},parse:function(t){for(var r=t.length,i=[],o=0;o<r;o++)i[o>>>1]|=n(t.charCodeAt(o)<<16-o%2*16);return e.create(i,2*r)}}}(),function(){if("function"==typeof ArrayBuffer){var t=i.lib.WordArray,e=t.init,r=t.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var r=t.byteLength,i=[],n=0;n<r;n++)i[n>>>2]|=t[n]<<24-n%4*8;e.call(this,i,r)}else e.apply(this,arguments)};r.prototype=t}}(),
/** @preserve

@@ -18,3 +18,3 @@ (c) 2012 by Cédric Mesnil. All rights reserved.

*/
i.mode.CTRGladman=function(){var t=i.lib.BlockCipherMode.extend();function e(t){if(255==(t>>24&255)){var e=t>>16&255,r=t>>8&255,i=255&t;255===e?(e=0,255===r?(r=0,255===i?i=0:++i):++r):++e,t=0,t+=e<<16,t+=r<<8,t+=i}else t+=1<<24;return t}var r=t.Encryptor=t.extend({processBlock:function(t,r){var i=this._cipher,n=i.blockSize,o=this._iv,s=this._counter;o&&(s=this._counter=o.slice(0),this._iv=void 0),function(t){0===(t[0]=e(t[0]))&&(t[1]=e(t[1]))}(s);var a=s.slice(0);i.encryptBlock(a,0);for(var c=0;c<n;c++)t[r+c]^=a[c]}});return t.Decryptor=r,t}(),function(){var t=i,e=t.lib.StreamCipher,r=t.algo,n=[],o=[],s=[],a=r.Rabbit=e.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,r=0;r<4;r++)t[r]=16711935&(t[r]<<8|t[r]>>>24)|4278255360&(t[r]<<24|t[r]>>>8);var i=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(r=0;r<4;r++)c.call(this);for(r=0;r<8;r++)n[r]^=i[r+4&7];if(e){var o=e.words,s=o[0],a=o[1],h=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),f=h>>>16|4294901760&l,u=l<<16|65535&h;n[0]^=h,n[1]^=f,n[2]^=l,n[3]^=u,n[4]^=h,n[5]^=f,n[6]^=l,n[7]^=u;for(r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(t,e){var r=this._X;c.call(this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)n[i]=16711935&(n[i]<<8|n[i]>>>24)|4278255360&(n[i]<<24|n[i]>>>8),t[e+i]^=n[i]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,r=0;r<8;r++)o[r]=e[r];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0;for(r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,a=i>>>16,c=((n*n>>>17)+n*a>>>15)+a*a,h=((4294901760&i)*i|0)+((65535&i)*i|0);s[r]=c^h}t[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,t[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,t[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,t[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,t[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,t[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,t[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,t[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.Rabbit=e._createHelper(a)}(),i.mode.CTR=function(){var t=i.lib.BlockCipherMode.extend(),e=t.Encryptor=t.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,o=this._counter;n&&(o=this._counter=n.slice(0),this._iv=void 0);var s=o.slice(0);r.encryptBlock(s,0),o[i-1]=o[i-1]+1|0;for(var a=0;a<i;a++)t[e+a]^=s[a]}});return t.Decryptor=e,t}(),function(){var t=i,e=t.lib.StreamCipher,r=t.algo,n=[],o=[],s=[],a=r.RabbitLegacy=e.extend({_doReset:function(){var t=this._key.words,e=this.cfg.iv,r=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var n=0;n<4;n++)c.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(e){var o=e.words,s=o[0],a=o[1],h=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),f=h>>>16|4294901760&l,u=l<<16|65535&h;i[0]^=h,i[1]^=f,i[2]^=l,i[3]^=u,i[4]^=h,i[5]^=f,i[6]^=l,i[7]^=u;for(n=0;n<4;n++)c.call(this)}},_doProcessBlock:function(t,e){var r=this._X;c.call(this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)n[i]=16711935&(n[i]<<8|n[i]>>>24)|4278255360&(n[i]<<24|n[i]>>>8),t[e+i]^=n[i]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,r=0;r<8;r++)o[r]=e[r];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0;for(r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,a=i>>>16,c=((n*n>>>17)+n*a>>>15)+a*a,h=((4294901760&i)*i|0)+((65535&i)*i|0);s[r]=c^h}t[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,t[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,t[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,t[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,t[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,t[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,t[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,t[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.RabbitLegacy=e._createHelper(a)}(),i.pad.ZeroPadding={pad:function(t,e){var r=4*e;t.clamp(),t.sigBytes+=r-(t.sigBytes%r||r)},unpad:function(t){for(var e=t.words,r=t.sigBytes-1;!(e[r>>>2]>>>24-r%4*8&255);)r--;t.sigBytes=r+1}},"function"!=typeof ArrayBuffer)return i;var n=i.lib.WordArray,o=n.init;return(n.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var e=t.byteLength,r=[],i=0;i<e;i++)r[i>>>2]|=t[i]<<24-i%4*8;o.call(this,r,e)}else o.apply(this,arguments)}).prototype=n,i};exports.default=getCryptoJs();
i.mode.CTRGladman=function(){var t=i.lib.BlockCipherMode.extend();function e(t){if(255==(t>>24&255)){var e=t>>16&255,r=t>>8&255,i=255&t;255===e?(e=0,255===r?(r=0,255===i?i=0:++i):++r):++e,t=0,t+=e<<16,t+=r<<8,t+=i}else t+=1<<24;return t}var r=t.Encryptor=t.extend({processBlock:function(t,r){var i=this._cipher,n=i.blockSize,o=this._iv,s=this._counter;o&&(s=this._counter=o.slice(0),this._iv=void 0),function(t){0===(t[0]=e(t[0]))&&(t[1]=e(t[1]))}(s);var a=s.slice(0);i.encryptBlock(a,0);for(var c=0;c<n;c++)t[r+c]^=a[c]}});return t.Decryptor=r,t}(),function(){var t=i,e=t.lib.StreamCipher,r=t.algo,n=[],o=[],s=[],a=r.Rabbit=e.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,r=0;r<4;r++)t[r]=16711935&(t[r]<<8|t[r]>>>24)|4278255360&(t[r]<<24|t[r]>>>8);var i=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(r=0;r<4;r++)c.call(this);for(r=0;r<8;r++)n[r]^=i[r+4&7];if(e){var o=e.words,s=o[0],a=o[1],h=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),f=h>>>16|4294901760&l,u=l<<16|65535&h;n[0]^=h,n[1]^=f,n[2]^=l,n[3]^=u,n[4]^=h,n[5]^=f,n[6]^=l,n[7]^=u;for(r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(t,e){var r=this._X;c.call(this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)n[i]=16711935&(n[i]<<8|n[i]>>>24)|4278255360&(n[i]<<24|n[i]>>>8),t[e+i]^=n[i]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,r=0;r<8;r++)o[r]=e[r];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0;for(r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,a=i>>>16,c=((n*n>>>17)+n*a>>>15)+a*a,h=((4294901760&i)*i|0)+((65535&i)*i|0);s[r]=c^h}t[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,t[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,t[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,t[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,t[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,t[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,t[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,t[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.Rabbit=e._createHelper(a)}(),i.mode.CTR=function(){var t=i.lib.BlockCipherMode.extend(),e=t.Encryptor=t.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,o=this._counter;n&&(o=this._counter=n.slice(0),this._iv=void 0);var s=o.slice(0);r.encryptBlock(s,0),o[i-1]=o[i-1]+1|0;for(var a=0;a<i;a++)t[e+a]^=s[a]}});return t.Decryptor=e,t}(),function(){var t=i,e=t.lib.StreamCipher,r=t.algo,n=[],o=[],s=[],a=r.RabbitLegacy=e.extend({_doReset:function(){var t=this._key.words,e=this.cfg.iv,r=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var n=0;n<4;n++)c.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(e){var o=e.words,s=o[0],a=o[1],h=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),f=h>>>16|4294901760&l,u=l<<16|65535&h;i[0]^=h,i[1]^=f,i[2]^=l,i[3]^=u,i[4]^=h,i[5]^=f,i[6]^=l,i[7]^=u;for(n=0;n<4;n++)c.call(this)}},_doProcessBlock:function(t,e){var r=this._X;c.call(this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)n[i]=16711935&(n[i]<<8|n[i]>>>24)|4278255360&(n[i]<<24|n[i]>>>8),t[e+i]^=n[i]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,r=0;r<8;r++)o[r]=e[r];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0;for(r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,a=i>>>16,c=((n*n>>>17)+n*a>>>15)+a*a,h=((4294901760&i)*i|0)+((65535&i)*i|0);s[r]=c^h}t[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,t[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,t[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,t[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,t[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,t[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,t[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,t[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.RabbitLegacy=e._createHelper(a)}(),i.pad.ZeroPadding={pad:function(t,e){var r=4*e;t.clamp(),t.sigBytes+=r-(t.sigBytes%r||r)},unpad:function(t){for(var e=t.words,r=t.sigBytes-1;!(e[r>>>2]>>>24-r%4*8&255);)r--;t.sigBytes=r+1}},"function"!=typeof ArrayBuffer)return i;var n=i.lib.WordArray,o=n.init,s=n.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var e=t.byteLength,r=[],i=0;i<e;i++)r[i>>>2]|=t[i]<<24-i%4*8;o.call(this,r,e)}else o.apply(this,arguments)};return s.prototype=n,i};exports.default=getCryptoJs();
//# sourceMappingURL=crypto-js.js.map

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.hexToArrayBuffer=exports.arrayBufferToHexStringArray=exports.hexToStr=exports.tryCallHandler=exports.isObject=exports.isEmpty=exports.isArray=exports.getType=exports.fetchAllList=exports.jsonp2json=exports.cutoffLong=exports.showModal=exports.hasModalShow=exports.isPlainObject=exports.getErrorMsg=exports.noop=exports.genPromise=exports.delay=exports.appendParams=void 0;var tslib_1=require("tslib"),constants_1=require("../constants"),logger_1=require("./logger");function genPromise(){var r,t;return{promise:new Promise((function(e,o){r=e,t=o})),resolve:r,reject:t}}function cutoffLong(r,t,e,o){void 0===t&&(t=4096),void 0===e&&(e=10),void 0===o&&(o=20);try{return function r(t,e,n){return t?"string"==typeof t&&t.length>e?t.substr(0,e)+"... ("+(t.length-e)+" characters truncated)":Array.isArray(t)?t.length>n?t.slice(0,n).map((function(t){return r(t,e,n)})).concat("... ("+(t.length-n)+" items truncated)"):t:"object"==typeof t?Object.keys(t).reduce((function(s,i,a,c){return a<o?s[i]=r(t[i],e,n):a===o&&(s[c.length-o+" keys truncated"]=1),s}),{}):t:t}(r,t,e)}catch(t){return logger_1.logger.debug("cutoffLong fail",t),r}}function jsonp2json(r){var t=r.indexOf("("),e={};if(t>-1)try{"'"===(r=r.substring(t+1,r.length-1))[0]&&"'"===r[r.length-1]&&(r=r.substring(1,r.length-1)),e=JSON.parse(r)}catch(r){console.error(r)}return e}function fetchAllList(r){return tslib_1.__awaiter(this,void 0,void 0,(function(){var t,e,o,n,s;return tslib_1.__generator(this,(function(i){switch(i.label){case 0:t=100,e=0,o=100,n=[],i.label=1;case 1:return 0===e||n.length<o?[4,r({offset:e,limit:t})]:[3,3];case 2:return(s=i.sent()).list.length?(o=s.total,e+=t,n=n.concat(s.list),[3,1]):[2,n];case 3:return[2,n]}}))}))}exports.appendParams=function(r,t){void 0===t&&(t={});var e=[];return Object.keys(t).forEach((function(r){var o=t[r];if(void 0!==o){if(exports.isPlainObject(o))try{o=JSON.stringify(o)}catch(r){}e.push(r+"="+encodeURIComponent(o))}})),e.length?(r.indexOf("?")>-1?r+"&":r+"?")+e.join("&"):r},exports.delay=function(r){return new Promise((function(t){return setTimeout(t,r)}))},exports.genPromise=genPromise,exports.noop=function(){},exports.getErrorMsg=function(r){if(r){var t="";return"string"==typeof r?r:(t=r.msg||r.Message||r.message||r.errMsg||"连接服务器失败,请稍后再试",r.reqId&&(t+="("+r.reqId+")"),t||(t="连接服务器失败,请稍后再试"),t)}},exports.isPlainObject=function(r){if("object"!=(void 0===r?"undefined":typeof r)||null===r)return!1;for(var t=r;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t},exports.hasModalShow=!1,exports.showModal=function(r,t,e){void 0===t&&(t="");var o=e.confirmText,n=void 0===o?"确定":o,s=e.confirmColor,i=void 0===s?constants_1.themeColorMap.primary:s,a=e.cancelText,c=void 0===a?"取消":a,f=e.cancelColor,u=void 0===f?constants_1.themeColorMap.weak:f,l=tslib_1.__rest(e,["confirmText","confirmColor","cancelText","cancelColor"]);return wx.hideToast(),exports.hasModalShow=!0,new Promise((function(e){wx.showModal(tslib_1.__assign(tslib_1.__assign({title:r,content:t,confirmText:n,confirmColor:i,cancelColor:u,cancelText:c},l),{success:function(r){var t=r.confirm;e(!!t)},fail:function(){e(!1)},complete:function(){exports.hasModalShow=!1}}))}))},exports.cutoffLong=cutoffLong,exports.jsonp2json=jsonp2json,exports.fetchAllList=fetchAllList;var matchTypeReg=/^\[object\s(\w+)\]$/;function getType(r){var t=Object.prototype.toString.call(r).toLowerCase().match(matchTypeReg);return t?t[1]:"unknown"}function isArray(r){return"array"===getType(r)}function isEmpty(r){if(!r)return!0;if(Array.isArray(r))return 0===r.length;for(var t in r)return!1;return!0}function isObject(r){var t=typeof r;return("function"===t||"object"===t)&&!!r}function hexToStr(r){var t,e=String(r).trim(),o="0x"===e.substr(0,2).toLowerCase()?e.substr(2):e,n=o.length;if(n%2!=0)throw"Illegal Format ASCII Code";for(var s=[],i=0;i<n;i+=2)t=parseInt(o.substr(i,2),16),s.push(String.fromCharCode(t));return s.join("")}function arrayBufferToHexStringArray(r){try{if(Array.isArray(r)&&r.every((function(r){return"string"==typeof r})))return r;if("string"==typeof r){var t=[""];return r.split("").forEach((function(r,e){t[t.length-1]+=r,e%2&&t.push("")})),t.splice(t.length-1,1),t}if("[object ArrayBuffer]"!==Object.prototype.toString.call(r))throw"invalid array buffer";for(var e=new DataView(r),o=[],n=0,s=e.byteLength;n<s;n++){var i=(255&e.getUint8(n)).toString(16);i=1===i.length?"0"+i:i,o.push(i.toUpperCase())}return o}catch(r){return console.error("arrayBufferToHexStringArray error",r),[]}}function hexToArrayBuffer(r){return new Uint8Array(r.match(/[\da-f]{2}/gi).map((function(r){return parseInt(r,16)}))).buffer}exports.getType=getType,exports.isArray=isArray,exports.isEmpty=isEmpty,exports.isObject=isObject,exports.tryCallHandler=function(r,t){for(var e=[],o=2;o<arguments.length;o++)e[o-2]=arguments[o];"function"==typeof r["_"+t+"Handler"]&&r["_"+t+"Handler"].apply(r,tslib_1.__spread(e))},exports.hexToStr=hexToStr,exports.arrayBufferToHexStringArray=arrayBufferToHexStringArray,exports.hexToArrayBuffer=hexToArrayBuffer;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.hexToArrayBuffer=exports.arrayBufferToHexStringArray=exports.hexToStr=exports.tryCallHandler=exports.isObject=exports.isEmpty=exports.isArray=exports.getType=exports.fetchAllList=exports.jsonp2json=exports.cutoffLong=exports.showModal=exports.hasModalShow=exports.isPlainObject=exports.getErrorMsg=exports.noop=exports.genPromise=exports.delay=exports.appendParams=void 0;var tslib_1=require("tslib"),constants_1=require("../constants"),logger_1=require("./logger");function genPromise(){var r,t;return{promise:new Promise((function(e,o){r=e,t=o})),resolve:r,reject:t}}function cutoffLong(r,t,e,o){void 0===t&&(t=4096),void 0===e&&(e=10),void 0===o&&(o=20);try{function n(r,t,e){return r?"string"==typeof r&&r.length>t?r.substr(0,t)+"... ("+(r.length-t)+" characters truncated)":Array.isArray(r)?r.length>e?r.slice(0,e).map((function(r){return n(r,t,e)})).concat("... ("+(r.length-e)+" items truncated)"):r:"object"==typeof r?Object.keys(r).reduce((function(s,i,a,c){return a<o?s[i]=n(r[i],t,e):a===o&&(s[c.length-o+" keys truncated"]=1),s}),{}):r:r}return n(r,t,e)}catch(t){return logger_1.logger.debug("cutoffLong fail",t),r}}function jsonp2json(r){var t=r.indexOf("("),e={};if(t>-1)try{"'"===(r=r.substring(t+1,r.length-1))[0]&&"'"===r[r.length-1]&&(r=r.substring(1,r.length-1)),e=JSON.parse(r)}catch(r){console.error(r)}return e}function fetchAllList(r){return tslib_1.__awaiter(this,void 0,void 0,(function(){var t,e,o,n,s;return tslib_1.__generator(this,(function(i){switch(i.label){case 0:t=100,e=0,o=100,n=[],i.label=1;case 1:return 0===e||n.length<o?[4,r({offset:e,limit:t})]:[3,3];case 2:return(s=i.sent()).list.length?(o=s.total,e+=t,n=n.concat(s.list),[3,1]):[2,n];case 3:return[2,n]}}))}))}exports.appendParams=function(r,t){void 0===t&&(t={});var e=[];return Object.keys(t).forEach((function(r){var o=t[r];if(void 0!==o){if(exports.isPlainObject(o))try{o=JSON.stringify(o)}catch(r){}e.push(r+"="+encodeURIComponent(o))}})),e.length?(r.indexOf("?")>-1?r+"&":r+"?")+e.join("&"):r},exports.delay=function(r){return new Promise((function(t){return setTimeout(t,r)}))},exports.genPromise=genPromise,exports.noop=function(){},exports.getErrorMsg=function(r){if(r){var t="";return"string"==typeof r?r:(t=r.msg||r.Message||r.message||r.errMsg||"连接服务器失败,请稍后再试",r.reqId&&(t+="("+r.reqId+")"),t||(t="连接服务器失败,请稍后再试"),t)}},exports.isPlainObject=function(r){if("object"!=(void 0===r?"undefined":typeof r)||null===r)return!1;for(var t=r;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t},exports.hasModalShow=!1,exports.showModal=function(r,t,e){void 0===t&&(t="");var o=e.confirmText,n=void 0===o?"确定":o,s=e.confirmColor,i=void 0===s?constants_1.themeColorMap.primary:s,a=e.cancelText,c=void 0===a?"取消":a,f=e.cancelColor,u=void 0===f?constants_1.themeColorMap.weak:f,l=tslib_1.__rest(e,["confirmText","confirmColor","cancelText","cancelColor"]);return wx.hideToast(),exports.hasModalShow=!0,new Promise((function(e){wx.showModal(tslib_1.__assign(tslib_1.__assign({title:r,content:t,confirmText:n,confirmColor:i,cancelColor:u,cancelText:c},l),{success:function(r){var t=r.confirm;e(!!t)},fail:function(){e(!1)},complete:function(){exports.hasModalShow=!1}}))}))},exports.cutoffLong=cutoffLong,exports.jsonp2json=jsonp2json,exports.fetchAllList=fetchAllList;var matchTypeReg=/^\[object\s(\w+)\]$/;function getType(r){var t=Object.prototype.toString.call(r).toLowerCase().match(matchTypeReg);return t?t[1]:"unknown"}function isArray(r){return"array"===getType(r)}function isEmpty(r){if(!r)return!0;if(Array.isArray(r))return 0===r.length;for(var t in r)return!1;return!0}function isObject(r){var t=typeof r;return("function"===t||"object"===t)&&!!r}function hexToStr(r){var t,e=String(r).trim(),o="0x"===e.substr(0,2).toLowerCase()?e.substr(2):e,n=o.length;if(n%2!=0)throw"Illegal Format ASCII Code";for(var s=[],i=0;i<n;i+=2)t=parseInt(o.substr(i,2),16),s.push(String.fromCharCode(t));return s.join("")}function arrayBufferToHexStringArray(r){try{if(Array.isArray(r)&&r.every((function(r){return"string"==typeof r})))return r;if("string"==typeof r){var t=[""];return r.split("").forEach((function(r,e){t[t.length-1]+=r,e%2&&t.push("")})),t.splice(t.length-1,1),t}if("[object ArrayBuffer]"!==Object.prototype.toString.call(r))throw"invalid array buffer";for(var e=new DataView(r),o=[],n=0,s=e.byteLength;n<s;n++){var i=(255&e.getUint8(n)).toString(16);i=1===i.length?"0"+i:i,o.push(i.toUpperCase())}return o}catch(r){return console.error("arrayBufferToHexStringArray error",r),[]}}function hexToArrayBuffer(r){return new Uint8Array(r.match(/[\da-f]{2}/gi).map((function(r){return parseInt(r,16)}))).buffer}exports.getType=getType,exports.isArray=isArray,exports.isEmpty=isEmpty,exports.isObject=isObject,exports.tryCallHandler=function(r,t){for(var e=[],o=2;o<arguments.length;o++)e[o-2]=arguments[o];"function"==typeof r["_"+t+"Handler"]&&r["_"+t+"Handler"].apply(r,tslib_1.__spread(e))},exports.hexToStr=hexToStr,exports.arrayBufferToHexStringArray=arrayBufferToHexStringArray,exports.hexToArrayBuffer=hexToArrayBuffer;
//# sourceMappingURL=utillib.js.map
{
"name": "qcloud-iotexplorer-appdev-sdk",
"version": "1.9.2",
"version": "1.9.4",
"description": "",

@@ -17,3 +17,3 @@ "main": "lib/index.js",

"dependencies": {
"event-emitter-for-miniprogram": "^0.8.2",
"event-emitter-for-miniprogram": "^0.8.4",
"js-base64": "^3.2.4",

@@ -27,3 +27,3 @@ "query-string": "^6.9.0",

},
"gitHead": "902a3ca640cb46524c3f7a1e9f66897db59be629"
"gitHead": "f906e1b31dc7039d72c1f73b498e7a2ea465522f"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc