@gooin/garmin-connect 1.8.6 → 1.8.8

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.
Files changed (65) hide show
  1. package/dist/common/FileMFASessionStorage.js +1 -1
  2. package/dist/common/HttpClient copy.js +1 -1
  3. package/dist/common/HttpClient.d.ts +1 -0
  4. package/dist/common/HttpClient.js +1 -1
  5. package/dist/common/HttpClient.js.map +1 -1
  6. package/dist/common/HttpClientOLD.js +1 -1
  7. package/dist/common/HttpClientOLDV1.js +1 -1
  8. package/dist/common/HttpClientV1.js +1 -1
  9. package/dist/common/MFAManager.js +1 -1
  10. package/dist/common/MFASessionStorage.js +1 -1
  11. package/dist/common/RedisMFASessionStorage.js +1 -1
  12. package/dist/garmin/GarminConnect.js +1 -1
  13. package/dist/garmin/UrlClass.js +1 -1
  14. package/dist/garmin/common/DateUtils.js +1 -1
  15. package/dist/garmin/common/HydrationUtils.js +1 -1
  16. package/dist/garmin/common/WeightUtils.js +1 -1
  17. package/dist/garmin/modules/activity/base.js +1 -1
  18. package/dist/garmin/modules/activity/cycling.js +1 -1
  19. package/dist/garmin/modules/activity/running.js +1 -1
  20. package/dist/garmin/modules/activity/training-status.js +1 -1
  21. package/dist/garmin/modules/coach/activity-summary.js +1 -1
  22. package/dist/garmin/modules/coach/helpers.js +1 -1
  23. package/dist/garmin/modules/coach/sleep-analysis.js +1 -1
  24. package/dist/garmin/modules/coach/training-overview.js +1 -1
  25. package/dist/garmin/modules/coach/wellness-overview.js +1 -1
  26. package/dist/garmin/modules/coach/wellness-summary.js +1 -1
  27. package/dist/garmin/modules/coach.js +1 -1
  28. package/dist/garmin/modules/course.js +1 -1
  29. package/dist/garmin/modules/device.js +1 -1
  30. package/dist/garmin/modules/misc.js +1 -1
  31. package/dist/garmin/modules/types.js +1 -1
  32. package/dist/garmin/modules/user.js +1 -1
  33. package/dist/garmin/modules/wellness/body-battery.js +1 -1
  34. package/dist/garmin/modules/wellness/heart-rate.js +1 -1
  35. package/dist/garmin/modules/wellness/hrv.js +1 -1
  36. package/dist/garmin/modules/wellness/hydration.js +1 -1
  37. package/dist/garmin/modules/wellness/sleep.js +1 -1
  38. package/dist/garmin/modules/wellness/weight.d.ts +13 -1
  39. package/dist/garmin/modules/wellness/weight.js +1 -1
  40. package/dist/garmin/modules/wellness/weight.js.map +1 -1
  41. package/dist/garmin/modules/workout.js +1 -1
  42. package/dist/garmin/types/activity-stats.js +1 -1
  43. package/dist/garmin/types/activity.js +1 -1
  44. package/dist/garmin/types/body-battery.js +1 -1
  45. package/dist/garmin/types/coach.js +1 -1
  46. package/dist/garmin/types/course.js +1 -1
  47. package/dist/garmin/types/cycling.js +1 -1
  48. package/dist/garmin/types/device.js +1 -1
  49. package/dist/garmin/types/golf.js +1 -1
  50. package/dist/garmin/types/heartrate.js +1 -1
  51. package/dist/garmin/types/hrv.js +1 -1
  52. package/dist/garmin/types/hydration.js +1 -1
  53. package/dist/garmin/types/index.js +1 -1
  54. package/dist/garmin/types/personal-info.js +1 -1
  55. package/dist/garmin/types/race-prediction.js +1 -1
  56. package/dist/garmin/types/sleep.js +1 -1
  57. package/dist/garmin/types/training-status.js +1 -1
  58. package/dist/garmin/types/weight.js +1 -1
  59. package/dist/garmin/types/workout.js +1 -1
  60. package/dist/garmin/workouts/Running.js +1 -1
  61. package/dist/garmin/workouts/templates/RunningTemplate.js +1 -1
  62. package/dist/garmin/workouts/workout-draft.js +1 -1
  63. package/dist/index.js +1 -1
  64. package/dist/utils.js +1 -1
  65. package/package.json +1 -1
