a2a-memory 0.12.45 → 0.12.46
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.
- package/README.md +1 -1
- package/dist/adapters/anthropic.js +1 -1
- package/dist/chunking/chunker.js +1 -1
- package/dist/claude/sync.js +1 -1
- package/dist/cli/commands/add.js +1 -1
- package/dist/cli/commands/claude-sync.js +1 -1
- package/dist/cli/commands/cleanup.js +1 -1
- package/dist/cli/commands/config.js +1 -1
- package/dist/cli/commands/contextrank.js +1 -1
- package/dist/cli/commands/edit.js +1 -1
- package/dist/cli/commands/embed.js +1 -1
- package/dist/cli/commands/export.js +1 -1
- package/dist/cli/commands/extract.js +1 -1
- package/dist/cli/commands/health.js +1 -1
- package/dist/cli/commands/list.js +1 -1
- package/dist/cli/commands/migrate-chunks.js +1 -1
- package/dist/cli/commands/migrate-file-refs.js +1 -1
- package/dist/cli/commands/proficiency.js +1 -1
- package/dist/cli/commands/review.js +1 -1
- package/dist/cli/commands/rm.js +1 -1
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/session-extract.js +1 -1
- package/dist/cli/commands/setup-wizard.js +1 -1
- package/dist/cli/commands/setup.js +1 -1
- package/dist/cli/commands/skill.js +1 -1
- package/dist/cli/commands/status.js +1 -1
- package/dist/cli/commands/sync.js +1 -1
- package/dist/cli/commands/team.js +1 -1
- package/dist/cli/commands/usage.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/config/manager.js +1 -1
- package/dist/contextrank/edge-builder.js +1 -1
- package/dist/contextrank/rank-builder.js +1 -1
- package/dist/contextrank/signal-builder.js +1 -1
- package/dist/db/database.js +1 -1
- package/dist/db/usage-spool.js +1 -1
- package/dist/embedding/e5-provider.js +1 -1
- package/dist/embedding/index.js +1 -1
- package/dist/embedding/local-provider.js +1 -1
- package/dist/embedding/openai-provider.js +1 -1
- package/dist/embedding/quantization.js +1 -1
- package/dist/extraction/dedup-manager.js +1 -1
- package/dist/extraction/emotion-filter.js +1 -1
- package/dist/extraction/extractor.js +1 -1
- package/dist/extraction/file-reference.js +1 -1
- package/dist/extraction/filter.js +1 -1
- package/dist/extraction/scorer.js +1 -1
- package/dist/extraction/similarity.js +1 -1
- package/dist/hooks/client-factory.js +1 -1
- package/dist/hooks/post-tool-use.js +1 -1
- package/dist/hooks/pre-compact.js +1 -1
- package/dist/hooks/session-end.js +1 -1
- package/dist/hooks/session-start.js +1 -1
- package/dist/hooks/shared.js +1 -1
- package/dist/hooks/stop.js +1 -1
- package/dist/hooks/user-prompt-submit.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/messages.js +1 -1
- package/dist/index.js +1 -1
- package/dist/lifecycle/cleanup-scheduler.js +1 -1
- package/dist/lifecycle/cleanup.js +1 -1
- package/dist/lifecycle/consolidation.js +1 -1
- package/dist/lifecycle/contradiction.js +1 -1
- package/dist/lifecycle/embedding-backfill.js +1 -1
- package/dist/lifecycle/index.js +1 -1
- package/dist/lifecycle/injection-flush.js +1 -1
- package/dist/lifecycle/quality-scorer.js +1 -1
- package/dist/lifecycle/session-extract.js +1 -1
- package/dist/lifecycle/shadow-rebuild.js +1 -1
- package/dist/lifecycle/tiering.js +1 -1
- package/dist/llm/client.js +1 -1
- package/dist/llm/index.js +1 -1
- package/dist/proficiency/actr-engine.js +1 -1
- package/dist/proficiency/detection.js +1 -1
- package/dist/proficiency/index.js +1 -1
- package/dist/proficiency/tracker.js +1 -1
- package/dist/search/adaptive-router.js +1 -1
- package/dist/search/index.js +1 -1
- package/dist/search/injection-filter.js +1 -1
- package/dist/search/memoryrank-rerank.js +1 -1
- package/dist/search/ranker.js +1 -1
- package/dist/search/reranker.js +1 -1
- package/dist/session/parser.js +1 -1
- package/dist/skill/evaluator.js +1 -1
- package/dist/skill/index.js +1 -1
- package/dist/sync/client.js +1 -1
- package/dist/sync/encryption.js +1 -1
- package/dist/sync/index.js +1 -1
- package/dist/sync/queue.js +1 -1
- package/dist/sync/scheduler.js +1 -1
- package/dist/sync/synchronizer.js +1 -1
- package/dist/sync/team-synchronizer.js +1 -1
- package/dist/sync/vector-clock.js +1 -1
- package/dist/types/index.js +1 -1
- package/dist/utils/keychain.js +1 -1
- package/dist/utils/logger.js +1 -1
- package/dist/utils/test-isolation.js +1 -1
- package/package.json +1 -1
package/dist/sync/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x4894(_0x385606,_0x516eab){_0x385606=_0x385606-0x189;const _0x54a04c=_0x54a0();let _0x4894e1=_0x54a04c[_0x385606];if(_0x4894['BscmVk']===undefined){var _0x2054bb=function(_0x4b18dc){const _0x412590='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x25963b='',_0x719a11='';for(let _0x309b81=0x0,_0x2801cb,_0x195f83,_0x2f350f=0x0;_0x195f83=_0x4b18dc['charAt'](_0x2f350f++);~_0x195f83&&(_0x2801cb=_0x309b81%0x4?_0x2801cb*0x40+_0x195f83:_0x195f83,_0x309b81++%0x4)?_0x25963b+=String['fromCharCode'](0xff&_0x2801cb>>(-0x2*_0x309b81&0x6)):0x0){_0x195f83=_0x412590['indexOf'](_0x195f83);}for(let _0x5a3c41=0x0,_0x2b9677=_0x25963b['length'];_0x5a3c41<_0x2b9677;_0x5a3c41++){_0x719a11+='%'+('00'+_0x25963b['charCodeAt'](_0x5a3c41)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x719a11);};_0x4894['FCgsOB']=_0x2054bb,_0x4894['YHjMqI']={},_0x4894['BscmVk']=!![];}const _0x3691d7=_0x54a04c[0x0],_0x6b9254=_0x385606+_0x3691d7,_0x20c256=_0x4894['YHjMqI'][_0x6b9254];return!_0x20c256?(_0x4894e1=_0x4894['FCgsOB'](_0x4894e1),_0x4894['YHjMqI'][_0x6b9254]=_0x4894e1):_0x4894e1=_0x20c256,_0x4894e1;}(function(_0x158780,_0x589a08){function _0x1ac0a8(_0x43a125,_0x2301ef){return _0x4894(_0x2301ef-0x1eb,_0x43a125);}const _0x2afe33=_0x158780();function _0x354eb1(_0x35a425,_0x5bf3a0){return _0x4894(_0x5bf3a0- -0x320,_0x35a425);}while(!![]){try{const _0x3299ae=-parseInt(_0x1ac0a8(0x390,0x389))/0x1*(-parseInt(_0x354eb1(-0x1d1,-0x181))/0x2)+-parseInt(_0x1ac0a8(0x390,0x3c1))/0x3*(parseInt(_0x1ac0a8(0x463,0x420))/0x4)+-parseInt(_0x1ac0a8(0x343,0x39b))/0x5+parseInt(_0x354eb1(-0x106,-0xd4))/0x6+parseInt(_0x354eb1(-0x133,-0x109))/0x7+parseInt(_0x354eb1(-0x12d,-0x160))/0x8+-parseInt(_0x354eb1(-0x145,-0xf6))/0x9;if(_0x3299ae===_0x589a08)break;else _0x2afe33['push'](_0x2afe33['shift']());}catch(_0x1c67c7){_0x2afe33['push'](_0x2afe33['shift']());}}}(_0x54a0,0x7ac11));import{encryptContent,decryptContent,wrapEncryptedContent,unwrapEncryptedContent}from'./encryption.js';function _0x54a0(){const _0x2b5ef2=['AgfUzgXLrxjYBW','mta3mZGYnvDtzxjIBa','zw1VCNK','yxnZzw1IBgvdBW','Dg9YEt8','Dg9tDhjPBMC','Bg9J','yxbPs2v5','BgLTAxq','yw5ZzMvYl2HPCW','BgLZDfrLyw1Z','C3rYAw5NAwz5','zxzLBNqVyMf0yW','BNrLBNq','zw1VCNLgzwvKyG','DMvYC2LVBG','BgLZDfbYB2zPyW','nJCYmtu4ngvWzLrjwG','yw5ZzMvYl2LTCa','uK10Bha','C2vZC2LVBL9Pza','CMLLC0jHDgnO','zhvWBgLJyxrL','y3jLyxrLq29UDa','zNH0EMi','zM9Yy2vnzw1VCG','C2vHCMnO','C2v0','v0Tmv3y','lI4VlI4VCgfJAW','BgLZDfrLyw1nzq','zY9JB250zxH0CW','Bw9YAwvZlW','zgvSzxrLtwvTBW','ue9tva','Cgf0Aa','CMvXDwvZDa','B2zMC2v0','Bw9YEs1MAwXLCW','mJfvrg1byNC','AgfZ','sfruuca0mJi','7zUeioUlPoYlNcdSI5ZRJ4tTLzJSHlJSMPq','AM9PBG','C3LUyY9KzwX0yq','7j247kADioYlPo2mQdOGqvbj','B3v0y29Tzq','sfruuca0mdq','ANnVBG','CgfYC2u','BxpRPBWG64sy7jEi7iQ164Ui64UK','Cg9ZDfbYB2zPyW','Bw9YAwvZp2XPBq','l2fWAs92ms90CG','DgLVBG','B3j5','mc4WlJa','qwjVCNrfCNjVCG','Cgf0AwjPBgL0Eq','CMvZDwX0','Bwf4twvTB3jPzq','Bw9YAwvZl2jHDa','DhLWzq','BM9KztPMCW','w2eYyv0GCMvPBG','s2v5','yxvxve0','l2fWAs92ms9Tzq','BxnN','Eg9UB215l2nSyq','z2vUzxjHDgvezq','Axq9mq','qKftrv9eruXbwq','BgvUz3rO','Bw9YAwvZl2fZCW','C2v0rw5JCNLWDa','zxH0','l2fWAs92ms9TyW','Bwf4vg9Rzw5Z','BNrLEhq','CgfNzq','C3rHDhvZ','yw5ZzMvYl2v4Ca','EMXVz2i','v29frxm','Bw9YAwvZl3n0yq','DgLTzw91Da','y3jLyxrLtwvTBW','l2fWAs92ms90yq','tufyx1jfvfjjrq','y2XLyxjfBMnYEq','ihWG','BI9HBMfSExPL','7jQu7lkTioYlNoQWHcdSTiJQS7W6ia','B3j0','l3rLyw1ZlW','zMLSzq','BwfW','zw5JCNLWDgLVBG','BMfTzq','CLjLC3bVBNnL','x01t','twvTB3jPzxm','DxbSAwnHDgu','ndm0mJq3mwfdAuLVuG','z2v0ug9WDwXHCG','ChjVBw90zu1LBq','yMLSAxr5twf0CG','AwnPzw5JAwvZ','zgvJCNLWDe1LBq','vgfNCW','CNLFAwq','CNDivLe','ywnR','AxnFzhvWBgLJyq','BI9QC29U','yxbWzw5K','BgvZl3vWBg9Hza','AwXL','y29UDgv4Df90yq','Bwf0CML4','AwvUy3LfDMvUDa','BgLZDe1LBw9YAq','mte2nJi1ntfHq1rzrMm','rMvHDhvYzxm','y29UzMLN','BwvZC2fNzq','Cg93','DxbSB2fKrMLSzq','Aw9Ul2vTB3rPBW','CNLgAwXLtgLUAW','CKHPC3rVCNK','l21LBw9YAwvZlW','zxjYB3i','mta4mJKYq0PUBxj6','uKvuuLLbqKXfxW','yMvKzgLUzW','yNL0zxpSL6ZSLBWG7zwP64Ui','DxrMltG','B2zPy2LLBMn5lW','C2TPBgXFBwvTBW','Dhj1zq','BhrH','C2XPy2u','BgvZl2nOzwnRlq','CwfnwKW','zgv0ywLS','CY9WB3b1BgfYpW','Dg90ywXFBwvTBW','zY9YzwXHDgLVBG','l21LBw9YAwvZ','DxbKyxrLtwvTBW','DgLWyxj0','CMvMzxjLBMnLxW','zxHPC3rPBMDFzG','AxnbCNjHEq','Bw9YAwvZ','ntC1nZG0DhPMs29g','AxnfBMnYExb0Aq','BgfZDf9ZEw5Jzq','zwrKAw5N','y2f0zwDVCNK','zw5HyMXLzezLyq','zf9HDa','C3rHDhm','ywDLlMPZB24','AxrLBxm','yw5ZzMvYl2nVBq','EuzLzwrIywnRia','B2zPy2LLBMn5pW','DgLLCG','y2f0zwDVCMLLCW','C09ks0S','z2v0u3rHDhm','C3nPzNK','l2fWAs92ms9Wzq','CMLLCW','l2fWAs92ms90zq','r0vu','ywjVCNq','yw1Z','yw5HBhL6zuvTBW','u1rbvfvt','y2XHC3nPzNLdBW','mtaW','m015Efrzua','ndmWotm0zNrRAMXZ','y29UDgvUDa','DgfNCW','y2HLy2TgAwXLra','revmrvrf','yxbWBgLJyxrPBW','l2fWAs92ms9WCG','twvTyMvY','C3vJy2vZCW','BM9KztPWyxrO','l3jLAw5MB3jJzq','DhvYzxm','C2LNBMfS','C3rHCNrZv2L0Aa','CMvXDwvZDe11Ba','zgLMzMLJDwX0Eq'];_0x54a0=function(){return _0x2b5ef2;};return _0x54a0();}function withStatus(_0x5d2121,_0x16551c){return _0x5d2121['status']=_0x16551c,_0x5d2121;}export function getErrorStatus(_0x1d7425){function _0x4ef29e(_0x33bd38,_0x4beff1){return _0x4894(_0x33bd38- -0x255,_0x4beff1);}return _0x1d7425 instanceof Error?_0x1d7425[_0x4ef29e(-0x55,-0xb7)]:undefined;}let _pluginVersion='0.0.0';try{const {readFileSync}=await import(_0x985964(0x3c0,0x40d)),{fileURLToPath}=await import('node:url'),{dirname,join}=await import(_0x985964(0x37a,0x395)),__dirname=dirname(fileURLToPath(import.meta.url)),pkg=JSON[_0x35cbd2(0xa1,0x9d)](readFileSync(join(__dirname,_0x985964(0x39e,0x3ea)+_0x985964(0x35c,0x324)),_0x35cbd2(0xfa,0xd6)));_pluginVersion=pkg[_0x985964(0x390,0x3e0)]||_0x35cbd2(0xa8,0xec);}catch{}function _0x35cbd2(_0x536651,_0x175d0d){return _0x4894(_0x536651- -0x13f,_0x175d0d);}function _0x985964(_0x44fbc3,_0x1c7a9e){return _0x4894(_0x44fbc3-0x1d2,_0x1c7a9e);}export class A2AClient{['config'];[_0x35cbd2(0xc6,0x12a)];['encryption'+_0x985964(0x3c2,0x3fe)]=null;[_0x35cbd2(0x112,0xda)+_0x985964(0x37c,0x3cf)]=[];constructor(_0x16f1b2){function _0x132ac2(_0x2a071b,_0x1cbc70){return _0x985964(_0x1cbc70-0x5,_0x2a071b);}function _0x26537c(_0x57aa53,_0x4bea65){return _0x985964(_0x57aa53- -0x44f,_0x4bea65);}this[_0x26537c(-0x51,-0xac)]=_0x16f1b2,this['timeout']=_0x16f1b2[_0x26537c(-0x78,-0x86)]??0xea60;}['setEnabled'+_0x35cbd2(0xec,0xfe)](_0xdc5675){function _0x57f599(_0x5ae366,_0x27afcd){return _0x985964(_0x5ae366- -0x1,_0x27afcd);}this[_0x57f599(0x422,0x421)+'tures']=_0xdc5675;}[_0x35cbd2(0xbb,0x74)+'ionKey'](_0x4ea84a){function _0x454bc8(_0x917758,_0x28fc0a){return _0x985964(_0x28fc0a-0x1e5,_0x917758);}if(_0x4ea84a[_0x1f021d(0x37a,0x36f)]!==0x20)throw new Error('암호화\x20키는\x2032\x20'+_0x1f021d(0x3e2,0x3af)+'다');function _0x1f021d(_0x4997e,_0x3870b4){return _0x985964(_0x3870b4- -0x5b,_0x4997e);}this[_0x454bc8(0x599,0x5c8)+_0x1f021d(0x31f,0x367)]=_0x4ea84a;}[_0x985964(0x3db,0x3fe)+'ptionKey'](){function _0x290ddc(_0x281589,_0x565eaf){return _0x985964(_0x281589- -0xf3,_0x565eaf);}this['encryption'+_0x290ddc(0x2cf,0x2e5)]=null;}[_0x985964(0x41f,0x3bb)+'onEnabled'](){function _0x204f10(_0x1ad735,_0x4c8a4a){return _0x35cbd2(_0x4c8a4a-0x127,_0x1ad735);}return this[_0x204f10(0x19f,0x1f9)+'Key']!==null;}async[_0x985964(0x3d8,0x3c3)+'ry'](_0x388673){let _0x3b213f=_0x388673[_0x4869f2(0x272,0x25b)];if(this[_0x587a8f(-0x4e,-0x7d)+_0x587a8f(-0x6f,-0x64)]){const _0xfca9cb=encryptContent(_0x388673[_0x587a8f(-0xbf,-0x89)],this[_0x4869f2(0x2e3,0x2e9)+'Key']);_0x3b213f=wrapEncryptedContent(_0xfca9cb);}const _0x204db4=await this[_0x587a8f(-0x8c,-0xd1)](_0x587a8f(-0x8e,-0x36),_0x4869f2(0x2c4,0x28a)+_0x587a8f(-0x14,-0x58),{'content':_0x3b213f,'category':_0x388673[_0x4869f2(0x322,0x319)],'tier':_0x388673[_0x4869f2(0x261,0x24c)],'tags':_0x388673['tags']??[]});function _0x4869f2(_0x16a9df,_0x6d3732){return _0x985964(_0x16a9df- -0x100,_0x6d3732);}function _0x587a8f(_0xd6365f,_0x295dbc){return _0x985964(_0xd6365f- -0x431,_0x295dbc);}const _0x22f64a=_0x204db4;if(this[_0x4869f2(0x2e3,0x32a)+_0x587a8f(-0x6f,-0xe)]&&_0x22f64a[_0x587a8f(-0xbf,-0x6b)]){const _0x54f429=unwrapEncryptedContent(_0x22f64a[_0x4869f2(0x272,0x20d)]);_0x54f429&&(_0x22f64a['content']=decryptContent(_0x54f429,this[_0x587a8f(-0x4e,-0xac)+'Key']));}return _0x22f64a;}async['searchMemo'+_0x35cbd2(0x56,0x84)](_0x351694,_0x30e069){const _0x35d15f=await this[_0x470a79(0xa5,0x9c)](_0xe38b2d(0x2fc,0x317),_0x470a79(0xc4,0x65)+'mories/sea'+'rch',{'query':_0x351694,'limit':_0x30e069?.['limit']??0xa,'category':_0x30e069?.[_0xe38b2d(0x3af,0x396)]});function _0x470a79(_0x51cde4,_0x321f68){return _0x35cbd2(_0x51cde4-0x11,_0x321f68);}function _0xe38b2d(_0xed4b83,_0x404aea){return _0x35cbd2(_0x404aea-0x285,_0xed4b83);}return _0x35d15f[_0xe38b2d(0x2cd,0x2d1)]??[];}async[_0x35cbd2(0xea,0xb4)+'es'](_0x297dea){const _0xec634e=new URLSearchParams();if(_0x297dea?.['limit'])_0xec634e[_0x387c65(0x571,0x592)](_0x2c364c(-0x41,-0x31),_0x297dea[_0x2c364c(-0x41,-0x76)]['toString']());if(_0x297dea?.[_0x2c364c(-0x24,-0x10)])_0xec634e[_0x2c364c(-0x2e,-0x16)](_0x2c364c(-0x24,-0x47),_0x297dea[_0x387c65(0x5d5,0x59c)][_0x2c364c(-0x44,-0x61)]());if(_0x297dea?.['includeEmb'+_0x2c364c(0x57,0x2d)])_0xec634e['set']('include_em'+_0x2c364c(0x3f,0x21),_0x387c65(0x615,0x604));const _0x4424a2=_0x387c65(0x58b,0x5ba)+_0x2c364c(0x53,0x15)+(_0xec634e[_0x2c364c(-0x44,-0x91)]()?'?'+_0xec634e['toString']():'');function _0x2c364c(_0x535b1d,_0x46276d){return _0x35cbd2(_0x535b1d- -0xb9,_0x46276d);}const _0x390d82=await this[_0x2c364c(-0x25,-0x83)](_0x387c65(0x5a0,0x55f),_0x4424a2),_0x44960d=_0x390d82[_0x2c364c(-0x6d,-0x16)]??[];function _0x387c65(_0xa21538,_0x2193da){return _0x35cbd2(_0x2193da-0x507,_0xa21538);}if(this['encryption'+_0x2c364c(-0x8,-0x1d)])return _0x44960d['map'](_0x4bc603=>this[_0x2c364c(0x24,0x62)+_0x2c364c(-0x12,-0x2a)](_0x4bc603));return _0x44960d;}[_0x35cbd2(0xdd,0x92)+'ory'](_0x238277){function _0x1c6e24(_0x23fb5d,_0x975756){return _0x35cbd2(_0x23fb5d- -0xf1,_0x975756);}function _0x1998ab(_0x4a1538,_0x2cf469){return _0x35cbd2(_0x4a1538-0x4e,_0x2cf469);}if(!this['encryption'+_0x1998ab(0xff,0xec)])return _0x238277;const _0x5f3138={..._0x238277};if(_0x5f3138['content']){const _0x586978=unwrapEncryptedContent(_0x5f3138[_0x1998ab(0xaf,0x110)]);if(_0x586978)try{_0x5f3138['content']=decryptContent(_0x586978,this[_0x1998ab(0x120,0xd5)+_0x1998ab(0xff,0x9b)]);}catch{}}return _0x5f3138;}async[_0x35cbd2(0x107,0x154)+'ry'](_0x14ee08,_0x557c98){function _0x11c81b(_0x32b332,_0x291e91){return _0x985964(_0x32b332- -0x509,_0x291e91);}const _0x26cb36=await this[_0x369b41(0x3cc,0x3b9)]('PUT',_0x369b41(0x3ec,0x3d8)+_0x11c81b(-0x168,-0x145)+_0x14ee08,_0x557c98);function _0x369b41(_0x38e5fc,_0x20f5f5){return _0x985964(_0x20f5f5-0x14,_0x38e5fc);}return _0x26cb36;}async[_0x35cbd2(0x91,0xcd)+'ry'](_0x412ee9){function _0x40ec59(_0x8c1efb,_0x175dcf){return _0x985964(_0x175dcf- -0x361,_0x8c1efb);}function _0x57d160(_0x33eb36,_0xe45181){return _0x985964(_0xe45181-0xdb,_0x33eb36);}await this[_0x57d160(0x48b,0x480)](_0x40ec59(-0x4c,0x14),_0x40ec59(0x4f,0x63)+'mories/'+_0x412ee9);}async[_0x985964(0x38b,0x33c)](){function _0x451346(_0x532a6e,_0x25bfc8){return _0x35cbd2(_0x532a6e- -0x26b,_0x25bfc8);}const _0x4adbd9=await this[_0x451346(-0x1d7,-0x176)](_0x36a8c3(0x23b,0x1ef),_0x451346(-0x214,-0x273)+_0x451346(-0x211,-0x1e7));if(Array[_0x451346(-0x160,-0x151)](_0x4adbd9))return _0x4adbd9;function _0x36a8c3(_0x113e5c,_0x3898ca){return _0x35cbd2(_0x3898ca-0x197,_0x113e5c);}return _0x4adbd9[_0x36a8c3(0x230,0x1e3)]??[];}async[_0x35cbd2(0x8e,0x67)+_0x985964(0x41d,0x446)](_0x14bfe1,_0x18fc44){function _0x372719(_0x3429db,_0x56b8ea){return _0x35cbd2(_0x56b8ea-0xff,_0x3429db);}const _0x5ec880=new URLSearchParams();function _0x89ae19(_0xc68cfc,_0x1bd9ad){return _0x35cbd2(_0xc68cfc- -0x22f,_0x1bd9ad);}if(_0x18fc44?.[_0x89ae19(-0x1b7,-0x1c9)])_0x5ec880[_0x89ae19(-0x1a4,-0x1f4)](_0x89ae19(-0x1b7,-0x1b6),_0x18fc44[_0x372719(0x17c,0x177)][_0x89ae19(-0x1ba,-0x17e)]());if(_0x18fc44?.[_0x89ae19(-0x19a,-0x1e9)])_0x5ec880[_0x89ae19(-0x1a4,-0x19a)](_0x372719(0x1e9,0x194),_0x18fc44[_0x372719(0x15d,0x194)][_0x89ae19(-0x1ba,-0x217)]());const _0x3b8827=_0x5ec880[_0x372719(0x1bd,0x174)](),_0x1055c8='/teams/'+encodeURIComponent(_0x14bfe1)+_0x372719(0x263,0x205)+(_0x3b8827?'?'+_0x3b8827:''),_0x479a54=await this[_0x89ae19(-0x19b,-0x1d2)]('GET',_0x1055c8);return _0x479a54[_0x89ae19(-0x1e3,-0x20e)]??[];}async['addTeamMem'+_0x985964(0x3b8,0x393)](_0x287b54,_0x2eb19a){function _0x2928ff(_0x22d83b,_0xed788d){return _0x35cbd2(_0x22d83b- -0x163,_0xed788d);}function _0x32715e(_0x30e6b6,_0xebc909){return _0x35cbd2(_0x30e6b6- -0x67,_0xebc909);}const _0x5c8ac5=await this[_0x2928ff(-0xcf,-0x7a)](_0x2928ff(-0xd1,-0xe4),'/teams/'+encodeURIComponent(_0x287b54)+'/memories',_0x2eb19a);return _0x5c8ac5;}async['searchTeam'+_0x985964(0x3e7,0x3c4)](_0x5ad5fd,_0x42c402,_0x4a5849){function _0x49790a(_0x204db,_0x552e91){return _0x985964(_0x204db-0xa7,_0x552e91);}function _0x102f3a(_0x8a5ab9,_0x1f37d6){return _0x985964(_0x8a5ab9- -0x2aa,_0x1f37d6);}const _0x2a03be=await this['request']('POST',_0x102f3a(0x136,0xf7)+encodeURIComponent(_0x5ad5fd)+(_0x49790a(0x4ac,0x4ea)+_0x49790a(0x442,0x46d)),{'query':_0x42c402,'limit':_0x4a5849?.['limit']??0xa,'category':_0x4a5849?.[_0x102f3a(0x178,0x161)]});return _0x2a03be[_0x49790a(0x404,0x3a4)]??[];}async[_0x35cbd2(0xb6,0x112)+_0x985964(0x40f,0x44c)](_0x516436,_0x384b67,_0x1716f2){function _0x188c37(_0x3c2b2e,_0x4068ee){return _0x985964(_0x3c2b2e-0x5b,_0x4068ee);}function _0x53d22b(_0x1fb987,_0x10f4ab){return _0x985964(_0x10f4ab- -0x56b,_0x1fb987);}return this[_0x188c37(0x400,0x439)]('POST',_0x188c37(0x43b,0x3e2)+encodeURIComponent(_0x516436)+(_0x53d22b(-0x146,-0x166)+_0x53d22b(-0x1ee,-0x1be)),{'memory_id':_0x384b67,'vector_clock':_0x1716f2});}async['applyDelta'](_0x4a6ca0,_0x2b07fc,_0x5f61ed){function _0x4b6a04(_0xe986c2,_0x2f40e7){return _0x35cbd2(_0xe986c2-0x8a,_0x2f40e7);}function _0x31d503(_0x40fffa,_0x2d3f46){return _0x35cbd2(_0x40fffa-0x4f7,_0x2d3f46);}return this[_0x31d503(0x58b,0x542)]('POST',_0x31d503(0x5c6,0x61f)+encodeURIComponent(_0x4a6ca0)+(_0x31d503(0x5eb,0x5d9)+'sync/apply'),{'memory_id':_0x2b07fc,'delta':_0x5f61ed});}async[_0x985964(0x3d8,0x3d2)+_0x35cbd2(0x85,0xa5)](_0x523c5f){const _0x3cbdc1=await this[_0x591274(0x2a1,0x2fd)](_0x591274(0x29f,0x2d6),'/api/v1/me'+_0x1297c1(0x5da,0x5c9)+'ch',{'items':_0x523c5f});function _0x591274(_0x25323f,_0x454cca){return _0x985964(_0x25323f- -0x104,_0x454cca);}function _0x1297c1(_0x4ad732,_0x2ff2b5){return _0x985964(_0x2ff2b5-0x20b,_0x4ad732);}return _0x3cbdc1;}async['testConnec'+_0x35cbd2(0xa6,0xbf)](){function _0x392625(_0x3e5147,_0x40de9c){return _0x35cbd2(_0x3e5147-0x186,_0x40de9c);}function _0x2e46a9(_0x16a365,_0x5d3971){return _0x35cbd2(_0x16a365-0x5a,_0x5d3971);}try{return await this['request'](_0x2e46a9(0xb2,0xa0),_0x392625(0x239,0x25f)+_0x392625(0x22a,0x1f5)+_0x2e46a9(0x111,0x15b)),!![];}catch{return![];}}async[_0x35cbd2(0x73,0x26)+_0x985964(0x3d0,0x3fe)](_0x4a5f1c,_0x222b0a){function _0x170659(_0x3e7a20,_0xc9d613){return _0x35cbd2(_0x3e7a20-0x20a,_0xc9d613);}function _0x386d87(_0x4c05d,_0x4563d8){return _0x35cbd2(_0x4563d8- -0x153,_0x4c05d);}const _0x5e6e04=await this[_0x386d87(-0xed,-0xbf)](_0x386d87(-0x112,-0xc1),_0x386d87(-0xf1,-0xa0)+_0x386d87(-0xa2,-0x99)+'emble',{'query':_0x4a5f1c,'max_memories':_0x222b0a?.[_0x386d87(-0xa4,-0xa7)+'s']??0x5,'max_tokens':_0x222b0a?.[_0x170659(0x2c8,0x2af)]??0x7d0,'categories':_0x222b0a?.[_0x170659(0x25b,0x262)],'tier':_0x222b0a?.[_0x386d87(-0x130,-0x103)]});return _0x5e6e04;}async['reinforceM'+_0x985964(0x383,0x373)](_0x5e1479){function _0x49742b(_0x269740,_0x534f48){return _0x35cbd2(_0x534f48-0x424,_0x269740);}function _0x208baa(_0x57b06a,_0x21a2e4){return _0x35cbd2(_0x57b06a-0x412,_0x21a2e4);}const _0x500737=await this[_0x49742b(0x4d8,0x4b8)](_0x49742b(0x4c3,0x4b6),'/api/v1/me'+'mories/'+_0x5e1479+_0x208baa(0x47c,0x4cf));return _0x500737;}async['reinforceM'+_0x35cbd2(0x7e,0xa3)+_0x35cbd2(0xe1,0x13c)](_0x4c91bb,_0x5d0ff3){function _0x5494c2(_0x33ce3e,_0xf9d9b3){return _0x35cbd2(_0x33ce3e- -0x11c,_0xf9d9b3);}function _0x268493(_0x3c9bea,_0x369c51){return _0x35cbd2(_0x3c9bea- -0x274,_0x369c51);}try{await this[_0x5494c2(-0x88,-0x66)](_0x268493(-0x1e2,-0x197),_0x268493(-0x1c1,-0x205)+_0x268493(-0x1e4,-0x1d5)+_0x4c91bb+_0x268493(-0x20a,-0x1dc),{'success':_0x5d0ff3});}catch(_0x3fe85d){console[_0x268493(-0x17f,-0x18e)](_0x268493(-0x1c4,-0x1fc)+_0x268493(-0x1eb,-0x240)+_0x5494c2(-0xce,-0xa2)+'failed\x20for'+'\x20'+_0x4c91bb+':',_0x3fe85d instanceof Error?_0x3fe85d[_0x268493(-0x186,-0x1a3)]:String(_0x3fe85d));}}async[_0x985964(0x3eb,0x3b9)+_0x985964(0x3b8,0x3b3)](_0x399576,_0x30ed8f){function _0x4b6945(_0x1dc311,_0x38cee1){return _0x35cbd2(_0x38cee1-0x2cb,_0x1dc311);}const _0xf0fc06=await this[_0x4b6945(0x382,0x35f)](_0x20810a(-0xf4,-0x14c),'/api/v1/me'+'mories/'+_0x399576+'/promote');function _0x20810a(_0x179c22,_0x464a98){return _0x35cbd2(_0x464a98- -0x1de,_0x179c22);}return _0xf0fc06;}async[_0x985964(0x364,0x3ab)](){const _0x5990cc=await this[_0x53bb98(0x97,0xc7)](_0x27d8b0(0x1a7,0x1e2),_0x53bb98(0x13c,0xe6)+_0x53bb98(0xae,0xf8)+'ts');function _0x53bb98(_0x49e36e,_0x347c5f){return _0x985964(_0x347c5f- -0x2de,_0x49e36e);}function _0x27d8b0(_0x53aa56,_0x55555b){return _0x985964(_0x53aa56- -0x1c2,_0x55555b);}return _0x5990cc;}async[_0x35cbd2(0xd9,0x110)+_0x35cbd2(0xde,0xc1)](_0x41d013=0xa){const _0x5265bd=new URLSearchParams();_0x5265bd['set'](_0x313782(0x55d,0x569),_0x41d013[_0x313782(0x57d,0x566)]());const _0x4113fb=_0x313782(0x563,0x5a4)+'mories/tag'+_0x2fd134(0x503,0x543)+_0x5265bd[_0x313782(0x55a,0x566)]();function _0x2fd134(_0x4afb6d,_0x5a9be9){return _0x35cbd2(_0x4afb6d-0x400,_0x5a9be9);}function _0x313782(_0x1885ac,_0x2e37b5){return _0x35cbd2(_0x2e37b5-0x4f1,_0x1885ac);}const _0x37a89a=await this[_0x2fd134(0x494,0x4d7)](_0x313782(0x5a4,0x549),_0x4113fb);return _0x37a89a[_0x2fd134(0x44c,0x442)]??[];}async['getTeamSta'+'ts'](_0x3dbf94){function _0x5e45e1(_0x1cad51,_0x443538){return _0x35cbd2(_0x443538-0x3e7,_0x1cad51);}const _0x1bc7df=await this[_0x5c717b(0x436,0x49a)](_0x5e45e1(0x435,0x43f),_0x5c717b(0x4a2,0x4d5)+encodeURIComponent(_0x3dbf94)+(_0x5e45e1(0x4dd,0x4db)+_0x5c717b(0x433,0x450)));function _0x5c717b(_0x4ee374,_0x55f5a5){return _0x35cbd2(_0x55f5a5-0x406,_0x4ee374);}const _0x4a16cb=_0x1bc7df,_0x5699e9=_0x4a16cb[_0x5c717b(0x45d,0x450)]??_0x4a16cb;return{'totalMemories':_0x5699e9[_0x5c717b(0x565,0x50a)+_0x5e45e1(0x44a,0x43d)]??0x0,'totalNodes':_0x5699e9['total_node'+'s']??0x0,'lastSyncedAt':_0x5699e9[_0x5c717b(0x4b3,0x515)+_0x5e45e1(0x50d,0x4fa)]??null};}async[_0x35cbd2(0xa3,0xa9)+_0x35cbd2(0xe9,0x128)](_0x4ec1b1){function _0x542092(_0x5b879c,_0x44af8a){return _0x985964(_0x44af8a- -0x72,_0x5b879c);}function _0x3a9c38(_0x27c1c1,_0x665ecd){return _0x985964(_0x665ecd- -0x2c4,_0x27c1c1);}const _0x5651f2=await this[_0x542092(0x2ee,0x333)]('POST','/api/v1/pr'+'oficiency/'+'event',{'skill_memory_id':_0x4ec1b1[_0x3a9c38(0x11d,0x149)+_0x542092(0x357,0x37e)],'outcome':_0x4ec1b1[_0x542092(0x358,0x33d)],'difficulty':_0x4ec1b1[_0x3a9c38(0xdc,0xbc)],'context_tags':_0x4ec1b1[_0x3a9c38(0x13f,0x134)+'gs'],'session_id':_0x4ec1b1[_0x542092(0x2e2,0x323)]});return _0x5651f2;}async[_0x985964(0x3b4,0x360)+_0x985964(0x3fa,0x436)+'Batch'](_0x374f80){function _0x421a56(_0xe50d32,_0x1351c7){return _0x985964(_0xe50d32- -0x41f,_0x1351c7);}function _0xc81642(_0x5d3052,_0x106542){return _0x985964(_0x5d3052- -0x4e7,_0x106542);}await this['request'](_0x421a56(-0x7c,-0x9d),'/api/v1/pr'+_0x421a56(-0x13,0x12)+_0xc81642(-0x15a,-0x18d)+'h',{'events':_0x374f80});}async[_0x985964(0x391,0x3be)+'iencies'](_0x53faef){const _0xd27537=new URLSearchParams();function _0x466d06(_0x3e054a,_0x248bc2){return _0x35cbd2(_0x3e054a-0x3df,_0x248bc2);}_0xd27537[_0x19b082(-0x227,-0x1f4)]('page_size',_0x466d06(0x43d,0x455));if(_0x53faef)_0xd27537[_0x19b082(-0x1b5,-0x1f4)]('project_pa'+'th',_0x53faef);const _0x14ee00=_0x466d06(0x445,0x3e1)+_0x19b082(-0x1fa,-0x230)+_0xd27537[_0x466d06(0x454,0x40d)](),_0x2d161b=await this['request'](_0x19b082(-0x227,-0x227),_0x14ee00);function _0x19b082(_0x186214,_0x166ffc){return _0x35cbd2(_0x166ffc- -0x27f,_0x186214);}return _0x2d161b[_0x19b082(-0x24d,-0x233)]??[];}async[_0x985964(0x36c,0x389)+_0x35cbd2(0xa6,0xb2)](_0x1b419c){function _0x3e1055(_0x3dc65f,_0xd7b78e){return _0x985964(_0x3dc65f- -0x8c,_0xd7b78e);}function _0x2a2d36(_0x377bb3,_0x175fa1){return _0x985964(_0x377bb3- -0x71,_0x175fa1);}return this[_0x3e1055(0x319,0x2c6)](_0x3e1055(0x317,0x30d),_0x3e1055(0x2da,0x2db)+'rsonalizat'+_0x3e1055(0x376,0x336)+_0x2a2d36(0x36c,0x377),{'message':_0x1b419c[_0x2a2d36(0x39f,0x35f)](0x0,0x1f4)});}async['exportProf'+_0x985964(0x3ed,0x3a5)](_0x399f59,_0x41f406){const _0x359c15=await this[_0x4e4a70(0x2c4,0x2c1)](_0x35eb83(0x34d,0x2f4),_0x35eb83(0x31c,0x307)+_0x35eb83(0x31a,0x324)+_0x4e4a70(0x2fe,0x362),{'source_provider':_0x399f59,'skill_ids':_0x41f406??null});function _0x35eb83(_0x11a3db,_0x3772fa){return _0x35cbd2(_0x3772fa-0x262,_0x11a3db);}function _0x4e4a70(_0x353aa3,_0x28f7b0){return _0x35cbd2(_0x353aa3-0x230,_0x28f7b0);}return _0x359c15;}async['importProf'+_0x35cbd2(0xdc,0x9c)](_0x31fdf4,_0x28691c){function _0x220044(_0x49e35d,_0x4b083e){return _0x985964(_0x4b083e-0x1e5,_0x49e35d);}function _0x164184(_0x1eda70,_0x2e3838){return _0x985964(_0x2e3838- -0x2aa,_0x1eda70);}const _0x2ea580=await this[_0x220044(0x531,0x58a)](_0x164184(0x116,0xf9),_0x164184(0x15d,0x10c)+_0x164184(0xf8,0xe9)+_0x220044(0x60a,0x5c4),{'package':_0x31fdf4,'target_provider':_0x28691c});return _0x2ea580;}async['getCompati'+_0x35cbd2(0xdb,0x109)+'ix'](){function _0x263a86(_0x4f074b,_0x2cd4bd){return _0x35cbd2(_0x4f074b- -0x2a3,_0x2cd4bd);}const _0x17959f=await this[_0x4e8ab3(0x57a,0x55d)](_0x4e8ab3(0x53e,0x4f7),_0x4e8ab3(0x58b,0x53a)+_0x263a86(-0x256,-0x2ba)+_0x4e8ab3(0x590,0x599));function _0x4e8ab3(_0x170a31,_0x4bae3a){return _0x35cbd2(_0x170a31-0x4e6,_0x4bae3a);}return _0x17959f[_0x263a86(-0x1bb,-0x1e1)]??[];}async['getTransfe'+_0x985964(0x404,0x3c3)](_0x59cba5=0x1){function _0x11003c(_0x58efed,_0x1cff7f){return _0x985964(_0x1cff7f-0x1fe,_0x58efed);}const _0x72f024=new URLSearchParams();_0x72f024[_0x182cc0(0x34d,0x322)](_0x11003c(0x5bc,0x5cf),_0x59cba5['toString']());const _0x3fcb7d='/api/v1/tr'+_0x11003c(0x56e,0x588)+_0x182cc0(0x2fd,0x30b)+_0x72f024[_0x11003c(0x58a,0x584)]();function _0x182cc0(_0x2190b4,_0x12fdfc){return _0x985964(_0x12fdfc- -0x7a,_0x2190b4);}const _0x117641=await this[_0x11003c(0x5ff,0x5a3)](_0x11003c(0x57c,0x567),_0x3fcb7d);return _0x117641;}async[_0x985964(0x401,0x3ca)](_0x41efea,_0x44a000){const {readFileSync:_0x1fef5d}=await import(_0x3a0971(0x5d1,0x621)),{basename:_0x44780b}=await import('node:path'),_0x15b3d7=_0x1fef5d(_0x41efea),_0x25887a=_0x44780b(_0x41efea),_0x1cc0b0=new FormData();_0x1cc0b0[_0x3a0971(0x606,0x5b9)](_0x3a0971(0x5f2,0x5b2),new Blob([_0x15b3d7]),_0x25887a);_0x44a000['category']&&_0x1cc0b0[_0x21a536(0x4c8,0x4b7)](_0x3a0971(0x633,0x65a),_0x44a000[_0x3a0971(0x633,0x5f0)]);_0x44a000['tags']&&_0x44a000[_0x3a0971(0x584,0x530)]['length']>0x0&&_0x1cc0b0['append']('tags',_0x44a000[_0x3a0971(0x584,0x526)][_0x3a0971(0x5bd,0x564)](','));const _0x577386=await this[_0x21a536(0x499,0x441)+_0x3a0971(0x62a,0x647)](_0x3a0971(0x5b4,0x584),'/api/v1/fi'+_0x21a536(0x4e8,0x4b8),_0x1cc0b0);function _0x3a0971(_0x585c33,_0x38a6ea){return _0x35cbd2(_0x585c33-0x522,_0x38a6ea);}function _0x21a536(_0x27eebc,_0x280f79){return _0x35cbd2(_0x280f79-0x3d3,_0x27eebc);}const _0x1a811c=_0x577386;return{'id':_0x1a811c['file_id'],'filename':_0x1a811c['filename']};}async[_0x985964(0x374,0x31e)+_0x35cbd2(0xd7,0x94)](_0x3b5e3c){function _0x13a7e3(_0xf01dc3,_0x196aa5){return _0x985964(_0x196aa5-0x113,_0xf01dc3);}const _0x1d2cfd=await this[_0x58d1ca(0x566,0x547)](_0x58d1ca(0x4eb,0x545),'/api/v1/fi'+_0x13a7e3(0x501,0x524)+_0x58d1ca(0x520,0x539),{'content_hash':_0x3b5e3c}),_0x135842=_0x1d2cfd;function _0x58d1ca(_0xd5a184,_0x12b136){return _0x985964(_0x12b136-0x1a2,_0xd5a184);}return{'exists':_0x135842[_0x58d1ca(0x57c,0x595)+'te'],'file_id':_0x135842[_0x13a7e3(0x580,0x52e)+_0x13a7e3(0x501,0x50a)]?.['id']};}async[_0x985964(0x3d8,0x387)+_0x985964(0x403,0x3d4)](_0x2e0252,_0x576e2a,_0x13b805){const _0xeeb928=await this[_0x1e6d78(-0x19c,-0x1ff)]('POST',_0x1e6d78(-0x219,-0x1e0)+_0x1e6d78(-0x233,-0x1fd),{'memory_id':_0x2e0252,'file_id':_0x576e2a,'reference_type':_0x13b805[_0x5c7ec7(0x378,0x316)+_0x1e6d78(-0x226,-0x1e5)],'reference_path':_0x13b805[_0x1e6d78(-0x1b7,-0x18a)+_0x1e6d78(-0x25a,-0x200)]});function _0x5c7ec7(_0x2052c8,_0x4a7651){return _0x985964(_0x4a7651- -0x104,_0x2052c8);}function _0x1e6d78(_0x454926,_0x44ff7b){return _0x985964(_0x44ff7b- -0x5a4,_0x454926);}return _0xeeb928;}async[_0x35cbd2(0x87,0xe4)+_0x35cbd2(0xbc,0x120)](_0xd952db){function _0x2f24ed(_0x31499f,_0x6c6fc){return _0x985964(_0x31499f- -0x19,_0x6c6fc);}function _0x13fe6f(_0x46a116,_0x29a971){return _0x985964(_0x29a971- -0x23c,_0x46a116);}return this[_0x13fe6f(0x147,0x169)]('POST',_0x2f24ed(0x3b5,0x351)+_0x2f24ed(0x387,0x353),_0xd952db);}async['addContext'+_0x985964(0x378,0x3bf)](_0x3da555,_0x4b7482){function _0x12998d(_0x3860c5,_0x88bfda){return _0x35cbd2(_0x88bfda- -0xdd,_0x3860c5);}function _0xabce8d(_0x1806e0,_0x47bc53){return _0x35cbd2(_0x47bc53-0x51e,_0x1806e0);}return this['request'](_0xabce8d(0x561,0x5b0),_0xabce8d(0x5a8,0x5db)+_0xabce8d(0x54a,0x5ad)+'/'+_0x3da555+'/members',_0x4b7482);}async['createRela'+_0x985964(0x3b7,0x40d)](_0x465975){function _0x276507(_0x2f7fac,_0x2746cb){return _0x985964(_0x2f7fac-0x4,_0x2746cb);}function _0x424a90(_0x3c8f33,_0x373439){return _0x985964(_0x3c8f33- -0x2b,_0x373439);}return this[_0x424a90(0x37a,0x319)]('POST',_0x276507(0x3d2,0x3f1)+_0x424a90(0x3eb,0x40f)+'s',_0x465975);}async[_0x35cbd2(0x5d,0x5b)+_0x985964(0x38e,0x3c8)](_0x1e85f8){function _0x5f2ae9(_0x326a88,_0x27ba2c){return _0x985964(_0x27ba2c- -0xdd,_0x326a88);}function _0x1fd1c7(_0x12cf0c,_0x2b2130){return _0x985964(_0x2b2130-0x35,_0x12cf0c);}try{const _0x3779b1=await this[_0x1fd1c7(0x3e8,0x3da)](_0x1fd1c7(0x3f6,0x3d8),_0x1fd1c7(0x3b1,0x40e)+_0x1fd1c7(0x427,0x3fb)+_0x1fd1c7(0x3f9,0x39a),{'content':_0x1e85f8[_0x1fd1c7(0x3e9,0x3a7)][_0x1fd1c7(0x49c,0x445)](0x0,0x7d0),'tags':_0x1e85f8[_0x1fd1c7(0x3d8,0x3a8)]??[],'category':_0x1e85f8[_0x1fd1c7(0x422,0x457)]}),_0x311ea1=_0x3779b1;if(_0x311ea1[_0x1fd1c7(0x3de,0x3ae)]&&_0x311ea1['result'])return _0x311ea1[_0x1fd1c7(0x3ff,0x3f1)];return null;}catch{return null;}}static [_0x35cbd2(0xf7,0x146)+_0x35cbd2(0x5c,0x82)]=new Set([0x1ad,0x1f4,0x1f6,0x1f7,0x1f8]);static [_0x35cbd2(0xc9,0x95)+'S']=0x3;static [_0x985964(0x3c9,0x3b1)+_0x35cbd2(0xd5,0xf1)]=0x3e8;async['request'](_0x56f157,_0x31773e,_0x5cd6aa){function _0x23c46e(_0x27a99c,_0x553c8c){return _0x35cbd2(_0x27a99c-0xb7,_0x553c8c);}let _0x4428d3;function _0x3e14f4(_0x317bec,_0x915f0c){return _0x35cbd2(_0x915f0c-0x427,_0x317bec);}for(let _0x149b4a=0x0;_0x149b4a<A2AClient[_0x23c46e(0x180,0x1be)+'S'];_0x149b4a++){const _0x2654e7=''+this[_0x23c46e(0x1a4,0x199)]['baseUrl']+_0x31773e,_0x90d85d=new AbortController(),_0x4487a9=setTimeout(()=>_0x90d85d[_0x3e14f4(0x4a7,0x480)](),this[_0x3e14f4(0x506,0x4ed)]);try{const _0x166dd6=await fetch(_0x2654e7,{'method':_0x56f157,'headers':{'Content-Type':_0x3e14f4(0x46c,0x48c)+_0x3e14f4(0x504,0x50a),'x-api-key':this[_0x23c46e(0x1a4,0x151)][_0x23c46e(0x12e,0xd6)],'X-Plugin-Version':_pluginVersion,...this[_0x23c46e(0x1c9,0x174)+_0x23c46e(0x122,0xec)][_0x3e14f4(0x4b2,0x4e0)]>0x0&&{'X-Plugin-Features':this[_0x3e14f4(0x523,0x539)+'tures'][_0x23c46e(0x152,0x10f)](',')}},'body':_0x5cd6aa?JSON[_0x23c46e(0x132,0x121)](_0x5cd6aa):undefined,'signal':_0x90d85d[_0x3e14f4(0x463,0x493)]});clearTimeout(_0x4487a9);if(A2AClient[_0x3e14f4(0x4f9,0x51e)+'STATUS'][_0x3e14f4(0x507,0x4bf)](_0x166dd6['status'])&&_0x149b4a<A2AClient[_0x23c46e(0x180,0x1bb)+'S']-0x1){const _0x114734=A2AClient['BASE_DELAY'+_0x3e14f4(0x51e,0x4fc)]*Math[_0x23c46e(0x1a6,0x17a)](0x2,_0x149b4a);await new Promise(_0xd80edc=>setTimeout(_0xd80edc,_0x114734));continue;}!_0x166dd6['ok']&&await this[_0x3e14f4(0x487,0x497)+_0x23c46e(0x18b,0x1cc)](_0x166dd6);if(_0x56f157==='DELETE'&&_0x166dd6[_0x3e14f4(0x532,0x4e8)]===0xcc)return;return await _0x166dd6[_0x3e14f4(0x4b6,0x4c7)]();}catch(_0x2babcf){clearTimeout(_0x4487a9);if(_0x2babcf instanceof Error){if(_0x23c46e(0x17b,0x185)===_0x23c46e(0x143,0x158))throw _0x2012e7;else{if(getErrorStatus(_0x2babcf)!==undefined){if(_0x23c46e(0x197,0x167)===_0x3e14f4(0x4ea,0x507))throw _0x2babcf;else _0x3e5719+=':\x20'+_0x5eb1db[_0x3e14f4(0x56e,0x529)];}if(_0x2babcf['message']['startsWith']('인증\x20실패')||_0x2babcf[_0x3e14f4(0x4d5,0x515)][_0x23c46e(0x124,0x177)]('HTTP\x20403')||_0x2babcf['message']['startsWith'](_0x3e14f4(0x493,0x4c6))||_0x2babcf[_0x23c46e(0x1a5,0x15c)][_0x23c46e(0x124,0x151)](_0x3e14f4(0x51d,0x4c0))){if(_0x23c46e(0x1b8,0x1e5)!==_0x3e14f4(0x554,0x528))this[_0x3e14f4(0x54d,0x539)+'tures']=_0x1fbb78;else throw _0x2babcf;}if(_0x149b4a<A2AClient[_0x23c46e(0x180,0x157)+'S']-0x1){if('fxtzb'===_0x3e14f4(0x4e0,0x4af)){_0x4428d3=_0x2babcf;const _0x4d2ce7=A2AClient[_0x23c46e(0x16f,0x117)+'_MS']*Math[_0x23c46e(0x1a6,0x1ed)](0x2,_0x149b4a);await new Promise(_0x338e3a=>setTimeout(_0x338e3a,_0x4d2ce7));continue;}else{const _0x4ed9d0=_0x569472[_0x23c46e(0x1b9,0x197)]['map'](_0x247b82=>{const _0x141662=_0xd06128['isArray'](_0x247b82[_0x30e875(0x1ca,0x1e7)])?_0x247b82[_0x36d755(-0x16b,-0x1bf)][_0x36d755(-0x146,-0x18e)]('.'):'',_0x4f0933=_0x247b82[_0x30e875(0x208,0x264)]??_0x387b4b[_0x30e875(0x1cf,0x1e4)](_0x247b82);function _0x36d755(_0x47d4a8,_0x13ffc0){return _0x23c46e(_0x47d4a8- -0x298,_0x13ffc0);}function _0x30e875(_0x3ede95,_0x57ebc1){return _0x23c46e(_0x3ede95-0x9d,_0x57ebc1);}return _0x141662?_0x141662+':\x20'+_0x4f0933:_0x4f0933;})['join']('\x20|\x20');_0x1684ae+=':\x20'+_0x4ed9d0;}}if(_0x2babcf['name']===_0x23c46e(0x160,0x137)){if('fehon'===_0x3e14f4(0x4d2,0x4ea))return _0x4b840c[_0x23c46e(0x188,0x143)](_0x45c123=>this[_0x23c46e(0x194,0x16a)+_0x23c46e(0x15e,0x16d)](_0x45c123));else throw new Error(_0x3e14f4(0x50b,0x4f4)+this[_0x3e14f4(0x545,0x4ed)]+_0x3e14f4(0x50f,0x4c9));}throw new Error('네트워크\x20오류:\x20'+_0x2babcf['message']);}}throw _0x2babcf;}}throw _0x4428d3??new Error('요청\x20실패:\x20'+A2AClient[_0x3e14f4(0x501,0x4f0)+'S']+'회\x20재시도\x20후\x20실패');}async['requestMul'+_0x985964(0x419,0x421)](_0x439558,_0x2df721,_0x4586b6){const _0x18eb28=''+this[_0xc3755f(-0x44,-0x1e)]['baseUrl']+_0x2df721;function _0xc3755f(_0x41842b,_0x259884){return _0x985964(_0x259884- -0x41c,_0x41842b);}const _0x5d827c=new AbortController();function _0x34a04d(_0x1fe329,_0x2c47c1){return _0x985964(_0x2c47c1-0xb2,_0x1fe329);}const _0x14ffff=setTimeout(()=>_0x5d827c[_0xc3755f(-0xcf,-0xb2)](),this[_0xc3755f(-0x9e,-0x45)]);try{if(_0x34a04d(0x3bc,0x415)===_0x34a04d(0x3c2,0x415)){const _0x1e8b23=await fetch(_0x18eb28,{'method':_0x439558,'headers':{'x-api-key':this[_0x34a04d(0x493,0x4b0)]['apiKey'],'X-Plugin-Version':_pluginVersion},'body':_0x4586b6,'signal':_0x5d827c['signal']});return clearTimeout(_0x14ffff),!_0x1e8b23['ok']&&await this[_0x34a04d(0x412,0x433)+_0x34a04d(0x4d1,0x497)](_0x1e8b23),await _0x1e8b23[_0x34a04d(0x41a,0x463)]();}else throw _0x309eab;}catch(_0x53b39d){clearTimeout(_0x14ffff);if(_0x53b39d instanceof Error&&_0x53b39d[_0x34a04d(0x4cc,0x496)]==='AbortError')throw new Error(_0xc3755f(0x1,-0x3e)+this[_0x34a04d(0x4ca,0x489)]+_0x34a04d(0x44c,0x465));throw _0x53b39d;}}async[_0x35cbd2(0x70,0x8d)+_0x985964(0x3e5,0x404)](_0x2b047d){function _0x3c81a2(_0x357ac5,_0x4f9843){return _0x985964(_0x4f9843- -0x36f,_0x357ac5);}const _0xd98338=_0x2b047d[_0x3c81a2(0x33,0x63)];if(_0xd98338===0x191){if('RMtlp'===_0x285159(0xf8,0xc6))throw withStatus(new Error(_0x285159(0x114,0xe0)+'\x20Key를\x20확인하세'+'요'),0x191);else return _0x2801cb[_0x285159(0x165,0x104)]=_0x195f83,_0x2f350f;}if(_0xd98338===0x1ad)throw withStatus(new Error('요청\x20제한:\x20잠시\x20'+_0x285159(0xe9,0xdd)),0x1ad);function _0x285159(_0x58e9ab,_0x33a3e2){return _0x985964(_0x33a3e2- -0x2ce,_0x58e9ab);}let _0x1742f6='HTTP\x20'+_0xd98338;try{if(_0x285159(0xa5,0xf5)!==_0x285159(0x152,0xf5))throw new _0x539d39(_0x285159(0xbc,0x110)+this[_0x285159(0x132,0x109)]+_0x285159(0xc7,0xe5));else{const _0xfe3fa6=await _0x2b047d[_0x285159(0xc2,0xe3)]();if(Array[_0x3c81a2(0xe2,0xad)](_0xfe3fa6[_0x3c81a2(0x80,0xa4)])){const _0x5835ee=_0xfe3fa6[_0x3c81a2(0x99,0xa4)][_0x3c81a2(0x72,0x73)](_0x4da6a3=>{function _0x31a90f(_0x49e9b4,_0x1beb7e){return _0x285159(_0x49e9b4,_0x1beb7e-0x1bd);}const _0x36aa87=Array['isArray'](_0x4da6a3[_0x31a90f(0x249,0x276)])?_0x4da6a3[_0xe3adbc(0x221,0x249)][_0xe3adbc(0x297,0x26e)]('.'):'',_0x5c218b=_0x4da6a3['msg']??JSON[_0x31a90f(0x237,0x27b)](_0x4da6a3);function _0xe3adbc(_0x5d62c4,_0x1fd2f4){return _0x285159(_0x5d62c4,_0x1fd2f4-0x190);}return _0x36aa87?_0x36aa87+':\x20'+_0x5c218b:_0x5c218b;})[_0x285159(0xd7,0xde)](_0x285159(0x13b,0x10e));_0x1742f6+=':\x20'+_0x5835ee;}else{if(_0xfe3fa6[_0x285159(0x14c,0x145)])_0x1742f6+=':\x20'+_0xfe3fa6[_0x3c81a2(0xc6,0xa4)];else _0xfe3fa6['message']&&(_0x1742f6+=':\x20'+_0xfe3fa6['message']);}}}catch{}throw withStatus(new Error(_0x1742f6),_0xd98338);}}
|
|
1
|
+
(function(_0x540447,_0x4c0673){function _0x391046(_0x5d5b92,_0x420c02){return _0x2b46(_0x5d5b92- -0x2c5,_0x420c02);}function _0xa29c31(_0x421291,_0x386ee4){return _0x2b46(_0x421291-0xc7,_0x386ee4);}const _0x2dc616=_0x540447();while(!![]){try{const _0xd6fcae=-parseInt(_0xa29c31(0x2c6,0x2d2))/0x1*(-parseInt(_0x391046(-0xfb,-0xcb))/0x2)+parseInt(_0x391046(-0xbc,-0xc2))/0x3*(parseInt(_0x391046(-0xa0,-0x6e))/0x4)+-parseInt(_0x391046(-0x9c,-0x4c))/0x5+-parseInt(_0xa29c31(0x249,0x27c))/0x6*(parseInt(_0x391046(-0x11a,-0x169))/0x7)+parseInt(_0xa29c31(0x273,0x292))/0x8+parseInt(_0x391046(-0x127,-0x180))/0x9*(-parseInt(_0xa29c31(0x2fe,0x2d7))/0xa)+parseInt(_0x391046(-0x10d,-0x160))/0xb;if(_0xd6fcae===_0x4c0673)break;else _0x2dc616['push'](_0x2dc616['shift']());}catch(_0x5391a2){_0x2dc616['push'](_0x2dc616['shift']());}}}(_0x35fa,0x80587));function _0x1bfc5d(_0x581e3b,_0x44004e){return _0x2b46(_0x44004e- -0x3c8,_0x581e3b);}import{encryptContent,decryptContent,wrapEncryptedContent,unwrapEncryptedContent}from'./encryption.js';function withStatus(_0x1575d3,_0x3eae7f){return _0x1575d3['status']=_0x3eae7f,_0x1575d3;}export function getErrorStatus(_0x4b5f87){function _0x40685b(_0x4a3ae9,_0x3ec0fe){return _0x2b46(_0x4a3ae9-0x1d0,_0x3ec0fe);}return _0x4b5f87 instanceof Error?_0x4b5f87[_0x40685b(0x3f2,0x3f4)]:undefined;}let _pluginVersion=_0x1bfc5d(-0x1cf,-0x19b);function _0x2b46(_0x559889,_0x14a23b){_0x559889=_0x559889-0x181;const _0x35faa1=_0x35fa();let _0x2b4642=_0x35faa1[_0x559889];if(_0x2b46['XkHRcE']===undefined){var _0x3a2c8e=function(_0x3d4d4f){const _0x1d7e0c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x280f5e='',_0x4d0a8d='';for(let _0x47e334=0x0,_0x3848a2,_0x2d5a16,_0x181b35=0x0;_0x2d5a16=_0x3d4d4f['charAt'](_0x181b35++);~_0x2d5a16&&(_0x3848a2=_0x47e334%0x4?_0x3848a2*0x40+_0x2d5a16:_0x2d5a16,_0x47e334++%0x4)?_0x280f5e+=String['fromCharCode'](0xff&_0x3848a2>>(-0x2*_0x47e334&0x6)):0x0){_0x2d5a16=_0x1d7e0c['indexOf'](_0x2d5a16);}for(let _0x216a02=0x0,_0x281643=_0x280f5e['length'];_0x216a02<_0x281643;_0x216a02++){_0x4d0a8d+='%'+('00'+_0x280f5e['charCodeAt'](_0x216a02)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4d0a8d);};_0x2b46['RfXJAt']=_0x3a2c8e,_0x2b46['aaware']={},_0x2b46['XkHRcE']=!![];}const _0x16712e=_0x35faa1[0x0],_0x272b94=_0x559889+_0x16712e,_0x534211=_0x2b46['aaware'][_0x272b94];return!_0x534211?(_0x2b4642=_0x2b46['RfXJAt'](_0x2b4642),_0x2b46['aaware'][_0x272b94]=_0x2b4642):_0x2b4642=_0x534211,_0x2b4642;}function _0x544d45(_0x52de1f,_0x1658f6){return _0x2b46(_0x1658f6- -0x22f,_0x52de1f);}function _0x35fa(){const _0x57c064=['DgLTzw91Da','Eg9UB215l2nSyq','C2vHCMnOtwvTBW','s2v5','Bw9YAwvZlW','AgfZ','zw5HyMXLzezLyq','zxjYB3i','CMLLC0jHDgnO','l2fWAs92ms90CG','yxbWBhLezwX0yq','AwnPzw5JAwvZ','Bw9YAwvZp2XPBq','zMfPBgvKigzVCG','AxnbCNjHEq','tufyx1jfvfjjrq','twvTB3jPzxm','Bw9YAwvZl3rHzW','DxbSAwnHDgu','l2fWAs92ms9WCG','qMf0y2G','yxbWzw5K','zMLSzw5HBwu','l2fWAs92ms9MAq','B25fBMfIBgvK','x01t','qKftrv9eruXbwq','CMLLCW','CNLFAwq','y3jLyxrLq29UDa','mvj4sKrZCa','C3rHDhm','Dg9tDhjPBMC','Bwf4vg9Rzw5Z','zxHPC3rPBMDFzG','BMfTzq','EuzLzwrIywnRia','l2fWAs92ms90zq','sfruuca','zY9YzwXHDgLVBG','mJDkzNHlrKK','mtaW','7jwu7zI47zMuio2cPoUkLcaZmIa','7zQmioYERoYlNoUpHcdTM4qG7iUK7yYO','z2v0vhjHBNnMzq','y29UzMLN','AwvUy2LLCW','rMvHDhvYzxm','BgfZDf9ZEw5Jzq','zMLSzv9Pza','yw5ZzMvYl2HPCW','y2HLy2TgAwXLra','l2fWAs92ms9TyW','ue9tva','l3jLAw5MB3jJzq','ywrKq29UDgv4Da','Aw9Us2v5','zxHWB3j0uhjVzG','CMvZDwX0','yw1Z','7j247kADioYlPo2mQa','yxnZzw1IBgvdBW','CKHPC3rVCNK','DgfNCW','zw1VCNK','C3rHDhvZ','z2v0ug9WDwXHCG','y3jLyxrLuMvSyq','nZq4mtjOA05Qquu','revmrvrf','sfruuca0mdq','C2vZC2LVBL9Pza','mJe3ndaXmg1lq1fwwa','B2zMC2v0','Aw5JBhvKzuvTyG','l2fWAs92ms9Tzq','mc4WlJa','BgvUz3rO','BgvZl2nOzwnRlq','l21LBw9YAwvZlW','ufvu','zw5JCNLWDgLVBG','C2XPy2u','BhrH','BM9KztPMCW','CY9WB3b1BgfYpW','mtbmzMX1DwG','zw1IBgu','yMLSAxr5twf0CG','y2XLyxjfBMnYEq','B3j0','AM9PBG','Bw9YAwvZl2fZCW','C3rHCNrZv2L0Aa','DMvYC2LVBG','Bwf0CML4','vgfNCW','z2v0vgvHBvn0yq','ieTLEEULVcdTMzxSNBJTLzJSHlG','Dg9YEt8','AgfUzgXLrxjYBW','DxbKyxrLtwvTBW','Cg93','qwjVCNrfCNjVCG','B3v0y29Tzq','AxnFzhvWBgLJyq','CMvMzxjLBMnLxW','BxnN','ywnR','DxrMltG','z1fHD0C','zf9HDa','sfruuca0mdm','Aw5JBhvKzv9LBq','wuvnDKO','mZCYEgLoy1DT','CNnVBMfSAxPHDa','yNL0zxpSL6ZSLBWG7zwP64Ui','BgLTAxq','C2vHCMnOvgvHBq','DgLWyxj0','CMvXDwvZDa','BwfW','Axq9mq','B2zPy2LLBMn5lW','ChjVAMvJDf9Wyq','zM9Yy2vnzw1VCG','ywDLlMPZB24','C2TPBgXFBwvTBW','B2zPy2LLBMn5pW','zxzLBNqVyMf0yW','CgfNzq','y29UDgvUDa','uKvuuLLbqKXfxW','zMLSzq','zgLMzMLJDwX0Eq','Bw9YAwvZl3nLyq','zhvWBgLJyxrL','BxpRPBWG64sy7jEi7iQ164Ui64UK','7j247kADioYlPo2mQdOGqvbj','BNrLBNq','Bg9J','Bw9YEs1MAwXLCW','mJq0ndGYm3LAtM9yBW','CNLgAwXLtgLUAW','C3vJy2vZCW','ywjVCNq','y2XHC3nPzNLdBW','ChrPB25lzxK','y3jLyxrLtwvTBW','twvTyMvY','DgLVBG','zgv0ywLS','ANnVBG','r0vu','w2eYyv0GCMvPBG','nJaWndzlswTwsuy','mZmYmdC2ofDRtgX1CG','BNjKA1O','7jQu7lkTioYlNoQWHcdSTiJQS7W6ia','AxnfBMnYExb0Aq','yw5ZzMvYl2LTCa','l2fWAs92ms90yq','C2v0','DgvZDenVBM5LyW','CMnO','B3j5','CLjLC3bVBNnL','yMfZzvvYBa','mtqZoda1mMjKBNvODG','AwXL','yMvKzgLUzW','C2LNBMfS','zY9JB250zxH0CW','lI4VlI4VCgfJAW','Dg90ywXFBwvTBW','BM9KztPWyxrO','C2vHCMnO','zgvJCNLWDe1LBq','BgLZDfrLyw1nzq','CgfYC2u','y29UDgv4Df90yq','yxbPs2v5','y2f0zwDVCNK','BwvZC2fNzq','BI9QC29U','C3rYAw5NAwz5','mJa5oty2nK1sq1D5tq','zxzLBNq','Bw9YAwvZl2jHDa','l21LBw9YAwvZ','AwvUy3LfDMvUDa','z2vUzxjHDgvezq','BM9KztP1CMW','Cgf0Aa','DhvYzxm','CMvXDwvZDe11Ba','BI9HBMfSExPL','ChjVBw90zu1LBq','l3rLyw1ZlW','AxrLBxm','64sK7yQ47jUm7ygSioYyPoULMdOG','Bw9YAwvZ','yxbWBgLJyxrPBW','u1rbvfvt','zgvSzxrLtwvTBW','DgLLCG','CMvPBMzVCMnLtq','BgLZDe1LBw9YAq','C3LUyY9HChbSEq'];_0x35fa=function(){return _0x57c064;};return _0x35fa();}try{const {readFileSync}=await import(_0x544d45(-0x25,0x6)),{fileURLToPath}=await import(_0x1bfc5d(-0x1b7,-0x1f8)),{dirname,join}=await import(_0x544d45(-0x47,-0x70)),__dirname=dirname(fileURLToPath(import.meta.url)),pkg=JSON[_0x1bfc5d(-0x1c3,-0x205)](readFileSync(join(__dirname,_0x1bfc5d(-0x22c,-0x20b)+_0x544d45(-0x3b,-0xa1)),_0x544d45(-0x3b,0x1f)));_pluginVersion=pkg[_0x544d45(0x40,0x10)]||_0x1bfc5d(-0x1b7,-0x19b);}catch{}export class A2AClient{['config'];[_0x544d45(-0x56,-0x4e)];[_0x1bfc5d(-0x174,-0x196)+'Key']=null;[_0x544d45(-0x49,-0x48)+_0x1bfc5d(-0x24e,-0x1f6)]=[];constructor(_0x48b1d5){this[_0x31c44d(0x185,0x1ee)]=_0x48b1d5;function _0x31c44d(_0x3b33f9,_0x2ad693){return _0x1bfc5d(_0x3b33f9,_0x2ad693-0x3a8);}function _0x3ac934(_0x2c1f81,_0x2b9668){return _0x1bfc5d(_0x2b9668,_0x2c1f81-0x737);}this[_0x3ac934(0x550,0x5a4)]=_0x48b1d5[_0x31c44d(0x210,0x1c1)]??0xea60;}['setEnabled'+_0x1bfc5d(-0x15c,-0x1b8)](_0x3143ef){function _0x573ef9(_0x2698b0,_0x5dfc7d){return _0x1bfc5d(_0x2698b0,_0x5dfc7d-0x275);}function _0x433672(_0x284020,_0x4c069a){return _0x1bfc5d(_0x4c069a,_0x284020-0x1ac);}this[_0x433672(-0x35,0x15)+_0x573ef9(0x8d,0x7f)]=_0x3143ef;}['setEncrypt'+_0x1bfc5d(-0x18b,-0x1af)](_0x140618){function _0x3f0067(_0x46aae1,_0x5063b4){return _0x1bfc5d(_0x5063b4,_0x46aae1-0x75d);}if(_0x140618[_0x3f0067(0x5c3,0x59b)]!==0x20)throw new Error(_0x3f0067(0x5a0,0x592)+_0x533c37(0x59,0x66)+'다');function _0x533c37(_0x513a23,_0x5063f9){return _0x1bfc5d(_0x5063f9,_0x513a23-0x29d);}this[_0x3f0067(0x5c7,0x5c4)+_0x533c37(0xb9,0x8d)]=_0x140618;}[_0x1bfc5d(-0x1f3,-0x18e)+_0x544d45(-0xce,-0x8c)](){function _0x3ec446(_0x5701f1,_0x51f025){return _0x544d45(_0x5701f1,_0x51f025-0x57b);}this['encryption'+_0x3ec446(0x4ee,0x530)]=null;}[_0x1bfc5d(-0x1d6,-0x219)+_0x544d45(-0x8,-0x36)](){function _0x374612(_0x3d1f07,_0x22c16d){return _0x544d45(_0x22c16d,_0x3d1f07-0xf9);}function _0x228712(_0x5e4d62,_0xae84cf){return _0x544d45(_0x5e4d62,_0xae84cf-0x154);}return this[_0x374612(0xfc,0xb8)+_0x374612(0xae,0xdd)]!==null;}async[_0x544d45(-0x74,-0x8b)+'ry'](_0x1d547d){function _0x2e18df(_0x3a02af,_0x41c9d4){return _0x1bfc5d(_0x41c9d4,_0x3a02af-0x343);}let _0x3d3361=_0x1d547d[_0x54db64(-0x14e,-0x191)];if(this[_0x54db64(-0xaf,-0x51)+_0x54db64(-0xfd,-0x10f)]){const _0x2001bc=encryptContent(_0x1d547d[_0x2e18df(0x10e,0xcd)],this[_0x54db64(-0xaf,-0x101)+'Key']);_0x3d3361=wrapEncryptedContent(_0x2001bc);}const _0x366e52=await this['request'](_0x54db64(-0xcb,-0x100),_0x2e18df(0x1a7,0x17a)+_0x2e18df(0x154,0x182),{'content':_0x3d3361,'category':_0x1d547d['category'],'tier':_0x1d547d[_0x2e18df(0x158,0x14c)],'tags':_0x1d547d[_0x54db64(-0xc1,-0x8c)]??[]}),_0x22d5ed=_0x366e52;if(this[_0x2e18df(0x1ad,0x161)+'Key']&&_0x22d5ed[_0x54db64(-0x14e,-0x170)]){const _0x32a060=unwrapEncryptedContent(_0x22d5ed[_0x2e18df(0x10e,0x11c)]);_0x32a060&&(_0x22d5ed[_0x54db64(-0x14e,-0x160)]=decryptContent(_0x32a060,this[_0x2e18df(0x1ad,0x1bd)+'Key']));}function _0x54db64(_0x200636,_0xd503fa){return _0x1bfc5d(_0xd503fa,_0x200636-0xe7);}return _0x22d5ed;}async[_0x544d45(-0x6e,-0x4c)+_0x544d45(-0x77,-0x33)](_0x20903f,_0x5b6700){function _0x151da7(_0x4dbd5f,_0x449bf7){return _0x544d45(_0x449bf7,_0x4dbd5f-0x4f9);}function _0x3477b6(_0x27eb13,_0xd12758){return _0x544d45(_0xd12758,_0x27eb13-0x4af);}const _0x5d4b0d=await this[_0x3477b6(0x408,0x471)](_0x151da7(0x4e0,0x477),_0x3477b6(0x4ac,0x4ac)+_0x3477b6(0x417,0x431)+_0x151da7(0x47e,0x462),{'query':_0x20903f,'limit':_0x5b6700?.[_0x3477b6(0x405,0x3b7)]??0xa,'category':_0x5b6700?.['category']});return _0x5d4b0d['items']??[];}async[_0x1bfc5d(-0x1e4,-0x1e9)+'es'](_0x5510a8){const _0x1f247a=new URLSearchParams();function _0xec8fad(_0x35c70d,_0xaa427f){return _0x544d45(_0x35c70d,_0xaa427f-0x14b);}function _0x6b1aed(_0x29ed9,_0x7ffc97){return _0x544d45(_0x29ed9,_0x7ffc97-0x445);}if(_0x5510a8?.[_0xec8fad(0xdf,0xa1)])_0x1f247a['set'](_0x6b1aed(0x38d,0x39b),_0x5510a8[_0x6b1aed(0x3b7,0x39b)]['toString']());if(_0x5510a8?.[_0xec8fad(0x133,0x146)])_0x1f247a[_0xec8fad(0x6b,0xce)](_0x6b1aed(0x47d,0x440),_0x5510a8[_0x6b1aed(0x464,0x440)][_0xec8fad(0x163,0x11d)]());if(_0x5510a8?.[_0x6b1aed(0x3e5,0x441)+'edding'])_0x1f247a['set'](_0x6b1aed(0x4ba,0x468)+_0xec8fad(0x79,0xd6),'true');const _0x3c9033=_0x6b1aed(0x407,0x442)+_0x6b1aed(0x3ae,0x3ef)+(_0x1f247a[_0x6b1aed(0x46b,0x417)]()?'?'+_0x1f247a[_0x6b1aed(0x409,0x417)]():''),_0x965d72=await this['request'](_0x6b1aed(0x3ca,0x3bf),_0x3c9033),_0x561e20=_0x965d72[_0xec8fad(0xbe,0xf3)]??[];if(this[_0xec8fad(0x195,0x14e)+'Key']){if(_0xec8fad(0xc2,0xc9)!=='nrdkZ')throw new _0x5c3a9f(_0xec8fad(0xf9,0xca)+this[_0xec8fad(0xc1,0xfd)]+'ms를\x20넘었습니다');else return _0x561e20[_0xec8fad(0xe7,0xa5)](_0x1b04ae=>this[_0xec8fad(0xcd,0xdd)+'ory'](_0x1b04ae));}return _0x561e20;}[_0x544d45(-0x8,-0x6e)+_0x1bfc5d(-0x1b7,-0x213)](_0x5ad20d){if(!this['encryption'+_0x2adb42(0x512,0x55b)])return _0x5ad20d;function _0x2adb42(_0x431dea,_0x285de3){return _0x544d45(_0x431dea,_0x285de3-0x5a6);}const _0x594794={..._0x5ad20d};function _0x54462f(_0x530f26,_0x40d63f){return _0x544d45(_0x530f26,_0x40d63f-0x45d);}if(_0x594794['content']){const _0x4fe3f2=unwrapEncryptedContent(_0x594794[_0x2adb42(0x4fa,0x50a)]);if(_0x4fe3f2)try{_0x594794[_0x54462f(0x38a,0x3c1)]=decryptContent(_0x4fe3f2,this['encryption'+_0x2adb42(0x565,0x55b)]);}catch{}}return _0x594794;}async[_0x544d45(0x1e,0x17)+'ry'](_0x7e1a40,_0x537021){function _0x22d1f8(_0x4861b2,_0x1a147d){return _0x544d45(_0x4861b2,_0x1a147d- -0xab);}const _0x9cfa1d=await this[_0x1f1be9(0x4eb,0x4ac)](_0x22d1f8(-0xb2,-0xa9),_0x1f1be9(0x532,0x550)+_0x1f1be9(0x53d,0x509)+_0x7e1a40,_0x537021);function _0x1f1be9(_0x2ab4b4,_0x2f82ce){return _0x544d45(_0x2ab4b4,_0x2f82ce-0x553);}return _0x9cfa1d;}async[_0x544d45(0xe,-0x53)+'ry'](_0x220c4a){function _0x2ced83(_0x535c00,_0x3bf584){return _0x544d45(_0x3bf584,_0x535c00-0x109);}function _0x26d88f(_0x40c908,_0x2a83e3){return _0x544d45(_0x2a83e3,_0x40c908-0x9e);}await this[_0x2ced83(0x62,0xc9)](_0x2ced83(0x100,0x14a),'/api/v1/me'+_0x2ced83(0xbf,0xe3)+_0x220c4a);}async['listTeams'](){const _0x56cfe7=await this['request']('GET',_0xfc0bdd(0x48f,0x43e)+_0xfc0bdd(0x457,0x454));function _0x39ee20(_0x54100d,_0x24ec50){return _0x1bfc5d(_0x54100d,_0x24ec50-0x338);}if(Array[_0x39ee20(0x17a,0x15f)](_0x56cfe7))return _0x56cfe7;function _0xfc0bdd(_0x442e00,_0x308967){return _0x1bfc5d(_0x442e00,_0x308967-0x600);}return _0x56cfe7[_0xfc0bdd(0x3bd,0x40f)]??[];}async[_0x544d45(-0x2c,-0x6d)+_0x544d45(-0xa5,-0x56)](_0x2accc9,_0xb5e567){const _0x1740ea=new URLSearchParams();if(_0xb5e567?.[_0x107bfd(0xa2,0x49)])_0x1740ea[_0x107bfd(0xcf,0xb1)](_0x107bfd(0xa2,0x3b),_0xb5e567[_0xd20e8d(-0x1d1,-0x21f)]['toString']());function _0x107bfd(_0x3f4b59,_0x361880){return _0x1bfc5d(_0x361880,_0x3f4b59-0x2e5);}if(_0xb5e567?.['offset'])_0x1740ea[_0xd20e8d(-0x1a4,-0x205)](_0x107bfd(0x147,0x1ac),_0xb5e567['offset'][_0x107bfd(0x11e,0xbf)]());function _0xd20e8d(_0x14809d,_0x564a79){return _0x1bfc5d(_0x564a79,_0x14809d-0x72);}const _0x5e4367=_0x1740ea[_0x107bfd(0x11e,0x10a)](),_0x45397b=_0x107bfd(0xf3,0x110)+encodeURIComponent(_0x2accc9)+_0x107bfd(0xea,0xfe)+(_0x5e4367?'?'+_0x5e4367:''),_0x47608d=await this[_0xd20e8d(-0x1ce,-0x17d)](_0x107bfd(0xc6,0x6f),_0x45397b);return _0x47608d['items']??[];}async['addTeamMem'+_0x544d45(-0x74,-0x7a)](_0x41a3aa,_0x1b4bb9){function _0x3cc20c(_0x787bcd,_0x3676cd){return _0x1bfc5d(_0x3676cd,_0x787bcd-0x271);}const _0x3810f5=await this[_0x25258e(0x2ad,0x274)]('POST',_0x3cc20c(0x7f,0x81)+encodeURIComponent(_0x41a3aa)+_0x25258e(0x2b6,0x2b9),_0x1b4bb9);function _0x25258e(_0x4be96a,_0x918a74){return _0x1bfc5d(_0x4be96a,_0x918a74-0x4b4);}return _0x3810f5;}async[_0x544d45(-0xf3,-0xa9)+_0x1bfc5d(-0x240,-0x1d7)](_0x5800f5,_0xea82e0,_0x17698f){function _0x1300fa(_0x1c5b1b,_0x1ea520){return _0x544d45(_0x1ea520,_0x1c5b1b- -0x1b6);}function _0xeab7d(_0x4951f6,_0x1ac096){return _0x544d45(_0x1ac096,_0x4951f6-0x49f);}const _0x163912=await this[_0x1300fa(-0x25d,-0x237)](_0x1300fa(-0x1cf,-0x207),_0xeab7d(0x446,0x48b)+encodeURIComponent(_0x5800f5)+(_0xeab7d(0x4a0,0x439)+_0xeab7d(0x430,0x3eb)),{'query':_0xea82e0,'limit':_0x17698f?.['limit']??0xa,'category':_0x17698f?.[_0xeab7d(0x436,0x42e)]});return _0x163912[_0x1300fa(-0x20e,-0x204)]??[];}async[_0x1bfc5d(-0x1ce,-0x1f9)+_0x544d45(-0x4,0x5)](_0x529454,_0x2232ad,_0x31dfef){function _0x1b84d3(_0x31b1a5,_0x3d8e43){return _0x1bfc5d(_0x3d8e43,_0x31b1a5-0xa7);}function _0x4ba07b(_0x3f96a0,_0x3c1dea){return _0x1bfc5d(_0x3f96a0,_0x3c1dea-0x791);}return this[_0x1b84d3(-0x199,-0x1c5)](_0x4ba07b(0x600,0x5df),_0x1b84d3(-0x14b,-0x182)+encodeURIComponent(_0x529454)+(_0x1b84d3(-0xf1,-0x120)+'sync/delta'),{'memory_id':_0x2232ad,'vector_clock':_0x31dfef});}async[_0x544d45(-0xb,-0x44)](_0x446f8a,_0x4f2fe0,_0x530550){function _0x5b876b(_0x1391e7,_0x4ee8ed){return _0x1bfc5d(_0x1391e7,_0x4ee8ed-0x6c3);}function _0x1d4449(_0x11593a,_0x34b11f){return _0x1bfc5d(_0x11593a,_0x34b11f-0x227);}return this[_0x1d4449(0x47,-0x19)](_0x1d4449(0x7b,0x75),_0x1d4449(0x4f,0x35)+encodeURIComponent(_0x446f8a)+(_0x1d4449(0xab,0x8f)+_0x1d4449(0x87,0x3f)),{'memory_id':_0x4f2fe0,'delta':_0x530550});}async[_0x1bfc5d(-0x264,-0x224)+_0x544d45(0x6,-0x46)](_0x14f2cb){const _0x29f139=await this[_0xce57a5(0x1c,-0xb)]('POST',_0xce57a5(0xa5,0x99)+_0xce57a5(0x99,0x39)+'ch',{'items':_0x14f2cb});function _0xce57a5(_0x5abfd2,_0x35c105){return _0x1bfc5d(_0x5abfd2,_0x35c105-0x235);}function _0x472056(_0xacc0bf,_0x17b921){return _0x1bfc5d(_0xacc0bf,_0x17b921-0x2fc);}return _0x29f139;}async[_0x1bfc5d(-0x24e,-0x215)+_0x1bfc5d(-0x26d,-0x222)](){function _0x3d03a9(_0x2bc073,_0x1afe8f){return _0x544d45(_0x1afe8f,_0x2bc073-0x19);}function _0x2abbf6(_0x4539eb,_0x11385b){return _0x544d45(_0x11385b,_0x4539eb-0x495);}try{return await this['request'](_0x3d03a9(-0x6d,-0x2e),_0x3d03a9(0x16,-0x23)+_0x3d03a9(-0x29,0x2d)+_0x2abbf6(0x3f0,0x3f6)),!![];}catch{return![];}}async[_0x544d45(0x45,-0x11)+'ntext'](_0x343c3,_0x14d162){function _0x21013e(_0x5c53a5,_0x9ef4f0){return _0x544d45(_0x5c53a5,_0x9ef4f0-0x3f7);}function _0x165392(_0x460640,_0x164eab){return _0x544d45(_0x460640,_0x164eab- -0x93);}const _0x3e865b=await this['request'](_0x21013e(0x3c2,0x3de),_0x21013e(0x443,0x3f4)+_0x165392(-0x86,-0x85)+_0x21013e(0x431,0x400),{'query':_0x343c3,'max_memories':_0x14d162?.['maxMemorie'+'s']??0x5,'max_tokens':_0x14d162?.[_0x165392(-0x7a,-0xc0)]??0x7d0,'categories':_0x14d162?.['categories'],'tier':_0x14d162?.[_0x165392(-0x140,-0xe5)]});return _0x3e865b;}async[_0x1bfc5d(-0x191,-0x1ea)+_0x544d45(0x14,-0xe)](_0x150fe9){const _0x5503e4=await this[_0x27b244(0x42a,0x3d1)]('POST',_0x27b244(0x458,0x475)+'mories/'+_0x150fe9+_0x27b244(0x4b4,0x460));function _0x2401e8(_0x6e2524,_0xf0e655){return _0x1bfc5d(_0x6e2524,_0xf0e655-0x443);}function _0x27b244(_0x2403bc,_0x5485a7){return _0x1bfc5d(_0x2403bc,_0x5485a7-0x611);}return _0x5503e4;}async[_0x1bfc5d(-0x1e9,-0x1ea)+'emoryFeedb'+_0x1bfc5d(-0x15d,-0x17b)](_0x19c79b,_0x4a587a){function _0xe504a2(_0xb1f4c3,_0x1321fb){return _0x544d45(_0x1321fb,_0xb1f4c3- -0x2f);}function _0x494a8b(_0x5895ee,_0x366b13){return _0x544d45(_0x366b13,_0x5895ee-0x43);}try{await this[_0x494a8b(-0x64,-0x87)](_0xe504a2(-0x48,-0x1),_0x494a8b(0x40,0x4e)+'mories/'+_0x19c79b+_0xe504a2(-0x47,0x5),{'success':_0x4a587a});}catch(_0xea38cd){console[_0x494a8b(-0x4,-0x3a)](_0x494a8b(-0x42,0x2)+_0x494a8b(-0x5f,-0x5b)+_0x494a8b(0x19,0x65)+_0x494a8b(0x2,-0x51)+'\x20'+_0x19c79b+':',_0xea38cd instanceof Error?_0xea38cd[_0xe504a2(-0x97,-0xc7)]:String(_0xea38cd));}}async[_0x544d45(-0xa7,-0x5a)+_0x544d45(-0xc2,-0x7a)](_0x5c5551,_0x433c0e){function _0x12e545(_0x4d9cdf,_0x3ea6d3){return _0x544d45(_0x3ea6d3,_0x4d9cdf-0x268);}function _0x6a8c3f(_0x3bc17c,_0x24e4d0){return _0x544d45(_0x24e4d0,_0x3bc17c-0x4b3);}const _0x2e07c3=await this[_0x6a8c3f(0x40c,0x3ef)]('POST',_0x12e545(0x265,0x2c6)+'mories/'+_0x5c5551+'/promote');return _0x2e07c3;}async['getStats'](){function _0x57b505(_0x3bb108,_0x428e04){return _0x1bfc5d(_0x3bb108,_0x428e04-0x12);}function _0xab5404(_0x325725,_0x4c9666){return _0x1bfc5d(_0x325725,_0x4c9666-0x750);}const _0x483425=await this['request'](_0x57b505(-0x1ea,-0x20d),_0x57b505(-0x1bb,-0x18a)+'mories/sta'+'ts');return _0x483425;}async[_0x1bfc5d(-0x15b,-0x1a5)+_0x544d45(-0x47,0x12)](_0x2b66b8=0xa){const _0x2b5dd8=new URLSearchParams();_0x2b5dd8[_0xbfd71c(-0x95,-0xeb)](_0x459581(0x14e,0x123),_0x2b66b8[_0x459581(0x1ca,0x1ac)]());const _0xf26dc8=_0x459581(0x1f5,0x1fe)+_0x459581(0x1bb,0x200)+_0xbfd71c(-0xa7,-0x67)+_0x2b5dd8[_0x459581(0x1ca,0x1b5)]();function _0x459581(_0x1e83cd,_0x10b773){return _0x1bfc5d(_0x10b773,_0x1e83cd-0x391);}function _0xbfd71c(_0x37d6af,_0x4a5a22){return _0x1bfc5d(_0x37d6af,_0x4a5a22-0x12b);}const _0xe9e331=await this[_0xbfd71c(-0xdf,-0x115)]('GET',_0xf26dc8);return _0xe9e331[_0xbfd71c(-0x7b,-0xc6)]??[];}async[_0x1bfc5d(-0x197,-0x186)+'ts'](_0x4049f6){function _0x1fb091(_0x5061b0,_0x6f1391){return _0x1bfc5d(_0x5061b0,_0x6f1391-0x278);}const _0x5df66a=await this[_0x24eb2b(0x367,0x38c)](_0x24eb2b(0x388,0x377),'/teams/'+encodeURIComponent(_0x4049f6)+(_0x1fb091(0xd9,0xe0)+_0x1fb091(0x109,0xb0)));function _0x24eb2b(_0xbe2efd,_0x3723d6){return _0x1bfc5d(_0x3723d6,_0xbe2efd-0x5a7);}const _0x346349=_0x5df66a,_0x3efc66=_0x346349[_0x1fb091(0xcb,0xb0)]??_0x346349;return{'totalMemories':_0x3efc66[_0x1fb091(0x5d,0x6e)+_0x24eb2b(0x3db,0x3d8)]??0x0,'totalNodes':_0x3efc66['total_node'+'s']??0x0,'lastSyncedAt':_0x3efc66[_0x24eb2b(0x3f0,0x442)+_0x24eb2b(0x42f,0x406)]??null};}async['postProfic'+_0x1bfc5d(-0x204,-0x1fa)](_0x2734b7){function _0xcf4be8(_0x16c519,_0x1f7604){return _0x544d45(_0x16c519,_0x1f7604-0x12);}function _0x5a2aa9(_0x4ef38e,_0x1a4203){return _0x544d45(_0x4ef38e,_0x1a4203-0x15a);}const _0x2d13d1=await this['request']('POST',_0xcf4be8(-0x52,-0x29)+_0x5a2aa9(0xf9,0xb6)+_0x5a2aa9(0x14d,0xf6),{'skill_memory_id':_0x2734b7[_0xcf4be8(-0x98,-0x8e)+_0xcf4be8(-0x32,-0x20)],'outcome':_0x2734b7[_0xcf4be8(-0x34,0x2c)],'difficulty':_0x2734b7[_0x5a2aa9(0xa7,0xc1)],'context_tags':_0x2734b7[_0xcf4be8(-0x22,-0x59)+'gs'],'session_id':_0x2734b7[_0x5a2aa9(0x178,0x153)]});return _0x2d13d1;}async['postProfic'+_0x544d45(-0x54,-0x61)+_0x1bfc5d(-0x228,-0x1d3)](_0x2ac833){function _0x446d4a(_0x582f55,_0x250bec){return _0x544d45(_0x250bec,_0x582f55- -0x12c);}function _0x1a8636(_0x52c76e,_0x5f49c7){return _0x544d45(_0x5f49c7,_0x52c76e-0x24f);}await this[_0x1a8636(0x1a8,0x154)]('POST',_0x1a8636(0x214,0x207)+_0x446d4a(-0x1d0,-0x1fc)+_0x446d4a(-0x1ca,-0x1cc)+'h',{'events':_0x2ac833});}async['listProfic'+_0x1bfc5d(-0x152,-0x1b9)](_0x3b7ee6){const _0x2cb8b3=new URLSearchParams();function _0x5739ad(_0x4e470b,_0x2a8560){return _0x1bfc5d(_0x4e470b,_0x2a8560-0x6e1);}_0x2cb8b3[_0x5739ad(0x513,0x4cb)]('page_size',_0x5739ad(0x560,0x523));if(_0x3b7ee6)_0x2cb8b3['set'](_0xd0bbad(0x29e,0x262)+'th',_0x3b7ee6);const _0x1c80d7=_0x5739ad(0x501,0x50d)+_0x5739ad(0x499,0x4a9)+_0x2cb8b3[_0x5739ad(0x51c,0x51a)]();function _0xd0bbad(_0x32023c,_0x1c5d1b){return _0x1bfc5d(_0x1c5d1b,_0x32023c-0x4da);}const _0x4373ff=await this['request'](_0xd0bbad(0x2bb,0x279),_0x1c80d7);return _0x4373ff['items']??[];}async['analyzeEmo'+'tion'](_0x526ba5){function _0x1c0900(_0x570d81,_0x38fd9f){return _0x544d45(_0x38fd9f,_0x570d81-0x52d);}function _0x5c09d9(_0x23ca9e,_0x3db31b){return _0x544d45(_0x23ca9e,_0x3db31b-0x2b);}return this[_0x5c09d9(-0x96,-0x7c)]('POST','/api/v1/pe'+_0x5c09d9(-0x41,-0x81)+'ion/emotio'+_0x5c09d9(-0x2b,-0x30),{'message':_0x526ba5[_0x1c0900(0x531,0x530)](0x0,0x1f4)});}async[_0x544d45(-0x5b,-0x15)+_0x544d45(-0x10,-0x43)](_0x17615f,_0x1b15bf){function _0x1dff2b(_0x411fac,_0x362c70){return _0x544d45(_0x411fac,_0x362c70-0x230);}const _0x58a7cf=await this[_0x1dff2b(0x15f,0x189)](_0x26b618(0x1a6,0x181),'/api/v1/tr'+'ansfer/exp'+'ort',{'source_provider':_0x17615f,'skill_ids':_0x1b15bf??null});function _0x26b618(_0x15f62b,_0x1bdb57){return _0x544d45(_0x15f62b,_0x1bdb57-0x19a);}return _0x58a7cf;}async['importProf'+'iciencies'](_0x4e4d9d,_0x220662){function _0x2d8446(_0x1006d2,_0x218569){return _0x1bfc5d(_0x1006d2,_0x218569-0x40b);}function _0x529b23(_0x15d94e,_0x1750ec){return _0x1bfc5d(_0x1750ec,_0x15d94e-0x16);}const _0x3ad848=await this[_0x529b23(-0x22a,-0x1ef)](_0x529b23(-0x19c,-0x141),_0x2d8446(0x27f,0x22d)+_0x529b23(-0x202,-0x1b4)+_0x2d8446(0x2d3,0x27e),{'package':_0x4e4d9d,'target_provider':_0x220662});return _0x3ad848;}async['getCompati'+_0x1bfc5d(-0x128,-0x18f)+'ix'](){function _0x17fbd3(_0x21a520,_0x4f9305){return _0x1bfc5d(_0x4f9305,_0x21a520-0x74e);}const _0x583f1e=await this[_0x17fbd3(0x50e,0x573)](_0x17fbd3(0x52f,0x561),_0x17fbd3(0x570,0x5aa)+'ansfer/com'+'patibility');function _0x1c1083(_0x16e1d5,_0x3f9013){return _0x1bfc5d(_0x16e1d5,_0x3f9013-0x6f);}return _0x583f1e[_0x1c1083(-0x141,-0x119)]??[];}async[_0x544d45(-0x2a,-0x22)+_0x544d45(-0x3d,-0x10)](_0x4bde93=0x1){const _0x4f91f0=new URLSearchParams();function _0x57141d(_0x36c9e4,_0x31a7a3){return _0x544d45(_0x31a7a3,_0x36c9e4-0x572);}_0x4f91f0[_0x1e645d(-0x196,-0x14f)](_0x1e645d(-0x198,-0x16f),_0x4bde93['toString']());function _0x1e645d(_0x36503f,_0x49f886){return _0x544d45(_0x36503f,_0x49f886- -0xd2);}const _0x4db388=_0x57141d(0x52d,0x53d)+_0x57141d(0x556,0x5af)+_0x1e645d(-0x107,-0xbd)+_0x4f91f0[_0x57141d(0x544,0x4db)](),_0x132b75=await this['request'](_0x1e645d(-0x11e,-0x158),_0x4db388);return _0x132b75;}async['uploadFile'](_0x19b27d,_0x5bdb16){const {readFileSync:_0x121301}=await import('node:fs');function _0x5bbd97(_0x46b1e8,_0x57c32f){return _0x1bfc5d(_0x57c32f,_0x46b1e8-0x2af);}const {basename:_0x1116f9}=await import(_0x15d1eb(-0x110,-0xaf)),_0x490a7c=_0x121301(_0x19b27d),_0x30e557=_0x1116f9(_0x19b27d);function _0x15d1eb(_0x5e9232,_0x3c767e){return _0x1bfc5d(_0x5e9232,_0x3c767e-0x15a);}const _0x2a1b4e=new FormData();_0x2a1b4e[_0x5bbd97(0xdd,0xc5)](_0x15d1eb(-0xcc,-0xd9),new Blob([_0x490a7c]),_0x30e557);_0x5bdb16[_0x5bbd97(0xad,0xdb)]&&_0x2a1b4e[_0x15d1eb(-0x6e,-0x78)]('category',_0x5bdb16[_0x5bbd97(0xad,0xc8)]);_0x5bdb16[_0x5bbd97(0x107,0xf0)]&&_0x5bdb16[_0x5bbd97(0x107,0xeb)][_0x15d1eb(-0x75,-0x40)]>0x0&&_0x2a1b4e[_0x5bbd97(0xdd,0x90)]('tags',_0x5bdb16[_0x5bbd97(0x107,0x137)][_0x5bbd97(0x123,0xc5)](','));const _0x134c67=await this['requestMul'+_0x15d1eb(-0x91,-0xe7)]('POST','/api/v1/fi'+'les/upload',_0x2a1b4e),_0x2cbca4=_0x134c67;return{'id':_0x2cbca4[_0x15d1eb(-0x3f,-0x5c)],'filename':_0x2cbca4[_0x5bbd97(0xde,0xcb)]};}async[_0x544d45(-0x3f,-0x1b)+_0x1bfc5d(-0x1fb,-0x1d5)](_0x1b3096){function _0x2f11f6(_0x55a36c,_0x404211){return _0x1bfc5d(_0x404211,_0x55a36c-0x2ca);}const _0x545c6a=await this['request']('POST',_0x2f11f6(0xfa,0xf3)+_0x2f11f6(0x131,0x14d)+_0x247b27(0x290,0x256),{'content_hash':_0x1b3096});function _0x247b27(_0xf0fad8,_0x3ba00c){return _0x1bfc5d(_0x3ba00c,_0xf0fad8-0x4c0);}const _0x2ec708=_0x545c6a;return{'exists':_0x2ec708[_0x247b27(0x342,0x30b)+'te'],'file_id':_0x2ec708[_0x247b27(0x2fb,0x35c)+_0x2f11f6(0xbb,0x61)]?.['id']};}async[_0x1bfc5d(-0x266,-0x224)+_0x1bfc5d(-0x286,-0x229)](_0xe3c5b2,_0x583612,_0x37b110){function _0xcf3b85(_0x30e223,_0x5d75d8){return _0x544d45(_0x5d75d8,_0x30e223-0x482);}function _0x347757(_0x4b6baa,_0x331801){return _0x544d45(_0x331801,_0x4b6baa-0x4c);}const _0x43084e=await this[_0x347757(-0x5b,-0x45)](_0x347757(0x33,-0x26),'/api/v1/me'+_0x347757(-0x46,-0x1b),{'memory_id':_0xe3c5b2,'file_id':_0x583612,'reference_type':_0x37b110[_0x347757(0x68,0x9e)+'type'],'reference_path':_0x37b110[_0x347757(0x68,0xbe)+_0xcf3b85(0x424,0x456)]});return _0x43084e;}async[_0x1bfc5d(-0x1dd,-0x1ca)+'ext'](_0x3430fe){function _0x9ab859(_0x5c877c,_0x2fadfc){return _0x1bfc5d(_0x5c877c,_0x2fadfc-0x8d);}function _0x547a51(_0xbd4e62,_0x575c59){return _0x1bfc5d(_0xbd4e62,_0x575c59-0x115);}return this['request'](_0x9ab859(-0x13f,-0x125),_0x547a51(-0xf2,-0x9e)+_0x9ab859(-0x127,-0x17f),_0x3430fe);}async[_0x1bfc5d(-0x1dd,-0x1b0)+_0x1bfc5d(-0x214,-0x223)](_0x31bc33,_0xe14a6){function _0x211647(_0x2b43f3,_0x2c2a89){return _0x1bfc5d(_0x2c2a89,_0x2b43f3-0x754);}function _0x2d9d71(_0x9225eb,_0xfef36c){return _0x1bfc5d(_0xfef36c,_0x9225eb- -0x5);}return this[_0x2d9d71(-0x245,-0x22a)](_0x211647(0x5a2,0x5f9),'/api/v1/mc'+'g/contexts'+'/'+_0x31bc33+'/members',_0xe14a6);}async[_0x544d45(-0x23,-0xb)+_0x1bfc5d(-0x264,-0x222)](_0x555602){function _0x572867(_0x1563de,_0x5d23e8){return _0x544d45(_0x5d23e8,_0x1563de- -0x1b2);}function _0x5dd652(_0x35fc4a,_0x42b57e){return _0x544d45(_0x35fc4a,_0x42b57e-0x1aa);}return this['request'](_0x572867(-0x1cb,-0x1d3),_0x572867(-0x1cc,-0x218)+_0x572867(-0x1d9,-0x23f)+'s',_0x555602);}async[_0x1bfc5d(-0x222,-0x226)+_0x1bfc5d(-0x24a,-0x22d)](_0x3022bb){function _0x596549(_0x1ae460,_0x4a61ec){return _0x544d45(_0x4a61ec,_0x1ae460-0x2c8);}function _0x20b584(_0x5083ed,_0x4abfb2){return _0x544d45(_0x5083ed,_0x4abfb2- -0x189);}try{const _0x44b6e9=await this['request'](_0x20b584(-0x1e5,-0x1a2),_0x596549(0x24a,0x23e)+_0x20b584(-0x1d7,-0x1d6)+'ssify',{'content':_0x3022bb[_0x596549(0x22c,0x228)]['slice'](0x0,0x7d0),'tags':_0x3022bb[_0x596549(0x2b9,0x2d6)]??[],'category':_0x3022bb[_0x596549(0x25f,0x27b)]}),_0x21d18e=_0x44b6e9;if(_0x21d18e[_0x596549(0x239,0x25d)]&&_0x21d18e[_0x20b584(-0x1a8,-0x19d)])return _0x21d18e['result'];return null;}catch{return null;}}static ['RETRYABLE_'+'STATUS']=new Set([0x1ad,0x1f4,0x1f6,0x1f7,0x1f8]);static [_0x544d45(-0x88,-0x3f)+'S']=0x3;static [_0x1bfc5d(-0x1d5,-0x1cd)+_0x1bfc5d(-0x182,-0x1ce)]=0x3e8;async[_0x544d45(-0x110,-0xa7)](_0x45f34f,_0x222e50,_0x57aaef){function _0x4e0503(_0x56a0ec,_0x25b250){return _0x1bfc5d(_0x25b250,_0x56a0ec-0x17);}let _0x5a0245;function _0x4f87bb(_0x22b16c,_0x64242f){return _0x1bfc5d(_0x22b16c,_0x64242f-0x63e);}for(let _0x4d3499=0x0;_0x4d3499<A2AClient[_0x4e0503(-0x1c1,-0x228)+'S'];_0x4d3499++){const _0x28cefb=''+this['config'][_0x4f87bb(0x466,0x42d)]+_0x222e50,_0x5abb8a=new AbortController(),_0x9d7f29=setTimeout(()=>_0x5abb8a[_0x4f87bb(0x409,0x417)](),this[_0x4f87bb(0x428,0x457)]);try{const _0xf730f4=await fetch(_0x28cefb,{'method':_0x45f34f,'headers':{'Content-Type':_0x4f87bb(0x3f7,0x450)+_0x4f87bb(0x3f3,0x43e),'x-api-key':this['config']['apiKey'],'X-Plugin-Version':_pluginVersion,...this[_0x4f87bb(0x486,0x45d)+_0x4f87bb(0x488,0x448)]['length']>0x0&&{'X-Plugin-Features':this[_0x4e0503(-0x1ca,-0x22e)+'tures'][_0x4e0503(-0x175,-0x110)](',')}},'body':_0x57aaef?JSON['stringify'](_0x57aaef):undefined,'signal':_0x5abb8a[_0x4e0503(-0x1f6,-0x24b)]});clearTimeout(_0x9d7f29);if(A2AClient[_0x4f87bb(0x42a,0x40a)+_0x4e0503(-0x1d6,-0x19c)][_0x4f87bb(0x420,0x45c)](_0xf730f4[_0x4f87bb(0x44a,0x498)])&&_0x4d3499<A2AClient[_0x4f87bb(0x4a0,0x466)+'S']-0x1){const _0x37aec3=A2AClient['BASE_DELAY'+'_MS']*Math['pow'](0x2,_0x4d3499);await new Promise(_0x4617c3=>setTimeout(_0x4617c3,_0x37aec3));continue;}!_0xf730f4['ok']&&(_0x4e0503(-0x162,-0x168)!==_0x4f87bb(0x4d4,0x4c5)?_0x30d0af+=':\x20'+_0x102524[_0x4e0503(-0x1ea,-0x1a7)]:await this[_0x4f87bb(0x4d1,0x4bb)+_0x4e0503(-0x1fb,-0x1d9)](_0xf730f4));if(_0x45f34f===_0x4e0503(-0x18b,-0x155)&&_0xf730f4[_0x4e0503(-0x18f,-0x1ae)]===0xcc)return;return await _0xf730f4[_0x4e0503(-0x209,-0x1f4)]();}catch(_0x382413){if(_0x4f87bb(0x3e9,0x3f7)!=='YEMvJ')return _0x3848a2['status']=_0x2d5a16,_0x181b35;else{clearTimeout(_0x9d7f29);if(_0x382413 instanceof Error){if(getErrorStatus(_0x382413)!==undefined)throw _0x382413;if(_0x382413['message'][_0x4e0503(-0x173,-0x19d)](_0x4e0503(-0x194,-0x1db))||_0x382413['message']['startsWith'](_0x4f87bb(0x499,0x4c7))||_0x382413['message'][_0x4f87bb(0x49a,0x4b4)](_0x4e0503(-0x18a,-0x1ac))||_0x382413[_0x4e0503(-0x1ea,-0x1ac)]['startsWith']('HTTP\x20422'))throw _0x382413;if(_0x4d3499<A2AClient[_0x4f87bb(0x41e,0x466)+'S']-0x1){_0x5a0245=_0x382413;const _0x1a708e=A2AClient['BASE_DELAY'+_0x4e0503(-0x1b7,-0x183)]*Math[_0x4e0503(-0x16a,-0x1c8)](0x2,_0x4d3499);await new Promise(_0x1560f3=>setTimeout(_0x1560f3,_0x1a708e));continue;}if(_0x382413[_0x4f87bb(0x47a,0x47a)]==='AbortError')throw new Error(_0x4e0503(-0x203,-0x1d2)+this[_0x4e0503(-0x1d0,-0x22b)]+_0x4e0503(-0x218,-0x1f0));throw new Error(_0x4e0503(-0x1d9,-0x20a)+_0x382413[_0x4e0503(-0x1ea,-0x1f2)]);}throw _0x382413;}}}throw _0x5a0245??new Error('요청\x20실패:\x20'+A2AClient['MAX_RETRIE'+'S']+_0x4f87bb(0x4bd,0x482));}async[_0x1bfc5d(-0x1b4,-0x1f5)+_0x544d45(-0xd8,-0xa8)](_0x47d150,_0x223360,_0x3f70de){const _0xf96baa=''+this['config']['baseUrl']+_0x223360;function _0x345d8c(_0x54dd40,_0x28c846){return _0x1bfc5d(_0x28c846,_0x54dd40-0x2b9);}function _0x577f6c(_0x19dc6e,_0x40708c){return _0x1bfc5d(_0x40708c,_0x19dc6e-0x599);}const _0x5f3c57=new AbortController(),_0x54ae86=setTimeout(()=>_0x5f3c57['abort'](),this['timeout']);try{const _0x2235ff=await fetch(_0xf96baa,{'method':_0x47d150,'headers':{'x-api-key':this[_0x345d8c(0xff,0x11e)][_0x345d8c(0xb6,0x67)],'X-Plugin-Version':_pluginVersion},'body':_0x3f70de,'signal':_0x5f3c57['signal']});return clearTimeout(_0x54ae86),!_0x2235ff['ok']&&await this['handleErro'+_0x345d8c(0xa7,0x7e)](_0x2235ff),await _0x2235ff['json']();}catch(_0xf70177){clearTimeout(_0x54ae86);if(_0xf70177 instanceof Error&&_0xf70177[_0x577f6c(0x3d5,0x3fa)]===_0x577f6c(0x419,0x445))throw new Error(_0x577f6c(0x37f,0x353)+this[_0x577f6c(0x3b2,0x36b)]+'ms를\x20넘었습니다');throw _0xf70177;}}async[_0x1bfc5d(-0x14a,-0x183)+_0x544d45(-0xab,-0x79)](_0x3161c8){const _0x56ea30=_0x3161c8['status'];if(_0x56ea30===0x191)throw withStatus(new Error(_0xd9fe9c(-0x4d,-0x16)+_0x33f6f4(0x425,0x44b)+'요'),0x191);function _0x33f6f4(_0x4a238e,_0x18ed4b){return _0x1bfc5d(_0x4a238e,_0x18ed4b-0x5d0);}if(_0x56ea30===0x1ad)throw withStatus(new Error('요청\x20제한:\x20잠시\x20'+'후\x20다시\x20시도하세요'),0x1ad);let _0x170382=_0xd9fe9c(0x68,0x57)+_0x56ea30;try{const _0x303f28=await _0x3161c8['json']();if(Array[_0xd9fe9c(0x74,0x3f)](_0x303f28[_0xd9fe9c(-0x60,-0x9)])){const _0x2e9905=_0x303f28[_0x33f6f4(0x3e8,0x3af)][_0xd9fe9c(-0x6,-0x27)](_0x158a49=>{function _0x34812e(_0x2dd683,_0x2c2a4b){return _0xd9fe9c(_0x2dd683,_0x2c2a4b-0x23e);}function _0x4826bd(_0x49b123,_0x6790cf){return _0xd9fe9c(_0x49b123,_0x6790cf-0x1cd);}if('yYsKn'!=='yYsKn'){const _0x2d7476=_0x21170d[_0x4826bd(0x1da,0x20c)](_0xf5135b[_0x34812e(0x1fd,0x22a)])?_0x27eb09['loc']['join']('.'):'',_0x5e7f33=_0x18e3ea[_0x4826bd(0x2ad,0x269)]??_0x556fe3['stringify'](_0x4b3c82);return _0x2d7476?_0x2d7476+':\x20'+_0x5e7f33:_0x5e7f33;}else{const _0xc2c5d4=Array[_0x4826bd(0x24f,0x20c)](_0x158a49[_0x34812e(0x237,0x22a)])?_0x158a49[_0x4826bd(0x15e,0x1b9)][_0x4826bd(0x227,0x259)]('.'):'',_0xd705dc=_0x158a49[_0x4826bd(0x250,0x269)]??JSON[_0x4826bd(0x1fd,0x1e6)](_0x158a49);return _0xc2c5d4?_0xc2c5d4+':\x20'+_0xd705dc:_0xd705dc;}})[_0xd9fe9c(0x52,0x8c)]('\x20|\x20');_0x170382+=':\x20'+_0x2e9905;}else{if(_0x303f28[_0x33f6f4(0x3e6,0x3af)])_0x170382+=':\x20'+_0x303f28[_0x33f6f4(0x3cd,0x3af)];else _0x303f28['message']&&(_0x170382+=':\x20'+_0x303f28[_0xd9fe9c(-0x17,0x17)]);}}catch{}function _0xd9fe9c(_0x3475fa,_0x261bd3){return _0x1bfc5d(_0x3475fa,_0x261bd3-0x218);}throw withStatus(new Error(_0x170382),_0x56ea30);}}
|
package/dist/sync/encryption.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4a46b6,_0x5ca43c){function _0x10ba60(_0xe26b14,_0x1b0591){return _0x5c62(_0xe26b14-0x44,_0x1b0591);}function _0x20eb24(_0x25a0dc,_0x38d971){return _0x5c62(_0x25a0dc-0x300,_0x38d971);}const _0x16fe60=_0x4a46b6();while(!![]){try{const _0x229ddd=-parseInt(_0x10ba60(0x222,0x218))/0x1+-parseInt(_0x20eb24(0x4cb,0x4df))/0x2+-parseInt(_0x10ba60(0x1fa,0x1e5))/0x3*(parseInt(_0x10ba60(0x219,0x209))/0x4)+-parseInt(_0x20eb24(0x4b4,0x4c7))/0x5+parseInt(_0x10ba60(0x202,0x20b))/0x6+parseInt(_0x10ba60(0x225,0x210))/0x7*(parseInt(_0x20eb24(0x4c4,0x4d1))/0x8)+parseInt(_0x10ba60(0x211,0x220))/0x9*(parseInt(_0x10ba60(0x212,0x211))/0xa);if(_0x229ddd===_0x5ca43c)break;else _0x16fe60['push'](_0x16fe60['shift']());}catch(_0x338bd8){_0x16fe60['push'](_0x16fe60['shift']());}}}(_0x5d54,0xcc21a));function _0x5d54(){const _0x299c36=['C2HHnteY','wwrHB3i','zNjVBq','zw5JCNLWDgvK','r01kuKu','7jwu7zI47zMu65cCioYEHoUYOoUuQsdRJBa','mJy4mtCXoeHXAxfftq','C3vIyxjYyxK','7j207ysW6RcaioUeIoUSTcdSP6FSIRxRI4G','BgvUz3rO','ruXftuvova','y29Uy2f0','mta3mMfXALLfDa','y2LWAgvYDgv4Da','zgf0yq','7j6e67kG65sPioUZTE2yUo2zLcdSI6tTJkG','DxbKyxrL','ioUnSoYDTo2eScdRS4dSOBaP','CgfYC2u','mtK4odiXmKXHt0LNqW','DgfN','mtK0mte2mdvqCxbzwhq','mJbJAunpvLm','z2v0qxv0AfrHzW','yMfZzty0','yNL0zuXLBMD0Aa','64Ui64UKicJTMitSNQW6ia','DxrMltG','igj5DgvZ7jES7jw8io2vQq','mZj1sevrBLy','Dg9tDhjPBMC','icJSNPJRQRVRKjWG7ykKioUyKoUkLa','zMLUywW','7jwu7zI47zMuio2cPoUkLca','C3rYAw5NAwz5','A09KCei','qw1tqM4','BwvZC2fNzq','mtaWntK1nKPUAfbiAW','C3rYAw5N','C2v0qxv0AfrHzW','mZy3nJrMrNrtEuG','nZK5mZmZnufABejztW','CMT2Ceu','mZG2mdG1tuTysMPn','B2jQzwn0'];_0x5d54=function(){return _0x299c36;};return _0x5d54();}import{randomBytes,createCipheriv,createDecipheriv,pbkdf2Sync}from'node:crypto';function _0x5c62(_0x1bb0a9,_0x18b936){_0x1bb0a9=_0x1bb0a9-0x1b4;const _0x5d5455=_0x5d54();let _0x5c6209=_0x5d5455[_0x1bb0a9];if(_0x5c62['PpeMqB']===undefined){var _0x5587f9=function(_0x37e289){const _0x1983c0='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x283321='',_0x1ff4be='';for(let _0x406a29=0x0,_0x1b3cfd,_0x3f6691,_0x26f4d3=0x0;_0x3f6691=_0x37e289['charAt'](_0x26f4d3++);~_0x3f6691&&(_0x1b3cfd=_0x406a29%0x4?_0x1b3cfd*0x40+_0x3f6691:_0x3f6691,_0x406a29++%0x4)?_0x283321+=String['fromCharCode'](0xff&_0x1b3cfd>>(-0x2*_0x406a29&0x6)):0x0){_0x3f6691=_0x1983c0['indexOf'](_0x3f6691);}for(let _0x3b9fef=0x0,_0x3dc3c3=_0x283321['length'];_0x3b9fef<_0x3dc3c3;_0x3b9fef++){_0x1ff4be+='%'+('00'+_0x283321['charCodeAt'](_0x3b9fef)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1ff4be);};_0x5c62['EMEDkv']=_0x5587f9,_0x5c62['UiAeKc']={},_0x5c62['PpeMqB']=!![];}const _0x19a741=_0x5d5455[0x0],_0x332fdd=_0x1bb0a9+_0x19a741,_0xe185c0=_0x5c62['UiAeKc'][_0x332fdd];return!_0xe185c0?(_0x5c6209=_0x5c62['EMEDkv'](_0x5c6209),_0x5c62['UiAeKc'][_0x332fdd]=_0x5c6209):_0x5c6209=_0xe185c0,_0x5c6209;}const ALGORITHM='aes-256-gc'+'m',KEY_LENGTH=0x20,IV_LENGTH=0xc,TAG_LENGTH=0x10,SALT_LENGTH=0x10,PBKDF2_ITERATIONS=0x186a0,PBKDF2_DIGEST=_0x25e9d1(0x51f,0x513);export function generateEncryptionKey(){return randomBytes(KEY_LENGTH);}export function deriveKey(_0xae3a99,_0x6bca36){const _0x139246=_0x6bca36??randomBytes(SALT_LENGTH),_0x6031ec=pbkdf2Sync(_0xae3a99,_0x139246,PBKDF2_ITERATIONS,KEY_LENGTH,PBKDF2_DIGEST);return{'key':_0x6031ec,'salt':_0x139246};}export function encryptContent(_0x2a479b,_0x22d523){function _0x665b13(_0x466368,_0x4c1c98){return _0x25e9d1(_0x466368,_0x4c1c98- -0x27b);}if(_0x22d523[_0x29fd31(0x1f5,0x207)]!==KEY_LENGTH)throw new Error(_0x665b13(0x2bc,0x2b9)+KEY_LENGTH+(_0x665b13(0x2b6,0x2b4)+_0x29fd31(0x206,0x211))+_0x22d523['length']+')');const _0x3d5a83=randomBytes(IV_LENGTH),_0x395b85=createCipheriv(ALGORITHM,_0x22d523,_0x3d5a83),_0x3c87c8=Buffer[_0x665b13(0x28b,0x29a)](_0x2a479b,'utf-8'),_0x13506a=Buffer[_0x29fd31(0x1f7,0x1ec)]([_0x395b85['update'](_0x3c87c8),_0x395b85['final']()]);function _0x29fd31(_0xdbbb80,_0xed6b6c){return _0x25e9d1(_0xed6b6c,_0xdbbb80- -0x327);}const _0x567497=_0x395b85[_0x29fd31(0x203,0x1f0)]();return{'ciphertext':_0x13506a[_0x29fd31(0x20a,0x21e)](_0x665b13(0x2a1,0x2b0)),'iv':_0x3d5a83[_0x29fd31(0x20a,0x21f)]('base64'),'tag':_0x567497[_0x665b13(0x2a7,0x2b6)]('base64')};}export function decryptContent(_0x1024ad,_0x3d622c){if(_0x3d622c['length']!==KEY_LENGTH)throw new Error(_0x2cf22a(0x33c,0x348)+KEY_LENGTH+('\x20bytes여야\x20합'+_0x454f41(0x35e,0x353))+_0x3d622c[_0x2cf22a(0x324,0x312)]+')');const _0x429ce2=Buffer[_0x2cf22a(0x31d,0x326)](_0x1024ad['iv'],_0x2cf22a(0x333,0x338)),_0x59be23=Buffer['from'](_0x1024ad[_0x454f41(0x330,0x346)],_0x454f41(0x354,0x351)),_0x56a314=Buffer[_0x454f41(0x350,0x33b)](_0x1024ad[_0x2cf22a(0x32f,0x328)],_0x454f41(0x368,0x351)),_0x598f2b=createDecipheriv(ALGORITHM,_0x3d622c,_0x429ce2);function _0x454f41(_0x5bc618,_0x4f0e47){return _0x25e9d1(_0x5bc618,_0x4f0e47- -0x1da);}function _0x2cf22a(_0x557289,_0x2ca3fb){return _0x25e9d1(_0x2ca3fb,_0x557289- -0x1f8);}_0x598f2b[_0x2cf22a(0x343,0x353)](_0x56a314);try{const _0x36b1fd=Buffer['concat']([_0x598f2b[_0x454f41(0x340,0x349)](_0x59be23),_0x598f2b[_0x2cf22a(0x33b,0x331)]()]);return _0x36b1fd[_0x454f41(0x36e,0x357)](_0x2cf22a(0x336,0x339));}catch(_0x16d1c2){if(_0x16d1c2 instanceof Error)throw new Error('복호화\x20실패:\x20'+_0x16d1c2[_0x2cf22a(0x340,0x32d)]+(_0x2cf22a(0x33a,0x327)+_0x2cf22a(0x32c,0x33d)));throw _0x16d1c2;}}export function encryptEmbedding(_0xba9f8c,_0x1332a8){const _0x23f243=new Float64Array(_0xba9f8c),_0x51e3b4=Buffer[_0xaf87e5(0x39f,0x3ad)](_0x23f243['buffer']),_0x4c2d4d=randomBytes(IV_LENGTH),_0xa7bd44=createCipheriv(ALGORITHM,_0x1332a8,_0x4c2d4d);function _0x4eccf5(_0x56bc85,_0x11e7b7){return _0x25e9d1(_0x11e7b7,_0x56bc85- -0x504);}function _0xaf87e5(_0x53aed4,_0x4f1220){return _0x25e9d1(_0x53aed4,_0x4f1220- -0x168);}const _0x6d83ba=Buffer[_0x4eccf5(0x1a,0x1b)]([_0xa7bd44['update'](_0x51e3b4),_0xa7bd44[_0xaf87e5(0x3d6,0x3cb)]()]),_0x3f38fa=_0xa7bd44[_0x4eccf5(0x26,0x31)](),_0x5d04fa=Buffer[_0x4eccf5(0x1a,0x23)]([_0x4c2d4d,_0x3f38fa,_0x6d83ba]);return _0x5d04fa[_0x4eccf5(0x2d,0x40)]('base64');}export function decryptEmbedding(_0x117d0a,_0x1e86f2){const _0x39786a=Buffer['from'](_0x117d0a,'base64');if(_0x39786a['length']<IV_LENGTH+TAG_LENGTH)throw new Error(_0x2d4c43(0x2ab,0x2b6)+_0x210fe6(0x48d,0x4a2)+'다');const _0x45ac4b=_0x39786a[_0x210fe6(0x48c,0x485)](0x0,IV_LENGTH),_0x534bf2=_0x39786a[_0x210fe6(0x48c,0x48c)](IV_LENGTH,IV_LENGTH+TAG_LENGTH);function _0x210fe6(_0x1421ae,_0x4d33d1){return _0x25e9d1(_0x4d33d1,_0x1421ae- -0x8e);}const _0x3ac30d=_0x39786a['subarray'](IV_LENGTH+TAG_LENGTH),_0x4893f3=createDecipheriv(ALGORITHM,_0x1e86f2,_0x45ac4b);_0x4893f3[_0x2d4c43(0x2ce,0x2c3)](_0x534bf2);function _0x2d4c43(_0x49d80f,_0x2e0887){return _0x25e9d1(_0x2e0887,_0x49d80f- -0x26d);}try{if(_0x2d4c43(0x2c9,0x2c8)===_0x2d4c43(0x2ca,0x2cd))return _0x406a29(_0x1b3cfd);else{const _0x36f846=Buffer['concat']([_0x4893f3[_0x2d4c43(0x2b6,0x2b0)](_0x3ac30d),_0x4893f3[_0x2d4c43(0x2c6,0x2c1)]()]),_0x4cc4f8=new Float64Array(_0x36f846['buffer'],_0x36f846['byteOffset'],_0x36f846[_0x210fe6(0x49e,0x49a)]/Float64Array['BYTES_PER_'+_0x210fe6(0x48f,0x491)]);return Array[_0x2d4c43(0x2a8,0x2a1)](_0x4cc4f8);}}catch(_0x1fce7c){if(_0x1fce7c instanceof Error){if(_0x210fe6(0x482,0x47e)!==_0x210fe6(0x486,0x49d))throw new Error(_0x2d4c43(0x2b5,0x2be)+':\x20'+_0x1fce7c[_0x210fe6(0x4aa,0x4a1)]);else return null;}throw _0x1fce7c;}}export function isValidEncryptedPayload(_0x3e64b5){function _0x4e3e38(_0xef2ae9,_0x4027c6){return _0x25e9d1(_0xef2ae9,_0x4027c6- -0x5af);}if(typeof _0x3e64b5!==_0x296d48(0xfa,0x100)||_0x3e64b5===null)return![];const _0x1fec3a=_0x3e64b5;function _0x296d48(_0xad7bf7,_0x3ed0e7){return _0x25e9d1(_0xad7bf7,_0x3ed0e7- -0x412);}return typeof _0x1fec3a['ciphertext']===_0x296d48(0x13b,0x128)&&typeof _0x1fec3a['iv']===_0x296d48(0x12c,0x128)&&typeof _0x1fec3a[_0x296d48(0x116,0x115)]==='string';}export function wrapEncryptedContent(_0x2c4a1b){function _0x4c8d93(_0x211f99,_0x13e619){return _0x25e9d1(_0x211f99,_0x13e619- -0xdf);}function _0x947382(_0x217a9a,_0x380f03){return _0x25e9d1(_0x380f03,_0x217a9a- -0x2d3);}return JSON[_0x4c8d93(0x462,0x456)]({'encrypted':!![],'data':_0x2c4a1b[_0x4c8d93(0x43c,0x441)],'iv':_0x2c4a1b['iv'],'tag':_0x2c4a1b['tag']});}function _0x25e9d1(_0x39b80e,_0x27c354){return _0x5c62(_0x27c354-0x35b,_0x39b80e);}export function unwrapEncryptedContent(_0x421426){function _0x36c7c5(_0x3fa54a,_0x273bb4){return _0x25e9d1(_0x273bb4,_0x3fa54a- -0x503);}function _0xb51c94(_0x1c3bb4,_0xb56dcf){return _0x25e9d1(_0xb56dcf,_0x1c3bb4- -0x3cc);}try{if(_0x36c7c5(0x14,0x2)!==_0xb51c94(0x14b,0x156))return _0x86229a[_0x36c7c5(0x32,0x29)]({'encrypted':!![],'data':_0x486bfd['ciphertext'],'iv':_0x4b4ec3['iv'],'tag':_0x5c5f61[_0x36c7c5(0x24,0x10)]});else{const _0xeda704=JSON[_0x36c7c5(0x22,0x30)](_0x421426);if(_0xeda704[_0xb51c94(0x14a,0x153)]!==!![])return null;if(typeof _0xeda704[_0xb51c94(0x155,0x13e)]!==_0x36c7c5(0x37,0x49)||typeof _0xeda704['iv']!==_0x36c7c5(0x37,0x4d)||typeof _0xeda704[_0xb51c94(0x15b,0x16b)]!==_0x36c7c5(0x37,0x4d))return null;return{'ciphertext':_0xeda704[_0xb51c94(0x155,0x15a)],'iv':_0xeda704['iv'],'tag':_0xeda704[_0xb51c94(0x15b,0x149)]};}}catch{return null;}}
|
package/dist/sync/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x3efd(){var _0x396935=['ndq3nZC1oezAquXACG','mZbhzMrNCwS','nJy3mtaWtNrfDhLz','oteZnZKYquvxEu5w','mZiWntvMvKTiAfu','mtyZodm1ntvhzxf6qum','mtm0otC2ouPxEhHfrq','odrkBe1RBwK','ndm3oty5mezYBxLhDW'];_0x3efd=function(){return _0x396935;};return _0x3efd();}(function(_0x4f2215,_0x2a749b){function _0xd362a7(_0x439581,_0x148116){return _0x3264(_0x148116- -0x1d8,_0x439581);}var _0x4aaf03=_0x4f2215();function _0x31d6e6(_0x1f8346,_0x2386d3){return _0x3264(_0x1f8346-0x36,_0x2386d3);}while(!![]){try{var _0x52bebf=-parseInt(_0x31d6e6(0x227,0x223))/0x1+parseInt(_0x31d6e6(0x222,0x226))/0x2*(-parseInt(_0x31d6e6(0x225,0x220))/0x3)+parseInt(_0xd362a7(0x16,0x15))/0x4+parseInt(_0xd362a7(0x11,0x12))/0x5+parseInt(_0xd362a7(0x14,0x13))/0x6+-parseInt(_0x31d6e6(0x228,0x228))/0x7*(parseInt(_0xd362a7(0x14,0x16))/0x8)+parseInt(_0x31d6e6(0x226,0x223))/0x9;if(_0x52bebf===_0x2a749b)break;else _0x4aaf03['push'](_0x4aaf03['shift']());}catch(_0x32c6f7){_0x4aaf03['push'](_0x4aaf03['shift']());}}}(_0x3efd,0xb1e5d));export{A2AClient}from'./client.js';export{MemorySynchronizer}from'./synchronizer.js';export{SyncQueue,mapCategory,mapTier}from'./queue.js';export{LocalVectorClock}from'./vector-clock.js';export{TeamSynchronizer}from'./team-synchronizer.js';function _0x3264(_0x17b615,_0x35a716){_0x17b615=_0x17b615-0x1ea;var _0x3efdec=_0x3efd();var _0x32642c=_0x3efdec[_0x17b615];if(_0x3264['kWpeQn']===undefined){var _0x1fae04=function(_0x4badb3){var _0x441635='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x429e75='',_0x38760e='';for(var _0x2a71e2=0x0,_0x35250e,_0x4c5897,_0x481ac3=0x0;_0x4c5897=_0x4badb3['charAt'](_0x481ac3++);~_0x4c5897&&(_0x35250e=_0x2a71e2%0x4?_0x35250e*0x40+_0x4c5897:_0x4c5897,_0x2a71e2++%0x4)?_0x429e75+=String['fromCharCode'](0xff&_0x35250e>>(-0x2*_0x2a71e2&0x6)):0x0){_0x4c5897=_0x441635['indexOf'](_0x4c5897);}for(var _0x2d82d9=0x0,_0x1c8b6d=_0x429e75['length'];_0x2d82d9<_0x1c8b6d;_0x2d82d9++){_0x38760e+='%'+('00'+_0x429e75['charCodeAt'](_0x2d82d9)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x38760e);};_0x3264['vTeUhm']=_0x1fae04,_0x3264['XpWjYg']={},_0x3264['kWpeQn']=!![];}var _0x2958f8=_0x3efdec[0x0],_0x50fe28=_0x17b615+_0x2958f8,_0x1dd98b=_0x3264['XpWjYg'][_0x50fe28];return!_0x1dd98b?(_0x32642c=_0x3264['vTeUhm'](_0x32642c),_0x3264['XpWjYg'][_0x50fe28]=_0x32642c):_0x32642c=_0x1dd98b,_0x32642c;}export{SyncScheduler}from'./scheduler.js';export{encryptContent,decryptContent,encryptEmbedding,decryptEmbedding,deriveKey,generateEncryptionKey,wrapEncryptedContent,unwrapEncryptedContent,isValidEncryptedPayload}from'./encryption.js';
|
package/dist/sync/queue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x1336aa(_0x92394a,_0x1ff251){return _0x271e(_0x92394a-0x12d,_0x1ff251);}(function(_0xf0a2c5,_0x55bbcc){function _0xa04f19(_0x2460b1,_0x5b4da0){return _0x271e(_0x5b4da0- -0x3ba,_0x2460b1);}function _0x26a5b7(_0x347ea0,_0x256c47){return _0x271e(_0x256c47-0x27b,_0x347ea0);}const _0x5c5416=_0xf0a2c5();while(!![]){try{const _0x477f17=parseInt(_0xa04f19(-0x2ae,-0x283))/0x1+parseInt(_0x26a5b7(0x3ca,0x398))/0x2*(parseInt(_0xa04f19(-0x2ce,-0x2b9))/0x3)+-parseInt(_0xa04f19(-0x252,-0x26b))/0x4*(-parseInt(_0xa04f19(-0x292,-0x287))/0x5)+parseInt(_0xa04f19(-0x2b2,-0x29f))/0x6+parseInt(_0x26a5b7(0x3cc,0x3b1))/0x7*(-parseInt(_0x26a5b7(0x36a,0x397))/0x8)+-parseInt(_0xa04f19(-0x2e1,-0x2cc))/0x9+parseInt(_0x26a5b7(0x361,0x390))/0xa*(parseInt(_0x26a5b7(0x3d2,0x3bf))/0xb);if(_0x477f17===_0x55bbcc)break;else _0x5c5416['push'](_0x5c5416['shift']());}catch(_0x4762c1){_0x5c5416['push'](_0x5c5416['shift']());}}}(_0x27cd,0xe9954));function _0x53e3b8(_0x296075,_0x4e5c7){return _0x271e(_0x4e5c7-0x42,_0x296075);}import{createHash}from'node:crypto';import{getErrorStatus}from'./client.js';function _0x271e(_0x5b5fdf,_0x5d0bc2){_0x5b5fdf=_0x5b5fdf-0xed;const _0x27cdd9=_0x27cd();let _0x271e4d=_0x27cdd9[_0x5b5fdf];if(_0x271e['NffnDJ']===undefined){var _0x1c9207=function(_0x49cccd){const _0x4c616b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1588b4='',_0x44b27f='';for(let _0x3c46f0=0x0,_0x128e8b,_0x3ff3b5,_0x1ad1ac=0x0;_0x3ff3b5=_0x49cccd['charAt'](_0x1ad1ac++);~_0x3ff3b5&&(_0x128e8b=_0x3c46f0%0x4?_0x128e8b*0x40+_0x3ff3b5:_0x3ff3b5,_0x3c46f0++%0x4)?_0x1588b4+=String['fromCharCode'](0xff&_0x128e8b>>(-0x2*_0x3c46f0&0x6)):0x0){_0x3ff3b5=_0x4c616b['indexOf'](_0x3ff3b5);}for(let _0xb9c6bc=0x0,_0x31c748=_0x1588b4['length'];_0xb9c6bc<_0x31c748;_0xb9c6bc++){_0x44b27f+='%'+('00'+_0x1588b4['charCodeAt'](_0xb9c6bc)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x44b27f);};_0x271e['PLuXgP']=_0x1c9207,_0x271e['cWDsyJ']={},_0x271e['NffnDJ']=!![];}const _0x3296b7=_0x27cdd9[0x0],_0x20c70=_0x5b5fdf+_0x3296b7,_0x184088=_0x271e['cWDsyJ'][_0x20c70];return!_0x184088?(_0x271e4d=_0x271e['PLuXgP'](_0x271e4d),_0x271e['cWDsyJ'][_0x20c70]=_0x271e4d):_0x271e4d=_0x184088,_0x271e4d;}const CATEGORY_MAP={'preference':_0x1336aa(0x250,0x260),'rule':_0x1336aa(0x250,0x238)},TIER_MAP={'procedural':'semantic'};export function mapCategory(_0x532f8d){return CATEGORY_MAP[_0x532f8d]??_0x532f8d;}export function mapTier(_0x599804){return TIER_MAP[_0x599804]??_0x599804;}function _0x27cd(){const _0x1ae08f=['C2vTyw50Awm','BM90igzVDw5K','DgLTzw91De1Z','ChvZAa','DxbKyxrL','CgfYzw50ihjLBq','C3rHBguGCgfYzq','6Rg0ioYEKoUpMsbYzxnLDa','zMfPBgvK','y29UDgvUDa','tM90iezVDw5K','su5ktNi','B3rLx2LKioUVUo2zLEYDUa','ntrPwenSyKe','ChvZAgvK','CMvTB3rLswq','Evn0ywXLuMvTBW','6RcCignOAwXKiokaLca','z2v0vw5ZEw5Jzq','C3vIC3rYAw5N','CgfYzw50swq','Dg9mB3DLCKnHCW','tufyx1nbrKvFsq','CgvUzgLUzW','y3jLyxrLtwvTBW','Aw5JBhvKzxm','zhvYyxrPB24','C3LUy2vK','y2f0zwDVCNK','CxvHBgL0EvnJBW','y3jLyxrLzef0','icJRI6tSNyWGzMX1C2G','ywXS','mtbcBhb4shG','Bwf4','u3rHDhvZ','C2v0u3LUy1n0yq','CMLLC0jHDgnO','DgfNCW','otu5ntK4wuXfwe1l','mtzQDNvSsgG','ntaWmKnJvMn6Aq','zhjdCM0','zMX1C2HuB21ICW','B25Lu3LUy2vK','DxbKyxrLtwvTBW','zgvSzxrLu3LUyW','y29UDMvUDgLVBG','DhjPBq','BgvUz3rO','67cW7lMyioYlPo2mQdOG','z2v0u3LUy1n0yq','BwvZC2fNzq','y29Uy3vYCMvUyW','CM91BMq','7zAjihbLBMrPBMCG','BeTlqKO','C2v0','AgfZ','BwfW','DhvZ','BxnN','qMzQvLG','mty3mgP3zKDcuG','z2v0','ChvZAejHDgnOzq','nJu0mZm5mhzuwwHcAq','mtuWnZK4mu9yDwX4uG','Agv4','CMvZzxrtEw5JqG','y2H1BMTuB3rHBa','zxjYB3jZ','y2H1BMTjBMrLEa','zMLSDgvY','7kce7zMylcdRI6tSNyWGzMX1','7ikT7kcCioYlPo2mQcaO','zgvSzxrLtwvTBW','tMLbDwO','z2v0ugvUzgLUzW','Dgvjza','mty3mJu4odvTEgnwrge','C2XPy2u','C2HHmJu2','zgLNzxn0','ktOG','AwrZ','zw5XDwv1zq','C2JSL5dSHjWG7j6SChvZAa','7yoa7j6e7jwe7jUdoIa','BM93','Dg9Uzxm','nZC2oe9iEhHrua','y2XPzw50','BwvTB3j5swq','BwfYA1rVBwjZDa','otuWmJe5mw1jvvrsvG','uvHfBMq','CMf0zuXPBwL0zq','BgLTAxq','zuzvA0G','D3bUzw8'];_0x27cd=function(){return _0x1ae08f;};return _0x27cd();}function computeContentHash(_0x7d6037){function _0x2d04d4(_0x221c34,_0x1e1706){return _0x1336aa(_0x221c34- -0x3a4,_0x1e1706);}function _0xbf194(_0x2e300e,_0x3da575){return _0x1336aa(_0x3da575-0x9c,_0x2e300e);}return createHash(_0xbf194(0x315,0x30f))[_0xbf194(0x2a9,0x2c1)](_0x7d6037[_0xbf194(0x310,0x2ed)]()[_0x2d04d4(-0x16e,-0x190)+'e']())[_0xbf194(0x31b,0x310)](_0x2d04d4(-0x13f,-0x166))[_0xbf194(0x2b6,0x2d0)](0x0,0x10);}export class SyncQueue{['db'];[_0x1336aa(0x27d,0x274)];constructor(_0x4eaeb2,_0x12e340){function _0x3986b9(_0x19fdc7,_0x2b2313){return _0x1336aa(_0x2b2313-0x104,_0x19fdc7);}this['db']=_0x4eaeb2,this[_0x3986b9(0x366,0x381)]=_0x12e340;}[_0x1336aa(0x277,0x25f)](_0x101cbe){function _0x4bc2fd(_0x101578,_0x56059b){return _0x53e3b8(_0x56059b,_0x101578-0x2bf);}function _0x4ad8f0(_0x595d81,_0xab0caa){return _0x53e3b8(_0xab0caa,_0x595d81-0x343);}this['db'][_0x4ad8f0(0x49d,0x495)+'tus'](_0x101cbe,null,_0x4bc2fd(0x40c,0x409));}async['flush'](_0x4ffb55){const _0x4b8d92=Date[_0x11ecaf(0x2c4,0x2a5)](),_0x5e3c83=_0x4ffb55?.[_0x11ecaf(0x27b,0x24e)]??0x493e0,_0x393a66={'pushed':0x0,'failed':0x0,'errors':[],'duration':0x0,'syncedItems':[]},_0x3d801a=0x64,_0x149d7c=this['db']['getPending'+'SyncMemori'+'es']();if(_0x149d7c['length']===0x0)return _0x393a66[_0x44148b(0x12e,0x107)]=Date[_0x44148b(0x16d,0x189)]()-_0x4b8d92,_0x393a66;const _0x568dfa=new Map(),_0xe42160=_0x149d7c[_0x44148b(0x15d,0x12c)](_0x8fea84=>{const _0x3393a5=computeContentHash(_0x8fea84[_0x12e326(-0xbd,-0xb0)]);function _0x1f8876(_0x4b2883,_0x2b6ba2){return _0x44148b(_0x2b6ba2- -0x270,_0x4b2883);}if(_0x568dfa[_0x12e326(-0x84,-0x7f)](_0x3393a5))return this['db'][_0x1f8876(-0x142,-0x138)+_0x1f8876(-0x140,-0x120)](_0x8fea84['id'],null,_0x12e326(-0x8b,-0x9e)),![];_0x568dfa[_0x12e326(-0x7f,-0x80)](_0x3393a5,_0x8fea84['id']);function _0x12e326(_0x26900e,_0x461fdc){return _0x44148b(_0x461fdc- -0x1cd,_0x26900e);}return!![];}),_0x15b967=_0xe42160[_0x11ecaf(0x26b,0x295)](_0x3063e0=>!_0x3063e0[_0x44148b(0x128,0x129)]),_0x472b10=_0xe42160[_0x11ecaf(0x281,0x295)](_0x484e29=>!!_0x484e29[_0x44148b(0x128,0x135)]),_0x5c0ac0=new Map();for(const _0x4e5bae of _0x472b10){if('gwGUF'===_0x11ecaf(0x284,0x276)){const _0x4d498b=_0x3c5fa2[_0x44148b(0x131,0x164)+'re']!==_0x2ecf0a?_0x57cf7e[_0x11ecaf(0x26a,0x282)](_0x107112[_0x44148b(0x131,0x148)+'re']*0x3e8)/0x3e8:_0x1158e9;return _0x2f582[_0x44148b(0x14d,0x12a)](_0x43bd9c['id'],_0x4d498b),{'content':_0x57afc3[_0x44148b(0x11d,0xf9)],'category':_0x3fdc12(_0x177bf3[_0x44148b(0x130,0x11b)]),'tier':_0x11ecaf(0x26e,0x24c),'tags':_0x392901[_0x11ecaf(0x295,0x272)],'created_at':_0xc4a4a4[_0x11ecaf(0x257,0x26a)],'parent_id':_0x45d2e9['parentId']?_0x433392[_0x11ecaf(0x264,0x28c)](_0x5baa16[_0x11ecaf(0x23e,0x260)]):_0x51b5ca,'chunk_index':_0x4b90e1[_0x11ecaf(0x281,0x294)]??_0x4a104a,'chunk_total':_0x5a29d9[_0x11ecaf(0x2c2,0x292)]??_0x3e7da6,'quality_score':_0x4d498b};}else{if(_0x4e5bae[_0x44148b(0x128,0x157)]&&!_0x5c0ac0[_0x11ecaf(0x268,0x286)](_0x4e5bae[_0x11ecaf(0x27f,0x260)])){const _0x119154=this['db'][_0x11ecaf(0x27b,0x27f)+_0x11ecaf(0x29a,0x288)](_0x4e5bae[_0x11ecaf(0x284,0x260)]);_0x119154?.[_0x44148b(0x123,0x133)]&&_0x5c0ac0['set'](_0x4e5bae[_0x11ecaf(0x245,0x260)],_0x119154['remoteId']);}}}await this['pushBatche'+'s'](_0x15b967,_0x3d801a,_0x4b8d92,_0x5e3c83,_0x393a66,_0x5c0ac0);if(_0x472b10['length']>0x0&&(_0x5e3c83===0x0||Date[_0x44148b(0x16d,0x166)]()-_0x4b8d92<_0x5e3c83)){const _0x5f2822=_0x472b10[_0x44148b(0x15d,0x12c)](_0x36185a=>_0x5c0ac0[_0x11ecaf(0x27b,0x286)](_0x36185a[_0x11ecaf(0x271,0x260)])),_0x39658c=_0x472b10['filter'](_0x34c28b=>!_0x5c0ac0[_0x11ecaf(0x2ac,0x286)](_0x34c28b[_0x11ecaf(0x293,0x260)]));_0x39658c['length']>0x0&&('FioDb'===_0x11ecaf(0x2a3,0x28a)?(_0x36fd5e[_0x11ecaf(0x283,0x293)][_0x11ecaf(0x23c,0x24f)](_0x11ecaf(0x26f,0x27e)+(_0x124085 instanceof _0x356e51?_0x2b9891[_0x11ecaf(0x27c,0x280)]:_0xa7c41c(_0x5782a9))),_0x14c5fb['failed']+=_0x4fbd50['length']):_0x393a66['errors']['push'](_0x39658c['length']+(_0x44148b(0x125,0x155)+_0x11ecaf(0x243,0x251)+_0x44148b(0x120,0x120)+_0x44148b(0x133,0x11a)+'에서\x20재시도)'))),await this[_0x11ecaf(0x2a4,0x28d)+'s'](_0x5f2822,_0x3d801a,_0x4b8d92,_0x5e3c83,_0x393a66,_0x5c0ac0);}_0x393a66['duration']=Date[_0x44148b(0x16d,0x143)]()-_0x4b8d92;function _0x44148b(_0x1f5f22,_0x306dcf){return _0x1336aa(_0x1f5f22- -0x10d,_0x306dcf);}function _0x11ecaf(_0x45cf3b,_0x3589e5){return _0x1336aa(_0x3589e5-0x2b,_0x45cf3b);}return _0x393a66;}async[_0x53e3b8(0x168,0x177)+'s'](_0x5ad97c,_0x1d0657,_0x17cf93,_0x7a44fe,_0x4cfbf5,_0x35e6eb){function _0x1d087f(_0xd9aaf8,_0x321c64){return _0x1336aa(_0x321c64-0x24,_0xd9aaf8);}function _0x34bf64(_0xad9c21,_0x49d9eb){return _0x1336aa(_0x49d9eb- -0x416,_0xad9c21);}for(let _0x1a93b0=0x0;_0x1a93b0<_0x5ad97c[_0x34bf64(-0x1d4,-0x1c4)];_0x1a93b0+=_0x1d0657){if(_0x7a44fe>0x0&&Date[_0x34bf64(-0x1b8,-0x19c)]()-_0x17cf93>_0x7a44fe){const _0x3752df=_0x5ad97c[_0x1d087f(0x253,0x276)]-_0x1a93b0;_0x4cfbf5['errors'][_0x1d087f(0x26b,0x248)](_0x1d087f(0x2c3,0x29d)+_0x3752df+'개\x20미처리'),_0x4cfbf5[_0x34bf64(-0x1bc,-0x1ed)]+=_0x3752df;break;}const _0x2ec46f=_0x5ad97c[_0x34bf64(-0x17c,-0x1a4)](_0x1a93b0,_0x1a93b0+_0x1d0657);try{const _0x361a19=new Map(),_0x1a13db=await this[_0x1d087f(0x2b7,0x2a1)][_0x34bf64(-0x1d4,-0x1dd)+_0x1d087f(0x248,0x26a)](_0x2ec46f['map'](_0x382a10=>{function _0x17b6dd(_0x2fccd9,_0x5ede7e){return _0x34bf64(_0x2fccd9,_0x5ede7e-0x313);}const _0x2dd301=_0x382a10[_0x365eba(0x2ef,0x312)+'re']!==undefined?Math['round'](_0x382a10[_0x365eba(0x2ef,0x2f4)+'re']*0x3e8)/0x3e8:undefined;function _0x365eba(_0xa3be1a,_0x4ce785){return _0x34bf64(_0x4ce785,_0xa3be1a-0x4c7);}return _0x361a19['set'](_0x382a10['id'],_0x2dd301),{'content':_0x382a10[_0x365eba(0x2db,0x2f7)],'category':mapCategory(_0x382a10[_0x17b6dd(0x152,0x13a)]),'tier':_0x365eba(0x2d2,0x2f7),'tags':_0x382a10[_0x365eba(0x2f8,0x2f5)],'created_at':_0x382a10['createdAt'],'parent_id':_0x382a10[_0x17b6dd(0x155,0x132)]?_0x35e6eb[_0x365eba(0x312,0x339)](_0x382a10[_0x365eba(0x2e6,0x316)]):undefined,'chunk_index':_0x382a10[_0x17b6dd(0x159,0x166)]??undefined,'chunk_total':_0x382a10['chunkTotal']??undefined,'quality_score':_0x2dd301};}));for(let _0x584339=0x0;_0x584339<_0x1a13db[_0x34bf64(-0x17e,-0x1a0)][_0x34bf64(-0x1b0,-0x1c4)];_0x584339++){if(_0x584339<_0x2ec46f[_0x1d087f(0x246,0x276)]&&_0x1a13db[_0x34bf64(-0x1bd,-0x1a0)][_0x584339]){const _0x49652c=_0x2ec46f[_0x584339]['id'],_0x16cf8a=_0x361a19[_0x34bf64(-0x1b5,-0x1b5)](_0x49652c);if(_0x16cf8a!==undefined&&_0x2ec46f[_0x584339][_0x34bf64(-0x1db,-0x1d8)+'re']===undefined)try{this['db'][_0x1d087f(0x249,0x272)+'ry'](_0x49652c,{'qualityScore':_0x16cf8a});}catch{}this['db'][_0x1d087f(0x29c,0x269)+_0x34bf64(-0x1a4,-0x1b9)](_0x49652c,_0x1a13db[_0x1d087f(0x2cc,0x29a)][_0x584339],_0x34bf64(-0x1aa,-0x1da)),_0x35e6eb[_0x1d087f(0x2aa,0x27e)](_0x49652c,_0x1a13db[_0x1d087f(0x289,0x29a)][_0x584339]),_0x4cfbf5['syncedItem'+'s']['push']({'localId':_0x49652c,'remoteId':_0x1a13db['ids'][_0x584339]});}}_0x4cfbf5[_0x1d087f(0x253,0x253)]+=_0x1a13db['created'],_0x4cfbf5[_0x1d087f(0x237,0x24d)]+=_0x1a13db[_0x34bf64(-0x1e8,-0x1ed)];if(_0x1a13db[_0x34bf64(-0x1b4,-0x1ae)]['length']>0x0){const _0x1df136=new Set(),_0x5f5589=/Parent memory not found:\s*parent_id\s*'([^']+)'/;for(const _0x1a40b1 of _0x1a13db[_0x1d087f(0x2b6,0x28c)]){const _0x25c31e=_0x1a40b1['match'](_0x5f5589);if(_0x25c31e)_0x1df136['add'](_0x25c31e[0x1]);}if(_0x1df136['size']>0x0){if(_0x34bf64(-0x1b2,-0x1bd)===_0x1d087f(0x229,0x250))return _0x24b5dd[_0x260c6b]??_0x3602f6;else{let _0x549e08=0x0;for(const _0x2e6d32 of _0x1df136){_0x549e08+=this['db'][_0x34bf64(-0x1a0,-0x1b0)+_0x1d087f(0x239,0x255)+_0x1d087f(0x2c0,0x294)](_0x2e6d32);}if(_0x549e08>0x0){if(_0x34bf64(-0x1da,-0x1fa)===_0x1d087f(0x2a3,0x292)){if(_0x3d555f[_0x34bf64(-0x1f5,-0x1e1)]&&!_0x40ea71['has'](_0x2aa74e[_0x34bf64(-0x20d,-0x1e1)])){const _0x4febba=this['db'][_0x1d087f(0x269,0x278)+'tus'](_0x58e40a['parentId']);_0x4febba?.[_0x1d087f(0x22e,0x254)]&&_0x26a68e[_0x1d087f(0x267,0x27e)](_0x17c243[_0x1d087f(0x254,0x259)],_0x4febba[_0x1d087f(0x242,0x254)]);}}else _0x4cfbf5[_0x1d087f(0x2b5,0x28c)][_0x1d087f(0x253,0x248)](_0x34bf64(-0x1e4,-0x1ef)+'nt\x20'+_0x1df136['size']+(_0x1d087f(0x274,0x24c)+'\x20(')+_0x549e08+(_0x1d087f(0x24c,0x27c)+_0x34bf64(-0x1b4,-0x1ab)+_0x34bf64(-0x18d,-0x19e)+')'));}}}_0x4cfbf5[_0x34bf64(-0x19b,-0x1ae)][_0x1d087f(0x278,0x248)](..._0x1a13db[_0x34bf64(-0x19c,-0x1ae)]);}}catch(_0x5b9241){_0x4cfbf5[_0x1d087f(0x267,0x28c)][_0x1d087f(0x237,0x248)](_0x1d087f(0x290,0x277)+(_0x5b9241 instanceof Error?_0x5b9241[_0x34bf64(-0x1ea,-0x1c1)]:String(_0x5b9241))),_0x4cfbf5['failed']+=_0x2ec46f[_0x34bf64(-0x1ae,-0x1c4)];}}}async[_0x53e3b8(0x190,0x161)+_0x53e3b8(0x19a,0x190)](_0x3da5bb){const _0x5c0f95=Date[_0x4c2fee(0x3e4,0x3b2)](),_0x2faa96=_0x3da5bb?.[_0x50cd8b(0x3d6,0x3c2)]??0x0;function _0x4c2fee(_0x29040c,_0x1fca97){return _0x53e3b8(_0x1fca97,_0x29040c-0x255);}const _0x4ac8d3=_0x3da5bb?.[_0x50cd8b(0x3c6,0x3bd)]??Number[_0x4c2fee(0x3a1,0x3b8)+'NTEGER'],_0x4e5450=Math['max'](0x1,_0x3da5bb?.[_0x50cd8b(0x418,0x3f5)+'y']??0x1),_0x4402f1=this['db'][_0x50cd8b(0x3f9,0x3d2)+'dTombstone'+'s']();let _0x2b19b0=0x0;const _0x2da470=[],_0x1fe20e=[];for(const _0x45f56 of _0x4402f1){const _0x1cb7b4=this['db'][_0x4c2fee(0x3be,0x3c7)+_0x4c2fee(0x3c7,0x3b6)](_0x45f56[_0x50cd8b(0x432,0x41d)]);if(!_0x1cb7b4?.[_0x4c2fee(0x39a,0x3b3)]){this['db'][_0x4c2fee(0x384,0x395)+_0x50cd8b(0x3c2,0x3ec)](_0x45f56[_0x4c2fee(0x3e8,0x418)]),this['db'][_0x4c2fee(0x3b9,0x3a2)+_0x4c2fee(0x3ae,0x3e0)](_0x45f56['memoryId']);continue;}_0x1fe20e[_0x4c2fee(0x38e,0x37d)]({'memoryId':_0x45f56[_0x50cd8b(0x3fd,0x41d)],'remoteId':_0x1cb7b4['remoteId']});}const _0x4449da=_0x1fe20e['slice'](0x0,_0x4ac8d3),_0x4a88f2=()=>_0x2faa96>0x0&&Date[_0x4c2fee(0x3e4,0x3fb)]()-_0x5c0f95>=_0x2faa96;let _0x39bd90=![];function _0x50cd8b(_0x549cff,_0x3e4937){return _0x53e3b8(_0x549cff,_0x3e4937-0x28a);}for(let _0x1de78e=0x0;_0x1de78e<_0x4449da['length'];_0x1de78e+=_0x4e5450){if(_0x4a88f2()){_0x39bd90=!![];break;}const _0x4f71a3=_0x4449da[_0x4c2fee(0x3dc,0x3f5)](_0x1de78e,_0x1de78e+_0x4e5450),_0x27ec38=await Promise[_0x50cd8b(0x3d1,0x3e0)](_0x4f71a3[_0x4c2fee(0x3c6,0x3cd)](async _0x38a52d=>{function _0xffb107(_0x26f9e1,_0x9eec54){return _0x50cd8b(_0x26f9e1,_0x9eec54- -0x213);}function _0x220b3f(_0x17c379,_0x497bf3){return _0x50cd8b(_0x497bf3,_0x17c379- -0x110);}if('KNoMa'!=='ftGrG')try{return await this[_0x220b3f(0x30c,0x307)][_0x220b3f(0x2fc,0x2ce)+'ry'](_0x38a52d['remoteId']),{'memoryId':_0x38a52d[_0x220b3f(0x30d,0x33d)],'ok':!![],'rateLimited':![],'msg':''};}catch(_0x4966f1){if('EGOIb'===_0xffb107(0x19d,0x1ab)){if(_0x1c27e5['ok'])this['db'][_0x220b3f(0x2a9,0x2a3)+'oneSynced'](_0x479a5b[_0x220b3f(0x30d,0x2ed)]),this['db'][_0x220b3f(0x2de,0x2d4)+_0x220b3f(0x2d3,0x2f9)](_0x41ece1[_0x220b3f(0x30d,0x2f2)]),_0x10f0f6++;else{_0x12b6e1['push'](_0xffb107(0x1e0,0x1f8)+_0x452c2d[_0x220b3f(0x30d,0x337)]+_0x220b3f(0x304,0x333)+_0x2d0d1a[_0xffb107(0x1e5,0x1ea)]);if(_0x4b2be7[_0xffb107(0x19b,0x1a9)+'d'])_0x47d819=!![];}}else{const _0x537571=_0x4966f1 instanceof Error?_0x4966f1[_0x220b3f(0x2e4,0x304)]:String(_0x4966f1),_0x34a390=getErrorStatus(_0x4966f1);if(_0x34a390===0x194||_0x537571[_0x220b3f(0x2c9,0x2ce)](_0x220b3f(0x2b1,0x2c1))||_0x537571[_0xffb107(0x1f3,0x1c6)](_0xffb107(0x1ce,0x1b7)))return{'memoryId':_0x38a52d['memoryId'],'ok':!![],'rateLimited':![],'msg':''};return{'memoryId':_0x38a52d[_0xffb107(0x222,0x20a)],'ok':![],'rateLimited':_0x34a390===0x1ad,'msg':_0x537571};}}else this['db'][_0x220b3f(0x2dd,0x30b)+'ry'](_0x133099,{'qualityScore':_0x26294c});}));for(const _0x1e6f17 of _0x27ec38){if(_0x1e6f17['ok'])this['db'][_0x50cd8b(0x3bf,0x3b9)+_0x4c2fee(0x3b7,0x3e1)](_0x1e6f17['memoryId']),this['db'][_0x4c2fee(0x3b9,0x3bc)+_0x50cd8b(0x3b8,0x3e3)](_0x1e6f17[_0x4c2fee(0x3e8,0x413)]),_0x2b19b0++;else{if(_0x50cd8b(0x3bf,0x3bf)==='wpneo'){_0x2da470[_0x4c2fee(0x38e,0x37c)](_0x4c2fee(0x3d6,0x3da)+_0x1e6f17[_0x4c2fee(0x3e8,0x3d7)]+_0x4c2fee(0x3df,0x3e1)+_0x1e6f17[_0x4c2fee(0x3c8,0x3d7)]);if(_0x1e6f17[_0x4c2fee(0x387,0x37d)+'d'])_0x39bd90=!![];}else return{'memoryId':_0x4b752b['memoryId'],'ok':!![],'rateLimited':![],'msg':''};}}if(_0x39bd90)break;}return{'deleted':_0x2b19b0,'errors':_0x2da470,'remaining':Math[_0x50cd8b(0x408,0x3e2)](0x0,_0x1fe20e[_0x50cd8b(0x3e0,0x3f1)]-_0x2b19b0),'stopped':_0x39bd90};}[_0x1336aa(0x26f,0x25f)+'Count'](){function _0x1bb6d4(_0x50837c,_0x506129){return _0x53e3b8(_0x50837c,_0x506129- -0x13b);}return this['db'][_0x1bb6d4(0x6c,0x49)+'SyncMemori'+'es']()['length'];}}
|
|
1
|
+
(function(_0x5000c0,_0x54bcff){const _0x21d324=_0x5000c0();function _0xc33615(_0x5df553,_0x1e9747){return _0x2d06(_0x1e9747-0x1ef,_0x5df553);}function _0x3c2095(_0x5dd56e,_0x35cdf3){return _0x2d06(_0x5dd56e- -0x32f,_0x35cdf3);}while(!![]){try{const _0x103fdc=parseInt(_0xc33615(0x458,0x437))/0x1*(parseInt(_0xc33615(0x452,0x42f))/0x2)+parseInt(_0xc33615(0x41f,0x3f3))/0x3*(parseInt(_0xc33615(0x469,0x43c))/0x4)+-parseInt(_0xc33615(0x3f9,0x3de))/0x5*(parseInt(_0x3c2095(-0x138,-0x14f))/0x6)+parseInt(_0xc33615(0x3fb,0x404))/0x7+parseInt(_0x3c2095(-0xf3,-0xe3))/0x8*(parseInt(_0x3c2095(-0x133,-0x11c))/0x9)+parseInt(_0x3c2095(-0x114,-0x119))/0xa*(parseInt(_0x3c2095(-0x12c,-0x137))/0xb)+-parseInt(_0xc33615(0x3e2,0x3f7))/0xc;if(_0x103fdc===_0x54bcff)break;else _0x21d324['push'](_0x21d324['shift']());}catch(_0xa8f510){_0x21d324['push'](_0x21d324['shift']());}}}(_0x4756,0x6ed4e));import{createHash}from'node:crypto';function _0x4756(){const _0x24bfe0=['C2v0u3LUy1n0yq','Bwf0y2G','mtyZmte4mtzJAw9ltfO','BwvTB3j5swq','zMLSDgvY','zxjYB3jZ','Agv4','zgvSzxrLu3LUyW','z2v0ugvUzgLUzW','y2XPzw50','C2vTyw50Awm','q291BNq','Aw5JBhvKzxm','y29UDgvUDa','CMLLC0jHDgnO','mZK5mtK3ngvqzM9jAq','CgfYzw50swq','zMX1C2G','C2HHmJu2','rMLqwKm','BgvUz3rO','mZb3yuveAxO','B25Lu3LUy2vK','ChvZAa','AgfZ','DhjPBq','icJRI6tSNyWGzMX1C2G','u3LUy01LBw9YAq','y2H1BMTjBMrLEa','BM90igzVDw5K','zw5XDwv1zq','y3jLyxrLtwvTBW','Evn0ywXLuMvTBW','ktOG','ywrK','C2XPy2u','tLrfr0vs','BM93','tfnhzva','CMvZzxrtEw5JqG','C1vequm','BfvKre8','C3LUy2vK','CMf0zuXPBwL0zq','67cW7lMyioYlPo2mQdOG','y29UDMvUDgLVBG','BwfYA1rVBwjZDa','BwHRAwy','CM91BMq','AwrZ','Dg9Uzxm','DxbKyxrLtwvTBW','zfrVBwjZDg9Uzq','7ikT7kcCioYlPo2mQcaO','mtuYvu5nD3ji','zMX1C2HuB21ICW','6Rg0ioYEKoUpMsbYzxnLDa','z2v0','ntiXmKTVv1jXwa','C2JSL5dSHjWG7j6SChvZAa','y29Uy3vYCMvUyW','y2H1BMTuB3rHBa','tejoq0q','CMvTB3rLswq','tufyx1nbrKvFsq','BxnN','mtLNu0TgCe4','C3rHBguGCgfYzq','C3vIC3rYAw5N','t0fAsKe','7yoa7j6e7jwe7jUdoIa','mtuYz3LPz3Df','B3rLx2LKioUVUo2zLEYDUa','y3jLyxrLza','qwXhy3e','CxvHBgL0EvnJBW','mZu2nJK1r0nOrvfj','t1bhr3O','zgvSzxrLtwvTBW','BwvZC2fNzq','CgvUzgLUzW','CgfYzw50ihjLBq','zhvYyxrPB24','ChvZAejHDgnOzq','mtjuDfjKu0m','C2v0','EgLbzKe','B2Hyt2q','zMfPBgvK','mZKXody5EM9VEuvV','DgfNCW','C2L6zq','BwfW','z2v0u3LUy1n0yq','7zAjihbLBMrPBMCG','Dgvjza','mty4odm5C3bdsfHv','mZy1ndbozvzIBMq','DhvZ'];_0x4756=function(){return _0x24bfe0;};return _0x4756();}import{getErrorStatus}from'./client.js';const CATEGORY_MAP={'preference':_0x95b2f1(0x39,0x5a),'rule':'convention'};function _0x470fcb(_0x3b1f10,_0x1828e7){return _0x2d06(_0x3b1f10- -0xc3,_0x1828e7);}const TIER_MAP={'procedural':_0x470fcb(0x14d,0x159)};function _0x95b2f1(_0x2ee2b9,_0x215662){return _0x2d06(_0x2ee2b9- -0x1fa,_0x215662);}function _0x2d06(_0x47b006,_0x3c0f03){_0x47b006=_0x47b006-0x1eb;const _0x475620=_0x4756();let _0x2d06cc=_0x475620[_0x47b006];if(_0x2d06['abCAmq']===undefined){var _0x119b56=function(_0x5b33d4){const _0xfec0c8='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x464214='',_0x169835='';for(let _0x169697=0x0,_0x2cb8d8,_0x11d703,_0x6bd8b2=0x0;_0x11d703=_0x5b33d4['charAt'](_0x6bd8b2++);~_0x11d703&&(_0x2cb8d8=_0x169697%0x4?_0x2cb8d8*0x40+_0x11d703:_0x11d703,_0x169697++%0x4)?_0x464214+=String['fromCharCode'](0xff&_0x2cb8d8>>(-0x2*_0x169697&0x6)):0x0){_0x11d703=_0xfec0c8['indexOf'](_0x11d703);}for(let _0x627ed5=0x0,_0x34d595=_0x464214['length'];_0x627ed5<_0x34d595;_0x627ed5++){_0x169835+='%'+('00'+_0x464214['charCodeAt'](_0x627ed5)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x169835);};_0x2d06['EZbKZL']=_0x119b56,_0x2d06['bUoxMN']={},_0x2d06['abCAmq']=!![];}const _0x183a42=_0x475620[0x0],_0x5c6ad9=_0x47b006+_0x183a42,_0x230ef9=_0x2d06['bUoxMN'][_0x5c6ad9];return!_0x230ef9?(_0x2d06cc=_0x2d06['EZbKZL'](_0x2d06cc),_0x2d06['bUoxMN'][_0x5c6ad9]=_0x2d06cc):_0x2d06cc=_0x230ef9,_0x2d06cc;}export function mapCategory(_0x2c2bca){return CATEGORY_MAP[_0x2c2bca]??_0x2c2bca;}export function mapTier(_0x10c4d7){return TIER_MAP[_0x10c4d7]??_0x10c4d7;}function computeContentHash(_0x5c0a8a){function _0x547f09(_0x8453a4,_0x2624da){return _0x470fcb(_0x2624da-0x17f,_0x8453a4);}function _0x35320b(_0x2fcf8d,_0xc08176){return _0x470fcb(_0x2fcf8d- -0x119,_0xc08176);}return createHash(_0x547f09(0x2d3,0x2d4))['update'](_0x5c0a8a[_0x35320b(0x43,0x31)]()['toLowerCas'+'e']())['digest'](_0x547f09(0x2db,0x2c8))[_0x35320b(0x6e,0x59)](0x0,0x10);}export class SyncQueue{['db'];[_0x95b2f1(0x15,-0x14)];constructor(_0x2addc6,_0x39cc31){this['db']=_0x2addc6,this['client']=_0x39cc31;}[_0x470fcb(0x161,0x190)](_0xe669f2){function _0x3cfee7(_0xbe4385,_0x17cf99){return _0x470fcb(_0xbe4385-0x18b,_0x17cf99);}function _0x4ef894(_0x10d638,_0x203b78){return _0x470fcb(_0x203b78- -0x197,_0x10d638);}this['db'][_0x4ef894(-0x71,-0x54)+_0x4ef894(-0x80,-0x55)](_0xe669f2,null,_0x3cfee7(0x2bb,0x2e4));}async[_0x95b2f1(0x1d,0x31)](_0x4c4908){const _0x1843b8=Date[_0x35cfa9(0x5df,0x5fc)](),_0x23ae95=_0x4c4908?.['timeoutMs']??0x493e0;function _0x35cfa9(_0x533f8b,_0x337034){return _0x95b2f1(_0x337034-0x5cb,_0x533f8b);}const _0x48f3b1={'pushed':0x0,'failed':0x0,'errors':[],'duration':0x0,'syncedItems':[]},_0x501aa6=0x64,_0x4cdf5f=this['db'][_0x21ee6e(0x62,0x87)+_0x21ee6e(0x7b,0x9a)+'es']();if(_0x4cdf5f[_0x35cfa9(0x5d8,0x5eb)]===0x0)return _0x48f3b1[_0x21ee6e(0x8e,0x6e)]=Date['now']()-_0x1843b8,_0x48f3b1;function _0x21ee6e(_0x8df08c,_0x4a0914){return _0x95b2f1(_0x4a0914-0x73,_0x8df08c);}const _0x1cabca=new Map(),_0x4915a6=_0x4cdf5f['filter'](_0x44be72=>{function _0x1a548a(_0x21e740,_0x4b7a9f){return _0x35cfa9(_0x4b7a9f,_0x21e740- -0x57f);}function _0x731304(_0x57f0c4,_0x2391f4){return _0x35cfa9(_0x57f0c4,_0x2391f4- -0x186);}if(_0x731304(0x455,0x464)===_0x1a548a(0x4b,0x3d))_0x5f34bb+=this['db'][_0x731304(0x491,0x478)+_0x731304(0x451,0x471)+_0x731304(0x42b,0x44d)](_0x542ca1);else{const _0x13c49f=computeContentHash(_0x44be72[_0x731304(0x47d,0x45e)]);if(_0x1cabca[_0x731304(0x490,0x469)](_0x13c49f))return this['db']['setSyncSta'+_0x731304(0x42f,0x450)](_0x44be72['id'],null,_0x1a548a(0x82,0x8c)),![];return _0x1cabca[_0x731304(0x433,0x443)](_0x13c49f,_0x44be72['id']),!![];}}),_0x44da00=_0x4915a6[_0x35cfa9(0x604,0x5db)](_0x2869e5=>!_0x2869e5[_0x21ee6e(0x7d,0x8f)]),_0xb12d32=_0x4915a6[_0x35cfa9(0x5f7,0x5db)](_0x17c06e=>!!_0x17c06e[_0x21ee6e(0x67,0x8f)]),_0x2c8ba0=new Map();for(const _0x27bce7 of _0xb12d32){if(_0x27bce7['parentId']&&!_0x2c8ba0['has'](_0x27bce7[_0x35cfa9(0x600,0x5e7)])){const _0x5364fd=this['db'][_0x21ee6e(0x8c,0x79)+_0x21ee6e(0x9b,0x7e)](_0x27bce7[_0x21ee6e(0x89,0x8f)]);_0x5364fd?.[_0x21ee6e(0xed,0xbe)]&&_0x2c8ba0[_0x35cfa9(0x5a3,0x5c9)](_0x27bce7[_0x35cfa9(0x5cc,0x5e7)],_0x5364fd[_0x35cfa9(0x5fd,0x616)]);}}await this[_0x35cfa9(0x5b3,0x5c7)+'s'](_0x44da00,_0x501aa6,_0x1843b8,_0x23ae95,_0x48f3b1,_0x2c8ba0);if(_0xb12d32[_0x35cfa9(0x5d3,0x5eb)]>0x0&&(_0x23ae95===0x0||Date[_0x21ee6e(0x7c,0xa4)]()-_0x1843b8<_0x23ae95)){const _0x50072e=_0xb12d32['filter'](_0x3c585e=>_0x2c8ba0[_0x21ee6e(0x70,0x97)](_0x3c585e[_0x21ee6e(0x92,0x8f)])),_0xe7c664=_0xb12d32[_0x35cfa9(0x5b5,0x5db)](_0x2fbf8d=>!_0x2c8ba0[_0x21ee6e(0xa0,0x97)](_0x2fbf8d[_0x21ee6e(0x94,0x8f)]));_0xe7c664['length']>0x0&&_0x48f3b1[_0x35cfa9(0x5d0,0x5dc)][_0x21ee6e(0x99,0x96)](_0xe7c664['length']+('개\x20child\x20—\x20'+_0x21ee6e(0x7a,0x6d)+'ote_id\x20미확인'+_0x35cfa9(0x5dc,0x5f1)+'에서\x20재시도)')),await this[_0x35cfa9(0x5d3,0x5c7)+'s'](_0x50072e,_0x501aa6,_0x1843b8,_0x23ae95,_0x48f3b1,_0x2c8ba0);}return _0x48f3b1['duration']=Date[_0x21ee6e(0x89,0xa4)]()-_0x1843b8,_0x48f3b1;}async[_0x470fcb(0x133,0x122)+'s'](_0x386d83,_0x1e9e5a,_0x52616f,_0x4c2e4b,_0x51c62c,_0x2c19f){function _0x59ece8(_0xafb632,_0x29d7da){return _0x95b2f1(_0xafb632-0x161,_0x29d7da);}function _0x52a9d5(_0x4bdd64,_0xafcb16){return _0x95b2f1(_0x4bdd64-0x4df,_0xafcb16);}for(let _0xc9fb9e=0x0;_0xc9fb9e<_0x386d83[_0x59ece8(0x181,0x1a0)];_0xc9fb9e+=_0x1e9e5a){if(_0x52a9d5(0x514,0x508)!==_0x59ece8(0x196,0x1c0))return{'memoryId':_0x4ebed2[_0x52a9d5(0x4ee,0x4c2)],'ok':!![],'rateLimited':![],'msg':''};else{if(_0x4c2e4b>0x0&&Date[_0x59ece8(0x192,0x180)]()-_0x52616f>_0x4c2e4b){const _0x5a5676=_0x386d83[_0x52a9d5(0x4ff,0x500)]-_0xc9fb9e;_0x51c62c[_0x52a9d5(0x4f0,0x4c8)][_0x52a9d5(0x502,0x4f3)](_0x52a9d5(0x531,0x55d)+_0x5a5676+'개\x20미처리'),_0x51c62c[_0x52a9d5(0x4e0,0x4d3)]+=_0x5a5676;break;}const _0x5e5bf1=_0x386d83[_0x59ece8(0x190,0x1b0)](_0xc9fb9e,_0xc9fb9e+_0x1e9e5a);try{if(_0x59ece8(0x193,0x195)!=='EgZgq'){const _0x4263df=new Map(),_0x1e62de=await this[_0x59ece8(0x176,0x187)][_0x52a9d5(0x50a,0x4ec)+_0x52a9d5(0x4f9,0x509)](_0x5e5bf1[_0x59ece8(0x166,0x167)](_0x5983f7=>{function _0x391aea(_0x3c0a78,_0x513f84){return _0x59ece8(_0x3c0a78-0x95,_0x513f84);}function _0x386d9a(_0x487be7,_0x5f156e){return _0x59ece8(_0x487be7-0xed,_0x5f156e);}const _0x37a18e=_0x5983f7[_0x391aea(0x1ea,0x1c9)+'re']!==undefined?Math[_0x391aea(0x232,0x252)](_0x5983f7[_0x391aea(0x1ea,0x1f0)+'re']*0x3e8)/0x3e8:undefined;return _0x4263df[_0x391aea(0x1f4,0x1e3)](_0x5983f7['id'],_0x37a18e),{'content':_0x5983f7['content'],'category':mapCategory(_0x5983f7['category']),'tier':_0x386d9a(0x264,0x24a),'tags':_0x5983f7[_0x386d9a(0x251,0x265)],'created_at':_0x5983f7['createdAt'],'parent_id':_0x5983f7[_0x386d9a(0x26a,0x282)]?_0x2c19f[_0x391aea(0x23b,0x224)](_0x5983f7['parentId']):undefined,'chunk_index':_0x5983f7[_0x391aea(0x21e,0x218)]??undefined,'chunk_total':_0x5983f7[_0x386d9a(0x297,0x292)]??undefined,'quality_score':_0x37a18e};}));for(let _0x32e16b=0x0;_0x32e16b<_0x1e62de['ids'][_0x52a9d5(0x4ff,0x51e)];_0x32e16b++){if(_0x32e16b<_0x5e5bf1[_0x52a9d5(0x4ff,0x517)]&&_0x1e62de[_0x59ece8(0x19e,0x1aa)][_0x32e16b]){const _0x56c150=_0x5e5bf1[_0x32e16b]['id'],_0x172b38=_0x4263df[_0x59ece8(0x1a6,0x178)](_0x56c150);if(_0x172b38!==undefined&&_0x5e5bf1[_0x32e16b]['qualitySco'+'re']===undefined)try{if(_0x52a9d5(0x4df,0x4c6)===_0x52a9d5(0x4df,0x4c9))this['db'][_0x52a9d5(0x51e,0x545)+'ry'](_0x56c150,{'qualityScore':_0x172b38});else return _0x923e17[_0x59ece8(0x15c,0x14e)]=_0x43a6ca[_0x59ece8(0x192,0x17e)]()-_0x8b8a65,_0x545255;}catch{}this['db']['setSyncSta'+_0x52a9d5(0x4ea,0x4cc)](_0x56c150,_0x1e62de[_0x59ece8(0x19e,0x17d)][_0x32e16b],'synced'),_0x2c19f[_0x52a9d5(0x4dd,0x4be)](_0x56c150,_0x1e62de[_0x52a9d5(0x51c,0x527)][_0x32e16b]),_0x51c62c['syncedItem'+'s'][_0x52a9d5(0x502,0x51e)]({'localId':_0x56c150,'remoteId':_0x1e62de[_0x59ece8(0x19e,0x195)][_0x32e16b]});}}_0x51c62c['pushed']+=_0x1e62de[_0x52a9d5(0x4d1,0x4fb)],_0x51c62c[_0x52a9d5(0x4e0,0x4b3)]+=_0x1e62de['failed'];if(_0x1e62de[_0x59ece8(0x172,0x14f)][_0x52a9d5(0x4ff,0x4e9)]>0x0){if(_0x52a9d5(0x4d5,0x4fa)==='JmRlL'){const _0x27432b=_0x538e2e['match'](_0x4c5b55);if(_0x27432b)_0x3957b2[_0x59ece8(0x18f,0x1a7)](_0x27432b[0x1]);}else{const _0x88b622=new Set(),_0x1d3504=/Parent memory not found:\s*parent_id\s*'([^']+)'/;for(const _0x45ed8b of _0x1e62de[_0x59ece8(0x172,0x14d)]){const _0xc1fa47=_0x45ed8b[_0x52a9d5(0x4ec,0x4d6)](_0x1d3504);if(_0xc1fa47)_0x88b622[_0x52a9d5(0x50d,0x50e)](_0xc1fa47[0x1]);}if(_0x88b622[_0x59ece8(0x165,0x178)]>0x0){let _0x4ac2c0=0x0;for(const _0x2cddd6 of _0x88b622){if(_0x59ece8(0x195,0x1a6)!=='reKpI')_0x4ac2c0+=this['db']['resetSyncB'+'yStaleRemo'+_0x52a9d5(0x4e7,0x4e3)](_0x2cddd6);else return _0x2cb8d8[_0x11d703]??_0x6bd8b2;}_0x4ac2c0>0x0&&_0x51c62c[_0x52a9d5(0x4f0,0x4e1)]['push'](_0x52a9d5(0x52e,0x508)+'nt\x20'+_0x88b622[_0x52a9d5(0x4e3,0x512)]+(_0x59ece8(0x1a5,0x1c7)+'\x20(')+_0x4ac2c0+(_0x59ece8(0x168,0x180)+'전환,\x20다음\x20flu'+_0x52a9d5(0x526,0x4f6)+')'));}_0x51c62c['errors'][_0x59ece8(0x184,0x1ac)](..._0x1e62de[_0x59ece8(0x172,0x199)]);}}}else return this['db'][_0x52a9d5(0x4f3,0x4e6)+'SyncMemori'+'es']()[_0x52a9d5(0x4ff,0x4de)];}catch(_0xca0d7b){_0x51c62c[_0x59ece8(0x172,0x186)][_0x59ece8(0x184,0x1ab)](_0x52a9d5(0x517,0x542)+(_0xca0d7b instanceof Error?_0xca0d7b[_0x52a9d5(0x4d7,0x501)]:String(_0xca0d7b))),_0x51c62c[_0x59ece8(0x162,0x160)]+=_0x5e5bf1['length'];}}}}async[_0x470fcb(0x17a,0x164)+_0x95b2f1(0x3e,0x19)](_0x2e1ac7){const _0x40c1c1=Date[_0x40516d(0x168,0x145)](),_0x3effa2=_0x2e1ac7?.['timeoutMs']??0x0,_0x32ebd9=_0x2e1ac7?.['limit']??Number[_0x40516d(0x183,0x166)+_0x5a6edf(0xaf,0xdd)],_0xb9eaeb=Math['max'](0x1,_0x2e1ac7?.[_0x40516d(0x17f,0x1ad)+'y']??0x1),_0x3394e2=this['db']['getUnsynce'+_0x40516d(0x177,0x186)+'s']();function _0x40516d(_0x2d1563,_0x183b08){return _0x95b2f1(_0x2d1563-0x137,_0x183b08);}let _0x1a4232=0x0;const _0x2e14a0=[];function _0x5a6edf(_0x2bbd61,_0x3c2ce5){return _0x95b2f1(_0x3c2ce5-0xad,_0x2bbd61);}const _0x9410e=[];for(const _0xa2eb7e of _0x3394e2){const _0x10ee50=this['db'][_0x40516d(0x13d,0x16e)+_0x5a6edf(0x8f,0xb8)](_0xa2eb7e[_0x40516d(0x146,0x161)]);if(!_0x10ee50?.['remoteId']){if('EwynC'===_0x40516d(0x12a,0x123))return this['db']['setSyncSta'+'tus'](_0x302ee4['id'],null,_0x40516d(0x16d,0x16c)),![];else{this['db'][_0x40516d(0x171,0x153)+_0x40516d(0x159,0x14b)](_0xa2eb7e[_0x5a6edf(0xb7,0xbc)]),this['db'][_0x5a6edf(0x94,0xc0)+'Status'](_0xa2eb7e[_0x5a6edf(0xba,0xbc)]);continue;}}_0x9410e[_0x5a6edf(0xd0,0xd0)]({'memoryId':_0xa2eb7e[_0x5a6edf(0xbf,0xbc)],'remoteId':_0x10ee50[_0x40516d(0x182,0x18d)]});}const _0x50a76e=_0x9410e[_0x40516d(0x166,0x13b)](0x0,_0x32ebd9),_0x2d519b=()=>_0x3effa2>0x0&&Date[_0x5a6edf(0x103,0xde)]()-_0x40c1c1>=_0x3effa2;let _0x3b67a7=![];for(let _0x36f0dd=0x0;_0x36f0dd<_0x50a76e['length'];_0x36f0dd+=_0xb9eaeb){if(_0x2d519b()){if('dYfcK'!==_0x40516d(0x188,0x175)){_0x3b67a7=!![];break;}else try{this['db'][_0x40516d(0x176,0x15c)+'ry'](_0x352e38,{'qualityScore':_0x56ae01});}catch{}}const _0x407ce6=_0x50a76e[_0x5a6edf(0x103,0xdc)](_0x36f0dd,_0x36f0dd+_0xb9eaeb),_0x2567d0=await Promise['all'](_0x407ce6[_0x5a6edf(0x94,0xb2)](async _0x4f4a56=>{function _0x2561d1(_0x595290,_0x3d5f04){return _0x40516d(_0x3d5f04-0x170,_0x595290);}function _0x56310a(_0x13998d,_0x190aa3){return _0x40516d(_0x190aa3-0x29b,_0x13998d);}if(_0x56310a(0x423,0x40d)!==_0x56310a(0x3e6,0x40d))_0x54f0dd[_0x56310a(0x3f8,0x3e3)][_0x2561d1(0x2e0,0x2ca)](_0x56fdf9[_0x2561d1(0x2c8,0x2c7)]+('개\x20child\x20—\x20'+_0x56310a(0x3b1,0x3cc)+_0x56310a(0x3cd,0x3c3)+_0x2561d1(0x2d8,0x2cd)+'에서\x20재시도)'));else try{return await this[_0x2561d1(0x2a2,0x2bc)][_0x56310a(0x3e8,0x3c9)+'ry'](_0x4f4a56[_0x2561d1(0x2e0,0x2f2)]),{'memoryId':_0x4f4a56[_0x2561d1(0x2c0,0x2b6)],'ok':!![],'rateLimited':![],'msg':''};}catch(_0x53412d){const _0x5715e8=_0x53412d instanceof Error?_0x53412d[_0x56310a(0x39e,0x3ca)]:String(_0x53412d),_0x22c5fa=getErrorStatus(_0x53412d);if(_0x22c5fa===0x194||_0x5715e8[_0x2561d1(0x2ea,0x2bf)](_0x2561d1(0x2af,0x2d0))||_0x5715e8[_0x56310a(0x3e8,0x3ea)]('Not\x20Found'))return{'memoryId':_0x4f4a56[_0x56310a(0x3b5,0x3e1)],'ok':!![],'rateLimited':![],'msg':''};return{'memoryId':_0x4f4a56[_0x2561d1(0x29c,0x2b6)],'ok':![],'rateLimited':_0x22c5fa===0x1ad,'msg':_0x5715e8};}}));for(const _0x2056b0 of _0x2567d0){if(_0x40516d(0x181,0x19f)!=='TCTUZ'){if(_0x2056b0['ok'])this['db'][_0x5a6edf(0xdb,0xe7)+_0x5a6edf(0xe8,0xcf)](_0x2056b0[_0x40516d(0x146,0x175)]),this['db']['deleteSync'+'Status'](_0x2056b0[_0x40516d(0x146,0x172)]),_0x1a4232++;else{_0x2e14a0['push'](_0x40516d(0x178,0x150)+_0x2056b0[_0x5a6edf(0xc3,0xbc)]+_0x5a6edf(0xc1,0xda)+_0x2056b0[_0x5a6edf(0xd1,0xfa)]);if(_0x2056b0[_0x5a6edf(0xcf,0xe4)+'d'])_0x3b67a7=!![];}}else{const _0x247bfa=_0x973899(_0x18234d[_0x40516d(0x150,0x13e)]);if(_0x4677f6['has'](_0x247bfa))return this['db'][_0x5a6edf(0xc1,0xb9)+_0x5a6edf(0x8f,0xb8)](_0x43de77['id'],null,_0x40516d(0x16d,0x148)),![];return _0x358f62[_0x5a6edf(0x9f,0xab)](_0x247bfa,_0x18c791['id']),!![];}}if(_0x3b67a7)break;}return{'deleted':_0x1a4232,'errors':_0x2e14a0,'remaining':Math['max'](0x0,_0x9410e[_0x5a6edf(0xf5,0xcd)]-_0x1a4232),'stopped':_0x3b67a7};}[_0x470fcb(0x14b,0x130)+_0x95b2f1(0x17,0x1e)](){function _0x515f62(_0x1f504b,_0x57f98e){return _0x95b2f1(_0x57f98e-0x5de,_0x1f504b);}function _0x2a2e69(_0x2207bd,_0x44282e){return _0x95b2f1(_0x44282e-0x492,_0x2207bd);}return this['db']['getPending'+_0x515f62(0x5e8,0x605)+'es']()[_0x515f62(0x60f,0x5fe)];}}
|
package/dist/sync/scheduler.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x57d77f(_0x59d93b,_0x379d4c){return _0x3d6c(_0x59d93b- -0x6a,_0x379d4c);}function _0x550803(_0x5881da,_0x848e86){return _0x3d6c(_0x848e86-0x351,_0x5881da);}(function(_0x3a586a,_0xebe8f2){const _0x5a817e=_0x3a586a();function _0x355fab(_0x11cd5d,_0x31a8e7){return _0x3d6c(_0x11cd5d- -0x80,_0x31a8e7);}function _0x3b721d(_0xa84ce8,_0x3e5423){return _0x3d6c(_0x3e5423-0x26b,_0xa84ce8);}while(!![]){try{const _0x102ac1=parseInt(_0x355fab(0x14,-0x1))/0x1*(-parseInt(_0x355fab(0x25,0x3a))/0x2)+-parseInt(_0x355fab(0x32,0x26))/0x3+parseInt(_0x3b721d(0x322,0x331))/0x4*(parseInt(_0x3b721d(0x30e,0x307))/0x5)+parseInt(_0x3b721d(0x31a,0x301))/0x6*(parseInt(_0x355fab(0x13,-0x4))/0x7)+parseInt(_0x3b721d(0x2f3,0x308))/0x8*(parseInt(_0x3b721d(0x32b,0x31f))/0x9)+-parseInt(_0x3b721d(0x300,0x304))/0xa*(-parseInt(_0x355fab(0x2f,0x15))/0xb)+parseInt(_0x3b721d(0x310,0x322))/0xc;if(_0x102ac1===_0xebe8f2)break;else _0x5a817e['push'](_0x5a817e['shift']());}catch(_0x42ab2c){_0x5a817e['push'](_0x5a817e['shift']());}}}(_0x3603,0x99685));function _0x3d6c(_0x43b7a0,_0x1536f6){_0x43b7a0=_0x43b7a0-0x92;const _0x360372=_0x3603();let _0x3d6c93=_0x360372[_0x43b7a0];if(_0x3d6c['ASYyqa']===undefined){var _0x25ae9b=function(_0x834f42){const _0x34c3cf='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x398485='',_0x3ad4ba='';for(let _0x438c9f=0x0,_0x2e87e8,_0x174863,_0x44fe8d=0x0;_0x174863=_0x834f42['charAt'](_0x44fe8d++);~_0x174863&&(_0x2e87e8=_0x438c9f%0x4?_0x2e87e8*0x40+_0x174863:_0x174863,_0x438c9f++%0x4)?_0x398485+=String['fromCharCode'](0xff&_0x2e87e8>>(-0x2*_0x438c9f&0x6)):0x0){_0x174863=_0x34c3cf['indexOf'](_0x174863);}for(let _0x549e96=0x0,_0x3538b4=_0x398485['length'];_0x549e96<_0x3538b4;_0x549e96++){_0x3ad4ba+='%'+('00'+_0x398485['charCodeAt'](_0x549e96)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3ad4ba);};_0x3d6c['DDaKSs']=_0x25ae9b,_0x3d6c['ssRfoJ']={},_0x3d6c['ASYyqa']=!![];}const _0x55f2ba=_0x360372[0x0],_0x5c006b=_0x43b7a0+_0x55f2ba,_0x3b6b90=_0x3d6c['ssRfoJ'][_0x5c006b];return!_0x3b6b90?(_0x3d6c93=_0x3d6c['DDaKSs'](_0x3d6c93),_0x3d6c['ssRfoJ'][_0x5c006b]=_0x3d6c93):_0x3d6c93=_0x3b6b90,_0x3d6c93;}export class SyncScheduler{[_0x550803(0x40c,0x404)+'er'];[_0x550803(0x408,0x412)];[_0x57d77f(0x28,0x39)];[_0x550803(0x40f,0x3f2)]=null;[_0x550803(0x404,0x3f0)]=![];[_0x57d77f(0x30,0x27)]=![];[_0x57d77f(0x4c,0x51)]=0x0;['lastSyncAt']=null;[_0x57d77f(0x50,0x54)]=null;['startedAt']=null;constructor(_0x38a0ee,_0x515f63,_0x155b96){function _0x3aa517(_0x4d7d36,_0xda2070){return _0x57d77f(_0x4d7d36-0x36a,_0xda2070);}this['synchroniz'+'er']=_0x38a0ee,this[_0x3aa517(0x3c1,0x3c2)]=_0x515f63,this['logger']=_0x155b96;}async[_0x57d77f(0x44,0x44)](){if(this['running']){if(_0x57c316(-0x17e,-0x18f)!==_0x45c6e4(0x148,0x132)){this[_0x57c316(-0x1ae,-0x191)]?.['warn'](_0x57c316(-0x193,-0x17f)+_0x57c316(-0x185,-0x16a)+_0x45c6e4(0x13a,0x120));return;}else this[_0x45c6e4(0x131,0x134)]=![];}if(this['options'][_0x57c316(-0x180,-0x16d)]<=0x0){this[_0x45c6e4(0x129,0x121)]?.[_0x45c6e4(0x15a,0x15d)](_0x57c316(-0x193,-0x17f)+_0x57c316(-0x184,-0x17f)+_0x45c6e4(0x157,0x164)+'\x20<=\x200)');return;}this[_0x45c6e4(0x136,0x13c)]=!![],this[_0x57c316(-0x196,-0x189)]=new Date(),this[_0x45c6e4(0x129,0x12a)]?.[_0x45c6e4(0x156,0x16c)](_0x57c316(-0x193,-0x1af)+'started',{'intervalMs':this[_0x57c316(-0x17f,-0x18a)][_0x57c316(-0x180,-0x19c)]});function _0x57c316(_0x51649b,_0x1286d2){return _0x550803(_0x1286d2,_0x51649b- -0x591);}function _0x45c6e4(_0x3ba81c,_0x55b3ff){return _0x550803(_0x55b3ff,_0x3ba81c- -0x2ba);}this['options'][_0x45c6e4(0x15c,0x175)+'t']!==![]&&await this[_0x57c316(-0x178,-0x15f)](),this['timer']=setInterval(()=>{function _0x48af7a(_0x228909,_0x562a19){return _0x45c6e4(_0x562a19- -0x3ba,_0x228909);}this[_0x48af7a(-0x241,-0x25b)]()['catch'](_0x1eb616=>{function _0xd8c267(_0x1063fa,_0x26f41d){return _0x48af7a(_0x26f41d,_0x1063fa-0x6ce);}function _0x4d36cb(_0x4e9097,_0x31a19e){return _0x48af7a(_0x31a19e,_0x4e9097-0x466);}this[_0x4d36cb(0x1d5,0x1b8)]?.[_0xd8c267(0x474,0x46b)]('Scheduler\x20'+_0x4d36cb(0x207,0x222),_0x1eb616 instanceof Error?_0x1eb616:new Error(String(_0x1eb616)));});},this['options']['intervalMs']),this[_0x45c6e4(0x138,0x141)]&&typeof this[_0x57c316(-0x19f,-0x190)]===_0x45c6e4(0x161,0x15e)&&_0x45c6e4(0x140,0x131)in this[_0x57c316(-0x19f,-0x1ab)]&&this[_0x45c6e4(0x138,0x130)][_0x57c316(-0x197,-0x19b)]();}[_0x550803(0x404,0x3f8)](){if(!this[_0x179030(-0xbc,-0xb0)])return;function _0x179030(_0x516b8f,_0x138ce2){return _0x57d77f(_0x138ce2- -0xe5,_0x516b8f);}this[_0x4a4a29(-0x84,-0x9e)]&&(_0x179030(-0x95,-0x9f)===_0x179030(-0xa0,-0x84)?(this['synchroniz'+'er']=_0x2e87e8,this['options']=_0x174863,this[_0x4a4a29(-0x93,-0x91)]=_0x44fe8d):(clearInterval(this[_0x179030(-0xac,-0xae)]),this['timer']=null));function _0x4a4a29(_0x151c35,_0x17774a){return _0x57d77f(_0x151c35- -0xbb,_0x17774a);}this['running']=![],this[_0x4a4a29(-0x93,-0xa4)]?.[_0x179030(-0x77,-0x90)](_0x4a4a29(-0x78,-0x91)+_0x179030(-0xd1,-0xb8),{'syncCount':this['syncCount']});}[_0x550803(0x408,0x3f3)](){function _0x3eb7f6(_0x8677da,_0x1ba82b){return _0x57d77f(_0x8677da-0x438,_0x1ba82b);}return this[_0x3eb7f6(0x46d,0x456)];}[_0x57d77f(0x4f,0x4b)](){return this['syncing'];}['getStatus'](){function _0x2ed2aa(_0xeb032e,_0x236f67){return _0x57d77f(_0x236f67- -0x298,_0xeb032e);}let _0x21fc36=null;if(this[_0x5aeed1(0x3a8,0x3b0)]&&this[_0x5aeed1(0x3ad,0x3a7)]){if(_0x2ed2aa(-0x253,-0x26a)!==_0x2ed2aa(-0x284,-0x26a))return this[_0x2ed2aa(-0x27a,-0x263)];else{const _0x44f94b=new Date(this[_0x2ed2aa(-0x27a,-0x25e)]['getTime']()+this[_0x2ed2aa(-0x23d,-0x241)][_0x2ed2aa(-0x230,-0x242)]);_0x21fc36=_0x44f94b[_0x2ed2aa(-0x284,-0x267)+'g']();}}else{if(this[_0x2ed2aa(-0x250,-0x263)]&&this[_0x5aeed1(0x3b3,0x3c5)]){const _0x545aa0=new Date(this[_0x2ed2aa(-0x256,-0x258)][_0x2ed2aa(-0x25e,-0x26d)]()+this[_0x5aeed1(0x3ca,0x3c6)][_0x2ed2aa(-0x242,-0x242)]);_0x21fc36=_0x545aa0[_0x2ed2aa(-0x26d,-0x267)+'g']();}}function _0x5aeed1(_0x1c8171,_0x342bba){return _0x57d77f(_0x1c8171-0x373,_0x342bba);}return{'running':this[_0x5aeed1(0x3a8,0x38b)],'syncing':this[_0x2ed2aa(-0x262,-0x268)],'syncCount':this[_0x5aeed1(0x3bf,0x3d0)],'lastSyncAt':this['lastSyncAt']?.[_0x2ed2aa(-0x250,-0x267)+'g']()??null,'lastResult':this[_0x2ed2aa(-0x241,-0x248)],'intervalMs':this[_0x2ed2aa(-0x249,-0x241)][_0x2ed2aa(-0x22a,-0x242)],'nextSyncAt':_0x21fc36};}async[_0x550803(0x3ef,0x3fd)](){function _0x191677(_0x5ec29e,_0x439be8){return _0x57d77f(_0x439be8-0x203,_0x5ec29e);}return this[_0x191677(0x257,0x261)]();}async[_0x57d77f(0x5e,0x6c)](){function _0x478621(_0xa2de6a,_0x50c44e){return _0x550803(_0xa2de6a,_0x50c44e- -0x618);}if(this[_0x478621(-0x239,-0x22d)])return this['logger']?.[_0x478621(-0x20d,-0x212)]('Sync\x20alrea'+'dy\x20in\x20prog'+_0x3b518c(0x123,0x11d)+'ping'),null;this['syncing']=!![];function _0x3b518c(_0x2c8e7,_0x56a522){return _0x550803(_0x2c8e7,_0x56a522- -0x2d2);}try{const _0x1148c2=await this[_0x3b518c(0x129,0x132)+'er'][_0x478621(-0x223,-0x209)]();return this[_0x3b518c(0x120,0x135)]++,this['lastSyncAt']=new Date(),this[_0x478621(-0x1f3,-0x20d)]=_0x1148c2,this[_0x478621(-0x238,-0x235)]?.[_0x3b518c(0x148,0x13e)]('Sync\x20compl'+'eted',{'pushed':_0x1148c2[_0x478621(-0x216,-0x227)],'pulled':_0x1148c2[_0x3b518c(0x158,0x13c)],'errors':_0x1148c2[_0x3b518c(0x11a,0x125)][_0x3b518c(0x14d,0x137)],'duration':_0x1148c2[_0x3b518c(0x13f,0x127)]}),this[_0x3b518c(0x14d,0x140)][_0x3b518c(0x137,0x146)]?.(_0x1148c2),_0x1148c2;}catch(_0xaffd84){const _0x1afa58=_0xaffd84 instanceof Error?_0xaffd84:new Error(String(_0xaffd84));return this[_0x3b518c(0x10a,0x111)]?.[_0x478621(-0x1e8,-0x1fe)]('Sync\x20faile'+'d',_0x1afa58),this[_0x3b518c(0x123,0x140)][_0x3b518c(0x13f,0x12a)]?.(_0x1afa58),null;}finally{this[_0x478621(-0x249,-0x22d)]=![];}}}function _0x3603(){const _0x3fda45=['C3rHCNq','mtfNELPvvNO','wfPpvfa','EfPjDMG','mZq1nZK2og9uv3DdqG','C3LUy2HYB25PEG','ndGZm3zjshHSvG','zgvIDwC','C3LUy0nVDw50','mZeZmtG0ng5MyuDOtW','BgvUz3rO','AxntEw5JAw5N','BgfZDfjLC3vSDa','ywXYzwfKEsbYDq','zgLZywjSzwqGka','ChvSBgvK','C3LUyW','Aw5MBW','Aw50zxj2ywXnCW','B3b0Aw9UCW','q1Leshu','D2fYBG','DgLJAYbLCNjVCG','C3LUy09Uu3rHCG','mtq2mdm1nNPysM53rq','B25tEw5J','DgLJAW','zxjYB3i','B2jQzwn0','AwLZswO','Bg9Nz2vY','mtC1mgDpDLHkua','mJLABePwz1u','z2v0vgLTzq','otq2mNj3EhbYEq','C3rVChbLza','zwrywwi','odeZnZe2mff6q25xuq','C3LUy2LUzW','Dg9ju09tDhjPBG','nunLv21MzG','nZG0ohHiD1vWta','CMvZCYWGC2TPCa','CNvUBMLUzW','ChvZAgvK','DgLTzxi','AxnsDw5UAw5N','BM5PBMC','BgfZDfn5BMnbDa','mZK5odHqq1zjvMm','zxjYB3jZ','C3rVCa','zhvYyxrPB24','Dw5Yzwy','C3rHCNrLzef0','B25fCNjVCG','C3LUy05VDW','u2nOzwr1BgvYia'];_0x3603=function(){return _0x3fda45;};return _0x3603();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x553eec(_0x29b3bb,_0x38a41b){return _0x470f(_0x38a41b-0x11f,_0x29b3bb);}(function(_0xac9082,_0x30bd7e){const _0x43ffd8=_0xac9082();function _0x234ac3(_0x2b8f82,_0x4d1aa9){return _0x470f(_0x2b8f82- -0xfe,_0x4d1aa9);}function _0x1ff972(_0x1bf2d6,_0x6ffc46){return _0x470f(_0x6ffc46-0x110,_0x1bf2d6);}while(!![]){try{const _0x266ff4=-parseInt(_0x234ac3(-0xc,-0x31))/0x1+parseInt(_0x1ff972(0x1ef,0x211))/0x2*(parseInt(_0x1ff972(0x242,0x224))/0x3)+-parseInt(_0x234ac3(-0xf,-0x39))/0x4*(parseInt(_0x1ff972(0x1fd,0x219))/0x5)+parseInt(_0x234ac3(-0x1a,-0x33))/0x6*(-parseInt(_0x1ff972(0x230,0x227))/0x7)+parseInt(_0x234ac3(-0x36,-0xf))/0x8+-parseInt(_0x234ac3(-0x17,-0xe))/0x9*(parseInt(_0x234ac3(0xe,0x2a))/0xa)+parseInt(_0x234ac3(-0x1b,-0x11))/0xb;if(_0x266ff4===_0x30bd7e)break;else _0x43ffd8['push'](_0x43ffd8['shift']());}catch(_0x38ea1d){_0x43ffd8['push'](_0x43ffd8['shift']());}}}(_0x369d,0xa0b83));import{SyncQueue,mapCategory,mapTier}from'./queue.js';function _0x369d(){const _0x373fbf=['mJHIq0DZELu','CgvU','y29UDgvUDa','DxbKyxrLzef0','twTqu3G','oda4nZC4neHnq1nmCq','Bwf4rMfPBhvYzq','CxvLDwu','AxndAxjJDwL0tW','DxjL','svfWqwW','CgfYzw50x2LK','DgLTzw91De1Z','zgvSzxrLza','CMvJB3jKrMfPBa','zw1VCNLdB3vUDa','66Mu66QO66ASia','DgLLCG','DgfNCW','q2LYy3vPDcbICG','CxvHBgL0Ev9ZyW','zwfRzxiGB3bLBG','B3jL','y2vKqxq','z2v0ugvUzgLUzW','z2v0tgfZDfn5BG','ChvZAgvK','ywnJzxnZx2nVDq','ENzXCwC','zhvYyxrPB24','zMfPBhvYzxm','C3LUy2vK','mti4mJKZmdbku2XkuNO','otmYodC0ywrnC1H3','BwvYz2vby2nLCW','y2H1BMTFDg90yq','mtC1mdqXow9dq25xuq','vLvmwNG','ignVBNnLy3v0Aq','y2XPzw50','DxbKyxrLzf9HDa','ChvSBa','BgLZDe1LBw9YAq','zKXvExO','nfvzALzIBq','zuf0','oIb0B28GBwfUEq','mta1mJy0me5bugHgDW','y29UzMXPy3rZ','y2f0zwDVCNK','zxnZ','zxjYB3jZ','BgvUz3rO','y29VBgrVD25nCW','C0nVDw50','zw1IzwrKAw5N','BwvZC2fNzq','C2f2zuvTyMvKza','ChvZAa','z2v0u3LUy2vKtq','C3LUy0XVy2fS','DgvHBvbHDgG','mtKZmdbzB3rgtha','BgfZDezHAwX1CG','zMX1C2G','DxbKyxrLtwvTBW','Aw5N','C2v0u3LUy1n0yq','C29YDa','DMuGzMfPBhvYzq','mJmWmJu5nxrzC3jpra','BM9KzuLK','ChvSBgvK','mtbHwLfSuuq','qNLszw1VDgvjza','BM93','y3jLyxrLtwvTBW','y2H1BMTFAw5Kzq','DhvZ','io2sGcdSI6tTJkG6ia','q291BNq','mJuYufnpvujH','zMLUze1LBw9YEq','zMX1C2HuB21ICW'];_0x369d=function(){return _0x373fbf;};return _0x369d();}function _0x307d3c(_0x17391e,_0x2c9e4f){return _0x470f(_0x2c9e4f- -0x135,_0x17391e);}function _0x470f(_0x34e240,_0x5f53d2){_0x34e240=_0x34e240-0xc5;const _0x369d06=_0x369d();let _0x470fd9=_0x369d06[_0x34e240];if(_0x470f['BMnoDo']===undefined){var _0x2d468d=function(_0x3919f4){const _0x38e3f9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1152f9='',_0x44c66a='';for(let _0x49d989=0x0,_0x210828,_0x18f19e,_0xe2c94c=0x0;_0x18f19e=_0x3919f4['charAt'](_0xe2c94c++);~_0x18f19e&&(_0x210828=_0x49d989%0x4?_0x210828*0x40+_0x18f19e:_0x18f19e,_0x49d989++%0x4)?_0x1152f9+=String['fromCharCode'](0xff&_0x210828>>(-0x2*_0x49d989&0x6)):0x0){_0x18f19e=_0x38e3f9['indexOf'](_0x18f19e);}for(let _0x4769b6=0x0,_0x4fa262=_0x1152f9['length'];_0x4769b6<_0x4fa262;_0x4769b6++){_0x44c66a+='%'+('00'+_0x1152f9['charCodeAt'](_0x4769b6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x44c66a);};_0x470f['LJqyTH']=_0x2d468d,_0x470f['jLYreL']={},_0x470f['BMnoDo']=!![];}const _0x5b98f6=_0x369d06[0x0],_0x2e0d0f=_0x34e240+_0x5b98f6,_0x568b81=_0x470f['jLYreL'][_0x2e0d0f];return!_0x568b81?(_0x470fd9=_0x470f['LJqyTH'](_0x470fd9),_0x470f['jLYreL'][_0x2e0d0f]=_0x470fd9):_0x470fd9=_0x568b81,_0x470fd9;}import{TeamSynchronizer}from'./team-synchronizer.js';const DEFAULT_PAGE_SIZE=0x64;export class MemorySynchronizer{['db'];[_0x307d3c(-0x47,-0x4b)];[_0x553eec(0x211,0x21f)];[_0x553eec(0x231,0x229)];[_0x553eec(0x1f2,0x1e9)];[_0x307d3c(-0x3d,-0x54)]=0x0;[_0x553eec(0x244,0x221)+_0x553eec(0x217,0x20f)]=0x0;[_0x307d3c(-0x8d,-0x6c)+'s']=0x3;[_0x307d3c(-0x22,-0x3d)]=0x7530;constructor(_0x1ec8a5,_0x938ad0,_0x316fc0,_0x2e6968){function _0xd5d1ac(_0x5abf64,_0x454fc0){return _0x553eec(_0x5abf64,_0x454fc0-0x275);}function _0x26cdfe(_0x4c6c62,_0x1f7075){return _0x553eec(_0x1f7075,_0x4c6c62- -0x138);}this['db']=_0x1ec8a5,this[_0xd5d1ac(0x470,0x47e)]=_0x938ad0,this[_0x26cdfe(0xe7,0x10f)]=_0x316fc0,this[_0x26cdfe(0xf1,0x119)]=_0x2e6968,this[_0xd5d1ac(0x455,0x45e)]=new SyncQueue(_0x1ec8a5,_0x938ad0);}[_0x307d3c(-0x7b,-0x6a)+_0x307d3c(-0x33,-0x1d)](){if(this[_0x5b7fb6(0xd3,0xad)]<this[_0x5b7fb6(0xbb,0x95)+'s'])return![];function _0x5b7fb6(_0xdc5809,_0x37f49b){return _0x307d3c(_0xdc5809,_0x37f49b-0x101);}function _0x216e75(_0x2c6428,_0x4672c2){return _0x307d3c(_0x4672c2,_0x2c6428-0xa7);}return Date[_0x216e75(0x80,0x8e)]()-this[_0x5b7fb6(0xb1,0xce)+_0x5b7fb6(0xe3,0xbc)]<this[_0x5b7fb6(0xad,0xc4)];}['recordSucc'+_0x553eec(0x23d,0x214)](){function _0x16a0df(_0x7cb91f,_0x551fe2){return _0x553eec(_0x7cb91f,_0x551fe2-0x279);}this[_0x16a0df(0x493,0x479)]=0x0;}[_0x553eec(0x211,0x1f0)+'ure'](){function _0xf7ddcd(_0x38af31,_0x15e841){return _0x553eec(_0x15e841,_0x38af31- -0x240);}this[_0x520b32(0xc6,0xcd)]++;function _0x520b32(_0x427653,_0x5c50b9){return _0x553eec(_0x5c50b9,_0x427653- -0x13a);}this[_0x520b32(0xe7,0xcc)+'eAt']=Date[_0x520b32(0xf3,0xf4)]();}async['sync'](){function _0x863b42(_0x1b8632,_0x4285b4){return _0x553eec(_0x4285b4,_0x1b8632-0x230);}if(this['teamPath']&&this[_0x863b42(0x459,0x477)]){const _0x5425df=new TeamSynchronizer(this['db'],this[_0x2cc5ca(-0x91,-0x90)],this[_0x2cc5ca(-0x93,-0x7a)],this[_0x2cc5ca(-0x9a,-0x70)]),_0x117e8a=await _0x5425df['syncDelta']();return{'pushed':_0x117e8a[_0x2cc5ca(-0xb9,-0x9d)],'pulled':_0x117e8a[_0x863b42(0x45a,0x449)],'conflicts':_0x117e8a[_0x863b42(0x442,0x422)],'errors':_0x117e8a['errors'],'duration':_0x117e8a[_0x863b42(0x42f,0x458)]};}function _0x2cc5ca(_0x113b12,_0x143bca){return _0x553eec(_0x113b12,_0x143bca- -0x299);}return this[_0x863b42(0x44e,0x46c)]();}async[_0x553eec(0x239,0x21e)](){function _0x1743e5(_0x55cfbc,_0x20ebe1){return _0x307d3c(_0x55cfbc,_0x20ebe1-0x14e);}const _0x38ffcd=Date[_0x1743e5(0x118,0x127)]();function _0x5a9cdd(_0x4c4f7f,_0x2d2c47){return _0x307d3c(_0x2d2c47,_0x4c4f7f-0x4d6);}const _0x303260={'pushed':0x0,'pulled':0x0,'conflicts':0x0,'errors':[],'duration':0x0};try{const _0x204caa=await this[_0x1743e5(0xf7,0x116)]();_0x303260[_0x5a9cdd(0x47e,0x462)]=_0x204caa[_0x1743e5(0xe0,0xf6)],_0x303260['errors'][_0x1743e5(0x107,0x116)](..._0x204caa[_0x1743e5(0xf6,0x10f)]);const _0xff5052=await this[_0x5a9cdd(0x48d,0x465)]();_0x303260[_0x1743e5(0x115,0x124)]=_0xff5052['pulled'],_0x303260[_0x1743e5(0x116,0x10c)]=_0xff5052[_0x1743e5(0xea,0x10c)],_0x303260[_0x1743e5(0x110,0x10f)][_0x1743e5(0x13c,0x116)](..._0xff5052['errors']);}catch(_0x2ad760){_0x2ad760 instanceof Error&&_0x303260['errors'][_0x5a9cdd(0x49e,0x474)](_0x2ad760[_0x1743e5(0x131,0x114)]);}return _0x303260['duration']=Date[_0x1743e5(0x116,0x127)]()-_0x38ffcd,_0x303260;}async[_0x553eec(0x1fc,0x21c)](_0x542ed8){if(this[_0x382702(0x21c,0x228)+_0x382702(0x269,0x285)]())return{'pushed':0x0,'pulled':0x0,'conflicts':0x0,'errors':[_0x5be079(-0x19c,-0x18b)+_0x5be079(-0x19a,-0x1b6)+_0x5be079(-0x181,-0x16f)+'\x20consecuti'+_0x382702(0x259,0x238)+'s'],'duration':0x0};const _0x2d26b0=Date['now']();function _0x5be079(_0x4bb990,_0x32e089){return _0x307d3c(_0x32e089,_0x4bb990- -0x13d);}function _0x382702(_0x5a0235,_0x257951){return _0x307d3c(_0x257951,_0x5a0235-0x286);}try{const _0x21b91e=await this[_0x382702(0x21b,0x223)][_0x5be079(-0x16f,-0x165)]({'timeoutMs':_0x542ed8?.[_0x382702(0x220,0x22c)]}),_0x470eb3=await this[_0x382702(0x21b,0x233)][_0x5be079(-0x15c,-0x13a)+'tones'](),_0x2a8859=[..._0x21b91e['errors'],..._0x470eb3['errors']];return _0x2a8859['length']>0x0?_0x5be079(-0x1ab,-0x1a1)==='MkPSx'?this[_0x382702(0x222,0x233)+_0x382702(0x21d,0x21d)]():_0x24d59b['errors'][_0x382702(0x24e,0x22b)](_0x5be079(-0x19f,-0x180)+_0x3714c3['id']+'\x20풀\x20실패:\x20'+_0x3c24ba[_0x5be079(-0x177,-0x183)]):this['recordSucc'+_0x5be079(-0x17d,-0x158)](),{'pushed':_0x21b91e[_0x382702(0x22e,0x217)],'pulled':_0x470eb3[_0x382702(0x221,0x234)],'conflicts':0x0,'errors':_0x2a8859,'duration':Date['now']()-_0x2d26b0};}catch(_0x55782e){this[_0x5be079(-0x1a1,-0x18a)+_0x382702(0x21d,0x23a)]();throw _0x55782e;}}async['pull'](){function _0x3bca7a(_0x1d5638,_0x5284cb){return _0x307d3c(_0x1d5638,_0x5284cb-0x42f);}if(this[_0x647864(0x3d5,0x3b4)+'pen']())return{'pushed':0x0,'pulled':0x0,'conflicts':0x0,'errors':[_0x647864(0x3e0,0x3ba)+_0x3bca7a(0x3f9,0x3d2)+':\x20too\x20many'+_0x647864(0x3f3,0x3f7)+_0x647864(0x412,0x423)+'s'],'duration':0x0};const _0x411f61=Date[_0x647864(0x418,0x3f6)](),_0x593d74={'pushed':0x0,'pulled':0x0,'conflicts':0x0,'errors':[],'duration':0x0};try{let _0x41c9ea=0x0,_0x4f454c=!![];while(_0x4f454c){const _0x47b8e8=await this[_0x3bca7a(0x3ea,0x3e4)]['listMemori'+'es']({'limit':DEFAULT_PAGE_SIZE,'offset':_0x41c9ea,'includeEmbedding':!![]});if(_0x47b8e8['length']===0x0){_0x4f454c=![];break;}_0x47b8e8[_0x3bca7a(0x411,0x401)]((_0x4d886f,_0x23b1ae)=>{function _0x30a398(_0x42c632,_0x4491e4){return _0x647864(_0x42c632- -0x61e,_0x4491e4);}function _0x3fa7e8(_0x23f38a,_0x32fded){return _0x647864(_0x32fded- -0x2ae,_0x23f38a);}if(_0x3fa7e8(0x131,0x14a)!==_0x30a398(-0x226,-0x249)){const _0xb1d349=_0x1b6863[_0x30a398(-0x246,-0x25f)]?0x1:0x0,_0xa9b8d6=_0x14428d[_0x30a398(-0x246,-0x25e)]?0x1:0x0;return _0xb1d349-_0xa9b8d6;}else{const _0x5bd5e7=_0x4d886f[_0x3fa7e8(0x146,0x12a)]?0x1:0x0,_0x5ee387=_0x23b1ae['parent_id']?0x1:0x0;return _0x5bd5e7-_0x5ee387;}});for(const _0x28bc69 of _0x47b8e8){try{const _0x26abcd=this['db'][_0x3bca7a(0x3f0,0x40f)+_0x3bca7a(0x400,0x407)](_0x28bc69['id']);if(!_0x26abcd){const _0x9e8f66=this['db'][_0x647864(0x419,0x42e)+'ry']({'content':_0x28bc69[_0x647864(0x3cf,0x3a7)],'category':mapCategory(_0x28bc69[_0x3bca7a(0x3e1,0x3ee)]),'tier':mapTier(_0x28bc69[_0x647864(0x3de,0x3fa)]??'episodic'),'tags':_0x28bc69[_0x3bca7a(0x3b6,0x3cf)]??[],'parentId':_0x28bc69[_0x3bca7a(0x3ac,0x3c8)]??undefined,'chunkIndex':_0x28bc69[_0x647864(0x41a,0x400)+'x']??undefined,'chunkTotal':_0x28bc69[_0x647864(0x3f0,0x40a)+'l']??undefined,'qualityScore':_0x28bc69[_0x647864(0x3e1,0x3e7)+_0x3bca7a(0x3c0,0x3d3)]??undefined});_0x28bc69[_0x3bca7a(0x3fc,0x3d8)+'nt']&&_0x28bc69[_0x3bca7a(0x3af,0x3d8)+'nt']>0x0&&this['db'][_0x647864(0x3ef,0x3cd)+_0x3bca7a(0x3da,0x3f3)](_0x9e8f66['id'],_0x28bc69[_0x3bca7a(0x3af,0x3d8)+'nt']),_0x28bc69[_0x647864(0x404,0x3fa)]&&_0x28bc69[_0x3bca7a(0x3da,0x3f4)][_0x3bca7a(0x3c8,0x3f1)]>0x0&&this['db'][_0x3bca7a(0x3f7,0x3f6)+'ing'](_0x9e8f66['id'],_0x28bc69[_0x647864(0x404,0x3e8)]),this['db'][_0x3bca7a(0x41d,0x400)+'tus'](_0x9e8f66['id'],_0x28bc69['id'],_0x3bca7a(0x3f2,0x3dc)),_0x593d74[_0x647864(0x415,0x419)]++;}else{const _0x6f723e=new Date(_0x28bc69[_0x647864(0x3f5,0x3d7)]),_0x4e7952=new Date(_0x26abcd[_0x647864(0x3d0,0x3d8)]);_0x6f723e>_0x4e7952&&(this['db'][_0x647864(0x40e,0x422)+'ry'](_0x26abcd['id'],{'content':_0x28bc69['content'],'category':mapCategory(_0x28bc69[_0x647864(0x3fe,0x3de)]),'tier':mapTier(_0x28bc69[_0x647864(0x3de,0x3d5)]??_0x26abcd[_0x3bca7a(0x3c0,0x3ce)]),'tags':_0x28bc69['tags']??_0x26abcd[_0x647864(0x3df,0x3dc)],'qualityScore':_0x28bc69[_0x3bca7a(0x3b7,0x3d1)+_0x3bca7a(0x3d8,0x3d3)]??undefined}),_0x28bc69[_0x3bca7a(0x3ec,0x3d8)+'nt']!==undefined&&this['db']['mergeAcces'+_0x647864(0x403,0x401)](_0x26abcd['id'],_0x28bc69[_0x3bca7a(0x3c5,0x3d8)+'nt']),_0x28bc69[_0x3bca7a(0x40f,0x3f4)]&&_0x28bc69[_0x647864(0x404,0x3da)][_0x3bca7a(0x410,0x3f1)]>0x0&&this['db']['saveEmbedd'+'ing'](_0x26abcd['id'],_0x28bc69[_0x647864(0x404,0x404)]),this['db'][_0x647864(0x410,0x3f1)+_0x3bca7a(0x400,0x40b)](_0x26abcd['id'],_0x28bc69['id'],'synced'),_0x593d74['conflicts']++);}}catch(_0x4a11f3){_0x4a11f3 instanceof Error&&_0x593d74[_0x647864(0x400,0x427)][_0x3bca7a(0x3f0,0x3f7)](_0x647864(0x3dd,0x3eb)+_0x28bc69['id']+_0x3bca7a(0x3f1,0x40c)+_0x4a11f3['message']);}}_0x47b8e8[_0x3bca7a(0x3de,0x3f1)]<DEFAULT_PAGE_SIZE?_0x647864(0x3e9,0x3d1)===_0x647864(0x3d7,0x3cf)?this['db']['saveEmbedd'+_0x647864(0x40f,0x3fc)](_0x15f90b['id'],_0x331604[_0x3bca7a(0x400,0x3f4)]):_0x4f454c=![]:_0x41c9ea+=DEFAULT_PAGE_SIZE;}this['recordSucc'+_0x647864(0x3ff,0x3fc)]();}catch(_0x43a66f){this['recordFail'+'ure'](),_0x43a66f instanceof Error&&(_0x3bca7a(0x405,0x3e2)===_0x3bca7a(0x408,0x3e2)?_0x593d74[_0x3bca7a(0x3dc,0x3f0)][_0x3bca7a(0x3f8,0x3f7)](_0x43a66f[_0x647864(0x405,0x40c)]):_0x580f72 instanceof _0x377c80&&_0x552011['errors'][_0x647864(0x407,0x3f9)](_0x37c206[_0x647864(0x405,0x408)]));}function _0x647864(_0x57d3df,_0x54a2ec){return _0x307d3c(_0x54a2ec,_0x57d3df-0x43f);}return _0x593d74[_0x3bca7a(0x3f0,0x3da)]=Date[_0x3bca7a(0x3e7,0x408)]()-_0x411f61,_0x593d74;}async['getStatus'](){function _0x3aa113(_0x138aa4,_0x13314e){return _0x553eec(_0x138aa4,_0x13314e- -0x3e);}const _0x53db7e=this['queue'][_0x1d1863(-0x15d,-0x179)+_0x3aa113(0x21c,0x1f4)]();let _0x33235b=0x0;function _0x1d1863(_0x4d6066,_0x224ff0){return _0x553eec(_0x224ff0,_0x4d6066- -0x357);}try{const _0x308f2e=await this[_0x3aa113(0x1d7,0x1cb)][_0x3aa113(0x1b7,0x1ce)+'es']({'limit':0x2710}),_0x1d864d=this['db'][_0x3aa113(0x1d6,0x1df)+_0x1d1863(-0x166,-0x17b)]();_0x33235b=Math['max'](0x0,_0x308f2e[_0x3aa113(0x1c3,0x1d8)]-_0x1d864d);}catch{}const _0x11c31b=this['db'][_0x3aa113(0x1cc,0x1bd)+_0x1d1863(-0x15e,-0x17e)]();return{'pendingPush':_0x53db7e,'pendingPull':_0x33235b,'lastSyncedAt':_0x11c31b??undefined};}}
|
|
1
|
+
(function(_0x446fb3,_0x19d18b){function _0x424835(_0x589a74,_0x55ab23){return _0x38e5(_0x589a74- -0x327,_0x55ab23);}const _0xf1a2f1=_0x446fb3();function _0x351b56(_0x250e79,_0x4a53cf){return _0x38e5(_0x250e79-0x1da,_0x4a53cf);}while(!![]){try{const _0x15d8a9=parseInt(_0x351b56(0x34e,0x344))/0x1+-parseInt(_0x424835(-0x191,-0x1a0))/0x2+-parseInt(_0x424835(-0x199,-0x1c4))/0x3+parseInt(_0x351b56(0x35e,0x354))/0x4*(-parseInt(_0x351b56(0x354,0x32b))/0x5)+parseInt(_0x351b56(0x36f,0x351))/0x6*(parseInt(_0x351b56(0x36a,0x351))/0x7)+parseInt(_0x351b56(0x353,0x35d))/0x8+parseInt(_0x424835(-0x19b,-0x1bd))/0x9;if(_0x15d8a9===_0x19d18b)break;else _0xf1a2f1['push'](_0xf1a2f1['shift']());}catch(_0x5710da){_0xf1a2f1['push'](_0xf1a2f1['shift']());}}}(_0x19b3,0xc15a9));import{SyncQueue,mapCategory,mapTier}from'./queue.js';function _0x158a3a(_0x420871,_0x5a7c86){return _0x38e5(_0x420871-0x21c,_0x5a7c86);}import{TeamSynchronizer}from'./team-synchronizer.js';const DEFAULT_PAGE_SIZE=0x64;function _0x19b3(){const _0x52fd32=['BgvUz3rO','C29YDa','C3LUy2vK','odq2ntG4mfbOyM1wAa','ndi1mhvqAwX1vq','EML2vui','C3LUy0XVy2fS','zxnZ','Bwf4','Dg9Uzxm','CMvJB3jKu3vJyW','zhvYyxrPB24','z2v0tgfZDfn5BG','CxvHBgL0Ev9ZyW','mJHsywP5qNG','io2sGcdSI6tTJkG6ia','BM9KzuLK','Bwf4rMfPBhvYzq','y2H1BMTFAw5Kzq','DxbKyxrLzf9HDa','ruXXyNa','zw1IzwrKAw5N','mJa3ndm3ndbbAxDiqvq','BwvZC2fNzq','mZG3otq0n1fKtw5ZDq','v2zPzuW','mtiXmJCWohrjvLvSwG','zwfRzxiGB3bLBG','AxndAxjJDwL0tW','DxjL','DgfNCW','nMHxvezbAa','mZaYntK1ngzNtvfLDa','DhvZ','DgLTzw91De1Z','q291BNq','oIb0B28GBwfUEq','z2v0u3LUy2vKtq','C2v0u3LUy1n0yq','zuf0','y29VBgrVD25nCW','zMfPBhvYzxm','y2XPzw50','y2H1BMTFDg90yq','DgvHBvbHDgG','vMP0DeG','y3jQueO','z2v0u3rHDhvZ','BgLZDe1LBw9YAq','ww12u1C','zgvSzxrLza','y29UDgvUDa','ChvZAgvK','66Mu66QO66ASia','DxbKyxrLtwvTBW','CxvLDwu','y29UzMXPy3rZ','ignVBNnLy3v0Aq','B3jL','y2f0zwDVCNK','ChvSBa','zLHcC20','CgvU','DMuGzMfPBhvYzq','C0nVDw50','ChvZAa','y3jLyxrLtwvTBW','y2vKqxq','rwr1Ehq','C2f2zuvTyMvKza','C3LUy0rLBhrH','ChvSBgvK','zxbPC29KAwm','qNLszw1VDgvjza','Ew5fwNy','zxjYB3jZ','BwvYz2vby2nLCW','BgfZDezHAwX1CG','Aw5N','q2LYy3vPDcbICG','ywnJzxnZx2nVDq','wg5nquq','DgLLCG','CMvJB3jKrMfPBa','DeH0Dwy','D2XhsvC','BM93','EMXfyNC','CgfYzw50x2LK','nJC3mtrjDwvuwuu','DxbKyxrLzef0'];_0x19b3=function(){return _0x52fd32;};return _0x19b3();}function _0x38e5(_0x365597,_0x31f4a0){_0x365597=_0x365597-0x16c;const _0x19b32d=_0x19b3();let _0x38e547=_0x19b32d[_0x365597];if(_0x38e5['DkVAvD']===undefined){var _0x572f23=function(_0x50328a){const _0x5d5699='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2b9793='',_0x26dd0a='';for(let _0x3f61ba=0x0,_0x30eb91,_0x33f57a,_0x30b44d=0x0;_0x33f57a=_0x50328a['charAt'](_0x30b44d++);~_0x33f57a&&(_0x30eb91=_0x3f61ba%0x4?_0x30eb91*0x40+_0x33f57a:_0x33f57a,_0x3f61ba++%0x4)?_0x2b9793+=String['fromCharCode'](0xff&_0x30eb91>>(-0x2*_0x3f61ba&0x6)):0x0){_0x33f57a=_0x5d5699['indexOf'](_0x33f57a);}for(let _0x5083ed=0x0,_0x208982=_0x2b9793['length'];_0x5083ed<_0x208982;_0x5083ed++){_0x26dd0a+='%'+('00'+_0x2b9793['charCodeAt'](_0x5083ed)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x26dd0a);};_0x38e5['WmTXoL']=_0x572f23,_0x38e5['ghVptp']={},_0x38e5['DkVAvD']=!![];}const _0x128811=_0x19b32d[0x0],_0x434d75=_0x365597+_0x128811,_0x2595a3=_0x38e5['ghVptp'][_0x434d75];return!_0x2595a3?(_0x38e547=_0x38e5['WmTXoL'](_0x38e547),_0x38e5['ghVptp'][_0x434d75]=_0x38e547):_0x38e547=_0x2595a3,_0x38e547;}function _0x556760(_0x3182a3,_0x5c0bfa){return _0x38e5(_0x3182a3-0x1a,_0x5c0bfa);}export class MemorySynchronizer{['db'];['client'];[_0x556760(0x1bc,0x1e5)];[_0x556760(0x1a0,0x1bb)];[_0x158a3a(0x3c9,0x3f0)];[_0x158a3a(0x3bb,0x3a0)]=0x0;[_0x556760(0x1dd,0x1ca)+'eAt']=0x0;[_0x556760(0x1a1,0x1a7)+'s']=0x3;[_0x556760(0x1b8,0x199)]=0x7530;constructor(_0x5ee7c1,_0x27631c,_0x3f3a1a,_0x130da3){function _0x5753e9(_0xa084c4,_0x5371f8){return _0x158a3a(_0xa084c4- -0x4c2,_0x5371f8);}this['db']=_0x5ee7c1,this[_0x1f017c(0xd,-0x1c)]=_0x27631c,this[_0x1f017c(0xf,0x26)]=_0x3f3a1a;function _0x1f017c(_0x357933,_0x172b8b){return _0x158a3a(_0x357933- -0x3af,_0x172b8b);}this[_0x1f017c(-0xd,0x8)]=_0x130da3,this[_0x1f017c(0x1a,0x1f)]=new SyncQueue(_0x5ee7c1,_0x27631c);}[_0x158a3a(0x3ae,0x3d5)+_0x158a3a(0x3d0,0x3f7)](){function _0x879e1c(_0x171a15,_0x59deeb){return _0x556760(_0x59deeb-0x41,_0x171a15);}function _0x3f0e4f(_0x2dec2a,_0x223bd9){return _0x556760(_0x223bd9-0x22d,_0x2dec2a);}if(this[_0x879e1c(0x1ed,0x1fa)]<this[_0x3f0e4f(0x3f4,0x3ce)+'s'])return![];return Date['now']()-this[_0x3f0e4f(0x3e1,0x40a)+'eAt']<this[_0x3f0e4f(0x3bb,0x3e5)];}['recordSucc'+_0x556760(0x197,0x180)](){this['failures']=0x0;}[_0x158a3a(0x38a,0x37a)+_0x556760(0x1ad,0x19a)](){function _0x58f1e9(_0x4cd345,_0x5a02e3){return _0x556760(_0x4cd345-0x15e,_0x5a02e3);}function _0x2d6e24(_0xdfc02b,_0x178b96){return _0x556760(_0xdfc02b- -0x344,_0x178b96);}this[_0x58f1e9(0x317,0x342)]++,this['lastFailur'+_0x58f1e9(0x315,0x316)]=Date[_0x2d6e24(-0x1b9,-0x1bb)]();}async['sync'](){function _0x40c190(_0x22bdef,_0xf9e1df){return _0x556760(_0xf9e1df- -0xe2,_0x22bdef);}function _0x2477cf(_0x499a40,_0x141e2c){return _0x556760(_0x499a40-0x15e,_0x141e2c);}if(this[_0x2477cf(0x31a,0x345)]&&this[_0x40c190(0xd0,0xbe)]){const _0x4e4314=new TeamSynchronizer(this['db'],this['client'],this['teamPath'],this[_0x40c190(0xce,0xbe)]),_0x55a220=await _0x4e4314[_0x40c190(0xce,0xf4)]();return{'pushed':_0x55a220[_0x2477cf(0x322,0x310)],'pulled':_0x55a220[_0x2477cf(0x335,0x30c)],'conflicts':_0x55a220[_0x2477cf(0x326,0x31c)],'errors':_0x55a220[_0x2477cf(0x339,0x32f)],'duration':_0x55a220[_0x2477cf(0x2f9,0x316)]};}return this[_0x40c190(0xba,0xb4)]();}async[_0x556760(0x196,0x19b)](){const _0x4300cd=Date['now']();function _0x2b8da5(_0x443195,_0x47d366){return _0x556760(_0x47d366-0x18c,_0x443195);}const _0x2cb21a={'pushed':0x0,'pulled':0x0,'conflicts':0x0,'errors':[],'duration':0x0};try{const _0x6a29d3=await this['push']();_0x2cb21a[_0x213b45(-0x123,-0xf8)]=_0x6a29d3[_0x213b45(-0x123,-0x13c)],_0x2cb21a[_0x2b8da5(0x35f,0x367)][_0x213b45(-0x116,-0xed)](..._0x6a29d3[_0x2b8da5(0x36f,0x367)]);const _0x53e3d0=await this[_0x2b8da5(0x330,0x358)]();_0x2cb21a[_0x213b45(-0x110,-0x107)]=_0x53e3d0[_0x213b45(-0x110,-0x129)],_0x2cb21a[_0x2b8da5(0x34a,0x354)]=_0x53e3d0[_0x213b45(-0x11f,-0x13f)],_0x2cb21a['errors'][_0x2b8da5(0x33c,0x35d)](..._0x53e3d0[_0x2b8da5(0x379,0x367)]);}catch(_0x1902b0){_0x2b8da5(0x310,0x312)==='XnMAD'?_0x1902b0 instanceof Error&&_0x2cb21a[_0x213b45(-0x10c,-0x125)][_0x213b45(-0x116,-0x120)](_0x1902b0[_0x213b45(-0x140,-0x127)]):_0x4a193c=![];}function _0x213b45(_0x3cab3b,_0xdda7f5){return _0x556760(_0x3cab3b- -0x2e7,_0xdda7f5);}return _0x2cb21a[_0x213b45(-0x14c,-0x11f)]=Date[_0x213b45(-0x15c,-0x151)]()-_0x4300cd,_0x2cb21a;}async[_0x158a3a(0x3d3,0x3ea)](_0x3d3a5a){if(this[_0x456036(0x139,0x150)+'pen']()){if(_0x93ac06(-0x155,-0x13c)!==_0x456036(0x18a,0x178))return{'pushed':0x0,'pulled':0x0,'conflicts':0x0,'errors':[_0x93ac06(-0x12a,-0x101)+_0x456036(0x151,0x14f)+_0x456036(0x151,0x158)+'\x20consecuti'+_0x93ac06(-0x126,-0x111)+'s'],'duration':0x0};else _0x12f9b3[_0x456036(0x161,0x17f)][_0x456036(0x167,0x175)](_0x93ac06(-0x141,-0x11b)+_0x57e0ea['id']+_0x456036(0x16b,0x143)+_0x132ccd[_0x93ac06(-0x146,-0x139)]);}const _0x58f665=Date[_0x456036(0x150,0x12f)]();function _0x93ac06(_0x3a5eb0,_0x4bf1ec){return _0x158a3a(_0x4bf1ec- -0x4e2,_0x3a5eb0);}function _0x456036(_0x30424d,_0x4c1df1){return _0x158a3a(_0x4c1df1- -0x25e,_0x30424d);}try{const _0x3ac5ac=await this['queue']['flush']({'timeoutMs':_0x3d3a5a?.[_0x93ac06(-0x13f,-0x12e)]}),_0x251054=await this['queue']['flushTombs'+_0x93ac06(-0x13f,-0x147)](),_0x23ec48=[..._0x3ac5ac[_0x456036(0x197,0x17f)],..._0x251054[_0x456036(0x17c,0x17f)]];if(_0x23ec48[_0x456036(0x161,0x134)]>0x0)this[_0x456036(0x149,0x12c)+_0x93ac06(-0x147,-0x133)]();else{if('kQCSz'===_0x93ac06(-0x14a,-0x122)){const _0x4cb945=new _0x5b5778(_0x42f546[_0x456036(0x175,0x147)]),_0x10eb8e=new _0x238e62(_0x5a7b29[_0x456036(0x137,0x133)]);_0x4cb945>_0x10eb8e&&(this['db'][_0x456036(0x158,0x16a)+'ry'](_0x3af84f['id'],{'content':_0x2a35ca['content'],'category':_0x1e3c35(_0xbc6e0b[_0x93ac06(-0x10c,-0x115)]),'tier':_0xaf257(_0x50193f['tier']??_0x550d6a[_0x456036(0x14f,0x12b)]),'tags':_0x1186e5['tags']??_0x4aaa35[_0x93ac06(-0x14a,-0x132)],'qualityScore':_0x34868d[_0x93ac06(-0x11f,-0x143)+'ore']??_0x139d11}),_0x2f5f6a[_0x93ac06(-0x117,-0x100)+'nt']!==_0x19e535&&this['db'][_0x456036(0x1a7,0x180)+_0x93ac06(-0x134,-0x110)](_0x4d2c59['id'],_0x9780e1[_0x93ac06(-0xde,-0x100)+'nt']),_0x55fcba[_0x456036(0x159,0x149)]&&_0xf33369[_0x93ac06(-0x137,-0x13b)][_0x456036(0x13c,0x134)]>0x0&&this['db'][_0x93ac06(-0xe1,-0x10b)+_0x93ac06(-0xf9,-0x102)](_0x206d32['id'],_0x2b8b8d['embedding']),this['db'][_0x93ac06(-0x136,-0x12a)+_0x456036(0x15b,0x155)](_0x4ad5b1['id'],_0x574342['id'],'synced'),_0x116c31[_0x93ac06(-0xed,-0x118)]++);}else this[_0x456036(0x116,0x13e)+'ess']();}return{'pushed':_0x3ac5ac['pushed'],'pulled':_0x251054[_0x93ac06(-0x11d,-0x11e)],'conflicts':0x0,'errors':_0x23ec48,'duration':Date[_0x93ac06(-0x174,-0x155)]()-_0x58f665};}catch(_0x9f95c9){if(_0x456036(0x190,0x171)!==_0x456036(0x19b,0x171))_0x265f44 instanceof _0x391b65&&_0xd427ab[_0x93ac06(-0x100,-0x105)][_0x93ac06(-0xf3,-0x10f)](_0x2339ac[_0x93ac06(-0x11c,-0x139)]);else{this[_0x456036(0x151,0x12c)+_0x456036(0x179,0x151)]();throw _0x9f95c9;}}}async[_0x158a3a(0x3ce,0x3c5)](){if(this[_0x40de69(0x428,0x402)+_0x43ec61(0x23c,0x236)]())return{'pushed':0x0,'pulled':0x0,'conflicts':0x0,'errors':[_0x40de69(0x442,0x435)+_0x40de69(0x3f3,0x401)+_0x40de69(0x3f0,0x40a)+_0x40de69(0x411,0x41f)+'ve\x20failure'+'s'],'duration':0x0};const _0x5f2c6b=Date[_0x40de69(0x3ce,0x3e1)](),_0x1ff85f={'pushed':0x0,'pulled':0x0,'conflicts':0x0,'errors':[],'duration':0x0};function _0x43ec61(_0x4a000a,_0x1dd709){return _0x556760(_0x4a000a-0x6e,_0x1dd709);}try{if(_0x40de69(0x3f7,0x3eb)!==_0x40de69(0x3e7,0x3eb))return{'pushed':0x0,'pulled':0x0,'conflicts':0x0,'errors':[_0x43ec61(0x24d,0x246)+'eaker\x20open'+_0x40de69(0x3f2,0x40a)+_0x43ec61(0x237,0x234)+_0x40de69(0x432,0x425)+'s'],'duration':0x0};else{let _0x475bfd=0x0,_0x37a796=!![];while(_0x37a796){if('Asjfb'==='Asjfb'){const _0x3c023c=await this[_0x40de69(0x3e8,0x410)][_0x43ec61(0x22e,0x244)+'es']({'limit':DEFAULT_PAGE_SIZE,'offset':_0x475bfd,'includeEmbedding':!![]});if(_0x3c023c[_0x43ec61(0x1fe,0x1d7)]===0x0){if('YmvSW'===_0x43ec61(0x22f,0x21e)){_0x37a796=![];break;}else this['db'][_0x40de69(0x42e,0x432)+'sCount'](_0x350517['id'],_0x45e2e9[_0x43ec61(0x24e,0x25c)+'nt']);}_0x3c023c[_0x40de69(0x3cb,0x3e7)]((_0x4c1c79,_0x4d0afa)=>{function _0x4eaedb(_0x23f007,_0xa3ddde){return _0x40de69(_0xa3ddde,_0x23f007- -0x4d4);}const _0x247340=_0x4c1c79[_0x4eaedb(-0xf1,-0x10b)]?0x1:0x0,_0x3aeee2=_0x4d0afa['parent_id']?0x1:0x0;return _0x247340-_0x3aeee2;});for(const _0x51ab05 of _0x3c023c){if('ZAEfQ'!==_0x43ec61(0x1f8,0x21f))try{const _0x11a904=this['db']['findMemory'+_0x43ec61(0x247,0x232)](_0x51ab05['id']);if(!_0x11a904){if(_0x40de69(0x3ef,0x413)===_0x43ec61(0x22b,0x226)){const _0x45e929=this['db'][_0x43ec61(0x240,0x261)+'ry']({'content':_0x51ab05['content'],'category':mapCategory(_0x51ab05['category']),'tier':mapTier(_0x51ab05['tier']??_0x43ec61(0x246,0x251)),'tags':_0x51ab05[_0x43ec61(0x21c,0x212)]??[],'parentId':_0x51ab05[_0x43ec61(0x1fb,0x1e1)]??undefined,'chunkIndex':_0x51ab05[_0x40de69(0x3d8,0x3f8)+'x']??undefined,'chunkTotal':_0x51ab05[_0x40de69(0x3ec,0x411)+'l']??undefined,'qualityScore':_0x51ab05[_0x43ec61(0x20b,0x229)+'ore']??undefined});if(_0x51ab05[_0x43ec61(0x24e,0x25d)+'nt']&&_0x51ab05[_0x43ec61(0x24e,0x255)+'nt']>0x0){if('KdcjT'!==_0x43ec61(0x248,0x24b))this['db'][_0x43ec61(0x24a,0x24e)+_0x43ec61(0x23e,0x247)](_0x45e929['id'],_0x51ab05['access_cou'+'nt']);else return{'pushed':0x0,'pulled':0x0,'conflicts':0x0,'errors':[_0x40de69(0x408,0x435)+_0x40de69(0x3d4,0x401)+_0x43ec61(0x222,0x21a)+'\x20consecuti'+_0x43ec61(0x23d,0x219)+'s'],'duration':0x0};}_0x51ab05['embedding']&&_0x51ab05[_0x40de69(0x3d0,0x3fb)]['length']>0x0&&this['db'][_0x43ec61(0x243,0x21d)+_0x40de69(0x453,0x434)](_0x45e929['id'],_0x51ab05['embedding']),this['db'][_0x40de69(0x3f1,0x40c)+_0x43ec61(0x21f,0x235)](_0x45e929['id'],_0x51ab05['id'],_0x43ec61(0x200,0x1d5)),_0x1ff85f[_0x43ec61(0x245,0x227)]++;}else this['failures']++,this['lastFailur'+_0x43ec61(0x225,0x235)]=_0x5e0631[_0x43ec61(0x1f9,0x1e6)]();}else{const _0x5b6ec1=new Date(_0x51ab05[_0x43ec61(0x211,0x220)]),_0x4af1f1=new Date(_0x11a904['updatedAt']);_0x5b6ec1>_0x4af1f1&&(this['db'][_0x43ec61(0x234,0x227)+'ry'](_0x11a904['id'],{'content':_0x51ab05[_0x43ec61(0x231,0x249)],'category':mapCategory(_0x51ab05[_0x40de69(0x43a,0x421)]),'tier':mapTier(_0x51ab05[_0x40de69(0x3db,0x3dd)]??_0x11a904['tier']),'tags':_0x51ab05[_0x40de69(0x42c,0x404)]??_0x11a904['tags'],'qualityScore':_0x51ab05[_0x43ec61(0x20b,0x21a)+_0x43ec61(0x238,0x260)]??undefined}),_0x51ab05[_0x40de69(0x41a,0x436)+'nt']!==undefined&&(_0x43ec61(0x217,0x204)!==_0x43ec61(0x1fa,0x1f8)?this['db'][_0x40de69(0x440,0x432)+_0x40de69(0x41d,0x426)](_0x11a904['id'],_0x51ab05[_0x43ec61(0x24e,0x27b)+'nt']):(this[_0x43ec61(0x1f6,0x210)+'ure'](),_0x3b1de2 instanceof _0x320501&&_0x30dd84['errors'][_0x43ec61(0x23f,0x220)](_0x55e90e[_0x43ec61(0x215,0x219)]))),_0x51ab05[_0x40de69(0x3fe,0x3fb)]&&_0x51ab05[_0x43ec61(0x213,0x220)][_0x43ec61(0x1fe,0x1f8)]>0x0&&this['db'][_0x43ec61(0x243,0x243)+_0x40de69(0x414,0x434)](_0x11a904['id'],_0x51ab05[_0x43ec61(0x213,0x23c)]),this['db'][_0x43ec61(0x224,0x213)+'tus'](_0x11a904['id'],_0x51ab05['id'],'synced'),_0x1ff85f[_0x40de69(0x42c,0x41e)]++);}}catch(_0x5ea3f3){_0x5ea3f3 instanceof Error&&_0x1ff85f[_0x40de69(0x45b,0x431)][_0x43ec61(0x23f,0x213)](_0x43ec61(0x233,0x217)+_0x51ab05['id']+_0x40de69(0x3c8,0x3f5)+_0x5ea3f3[_0x40de69(0x3f2,0x3fd)]);}else _0x59571d[_0x43ec61(0x249,0x23d)][_0x40de69(0x43e,0x427)](_0x380b64[_0x40de69(0x3e2,0x3fd)]);}_0x3c023c[_0x43ec61(0x1fe,0x1ff)]<DEFAULT_PAGE_SIZE?_0x37a796=![]:_0x475bfd+=DEFAULT_PAGE_SIZE;}else{const _0x43adbc=this['db']['createMemo'+'ry']({'content':_0x3f18e2['content'],'category':_0x9d6029(_0x8bebc[_0x40de69(0x43e,0x421)]),'tier':_0x52c950(_0xdf2cf8[_0x40de69(0x3ba,0x3dd)]??_0x40de69(0x424,0x42e)),'tags':_0x7ae89e[_0x43ec61(0x21c,0x236)]??[],'parentId':_0x5920d7[_0x40de69(0x3c7,0x3e3)]??_0x5e3630,'chunkIndex':_0x574ad0[_0x40de69(0x408,0x3f8)+'x']??_0x2d20e6,'chunkTotal':_0x5b0732[_0x40de69(0x40b,0x411)+'l']??_0x509b22,'qualityScore':_0x1bfd81['quality_sc'+'ore']??_0x8f432d});_0xc5bfa5[_0x40de69(0x422,0x436)+'nt']&&_0x4bfe02[_0x40de69(0x40f,0x436)+'nt']>0x0&&this['db']['mergeAcces'+_0x40de69(0x451,0x426)](_0x43adbc['id'],_0x87f0b6['access_cou'+'nt']),_0x16cfa3[_0x40de69(0x411,0x3fb)]&&_0x2c70d6['embedding']['length']>0x0&&this['db'][_0x40de69(0x450,0x42b)+'ing'](_0x43adbc['id'],_0x90f13f[_0x43ec61(0x213,0x1f5)]),this['db'][_0x43ec61(0x224,0x226)+'tus'](_0x43adbc['id'],_0x587053['id'],_0x43ec61(0x200,0x207)),_0x2862cb['pulled']++;}}this[_0x40de69(0x3ec,0x3f0)+'ess']();}}catch(_0x180346){this[_0x43ec61(0x1f6,0x221)+_0x40de69(0x3e3,0x403)](),_0x180346 instanceof Error&&('tHtuf'===_0x40de69(0x3e4,0x3df)?_0x1ff85f[_0x40de69(0x43d,0x431)]['push'](_0x180346[_0x43ec61(0x215,0x1e8)]):(this['db']=_0x208982,this[_0x43ec61(0x228,0x203)]=_0x1b8a69,this['teamPath']=_0x3002fe,this[_0x40de69(0x3dd,0x3f6)]=_0x5c6bed,this[_0x40de69(0x419,0x41d)]=new _0x52ad76(_0x1189f3,_0x2e5ab2)));}_0x1ff85f[_0x43ec61(0x209,0x1ec)]=Date[_0x40de69(0x3c8,0x3e1)]()-_0x5f2c6b;function _0x40de69(_0x447b5a,_0x200a75){return _0x556760(_0x200a75-0x256,_0x447b5a);}return _0x1ff85f;}async[_0x556760(0x1bf,0x1db)](){function _0x396072(_0x293c6b,_0x5c9f25){return _0x158a3a(_0x293c6b-0x14b,_0x5c9f25);}function _0x4c72d9(_0x562002,_0x275d56){return _0x158a3a(_0x562002- -0x10e,_0x275d56);}const _0x313c19=this[_0x396072(0x514,0x537)]['getPending'+_0x4c72d9(0x2a7,0x283)]();let _0x433949=0x0;try{const _0x2fafbe=await this[_0x396072(0x507,0x4f1)][_0x396072(0x50d,0x4f4)+'es']({'limit':0x2710}),_0x5b3649=this['db'][_0x396072(0x502,0x50a)+'emoryCount']();_0x433949=Math[_0x4c72d9(0x28c,0x2a8)](0x0,_0x2fafbe[_0x4c72d9(0x284,0x2ae)]-_0x5b3649);}catch{}const _0x47f5f0=this['db'][_0x4c72d9(0x290,0x277)+_0x396072(0x520,0x520)]();return{'pendingPush':_0x313c19,'pendingPull':_0x433949,'lastSyncedAt':_0x47f5f0??undefined};}}
|