fyers-api-v3 1.0.3 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  const WebSocket = require('ws');
2
- 'use strict';const a0_0x513120=a0_0x50a4;(function(_0x234e8f,_0x22e7fe){const _0x40e3c2=a0_0x50a4,_0xe292a2=_0x234e8f();while(!![]){try{const _0x4bf1d3=-parseInt(_0x40e3c2(0x157))/0x1*(parseInt(_0x40e3c2(0x209))/0x2)+-parseInt(_0x40e3c2(0x1a7))/0x3+parseInt(_0x40e3c2(0x214))/0x4+-parseInt(_0x40e3c2(0x268))/0x5*(-parseInt(_0x40e3c2(0x15c))/0x6)+parseInt(_0x40e3c2(0x1aa))/0x7*(-parseInt(_0x40e3c2(0x1f3))/0x8)+-parseInt(_0x40e3c2(0x220))/0x9*(parseInt(_0x40e3c2(0x1eb))/0xa)+parseInt(_0x40e3c2(0x1fe))/0xb;if(_0x4bf1d3===_0x22e7fe)break;else _0xe292a2['push'](_0xe292a2['shift']());}catch(_0x51d037){_0xe292a2['push'](_0xe292a2['shift']());}}}(a0_0x516e,0xeb215));class Constants{constructor(){}}Constants[a0_0x513120(0x18f)]=a0_0x513120(0x289),Constants[a0_0x513120(0x232)]=!![],Constants[a0_0x513120(0x17c)]=![],Constants[a0_0x513120(0x25a)]=![],Constants[a0_0x513120(0x25f)]=0x1f4,Constants[a0_0x513120(0x24d)]=-0x80000000,Constants[a0_0x513120(0x1d0)]=!![],Constants[a0_0x513120(0x200)]=0x1,Constants[a0_0x513120(0x1dc)]=0x1;class Log{constructor(){}static[a0_0x513120(0x1a5)](_0x22dccd){const _0x400e0e=a0_0x513120;if(Constants[_0x400e0e(0x17c)])console[_0x400e0e(0x1fb)](_0x22dccd);}static['hsiDebug'](_0x3d23a6){const _0x46da17=a0_0x513120;if(Constants[_0x46da17(0x25a)])console[_0x46da17(0x1fb)](_0x3d23a6);}}var RESPONSE_KEYS;(function(_0x502404){const _0x5ec33c=a0_0x513120;_0x502404[_0x5ec33c(0x172)]=_0x5ec33c(0x29e),_0x502404[_0x5ec33c(0x237)]=_0x5ec33c(0x203),_0x502404['MSG']=_0x5ec33c(0x259),_0x502404['STAT_CODE']='stCode',_0x502404[_0x5ec33c(0x22d)]=_0x5ec33c(0x1dd);}(RESPONSE_KEYS||(RESPONSE_KEYS={})));function a0_0x516e(){const _0x29d249=['redis','INDEX_LITE_FCOUNT','streamDataConfig','VWAP','UPDATE','nameLen:','getTypeFromString','Acknowledgement\x20sent\x20for\x20message\x20num:\x20','subscription\x20failed','CLOSE','connect','heartBeatInterval','prepareData','FULL','CHPAUSE_TYPE','hsiWs','50kcXzit','CLOSE_INDEX','s121','sendJsonArrResp','tSymbol','ACK_TYPE','prepareConnectionRequest2','inWS','8qBfZEU','DEPTH_UNSUBS','NOT_OK','SCRIP_SUBS','LONG','precision','appendByteArray','INDEX','log','setMultiplierAndPrec','WebSocket\x20not\x20initialized!','28334724dqAbCF','getScripByteArray','SCRIP_LITE_FCOUNT','error','mode','type','dps','CHANNEL_NUM','updatedFieldsArray','CONN','fcount1:\x20','2059410YOITRx','STRING','hsiDebug','\x0aScrip::','DATE','OPC_KEY','LOG','depth','counter','f101','updates\x20......','5700320VqrjiH','task',',\x20WasClean:','SOURCE','buf2Long','getFloat32','getStringFieldsJson','TYPE::\x20','Processing\x20dynamic\x20mapping....','LOW_STK','pow','Topic\x20Not\x20Available\x20in\x20TopicList!','1184310SzmoMb','isCalled','THROTTLING_TYPE','PERCHANGE','getOpChainSubsRequest','wasClean','onmessage','SNAPSHOT_FAILED','isConnected','createMapingsMap','Connect...','appendLongAsBigInt','index_lite','STREAM_DATA_CONFIG','clear','DEFAULT_HEARTBEAT_INTERVAL','appendByte','Invalid\x20Request\x20!','isSingleLib','test','stringify','pingRequest','close','TYPE','INDEX_UNSUBS','leadingZero','TURNOVER_INDEX','DATA_TYPE','scrips','OPC_SUBSCRIBE','prepareChannelRequest','LTP_INDEX','CHANGE','ConvNumber','getHours','HIGH_STK','key','CONNECTION_FAILED','binaryType','s113','sub','interval','STR','SNAP','channelnums','TRASH_VAL','onMessage','dpu','prepareConnectionRequest','multiplier','SNAPSHOT','FLOAT32','PCHANGE','get','s105','parse','VOLUME_INDEX','msg','HSI_LOG_Flag','highstk','setStringValues','STK_PRC','invalid\x20field\x20count','MAX_SCRIPS','prepareSubsUnSubsRequest','i103','parseData','\x0aIndex::','push','OPC_SUBS','prepareConnectionRequestOld','SNAP_IF','75785RSgHkZ','pingFunction','split','hsWS','TURNOVER','f104','intervalId','CHANNELP_FAILED','LITE_FULL','SUBSCRIPTION_FAILED','Invalid\x20connection\x20mode\x20!','INDEX_SUBS','topicList','Number','fld','charCodeAt','heartBeatIntervalInMS','SUBS','scrip','ifu','hfid','fields','SNAP_DP','FORCE_CONNECTION','concat','symbol','isScripOK','\x0aDepth::','dataType','PER_CHANGE_INDEX','appendInt','X_ACCESS_TOKEN','CHANGE_INDEX','5.1.0-ls','USER_ID','MSG','Maximum\x20scrips\x20allowed\x20per\x20request\x20is\x20','setLongValues','indexOf','SUBSCRIBE_TYPE','getStatus','DEPTH_SUBS','set','UNSUBSCRIPTION_FAILED','UNSUBS','snap','scrip_lite','NOT_AVL','getInstance','appendChar','buf2String','CONNECTION_TYPE','s104','Invalid\x20conn\x20mode\x20!','stat','arraybuffer','1jgorCa','fid','VWAP_INDEX','CHANNELR','getSeconds','342hmzsiH','url','NotOk','LITE','onError::MSG:','ackNum','ifsp','mappingArray','utf-8','CHANNELR_FAILED','HSI\x20WebSocket\x20not\x20initialized!','fcn','CONNECTION_INVALID','onerror','INVD_FLD_COUNT','SCRIP','assign','forEach','feedType','SUCCESS','prec:\x20','f102','STATUS','SCRIPS','user','strJson','startPingInterval','precisionValue','toFixed','CHANNEL_NUMS','length','getFormatDate2','HSM_LOG_Flag','dpsp','SESSION_ID','UNSUBSCRIBE_TYPE','opc','SCRIP_UNSUBS','stkprc','send','prepareJson','appendShort','getDate','exchange','stopHearBeat','reason','Unable\x20to\x20send\x20request\x20!,\x20Reason:\x20Connection\x20faulty\x20or\x20request\x20not\x20valid\x20!','getKey','onClose','Invalid\x20topic\x20feed\x20type\x20!','JWT','LIB_VERSION','getPosition','getBytes',',\x20Reason:','onOpen','FAILED','onError','index','timestamp','Error:\x20Channel\x20values\x20must\x20be\x20in\x20this\x20range\x20\x20[\x20val\x20>\x200\x20&&\x20val\x20<\x2065\x20]','strVal:\x20','liteFCount','f103','SNAP_MW','SID','keys',',\x20val:','ACK:\x20','CHRESUME_TYPE','CHANNEL_PAUSE','ifs','_instance','hsmDebug','JS_API','5541492Boereq','AUTORIZATION','appendString','2569007oxguhE','i102','hsParser','multi:\x20','VOLUME','details','OPC','prepareThrottlingIntervalRequest','x-access-token','LTP','data','mws','SUCCESSFUL','index:','THROTTLING_INTERVAL','blob','slice','setSeconds','sessionid','reqData','successful','pos','DEPTH','getNewTopicData','CHANNELP','onclose','CONNECTION','Authorization\x20mode\x20is\x20enabled:\x20Authorization\x20or\x20Sid\x20not\x20found\x20!','str','CHANNEL_RESUME','^(0{1}[1-9]|[12][0-9]|3[01])/(0{1}[1-9]|1[012])/20\x5cd{2}$','message','unsubscription\x20\x20failed','getAcknowledgementReq','topicName:\x20','toString','f105','prepareLiteChannelRequest','STREAM_DATA_ENABLED','getMinutes','prepareSnapshotRequest','decode','getFormatDate','substring','fieldDataArray','STAT_CODE','channelnum','ful','source'];a0_0x516e=function(){return _0x29d249;};return a0_0x516e();}var RESPONSE_VALUES;(function(_0x912ab3){const _0xa688ae=a0_0x513120;_0x912ab3[_0xa688ae(0x1b6)]=_0xa688ae(0x1be),_0x912ab3[_0xa688ae(0x194)]='failed',_0x912ab3[_0xa688ae(0x16a)]=_0xa688ae(0x25e),_0x912ab3[_0xa688ae(0x297)]='--';}(RESPONSE_VALUES||(RESPONSE_VALUES={})));var CHANNEL_DATA_MODE;(function(_0x136268){const _0x212f95=a0_0x513120;_0x136268[_0x136268['LITE']=0x4c]=_0x212f95(0x15f),_0x136268[_0x136268[_0x212f95(0x1e8)]=0x46]='FULL';}(CHANNEL_DATA_MODE||(CHANNEL_DATA_MODE={})));var ResponseTypes;(function(_0x425825){const _0x269b12=a0_0x513120;_0x425825[_0x425825[_0x269b12(0x24b)]=0x53]='SNAP',_0x425825[_0x425825['UPDATE']=0x55]=_0x269b12(0x1df),_0x425825[_0x425825['LITE']=0x4c]=_0x269b12(0x15f);}(ResponseTypes||(ResponseTypes={})));var BinRespStat;(function(_0x26a406){const _0x1f3d69=a0_0x513120;_0x26a406['OK']='K',_0x26a406[_0x1f3d69(0x1f5)]='N';}(BinRespStat||(BinRespStat={})));var STAT;(function(_0x228c79){const _0x1cd7f3=a0_0x513120;_0x228c79['OK']='Ok',_0x228c79['NOT_OK']=_0x1cd7f3(0x15e);}(STAT||(STAT={})));function a0_0x50a4(_0x5c94d7,_0x2a8523){const _0x516e9a=a0_0x516e();return a0_0x50a4=function(_0x50a44e,_0x527fe7){_0x50a44e=_0x50a44e-0x156;let _0x24e7dd=_0x516e9a[_0x50a44e];return _0x24e7dd;},a0_0x50a4(_0x5c94d7,_0x2a8523);}var TopicTypes;(function(_0x575120){const _0x2dbb8f=a0_0x513120;_0x575120[_0x2dbb8f(0x16b)]='sf',_0x575120['INDEX']='if',_0x575120[_0x2dbb8f(0x1c0)]='dp';}(TopicTypes||(TopicTypes={})));var Keys;(function(_0x343d65){const _0x3f7a77=a0_0x513120;_0x343d65[_0x3f7a77(0x237)]=_0x3f7a77(0x203),_0x343d65[_0x3f7a77(0x28a)]=_0x3f7a77(0x174),_0x343d65[_0x3f7a77(0x17e)]=_0x3f7a77(0x1bc),_0x343d65[_0x3f7a77(0x173)]=_0x3f7a77(0x23c),_0x343d65[_0x3f7a77(0x205)]=_0x3f7a77(0x1d8),_0x343d65[_0x3f7a77(0x179)]=_0x3f7a77(0x24c),_0x343d65[_0x3f7a77(0x18e)]='jwt',_0x343d65['REDIS_KEY']=_0x3f7a77(0x1db),_0x343d65[_0x3f7a77(0x25d)]=_0x3f7a77(0x182),_0x343d65[_0x3f7a77(0x243)]=_0x3f7a77(0x25b),_0x343d65[_0x3f7a77(0x21d)]='lowstk',_0x343d65['OPC_KEY']=_0x3f7a77(0x244),_0x343d65['AUTORIZATION']='Authorization',_0x343d65['SID']='Sid',_0x343d65[_0x3f7a77(0x287)]=_0x3f7a77(0x1b2),_0x343d65[_0x3f7a77(0x217)]=_0x3f7a77(0x1da);}(Keys||(Keys={})));var ReqTypeValues;(function(_0x318f82){const _0x456fbf=a0_0x513120;_0x318f82[_0x456fbf(0x1c4)]='cn',_0x318f82['SCRIP_SUBS']=_0x456fbf(0x1b5),_0x318f82[_0x456fbf(0x181)]='mwu',_0x318f82['INDEX_SUBS']=_0x456fbf(0x1a3),_0x318f82[_0x456fbf(0x238)]=_0x456fbf(0x27b),_0x318f82[_0x456fbf(0x291)]=_0x456fbf(0x204),_0x318f82['DEPTH_UNSUBS']=_0x456fbf(0x24f),_0x318f82[_0x456fbf(0x1c7)]='cr',_0x318f82[_0x456fbf(0x1a2)]='cp',_0x318f82['SNAP_MW']='mwsp',_0x318f82['SNAP_DP']=_0x456fbf(0x17d),_0x318f82[_0x456fbf(0x267)]=_0x456fbf(0x162),_0x318f82[_0x456fbf(0x265)]=_0x456fbf(0x180),_0x318f82[_0x456fbf(0x15f)]='lit',_0x318f82[_0x456fbf(0x1e8)]=_0x456fbf(0x1d9),_0x318f82[_0x456fbf(0x1b8)]='ti',_0x318f82[_0x456fbf(0x24a)]=_0x456fbf(0x1c6),_0x318f82[_0x456fbf(0x27f)]=_0x456fbf(0x167),_0x318f82['LOG']=_0x456fbf(0x1fb);}(ReqTypeValues||(ReqTypeValues={})));var RespTypeValues;(function(_0x483b80){const _0x51ed18=a0_0x513120;_0x483b80['CONN']='cn',_0x483b80[_0x51ed18(0x279)]=_0x51ed18(0x248),_0x483b80[_0x51ed18(0x294)]='unsub',_0x483b80[_0x51ed18(0x24b)]=_0x51ed18(0x295),_0x483b80['CHANNELR']='cr',_0x483b80['CHANNELP']='cp',_0x483b80['OPC']=_0x51ed18(0x180),_0x483b80[_0x51ed18(0x15f)]='lit',_0x483b80[_0x51ed18(0x1e8)]=_0x51ed18(0x1d9);}(RespTypeValues||(RespTypeValues={})));var BinRespTypes;(function(_0x5e8fda){const _0x1699eb=a0_0x513120;_0x5e8fda[_0x5e8fda['CONNECTION_TYPE']=0x1]=_0x1699eb(0x29b),_0x5e8fda[_0x5e8fda[_0x1699eb(0x222)]=0x2]='THROTTLING_TYPE',_0x5e8fda[_0x5e8fda[_0x1699eb(0x1f0)]=0x3]=_0x1699eb(0x1f0),_0x5e8fda[_0x5e8fda[_0x1699eb(0x28f)]=0x4]=_0x1699eb(0x28f),_0x5e8fda[_0x5e8fda[_0x1699eb(0x17f)]=0x5]=_0x1699eb(0x17f),_0x5e8fda[_0x5e8fda['DATA_TYPE']=0x6]=_0x1699eb(0x23b),_0x5e8fda[_0x5e8fda[_0x1699eb(0x1e9)]=0x7]=_0x1699eb(0x1e9),_0x5e8fda[_0x5e8fda[_0x1699eb(0x1a1)]=0x8]=_0x1699eb(0x1a1),_0x5e8fda[_0x5e8fda[_0x1699eb(0x252)]=0x9]='SNAPSHOT',_0x5e8fda[_0x5e8fda['OPC_SUBSCRIBE']=0xa]=_0x1699eb(0x23d),_0x5e8fda[_0x5e8fda['LITE_FULL']=0xc]='LITE_FULL';}(BinRespTypes||(BinRespTypes={})));var RespCodes;(function(_0x4d4ce0){const _0x35578f=a0_0x513120;_0x4d4ce0[_0x4d4ce0[_0x35578f(0x16f)]=0xc8]='SUCCESS',_0x4d4ce0[_0x4d4ce0[_0x35578f(0x245)]=0x2af9]='CONNECTION_FAILED',_0x4d4ce0[_0x4d4ce0['CONNECTION_INVALID']=0x2afa]=_0x35578f(0x168),_0x4d4ce0[_0x4d4ce0[_0x35578f(0x271)]=0x2b03]='SUBSCRIPTION_FAILED',_0x4d4ce0[_0x4d4ce0[_0x35578f(0x293)]=0x2b04]=_0x35578f(0x293),_0x4d4ce0[_0x4d4ce0[_0x35578f(0x227)]=0x2b05]=_0x35578f(0x227),_0x4d4ce0[_0x4d4ce0[_0x35578f(0x26f)]=0x2b17]=_0x35578f(0x26f),_0x4d4ce0[_0x4d4ce0[_0x35578f(0x165)]=0x2b18]=_0x35578f(0x165);}(RespCodes||(RespCodes={})));var PREFIX;(function(_0x4a2035){const _0x271a4a=a0_0x513120;_0x4a2035[_0x271a4a(0x1c0)]='dp',_0x4a2035[_0x271a4a(0x16b)]='sf',_0x4a2035[_0x271a4a(0x1fa)]='if';}(PREFIX||(PREFIX={})));var SCRIPFID_MAP;(function(_0x37061f){const _0x1caf7d=a0_0x513120;_0x37061f[_0x1caf7d(0x240)]=_0x1caf7d(0x212),_0x37061f[_0x1caf7d(0x254)]=_0x1caf7d(0x171),_0x37061f['TURNOVER']=_0x1caf7d(0x19b),_0x37061f[_0x1caf7d(0x1ae)]=_0x1caf7d(0x29c),_0x37061f[_0x1caf7d(0x1b3)]=_0x1caf7d(0x256),_0x37061f[_0x1caf7d(0x1e4)]=_0x1caf7d(0x1ed),_0x37061f['VWAP']=_0x1caf7d(0x247);}(SCRIPFID_MAP||(SCRIPFID_MAP={})));var FieldTypes;(function(_0x60849d){const _0x5d74a0=a0_0x513120;_0x60849d[_0x60849d['FLOAT32']=0x0]=_0x5d74a0(0x253),_0x60849d[_0x60849d['LONG']=0x1]=_0x5d74a0(0x1f7),_0x60849d[_0x60849d[_0x5d74a0(0x20d)]=0x2]=_0x5d74a0(0x20d),_0x60849d[_0x60849d[_0x5d74a0(0x20a)]=0x3]=_0x5d74a0(0x20a);}(FieldTypes||(FieldTypes={})));var INDEXFID_MAP;(function(_0x2e9c51){const _0x2f5c37=a0_0x513120;_0x2e9c51[_0x2f5c37(0x1b3)]=_0x2f5c37(0x1ab),_0x2e9c51['CLOSE']=_0x2f5c37(0x261),_0x2e9c51['CHANGE']=_0x2f5c37(0x26d),_0x2e9c51['PCHANGE']=_0x2f5c37(0x1ce);}(INDEXFID_MAP||(INDEXFID_MAP={})));var SCRIP_INDEX;(function(_0xa67146){const _0x367124=a0_0x513120;_0xa67146[_0xa67146[_0x367124(0x1ae)]=0x1]=_0x367124(0x1ae),_0xa67146[_0xa67146[_0x367124(0x1b3)]=0x0]=_0x367124(0x1b3),_0xa67146[_0xa67146[_0x367124(0x1e4)]=0x14]='CLOSE',_0xa67146[_0xa67146[_0x367124(0x1de)]=0xb]='VWAP',_0xa67146[_0xa67146[_0x367124(0x240)]=0x15]=_0x367124(0x240),_0xa67146[_0xa67146['PERCHANGE']=0x16]='PERCHANGE',_0xa67146[_0xa67146[_0x367124(0x26c)]=0x17]=_0x367124(0x26c);}(SCRIP_INDEX||(SCRIP_INDEX={})));var INDEX_INDEX;(function(_0x2accc6){const _0x435fe0=a0_0x513120;_0x2accc6[_0x2accc6[_0x435fe0(0x1b3)]=0x0]='LTP',_0x2accc6[_0x2accc6['CLOSE']=0x1]=_0x435fe0(0x1e4),_0x2accc6[_0x2accc6[_0x435fe0(0x240)]=0x6]='CHANGE',_0x2accc6[_0x2accc6[_0x435fe0(0x223)]=0x7]='PERCHANGE';}(INDEX_INDEX||(INDEX_INDEX={})));class ByteBuilder{constructor(_0x18da08){this['data']=new Uint8Array(_0x18da08),this['pos']=0x2;}[a0_0x513120(0x22e)](){const _0x1939b8=a0_0x513120;this[_0x1939b8(0x1bf)]=0x0;}[a0_0x513120(0x190)](){return this['pos'];}[a0_0x513120(0x191)](){const _0x35225e=a0_0x513120;let _0x392a2b=this[_0x35225e(0x1bf)]-0x2;return this[_0x35225e(0x1b4)][0x0]=_0x392a2b>>0x8&0xff,this['data'][0x1]=_0x392a2b&0xff,this[_0x35225e(0x1b4)];}[a0_0x513120(0x230)](_0x342d35,_0x2aac9a){const _0x361c49=a0_0x513120;_0x2aac9a==undefined?this[_0x361c49(0x1b4)][this[_0x361c49(0x1bf)]++]=_0x342d35:this[_0x361c49(0x1b4)][_0x2aac9a]=_0x342d35;}[a0_0x513120(0x299)](_0x1c532f,_0x39b2f1){const _0x7bf49f=a0_0x513120;_0x39b2f1==undefined?this[_0x7bf49f(0x1b4)][this[_0x7bf49f(0x1bf)]++]=_0x1c532f:this['data'][_0x39b2f1]=_0x1c532f;}['appendShort'](_0x20bcc4){const _0x3e01a6=a0_0x513120;this[_0x3e01a6(0x1b4)][this[_0x3e01a6(0x1bf)]++]=_0x20bcc4>>0x8&0xff,this['data'][this[_0x3e01a6(0x1bf)]++]=_0x20bcc4&0xff;}[a0_0x513120(0x286)](_0x453819){const _0x4a36a8=a0_0x513120;this['data'][this[_0x4a36a8(0x1bf)]++]=_0x453819>>0x18&0xff,this[_0x4a36a8(0x1b4)][this[_0x4a36a8(0x1bf)]++]=_0x453819>>0x10&0xff,this[_0x4a36a8(0x1b4)][this[_0x4a36a8(0x1bf)]++]=_0x453819>>0x8&0xff,this[_0x4a36a8(0x1b4)][this[_0x4a36a8(0x1bf)]++]=_0x453819&0xff;}['appendLong'](_0x2287f6){const _0x44912d=a0_0x513120;this['data'][this[_0x44912d(0x1bf)]++]=_0x2287f6>>0x38&0xff,this['data'][this[_0x44912d(0x1bf)]++]=_0x2287f6>>0x30&0xff,this['data'][this['pos']++]=_0x2287f6>>0x28&0xff,this[_0x44912d(0x1b4)][this[_0x44912d(0x1bf)]++]=_0x2287f6>>0x20&0xff,this[_0x44912d(0x1b4)][this[_0x44912d(0x1bf)]++]=_0x2287f6>>0x18&0xff,this['data'][this[_0x44912d(0x1bf)]++]=_0x2287f6>>0x10&0xff,this[_0x44912d(0x1b4)][this[_0x44912d(0x1bf)]++]=_0x2287f6>>0x8&0xff,this['data'][this['pos']++]=_0x2287f6&0xff;}['appendLongAsBigInt'](_0xaf55da){const _0x27b29a=a0_0x513120,_0x77d8d8=BigInt(_0xaf55da);this[_0x27b29a(0x1b4)][this[_0x27b29a(0x1bf)]++]=Number(_0x77d8d8>>BigInt(0x38)&BigInt(0xff)),this[_0x27b29a(0x1b4)][this['pos']++]=Number(_0x77d8d8>>BigInt(0x30)&BigInt(0xff)),this[_0x27b29a(0x1b4)][this[_0x27b29a(0x1bf)]++]=Number(_0x77d8d8>>BigInt(0x28)&BigInt(0xff)),this[_0x27b29a(0x1b4)][this[_0x27b29a(0x1bf)]++]=Number(_0x77d8d8>>BigInt(0x20)&BigInt(0xff)),this['data'][this[_0x27b29a(0x1bf)]++]=Number(_0x77d8d8>>BigInt(0x18)&BigInt(0xff)),this[_0x27b29a(0x1b4)][this['pos']++]=Number(_0x77d8d8>>BigInt(0x10)&BigInt(0xff)),this['data'][this[_0x27b29a(0x1bf)]++]=Number(_0x77d8d8>>BigInt(0x8)&BigInt(0xff)),this[_0x27b29a(0x1b4)][this[_0x27b29a(0x1bf)]++]=Number(_0x77d8d8&BigInt(0xff));}[a0_0x513120(0x1a9)](_0xec8712){const _0xb2f620=a0_0x513120;for(let _0x24340=0x0;_0x24340<_0xec8712[_0xb2f620(0x17a)];_0x24340++)this['data'][this[_0xb2f620(0x1bf)]++]=_0xec8712[_0xb2f620(0x277)](_0x24340);}[a0_0x513120(0x1f9)](_0x4f9fc8,_0x1dda98){const _0x383f99=a0_0x513120;let _0x6176e6=_0x1dda98==undefined?_0x4f9fc8[_0x383f99(0x17a)]:_0x1dda98;for(let _0x37af36=0x0;_0x37af36<_0x6176e6;_0x37af36++)this[_0x383f99(0x1b4)][this[_0x383f99(0x1bf)]++]=_0x4f9fc8[_0x37af36];}}class FieldData{constructor(_0x11e1c8,_0x391ccf,_0x2ff12a,_0x275ac0){const _0x4c4fd9=a0_0x513120;this['fId']=_0x11e1c8,this[_0x4c4fd9(0x244)]=_0x391ccf,this[_0x4c4fd9(0x203)]=_0x2ff12a,this['desc']=_0x275ac0;}}class TopicData{constructor(_0x4d599d){const _0x107964=a0_0x513120;this[_0x107964(0x251)]=0x1,this[_0x107964(0x1f8)]=0x2,this['precisionValue']=0x64,this[_0x107964(0x1d6)]=new Array(),this[_0x107964(0x206)]=new Array(),this[_0x107964(0x19a)]=-0x1,this['feedType']=_0x4d599d;}[a0_0x513120(0x18b)](){const _0x25c584=a0_0x513120;return this[_0x25c584(0x187)][_0x25c584(0x280)]('|',this['symbol']);}[a0_0x513120(0x28d)](_0x41ed32,_0x2f8865){const _0x2a4d87=a0_0x513120;this[_0x2a4d87(0x1d6)][_0x41ed32]!=_0x2f8865&&_0x2f8865!=Constants[_0x2a4d87(0x24d)]&&(this['fieldDataArray'][_0x41ed32]=_0x2f8865,this[_0x2a4d87(0x206)][_0x41ed32]=!![]);}[a0_0x513120(0x1fc)](_0x19fe9e,_0x435144){const _0x4a41e0=a0_0x513120;this[_0x4a41e0(0x1f8)]=_0x435144,this[_0x4a41e0(0x177)]=Math[_0x4a41e0(0x21e)](0xa,_0x435144),this[_0x4a41e0(0x251)]=_0x19fe9e;}['clearFieldDataArray'](){const _0x2e23cb=a0_0x513120;this[_0x2e23cb(0x1d6)][_0x2e23cb(0x17a)]=this[_0x2e23cb(0x206)][_0x2e23cb(0x17a)]=0x0;}['setStringValues'](_0x3065ff,_0x27f48e){const _0x412cac=a0_0x513120;switch(_0x3065ff){case 0x0:this['exchange']=_0x27f48e;break;case 0x1:this[_0x412cac(0x281)]=_0x27f48e;break;case 0x2:this[_0x412cac(0x1ef)]=_0x27f48e;break;}}[a0_0x513120(0x21a)](){const _0x5ef8d9=a0_0x513120;if(!this[_0x5ef8d9(0x175)])return this[_0x5ef8d9(0x175)]={'name':this[_0x5ef8d9(0x16e)],'tk':this[_0x5ef8d9(0x281)],'e':this[_0x5ef8d9(0x187)]},Object[_0x5ef8d9(0x16c)]({'ts':this[_0x5ef8d9(0x1ef)]},this['strJson']);return this[_0x5ef8d9(0x175)];}[a0_0x513120(0x184)](_0x58745d){const _0x58da91=a0_0x513120,_0x8a1416={};for(let _0x1f3c77=0x0;_0x1f3c77<_0x58745d['length'];_0x1f3c77++){let _0x4bd819=_0x58745d[_0x1f3c77],_0x341b15=this[_0x58da91(0x1d6)][_0x1f3c77];if(this['updatedFieldsArray'][_0x1f3c77]&&_0x341b15!=undefined&&_0x4bd819){if(_0x4bd819[_0x58da91(0x203)]==FieldTypes[_0x58da91(0x253)])_0x341b15=(_0x341b15/(this[_0x58da91(0x251)]*this[_0x58da91(0x177)]))[_0x58da91(0x178)](this[_0x58da91(0x1f8)]);else _0x4bd819['type']==FieldTypes[_0x58da91(0x20d)]&&(_0x341b15=Util['getFormatDate'](_0x341b15));Log['hsmDebug'](_0x1f3c77+':'+_0x4bd819['key']+':'+_0x341b15['toString']()),_0x8a1416[_0x4bd819[_0x58da91(0x244)]]=_0x341b15[_0x58da91(0x1cd)]();}}return this[_0x58da91(0x206)]=[],Object[_0x58da91(0x19e)](_0x8a1416)[_0x58da91(0x17a)]>0x0?Object[_0x58da91(0x16c)](_0x8a1416,this[_0x58da91(0x21a)]()):![];}}class ScripTopicData extends TopicData{constructor(){const _0x121a20=a0_0x513120;super(TopicTypes[_0x121a20(0x16b)]);}['prepareData'](){const _0x421391=a0_0x513120;if(this[_0x421391(0x206)][ScripTopicData[_0x421391(0x23f)]]||this[_0x421391(0x206)][ScripTopicData['CLOSE_INDEX']]){let _0x5bbed4=this['fieldDataArray'][ScripTopicData[_0x421391(0x23f)]],_0x57e5bc=this['fieldDataArray'][ScripTopicData[_0x421391(0x1ec)]];if(_0x5bbed4!=undefined&&_0x57e5bc!=undefined){let _0x15a044=_0x5bbed4-_0x57e5bc;this['fieldDataArray'][ScripTopicData[_0x421391(0x288)]]=_0x15a044,this['updatedFieldsArray'][ScripTopicData[_0x421391(0x288)]]=!![],this[_0x421391(0x1d6)][ScripTopicData[_0x421391(0x285)]]=+(_0x15a044/_0x57e5bc*0x64)[_0x421391(0x178)](this['precision']),this[_0x421391(0x206)][ScripTopicData[_0x421391(0x285)]]=!![];}}if(this['updatedFieldsArray'][ScripTopicData[_0x421391(0x258)]]||this[_0x421391(0x206)][ScripTopicData[_0x421391(0x159)]]){let _0x5c0e69=this[_0x421391(0x1d6)][ScripTopicData[_0x421391(0x258)]],_0x5f4563=this[_0x421391(0x1d6)][ScripTopicData[_0x421391(0x159)]];_0x5c0e69!=undefined&&_0x5f4563!=undefined&&(this[_0x421391(0x1d6)][ScripTopicData[_0x421391(0x23a)]]=_0x5c0e69*_0x5f4563,this[_0x421391(0x206)][ScripTopicData['TURNOVER_INDEX']]=!![]);}return Log[_0x421391(0x1a5)](_0x421391(0x20c)+this[_0x421391(0x16e)]+'|'+this['exchange']+'|'+this[_0x421391(0x281)]),super[_0x421391(0x184)](ScripTopicData['mappingArray']);}}class IndexTopicData extends TopicData{constructor(){const _0x4ef216=a0_0x513120;super(TopicTypes[_0x4ef216(0x1fa)]);}[a0_0x513120(0x1e7)](){const _0x5ac72a=a0_0x513120;if(this[_0x5ac72a(0x206)][IndexTopicData[_0x5ac72a(0x23f)]]||this[_0x5ac72a(0x206)][IndexTopicData[_0x5ac72a(0x1ec)]]){let _0xe7819d=this['fieldDataArray'][IndexTopicData['LTP_INDEX']],_0x1595c2=this[_0x5ac72a(0x1d6)][IndexTopicData['CLOSE_INDEX']];if(_0xe7819d!=undefined&&_0x1595c2!=undefined){let _0x410e58=_0xe7819d-_0x1595c2;this[_0x5ac72a(0x1d6)][IndexTopicData['CHANGE_INDEX']]=_0x410e58,this[_0x5ac72a(0x206)][IndexTopicData[_0x5ac72a(0x288)]]=!![],this['fieldDataArray'][IndexTopicData[_0x5ac72a(0x285)]]=+(_0x410e58/_0x1595c2*0x64)[_0x5ac72a(0x178)](this[_0x5ac72a(0x1f8)]),this[_0x5ac72a(0x206)][IndexTopicData[_0x5ac72a(0x285)]]=!![];}}return Log[_0x5ac72a(0x1a5)](_0x5ac72a(0x263)+this[_0x5ac72a(0x16e)]+'|'+this[_0x5ac72a(0x187)]+'|'+this[_0x5ac72a(0x281)]),super[_0x5ac72a(0x184)](IndexTopicData[_0x5ac72a(0x163)]);}}class DepthTopicData extends TopicData{constructor(){super(TopicTypes['DEPTH']);}[a0_0x513120(0x1e7)](){const _0x37ba57=a0_0x513120;return Log[_0x37ba57(0x1a5)](_0x37ba57(0x283)+this[_0x37ba57(0x16e)]+'|'+this[_0x37ba57(0x187)]+'|'+this['symbol']),super['prepareJson'](DepthTopicData[_0x37ba57(0x163)]);}}class Util{constructor(){}static[a0_0x513120(0x218)](_0x3221e9){const _0x13f4d9=a0_0x513120;let _0x50ad7b=new Uint8Array(_0x3221e9),_0x53a50f=0x0,_0x861a4=_0x50ad7b[_0x13f4d9(0x17a)];for(let _0x34d2a6=0x0,_0x4045fc=_0x861a4-0x1;_0x34d2a6<_0x861a4;_0x34d2a6++,_0x4045fc--){_0x53a50f+=_0x50ad7b[_0x4045fc]<<_0x34d2a6*0x8;}return _0x53a50f;}static['buf2Float'](_0x2ebc20,_0x2413eb){const _0x16e6ae=a0_0x513120;let _0x3b7736=new DataView(_0x2ebc20,_0x2413eb,0x4);return _0x3b7736[_0x16e6ae(0x219)](0x0);}static[a0_0x513120(0x29a)](_0x5294e2){const _0x4d78aa=a0_0x513120;return new TextDecoder(_0x4d78aa(0x164))[_0x4d78aa(0x1d3)](_0x5294e2);}static[a0_0x513120(0x1d4)](_0x1e0a9c){const _0x177659=a0_0x513120;let _0x4d7000=new Date(_0x1e0a9c*0x3e8),_0x584bfa=Util[_0x177659(0x239)](_0x4d7000['getDate']())+'/'+Util[_0x177659(0x239)](_0x4d7000['getMonth']()+0x1)+'/'+_0x4d7000['getFullYear']()+'\x20'+Util[_0x177659(0x239)](_0x4d7000[_0x177659(0x242)]())+':'+Util[_0x177659(0x239)](_0x4d7000[_0x177659(0x1d1)]())+':'+Util[_0x177659(0x239)](_0x4d7000[_0x177659(0x15b)]());return _0x584bfa;}static[a0_0x513120(0x17b)](_0x327a8c){const _0x4696d7=a0_0x513120;let _0x32faef=new Date(0x7b2,0x0,0x1);_0x32faef[_0x4696d7(0x1bb)](_0x327a8c);let _0x56a9f5=Util['leadingZero'](_0x32faef[_0x4696d7(0x186)]())+'/'+Util[_0x4696d7(0x239)](_0x32faef['getMonth']()+0x1)+'/'+_0x32faef['getFullYear']()+'\x20'+Util[_0x4696d7(0x239)](_0x32faef[_0x4696d7(0x242)]())+':'+Util[_0x4696d7(0x239)](_0x32faef['getMinutes']())+':'+Util[_0x4696d7(0x239)](_0x32faef[_0x4696d7(0x15b)]());return _0x56a9f5;}static[a0_0x513120(0x239)](_0x2b5571){const _0x39db1a=a0_0x513120;return _0x2b5571<0xa?'0'+_0x2b5571[_0x39db1a(0x1cd)]():_0x2b5571[_0x39db1a(0x1cd)]();}static[a0_0x513120(0x282)](_0x384b49){const _0x26ab4c=a0_0x513120;let _0x18c1ee=_0x384b49['split']('&')[_0x26ab4c(0x17a)];if(_0x18c1ee>Constants[_0x26ab4c(0x25f)])return console[_0x26ab4c(0x201)](_0x26ab4c(0x28c)+Constants[_0x26ab4c(0x25f)]),![];return!![];}static['checkDateFormat'](_0x2ec67e){const _0x33bcf5=a0_0x513120;return new RegExp(_0x33bcf5(0x1c8))[_0x33bcf5(0x233)](_0x2ec67e);}}class BinRequest{constructor(){}static['getAcknowledgementReq'](_0x5ecfd7){const _0x27407e=a0_0x513120;let _0x394456=new ByteBuilder(0xb);return _0x394456[_0x27407e(0x230)](BinRespTypes['ACK_TYPE']),_0x394456[_0x27407e(0x230)](0x1),_0x394456[_0x27407e(0x230)](0x1),_0x394456['appendShort'](0x4),_0x394456['appendInt'](_0x5ecfd7),_0x394456[_0x27407e(0x191)]();}static[a0_0x513120(0x266)](_0x35d66c){const _0x4c439d=a0_0x513120;let _0x208dcc=_0x35d66c['length'],_0x5a68f6='JS_API',_0x2efd74=_0x5a68f6['length'],_0x4eb8d4=new ByteBuilder(_0x208dcc+_0x2efd74+0xa);return _0x4eb8d4[_0x4c439d(0x230)](BinRespTypes[_0x4c439d(0x29b)]),_0x4eb8d4[_0x4c439d(0x230)](0x2),_0x4eb8d4[_0x4c439d(0x230)](0x1),_0x4eb8d4[_0x4c439d(0x185)](_0x208dcc),_0x4eb8d4[_0x4c439d(0x1a9)](_0x35d66c),_0x4eb8d4[_0x4c439d(0x230)](0x2),_0x4eb8d4['appendShort'](_0x2efd74),_0x4eb8d4[_0x4c439d(0x1a9)](_0x5a68f6),_0x4eb8d4['getBytes']();}static[a0_0x513120(0x250)](_0x377cc6,_0x318bfe){const _0x4ac162=a0_0x513120;let _0x256d52=_0x377cc6[_0x4ac162(0x17a)],_0x2bdd20=_0x4ac162(0x1a6),_0x49922d=_0x2bdd20[_0x4ac162(0x17a)],_0x558a51=new ByteBuilder(_0x256d52+_0x49922d+0x12);return _0x558a51['appendByte'](BinRespTypes[_0x4ac162(0x29b)]),_0x558a51[_0x4ac162(0x230)](0x4),_0x558a51['appendByte'](0x1),_0x558a51['appendShort'](_0x256d52),_0x558a51[_0x4ac162(0x1a9)](_0x377cc6),_0x558a51[_0x4ac162(0x230)](0x2),_0x558a51[_0x4ac162(0x185)](0x1),_0x558a51[_0x4ac162(0x230)](_0x318bfe[_0x4ac162(0x277)](0x0)),_0x558a51[_0x4ac162(0x230)](0x3),_0x558a51['appendShort'](0x1),_0x558a51[_0x4ac162(0x230)](Constants[_0x4ac162(0x1d0)]?0x1:0x0),_0x558a51['appendByte'](0x4),_0x558a51[_0x4ac162(0x185)](_0x49922d),_0x558a51[_0x4ac162(0x1a9)](_0x2bdd20),_0x558a51['getBytes']();}static[a0_0x513120(0x1f1)](_0x316ba8,_0x5ed4fa){const _0x488200=a0_0x513120;let _0x5d0897=_0x488200(0x1a6),_0x21dd68=_0x5d0897['length'],_0x16a152=_0x316ba8[_0x488200(0x17a)],_0x39fc08=_0x5ed4fa[_0x488200(0x17a)],_0x214158=new ByteBuilder(_0x21dd68+_0x16a152+_0x39fc08+0xd);return _0x214158[_0x488200(0x230)](BinRespTypes[_0x488200(0x29b)]),_0x214158['appendByte'](0x3),_0x214158['appendByte'](0x1),_0x214158['appendShort'](_0x16a152),_0x214158[_0x488200(0x1a9)](_0x316ba8),_0x214158[_0x488200(0x230)](0x2),_0x214158[_0x488200(0x185)](_0x39fc08),_0x214158[_0x488200(0x1a9)](_0x5ed4fa),_0x214158['appendByte'](0x3),_0x214158['appendShort'](_0x21dd68),_0x214158[_0x488200(0x1a9)](_0x5d0897),_0x214158[_0x488200(0x191)]();}static['prepareSubsUnSubsRequest'](_0xc8681c,_0x567174,_0x49d54f,_0x2b7d6c){const _0x29b13c=a0_0x513120;let _0x29a64c=BinRequest['getScripByteArray'](_0xc8681c,_0x49d54f),_0x1823a3=new ByteBuilder(_0x29a64c[_0x29b13c(0x17a)]+0xb);return _0x1823a3[_0x29b13c(0x230)](_0x567174),_0x1823a3[_0x29b13c(0x230)](0x2),_0x1823a3[_0x29b13c(0x230)](0x1),_0x1823a3[_0x29b13c(0x185)](_0x29a64c[_0x29b13c(0x17a)]),_0x1823a3[_0x29b13c(0x1f9)](_0x29a64c,_0x29a64c[_0x29b13c(0x17a)]),_0x1823a3[_0x29b13c(0x230)](0x2),_0x1823a3[_0x29b13c(0x185)](0x1),_0x1823a3['appendByte'](_0x2b7d6c),_0x1823a3[_0x29b13c(0x191)]();}static[a0_0x513120(0x1cf)](_0x294080,_0x32f1c5,_0x40387d){const _0x49cf4b=a0_0x513120;let _0x20fa1b=new ByteBuilder(0x13);_0x20fa1b[_0x49cf4b(0x230)](_0x294080),_0x20fa1b[_0x49cf4b(0x230)](0x2),_0x20fa1b[_0x49cf4b(0x230)](0x1),_0x20fa1b[_0x49cf4b(0x185)](0x8);let _0x48629c=0x0,_0x1087dd=0x0;return _0x40387d['forEach'](function(_0x9b250f){const _0x4916ac=_0x49cf4b;if(_0x9b250f>0x0&&_0x9b250f<=0x20)_0x48629c|=0x1<<_0x9b250f;else{if(_0x9b250f>0x20&&_0x9b250f<=0x40)_0x1087dd|=0x1<<_0x9b250f;else console[_0x4916ac(0x201)](_0x4916ac(0x198));}}),_0x20fa1b[_0x49cf4b(0x286)](_0x1087dd),_0x20fa1b['appendInt'](_0x48629c),_0x20fa1b['appendByte'](0x2),_0x20fa1b[_0x49cf4b(0x185)](0x1),_0x20fa1b['appendByte'](_0x32f1c5),_0x20fa1b['getBytes']();}static[a0_0x513120(0x23e)](_0x576500,_0x611cad){const _0xfa652f=a0_0x513120;let _0x547282=new ByteBuilder(0xf);_0x547282[_0xfa652f(0x230)](_0x576500),_0x547282[_0xfa652f(0x230)](0x1),_0x547282['appendByte'](0x1),_0x547282[_0xfa652f(0x185)](0x8);let _0x4b1380=0x0,_0x362c07=0x0;return _0x611cad[_0xfa652f(0x16d)](function(_0x2b81f3){const _0x5e8061=_0xfa652f;if(_0x2b81f3>0x0&&_0x2b81f3<=0x20)_0x4b1380|=0x1<<_0x2b81f3;else{if(_0x2b81f3>0x20&&_0x2b81f3<=0x40)_0x362c07|=0x1<<_0x2b81f3;else console['error'](_0x5e8061(0x198));}}),_0x547282[_0xfa652f(0x286)](_0x362c07),_0x547282['appendInt'](_0x4b1380),_0x547282['getBytes']();}static['prepareSnapshotRequest'](_0x402d91,_0x23a786,_0x5a1760){const _0x49ef17=a0_0x513120;let _0x2573e1=BinRequest[_0x49ef17(0x1ff)](_0x402d91,_0x5a1760),_0x32ba51=_0x2573e1[_0x49ef17(0x17a)],_0x49de1c=new ByteBuilder(_0x32ba51+0x7);return _0x49de1c[_0x49ef17(0x230)](_0x23a786),_0x49de1c['appendByte'](0x1),_0x49de1c[_0x49ef17(0x230)](0x1),_0x49de1c[_0x49ef17(0x185)](_0x32ba51),_0x49de1c['appendByteArray'](_0x2573e1,_0x32ba51),_0x49de1c[_0x49ef17(0x191)]();}static[a0_0x513120(0x1b1)](_0x42a74a){const _0x5d8abf=a0_0x513120;let _0x237ee8=new ByteBuilder(0xb);return _0x237ee8['appendByte'](BinRespTypes[_0x5d8abf(0x222)]),_0x237ee8[_0x5d8abf(0x230)](0x1),_0x237ee8['appendByte'](0x1),_0x237ee8[_0x5d8abf(0x185)](0x4),_0x237ee8[_0x5d8abf(0x286)](_0x42a74a),_0x237ee8['getBytes']();}static[a0_0x513120(0x1ff)](_0x480c59,_0x152ab5){const _0x1b4d3e=a0_0x513120;if(_0x480c59[_0x1b4d3e(0x277)](_0x480c59[_0x1b4d3e(0x17a)]-0x1)==0x26)_0x480c59=_0x480c59[_0x1b4d3e(0x1d5)](0x0,_0x480c59[_0x1b4d3e(0x17a)]-0x1);let _0x5703f6=_0x480c59[_0x1b4d3e(0x26a)]('&'),_0x5a6740=_0x5703f6[_0x1b4d3e(0x17a)],_0x24b8e6=0x0;for(let _0x2ba2c6=0x0;_0x2ba2c6<_0x5a6740;_0x2ba2c6++){_0x5703f6[_0x2ba2c6]=_0x152ab5+'|'+_0x5703f6[_0x2ba2c6],_0x24b8e6+=_0x5703f6[_0x2ba2c6][_0x1b4d3e(0x17a)]+0x1;}let _0x505a50=new Uint8Array(_0x24b8e6+0x2),_0x147810=0x0;_0x505a50[_0x147810++]=_0x5a6740>>0x8&0xff,_0x505a50[_0x147810++]=_0x5a6740&0xff;for(let _0x37eb9e=0x0;_0x37eb9e<_0x5a6740;_0x37eb9e++){let _0xce4d50=_0x5703f6[_0x37eb9e],_0x2b1395=_0xce4d50[_0x1b4d3e(0x17a)];_0x505a50[_0x147810++]=_0x2b1395&0xff;for(let _0x5cf748=0x0;_0x5cf748<_0x2b1395;_0x5cf748++){_0x505a50[_0x147810++]=_0xce4d50[_0x1b4d3e(0x277)](_0x5cf748);}}return _0x505a50;}static['getOpChainSubsRequest'](_0x43b081,_0x322e82,_0x3b9833,_0x4aa5e3,_0x43baf3){const _0x2cbb6a=a0_0x513120;let _0x38ade8=_0x43b081[_0x2cbb6a(0x17a)],_0x521acf=new ByteBuilder(_0x38ade8+0x1e);return _0x521acf[_0x2cbb6a(0x230)](BinRespTypes[_0x2cbb6a(0x23d)]),_0x521acf['appendByte'](0x5),_0x521acf[_0x2cbb6a(0x230)](0x1),_0x521acf[_0x2cbb6a(0x185)](_0x38ade8),_0x521acf['appendString'](_0x43b081),_0x521acf[_0x2cbb6a(0x230)](0x2),_0x521acf['appendShort'](0x8),_0x521acf[_0x2cbb6a(0x22b)](_0x322e82),_0x521acf['appendByte'](0x3),_0x521acf[_0x2cbb6a(0x185)](0x1),_0x521acf[_0x2cbb6a(0x230)](_0x3b9833),_0x521acf['appendByte'](0x4),_0x521acf[_0x2cbb6a(0x185)](0x1),_0x521acf['appendByte'](_0x4aa5e3),_0x521acf[_0x2cbb6a(0x230)](0x5),_0x521acf[_0x2cbb6a(0x185)](0x1),_0x521acf[_0x2cbb6a(0x230)](_0x43baf3),_0x521acf[_0x2cbb6a(0x191)]();}}BinRequest['pingRequest']=new Uint8Array([0x0,0x1,0xb]);class HSWebSocket{constructor(){const _0x41614c=a0_0x513120;this[_0x41614c(0x15d)]=null,this[_0x41614c(0x26b)]=null,this['hsParser']=null,this[_0x41614c(0x22f)]=0x1e,this[_0x41614c(0x193)]=null,this[_0x41614c(0x18c)]=null,this[_0x41614c(0x24e)]=null,this[_0x41614c(0x195)]=null;}static['getInstance'](){return this['_instance']||(this['_instance']=new HSWebSocket());}[a0_0x513120(0x236)](){const _0x1be68a=a0_0x513120;this['hsWS']&&(this[_0x1be68a(0x26b)][_0x1be68a(0x236)](),this[_0x1be68a(0x26b)]=null);}[a0_0x513120(0x228)](){const _0x25382b=a0_0x513120;return this[_0x25382b(0x1ac)]?this[_0x25382b(0x1ac)]['isConnected']:![];}[a0_0x513120(0x1e5)](_0x19d60d,_0x176a92){const _0x4218f0=a0_0x513120;Log['hsmDebug'](_0x4218f0(0x22a)),this['url']=_0x19d60d;let _0x266742=(_0x176a92?_0x176a92:this[_0x4218f0(0x22f)])*0x3e8;this[_0x4218f0(0x26b)]&&(this[_0x4218f0(0x26b)]['onopen']=function(_0x4446f1){},this[_0x4218f0(0x26b)][_0x4218f0(0x226)]=function(_0x3dff3e){},this[_0x4218f0(0x26b)]['onclose']=function(_0x41228a){},this[_0x4218f0(0x26b)][_0x4218f0(0x169)]=function(_0x4170cd){},this['hsWS'][_0x4218f0(0x236)]());this[_0x4218f0(0x26b)]=new WebSocket(_0x19d60d);if(this[_0x4218f0(0x26b)])this[_0x4218f0(0x26b)][_0x4218f0(0x246)]=_0x4218f0(0x156),this[_0x4218f0(0x1ac)]=new HSParser(this[_0x4218f0(0x26b)],_0x266742);else console['error'](_0x4218f0(0x1fd));this['hsWS']['onopen']=function(){const _0x19c356=_0x4218f0;HSWebSocket[_0x19c356(0x1a4)][_0x19c356(0x1ac)][_0x19c356(0x228)]=!![],Log['hsmDebug']('Open'),HSWebSocket[_0x19c356(0x1a4)][_0x19c356(0x193)]();},this['hsWS']['onmessage']=function(_0x3e8015){const _0x58adca=_0x4218f0;let _0x5e8b95=_0x3e8015[_0x58adca(0x1b4)];if(_0x5e8b95 instanceof ArrayBuffer){let _0x514bb8=HSWebSocket[_0x58adca(0x1a4)][_0x58adca(0x1ac)][_0x58adca(0x262)](_0x5e8b95);if(_0x514bb8)HSWebSocket[_0x58adca(0x1a4)][_0x58adca(0x24e)](JSON[_0x58adca(0x234)](_0x514bb8));}else HSWebSocket[_0x58adca(0x1a4)][_0x58adca(0x24e)](_0x5e8b95);},this['hsWS'][_0x4218f0(0x1c3)]=function(_0x16d1a8){const _0xc4e257=_0x4218f0;HSWebSocket[_0xc4e257(0x1a4)][_0xc4e257(0x1ac)][_0xc4e257(0x228)]=![],Log[_0xc4e257(0x1a5)]('onClose::CloseCode:'+_0x16d1a8['code']+_0xc4e257(0x192)+_0x16d1a8[_0xc4e257(0x189)]+_0xc4e257(0x216)+_0x16d1a8[_0xc4e257(0x225)]);let _0xd1587e=HSWebSocket[_0xc4e257(0x1a4)];_0xd1587e[_0xc4e257(0x18c)]();},this[_0x4218f0(0x26b)][_0x4218f0(0x169)]=function(_0x17f6ce){const _0x497468=_0x4218f0;Log[_0x497468(0x1a5)](_0x497468(0x160)+_0x17f6ce[_0x497468(0x1c9)]),HSWebSocket[_0x497468(0x1a4)]['onError']();};}[a0_0x513120(0x183)](_0x36dce6){const _0x48ad56=a0_0x513120;let _0x3c4afe=JSON[_0x48ad56(0x257)](_0x36dce6);Log[_0x48ad56(0x1a5)](_0x3c4afe);let _0x5720ff=_0x3c4afe[Keys[_0x48ad56(0x237)]],_0x16b6aa=null,_0x4457a8=_0x3c4afe[Keys['SCRIPS']],_0x48d89c=_0x3c4afe[Keys[_0x48ad56(0x205)]],_0xd1dbd6=_0x3c4afe[Keys['CHANNEL_NUMS']];switch(_0x5720ff){case ReqTypeValues[_0x48ad56(0x1c4)]:let _0x21e99a=_0x3c4afe[_0x48ad56(0x202)];if(_0x3c4afe[Keys[_0x48ad56(0x28a)]]!==undefined&&_0x21e99a!==undefined){let _0x38f774=_0x3c4afe[Keys[_0x48ad56(0x28a)]];_0x16b6aa=BinRequest['prepareConnectionRequest'](_0x38f774,_0x21e99a);}else{if(_0x3c4afe[Keys['SESSION_ID']]!==undefined&&_0x21e99a!==undefined){let _0x58ad2e=_0x3c4afe[Keys['SESSION_ID']];_0x16b6aa=BinRequest[_0x48ad56(0x250)](_0x58ad2e,_0x21e99a);}else{if(_0x3c4afe[Keys[_0x48ad56(0x1a8)]]!==undefined){let _0x2d01b0=_0x3c4afe[Keys[_0x48ad56(0x1a8)]],_0x1e6f34=_0x3c4afe[Keys[_0x48ad56(0x19d)]];if(_0x2d01b0&&_0x1e6f34)_0x16b6aa=BinRequest['prepareConnectionRequest2'](_0x2d01b0,_0x1e6f34);else console['error'](_0x48ad56(0x1c5));}else console[_0x48ad56(0x201)](_0x48ad56(0x29d));}}break;case ReqTypeValues[_0x48ad56(0x1f6)]:_0x16b6aa=BinRequest[_0x48ad56(0x260)](_0x4457a8,BinRespTypes[_0x48ad56(0x28f)],PREFIX['SCRIP'],_0x48d89c);break;case ReqTypeValues['SCRIP_UNSUBS']:_0x16b6aa=BinRequest[_0x48ad56(0x260)](_0x4457a8,BinRespTypes[_0x48ad56(0x17f)],PREFIX['SCRIP'],_0x48d89c);break;case ReqTypeValues[_0x48ad56(0x273)]:_0x16b6aa=BinRequest[_0x48ad56(0x260)](_0x4457a8,BinRespTypes['SUBSCRIBE_TYPE'],PREFIX[_0x48ad56(0x1fa)],_0x48d89c);break;case ReqTypeValues[_0x48ad56(0x238)]:_0x16b6aa=BinRequest[_0x48ad56(0x260)](_0x4457a8,BinRespTypes[_0x48ad56(0x17f)],PREFIX[_0x48ad56(0x1fa)],_0x48d89c);break;case ReqTypeValues['DEPTH_SUBS']:_0x16b6aa=BinRequest[_0x48ad56(0x260)](_0x4457a8,BinRespTypes[_0x48ad56(0x28f)],PREFIX[_0x48ad56(0x1c0)],_0x48d89c);break;case ReqTypeValues[_0x48ad56(0x1f4)]:_0x16b6aa=BinRequest[_0x48ad56(0x260)](_0x4457a8,BinRespTypes[_0x48ad56(0x17f)],PREFIX[_0x48ad56(0x1c0)],_0x48d89c);break;case ReqTypeValues[_0x48ad56(0x1a2)]:_0x16b6aa=BinRequest[_0x48ad56(0x23e)](BinRespTypes[_0x48ad56(0x1e9)],_0xd1dbd6);break;case ReqTypeValues['CHANNEL_RESUME']:_0x16b6aa=BinRequest[_0x48ad56(0x23e)](BinRespTypes[_0x48ad56(0x1a1)],_0xd1dbd6);break;case ReqTypeValues[_0x48ad56(0x19c)]:_0x16b6aa=BinRequest[_0x48ad56(0x1d2)](_0x4457a8,BinRespTypes[_0x48ad56(0x252)],PREFIX[_0x48ad56(0x16b)]);break;case ReqTypeValues[_0x48ad56(0x27e)]:_0x16b6aa=BinRequest[_0x48ad56(0x1d2)](_0x4457a8,BinRespTypes[_0x48ad56(0x252)],PREFIX[_0x48ad56(0x1c0)]);break;case ReqTypeValues['SNAP_IF']:_0x16b6aa=BinRequest[_0x48ad56(0x1d2)](_0x4457a8,BinRespTypes[_0x48ad56(0x252)],PREFIX[_0x48ad56(0x1fa)]);break;case ReqTypeValues[_0x48ad56(0x265)]:_0x16b6aa=BinRequest[_0x48ad56(0x224)](_0x3c4afe[Keys[_0x48ad56(0x20e)]],_0x3c4afe[Keys['STK_PRC']],_0x3c4afe[Keys['HIGH_STK']],_0x3c4afe[Keys[_0x48ad56(0x21d)]],_0x48d89c);break;case ReqTypeValues[_0x48ad56(0x20f)]:break;case ReqTypeValues[_0x48ad56(0x15f)]:_0x16b6aa=BinRequest[_0x48ad56(0x1cf)](BinRespTypes[_0x48ad56(0x270)],CHANNEL_DATA_MODE[_0x48ad56(0x15f)],_0xd1dbd6);break;case ReqTypeValues[_0x48ad56(0x1e8)]:_0x16b6aa=BinRequest[_0x48ad56(0x1cf)](BinRespTypes[_0x48ad56(0x270)],CHANNEL_DATA_MODE[_0x48ad56(0x1e8)],_0xd1dbd6);break;case ReqTypeValues[_0x48ad56(0x24a)]:_0x16b6aa=_0x4457a8;break;default:_0x16b6aa=null;break;}if(this[_0x48ad56(0x26b)]&&_0x16b6aa)this['hsWS'][_0x48ad56(0x183)](_0x16b6aa);else console[_0x48ad56(0x201)]('Unable\x20to\x20send\x20request\x20!,\x20Reason:\x20Connection\x20faulty\x20or\x20request\x20not\x20valid\x20!');}}class HSParser{constructor(_0x56eb34,_0x1304da){const _0x47d993=a0_0x513120;this[_0x47d993(0x26b)]=null,this[_0x47d993(0x1f2)]=null,this[_0x47d993(0x274)]=new Array(),this['counter']=0x0,this['ackNum']=0x0,this[_0x47d993(0x26e)]=0x0,this[_0x47d993(0x228)]=![],this['inWS']=_0x56eb34,this[_0x47d993(0x26b)]=HSWebSocket[_0x47d993(0x298)](),this['heartBeatIntervalInMS']=_0x1304da;}[a0_0x513120(0x262)](_0x5ade16){const _0x4b244e=a0_0x513120;let _0x49ecf0=0x0,_0x4d18f7=Util[_0x4b244e(0x218)](_0x5ade16[_0x4b244e(0x1ba)](_0x49ecf0,0x2));Log[_0x4b244e(0x1a5)]('packets.length:\x20'+_0x4d18f7),_0x49ecf0+=0x2;let _0x331130=Util[_0x4b244e(0x218)](_0x5ade16[_0x4b244e(0x1ba)](_0x49ecf0,_0x49ecf0+0x1));_0x49ecf0+=0x1,Log[_0x4b244e(0x1a5)](_0x4b244e(0x21b)+_0x331130);if(_0x331130==BinRespTypes[_0x4b244e(0x29b)]){const _0x1fd6fb={};let _0x6ef903=Util[_0x4b244e(0x218)](_0x5ade16['slice'](_0x49ecf0,_0x49ecf0+0x1));Log[_0x4b244e(0x1a5)]('Conn\x20fCount:'+_0x6ef903),_0x49ecf0+=0x1;let _0x4e7c27=Util[_0x4b244e(0x218)](_0x5ade16['slice'](_0x49ecf0,_0x49ecf0+0x1));_0x49ecf0+=0x1;let _0xff26b8=Util['buf2Long'](_0x5ade16[_0x4b244e(0x1ba)](_0x49ecf0,_0x49ecf0+0x2));_0x49ecf0+=0x2;let _0x5bdf04=Util['buf2String'](_0x5ade16[_0x4b244e(0x1ba)](_0x49ecf0,_0x49ecf0+_0xff26b8));_0x49ecf0+=_0xff26b8;let _0x488d0d=0x0;if(_0x6ef903>=0x2){_0x4e7c27=Util['buf2Long'](_0x5ade16['slice'](_0x49ecf0,_0x49ecf0+0x1)),_0x49ecf0+=0x1,_0xff26b8=Util['buf2Long'](_0x5ade16[_0x4b244e(0x1ba)](_0x49ecf0,_0x49ecf0+0x2)),_0x49ecf0+=0x2,_0x488d0d=Util[_0x4b244e(0x218)](_0x5ade16['slice'](_0x49ecf0,_0x49ecf0+_0xff26b8)),_0x49ecf0+=_0xff26b8;if(_0x6ef903>=0x3){_0x4e7c27=Util[_0x4b244e(0x218)](_0x5ade16[_0x4b244e(0x1ba)](_0x49ecf0,_0x49ecf0+0x1)),_0x49ecf0+=0x1,_0xff26b8=Util[_0x4b244e(0x218)](_0x5ade16[_0x4b244e(0x1ba)](_0x49ecf0,_0x49ecf0+0x2)),_0x49ecf0+=0x2;let _0x2c1b72=JSON[_0x4b244e(0x257)](Util['buf2String'](_0x5ade16['slice'](_0x49ecf0,_0x49ecf0+_0xff26b8)));_0x49ecf0+=_0xff26b8,this[_0x4b244e(0x229)](_0x2c1b72);}Log['hsmDebug'](_0x4b244e(0x1a0)+_0x488d0d);switch(_0x5bdf04){case BinRespStat['OK']:_0x1fd6fb[RESPONSE_KEYS[_0x4b244e(0x172)]]=STAT['OK'],_0x1fd6fb[RESPONSE_KEYS[_0x4b244e(0x237)]]=RespTypeValues[_0x4b244e(0x207)],_0x1fd6fb[RESPONSE_KEYS[_0x4b244e(0x28b)]]=RESPONSE_VALUES['SUCCESSFUL'],_0x1fd6fb[RESPONSE_KEYS['STAT_CODE']]=RespCodes[_0x4b244e(0x16f)],this[_0x4b244e(0x176)]();break;case BinRespStat['NOT_OK']:_0x1fd6fb[RESPONSE_KEYS['STATUS']]=STAT['NOT_OK'],_0x1fd6fb[RESPONSE_KEYS[_0x4b244e(0x237)]]=RespTypeValues[_0x4b244e(0x207)],_0x1fd6fb[RESPONSE_KEYS['MSG']]=RESPONSE_VALUES[_0x4b244e(0x194)],_0x1fd6fb[RESPONSE_KEYS[_0x4b244e(0x1d7)]]=RespCodes['CONNECTION_FAILED'];break;}this[_0x4b244e(0x161)]=_0x488d0d;}else{if(_0x6ef903==0x1)switch(_0x5bdf04){case BinRespStat['OK']:_0x1fd6fb[RESPONSE_KEYS[_0x4b244e(0x172)]]=STAT['OK'],_0x1fd6fb[RESPONSE_KEYS['TYPE']]=RespTypeValues['CONN'],_0x1fd6fb[RESPONSE_KEYS[_0x4b244e(0x28b)]]=RESPONSE_VALUES[_0x4b244e(0x1b6)],_0x1fd6fb[RESPONSE_KEYS['STAT_CODE']]=RespCodes['SUCCESS'],this['startPingInterval']();break;case BinRespStat['NOT_OK']:_0x1fd6fb[RESPONSE_KEYS[_0x4b244e(0x172)]]=STAT[_0x4b244e(0x1f5)],_0x1fd6fb[RESPONSE_KEYS['TYPE']]=RespTypeValues['CONN'],_0x1fd6fb[RESPONSE_KEYS['MSG']]=RESPONSE_VALUES[_0x4b244e(0x194)],_0x1fd6fb[RESPONSE_KEYS[_0x4b244e(0x1d7)]]=RespCodes[_0x4b244e(0x245)];break;}else _0x1fd6fb[RESPONSE_KEYS['STATUS']]=STAT[_0x4b244e(0x1f5)],_0x1fd6fb[RESPONSE_KEYS['TYPE']]=RespTypeValues[_0x4b244e(0x207)],_0x1fd6fb[RESPONSE_KEYS[_0x4b244e(0x28b)]]=RESPONSE_VALUES[_0x4b244e(0x16a)],_0x1fd6fb[RESPONSE_KEYS[_0x4b244e(0x1d7)]]=RespCodes[_0x4b244e(0x168)];}return this['sendJsonArrResp'](_0x1fd6fb);}else{if(_0x331130==BinRespTypes[_0x4b244e(0x23b)]){let _0x433823=0x0;if(this[_0x4b244e(0x161)]>0x0){++this[_0x4b244e(0x211)],_0x433823=Util[_0x4b244e(0x218)](_0x5ade16[_0x4b244e(0x1ba)](_0x49ecf0,_0x49ecf0+0x4)),_0x49ecf0+=0x4;if(this['counter']==this[_0x4b244e(0x161)]){let _0x2a3edb=BinRequest[_0x4b244e(0x1cb)](_0x433823);if(this[_0x4b244e(0x1f2)])this[_0x4b244e(0x1f2)][_0x4b244e(0x183)](_0x2a3edb);Log[_0x4b244e(0x1a5)](_0x4b244e(0x1e2)+_0x433823),this[_0x4b244e(0x211)]=0x0;}}const _0x3b9e8f=[];let _0x225799=Util['buf2Long'](_0x5ade16[_0x4b244e(0x1ba)](_0x49ecf0,_0x49ecf0+0x2));_0x49ecf0+=0x2;for(let _0x71a0f3=0x0;_0x71a0f3<_0x225799;_0x71a0f3++){let _0x548367=Util[_0x4b244e(0x218)](_0x5ade16[_0x4b244e(0x1ba)](_0x49ecf0,_0x49ecf0+0x1));Log[_0x4b244e(0x1a5)]('ResponseType:\x20'+_0x548367),_0x49ecf0++;if(_0x548367==ResponseTypes[_0x4b244e(0x24b)]){let _0x3ad6c5=Util[_0x4b244e(0x218)](_0x5ade16['slice'](_0x49ecf0,_0x49ecf0+0x2));_0x49ecf0+=0x2,Log[_0x4b244e(0x1a5)]('topic\x20Id:\x20'+_0x3ad6c5);let _0x2fee93=Util[_0x4b244e(0x218)](_0x5ade16[_0x4b244e(0x1ba)](_0x49ecf0,_0x49ecf0+0x1));_0x49ecf0++,Log[_0x4b244e(0x1a5)](_0x4b244e(0x1e0)+_0x2fee93);let _0x136c0d=Util[_0x4b244e(0x29a)](_0x5ade16['slice'](_0x49ecf0,_0x49ecf0+_0x2fee93));_0x49ecf0+=_0x2fee93,Log[_0x4b244e(0x1a5)](_0x4b244e(0x1cc)+_0x136c0d);let _0x54bebf=this[_0x4b244e(0x1c1)](_0x136c0d);if(_0x54bebf){this[_0x4b244e(0x274)][_0x3ad6c5]=_0x54bebf;let _0x1e11d4=Util[_0x4b244e(0x218)](_0x5ade16[_0x4b244e(0x1ba)](_0x49ecf0,_0x49ecf0+0x1));_0x49ecf0++,Log[_0x4b244e(0x1a5)](_0x4b244e(0x208)+_0x1e11d4);for(let _0x3e353b=0x0;_0x3e353b<_0x1e11d4;_0x3e353b++){let _0x37427d=Util[_0x4b244e(0x218)](_0x5ade16[_0x4b244e(0x1ba)](_0x49ecf0,_0x49ecf0+0x4));_0x54bebf[_0x4b244e(0x28d)](_0x3e353b,_0x37427d),_0x49ecf0+=0x4,Log[_0x4b244e(0x1a5)](_0x3e353b+':'+_0x37427d);}_0x49ecf0+=0x2;let _0xe04f00=Util['buf2Long'](_0x5ade16[_0x4b244e(0x1ba)](_0x49ecf0,_0x49ecf0+0x2));_0x49ecf0+=0x2,Log[_0x4b244e(0x1a5)](_0x4b244e(0x1ad)+_0xe04f00);let _0x2d3290=Util['buf2Long'](_0x5ade16[_0x4b244e(0x1ba)](_0x49ecf0,_0x49ecf0+0x1));_0x49ecf0++,Log[_0x4b244e(0x1a5)](_0x4b244e(0x170)+_0x2d3290),_0x54bebf[_0x4b244e(0x1fc)](_0xe04f00,_0x2d3290);for(let _0x4b1e1d=0x0;_0x4b1e1d<0x3;_0x4b1e1d++){let _0x466f38=Util[_0x4b244e(0x218)](_0x5ade16['slice'](_0x49ecf0,_0x49ecf0+0x1));_0x49ecf0++;let _0x490dd7=Util[_0x4b244e(0x29a)](_0x5ade16[_0x4b244e(0x1ba)](_0x49ecf0,_0x49ecf0+_0x466f38));_0x49ecf0+=_0x466f38,_0x54bebf[_0x4b244e(0x25c)](_0x4b1e1d,_0x490dd7),Log[_0x4b244e(0x1a5)](_0x4b244e(0x199)+_0x490dd7);}let _0xf32c7b=_0x54bebf[_0x4b244e(0x1e7)]();if(_0xf32c7b)_0x3b9e8f['push'](_0xf32c7b);}else Log['hsmDebug'](_0x4b244e(0x18d));}else{if(_0x548367==ResponseTypes['UPDATE']||_0x548367==ResponseTypes['LITE']){Log['hsmDebug'](_0x4b244e(0x213)+_0x548367);let _0x386b2a=Util['buf2Long'](_0x5ade16[_0x4b244e(0x1ba)](_0x49ecf0,_0x49ecf0+0x2));Log[_0x4b244e(0x1a5)]('topic\x20Id:\x20'+_0x386b2a),_0x49ecf0+=0x2;let _0x3b8506=this['topicList'][_0x386b2a];if(!_0x3b8506)console[_0x4b244e(0x201)](_0x4b244e(0x21f));else{let _0x58ab90;_0x548367!=ResponseTypes[_0x4b244e(0x15f)]?(_0x58ab90=Util['buf2Long'](_0x5ade16['slice'](_0x49ecf0,_0x49ecf0+0x1)),_0x49ecf0++):_0x58ab90=_0x3b8506['liteFCount'];Log[_0x4b244e(0x1a5)](_0x4b244e(0x208)+_0x58ab90);for(let _0x5e24a6=0x0;_0x5e24a6<_0x58ab90;_0x5e24a6++){let _0x35e744=Util[_0x4b244e(0x218)](_0x5ade16[_0x4b244e(0x1ba)](_0x49ecf0,_0x49ecf0+0x4));_0x3b8506[_0x4b244e(0x28d)](_0x5e24a6,_0x35e744),Log['hsmDebug'](_0x4b244e(0x1b7)+_0x5e24a6+_0x4b244e(0x19f)+_0x35e744),_0x49ecf0+=0x4;}}let _0x50a6d4=_0x3b8506[_0x4b244e(0x1e7)]();if(_0x50a6d4)_0x3b9e8f['push'](_0x50a6d4);}else console[_0x4b244e(0x201)]('Invalid\x20ResponseType:\x20'+_0x548367);}}return _0x3b9e8f[_0x4b244e(0x17a)]>0x0?_0x3b9e8f:null;}else{if(_0x331130==BinRespTypes[_0x4b244e(0x28f)]||_0x331130==BinRespTypes[_0x4b244e(0x17f)]){let _0x165b9d=this['getStatus'](_0x5ade16,_0x49ecf0);const _0x53412c={};switch(_0x165b9d){case BinRespStat['OK']:_0x53412c[RESPONSE_KEYS[_0x4b244e(0x172)]]=STAT['OK'],_0x53412c[RESPONSE_KEYS[_0x4b244e(0x237)]]=_0x331130==BinRespTypes[_0x4b244e(0x28f)]?RespTypeValues['SUBS']:RespTypeValues[_0x4b244e(0x294)],_0x53412c[RESPONSE_KEYS[_0x4b244e(0x28b)]]=RESPONSE_VALUES['SUCCESSFUL'],_0x53412c[RESPONSE_KEYS[_0x4b244e(0x1d7)]]=RespCodes[_0x4b244e(0x16f)];break;case BinRespStat[_0x4b244e(0x1f5)]:_0x53412c[RESPONSE_KEYS[_0x4b244e(0x172)]]=STAT[_0x4b244e(0x1f5)];_0x331130==BinRespTypes[_0x4b244e(0x28f)]?(_0x53412c[RESPONSE_KEYS[_0x4b244e(0x237)]]=RespTypeValues['SUBS'],_0x53412c[RESPONSE_KEYS['MSG']]=_0x4b244e(0x1e3),_0x53412c[RESPONSE_KEYS[_0x4b244e(0x1d7)]]=RespCodes[_0x4b244e(0x271)]):(_0x53412c[RESPONSE_KEYS[_0x4b244e(0x237)]]=RespTypeValues[_0x4b244e(0x294)],_0x53412c[RESPONSE_KEYS[_0x4b244e(0x28b)]]=_0x4b244e(0x1ca),_0x53412c[RESPONSE_KEYS[_0x4b244e(0x1d7)]]=RespCodes['UNSUBSCRIPTION_FAILED']);break;}return this[_0x4b244e(0x1ee)](_0x53412c);}else{if(_0x331130==BinRespTypes[_0x4b244e(0x252)]){let _0x1e876f=this[_0x4b244e(0x290)](_0x5ade16,_0x49ecf0);const _0x127d8a={};switch(_0x1e876f){case BinRespStat['OK']:_0x127d8a[RESPONSE_KEYS[_0x4b244e(0x172)]]=STAT['OK'],_0x127d8a[RESPONSE_KEYS[_0x4b244e(0x237)]]=RespTypeValues['SNAP'],_0x127d8a[RESPONSE_KEYS[_0x4b244e(0x28b)]]=RESPONSE_VALUES[_0x4b244e(0x1b6)],_0x127d8a[RESPONSE_KEYS[_0x4b244e(0x1d7)]]=RespCodes['SUCCESS'];break;case BinRespStat['NOT_OK']:_0x127d8a[RESPONSE_KEYS['STATUS']]=STAT[_0x4b244e(0x1f5)],_0x127d8a[RESPONSE_KEYS['TYPE']]=RespTypeValues[_0x4b244e(0x24b)],_0x127d8a[RESPONSE_KEYS[_0x4b244e(0x28b)]]=RESPONSE_VALUES[_0x4b244e(0x194)],_0x127d8a[RESPONSE_KEYS['STAT_CODE']]=RespCodes[_0x4b244e(0x227)];break;}return this[_0x4b244e(0x1ee)](_0x127d8a);}else{if(_0x331130==BinRespTypes[_0x4b244e(0x1e9)]||_0x331130==BinRespTypes['CHRESUME_TYPE']){let _0x375261=this[_0x4b244e(0x290)](_0x5ade16,_0x49ecf0);const _0x3c96cf={};switch(_0x375261){case BinRespStat['OK']:_0x3c96cf[RESPONSE_KEYS[_0x4b244e(0x172)]]=STAT['OK'],_0x3c96cf[RESPONSE_KEYS[_0x4b244e(0x237)]]=_0x331130==BinRespTypes[_0x4b244e(0x1e9)]?RespTypeValues['CHANNELP']:RespTypeValues['CHANNELR'],_0x3c96cf[RESPONSE_KEYS[_0x4b244e(0x28b)]]=RESPONSE_VALUES[_0x4b244e(0x1b6)],_0x3c96cf[RESPONSE_KEYS[_0x4b244e(0x1d7)]]=RespCodes[_0x4b244e(0x16f)];break;case BinRespStat[_0x4b244e(0x1f5)]:_0x3c96cf[RESPONSE_KEYS[_0x4b244e(0x172)]]=STAT[_0x4b244e(0x1f5)],_0x3c96cf[RESPONSE_KEYS['TYPE']]=_0x331130==BinRespTypes['CHPAUSE_TYPE']?RespTypeValues[_0x4b244e(0x1c2)]:RespTypeValues[_0x4b244e(0x15a)],_0x3c96cf[RESPONSE_KEYS['MSG']]=RESPONSE_VALUES[_0x4b244e(0x194)],_0x3c96cf[RESPONSE_KEYS[_0x4b244e(0x1d7)]]=_0x331130==BinRespTypes[_0x4b244e(0x1e9)]?RespCodes[_0x4b244e(0x26f)]:RespCodes[_0x4b244e(0x165)];break;}return this['sendJsonArrResp'](_0x3c96cf);}else{if(_0x331130==BinRespTypes[_0x4b244e(0x23d)]){let _0x32be47=this[_0x4b244e(0x290)](_0x5ade16,_0x49ecf0);_0x49ecf0+=0x5;const _0x4d4956={};switch(_0x32be47){case BinRespStat['OK']:_0x4d4956[RESPONSE_KEYS[_0x4b244e(0x172)]]=STAT['OK'],_0x4d4956[RESPONSE_KEYS[_0x4b244e(0x237)]]=RespTypeValues[_0x4b244e(0x1b0)],_0x4d4956[RESPONSE_KEYS[_0x4b244e(0x28b)]]=RESPONSE_VALUES[_0x4b244e(0x1b6)],_0x4d4956[RESPONSE_KEYS['STAT_CODE']]=RespCodes[_0x4b244e(0x16f)];let _0x4bc3ab=Util[_0x4b244e(0x218)](_0x5ade16[_0x4b244e(0x1ba)](_0x49ecf0,++_0x49ecf0)),_0x5abe89=Util[_0x4b244e(0x218)](_0x5ade16['slice'](_0x49ecf0,_0x49ecf0+0x2));_0x49ecf0+=0x2;let _0x300347=Util['buf2String'](_0x5ade16['slice'](_0x49ecf0,_0x49ecf0+_0x5abe89));_0x49ecf0+=_0x5abe89,_0x4d4956['key']=_0x300347,_0x4bc3ab=Util[_0x4b244e(0x218)](_0x5ade16['slice'](_0x49ecf0,++_0x49ecf0)),_0x5abe89=Util['buf2Long'](_0x5ade16[_0x4b244e(0x1ba)](_0x49ecf0,_0x49ecf0+0x2)),_0x49ecf0+=0x2;let _0x1f31bd=Util[_0x4b244e(0x29a)](_0x5ade16[_0x4b244e(0x1ba)](_0x49ecf0,_0x49ecf0+_0x5abe89));_0x49ecf0+=_0x5abe89,_0x4d4956[_0x4b244e(0x23c)]=JSON['parse'](_0x1f31bd)[_0x4b244e(0x1b4)];break;case BinRespStat[_0x4b244e(0x1f5)]:_0x4d4956[RESPONSE_KEYS['STATUS']]=STAT[_0x4b244e(0x1f5)],_0x4d4956[RESPONSE_KEYS['TYPE']]=RespTypeValues[_0x4b244e(0x1b0)],_0x4d4956[RESPONSE_KEYS[_0x4b244e(0x28b)]]=RESPONSE_VALUES['FAILED'],_0x4d4956[RESPONSE_KEYS['STAT_CODE']]=0x2b20;break;}return this[_0x4b244e(0x1ee)](_0x4d4956);}else{if(_0x331130==BinRespTypes[_0x4b244e(0x270)]){let _0x213aaf=this[_0x4b244e(0x290)](_0x5ade16,_0x49ecf0);const _0x836762={};switch(_0x213aaf){case BinRespStat['OK']:_0x836762[RESPONSE_KEYS[_0x4b244e(0x172)]]=STAT['OK'],_0x836762[RESPONSE_KEYS[_0x4b244e(0x237)]]=_0x331130==BinRespTypes['LITE_FULL']?RespTypeValues[_0x4b244e(0x15f)]:RespTypeValues[_0x4b244e(0x1e8)],_0x836762[RESPONSE_KEYS[_0x4b244e(0x28b)]]=RESPONSE_VALUES[_0x4b244e(0x1b6)],_0x836762[RESPONSE_KEYS['STAT_CODE']]=RespCodes[_0x4b244e(0x16f)];break;case BinRespStat['NOT_OK']:_0x836762[RESPONSE_KEYS[_0x4b244e(0x172)]]=STAT['NOT_OK'],_0x836762[RESPONSE_KEYS['TYPE']]=_0x331130==BinRespTypes[_0x4b244e(0x270)]?RespTypeValues[_0x4b244e(0x15f)]:RespTypeValues['FULL'],_0x836762[RESPONSE_KEYS[_0x4b244e(0x28b)]]=RESPONSE_VALUES['FAILED'],_0x836762[RESPONSE_KEYS[_0x4b244e(0x1d7)]]=0x2ee1;break;}return this['sendJsonArrResp'](_0x836762);}else return null;}}}}}}}[a0_0x513120(0x290)](_0x3c944a,_0x345b48){const _0x556c29=a0_0x513120;let _0x5c4d13=BinRespStat['NOT_OK']['toString'](),_0x49d381=Util[_0x556c29(0x218)](_0x3c944a[_0x556c29(0x1ba)](_0x345b48,++_0x345b48));if(_0x49d381>0x0){let _0x316239=Util[_0x556c29(0x218)](_0x3c944a[_0x556c29(0x1ba)](_0x345b48,++_0x345b48)),_0x3988f3=Util[_0x556c29(0x218)](_0x3c944a[_0x556c29(0x1ba)](_0x345b48,_0x345b48+0x2));_0x345b48+=0x2,_0x5c4d13=Util[_0x556c29(0x29a)](_0x3c944a['slice'](_0x345b48,_0x345b48+_0x3988f3)),_0x345b48+=_0x3988f3;}return _0x5c4d13;}['getNewTopicData'](_0x38f055){const _0x18393b=a0_0x513120;let _0x5e6271=_0x38f055[_0x18393b(0x26a)]('|')[0x0],_0x12538e=null;switch(_0x5e6271){case TopicTypes[_0x18393b(0x16b)]:_0x12538e=new ScripTopicData(),_0x12538e[_0x18393b(0x19a)]=Constants[_0x18393b(0x200)];break;case TopicTypes[_0x18393b(0x1fa)]:_0x12538e=new IndexTopicData(),_0x12538e[_0x18393b(0x19a)]=Constants[_0x18393b(0x1dc)];break;case TopicTypes[_0x18393b(0x1c0)]:_0x12538e=new DepthTopicData();break;}return _0x12538e;}[a0_0x513120(0x229)](_0x4eb1ce){const _0x5a826a=a0_0x513120;if(_0x4eb1ce){Log[_0x5a826a(0x1a5)](_0x5a826a(0x21c)),ScripTopicData[_0x5a826a(0x163)]=new Array(),IndexTopicData[_0x5a826a(0x163)]=new Array(),DepthTopicData[_0x5a826a(0x163)]=new Array();let _0xfc3f0f=new Map();_0x4eb1ce[_0x5a826a(0x27d)][_0x5a826a(0x16d)](function(_0x23ead8){const _0x2cec95=_0x5a826a;_0xfc3f0f[_0x2cec95(0x292)](_0x23ead8[_0x2cec95(0x158)],_0x23ead8);}),Constants['SCRIP_LITE_FCOUNT']=_0x4eb1ce[_0x5a826a(0x296)][_0x5a826a(0x27c)],Constants[_0x5a826a(0x1dc)]=_0x4eb1ce[_0x5a826a(0x22c)]['hfid'],_0x4eb1ce[_0x5a826a(0x27a)][_0x5a826a(0x264)](SCRIPFID_MAP[_0x5a826a(0x240)]),_0x4eb1ce[_0x5a826a(0x27a)]['push'](SCRIPFID_MAP['PCHANGE']),_0x4eb1ce[_0x5a826a(0x27a)]['push'](SCRIPFID_MAP[_0x5a826a(0x26c)]),_0x4eb1ce[_0x5a826a(0x196)]['push'](INDEXFID_MAP[_0x5a826a(0x240)]),_0x4eb1ce[_0x5a826a(0x196)]['push'](INDEXFID_MAP[_0x5a826a(0x254)]),ScripTopicData[_0x5a826a(0x23f)]=_0x4eb1ce[_0x5a826a(0x27a)][_0x5a826a(0x28e)](SCRIPFID_MAP[_0x5a826a(0x1b3)]),ScripTopicData[_0x5a826a(0x258)]=_0x4eb1ce[_0x5a826a(0x27a)][_0x5a826a(0x28e)](SCRIPFID_MAP[_0x5a826a(0x1ae)]),ScripTopicData['VWAP_INDEX']=_0x4eb1ce['scrip']['indexOf'](SCRIPFID_MAP[_0x5a826a(0x1de)]),ScripTopicData['CHANGE_INDEX']=_0x4eb1ce[_0x5a826a(0x27a)][_0x5a826a(0x28e)](SCRIPFID_MAP['CHANGE']),ScripTopicData[_0x5a826a(0x285)]=_0x4eb1ce['scrip'][_0x5a826a(0x28e)](SCRIPFID_MAP['PCHANGE']),ScripTopicData[_0x5a826a(0x1ec)]=_0x4eb1ce[_0x5a826a(0x27a)][_0x5a826a(0x28e)](SCRIPFID_MAP[_0x5a826a(0x1e4)]),ScripTopicData[_0x5a826a(0x23a)]=_0x4eb1ce[_0x5a826a(0x27a)][_0x5a826a(0x28e)](SCRIPFID_MAP['TURNOVER']),IndexTopicData[_0x5a826a(0x23f)]=_0x4eb1ce[_0x5a826a(0x196)][_0x5a826a(0x28e)](INDEXFID_MAP[_0x5a826a(0x1b3)]),IndexTopicData['CLOSE_INDEX']=_0x4eb1ce[_0x5a826a(0x196)][_0x5a826a(0x28e)](INDEXFID_MAP[_0x5a826a(0x1e4)]),IndexTopicData[_0x5a826a(0x288)]=_0x4eb1ce['index'][_0x5a826a(0x28e)](INDEXFID_MAP[_0x5a826a(0x240)]),IndexTopicData['PER_CHANGE_INDEX']=_0x4eb1ce[_0x5a826a(0x196)][_0x5a826a(0x28e)](INDEXFID_MAP[_0x5a826a(0x254)]);let _0x1e59e1=_0x4eb1ce[_0x5a826a(0x27a)];for(let _0x23a020=0x0;_0x23a020<_0x1e59e1[_0x5a826a(0x17a)];_0x23a020++){let _0x19a5d9=_0xfc3f0f['get'](_0x1e59e1[_0x23a020]),_0x11cad0=this[_0x5a826a(0x1e1)](_0x19a5d9[_0x5a826a(0x284)]);ScripTopicData[_0x5a826a(0x163)][_0x23a020]=new FieldData(_0x19a5d9['fid'],_0x19a5d9[_0x5a826a(0x276)],_0x11cad0,_0x19a5d9[_0x5a826a(0x1af)]);}let _0x498057=_0x4eb1ce['index'];for(let _0x4dd7da=0x0;_0x4dd7da<_0x498057['length'];_0x4dd7da++){let _0x4e0c7c=_0xfc3f0f[_0x5a826a(0x255)](_0x498057[_0x4dd7da]),_0x551514=this[_0x5a826a(0x1e1)](_0x4e0c7c[_0x5a826a(0x284)]);IndexTopicData['mappingArray'][_0x4dd7da]=new FieldData(_0x4e0c7c[_0x5a826a(0x158)],_0x4e0c7c['fld'],_0x551514,_0x4e0c7c[_0x5a826a(0x1af)]);}let _0x5ac6f3=_0x4eb1ce[_0x5a826a(0x210)];for(let _0x36a808=0x0;_0x36a808<_0x5ac6f3['length'];_0x36a808++){let _0x32e127=_0xfc3f0f[_0x5a826a(0x255)](_0x5ac6f3[_0x36a808]),_0x2202d8=this[_0x5a826a(0x1e1)](_0x32e127[_0x5a826a(0x284)]);DepthTopicData[_0x5a826a(0x163)][_0x36a808]=new FieldData(_0x32e127[_0x5a826a(0x158)],_0x32e127[_0x5a826a(0x276)],_0x2202d8,_0x32e127[_0x5a826a(0x1af)]);}}else console[_0x5a826a(0x201)]('StreamDataJson\x20having\x20some\x20issue');}[a0_0x513120(0x1e1)](_0x2e2477){const _0x3f54de=a0_0x513120;let _0x39ef94=FieldTypes[_0x3f54de(0x20a)];switch(_0x2e2477){case _0x3f54de(0x241):_0x39ef94=FieldTypes[_0x3f54de(0x253)];break;case _0x3f54de(0x197):_0x39ef94=FieldTypes[_0x3f54de(0x20d)];break;case _0x3f54de(0x275):_0x39ef94=FieldTypes[_0x3f54de(0x1f7)];break;}return _0x39ef94;}['sendJsonArrResp'](_0x1ee53a){const _0x37a9f0=a0_0x513120;let _0x4d0686=[];return _0x4d0686[_0x37a9f0(0x264)](_0x1ee53a),_0x4d0686;}[a0_0x513120(0x176)](){const _0x282188=a0_0x513120;this[_0x282188(0x26e)]=setInterval(this[_0x282188(0x269)],this[_0x282188(0x278)],this);}['pingFunction'](_0x1cd4ce){const _0x4efa32=a0_0x513120;if(_0x1cd4ce[_0x4efa32(0x228)]&&_0x1cd4ce['inWS'])_0x1cd4ce[_0x4efa32(0x1f2)][_0x4efa32(0x183)](BinRequest[_0x4efa32(0x235)]);else{if(_0x1cd4ce['intervalId'])clearInterval(_0x1cd4ce[_0x4efa32(0x26e)]);}}}class HSIWebSocket{constructor(){const _0xecf0be=a0_0x513120;this['isCalled']=!![],this[_0xecf0be(0x22f)]=0x1e;}static[a0_0x513120(0x298)](){const _0x272cb9=a0_0x513120;return this['_instance']||(this[_0x272cb9(0x1a4)]=new HSIWebSocket());}[a0_0x513120(0x236)](){const _0xa46915=a0_0x513120;this[_0xa46915(0x188)](),this[_0xa46915(0x1ea)]['close']();}[a0_0x513120(0x1e5)](_0x7b890b,_0x1b53af){const _0x29c52e=a0_0x513120;this[_0x29c52e(0x15d)]=_0x7b890b,this[_0x29c52e(0x1e6)]=(_0x1b53af?_0x1b53af:this[_0x29c52e(0x22f)])*0x3e8;this[_0x29c52e(0x1ea)]&&(this[_0x29c52e(0x1ea)]['onopen']=function(_0x313316){},this['hsiWs'][_0x29c52e(0x226)]=function(_0x3aa73a){},this[_0x29c52e(0x1ea)]['onclose']=function(_0x2e1657){},this[_0x29c52e(0x1ea)][_0x29c52e(0x169)]=function(_0x12d4fd){},this['hsiWs'][_0x29c52e(0x236)]());this['hsiWs']=new WebSocket(_0x7b890b);if(this['hsiWs'])this[_0x29c52e(0x1ea)][_0x29c52e(0x246)]=_0x29c52e(0x1b9);else console[_0x29c52e(0x201)](_0x29c52e(0x166));this['hsiWs']['onopen']=function(){const _0x2346e1=_0x29c52e;Log[_0x2346e1(0x20b)]('open'),HSIWebSocket[_0x2346e1(0x1a4)][_0x2346e1(0x193)]();},this[_0x29c52e(0x1ea)][_0x29c52e(0x226)]=function(_0x35e0d7){const _0x5d82ca=_0x29c52e;Log['hsiDebug'](_0x35e0d7);let _0xf732f5=_0x35e0d7[_0x5d82ca(0x1b4)],_0x4b815f=JSON[_0x5d82ca(0x257)](_0xf732f5);if(_0x4b815f&&_0x4b815f[_0x5d82ca(0x215)]=='cn'&&_0x4b815f['ak']=='ok'){let _0x1f99c9={'type':'hb'};HSIWebSocket[_0x5d82ca(0x1a4)][_0x5d82ca(0x249)]=setInterval(function(){const _0x2b2795=_0x5d82ca;HSIWebSocket['_instance'][_0x2b2795(0x221)]=!![],HSIWebSocket['_instance'][_0x2b2795(0x1ea)][_0x2b2795(0x183)](JSON[_0x2b2795(0x234)](_0x1f99c9));},_0x1b53af);}Log[_0x5d82ca(0x20b)](_0xf732f5);if(_0xf732f5)HSIWebSocket['_instance'][_0x5d82ca(0x24e)](_0xf732f5);},this[_0x29c52e(0x1ea)][_0x29c52e(0x1c3)]=function(){const _0xfabe85=_0x29c52e;HSIWebSocket['_instance']['stopHearBeat'](),HSIWebSocket['_instance'][_0xfabe85(0x18c)]();},this[_0x29c52e(0x1ea)][_0x29c52e(0x169)]=function(){const _0x1035a8=_0x29c52e;HSIWebSocket[_0x1035a8(0x1a4)]['stopHearBeat'](),HSIWebSocket[_0x1035a8(0x1a4)][_0x1035a8(0x195)]();};}['send'](_0x453fdc){const _0x4d368c=a0_0x513120;let _0x503bf0=JSON[_0x4d368c(0x257)](_0x453fdc);Log[_0x4d368c(0x20b)](_0x503bf0);let _0x54e140=_0x503bf0[_0x4d368c(0x203)],_0x531d7b;if(_0x54e140===ReqTypeValues[_0x4d368c(0x1c4)]){if(_0x503bf0[Keys['AUTORIZATION']]!==undefined&&_0x503bf0[Keys['SID']]!==undefined&&_0x503bf0[Keys['SOURCE']]!==undefined)_0x531d7b={'type':'cn','Authorization':_0x503bf0[Keys[_0x4d368c(0x1a8)]],'Sid':_0x503bf0[Keys[_0x4d368c(0x19d)]],'src':_0x503bf0[Keys[_0x4d368c(0x217)]]},this[_0x4d368c(0x1bd)]=_0x531d7b;else{if(_0x503bf0[Keys[_0x4d368c(0x287)]]!==undefined&&_0x503bf0[Keys['SOURCE']]!==undefined)_0x531d7b={'type':'cn','x-access-token':_0x503bf0[Keys[_0x4d368c(0x287)]],'src':_0x503bf0[Keys['SOURCE']]},this[_0x4d368c(0x1bd)]=_0x531d7b;else console[_0x4d368c(0x201)](_0x4d368c(0x272));}}else{if(_0x54e140===ReqTypeValues[_0x4d368c(0x27f)])this[_0x4d368c(0x1bd)]=this[_0x4d368c(0x1bd)]['type']=_0x4d368c(0x167),_0x531d7b=this[_0x4d368c(0x1bd)];else{if(_0x54e140===ReqTypeValues[_0x4d368c(0x20f)]){}else{if(_0x54e140===ReqTypeValues[_0x4d368c(0x24a)])_0x531d7b=_0x503bf0[_0x4d368c(0x1b4)];else console['error'](_0x4d368c(0x231));}}}if(this[_0x4d368c(0x1ea)]&&_0x531d7b)this[_0x4d368c(0x1ea)][_0x4d368c(0x183)](JSON['stringify'](_0x531d7b));else console[_0x4d368c(0x201)](_0x4d368c(0x18a));}[a0_0x513120(0x188)](){const _0x3bbf61=a0_0x513120;this[_0x3bbf61(0x221)]&&(this[_0x3bbf61(0x221)]=![],this[_0x3bbf61(0x249)]&&clearInterval(this['interval']));}}
2
+
3
+ 'use strict';const a0_0x56c57c=a0_0x44d5;(function(_0x1cd599,_0x48a876){const _0x1cf9c2=a0_0x44d5,_0x144410=_0x1cd599();while(!![]){try{const _0x287573=-parseInt(_0x1cf9c2(0x1af))/0x1+-parseInt(_0x1cf9c2(0xf2))/0x2*(parseInt(_0x1cf9c2(0xf1))/0x3)+-parseInt(_0x1cf9c2(0x1df))/0x4+-parseInt(_0x1cf9c2(0x104))/0x5*(-parseInt(_0x1cf9c2(0x16b))/0x6)+-parseInt(_0x1cf9c2(0x102))/0x7+parseInt(_0x1cf9c2(0x214))/0x8*(-parseInt(_0x1cf9c2(0x227))/0x9)+parseInt(_0x1cf9c2(0x1a1))/0xa;if(_0x287573===_0x48a876)break;else _0x144410['push'](_0x144410['shift']());}catch(_0x50efd7){_0x144410['push'](_0x144410['shift']());}}}(a0_0x106d,0xb3935));class Constants{constructor(){}}Constants[a0_0x56c57c(0x1ee)]=a0_0x56c57c(0x1cf),Constants[a0_0x56c57c(0x15b)]=0x1e,Constants['isSingleLib']=!![],Constants[a0_0x56c57c(0x18f)]=![],Constants[a0_0x56c57c(0x1ad)]=![],Constants[a0_0x56c57c(0xe7)]=0x5dc,Constants[a0_0x56c57c(0xff)]=-0x80000000,Constants[a0_0x56c57c(0x1a7)]=!![],Constants[a0_0x56c57c(0x1c3)]=0x1,Constants['INDEX_LITE_FCOUNT']=0x1;class Log{constructor(){}static[a0_0x56c57c(0x1b4)](_0x445363){const _0x1d6a51=a0_0x56c57c;if(Constants[_0x1d6a51(0x18f)])console[_0x1d6a51(0x14a)](_0x445363);}static[a0_0x56c57c(0x21d)](_0x795e96){const _0x2355b9=a0_0x56c57c;if(Constants[_0x2355b9(0x1ad)])console[_0x2355b9(0x14a)](_0x795e96);}}var RESPONSE_KEYS;(function(_0x426d7b){const _0x5d6afa=a0_0x56c57c;_0x426d7b[_0x5d6afa(0x1b2)]=_0x5d6afa(0x15f),_0x426d7b[_0x5d6afa(0x133)]=_0x5d6afa(0x1dd),_0x426d7b[_0x5d6afa(0xfb)]='msg',_0x426d7b[_0x5d6afa(0x1e1)]=_0x5d6afa(0x17e),_0x426d7b[_0x5d6afa(0x150)]=_0x5d6afa(0x1bb);}(RESPONSE_KEYS||(RESPONSE_KEYS={})));var RESPONSE_VALUES;(function(_0x222b56){const _0x43d5a5=a0_0x56c57c;_0x222b56[_0x43d5a5(0x1d6)]=_0x43d5a5(0x155),_0x222b56['FAILED']=_0x43d5a5(0x12b),_0x222b56[_0x43d5a5(0x225)]=_0x43d5a5(0x15c),_0x222b56[_0x43d5a5(0x12a)]='--';}(RESPONSE_VALUES||(RESPONSE_VALUES={})));var CHANNEL_DATA_MODE;(function(_0x15a332){const _0x106169=a0_0x56c57c;_0x15a332[_0x15a332['LITE']=0x4c]=_0x106169(0x1ec),_0x15a332[_0x15a332[_0x106169(0x1db)]=0x46]=_0x106169(0x1db);}(CHANNEL_DATA_MODE||(CHANNEL_DATA_MODE={})));var ResponseTypes;(function(_0x213309){const _0x23fa6c=a0_0x56c57c;_0x213309[_0x213309[_0x23fa6c(0xfa)]=0x53]=_0x23fa6c(0xfa),_0x213309[_0x213309[_0x23fa6c(0x14c)]=0x55]=_0x23fa6c(0x14c),_0x213309[_0x213309['LITE']=0x4c]=_0x23fa6c(0x1ec);}(ResponseTypes||(ResponseTypes={})));var BinRespStat;(function(_0x440651){_0x440651['OK']='K',_0x440651['NOT_OK']='N';}(BinRespStat||(BinRespStat={})));var STAT;(function(_0x26eb38){const _0x2a0435=a0_0x56c57c;_0x26eb38['OK']='Ok',_0x26eb38[_0x2a0435(0x175)]=_0x2a0435(0x18b);}(STAT||(STAT={})));var TopicTypes;(function(_0x2a55b2){_0x2a55b2['SCRIP']='sf',_0x2a55b2['INDEX']='if',_0x2a55b2['DEPTH']='dp';}(TopicTypes||(TopicTypes={})));var Keys;(function(_0x2a021c){const _0x4c5db5=a0_0x56c57c;_0x2a021c[_0x4c5db5(0x133)]='type',_0x2a021c['USER_ID']='user',_0x2a021c[_0x4c5db5(0x1b7)]=_0x4c5db5(0x1b6),_0x2a021c[_0x4c5db5(0x211)]=_0x4c5db5(0x1ed),_0x2a021c[_0x4c5db5(0x19d)]=_0x4c5db5(0x220),_0x2a021c[_0x4c5db5(0x147)]=_0x4c5db5(0x100),_0x2a021c[_0x4c5db5(0x192)]=_0x4c5db5(0x1ef),_0x2a021c[_0x4c5db5(0x11d)]='redis',_0x2a021c[_0x4c5db5(0x18c)]=_0x4c5db5(0xf0),_0x2a021c[_0x4c5db5(0x156)]=_0x4c5db5(0x1cc),_0x2a021c[_0x4c5db5(0x184)]=_0x4c5db5(0x201),_0x2a021c['OPC_KEY']='key',_0x2a021c[_0x4c5db5(0x1c8)]=_0x4c5db5(0x101),_0x2a021c['SID']='Sid',_0x2a021c[_0x4c5db5(0x19b)]='x-access-token',_0x2a021c[_0x4c5db5(0x20f)]=_0x4c5db5(0x1d5);}(Keys||(Keys={})));var ReqTypeValues;(function(_0x55faee){const _0xa50dbb=a0_0x56c57c;_0x55faee['CONNECTION']='cn',_0x55faee[_0xa50dbb(0xf4)]=_0xa50dbb(0x142),_0x55faee[_0xa50dbb(0x19c)]=_0xa50dbb(0xe3),_0x55faee[_0xa50dbb(0x1e7)]=_0xa50dbb(0x138),_0x55faee[_0xa50dbb(0x20c)]=_0xa50dbb(0x134),_0x55faee[_0xa50dbb(0x204)]=_0xa50dbb(0x210),_0x55faee['DEPTH_UNSUBS']=_0xa50dbb(0x1d4),_0x55faee['CHANNEL_RESUME']='cr',_0x55faee[_0xa50dbb(0x16c)]='cp',_0x55faee['SNAP_MW']=_0xa50dbb(0x10e),_0x55faee[_0xa50dbb(0x11f)]=_0xa50dbb(0x136),_0x55faee[_0xa50dbb(0x1bf)]=_0xa50dbb(0x1c1),_0x55faee[_0xa50dbb(0x216)]=_0xa50dbb(0x122),_0x55faee['LITE']=_0xa50dbb(0x169),_0x55faee[_0xa50dbb(0x1db)]=_0xa50dbb(0x182),_0x55faee[_0xa50dbb(0x13b)]='ti',_0x55faee[_0xa50dbb(0x1f0)]=_0xa50dbb(0xfd),_0x55faee[_0xa50dbb(0x224)]=_0xa50dbb(0x1f9),_0x55faee['LOG']='log';}(ReqTypeValues||(ReqTypeValues={})));var RespTypeValues;(function(_0xac7d25){const _0x25bfe3=a0_0x56c57c;_0xac7d25[_0x25bfe3(0x16f)]='cn',_0xac7d25[_0x25bfe3(0x154)]=_0x25bfe3(0x13e),_0xac7d25[_0x25bfe3(0xf8)]='unsub',_0xac7d25[_0x25bfe3(0xfa)]=_0x25bfe3(0x203),_0xac7d25[_0x25bfe3(0x110)]='cr',_0xac7d25[_0x25bfe3(0xe5)]='cp',_0xac7d25[_0x25bfe3(0x1e8)]=_0x25bfe3(0x122),_0xac7d25[_0x25bfe3(0x1ec)]='lit',_0xac7d25[_0x25bfe3(0x1db)]=_0x25bfe3(0x182);}(RespTypeValues||(RespTypeValues={})));var BinRespTypes;(function(_0x153b2c){const _0x36db24=a0_0x56c57c;_0x153b2c[_0x153b2c['CONNECTION_TYPE']=0x1]=_0x36db24(0x1c0),_0x153b2c[_0x153b2c[_0x36db24(0x222)]=0x2]='THROTTLING_TYPE',_0x153b2c[_0x153b2c[_0x36db24(0x1e4)]=0x3]='ACK_TYPE',_0x153b2c[_0x153b2c[_0x36db24(0xfc)]=0x4]='SUBSCRIBE_TYPE',_0x153b2c[_0x153b2c['UNSUBSCRIBE_TYPE']=0x5]=_0x36db24(0x135),_0x153b2c[_0x153b2c[_0x36db24(0xec)]=0x6]=_0x36db24(0xec),_0x153b2c[_0x153b2c[_0x36db24(0x129)]=0x7]=_0x36db24(0x129),_0x153b2c[_0x153b2c['CHRESUME_TYPE']=0x8]='CHRESUME_TYPE',_0x153b2c[_0x153b2c[_0x36db24(0x173)]=0x9]=_0x36db24(0x173),_0x153b2c[_0x153b2c[_0x36db24(0x195)]=0xa]=_0x36db24(0x195),_0x153b2c[_0x153b2c[_0x36db24(0x20a)]=0xc]='LITE_FULL';}(BinRespTypes||(BinRespTypes={})));var RespCodes;(function(_0x2333f6){const _0x807079=a0_0x56c57c;_0x2333f6[_0x2333f6[_0x807079(0x1d2)]=0xc8]=_0x807079(0x1d2),_0x2333f6[_0x2333f6['CONNECTION_FAILED']=0x2af9]=_0x807079(0x123),_0x2333f6[_0x2333f6[_0x807079(0xea)]=0x2afa]='CONNECTION_INVALID',_0x2333f6[_0x2333f6[_0x807079(0x1a2)]=0x2b03]=_0x807079(0x1a2),_0x2333f6[_0x2333f6[_0x807079(0x181)]=0x2b04]=_0x807079(0x181),_0x2333f6[_0x2333f6['SNAPSHOT_FAILED']=0x2b05]='SNAPSHOT_FAILED',_0x2333f6[_0x2333f6['CHANNELP_FAILED']=0x2b17]='CHANNELP_FAILED',_0x2333f6[_0x2333f6[_0x807079(0x116)]=0x2b18]=_0x807079(0x116);}(RespCodes||(RespCodes={})));var PREFIX;(function(_0x281b16){const _0x83a3f3=a0_0x56c57c;_0x281b16[_0x83a3f3(0x124)]='dp',_0x281b16[_0x83a3f3(0x171)]='sf',_0x281b16[_0x83a3f3(0x228)]='if';}(PREFIX||(PREFIX={})));function a0_0x44d5(_0x35008c,_0x4aa09f){const _0x106dcb=a0_0x106d();return a0_0x44d5=function(_0x44d5a3,_0x5a4abb){_0x44d5a3=_0x44d5a3-0xe3;let _0x1f4f3e=_0x106dcb[_0x44d5a3];return _0x1f4f3e;},a0_0x44d5(_0x35008c,_0x4aa09f);}var SCRIPFID_MAP;(function(_0x55d6b2){const _0x1d06b2=a0_0x56c57c;_0x55d6b2[_0x1d06b2(0xe8)]=_0x1d06b2(0x16a),_0x55d6b2[_0x1d06b2(0x1f7)]=_0x1d06b2(0x10d),_0x55d6b2['TURNOVER']=_0x1d06b2(0x178),_0x55d6b2[_0x1d06b2(0x160)]='s104',_0x55d6b2[_0x1d06b2(0x1a3)]=_0x1d06b2(0x1a6),_0x55d6b2[_0x1d06b2(0x1d0)]=_0x1d06b2(0x157),_0x55d6b2[_0x1d06b2(0x119)]=_0x1d06b2(0x1b0);}(SCRIPFID_MAP||(SCRIPFID_MAP={})));var FieldTypes;(function(_0x16838d){const _0x300e68=a0_0x56c57c;_0x16838d[_0x16838d[_0x300e68(0x106)]=0x0]=_0x300e68(0x106),_0x16838d[_0x16838d[_0x300e68(0x18a)]=0x1]=_0x300e68(0x18a),_0x16838d[_0x16838d['DATE']=0x2]=_0x300e68(0x1e9),_0x16838d[_0x16838d[_0x300e68(0x1ab)]=0x3]=_0x300e68(0x1ab);}(FieldTypes||(FieldTypes={})));var INDEXFID_MAP;(function(_0x3f1434){const _0x50dbe5=a0_0x56c57c;_0x3f1434['LTP']='i102',_0x3f1434[_0x50dbe5(0x1d0)]=_0x50dbe5(0x125),_0x3f1434[_0x50dbe5(0xe8)]=_0x50dbe5(0x151),_0x3f1434[_0x50dbe5(0x1f7)]=_0x50dbe5(0x13f);}(INDEXFID_MAP||(INDEXFID_MAP={})));var SCRIP_INDEX;(function(_0x188b29){const _0x337fe5=a0_0x56c57c;_0x188b29[_0x188b29[_0x337fe5(0x160)]=0x1]=_0x337fe5(0x160),_0x188b29[_0x188b29[_0x337fe5(0x1a3)]=0x0]=_0x337fe5(0x1a3),_0x188b29[_0x188b29[_0x337fe5(0x1d0)]=0x14]=_0x337fe5(0x1d0),_0x188b29[_0x188b29[_0x337fe5(0x119)]=0xb]='VWAP',_0x188b29[_0x188b29['CHANGE']=0x15]=_0x337fe5(0xe8),_0x188b29[_0x188b29['PERCHANGE']=0x16]=_0x337fe5(0x168),_0x188b29[_0x188b29[_0x337fe5(0x219)]=0x17]=_0x337fe5(0x219);}(SCRIP_INDEX||(SCRIP_INDEX={})));var INDEX_INDEX;(function(_0x2858e8){const _0x2aabc3=a0_0x56c57c;_0x2858e8[_0x2858e8[_0x2aabc3(0x1a3)]=0x0]='LTP',_0x2858e8[_0x2858e8[_0x2aabc3(0x1d0)]=0x1]=_0x2aabc3(0x1d0),_0x2858e8[_0x2858e8['CHANGE']=0x6]=_0x2aabc3(0xe8),_0x2858e8[_0x2858e8['PERCHANGE']=0x7]=_0x2aabc3(0x168);}(INDEX_INDEX||(INDEX_INDEX={})));class ByteBuilder{constructor(_0x4b9862){const _0x348a0b=a0_0x56c57c;this[_0x348a0b(0x1b8)]=new Uint8Array(_0x4b9862),this[_0x348a0b(0x146)]=0x2;}[a0_0x56c57c(0x179)](){const _0x379d0a=a0_0x56c57c;this[_0x379d0a(0x146)]=0x0;}[a0_0x56c57c(0x1d7)](){const _0x29fdfc=a0_0x56c57c;return this[_0x29fdfc(0x146)];}[a0_0x56c57c(0x183)](){const _0x134294=a0_0x56c57c;let _0x92f204=this[_0x134294(0x146)]-0x2;return this['data'][0x0]=_0x92f204>>0x8&0xff,this[_0x134294(0x1b8)][0x1]=_0x92f204&0xff,this[_0x134294(0x1b8)];}[a0_0x56c57c(0x1f5)](_0xf9e98c,_0x801718){const _0x5e3110=a0_0x56c57c;_0x801718==undefined?this[_0x5e3110(0x1b8)][this[_0x5e3110(0x146)]++]=_0xf9e98c:this[_0x5e3110(0x1b8)][_0x801718]=_0xf9e98c;}[a0_0x56c57c(0x188)](_0x5d128c,_0x29709f){const _0x4463a3=a0_0x56c57c;_0x29709f==undefined?this['data'][this['pos']++]=_0x5d128c:this[_0x4463a3(0x1b8)][_0x29709f]=_0x5d128c;}['appendShort'](_0x4bda95){const _0x2e3002=a0_0x56c57c;this['data'][this[_0x2e3002(0x146)]++]=_0x4bda95>>0x8&0xff,this[_0x2e3002(0x1b8)][this[_0x2e3002(0x146)]++]=_0x4bda95&0xff;}['appendInt'](_0x25cf5f){const _0x176940=a0_0x56c57c;this[_0x176940(0x1b8)][this[_0x176940(0x146)]++]=_0x25cf5f>>0x18&0xff,this[_0x176940(0x1b8)][this['pos']++]=_0x25cf5f>>0x10&0xff,this[_0x176940(0x1b8)][this[_0x176940(0x146)]++]=_0x25cf5f>>0x8&0xff,this[_0x176940(0x1b8)][this[_0x176940(0x146)]++]=_0x25cf5f&0xff;}['appendLong'](_0x1cb590){const _0x347695=a0_0x56c57c;this['data'][this[_0x347695(0x146)]++]=_0x1cb590>>0x38&0xff,this[_0x347695(0x1b8)][this[_0x347695(0x146)]++]=_0x1cb590>>0x30&0xff,this['data'][this[_0x347695(0x146)]++]=_0x1cb590>>0x28&0xff,this[_0x347695(0x1b8)][this[_0x347695(0x146)]++]=_0x1cb590>>0x20&0xff,this['data'][this['pos']++]=_0x1cb590>>0x18&0xff,this['data'][this[_0x347695(0x146)]++]=_0x1cb590>>0x10&0xff,this[_0x347695(0x1b8)][this[_0x347695(0x146)]++]=_0x1cb590>>0x8&0xff,this['data'][this['pos']++]=_0x1cb590&0xff;}[a0_0x56c57c(0x1ea)](_0x462ef1){const _0x5d23f0=a0_0x56c57c,_0x5978bc=BigInt(_0x462ef1);this[_0x5d23f0(0x1b8)][this['pos']++]=Number(_0x5978bc>>BigInt(0x38)&BigInt(0xff)),this[_0x5d23f0(0x1b8)][this[_0x5d23f0(0x146)]++]=Number(_0x5978bc>>BigInt(0x30)&BigInt(0xff)),this[_0x5d23f0(0x1b8)][this[_0x5d23f0(0x146)]++]=Number(_0x5978bc>>BigInt(0x28)&BigInt(0xff)),this['data'][this[_0x5d23f0(0x146)]++]=Number(_0x5978bc>>BigInt(0x20)&BigInt(0xff)),this[_0x5d23f0(0x1b8)][this[_0x5d23f0(0x146)]++]=Number(_0x5978bc>>BigInt(0x18)&BigInt(0xff)),this[_0x5d23f0(0x1b8)][this['pos']++]=Number(_0x5978bc>>BigInt(0x10)&BigInt(0xff)),this[_0x5d23f0(0x1b8)][this[_0x5d23f0(0x146)]++]=Number(_0x5978bc>>BigInt(0x8)&BigInt(0xff)),this[_0x5d23f0(0x1b8)][this[_0x5d23f0(0x146)]++]=Number(_0x5978bc&BigInt(0xff));}[a0_0x56c57c(0x21b)](_0x4653f8){const _0x3c8df8=a0_0x56c57c;for(let _0x4931bd=0x0;_0x4931bd<_0x4653f8[_0x3c8df8(0x1eb)];_0x4931bd++)this['data'][this[_0x3c8df8(0x146)]++]=_0x4653f8[_0x3c8df8(0x218)](_0x4931bd);}[a0_0x56c57c(0x21c)](_0x36aec0,_0x5366a5){const _0x5b412f=a0_0x56c57c;let _0x5a04f2=_0x5366a5==undefined?_0x36aec0['length']:_0x5366a5;for(let _0x52a65c=0x0;_0x52a65c<_0x5a04f2;_0x52a65c++)this[_0x5b412f(0x1b8)][this[_0x5b412f(0x146)]++]=_0x36aec0[_0x52a65c];}}class FieldData{constructor(_0x18b853,_0x4531f7,_0x1f71dd,_0xce1967){const _0x9faf0a=a0_0x56c57c;this['fId']=_0x18b853,this[_0x9faf0a(0x139)]=_0x4531f7,this[_0x9faf0a(0x1dd)]=_0x1f71dd,this['desc']=_0xce1967;}}function a0_0x106d(){const _0x56475a=['CLOSE','keys','SUCCESS','pow','dpu','source','SUCCESSFUL','getPosition','hsParser','error','setMultiplierAndPrec','FULL','CHANGE_INDEX','type','\x0aDepth::','959580FzxuGw','Maximum\x20scrips\x20allowed\x20per\x20request\x20is\x20','STAT_CODE','open','^(0{1}[1-9]|[12][0-9]|3[01])/(0{1}[1-9]|1[012])/20\x5cd{2}$','ACK_TYPE','LTP_INDEX','onclose','INDEX_SUBS','OPC','DATE','appendLongAsBigInt','length','LITE','scrips','LIB_VERSION','jwt','STR','packets.length:\x20','Connect...','getMinutes','index:','appendByte','index','PCHANGE','User\x20call','fcn','intervalId','liteFCount','getOpChainSubsRequest',',\x20val:','fcount1:\x20','toString','strJson','lowstk','Cleanup\x20previous\x20connection','snap','DEPTH_SUBS','onerror','WebSocket\x20not\x20initialized!','Number','pingFunction','onopen','LITE_FULL','pingRequest','INDEX_UNSUBS','isScripOK','exchange','SOURCE','dps','SCRIPS','setStringValues','reason','11202584HMSZis','USER_ID','OPC_SUBS','prec:\x20','charCodeAt','TURNOVER','get','appendString','appendByteArray','hsiDebug','setLongValues','appendInt','channelnum','PER_CHANGE_INDEX','THROTTLING_TYPE','_instance','FORCE_CONNECTION','INVD_FLD_COUNT','Invalid\x20topic\x20feed\x20type\x20!','9bqPKtU','INDEX','mwu','buf2Long','CHANNELP','onClose::CloseCode:','MAX_SCRIPS','CHANGE','OPEN','CONNECTION_INVALID','prepareChannelRequest','DATA_TYPE',',\x20WasClean:','Authorization\x20mode\x20is\x20enabled:\x20Authorization\x20or\x20Sid\x20not\x20found\x20!','Conn\x20fCount:','stkprc','3ONZxdx','2003872xLZkzX','set','SCRIP_SUBS','createMapingsMap','prepareJson','counter','UNSUBS','prepareSubsUnSubsRequest','SNAP','MSG','SUBSCRIBE_TYPE','str','hfid','TRASH_VAL','channelnums','Authorization','9666909hTbaBb','Topic\x20Not\x20Available\x20in\x20TopicList!','24615wCosJU','JS_API','FLOAT32','scrip','interval','prepareLiteChannelRequest','prepareConnectionRequest','FAILED','Unable\x20to\x20send\x20request\x20!,\x20Reason:\x20Connection\x20faulty\x20or\x20request\x20not\x20valid\x20!','f102','mwsp','topic\x20Id:\x20','CHANNELR','CLOSE_INDEX','subscription\x20failed','TURNOVER_INDEX','Invalid\x20conn\x20mode\x20!','Processing\x20dynamic\x20mapping....','CHANNELR_FAILED','heartBeatIntervalInMS','onOpen','VWAP','getHours','updates\x20......','SID','REDIS_KEY','push','SNAP_DP','prepareData','Open','opc','CONNECTION_FAILED','DEPTH','i103','onMessage','getMonth','inWS','CHPAUSE_TYPE','NOT_AVL','failed','substring','startPingInterval','Error:\x20Channel\x20values\x20must\x20be\x20in\x20this\x20range\x20\x20[\x20val\x20>\x200\x20&&\x20val\x20<\x2065\x20]','getAcknowledgementReq','sendJsonArrResp',',\x20Reason:','parseData','TYPE','ifu','UNSUBSCRIBE_TYPE','dpsp','LOG','ifs','key','onClose','THROTTLING_INTERVAL','appendShort','readyState','sub','f105','getKey','ConvNumber','mws','\x0aScrip::','getFormatDate2','VOLUME_INDEX','pos','CHANNEL_NUMS','DEPTH_UNSUBS','index_lite','log','INDEX_LITE_FCOUNT','UPDATE','multiplier','leadingZero','feedType','STREAM_DATA_CONFIG','f104','slice','concat','SUBS','successful','HIGH_STK','s121','onError::MSG:','forEach','isConnected','DEFAULT_HEARTBEAT_INTERVAL','invalid\x20field\x20count','buf2String','reqData','stat','VOLUME','getSeconds','precisionValue','fid','fld','fieldDataArray','mappingArray','CHANNELP_FAILED','PERCHANGE','lit','f101','1422IYHOsj','CHANNEL_PAUSE','tSymbol','Invalid\x20Request\x20!','CONN','HSI\x20WebSocket\x20not\x20initialized!','SCRIP','onError','SNAPSHOT','url','NOT_OK','details','precision','f103','clear','binaryType','hsiWs','stringify','send','stCode','prepareConnectionRequestOld','VWAP_INDEX','UNSUBSCRIPTION_FAILED','ful','getBytes','LOW_STK','getInstance','getStringFieldsJson','topicList','appendChar','\x0aIndex::','LONG','NotOk','STK_PRC','connect','blob','HSM_LOG_Flag','wasClean','setSeconds','JWT','ACK:\x20','test','OPC_SUBSCRIBE','updatedFieldsArray','getScripByteArray','topicName:\x20','mode','OPC_KEY','X_ACCESS_TOKEN','SCRIP_UNSUBS','CHANNEL_NUM','getTypeFromString','nameLen:','split','41870370zawcKr','SUBSCRIPTION_FAILED','LTP','stopHearBeat','prepareConnectionRequest2','s105','STREAM_DATA_ENABLED','dataType','code','Invalid\x20ResponseType:\x20','STRING','heartBeatInterval','HSI_LOG_Flag','fields','595106LHGUnP','s113','onmessage','STATUS','StreamDataJson\x20having\x20some\x20issue','hsmDebug','timestamp','sessionid','SESSION_ID','data','getStatus','toFixed','streamDataConfig','CONNECTION','ackNum','isCalled','SNAP_IF','CONNECTION_TYPE','ifsp','hsWS','SCRIP_LITE_FCOUNT','indexOf','getDate','getFormatDate','parse','AUTORIZATION','close','TYPE::\x20','symbol','highstk','arraybuffer','prepareSnapshotRequest','v1.5-ft-5.3.0'];a0_0x106d=function(){return _0x56475a;};return a0_0x106d();}class TopicData{constructor(_0xd25a16){const _0x4cd38b=a0_0x56c57c;this[_0x4cd38b(0x14d)]=0x1,this[_0x4cd38b(0x177)]=0x2,this[_0x4cd38b(0x162)]=0x64,this[_0x4cd38b(0x165)]=new Array(),this['updatedFieldsArray']=new Array(),this['liteFCount']=-0x1,this[_0x4cd38b(0x14f)]=_0xd25a16;}[a0_0x56c57c(0x140)](){const _0x39bab4=a0_0x56c57c;return this[_0x39bab4(0x20e)][_0x39bab4(0x153)]('|',this[_0x39bab4(0x1cb)]);}[a0_0x56c57c(0x21e)](_0x316138,_0x23f1b3){const _0x5c1cc1=a0_0x56c57c;this[_0x5c1cc1(0x165)][_0x316138]!=_0x23f1b3&&_0x23f1b3!=Constants[_0x5c1cc1(0xff)]&&(this[_0x5c1cc1(0x165)][_0x316138]=_0x23f1b3,this[_0x5c1cc1(0x196)][_0x316138]=!![]);}[a0_0x56c57c(0x1da)](_0x2d6bf5,_0xbbecbe){const _0x452b63=a0_0x56c57c;this['precision']=_0xbbecbe,this['precisionValue']=Math[_0x452b63(0x1d3)](0xa,_0xbbecbe),this[_0x452b63(0x14d)]=_0x2d6bf5;}['clearFieldDataArray'](){const _0x31909e=a0_0x56c57c;this[_0x31909e(0x165)]['length']=this[_0x31909e(0x196)]['length']=0x0;}[a0_0x56c57c(0x212)](_0x42cc69,_0x3628b8){const _0x298275=a0_0x56c57c;switch(_0x42cc69){case 0x0:this[_0x298275(0x20e)]=_0x3628b8;break;case 0x1:this[_0x298275(0x1cb)]=_0x3628b8;break;case 0x2:this[_0x298275(0x16d)]=_0x3628b8;break;}}[a0_0x56c57c(0x186)](){const _0x60817e=a0_0x56c57c;if(!this['strJson'])return this['strJson']={'name':this[_0x60817e(0x14f)],'tk':this['symbol'],'e':this['exchange']},Object['assign']({'ts':this[_0x60817e(0x16d)]},this[_0x60817e(0x200)]);return this[_0x60817e(0x200)];}[a0_0x56c57c(0xf6)](_0x4fc9af){const _0x289f84=a0_0x56c57c,_0x118186={};for(let _0x16ca77=0x0;_0x16ca77<_0x4fc9af[_0x289f84(0x1eb)];_0x16ca77++){let _0x5d6a4e=_0x4fc9af[_0x16ca77],_0x360d7d=this[_0x289f84(0x165)][_0x16ca77];if(this[_0x289f84(0x196)][_0x16ca77]&&_0x360d7d!=undefined&&_0x5d6a4e){if(_0x5d6a4e[_0x289f84(0x1dd)]==FieldTypes[_0x289f84(0x106)])_0x360d7d=(_0x360d7d/(this[_0x289f84(0x14d)]*this[_0x289f84(0x162)]))['toFixed'](this[_0x289f84(0x177)]);else _0x5d6a4e[_0x289f84(0x1dd)]==FieldTypes['DATE']&&(_0x360d7d=Util[_0x289f84(0x1c6)](_0x360d7d));Log[_0x289f84(0x1b4)](_0x16ca77+':'+_0x5d6a4e[_0x289f84(0x139)]+':'+_0x360d7d[_0x289f84(0x1ff)]()),_0x118186[_0x5d6a4e[_0x289f84(0x139)]]=_0x360d7d[_0x289f84(0x1ff)]();}}return this[_0x289f84(0x196)]=[],Object[_0x289f84(0x1d1)](_0x118186)[_0x289f84(0x1eb)]>0x0?Object['assign'](_0x118186,this['getStringFieldsJson']()):![];}}class ScripTopicData extends TopicData{constructor(){const _0x5e7f74=a0_0x56c57c;super(TopicTypes[_0x5e7f74(0x171)]);}[a0_0x56c57c(0x120)](){const _0x137bc8=a0_0x56c57c;if(this['updatedFieldsArray'][ScripTopicData[_0x137bc8(0x1e5)]]||this[_0x137bc8(0x196)][ScripTopicData[_0x137bc8(0x111)]]){let _0x305524=this[_0x137bc8(0x165)][ScripTopicData['LTP_INDEX']],_0x517374=this[_0x137bc8(0x165)][ScripTopicData[_0x137bc8(0x111)]];if(_0x305524!=undefined&&_0x517374!=undefined){let _0x34f45d=_0x305524-_0x517374;this['fieldDataArray'][ScripTopicData['CHANGE_INDEX']]=_0x34f45d,this[_0x137bc8(0x196)][ScripTopicData[_0x137bc8(0x1dc)]]=!![],this[_0x137bc8(0x165)][ScripTopicData[_0x137bc8(0x221)]]=+(_0x34f45d/_0x517374*0x64)[_0x137bc8(0x1ba)](this[_0x137bc8(0x177)]),this[_0x137bc8(0x196)][ScripTopicData['PER_CHANGE_INDEX']]=!![];}}if(this[_0x137bc8(0x196)][ScripTopicData['VOLUME_INDEX']]||this['updatedFieldsArray'][ScripTopicData[_0x137bc8(0x180)]]){let _0x43276f=this[_0x137bc8(0x165)][ScripTopicData[_0x137bc8(0x145)]],_0x98ab33=this[_0x137bc8(0x165)][ScripTopicData[_0x137bc8(0x180)]];_0x43276f!=undefined&&_0x98ab33!=undefined&&(this['fieldDataArray'][ScripTopicData[_0x137bc8(0x113)]]=_0x43276f*_0x98ab33,this['updatedFieldsArray'][ScripTopicData[_0x137bc8(0x113)]]=!![]);}return Log[_0x137bc8(0x1b4)](_0x137bc8(0x143)+this[_0x137bc8(0x14f)]+'|'+this[_0x137bc8(0x20e)]+'|'+this[_0x137bc8(0x1cb)]),super[_0x137bc8(0xf6)](ScripTopicData[_0x137bc8(0x166)]);}}class IndexTopicData extends TopicData{constructor(){super(TopicTypes['INDEX']);}[a0_0x56c57c(0x120)](){const _0x5c2b12=a0_0x56c57c;if(this[_0x5c2b12(0x196)][IndexTopicData[_0x5c2b12(0x1e5)]]||this[_0x5c2b12(0x196)][IndexTopicData[_0x5c2b12(0x111)]]){let _0x4477ff=this[_0x5c2b12(0x165)][IndexTopicData[_0x5c2b12(0x1e5)]],_0x4986cd=this[_0x5c2b12(0x165)][IndexTopicData[_0x5c2b12(0x111)]];if(_0x4477ff!=undefined&&_0x4986cd!=undefined){let _0x428a8d=_0x4477ff-_0x4986cd;this[_0x5c2b12(0x165)][IndexTopicData['CHANGE_INDEX']]=_0x428a8d,this[_0x5c2b12(0x196)][IndexTopicData['CHANGE_INDEX']]=!![],this[_0x5c2b12(0x165)][IndexTopicData[_0x5c2b12(0x221)]]=+(_0x428a8d/_0x4986cd*0x64)[_0x5c2b12(0x1ba)](this[_0x5c2b12(0x177)]),this[_0x5c2b12(0x196)][IndexTopicData[_0x5c2b12(0x221)]]=!![];}}return Log[_0x5c2b12(0x1b4)](_0x5c2b12(0x189)+this['feedType']+'|'+this[_0x5c2b12(0x20e)]+'|'+this[_0x5c2b12(0x1cb)]),super[_0x5c2b12(0xf6)](IndexTopicData['mappingArray']);}}class DepthTopicData extends TopicData{constructor(){const _0x41b0c3=a0_0x56c57c;super(TopicTypes[_0x41b0c3(0x124)]);}[a0_0x56c57c(0x120)](){const _0x56c4e3=a0_0x56c57c;return Log[_0x56c4e3(0x1b4)](_0x56c4e3(0x1de)+this[_0x56c4e3(0x14f)]+'|'+this[_0x56c4e3(0x20e)]+'|'+this[_0x56c4e3(0x1cb)]),super[_0x56c4e3(0xf6)](DepthTopicData[_0x56c4e3(0x166)]);}}class Util{constructor(){}static[a0_0x56c57c(0xe4)](_0x49b0ac){const _0x373ec1=a0_0x56c57c;let _0x9ca13=new Uint8Array(_0x49b0ac),_0x3dc76c=0x0,_0x1794cb=_0x9ca13[_0x373ec1(0x1eb)];for(let _0x493651=0x0,_0xaeb45b=_0x1794cb-0x1;_0x493651<_0x1794cb;_0x493651++,_0xaeb45b--){_0x3dc76c+=_0x9ca13[_0xaeb45b]<<_0x493651*0x8;}return _0x3dc76c;}static['buf2Float'](_0x2a5a4e,_0x4be87c){let _0x4d554a=new DataView(_0x2a5a4e,_0x4be87c,0x4);return _0x4d554a['getFloat32'](0x0);}static[a0_0x56c57c(0x15d)](_0x4a9c32){return new TextDecoder('utf-8')['decode'](_0x4a9c32);}static[a0_0x56c57c(0x1c6)](_0x51138c){const _0x55159a=a0_0x56c57c;let _0x3166a1=new Date(_0x51138c*0x3e8),_0x3dc3d7=Util[_0x55159a(0x14e)](_0x3166a1[_0x55159a(0x1c5)]())+'/'+Util['leadingZero'](_0x3166a1[_0x55159a(0x127)]()+0x1)+'/'+_0x3166a1['getFullYear']()+'\x20'+Util[_0x55159a(0x14e)](_0x3166a1['getHours']())+':'+Util[_0x55159a(0x14e)](_0x3166a1[_0x55159a(0x1f3)]())+':'+Util[_0x55159a(0x14e)](_0x3166a1[_0x55159a(0x161)]());return _0x3dc3d7;}static[a0_0x56c57c(0x144)](_0xd58769){const _0x3a1509=a0_0x56c57c;let _0x3bfe1b=new Date(0x7b2,0x0,0x1);_0x3bfe1b[_0x3a1509(0x191)](_0xd58769);let _0x5a29ce=Util['leadingZero'](_0x3bfe1b[_0x3a1509(0x1c5)]())+'/'+Util[_0x3a1509(0x14e)](_0x3bfe1b[_0x3a1509(0x127)]()+0x1)+'/'+_0x3bfe1b['getFullYear']()+'\x20'+Util[_0x3a1509(0x14e)](_0x3bfe1b[_0x3a1509(0x11a)]())+':'+Util[_0x3a1509(0x14e)](_0x3bfe1b[_0x3a1509(0x1f3)]())+':'+Util[_0x3a1509(0x14e)](_0x3bfe1b['getSeconds']());return _0x5a29ce;}static[a0_0x56c57c(0x14e)](_0x53951e){const _0x45f124=a0_0x56c57c;return _0x53951e<0xa?'0'+_0x53951e['toString']():_0x53951e[_0x45f124(0x1ff)]();}static[a0_0x56c57c(0x20d)](_0x5dcb6b){const _0x6a9ce3=a0_0x56c57c;if(_0x5dcb6b[_0x6a9ce3(0x1a0)]('&')['length']>Constants['MAX_SCRIPS'])return console[_0x6a9ce3(0x1d9)](_0x6a9ce3(0x1e0)+Constants[_0x6a9ce3(0xe7)]),![];return!![];}static['checkDateFormat'](_0x7f57bc){const _0x426875=a0_0x56c57c;return new RegExp(_0x426875(0x1e3))[_0x426875(0x194)](_0x7f57bc);}}class BinRequest{constructor(){}static['getAcknowledgementReq'](_0x4ef1f6){const _0x55b6c1=a0_0x56c57c;let _0x8bf10d=new ByteBuilder(0xb);return _0x8bf10d[_0x55b6c1(0x1f5)](BinRespTypes[_0x55b6c1(0x1e4)]),_0x8bf10d[_0x55b6c1(0x1f5)](0x1),_0x8bf10d['appendByte'](0x1),_0x8bf10d[_0x55b6c1(0x13c)](0x4),_0x8bf10d['appendInt'](_0x4ef1f6),_0x8bf10d['getBytes']();}static[a0_0x56c57c(0x17f)](_0x44eff2){const _0x563c02=a0_0x56c57c;let _0xe01669=_0x44eff2['length'],_0x2cc40f=_0x563c02(0x105),_0x312b51=_0x2cc40f['length'],_0x4ba536=new ByteBuilder(_0xe01669+_0x312b51+0xa);return _0x4ba536[_0x563c02(0x1f5)](BinRespTypes['CONNECTION_TYPE']),_0x4ba536['appendByte'](0x2),_0x4ba536['appendByte'](0x1),_0x4ba536[_0x563c02(0x13c)](_0xe01669),_0x4ba536[_0x563c02(0x21b)](_0x44eff2),_0x4ba536[_0x563c02(0x1f5)](0x2),_0x4ba536[_0x563c02(0x13c)](_0x312b51),_0x4ba536[_0x563c02(0x21b)](_0x2cc40f),_0x4ba536[_0x563c02(0x183)]();}static['prepareConnectionRequest'](_0x151272,_0x1fc615){const _0x2d5ef9=a0_0x56c57c;let _0x574f68=_0x151272[_0x2d5ef9(0x1eb)],_0x2731f0=_0x2d5ef9(0x105),_0x27b69a=_0x2731f0[_0x2d5ef9(0x1eb)],_0xe66d3a=new ByteBuilder(_0x574f68+_0x27b69a+0x12);return _0xe66d3a[_0x2d5ef9(0x1f5)](BinRespTypes[_0x2d5ef9(0x1c0)]),_0xe66d3a[_0x2d5ef9(0x1f5)](0x4),_0xe66d3a['appendByte'](0x1),_0xe66d3a['appendShort'](_0x574f68),_0xe66d3a['appendString'](_0x151272),_0xe66d3a[_0x2d5ef9(0x1f5)](0x2),_0xe66d3a[_0x2d5ef9(0x13c)](0x1),_0xe66d3a[_0x2d5ef9(0x1f5)](_0x1fc615['charCodeAt'](0x0)),_0xe66d3a['appendByte'](0x3),_0xe66d3a[_0x2d5ef9(0x13c)](0x1),_0xe66d3a[_0x2d5ef9(0x1f5)](Constants[_0x2d5ef9(0x1a7)]?0x1:0x0),_0xe66d3a[_0x2d5ef9(0x1f5)](0x4),_0xe66d3a[_0x2d5ef9(0x13c)](_0x27b69a),_0xe66d3a[_0x2d5ef9(0x21b)](_0x2731f0),_0xe66d3a['getBytes']();}static[a0_0x56c57c(0x1a5)](_0x2f58e2,_0x1eec77){const _0x8242ad=a0_0x56c57c;let _0xc5c354=_0x8242ad(0x105),_0x22ebb4=_0xc5c354[_0x8242ad(0x1eb)],_0x2569bb=_0x2f58e2[_0x8242ad(0x1eb)],_0x257272=_0x1eec77[_0x8242ad(0x1eb)],_0x52ae35=new ByteBuilder(_0x22ebb4+_0x2569bb+_0x257272+0xd);return _0x52ae35[_0x8242ad(0x1f5)](BinRespTypes[_0x8242ad(0x1c0)]),_0x52ae35[_0x8242ad(0x1f5)](0x3),_0x52ae35['appendByte'](0x1),_0x52ae35[_0x8242ad(0x13c)](_0x2569bb),_0x52ae35[_0x8242ad(0x21b)](_0x2f58e2),_0x52ae35[_0x8242ad(0x1f5)](0x2),_0x52ae35['appendShort'](_0x257272),_0x52ae35[_0x8242ad(0x21b)](_0x1eec77),_0x52ae35[_0x8242ad(0x1f5)](0x3),_0x52ae35[_0x8242ad(0x13c)](_0x22ebb4),_0x52ae35[_0x8242ad(0x21b)](_0xc5c354),_0x52ae35[_0x8242ad(0x183)]();}static[a0_0x56c57c(0xf9)](_0x24da20,_0x118fee,_0x7d1260,_0x45d853){const _0x3e18ad=a0_0x56c57c;if(!Util[_0x3e18ad(0x20d)](_0x24da20))return null;let _0x5dcf2c=BinRequest['getScripByteArray'](_0x24da20,_0x7d1260),_0x160a0b=new ByteBuilder(_0x5dcf2c[_0x3e18ad(0x1eb)]+0xb);return _0x160a0b['appendByte'](_0x118fee),_0x160a0b['appendByte'](0x2),_0x160a0b[_0x3e18ad(0x1f5)](0x1),_0x160a0b[_0x3e18ad(0x13c)](_0x5dcf2c[_0x3e18ad(0x1eb)]),_0x160a0b['appendByteArray'](_0x5dcf2c,_0x5dcf2c[_0x3e18ad(0x1eb)]),_0x160a0b[_0x3e18ad(0x1f5)](0x2),_0x160a0b[_0x3e18ad(0x13c)](0x1),_0x160a0b['appendByte'](_0x45d853),_0x160a0b[_0x3e18ad(0x183)]();}static[a0_0x56c57c(0x109)](_0x204231,_0xb81397,_0x77db0e){const _0x11b3b3=a0_0x56c57c;let _0x2803aa=new ByteBuilder(0x13);_0x2803aa[_0x11b3b3(0x1f5)](_0x204231),_0x2803aa['appendByte'](0x2),_0x2803aa[_0x11b3b3(0x1f5)](0x1),_0x2803aa[_0x11b3b3(0x13c)](0x8);let _0x157aaa=0x0,_0x35adb1=0x0;return _0x77db0e[_0x11b3b3(0x159)](function(_0xd305df){const _0x587d8f=_0x11b3b3;if(_0xd305df>0x0&&_0xd305df<=0x20)_0x157aaa|=0x1<<_0xd305df;else{if(_0xd305df>0x20&&_0xd305df<=0x40)_0x35adb1|=0x1<<_0xd305df;else console[_0x587d8f(0x1d9)]('Error:\x20Channel\x20values\x20must\x20be\x20in\x20this\x20range\x20\x20[\x20val\x20>\x200\x20&&\x20val\x20<\x2065\x20]');}}),_0x2803aa['appendInt'](_0x35adb1),_0x2803aa[_0x11b3b3(0x21f)](_0x157aaa),_0x2803aa[_0x11b3b3(0x1f5)](0x2),_0x2803aa['appendShort'](0x1),_0x2803aa['appendByte'](_0xb81397),_0x2803aa[_0x11b3b3(0x183)]();}static[a0_0x56c57c(0xeb)](_0x54f1af,_0x4d3c9a){const _0xe65e36=a0_0x56c57c;let _0xe9eb38=new ByteBuilder(0xf);_0xe9eb38[_0xe65e36(0x1f5)](_0x54f1af),_0xe9eb38[_0xe65e36(0x1f5)](0x1),_0xe9eb38[_0xe65e36(0x1f5)](0x1),_0xe9eb38['appendShort'](0x8);let _0x4c737f=0x0,_0x5da670=0x0;return _0x4d3c9a[_0xe65e36(0x159)](function(_0xb8b2d0){const _0x123bb3=_0xe65e36;if(_0xb8b2d0>0x0&&_0xb8b2d0<=0x20)_0x4c737f|=0x1<<_0xb8b2d0;else{if(_0xb8b2d0>0x20&&_0xb8b2d0<=0x40)_0x5da670|=0x1<<_0xb8b2d0;else console['error'](_0x123bb3(0x12e));}}),_0xe9eb38['appendInt'](_0x5da670),_0xe9eb38['appendInt'](_0x4c737f),_0xe9eb38[_0xe65e36(0x183)]();}static['prepareSnapshotRequest'](_0x51d9de,_0xcf31a7,_0x5579c1){const _0x5f4f2a=a0_0x56c57c;let _0x431583=BinRequest[_0x5f4f2a(0x197)](_0x51d9de,_0x5579c1),_0x30e3ca=_0x431583[_0x5f4f2a(0x1eb)],_0x4670d8=new ByteBuilder(_0x30e3ca+0x7);return _0x4670d8[_0x5f4f2a(0x1f5)](_0xcf31a7),_0x4670d8[_0x5f4f2a(0x1f5)](0x1),_0x4670d8['appendByte'](0x1),_0x4670d8[_0x5f4f2a(0x13c)](_0x30e3ca),_0x4670d8['appendByteArray'](_0x431583,_0x30e3ca),_0x4670d8[_0x5f4f2a(0x183)]();}static['prepareThrottlingIntervalRequest'](_0x1cc8c2){const _0x24fab9=a0_0x56c57c;let _0x3d71d7=new ByteBuilder(0xb);return _0x3d71d7[_0x24fab9(0x1f5)](BinRespTypes[_0x24fab9(0x222)]),_0x3d71d7[_0x24fab9(0x1f5)](0x1),_0x3d71d7[_0x24fab9(0x1f5)](0x1),_0x3d71d7[_0x24fab9(0x13c)](0x4),_0x3d71d7[_0x24fab9(0x21f)](_0x1cc8c2),_0x3d71d7[_0x24fab9(0x183)]();}static[a0_0x56c57c(0x197)](_0x494dfa,_0x535c03){const _0x27c9ed=a0_0x56c57c;if(_0x494dfa['charCodeAt'](_0x494dfa[_0x27c9ed(0x1eb)]-0x1)==0x26)_0x494dfa=_0x494dfa[_0x27c9ed(0x12c)](0x0,_0x494dfa['length']-0x1);let _0x76d0ad=_0x494dfa[_0x27c9ed(0x1a0)]('&'),_0x3b207d=_0x76d0ad[_0x27c9ed(0x1eb)],_0x563505=0x0;for(let _0xb60306=0x0;_0xb60306<_0x3b207d;_0xb60306++){_0x76d0ad[_0xb60306]=_0x535c03+'|'+_0x76d0ad[_0xb60306],_0x563505+=_0x76d0ad[_0xb60306][_0x27c9ed(0x1eb)]+0x1;}let _0x2fc5cd=new Uint8Array(_0x563505+0x2),_0x215abd=0x0;_0x2fc5cd[_0x215abd++]=_0x3b207d>>0x8&0xff,_0x2fc5cd[_0x215abd++]=_0x3b207d&0xff;for(let _0x12eed5=0x0;_0x12eed5<_0x3b207d;_0x12eed5++){let _0x13a8f9=_0x76d0ad[_0x12eed5],_0x990084=_0x13a8f9[_0x27c9ed(0x1eb)];_0x2fc5cd[_0x215abd++]=_0x990084&0xff;for(let _0x250fce=0x0;_0x250fce<_0x990084;_0x250fce++){_0x2fc5cd[_0x215abd++]=_0x13a8f9[_0x27c9ed(0x218)](_0x250fce);}}return _0x2fc5cd;}static[a0_0x56c57c(0x1fc)](_0x12e1cc,_0xe493d4,_0x5df1c5,_0x1c1634,_0x365047){const _0x446175=a0_0x56c57c;let _0x5590ca=_0x12e1cc[_0x446175(0x1eb)],_0x56a2c6=new ByteBuilder(_0x5590ca+0x1e);return _0x56a2c6[_0x446175(0x1f5)](BinRespTypes['OPC_SUBSCRIBE']),_0x56a2c6[_0x446175(0x1f5)](0x5),_0x56a2c6['appendByte'](0x1),_0x56a2c6['appendShort'](_0x5590ca),_0x56a2c6[_0x446175(0x21b)](_0x12e1cc),_0x56a2c6[_0x446175(0x1f5)](0x2),_0x56a2c6[_0x446175(0x13c)](0x8),_0x56a2c6[_0x446175(0x1ea)](_0xe493d4),_0x56a2c6['appendByte'](0x3),_0x56a2c6[_0x446175(0x13c)](0x1),_0x56a2c6['appendByte'](_0x5df1c5),_0x56a2c6[_0x446175(0x1f5)](0x4),_0x56a2c6['appendShort'](0x1),_0x56a2c6[_0x446175(0x1f5)](_0x1c1634),_0x56a2c6['appendByte'](0x5),_0x56a2c6[_0x446175(0x13c)](0x1),_0x56a2c6[_0x446175(0x1f5)](_0x365047),_0x56a2c6[_0x446175(0x183)]();}}BinRequest[a0_0x56c57c(0x20b)]=new Uint8Array([0x0,0x1,0xb]);class HSWebSocket{constructor(){const _0x46cc2e=a0_0x56c57c;this[_0x46cc2e(0x174)]=null,this['ws']=null,this['hsParser']=null,this[_0x46cc2e(0x118)]=null,this['onClose']=null,this[_0x46cc2e(0x126)]=null,this['onError']=null;}[a0_0x56c57c(0x1c9)](){const _0x157fcb=a0_0x56c57c;this['ws']&&(this['ws'][_0x157fcb(0x1c9)](0x3e8,_0x157fcb(0x1f8)),this['ws']=null);}[a0_0x56c57c(0x15a)](){const _0x33ea10=a0_0x56c57c;return this['ws']?this['ws'][_0x33ea10(0x13d)]==WebSocket['OPEN']:![];}['connect'](_0x403077,_0x522b4e){const _0x38cedb=a0_0x56c57c;Log[_0x38cedb(0x1b4)](_0x38cedb(0x1f2)),this[_0x38cedb(0x174)]=_0x403077;let _0x421b7b=(_0x522b4e?_0x522b4e:Constants[_0x38cedb(0x15b)])*0x3e8;this['ws']&&(this['ws'][_0x38cedb(0x209)]=_0x513a5b=>{},this['ws'][_0x38cedb(0x1b1)]=_0x3cf874=>{},this['ws'][_0x38cedb(0x1e6)]=_0x58ba1a=>{},this['ws'][_0x38cedb(0x205)]=_0x4e9923=>{},this['ws'][_0x38cedb(0x1c9)](0x3e8,_0x38cedb(0x202)));this['ws']=new WebSocket(_0x403077);if(this['ws'])this['ws'][_0x38cedb(0x17a)]=_0x38cedb(0x1cd),this[_0x38cedb(0x1d8)]=new HSParser(this['ws'],this,_0x421b7b);else{console[_0x38cedb(0x1d9)](_0x38cedb(0x206));return;}this['ws']['onopen']=_0x29902d=>{const _0x11a27b=_0x38cedb;Log[_0x11a27b(0x1b4)](_0x11a27b(0x121)),this[_0x11a27b(0x118)]();},this['ws']['onmessage']=_0x2aa829=>{const _0x21c9a5=_0x38cedb;let _0x1f85da=_0x2aa829['data'];if(_0x1f85da instanceof ArrayBuffer){let _0x46bb25=this[_0x21c9a5(0x1d8)][_0x21c9a5(0x132)](_0x1f85da);if(_0x46bb25)this[_0x21c9a5(0x126)](JSON[_0x21c9a5(0x17c)](_0x46bb25));}else this[_0x21c9a5(0x126)](_0x1f85da);},this['ws'][_0x38cedb(0x1e6)]=_0x164d16=>{const _0xea57c6=_0x38cedb;Log[_0xea57c6(0x1b4)](_0xea57c6(0xe6)+_0x164d16[_0xea57c6(0x1a9)]+_0xea57c6(0x131)+_0x164d16[_0xea57c6(0x213)]+_0xea57c6(0xed)+_0x164d16[_0xea57c6(0x190)]),this[_0xea57c6(0x13a)](_0x164d16);},this['ws'][_0x38cedb(0x205)]=_0x50b98d=>{const _0x4494fe=_0x38cedb;Log[_0x4494fe(0x1b4)](_0x4494fe(0x158)+_0x50b98d),this[_0x4494fe(0x172)](_0x50b98d);};}[a0_0x56c57c(0x17d)](_0x143c2a){const _0x3a2d5a=a0_0x56c57c;let _0xee8b4d=JSON[_0x3a2d5a(0x1c7)](_0x143c2a);Log[_0x3a2d5a(0x1b4)](_0xee8b4d);let _0x18e9be=_0xee8b4d[Keys[_0x3a2d5a(0x133)]],_0x261582=null,_0x10781b=_0xee8b4d[Keys[_0x3a2d5a(0x211)]],_0x573440=_0xee8b4d[Keys['CHANNEL_NUM']],_0x326d52=_0xee8b4d[Keys[_0x3a2d5a(0x147)]];switch(_0x18e9be){case ReqTypeValues[_0x3a2d5a(0x1bc)]:let _0xcd773c=_0xee8b4d[_0x3a2d5a(0x199)];if(_0xee8b4d[Keys[_0x3a2d5a(0x215)]]!==undefined&&_0xcd773c!==undefined){let _0x517dc1=_0xee8b4d[Keys['USER_ID']];_0x261582=BinRequest[_0x3a2d5a(0x10a)](_0x517dc1,_0xcd773c);}else{if(_0xee8b4d[Keys[_0x3a2d5a(0x1b7)]]!==undefined&&_0xcd773c!==undefined){let _0x1103a7=_0xee8b4d[Keys[_0x3a2d5a(0x1b7)]];_0x261582=BinRequest[_0x3a2d5a(0x10a)](_0x1103a7,_0xcd773c);}else{if(_0xee8b4d[Keys[_0x3a2d5a(0x1c8)]]!==undefined){let _0x12a925=_0xee8b4d[Keys[_0x3a2d5a(0x1c8)]],_0x4a1333=_0xee8b4d[Keys[_0x3a2d5a(0x11c)]];if(_0x12a925&&_0x4a1333)_0x261582=BinRequest[_0x3a2d5a(0x1a5)](_0x12a925,_0x4a1333);else console[_0x3a2d5a(0x1d9)](_0x3a2d5a(0xee));}else console[_0x3a2d5a(0x1d9)](_0x3a2d5a(0x114));}}break;case ReqTypeValues['SCRIP_SUBS']:_0x261582=BinRequest[_0x3a2d5a(0xf9)](_0x10781b,BinRespTypes[_0x3a2d5a(0xfc)],PREFIX[_0x3a2d5a(0x171)],_0x573440);break;case ReqTypeValues[_0x3a2d5a(0x19c)]:_0x261582=BinRequest[_0x3a2d5a(0xf9)](_0x10781b,BinRespTypes['UNSUBSCRIBE_TYPE'],PREFIX[_0x3a2d5a(0x171)],_0x573440);break;case ReqTypeValues[_0x3a2d5a(0x1e7)]:_0x261582=BinRequest[_0x3a2d5a(0xf9)](_0x10781b,BinRespTypes[_0x3a2d5a(0xfc)],PREFIX['INDEX'],_0x573440);break;case ReqTypeValues[_0x3a2d5a(0x20c)]:_0x261582=BinRequest[_0x3a2d5a(0xf9)](_0x10781b,BinRespTypes[_0x3a2d5a(0x135)],PREFIX[_0x3a2d5a(0x228)],_0x573440);break;case ReqTypeValues[_0x3a2d5a(0x204)]:_0x261582=BinRequest[_0x3a2d5a(0xf9)](_0x10781b,BinRespTypes[_0x3a2d5a(0xfc)],PREFIX[_0x3a2d5a(0x124)],_0x573440);break;case ReqTypeValues[_0x3a2d5a(0x148)]:_0x261582=BinRequest[_0x3a2d5a(0xf9)](_0x10781b,BinRespTypes[_0x3a2d5a(0x135)],PREFIX[_0x3a2d5a(0x124)],_0x573440);break;case ReqTypeValues[_0x3a2d5a(0x16c)]:_0x261582=BinRequest['prepareChannelRequest'](BinRespTypes['CHPAUSE_TYPE'],_0x326d52);break;case ReqTypeValues['CHANNEL_RESUME']:_0x261582=BinRequest[_0x3a2d5a(0xeb)](BinRespTypes['CHRESUME_TYPE'],_0x326d52);break;case ReqTypeValues['SNAP_MW']:_0x261582=BinRequest[_0x3a2d5a(0x1ce)](_0x10781b,BinRespTypes[_0x3a2d5a(0x173)],PREFIX[_0x3a2d5a(0x171)]);break;case ReqTypeValues[_0x3a2d5a(0x11f)]:_0x261582=BinRequest[_0x3a2d5a(0x1ce)](_0x10781b,BinRespTypes[_0x3a2d5a(0x173)],PREFIX[_0x3a2d5a(0x124)]);break;case ReqTypeValues[_0x3a2d5a(0x1bf)]:_0x261582=BinRequest[_0x3a2d5a(0x1ce)](_0x10781b,BinRespTypes[_0x3a2d5a(0x173)],PREFIX[_0x3a2d5a(0x228)]);break;case ReqTypeValues[_0x3a2d5a(0x216)]:_0x261582=BinRequest[_0x3a2d5a(0x1fc)](_0xee8b4d[Keys[_0x3a2d5a(0x19a)]],_0xee8b4d[Keys['STK_PRC']],_0xee8b4d[Keys[_0x3a2d5a(0x156)]],_0xee8b4d[Keys[_0x3a2d5a(0x184)]],_0x573440);break;case ReqTypeValues[_0x3a2d5a(0x137)]:break;case ReqTypeValues['LITE']:_0x261582=BinRequest[_0x3a2d5a(0x109)](BinRespTypes[_0x3a2d5a(0x20a)],CHANNEL_DATA_MODE['LITE'],_0x326d52);break;case ReqTypeValues[_0x3a2d5a(0x1db)]:_0x261582=BinRequest[_0x3a2d5a(0x109)](BinRespTypes['LITE_FULL'],CHANNEL_DATA_MODE[_0x3a2d5a(0x1db)],_0x326d52);break;case ReqTypeValues[_0x3a2d5a(0x1f0)]:_0x261582=_0x10781b;break;default:_0x261582=null;break;}if(this['ws']&&_0x261582)this['ws'][_0x3a2d5a(0x17d)](_0x261582);else console[_0x3a2d5a(0x1d9)](_0x3a2d5a(0x10c));}}class HSParser{constructor(_0x58e0f0,_0x39f8a1,_0x292cf4){const _0x1cfecc=a0_0x56c57c;this[_0x1cfecc(0x1c2)]=null,this[_0x1cfecc(0x128)]=null,this[_0x1cfecc(0x187)]=new Array(),this[_0x1cfecc(0xf7)]=0x0,this['ackNum']=0x0,this[_0x1cfecc(0x1fa)]=0x0,this['inWS']=_0x58e0f0,this[_0x1cfecc(0x1c2)]=_0x39f8a1,this[_0x1cfecc(0x117)]=_0x292cf4;}[a0_0x56c57c(0x132)](_0x535acb){const _0x35ce2f=a0_0x56c57c;let _0x329689=0x0,_0x514809=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,0x2));Log[_0x35ce2f(0x1b4)](_0x35ce2f(0x1f1)+_0x514809),_0x329689+=0x2;let _0x15d55c=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x1));_0x329689+=0x1,Log[_0x35ce2f(0x1b4)](_0x35ce2f(0x1ca)+_0x15d55c);if(_0x15d55c==BinRespTypes['CONNECTION_TYPE']){const _0x532d16={};let _0x3f1e20=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x1));Log['hsmDebug'](_0x35ce2f(0xef)+_0x3f1e20),_0x329689+=0x1;let _0x525704=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x1));_0x329689+=0x1;let _0x267e1a=Util['buf2Long'](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x2));_0x329689+=0x2;let _0x42783b=Util[_0x35ce2f(0x15d)](_0x535acb['slice'](_0x329689,_0x329689+_0x267e1a));_0x329689+=_0x267e1a;let _0x2cd51c=0x0;if(_0x3f1e20>=0x2){_0x525704=Util['buf2Long'](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x1)),_0x329689+=0x1,_0x267e1a=Util[_0x35ce2f(0xe4)](_0x535acb['slice'](_0x329689,_0x329689+0x2)),_0x329689+=0x2,_0x2cd51c=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+_0x267e1a)),_0x329689+=_0x267e1a;if(_0x3f1e20>=0x3){_0x525704=Util['buf2Long'](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x1)),_0x329689+=0x1,_0x267e1a=Util[_0x35ce2f(0xe4)](_0x535acb['slice'](_0x329689,_0x329689+0x2)),_0x329689+=0x2;let _0x51e300=JSON[_0x35ce2f(0x1c7)](Util[_0x35ce2f(0x15d)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+_0x267e1a)));_0x329689+=_0x267e1a,this[_0x35ce2f(0xf5)](_0x51e300);}Log['hsmDebug'](_0x35ce2f(0x193)+_0x2cd51c);switch(_0x42783b){case BinRespStat['OK']:_0x532d16[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT['OK'],_0x532d16[RESPONSE_KEYS[_0x35ce2f(0x133)]]=RespTypeValues[_0x35ce2f(0x16f)],_0x532d16[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES[_0x35ce2f(0x1d6)],_0x532d16[RESPONSE_KEYS[_0x35ce2f(0x1e1)]]=RespCodes['SUCCESS'],this[_0x35ce2f(0x12d)]();break;case BinRespStat[_0x35ce2f(0x175)]:_0x532d16[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT['NOT_OK'],_0x532d16[RESPONSE_KEYS[_0x35ce2f(0x133)]]=RespTypeValues[_0x35ce2f(0x16f)],_0x532d16[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES['FAILED'],_0x532d16[RESPONSE_KEYS['STAT_CODE']]=RespCodes[_0x35ce2f(0x123)];break;}this['ackNum']=_0x2cd51c;}else{if(_0x3f1e20==0x1)switch(_0x42783b){case BinRespStat['OK']:_0x532d16[RESPONSE_KEYS['STATUS']]=STAT['OK'],_0x532d16[RESPONSE_KEYS['TYPE']]=RespTypeValues[_0x35ce2f(0x16f)],_0x532d16[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES[_0x35ce2f(0x1d6)],_0x532d16[RESPONSE_KEYS[_0x35ce2f(0x1e1)]]=RespCodes[_0x35ce2f(0x1d2)],this[_0x35ce2f(0x12d)]();break;case BinRespStat[_0x35ce2f(0x175)]:_0x532d16[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT[_0x35ce2f(0x175)],_0x532d16[RESPONSE_KEYS['TYPE']]=RespTypeValues[_0x35ce2f(0x16f)],_0x532d16[RESPONSE_KEYS['MSG']]=RESPONSE_VALUES[_0x35ce2f(0x10b)],_0x532d16[RESPONSE_KEYS[_0x35ce2f(0x1e1)]]=RespCodes['CONNECTION_FAILED'];break;}else _0x532d16[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT[_0x35ce2f(0x175)],_0x532d16[RESPONSE_KEYS['TYPE']]=RespTypeValues[_0x35ce2f(0x16f)],_0x532d16[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES[_0x35ce2f(0x225)],_0x532d16[RESPONSE_KEYS['STAT_CODE']]=RespCodes[_0x35ce2f(0xea)];}return this[_0x35ce2f(0x130)](_0x532d16);}else{if(_0x15d55c==BinRespTypes['DATA_TYPE']){let _0xef230a=0x0;if(this[_0x35ce2f(0x1bd)]>0x0){++this['counter'],_0xef230a=Util['buf2Long'](_0x535acb['slice'](_0x329689,_0x329689+0x4)),_0x329689+=0x4;if(this['counter']==this[_0x35ce2f(0x1bd)]){let _0x59ced4=BinRequest[_0x35ce2f(0x12f)](_0xef230a);if(this[_0x35ce2f(0x128)])this['inWS'][_0x35ce2f(0x17d)](_0x59ced4);Log[_0x35ce2f(0x1b4)]('Acknowledgement\x20sent\x20for\x20message\x20num:\x20'+_0xef230a),this[_0x35ce2f(0xf7)]=0x0;}}const _0xd59f4e=[];let _0x59ae17=Util['buf2Long'](_0x535acb['slice'](_0x329689,_0x329689+0x2));_0x329689+=0x2;for(let _0x2c137a=0x0;_0x2c137a<_0x59ae17;_0x2c137a++){let _0xc0c0c3=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x1));Log['hsmDebug']('ResponseType:\x20'+_0xc0c0c3),_0x329689++;if(_0xc0c0c3==ResponseTypes[_0x35ce2f(0xfa)]){let _0x26beae=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x2));_0x329689+=0x2,Log['hsmDebug'](_0x35ce2f(0x10f)+_0x26beae);let _0x355a5b=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x1));_0x329689++,Log['hsmDebug'](_0x35ce2f(0x19f)+_0x355a5b);let _0x53e9c7=Util[_0x35ce2f(0x15d)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+_0x355a5b));_0x329689+=_0x355a5b,Log['hsmDebug'](_0x35ce2f(0x198)+_0x53e9c7);let _0x297fb2=this['getNewTopicData'](_0x53e9c7);if(_0x297fb2){this['topicList'][_0x26beae]=_0x297fb2;let _0x2cb4c3=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x1));_0x329689++,Log[_0x35ce2f(0x1b4)](_0x35ce2f(0x1fe)+_0x2cb4c3);for(let _0x2ebf59=0x0;_0x2ebf59<_0x2cb4c3;_0x2ebf59++){let _0x45929f=Util['buf2Long'](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x4));_0x297fb2[_0x35ce2f(0x21e)](_0x2ebf59,_0x45929f),_0x329689+=0x4,Log[_0x35ce2f(0x1b4)](_0x2ebf59+':'+_0x45929f);}_0x329689+=0x2;let _0x22f9cb=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x2));_0x329689+=0x2,Log[_0x35ce2f(0x1b4)]('multi:\x20'+_0x22f9cb);let _0x4dc5d0=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x1));_0x329689++,Log[_0x35ce2f(0x1b4)](_0x35ce2f(0x217)+_0x4dc5d0),_0x297fb2['setMultiplierAndPrec'](_0x22f9cb,_0x4dc5d0);for(let _0x30e68a=0x0;_0x30e68a<0x3;_0x30e68a++){let _0x2721a8=Util[_0x35ce2f(0xe4)](_0x535acb['slice'](_0x329689,_0x329689+0x1));_0x329689++;let _0x571c12=Util[_0x35ce2f(0x15d)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+_0x2721a8));_0x329689+=_0x2721a8,_0x297fb2[_0x35ce2f(0x212)](_0x30e68a,_0x571c12),Log[_0x35ce2f(0x1b4)]('strVal:\x20'+_0x571c12);}let _0x5939d9=_0x297fb2[_0x35ce2f(0x120)]();if(_0x5939d9)_0xd59f4e[_0x35ce2f(0x11e)](_0x5939d9);}else Log[_0x35ce2f(0x1b4)](_0x35ce2f(0x226));}else{if(_0xc0c0c3==ResponseTypes[_0x35ce2f(0x14c)]||_0xc0c0c3==ResponseTypes[_0x35ce2f(0x1ec)]){Log[_0x35ce2f(0x1b4)](_0x35ce2f(0x11b)+_0xc0c0c3);let _0xc57fe2=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x2));Log[_0x35ce2f(0x1b4)](_0x35ce2f(0x10f)+_0xc57fe2),_0x329689+=0x2;let _0x3ba997=this['topicList'][_0xc57fe2];if(!_0x3ba997)console[_0x35ce2f(0x1d9)](_0x35ce2f(0x103));else{let _0x1ee219;_0xc0c0c3!=ResponseTypes[_0x35ce2f(0x1ec)]?(_0x1ee219=Util[_0x35ce2f(0xe4)](_0x535acb['slice'](_0x329689,_0x329689+0x1)),_0x329689++):_0x1ee219=_0x3ba997[_0x35ce2f(0x1fb)];Log['hsmDebug'](_0x35ce2f(0x1fe)+_0x1ee219);for(let _0x21b68f=0x0;_0x21b68f<_0x1ee219;_0x21b68f++){let _0x246570=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x4));_0x3ba997[_0x35ce2f(0x21e)](_0x21b68f,_0x246570),Log[_0x35ce2f(0x1b4)](_0x35ce2f(0x1f4)+_0x21b68f+_0x35ce2f(0x1fd)+_0x246570),_0x329689+=0x4;}}let _0x14c428=_0x3ba997[_0x35ce2f(0x120)]();if(_0x14c428)_0xd59f4e['push'](_0x14c428);}else console[_0x35ce2f(0x1d9)](_0x35ce2f(0x1aa)+_0xc0c0c3);}}return _0xd59f4e[_0x35ce2f(0x1eb)]>0x0?_0xd59f4e:null;}else{if(_0x15d55c==BinRespTypes[_0x35ce2f(0xfc)]||_0x15d55c==BinRespTypes[_0x35ce2f(0x135)]){let _0xf09f08=this[_0x35ce2f(0x1b9)](_0x535acb,_0x329689);const _0x57a97e={};switch(_0xf09f08){case BinRespStat['OK']:_0x57a97e[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT['OK'],_0x57a97e[RESPONSE_KEYS[_0x35ce2f(0x133)]]=_0x15d55c==BinRespTypes[_0x35ce2f(0xfc)]?RespTypeValues[_0x35ce2f(0x154)]:RespTypeValues[_0x35ce2f(0xf8)],_0x57a97e[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES[_0x35ce2f(0x1d6)],_0x57a97e[RESPONSE_KEYS['STAT_CODE']]=RespCodes[_0x35ce2f(0x1d2)];break;case BinRespStat[_0x35ce2f(0x175)]:_0x57a97e[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT[_0x35ce2f(0x175)];_0x15d55c==BinRespTypes[_0x35ce2f(0xfc)]?(_0x57a97e[RESPONSE_KEYS[_0x35ce2f(0x133)]]=RespTypeValues[_0x35ce2f(0x154)],_0x57a97e[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=_0x35ce2f(0x112),_0x57a97e[RESPONSE_KEYS[_0x35ce2f(0x1e1)]]=RespCodes[_0x35ce2f(0x1a2)]):(_0x57a97e[RESPONSE_KEYS[_0x35ce2f(0x133)]]=RespTypeValues[_0x35ce2f(0xf8)],_0x57a97e[RESPONSE_KEYS['MSG']]='unsubscription\x20\x20failed',_0x57a97e[RESPONSE_KEYS['STAT_CODE']]=RespCodes[_0x35ce2f(0x181)]);break;}return this['sendJsonArrResp'](_0x57a97e);}else{if(_0x15d55c==BinRespTypes[_0x35ce2f(0x173)]){let _0x36ff4b=this[_0x35ce2f(0x1b9)](_0x535acb,_0x329689);const _0x4bcd31={};switch(_0x36ff4b){case BinRespStat['OK']:_0x4bcd31[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT['OK'],_0x4bcd31[RESPONSE_KEYS['TYPE']]=RespTypeValues[_0x35ce2f(0xfa)],_0x4bcd31[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES[_0x35ce2f(0x1d6)],_0x4bcd31[RESPONSE_KEYS['STAT_CODE']]=RespCodes['SUCCESS'];break;case BinRespStat[_0x35ce2f(0x175)]:_0x4bcd31[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT['NOT_OK'],_0x4bcd31[RESPONSE_KEYS[_0x35ce2f(0x133)]]=RespTypeValues[_0x35ce2f(0xfa)],_0x4bcd31[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES[_0x35ce2f(0x10b)],_0x4bcd31[RESPONSE_KEYS[_0x35ce2f(0x1e1)]]=RespCodes['SNAPSHOT_FAILED'];break;}return this['sendJsonArrResp'](_0x4bcd31);}else{if(_0x15d55c==BinRespTypes[_0x35ce2f(0x129)]||_0x15d55c==BinRespTypes['CHRESUME_TYPE']){let _0x53b9a2=this[_0x35ce2f(0x1b9)](_0x535acb,_0x329689);const _0x5da942={};switch(_0x53b9a2){case BinRespStat['OK']:_0x5da942[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT['OK'],_0x5da942[RESPONSE_KEYS[_0x35ce2f(0x133)]]=_0x15d55c==BinRespTypes[_0x35ce2f(0x129)]?RespTypeValues[_0x35ce2f(0xe5)]:RespTypeValues[_0x35ce2f(0x110)],_0x5da942[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES['SUCCESSFUL'],_0x5da942[RESPONSE_KEYS['STAT_CODE']]=RespCodes['SUCCESS'];break;case BinRespStat['NOT_OK']:_0x5da942[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT[_0x35ce2f(0x175)],_0x5da942[RESPONSE_KEYS['TYPE']]=_0x15d55c==BinRespTypes[_0x35ce2f(0x129)]?RespTypeValues[_0x35ce2f(0xe5)]:RespTypeValues[_0x35ce2f(0x110)],_0x5da942[RESPONSE_KEYS['MSG']]=RESPONSE_VALUES[_0x35ce2f(0x10b)],_0x5da942[RESPONSE_KEYS[_0x35ce2f(0x1e1)]]=_0x15d55c==BinRespTypes[_0x35ce2f(0x129)]?RespCodes[_0x35ce2f(0x167)]:RespCodes[_0x35ce2f(0x116)];break;}return this['sendJsonArrResp'](_0x5da942);}else{if(_0x15d55c==BinRespTypes['OPC_SUBSCRIBE']){let _0x35e65a=this[_0x35ce2f(0x1b9)](_0x535acb,_0x329689);_0x329689+=0x5;const _0x1a9034={};switch(_0x35e65a){case BinRespStat['OK']:_0x1a9034[RESPONSE_KEYS['STATUS']]=STAT['OK'],_0x1a9034[RESPONSE_KEYS[_0x35ce2f(0x133)]]=RespTypeValues['OPC'],_0x1a9034[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES[_0x35ce2f(0x1d6)],_0x1a9034[RESPONSE_KEYS[_0x35ce2f(0x1e1)]]=RespCodes[_0x35ce2f(0x1d2)];let _0x560df2=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,++_0x329689)),_0x32f4d7=Util[_0x35ce2f(0xe4)](_0x535acb['slice'](_0x329689,_0x329689+0x2));_0x329689+=0x2;let _0x271b3b=Util[_0x35ce2f(0x15d)](_0x535acb['slice'](_0x329689,_0x329689+_0x32f4d7));_0x329689+=_0x32f4d7,_0x1a9034[_0x35ce2f(0x139)]=_0x271b3b,_0x560df2=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,++_0x329689)),_0x32f4d7=Util[_0x35ce2f(0xe4)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+0x2)),_0x329689+=0x2;let _0x37d663=Util[_0x35ce2f(0x15d)](_0x535acb[_0x35ce2f(0x152)](_0x329689,_0x329689+_0x32f4d7));_0x329689+=_0x32f4d7,_0x1a9034[_0x35ce2f(0x1ed)]=JSON[_0x35ce2f(0x1c7)](_0x37d663)[_0x35ce2f(0x1b8)];break;case BinRespStat[_0x35ce2f(0x175)]:_0x1a9034[RESPONSE_KEYS['STATUS']]=STAT[_0x35ce2f(0x175)],_0x1a9034[RESPONSE_KEYS[_0x35ce2f(0x133)]]=RespTypeValues['OPC'],_0x1a9034[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES['FAILED'],_0x1a9034[RESPONSE_KEYS[_0x35ce2f(0x1e1)]]=0x2b20;break;}return this[_0x35ce2f(0x130)](_0x1a9034);}else{if(_0x15d55c==BinRespTypes[_0x35ce2f(0x20a)]){let _0x3fb25d=this[_0x35ce2f(0x1b9)](_0x535acb,_0x329689);const _0x1b1d4a={};switch(_0x3fb25d){case BinRespStat['OK']:_0x1b1d4a[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT['OK'],_0x1b1d4a[RESPONSE_KEYS[_0x35ce2f(0x133)]]=_0x15d55c==BinRespTypes[_0x35ce2f(0x20a)]?RespTypeValues[_0x35ce2f(0x1ec)]:RespTypeValues[_0x35ce2f(0x1db)],_0x1b1d4a[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES[_0x35ce2f(0x1d6)],_0x1b1d4a[RESPONSE_KEYS['STAT_CODE']]=RespCodes[_0x35ce2f(0x1d2)];break;case BinRespStat['NOT_OK']:_0x1b1d4a[RESPONSE_KEYS[_0x35ce2f(0x1b2)]]=STAT[_0x35ce2f(0x175)],_0x1b1d4a[RESPONSE_KEYS[_0x35ce2f(0x133)]]=_0x15d55c==BinRespTypes['LITE_FULL']?RespTypeValues['LITE']:RespTypeValues['FULL'],_0x1b1d4a[RESPONSE_KEYS[_0x35ce2f(0xfb)]]=RESPONSE_VALUES[_0x35ce2f(0x10b)],_0x1b1d4a[RESPONSE_KEYS[_0x35ce2f(0x1e1)]]=0x2ee1;break;}return this['sendJsonArrResp'](_0x1b1d4a);}else return null;}}}}}}}[a0_0x56c57c(0x1b9)](_0x5d89ce,_0x5cd477){const _0x2d5792=a0_0x56c57c;let _0x571ae1=BinRespStat['NOT_OK'][_0x2d5792(0x1ff)](),_0x3d03d3=Util[_0x2d5792(0xe4)](_0x5d89ce[_0x2d5792(0x152)](_0x5cd477,++_0x5cd477));if(_0x3d03d3>0x0){let _0x1addcc=Util[_0x2d5792(0xe4)](_0x5d89ce[_0x2d5792(0x152)](_0x5cd477,++_0x5cd477)),_0x11c51e=Util[_0x2d5792(0xe4)](_0x5d89ce[_0x2d5792(0x152)](_0x5cd477,_0x5cd477+0x2));_0x5cd477+=0x2,_0x571ae1=Util[_0x2d5792(0x15d)](_0x5d89ce[_0x2d5792(0x152)](_0x5cd477,_0x5cd477+_0x11c51e)),_0x5cd477+=_0x11c51e;}return _0x571ae1;}['getNewTopicData'](_0x418bb5){const _0x2c140a=a0_0x56c57c;let _0x2e4436=_0x418bb5['split']('|')[0x0],_0x252d09=null;switch(_0x2e4436){case TopicTypes[_0x2c140a(0x171)]:_0x252d09=new ScripTopicData(),_0x252d09[_0x2c140a(0x1fb)]=Constants['SCRIP_LITE_FCOUNT'];break;case TopicTypes[_0x2c140a(0x228)]:_0x252d09=new IndexTopicData(),_0x252d09[_0x2c140a(0x1fb)]=Constants[_0x2c140a(0x14b)];break;case TopicTypes[_0x2c140a(0x124)]:_0x252d09=new DepthTopicData();break;}return _0x252d09;}[a0_0x56c57c(0xf5)](_0x2a98a0){const _0x235e24=a0_0x56c57c;if(_0x2a98a0){Log['hsmDebug'](_0x235e24(0x115)),ScripTopicData[_0x235e24(0x166)]=new Array(),IndexTopicData[_0x235e24(0x166)]=new Array(),DepthTopicData[_0x235e24(0x166)]=new Array();let _0xdacd=new Map();_0x2a98a0[_0x235e24(0x1ae)][_0x235e24(0x159)](function(_0x37c6ac){const _0x158a53=_0x235e24;_0xdacd[_0x158a53(0xf3)](_0x37c6ac['fid'],_0x37c6ac);}),Constants[_0x235e24(0x1c3)]=_0x2a98a0['scrip_lite']['hfid'],Constants[_0x235e24(0x14b)]=_0x2a98a0[_0x235e24(0x149)][_0x235e24(0xfe)],_0x2a98a0[_0x235e24(0x107)][_0x235e24(0x11e)](SCRIPFID_MAP[_0x235e24(0xe8)]),_0x2a98a0[_0x235e24(0x107)][_0x235e24(0x11e)](SCRIPFID_MAP[_0x235e24(0x1f7)]),_0x2a98a0['scrip']['push'](SCRIPFID_MAP[_0x235e24(0x219)]),_0x2a98a0[_0x235e24(0x1f6)][_0x235e24(0x11e)](INDEXFID_MAP[_0x235e24(0xe8)]),_0x2a98a0[_0x235e24(0x1f6)]['push'](INDEXFID_MAP[_0x235e24(0x1f7)]),ScripTopicData['LTP_INDEX']=_0x2a98a0['scrip'][_0x235e24(0x1c4)](SCRIPFID_MAP[_0x235e24(0x1a3)]),ScripTopicData['VOLUME_INDEX']=_0x2a98a0['scrip'][_0x235e24(0x1c4)](SCRIPFID_MAP[_0x235e24(0x160)]),ScripTopicData[_0x235e24(0x180)]=_0x2a98a0['scrip']['indexOf'](SCRIPFID_MAP[_0x235e24(0x119)]),ScripTopicData['CHANGE_INDEX']=_0x2a98a0[_0x235e24(0x107)]['indexOf'](SCRIPFID_MAP[_0x235e24(0xe8)]),ScripTopicData[_0x235e24(0x221)]=_0x2a98a0[_0x235e24(0x107)][_0x235e24(0x1c4)](SCRIPFID_MAP['PCHANGE']),ScripTopicData['CLOSE_INDEX']=_0x2a98a0[_0x235e24(0x107)][_0x235e24(0x1c4)](SCRIPFID_MAP[_0x235e24(0x1d0)]),ScripTopicData['TURNOVER_INDEX']=_0x2a98a0[_0x235e24(0x107)][_0x235e24(0x1c4)](SCRIPFID_MAP[_0x235e24(0x219)]),IndexTopicData[_0x235e24(0x1e5)]=_0x2a98a0[_0x235e24(0x1f6)][_0x235e24(0x1c4)](INDEXFID_MAP[_0x235e24(0x1a3)]),IndexTopicData[_0x235e24(0x111)]=_0x2a98a0['index'][_0x235e24(0x1c4)](INDEXFID_MAP[_0x235e24(0x1d0)]),IndexTopicData[_0x235e24(0x1dc)]=_0x2a98a0[_0x235e24(0x1f6)]['indexOf'](INDEXFID_MAP[_0x235e24(0xe8)]),IndexTopicData[_0x235e24(0x221)]=_0x2a98a0['index'][_0x235e24(0x1c4)](INDEXFID_MAP[_0x235e24(0x1f7)]);let _0x21d9de=_0x2a98a0[_0x235e24(0x107)];for(let _0x49791e=0x0;_0x49791e<_0x21d9de[_0x235e24(0x1eb)];_0x49791e++){let _0x3ebde0=_0xdacd[_0x235e24(0x21a)](_0x21d9de[_0x49791e]),_0x3a1519=this[_0x235e24(0x19e)](_0x3ebde0[_0x235e24(0x1a8)]);ScripTopicData[_0x235e24(0x166)][_0x49791e]=new FieldData(_0x3ebde0[_0x235e24(0x163)],_0x3ebde0[_0x235e24(0x164)],_0x3a1519,_0x3ebde0[_0x235e24(0x176)]);}let _0x829d88=_0x2a98a0[_0x235e24(0x1f6)];for(let _0x1efe7f=0x0;_0x1efe7f<_0x829d88['length'];_0x1efe7f++){let _0x3157b7=_0xdacd[_0x235e24(0x21a)](_0x829d88[_0x1efe7f]),_0x48f416=this[_0x235e24(0x19e)](_0x3157b7[_0x235e24(0x1a8)]);IndexTopicData[_0x235e24(0x166)][_0x1efe7f]=new FieldData(_0x3157b7['fid'],_0x3157b7[_0x235e24(0x164)],_0x48f416,_0x3157b7[_0x235e24(0x176)]);}let _0x316c44=_0x2a98a0['depth'];for(let _0x631e65=0x0;_0x631e65<_0x316c44[_0x235e24(0x1eb)];_0x631e65++){let _0x3be555=_0xdacd['get'](_0x316c44[_0x631e65]),_0x425398=this[_0x235e24(0x19e)](_0x3be555[_0x235e24(0x1a8)]);DepthTopicData[_0x235e24(0x166)][_0x631e65]=new FieldData(_0x3be555['fid'],_0x3be555[_0x235e24(0x164)],_0x425398,_0x3be555['details']);}}else console[_0x235e24(0x1d9)](_0x235e24(0x1b3));}[a0_0x56c57c(0x19e)](_0x47b2ba){const _0x5ecd59=a0_0x56c57c;let _0x36649d=FieldTypes[_0x5ecd59(0x1ab)];switch(_0x47b2ba){case _0x5ecd59(0x141):_0x36649d=FieldTypes[_0x5ecd59(0x106)];break;case _0x5ecd59(0x1b5):_0x36649d=FieldTypes[_0x5ecd59(0x1e9)];break;case _0x5ecd59(0x207):_0x36649d=FieldTypes[_0x5ecd59(0x18a)];break;}return _0x36649d;}[a0_0x56c57c(0x130)](_0x5abc1d){let _0x174e71=[];return _0x174e71['push'](_0x5abc1d),_0x174e71;}['startPingInterval'](){const _0x5c0eca=a0_0x56c57c;this[_0x5c0eca(0x1fa)]=setInterval(this[_0x5c0eca(0x208)],this[_0x5c0eca(0x117)],this);}['pingFunction'](_0x56a639){const _0x27bb1b=a0_0x56c57c;if(this['inWS']?.[_0x27bb1b(0x13d)]==WebSocket[_0x27bb1b(0xe9)]&&_0x56a639['inWS'])_0x56a639[_0x27bb1b(0x128)][_0x27bb1b(0x17d)](BinRequest['pingRequest']);else{if(_0x56a639['intervalId'])clearInterval(_0x56a639[_0x27bb1b(0x1fa)]);}}}class HSIWebSocket{constructor(){const _0x483542=a0_0x56c57c;this['isCalled']=!![],this[_0x483542(0x15b)]=0x1e;}static[a0_0x56c57c(0x185)](){const _0x5016d9=a0_0x56c57c;return this[_0x5016d9(0x223)]||(this[_0x5016d9(0x223)]=new HSIWebSocket());}['close'](){const _0x8ea8f9=a0_0x56c57c;this['stopHearBeat'](),this[_0x8ea8f9(0x17b)][_0x8ea8f9(0x1c9)]();}[a0_0x56c57c(0x18d)](_0x5365af,_0x13fea3){const _0x55d94d=a0_0x56c57c;this[_0x55d94d(0x174)]=_0x5365af,this[_0x55d94d(0x1ac)]=(_0x13fea3?_0x13fea3:this[_0x55d94d(0x15b)])*0x3e8;this[_0x55d94d(0x17b)]&&(this['hsiWs'][_0x55d94d(0x209)]=function(_0x382d6e){},this['hsiWs']['onmessage']=function(_0x5b8631){},this['hsiWs'][_0x55d94d(0x1e6)]=function(_0xa73830){},this[_0x55d94d(0x17b)][_0x55d94d(0x205)]=function(_0x3613e9){},this[_0x55d94d(0x17b)][_0x55d94d(0x1c9)]());this[_0x55d94d(0x17b)]=new WebSocket(_0x5365af);if(this[_0x55d94d(0x17b)])this[_0x55d94d(0x17b)][_0x55d94d(0x17a)]=_0x55d94d(0x18e);else console['error'](_0x55d94d(0x170));this['hsiWs'][_0x55d94d(0x209)]=function(){const _0x3d76e2=_0x55d94d;Log[_0x3d76e2(0x21d)](_0x3d76e2(0x1e2)),HSIWebSocket[_0x3d76e2(0x223)][_0x3d76e2(0x118)]();},this['hsiWs'][_0x55d94d(0x1b1)]=function(_0x21ca56){const _0x337103=_0x55d94d;Log['hsiDebug'](_0x21ca56);let _0x198824=_0x21ca56[_0x337103(0x1b8)],_0x433da5=JSON[_0x337103(0x1c7)](_0x198824);if(_0x433da5&&_0x433da5['task']=='cn'&&_0x433da5['ak']=='ok'){let _0x3480ee={'type':'hb'};HSIWebSocket[_0x337103(0x223)][_0x337103(0x108)]=setInterval(function(){const _0xbbd4ff=_0x337103;HSIWebSocket[_0xbbd4ff(0x223)]['isCalled']=!![],HSIWebSocket['_instance'][_0xbbd4ff(0x17b)][_0xbbd4ff(0x17d)](JSON[_0xbbd4ff(0x17c)](_0x3480ee));},_0x13fea3);}Log[_0x337103(0x21d)](_0x198824);if(_0x198824)HSIWebSocket[_0x337103(0x223)]['onMessage'](_0x198824);},this['hsiWs'][_0x55d94d(0x1e6)]=function(){const _0x9fa969=_0x55d94d;HSIWebSocket[_0x9fa969(0x223)][_0x9fa969(0x1a4)](),HSIWebSocket[_0x9fa969(0x223)]['onClose']();},this[_0x55d94d(0x17b)][_0x55d94d(0x205)]=function(){const _0x1c8e3d=_0x55d94d;HSIWebSocket[_0x1c8e3d(0x223)][_0x1c8e3d(0x1a4)](),HSIWebSocket[_0x1c8e3d(0x223)][_0x1c8e3d(0x172)]();};}[a0_0x56c57c(0x17d)](_0x169b4d){const _0x1b5765=a0_0x56c57c;let _0x3f86d2=JSON[_0x1b5765(0x1c7)](_0x169b4d);Log['hsiDebug'](_0x3f86d2);let _0x539f=_0x3f86d2['type'],_0x3f90b0;if(_0x539f===ReqTypeValues[_0x1b5765(0x1bc)]){if(_0x3f86d2[Keys[_0x1b5765(0x1c8)]]!==undefined&&_0x3f86d2[Keys[_0x1b5765(0x11c)]]!==undefined&&_0x3f86d2[Keys[_0x1b5765(0x20f)]]!==undefined)_0x3f90b0={'type':'cn','Authorization':_0x3f86d2[Keys[_0x1b5765(0x1c8)]],'Sid':_0x3f86d2[Keys['SID']],'src':_0x3f86d2[Keys[_0x1b5765(0x20f)]]},this[_0x1b5765(0x15e)]=_0x3f90b0;else{if(_0x3f86d2[Keys['X_ACCESS_TOKEN']]!==undefined&&_0x3f86d2[Keys[_0x1b5765(0x20f)]]!==undefined)_0x3f90b0={'type':'cn','x-access-token':_0x3f86d2[Keys['X_ACCESS_TOKEN']],'src':_0x3f86d2[Keys[_0x1b5765(0x20f)]]},this['reqData']=_0x3f90b0;else console[_0x1b5765(0x1d9)]('Invalid\x20connection\x20mode\x20!');}}else{if(_0x539f===ReqTypeValues[_0x1b5765(0x224)])this[_0x1b5765(0x15e)]=this[_0x1b5765(0x15e)]['type']=_0x1b5765(0x1f9),_0x3f90b0=this[_0x1b5765(0x15e)];else{if(_0x539f===ReqTypeValues[_0x1b5765(0x137)]){}else{if(_0x539f===ReqTypeValues['STR'])_0x3f90b0=_0x3f86d2[_0x1b5765(0x1b8)];else console[_0x1b5765(0x1d9)](_0x1b5765(0x16e));}}}if(this[_0x1b5765(0x17b)]&&_0x3f90b0)this[_0x1b5765(0x17b)][_0x1b5765(0x17d)](JSON[_0x1b5765(0x17c)](_0x3f90b0));else console[_0x1b5765(0x1d9)](_0x1b5765(0x10c));}['stopHearBeat'](){const _0x3da4d2=a0_0x56c57c;this[_0x3da4d2(0x1be)]&&(this[_0x3da4d2(0x1be)]=![],this['interval']&&clearInterval(this[_0x3da4d2(0x108)]));}}
3
4
 
4
5
  module.exports = HSWebSocket
@@ -785,6 +785,39 @@ class FyersApi {
785
785
  }
786
786
  })
787
787
  }
788
+
789
+ /**
790
+ * use to get option chain data of symbols.
791
+ * @param {Object} req - symbol is mandatory, timestamp and strikecount is optional with default value of current expiry and 50 respectively
792
+ * @returns {Promise} returns success message on resolve or error message and error code on failure
793
+ */
794
+ getOptionChain = async (req) => {
795
+ var funcname = 'getOptionChain'
796
+ var logger = this.Logger
797
+ let AuthrizationToken = this.AccessToken
798
+ let vers = this.Version
799
+ return new Promise(async function (resolve, reject) {
800
+ try {
801
+ var url = Config.data_Api1 + Config["optionChain"]
802
+ url = generateUrl(url, req)
803
+ await axios.get((url), {
804
+ headers: {
805
+ Authorization: AuthrizationToken,
806
+ version: vers
807
+ }
808
+ })
809
+ .then(Response => {
810
+ logger.debug(`${funcname} response`, Response.data, funcname)
811
+ resolve(Response.data)
812
+ })
813
+ }
814
+ catch (e) {
815
+ var err = new errorHandler(e).getError()
816
+ logger.error(`${funcname} response`, { "Error": err, "inputs": req }, funcname)
817
+ reject(err)
818
+ }
819
+ })
820
+ }
788
821
  }
789
822
 
790
823
  function generateUrl(url, queryObject) {
package/config/config.js CHANGED
@@ -22,5 +22,6 @@ module.exports.Config = {
22
22
  "multi_orders" : "/multi-order/sync",
23
23
  "history" : "/history",
24
24
  "quotes" : "/quotes",
25
- "market_depth" : "/depth"
25
+ "market_depth" : "/depth",
26
+ "optionChain" : "/options-chain-v3"
26
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fyers-api-v3",
3
- "version": "1.0.3",
3
+ "version": "1.2.0",
4
4
  "description": "connect to fyers API",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/sample/api.js CHANGED
@@ -2,7 +2,7 @@ var fyersModel= require("../index.js").fyersModel
2
2
 
3
3
  var fyers= new fyersModel()
4
4
 
5
- fyers.setAppId("QC7T0H8425-100")
5
+ fyers.setAppId("FNG7034WFS-100")
6
6
 
7
7
  fyers.setRedirectUrl("https://www.google.com")
8
8
  // generate authcode
@@ -25,22 +25,10 @@ fyers.setRedirectUrl("https://www.google.com")
25
25
  // })
26
26
  ////////////////////////////
27
27
 
28
- fyers.setAccessToken("")
28
+ fyers.setAccessToken("eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhcGkuZnllcnMuaW4iLCJpYXQiOjE3MTM4NDg4NTUsImV4cCI6MTcxMzkxODYzNSwibmJmIjoxNzEzODQ4ODU1LCJhdWQiOlsieDowIiwieDoxIiwieDoyIiwiZDoxIiwiZDoyIiwieDoxIiwieDowIl0sInN1YiI6ImFjY2Vzc190b2tlbiIsImF0X2hhc2giOiJnQUFBQUFCbUowSVhwNVRObmRVM1FyaGlxdUM1al9KNE91eVBFMTVQT1hsVHVKbEdSdnlqbVduY3FRWVJSaE1yZ293anlQblhEZkxYT1JoMWhRUXhaVFItQnBOTVFrMXhMc2NJSEQtMTdVQ2tyVmFRVkZTeEhjTT0iLCJkaXNwbGF5X25hbWUiOiJDSEFORFJBU0hFS0FSIFJBS1NISVRIIEdPV0RBIiwib21zIjoiSzEiLCJoc21fa2V5IjoiYTAyOWY3OGE4ZTczNGM1ZWU5NmFkNDJkZjRiYjRmOTFlM2JhODU1OWViMmJiZWMxMGIzYzdiYzMiLCJmeV9pZCI6IllDMDAyMDciLCJhcHBUeXBlIjoxMDAsInBvYV9mbGFnIjoiTiJ9.xXOkJerLWqe2fPNZRomuQhxu7rZ0NdmDnuzdK0-dlgg")
29
29
 
30
- fyers.get_profile().then((response)=>{
31
- console.log(response)
32
- }).catch((err)=>{
33
- console.log(err)
34
- })
35
-
36
- fyers.getQuotes(["NSE:SBIN-EQ","NSE:TCS-EQ"]).then((response)=>{
37
- console.log(response)
38
- }).catch((err)=>{
39
- console.log(err)
40
- })
41
-
42
- fyers.getMarketDepth({"symbol":["NSE:SBIN-EQ","NSE:TCS-EQ"],"ohlcv_flag":1}).then((response)=>{
43
- console.log(response)
30
+ fyers.getOptionChain({"symbol":"NSE:SBIN-EQ","strikecount":1}).then((response)=>{
31
+ console.log(response.data)
44
32
  }).catch((err)=>{
45
33
  console.log(err)
46
34
  })