@@ -1 +1 @@
1
- 'use strict';const a0_0x5c6317=a0_0x33a1;(function(_0x858e43,_0x4f861e){const _0xb43b40=a0_0x33a1,_0x4c7b8f=_0x858e43();while(!![]){try{const _0x3d2bab=parseInt(_0xb43b40(0x154))/0x1*(-parseInt(_0xb43b40(0x13e))/0x2)+-parseInt(_0xb43b40(0x178))/0x3*(parseInt(_0xb43b40(0x177))/0x4)+-parseInt(_0xb43b40(0x173))/0x5*(-parseInt(_0xb43b40(0x158))/0x6)+parseInt(_0xb43b40(0x15d))/0x7+-parseInt(_0xb43b40(0x14a))/0x8*(parseInt(_0xb43b40(0x16e))/0x9)+-parseInt(_0xb43b40(0x15b))/0xa+parseInt(_0xb43b40(0x162))/0xb;if(_0x3d2bab===_0x4f861e)break;else _0x4c7b8f['push'](_0x4c7b8f['shift']());}catch(_0x1ca367){_0x4c7b8f['push'](_0x4c7b8f['shift']());}}}(a0_0x339f,0xd4572));function a0_0x339f(){const _0x274adb=['MFA验证已取消','8488452YjBYBc','waiting','code','readdir','创建MFA存储目录失败:','14211725Nvvvtg','mkdir','log','unlink','未找到MFA验证会话:\x20','FileMFASessionStorage','replace','清理了\x20','__importDefault','access','join','resolvedAt','18aiccJA','storageDir','endsWith','default',',\x20状态:\x20','15GhxkWN','error','cleanupExpiredRequests','submitMFACode','5636dyWLuN','921UdrSVz','__esModule','readFile','map','resolved','now','2jslwgZ','status','rejected','message','rejectedAt','toISOString','writeFile','stringify','promises','.json','parse','utf8','2161336JQcgbv','getSessionFilePath','清理过期请求失败:','defineProperty','getActiveSessions','MFA验证会话状态不正确:\x20','cleanupRequest',',\x20sessionId\x20','ensureStorageDir',',\x20错误:\x20','503541ITqlBA','getTime',',\x20原因:\x20','\x20个过期的MFA验证会话','2913066RzhRft','获取活跃会话失败:','DEFAULT_TIMEOUT','16149600BSimjJ'];a0_0x339f=function(){return _0x274adb;};return a0_0x339f();}var __importDefault=this&&this[a0_0x5c6317(0x16a)]||function(_0x33642d){return _0x33642d&&_0x33642d['__esModule']?_0x33642d:{'default':_0x33642d};};Object[a0_0x5c6317(0x14d)](exports,a0_0x5c6317(0x179),{'value':!![]}),exports[a0_0x5c6317(0x167)]=void 0x0;const fs_1=require('fs'),path_1=__importDefault(require('path'));function a0_0x33a1(_0xc48a8d,_0x4212c9){_0xc48a8d=_0xc48a8d-0x13c;const _0x339f70=a0_0x339f();let _0x33a132=_0x339f70[_0xc48a8d];return _0x33a132;}class FileMFASessionStorage{constructor(_0x3e185e){const _0x41d434=a0_0x5c6317;this[_0x41d434(0x15a)]=0x5*0x3c*0x3e8,this[_0x41d434(0x16f)]=_0x3e185e,this[_0x41d434(0x152)]();}async[a0_0x5c6317(0x152)](){const _0x3dd3d9=a0_0x5c6317;try{await fs_1[_0x3dd3d9(0x146)][_0x3dd3d9(0x163)](this[_0x3dd3d9(0x16f)],{'recursive':!![]});}catch(_0x26920d){console[_0x3dd3d9(0x174)](_0x3dd3d9(0x161),_0x26920d);}}[a0_0x5c6317(0x14b)](_0x3d6d62){const _0x996659=a0_0x5c6317;return path_1[_0x996659(0x171)]['join'](this['storageDir'],_0x3d6d62+_0x996659(0x147));}async['waitForMFACode'](_0x2f8861,_0x4963ff=this['DEFAULT_TIMEOUT']){const _0x309714=a0_0x5c6317;await this[_0x309714(0x152)](),await this[_0x309714(0x150)](_0x2f8861);const _0x2d810a={'sessionId':_0x2f8861,'status':_0x309714(0x15e),'createdAt':new Date()[_0x309714(0x143)](),'timeout':_0x4963ff},_0x27b5b4=this[_0x309714(0x14b)](_0x2f8861);return await fs_1[_0x309714(0x146)][_0x309714(0x144)](_0x27b5b4,JSON[_0x309714(0x145)](_0x2d810a),_0x309714(0x149)),console[_0x309714(0x164)]('MFA验证会话已创建:\x20'+_0x2f8861),new Promise((_0x276d1f,_0x1ce846)=>{const _0x26541d=Date['now'](),_0x15eb4a=setInterval(async()=>{const _0x1c6cc1=a0_0x33a1;try{if(Date[_0x1c6cc1(0x13d)]()-_0x26541d>_0x4963ff){clearInterval(_0x15eb4a),await this[_0x1c6cc1(0x150)](_0x2f8861),_0x1ce846(new Error('MFA验证超时,请重新登录'));return;}try{const _0x78c200=await fs_1['promises'][_0x1c6cc1(0x17a)](_0x27b5b4,_0x1c6cc1(0x149)),_0x458463=JSON[_0x1c6cc1(0x148)](_0x78c200);if(_0x458463[_0x1c6cc1(0x13f)]===_0x1c6cc1(0x13c)&&_0x458463[_0x1c6cc1(0x15f)]){clearInterval(_0x15eb4a),await this[_0x1c6cc1(0x150)](_0x2f8861),_0x276d1f(_0x458463[_0x1c6cc1(0x15f)]);return;}if(_0x458463[_0x1c6cc1(0x13f)]===_0x1c6cc1(0x140)&&_0x458463[_0x1c6cc1(0x174)]){clearInterval(_0x15eb4a),await this[_0x1c6cc1(0x150)](_0x2f8861),_0x1ce846(new Error(_0x458463[_0x1c6cc1(0x174)]));return;}}catch(_0x55bc47){}}catch(_0x29824d){clearInterval(_0x15eb4a),await this[_0x1c6cc1(0x150)](_0x2f8861),_0x1ce846(_0x29824d instanceof Error?_0x29824d:new Error(String(_0x29824d)));}},0x3e8);});}async[a0_0x5c6317(0x176)](_0x4e8de3,_0x7a277a){const _0x8b9abc=a0_0x5c6317,_0x5d73ce=this[_0x8b9abc(0x14b)](_0x4e8de3);try{const _0x5c27a2=await fs_1['promises'][_0x8b9abc(0x17a)](_0x5d73ce,_0x8b9abc(0x149)),_0x922930=JSON[_0x8b9abc(0x148)](_0x5c27a2);if(_0x922930['status']!=='waiting')return console[_0x8b9abc(0x164)](_0x8b9abc(0x14f)+_0x4e8de3+_0x8b9abc(0x172)+_0x922930['status']),![];return _0x922930[_0x8b9abc(0x13f)]='resolved',_0x922930[_0x8b9abc(0x15f)]=_0x7a277a,_0x922930[_0x8b9abc(0x16d)]=new Date()['toISOString'](),await fs_1[_0x8b9abc(0x146)]['writeFile'](_0x5d73ce,JSON[_0x8b9abc(0x145)](_0x922930),_0x8b9abc(0x149)),console['log']('MFA验证码已提交:\x20code\x20'+_0x7a277a+_0x8b9abc(0x151)+_0x4e8de3),!![];}catch(_0x2de17a){return console['log'](_0x8b9abc(0x166)+_0x4e8de3+',\x20错误:\x20'+(_0x2de17a instanceof Error?_0x2de17a[_0x8b9abc(0x141)]:String(_0x2de17a))),![];}}async['cancelMFARequest'](_0x42c823,_0x287ac1=a0_0x5c6317(0x15c)){const _0x4c2bb8=a0_0x5c6317,_0x5cb2b3=this[_0x4c2bb8(0x14b)](_0x42c823);try{const _0x523f9a=await fs_1[_0x4c2bb8(0x146)][_0x4c2bb8(0x17a)](_0x5cb2b3,_0x4c2bb8(0x149)),_0x4e0c37=JSON[_0x4c2bb8(0x148)](_0x523f9a);return _0x4e0c37[_0x4c2bb8(0x13f)]=_0x4c2bb8(0x140),_0x4e0c37[_0x4c2bb8(0x174)]=_0x287ac1,_0x4e0c37[_0x4c2bb8(0x142)]=new Date()[_0x4c2bb8(0x143)](),await fs_1[_0x4c2bb8(0x146)]['writeFile'](_0x5cb2b3,JSON[_0x4c2bb8(0x145)](_0x4e0c37),_0x4c2bb8(0x149)),console['log']('MFA验证已取消:\x20'+_0x42c823+_0x4c2bb8(0x156)+_0x287ac1),!![];}catch(_0x572c3a){return console[_0x4c2bb8(0x164)](_0x4c2bb8(0x166)+_0x42c823+_0x4c2bb8(0x153)+(_0x572c3a instanceof Error?_0x572c3a[_0x4c2bb8(0x141)]:String(_0x572c3a))),![];}}async['hasSession'](_0x3b1136){const _0x15db75=a0_0x5c6317,_0x3a700e=this[_0x15db75(0x14b)](_0x3b1136);try{return await fs_1['promises'][_0x15db75(0x16b)](_0x3a700e),!![];}catch(_0x3e4edf){return![];}}async[a0_0x5c6317(0x14e)](){const _0x4b3b4b=a0_0x5c6317;try{await this[_0x4b3b4b(0x152)]();const _0x1e97f3=await fs_1[_0x4b3b4b(0x146)][_0x4b3b4b(0x160)](this[_0x4b3b4b(0x16f)]);return _0x1e97f3['filter'](_0x10eb54=>_0x10eb54[_0x4b3b4b(0x170)](_0x4b3b4b(0x147)))[_0x4b3b4b(0x17b)](_0x2ed9fa=>_0x2ed9fa[_0x4b3b4b(0x168)](_0x4b3b4b(0x147),''));}catch(_0x4ecc58){return console[_0x4b3b4b(0x174)](_0x4b3b4b(0x159),_0x4ecc58 instanceof Error?_0x4ecc58:String(_0x4ecc58)),[];}}async[a0_0x5c6317(0x175)](_0x122db9=this['DEFAULT_TIMEOUT']){const _0x1c8ab0=a0_0x5c6317;try{await this[_0x1c8ab0(0x152)]();const _0xc4ec71=await fs_1[_0x1c8ab0(0x146)]['readdir'](this[_0x1c8ab0(0x16f)]),_0x165841=new Date();let _0x294014=0x0;for(const _0x17dc34 of _0xc4ec71){if(!_0x17dc34[_0x1c8ab0(0x170)]('.json'))continue;try{const _0x57935c=path_1[_0x1c8ab0(0x171)][_0x1c8ab0(0x16c)](this[_0x1c8ab0(0x16f)],_0x17dc34),_0x2c74cb=await fs_1[_0x1c8ab0(0x146)][_0x1c8ab0(0x17a)](_0x57935c,'utf8'),_0x48356e=JSON[_0x1c8ab0(0x148)](_0x2c74cb),_0x2ae058=new Date(_0x48356e['createdAt']);_0x165841[_0x1c8ab0(0x155)]()-_0x2ae058[_0x1c8ab0(0x155)]()>_0x122db9&&(await fs_1[_0x1c8ab0(0x146)][_0x1c8ab0(0x165)](_0x57935c),_0x294014++);}catch(_0x23bad8){try{await fs_1[_0x1c8ab0(0x146)][_0x1c8ab0(0x165)](path_1[_0x1c8ab0(0x171)][_0x1c8ab0(0x16c)](this[_0x1c8ab0(0x16f)],_0x17dc34)),_0x294014++;}catch(_0x1ef3b7){console['error']('删除过期会话文件失败:\x20'+_0x17dc34,_0x1ef3b7 instanceof Error?_0x1ef3b7:String(_0x1ef3b7));}}}_0x294014>0x0&&console[_0x1c8ab0(0x164)](_0x1c8ab0(0x169)+_0x294014+_0x1c8ab0(0x157));}catch(_0x55ce66){console[_0x1c8ab0(0x174)](_0x1c8ab0(0x14c),_0x55ce66 instanceof Error?_0x55ce66:String(_0x55ce66));}}async[a0_0x5c6317(0x150)](_0x40f669){const _0x3609ed=a0_0x5c6317,_0x2f6c52=this[_0x3609ed(0x14b)](_0x40f669);try{await fs_1[_0x3609ed(0x146)][_0x3609ed(0x165)](_0x2f6c52);}catch(_0x18667d){}}}exports[a0_0x5c6317(0x167)]=FileMFASessionStorage;
1
+ 'use strict';function a0_0x315a(){const _0x393c3d=['320894ZgyeVv','MFA验证码已提交:\x20code\x20','utf8','readFile','cleanupRequest','MFA验证已取消:\x20','rejected','endsWith','log','waitForMFACode','104bFKDpa','85qkSiev','replace','message','清理了\x20','writeFile','createdAt','submitMFACode','mkdir','FileMFASessionStorage','resolvedAt','ensureStorageDir','status','parse','cancelMFARequest','stringify','promises','path','626324jmOgJa','resolved','MFA验证会话已创建:\x20','DEFAULT_TIMEOUT','4940784hxYiWc','storageDir','50470NIwSHp','获取活跃会话失败:','getSessionFilePath','__importDefault','1683ClMqAq','readdir','清理过期请求失败:','access','error',',\x20原因:\x20','删除过期会话文件失败:\x20','12ohPmxC','203292hRpkEL','code','defineProperty','cleanupExpiredRequests','未找到MFA验证会话:\x20','MFA验证会话状态不正确:\x20','__esModule','unlink','247846TPRgkE','toISOString','default','join','MFA验证超时,请重新登录','创建MFA存储目录失败:','275505pWugTJ','getTime','getActiveSessions','.json','\x20个过期的MFA验证会话',',\x20错误:\x20'];a0_0x315a=function(){return _0x393c3d;};return a0_0x315a();}const a0_0xa6fc6b=a0_0x5c46;(function(_0x431559,_0x44de30){const _0x50e085=a0_0x5c46,_0x5d6b9a=_0x431559();while(!![]){try{const _0x1493e9=parseInt(_0x50e085(0x11e))/0x1+parseInt(_0x50e085(0x118))/0x2*(parseInt(_0x50e085(0x10f))/0x3)+-parseInt(_0x50e085(0xfe))/0x4+-parseInt(_0x50e085(0x12f))/0x5*(-parseInt(_0x50e085(0x110))/0x6)+parseInt(_0x50e085(0x124))/0x7*(-parseInt(_0x50e085(0x12e))/0x8)+parseInt(_0x50e085(0x102))/0x9+parseInt(_0x50e085(0x104))/0xa*(-parseInt(_0x50e085(0x108))/0xb);if(_0x1493e9===_0x44de30)break;else _0x5d6b9a['push'](_0x5d6b9a['shift']());}catch(_0x342e84){_0x5d6b9a['push'](_0x5d6b9a['shift']());}}}(a0_0x315a,0x5aaf9));function a0_0x5c46(_0x32cbf2,_0x417afc){_0x32cbf2=_0x32cbf2-0xfe;const _0x315a86=a0_0x315a();let _0x5c46ae=_0x315a86[_0x32cbf2];return _0x5c46ae;}var __importDefault=this&&this[a0_0xa6fc6b(0x107)]||function(_0x413784){return _0x413784&&_0x413784['__esModule']?_0x413784:{'default':_0x413784};};Object[a0_0xa6fc6b(0x112)](exports,a0_0xa6fc6b(0x116),{'value':!![]}),exports[a0_0xa6fc6b(0x137)]=void 0x0;const fs_1=require('fs'),path_1=__importDefault(require(a0_0xa6fc6b(0x13f)));class FileMFASessionStorage{constructor(_0x3f744a){const _0x25e4eb=a0_0xa6fc6b;this[_0x25e4eb(0x101)]=0x5*0x3c*0x3e8,this[_0x25e4eb(0x103)]=_0x3f744a,this['ensureStorageDir']();}async['ensureStorageDir'](){const _0x564805=a0_0xa6fc6b;try{await fs_1[_0x564805(0x13e)][_0x564805(0x136)](this[_0x564805(0x103)],{'recursive':!![]});}catch(_0x12094d){console[_0x564805(0x10c)](_0x564805(0x11d),_0x12094d);}}[a0_0xa6fc6b(0x106)](_0xe3abcc){const _0xd06186=a0_0xa6fc6b;return path_1[_0xd06186(0x11a)][_0xd06186(0x11b)](this[_0xd06186(0x103)],_0xe3abcc+'.json');}async[a0_0xa6fc6b(0x12d)](_0x2d256e,_0x457f8f=this[a0_0xa6fc6b(0x101)]){const _0xa05bcf=a0_0xa6fc6b;await this[_0xa05bcf(0x139)](),await this[_0xa05bcf(0x128)](_0x2d256e);const _0xcaf80={'sessionId':_0x2d256e,'status':'waiting','createdAt':new Date()[_0xa05bcf(0x119)](),'timeout':_0x457f8f},_0x3ee88c=this[_0xa05bcf(0x106)](_0x2d256e);return await fs_1['promises'][_0xa05bcf(0x133)](_0x3ee88c,JSON[_0xa05bcf(0x13d)](_0xcaf80),'utf8'),console[_0xa05bcf(0x12c)](_0xa05bcf(0x100)+_0x2d256e),new Promise((_0x35ffed,_0x25bcb6)=>{const _0x511bb1=Date['now'](),_0x51b352=setInterval(async()=>{const _0x3211eb=a0_0x5c46;try{if(Date['now']()-_0x511bb1>_0x457f8f){clearInterval(_0x51b352),await this[_0x3211eb(0x128)](_0x2d256e),_0x25bcb6(new Error(_0x3211eb(0x11c)));return;}try{const _0x57f2f6=await fs_1[_0x3211eb(0x13e)][_0x3211eb(0x127)](_0x3ee88c,_0x3211eb(0x126)),_0x249ba4=JSON['parse'](_0x57f2f6);if(_0x249ba4[_0x3211eb(0x13a)]===_0x3211eb(0xff)&&_0x249ba4[_0x3211eb(0x111)]){clearInterval(_0x51b352),await this['cleanupRequest'](_0x2d256e),_0x35ffed(_0x249ba4[_0x3211eb(0x111)]);return;}if(_0x249ba4[_0x3211eb(0x13a)]==='rejected'&&_0x249ba4[_0x3211eb(0x10c)]){clearInterval(_0x51b352),await this[_0x3211eb(0x128)](_0x2d256e),_0x25bcb6(new Error(_0x249ba4[_0x3211eb(0x10c)]));return;}}catch(_0x18818d){}}catch(_0x334a63){clearInterval(_0x51b352),await this[_0x3211eb(0x128)](_0x2d256e),_0x25bcb6(_0x334a63 instanceof Error?_0x334a63:new Error(String(_0x334a63)));}},0x3e8);});}async[a0_0xa6fc6b(0x135)](_0x264023,_0x13cf94){const _0x554d01=a0_0xa6fc6b,_0x4c801d=this[_0x554d01(0x106)](_0x264023);try{const _0x5704e5=await fs_1[_0x554d01(0x13e)][_0x554d01(0x127)](_0x4c801d,'utf8'),_0x4d3849=JSON['parse'](_0x5704e5);if(_0x4d3849[_0x554d01(0x13a)]!=='waiting')return console[_0x554d01(0x12c)](_0x554d01(0x115)+_0x264023+',\x20状态:\x20'+_0x4d3849[_0x554d01(0x13a)]),![];return _0x4d3849[_0x554d01(0x13a)]=_0x554d01(0xff),_0x4d3849[_0x554d01(0x111)]=_0x13cf94,_0x4d3849[_0x554d01(0x138)]=new Date()[_0x554d01(0x119)](),await fs_1[_0x554d01(0x13e)][_0x554d01(0x133)](_0x4c801d,JSON['stringify'](_0x4d3849),'utf8'),console[_0x554d01(0x12c)](_0x554d01(0x125)+_0x13cf94+',\x20sessionId\x20'+_0x264023),!![];}catch(_0x317430){return console[_0x554d01(0x12c)](_0x554d01(0x114)+_0x264023+_0x554d01(0x123)+(_0x317430 instanceof Error?_0x317430[_0x554d01(0x131)]:String(_0x317430))),![];}}async[a0_0xa6fc6b(0x13c)](_0x3ba84d,_0x5cf8c3='MFA验证已取消'){const _0x248488=a0_0xa6fc6b,_0x3da6d2=this['getSessionFilePath'](_0x3ba84d);try{const _0x580472=await fs_1['promises']['readFile'](_0x3da6d2,_0x248488(0x126)),_0x284d0b=JSON[_0x248488(0x13b)](_0x580472);return _0x284d0b[_0x248488(0x13a)]=_0x248488(0x12a),_0x284d0b[_0x248488(0x10c)]=_0x5cf8c3,_0x284d0b['rejectedAt']=new Date()[_0x248488(0x119)](),await fs_1[_0x248488(0x13e)][_0x248488(0x133)](_0x3da6d2,JSON['stringify'](_0x284d0b),_0x248488(0x126)),console['log'](_0x248488(0x129)+_0x3ba84d+_0x248488(0x10d)+_0x5cf8c3),!![];}catch(_0x11bd70){return console['log'](_0x248488(0x114)+_0x3ba84d+',\x20错误:\x20'+(_0x11bd70 instanceof Error?_0x11bd70['message']:String(_0x11bd70))),![];}}async['hasSession'](_0x48d9c5){const _0x364393=a0_0xa6fc6b,_0x2e78b2=this[_0x364393(0x106)](_0x48d9c5);try{return await fs_1['promises'][_0x364393(0x10b)](_0x2e78b2),!![];}catch(_0x3de301){return![];}}async[a0_0xa6fc6b(0x120)](){const _0x40aa58=a0_0xa6fc6b;try{await this[_0x40aa58(0x139)]();const _0x55fe34=await fs_1[_0x40aa58(0x13e)][_0x40aa58(0x109)](this[_0x40aa58(0x103)]);return _0x55fe34['filter'](_0x18dc13=>_0x18dc13[_0x40aa58(0x12b)]('.json'))['map'](_0xa2fa75=>_0xa2fa75[_0x40aa58(0x130)](_0x40aa58(0x121),''));}catch(_0x29e664){return console[_0x40aa58(0x10c)](_0x40aa58(0x105),_0x29e664 instanceof Error?_0x29e664:String(_0x29e664)),[];}}async[a0_0xa6fc6b(0x113)](_0x301535=this[a0_0xa6fc6b(0x101)]){const _0x4840c8=a0_0xa6fc6b;try{await this[_0x4840c8(0x139)]();const _0x2eaba7=await fs_1['promises'][_0x4840c8(0x109)](this[_0x4840c8(0x103)]),_0x47cee1=new Date();let _0x1177c6=0x0;for(const _0xe432eb of _0x2eaba7){if(!_0xe432eb[_0x4840c8(0x12b)](_0x4840c8(0x121)))continue;try{const _0x5bfd7a=path_1[_0x4840c8(0x11a)][_0x4840c8(0x11b)](this['storageDir'],_0xe432eb),_0x5f2f35=await fs_1['promises']['readFile'](_0x5bfd7a,'utf8'),_0x397a3d=JSON[_0x4840c8(0x13b)](_0x5f2f35),_0x4cdf50=new Date(_0x397a3d[_0x4840c8(0x134)]);_0x47cee1['getTime']()-_0x4cdf50[_0x4840c8(0x11f)]()>_0x301535&&(await fs_1[_0x4840c8(0x13e)][_0x4840c8(0x117)](_0x5bfd7a),_0x1177c6++);}catch(_0x20a27a){try{await fs_1[_0x4840c8(0x13e)][_0x4840c8(0x117)](path_1[_0x4840c8(0x11a)]['join'](this[_0x4840c8(0x103)],_0xe432eb)),_0x1177c6++;}catch(_0x54e24d){console[_0x4840c8(0x10c)](_0x4840c8(0x10e)+_0xe432eb,_0x54e24d instanceof Error?_0x54e24d:String(_0x54e24d));}}}_0x1177c6>0x0&&console[_0x4840c8(0x12c)](_0x4840c8(0x132)+_0x1177c6+_0x4840c8(0x122));}catch(_0x49f343){console['error'](_0x4840c8(0x10a),_0x49f343 instanceof Error?_0x49f343:String(_0x49f343));}}async[a0_0xa6fc6b(0x128)](_0xe41469){const _0x259967=a0_0xa6fc6b,_0x2e6a09=this[_0x259967(0x106)](_0xe41469);try{await fs_1['promises'][_0x259967(0x117)](_0x2e6a09);}catch(_0x3f9a6c){}}}exports[a0_0xa6fc6b(0x137)]=FileMFASessionStorage;