const _0x2eed1f=_0x91bf;(function(_0x53e8fb,_0x57de97){const _0x4490c1=_0x91bf,_0x4c5056=_0x53e8fb();while(!![]){try{const _0x57bc76=parseInt(_0x4490c1(0x159))/0x1*(-parseInt(_0x4490c1(0x269))/0x2)+-parseInt(_0x4490c1(0x92))/0x3*(parseInt(_0x4490c1(0x1dd))/0x4)+parseInt(_0x4490c1(0x1c8))/0x5*(parseInt(_0x4490c1(0x247))/0x6)+parseInt(_0x4490c1(0x7e))/0x7+-parseInt(_0x4490c1(0x195))/0x8+-parseInt(_0x4490c1(0x26d))/0x9+-parseInt(_0x4490c1(0x25b))/0xa*(-parseInt(_0x4490c1(0x1a5))/0xb);if(_0x57bc76===_0x57de97)break;else _0x4c5056['push'](_0x4c5056['shift']());}catch(_0x2fc4d8){_0x4c5056['push'](_0x4c5056['shift']());}}}(_0x21f4,0x43cce));import{getContext}from'/scripts/extensions.js';import*as _0x222c37 from'../core/rag-processor.js';import*as _0x9d7bfc from'../core/historiographer.js';import*as _0x27cc29 from'../core/utils/context-utils.js';import*as _0x263e19 from'../core/ingestion-manager.js';import{showContentModal,showHtmlModal}from'./page-window.js';import{extractBlocksByTags,applyExclusionRules}from'../core/utils/rag-tag-extractor.js';import{filterWorldbooks,filterWorldbookEntries,highlightSearchMatch,debounce}from'../core/rag-processor.js';_0x2eed1f(0x17c);function setupGlobalEventHandlers(){const _0xdb1182=_0x2eed1f;window[_0xdb1182(0x104)]=()=>saveSettingsFromUI(![]),window[_0xdb1182(0x134)]=resetSettingsToUI,window[_0xdb1182(0x170)]=testApi,window[_0xdb1182(0x1f0)]=fetchHLYEmbeddingModels,window[_0xdb1182(0x8c)]=fetchHLYRerankModels,window[_0xdb1182(0x265)]=updatePanelStatus,window[_0xdb1182(0x20c)]=purgeStorage,window[_0xdb1182(0x112)]=startCondensation,window[_0xdb1182(0x194)]=previewCondensation,window[_0xdb1182(0x21a)]=ingestManualText,window[_0xdb1182(0x167)]=log,window[_0xdb1182(0x215)]=showStats,window[_0xdb1182(0x73)]=startHistoriography;}function updateAndSaveSetting(_0x1b367c,_0x16e83b){const _0x56f7ba=_0x2eed1f,_0x8e6d43=_0x222c37[_0x56f7ba(0x1f9)]();if(!_0x8e6d43)return;const _0x37d1ec=_0x1b367c[_0x56f7ba(0x7a)]('.');let _0x3f98cb=_0x8e6d43;for(let _0x3d87c3=0x0;_0x3d87c3<_0x37d1ec[_0x56f7ba(0x1a7)]-0x1;_0x3d87c3++){_0x3f98cb=_0x3f98cb[_0x37d1ec[_0x3d87c3]]=_0x3f98cb[_0x37d1ec[_0x3d87c3]]||{};}_0x3f98cb[_0x37d1ec[_0x37d1ec[_0x56f7ba(0x1a7)]-0x1]]=_0x16e83b,_0x222c37[_0x56f7ba(0x70)](),log(_0x56f7ba(0x225)+_0x1b367c+_0x56f7ba(0x126)+JSON[_0x56f7ba(0xbf)](_0x16e83b),_0x56f7ba(0x249));}function bindAutoSaveEvents(){const _0xcd32c3=_0x2eed1f,_0x49958a=document[_0xcd32c3(0x242)](_0xcd32c3(0x6b));if(!_0x49958a)return;_0x49958a['addEventListener'](_0xcd32c3(0x1ee),_0x32ed26=>{const _0x3f063c=_0xcd32c3,_0x8b449e=_0x32ed26[_0x3f063c(0x18a)],_0x3e4857=_0x8b449e[_0x3f063c(0x13c)]['settingKey'];if(!_0x3e4857)return;let _0x539310;const _0x103817=_0x8b449e[_0x3f063c(0x13c)][_0x3f063c(0x87)]||_0x3f063c(0xf1);if(_0x8b449e[_0x3f063c(0x87)]==='checkbox')_0x539310=_0x8b449e[_0x3f063c(0x13e)];else{if(_0x8b449e[_0x3f063c(0x87)]===_0x3f063c(0x11b)){if(_0x8b449e[_0x3f063c(0x13e)]){const _0x35e330=_0x49958a[_0x3f063c(0x25d)](_0x3f063c(0xe8)+_0x8b449e['name']+'\x22]'),_0x4b1902=Array[_0x3f063c(0xc0)](_0x35e330)['find'](_0x24de98=>_0x24de98['checked']);_0x539310=_0x4b1902[_0x3f063c(0x15e)];}else return;}else _0x539310=_0x8b449e['value'];}switch(_0x103817){case _0x3f063c(0x132):_0x539310=parseInt(_0x539310,0xa);break;case _0x3f063c(0x19d):_0x539310=parseFloat(_0x539310);break;case _0x3f063c(0x21f):typeof _0x539310!==_0x3f063c(0x21f)&&(_0x539310=_0x539310===_0x3f063c(0x163));break;}if(_0x8b449e[_0x3f063c(0x87)]===_0x3f063c(0x11b)&&!_0x8b449e[_0x3f063c(0x13e)])return;updateAndSaveSetting(_0x3e4857,_0x539310);});}export function bindHanlinyuanEvents(){const _0x59a90f=_0x2eed1f,_0x32ca7a=getContext();if(!_0x32ca7a){console[_0x59a90f(0xf4)]('[翰林院-枢纽]\x20未能获取SillyTavern上下文,绑定失败。');return;}setupGlobalEventHandlers(),bindPanelToggleEvents(),bindInternalUIEvents(),bindTutorialEvents(),bindAutoSaveEvents(),bindSessionLockEvent(),initializeUnifiedInjectionEditor();if(_0x222c37['initialize'])_0x222c37[_0x59a90f(0x1c9)]();else{console[_0x59a90f(0xf4)](_0x59a90f(0x16a));return;}loadSettingsToUI(),loadWorldbookList(),log(_0x59a90f(0x17a),_0x59a90f(0x1a4));const _0x2a2d9d=document['getElementById'](_0x59a90f(0x1e6)),_0x4bffe6=document[_0x59a90f(0x242)]('hanlinyuan-ingest-novel-file-name'),_0x550855=document[_0x59a90f(0x242)]('hanlinyuan-ingest-novel-start'),_0x1610ac=document[_0x59a90f(0x242)](_0x59a90f(0xa4)),_0xb0e167=document[_0x59a90f(0x242)]('hanlinyuan-ingest-progress-container'),_0x30f0bb=document['getElementById'](_0x59a90f(0x7d)),_0x9136d7=document[_0x59a90f(0x242)]('hanlinyuan-ingest-status'),_0x1adcca=document[_0x59a90f(0x242)](_0x59a90f(0x106));let _0x1340b0=null,_0x16b666=null;_0x2a2d9d[_0x59a90f(0x1cd)](_0x59a90f(0x1ee),_0x488348=>{const _0x2e9fa2=_0x59a90f;_0x1340b0=_0x488348['target'][_0x2e9fa2(0x260)][0x0],_0x1340b0?(_0x4bffe6[_0x2e9fa2(0x153)]=_0x1340b0[_0x2e9fa2(0x113)],_0x4bffe6['title']=_0x1340b0[_0x2e9fa2(0x113)]):_0x4bffe6[_0x2e9fa2(0x153)]=_0x2e9fa2(0x89);}),_0x550855[_0x59a90f(0x1cd)]('click',async()=>{const _0x36f58a=_0x59a90f;if(!_0x1340b0){toastr[_0x36f58a(0x17d)]('请先选择一个\x20.txt\x20文件');return;}let _0x43a77b=0x0;const _0x154e1e=_0x263e19[_0x36f58a(0x173)](_0x1340b0),_0xf8ff23=_0x263e19[_0x36f58a(0x1d0)](_0x154e1e);if(_0xf8ff23){const _0x31fabe=(_0xf8ff23['processedChunks']/_0xf8ff23[_0x36f58a(0x22f)]*0x64)['toFixed'](0x1),_0x40b90f=confirm('启禀大人,发现此书上次录入已完成\x20'+_0x31fabe+_0x36f58a(0x14e));_0x40b90f?(_0x43a77b=_0xf8ff23[_0x36f58a(0x10b)],toastr['info'](_0x36f58a(0x145)+(_0x43a77b+0x1)+'\x20块继续录入。',_0x36f58a(0x23f)),log(_0x36f58a(0xe5)+_0x154e1e+_0x36f58a(0xa8)+_0x43a77b+_0x36f58a(0x230),_0x36f58a(0x1a4))):(_0x263e19[_0x36f58a(0xc1)](_0x154e1e),toastr[_0x36f58a(0x1a4)](_0x36f58a(0x216),_0x36f58a(0x23f)),log('[断点续传]\x20用户选择放弃旧任务\x20'+_0x154e1e+_0x36f58a(0x9e),_0x36f58a(0x205)));}_0x16b666=new AbortController();const _0x5f4fee=_0x16b666['signal'];_0x1adcca[_0x36f58a(0x191)][_0x36f58a(0x1e1)]=_0x36f58a(0xc7),_0xb0e167[_0x36f58a(0x191)]['display']=_0x36f58a(0x1a1),_0x9136d7['textContent']=_0x36f58a(0x12e),_0x30f0bb[_0x36f58a(0x15e)]=0x0;try{const _0x1ba543=await _0x1340b0['text'](),_0x395440=_0x4fd023=>{const _0x8735a4=_0x36f58a;_0x9136d7['textContent']=_0x8735a4(0x136)+_0x4fd023[_0x8735a4(0x13f)]+'\x20('+_0x4fd023[_0x8735a4(0xaf)]+'/'+_0x4fd023[_0x8735a4(0xbe)]+')',_0x30f0bb['value']=_0x4fd023['processed']/_0x4fd023[_0x8735a4(0xbe)]*0x64;},_0x56bae3=()=>{updatePanelStatus(),log('[实时刷新]\x20批次完成,忆识总数已更新。','info');},_0x34fc08=await _0x222c37['ingestTextToHanlinyuan'](_0x1ba543,_0x36f58a(0x1bc),{'sourceName':_0x1340b0['name']},_0x395440,_0x5f4fee,log,_0x56bae3,_0x154e1e,_0x43a77b);if(_0x34fc08[_0x36f58a(0x249)])toastr['success'](_0x36f58a(0xfc)+_0x34fc08[_0x36f58a(0x165)]+_0x36f58a(0x189)),_0x9136d7[_0x36f58a(0x153)]=_0x36f58a(0x97)+_0x34fc08[_0x36f58a(0x165)]+_0x36f58a(0x1e5),_0x30f0bb[_0x36f58a(0x15e)]=0x64,updatePanelStatus();else throw new Error(_0x34fc08['error']||_0x36f58a(0xc6));}catch(_0x52a0d5){_0x52a0d5['name']===_0x36f58a(0x21b)?(toastr[_0x36f58a(0x1a4)](_0x36f58a(0x7c)),_0x9136d7[_0x36f58a(0x153)]='任务已中止。'):(toastr['error'](_0x36f58a(0x141)+_0x52a0d5['message']+_0x36f58a(0x1ce)),_0x9136d7[_0x36f58a(0x153)]=_0x36f58a(0x188)+_0x52a0d5[_0x36f58a(0x13f)]);}finally{setTimeout(()=>{const _0xb1254b=_0x36f58a;_0x1adcca[_0xb1254b(0x191)][_0xb1254b(0x1e1)]=_0xb1254b(0x185),_0xb0e167['style'][_0xb1254b(0x1e1)]=_0xb1254b(0xc7),_0x2a2d9d[_0xb1254b(0x15e)]='',_0x1340b0=null,_0x4bffe6[_0xb1254b(0x153)]=_0xb1254b(0x89);},0xbb8);}}),_0x1610ac['addEventListener'](_0x59a90f(0x217),()=>{const _0x1a3f0a=_0x59a90f;_0x16b666&&_0x16b666[_0x1a3f0a(0x13b)]();});}function bindSessionLockEvent(){const _0xe8aae0=_0x2eed1f,_0x488ccd=document[_0xe8aae0(0x242)](_0xe8aae0(0x84));if(!_0x488ccd)return;_0x488ccd[_0xe8aae0(0x1cd)]('click',async()=>{const _0x37dcc3=_0xe8aae0,_0x12a74e=await _0x222c37[_0x37dcc3(0xc2)]();updateSessionLockUI(_0x12a74e);if(_0x12a74e){const _0xf397f6=_0x222c37[_0x37dcc3(0x152)]();_0xf397f6&&(toastr[_0x37dcc3(0x249)](_0x37dcc3(0x150)+_0xf397f6['id'],_0x37dcc3(0xa7)),log('会话已锁定到宝库:\x20'+_0xf397f6['id'],_0x37dcc3(0x249)));}else toastr['info'](_0x37dcc3(0x8d),'诏曰'),log(_0x37dcc3(0x183),_0x37dcc3(0x1a4));updatePanelStatus();}),updateSessionLockUI(_0x222c37[_0xe8aae0(0x250)]());}function updateSessionLockUI(_0x547abd){const _0x33342f=_0x2eed1f,_0x3b74fd=document[_0x33342f(0x242)](_0x33342f(0x84));if(!_0x3b74fd)return;const _0x294209=_0x3b74fd[_0x33342f(0x1dc)]('i'),_0x351c88=_0x3b74fd['querySelector'](_0x33342f(0x6d));_0x547abd?(_0x3b74fd[_0x33342f(0x22b)][_0x33342f(0xe7)]('active'),_0x294209[_0x33342f(0x229)]=_0x33342f(0x7f),_0x351c88[_0x33342f(0x153)]=_0x33342f(0x18e),_0x3b74fd['title']=_0x33342f(0x12a)):(_0x3b74fd[_0x33342f(0x22b)][_0x33342f(0x24c)](_0x33342f(0x10c)),_0x294209['className']=_0x33342f(0x266),_0x351c88[_0x33342f(0x153)]=_0x33342f(0xb4),_0x3b74fd['title']=_0x33342f(0xa6));}function bindPanelToggleEvents(){const _0x18b8b2=_0x2eed1f,_0x4318f0=document[_0x18b8b2(0x242)](_0x18b8b2(0xfa));if(_0x4318f0){}}function bindTutorialEvents(){const _0x48a130=_0x2eed1f,_0x589c87=document['getElementById'](_0x48a130(0x255));_0x589c87&&_0x589c87['addEventListener'](_0x48a130(0x217),()=>{const _0x1f1757=_0x48a130;showContentModal(_0x1f1757(0x26a),_0x1f1757(0x1be));});}function bindInternalUIEvents(){const _0x18096f=_0x2eed1f,_0x445cc2=document[_0x18096f(0x25d)](_0x18096f(0xa5));_0x445cc2['forEach'](_0x5db251=>{const _0xf1cdde=_0x18096f;_0x5db251[_0xf1cdde(0x1cd)]('click',()=>{const _0x15246a=_0xf1cdde,_0x4a5911=_0x5db251['dataset'][_0x15246a(0x16e)],_0x409543='hly-'+_0x4a5911+_0x15246a(0x227);document[_0x15246a(0x25d)]('.hly-tab-pane')[_0x15246a(0x1d2)](_0x4257ec=>{const _0x36ff74=_0x15246a;_0x4257ec[_0x36ff74(0x22b)][_0x36ff74(0x1a6)](_0x36ff74(0x10c),_0x4257ec['id']===_0x409543);}),_0x445cc2[_0x15246a(0x1d2)](_0x4d6c8f=>_0x4d6c8f[_0x15246a(0x22b)][_0x15246a(0x1a6)]('active',_0x4d6c8f===_0x5db251));});});const _0x1f81d1=document[_0x18096f(0x242)]('hly-api-endpoint');_0x1f81d1&&_0x1f81d1[_0x18096f(0x1cd)]('change',handleApiModeChange);const _0x4908fd=document[_0x18096f(0x242)](_0x18096f(0xeb)),_0x156dd5=document['getElementById']('hly-tag-input-container');_0x4908fd&&_0x156dd5&&_0x4908fd[_0x18096f(0x1cd)](_0x18096f(0x1ee),()=>{const _0x53a294=_0x18096f;_0x156dd5[_0x53a294(0x191)]['display']=_0x4908fd['checked']?'block':_0x53a294(0xc7);});const _0x174d36=document[_0x18096f(0x242)](_0x18096f(0x23b));_0x174d36&&_0x174d36[_0x18096f(0x1cd)](_0x18096f(0x1ee),handleWorldbookSelectionChange);const _0x2169a5=document[_0x18096f(0x242)]('hly-exclusion-rules-btn');_0x2169a5&&_0x2169a5[_0x18096f(0x1cd)]('click',showExclusionRulesModal);const _0x59cf21=document[_0x18096f(0x242)]('hly-hist-entry-multiselect-btn'),_0x73b81a=document[_0x18096f(0x242)](_0x18096f(0x1ef));_0x59cf21&&_0x73b81a&&(_0x59cf21['addEventListener'](_0x18096f(0x217),_0x76ea7b=>{const _0x4df355=_0x18096f;_0x76ea7b[_0x4df355(0x76)]();const _0x4ee04b=_0x73b81a[_0x4df355(0x191)]['display']===_0x4df355(0x1a1);_0x73b81a[_0x4df355(0x191)][_0x4df355(0x1e1)]=_0x4ee04b?'none':_0x4df355(0x1a1);}),_0x73b81a[_0x18096f(0x1cd)]('change',_0x184f6e=>{const _0x4f33c2=_0x18096f,_0x34c041=_0x184f6e[_0x4f33c2(0x18a)];if(_0x34c041[_0x4f33c2(0x87)]!==_0x4f33c2(0x1fc))return;const _0x1ecec7=_0x73b81a[_0x4f33c2(0x25d)](_0x4f33c2(0x231)),_0x2afb8c=document[_0x4f33c2(0x242)](_0x4f33c2(0x100));if(_0x34c041['id']===_0x4f33c2(0x100))_0x1ecec7[_0x4f33c2(0x1d2)](_0x138b3b=>_0x138b3b['checked']=_0x34c041['checked']);else{const _0x3d30f1=Array[_0x4f33c2(0xc0)](_0x1ecec7)['every'](_0x3198f4=>_0x3198f4[_0x4f33c2(0x13e)]);_0x2afb8c[_0x4f33c2(0x13e)]=_0x3d30f1;}const _0x10cecf=_0x73b81a[_0x4f33c2(0x25d)](_0x4f33c2(0x21e))['length'],_0x505e92=_0x1ecec7[_0x4f33c2(0x1a7)];_0x59cf21[_0x4f33c2(0x1dc)](_0x4f33c2(0x6d))['textContent']=_0x4f33c2(0x1ec)+_0x10cecf+'\x20/\x20'+_0x505e92+_0x4f33c2(0x15b);}),document['addEventListener']('click',_0x46231e=>{const _0x428f68=_0x18096f;!_0x59cf21[_0x428f68(0x26c)](_0x46231e['target'])&&!_0x73b81a[_0x428f68(0x26c)](_0x46231e[_0x428f68(0x18a)])&&(_0x73b81a[_0x428f68(0x191)][_0x428f68(0x1e1)]=_0x428f68(0xc7));}));const _0xf710ed=document['getElementById'](_0x18096f(0x124));_0xf710ed&&_0xf710ed['addEventListener']('click',deleteAllLocalKnowledgeBases);const _0x111206=document['getElementById'](_0x18096f(0x1ff));_0x111206&&_0x111206['addEventListener'](_0x18096f(0x217),()=>moveAllKnowledgeBases(_0x18096f(0x1c3)));const _0x3c038f=document['getElementById'](_0x18096f(0x1ad));_0x3c038f&&_0x3c038f['addEventListener'](_0x18096f(0x217),()=>moveAllKnowledgeBases(_0x18096f(0x224)));const _0x153405=[_0x18096f(0x12c),_0x18096f(0x22c)];_0x153405[_0x18096f(0x1d2)](_0x168654=>{const _0x2fe279=_0x18096f,_0x358ca5=document[_0x2fe279(0x242)](_0x168654);_0x358ca5&&(_0x358ca5[_0x2fe279(0x1cd)](_0x2fe279(0x217),handleKbAction),_0x358ca5[_0x2fe279(0x1cd)](_0x2fe279(0x1ee),handleKbAction));}),document['getElementById'](_0x18096f(0x223))[_0x18096f(0x1cd)](_0x18096f(0x1ee),_0x450273=>handleSelectAll(_0x450273,_0x18096f(0x118))),document[_0x18096f(0x242)]('hly-kb-select-all-local')['addEventListener'](_0x18096f(0x1ee),_0xcdaa76=>handleSelectAll(_0xcdaa76,_0x18096f(0x1eb))),document['getElementById'](_0x18096f(0x10a))['addEventListener']('click',_0x4be060=>handleBulkAction(_0x4be060,'global')),document[_0x18096f(0x242)](_0x18096f(0x204))[_0x18096f(0x1cd)]('click',_0x443b7b=>handleBulkAction(_0x443b7b,_0x18096f(0x1eb)));}function initializeUnifiedInjectionEditor(){const _0x10f115=_0x2eed1f,_0x228011=document['getElementById'](_0x10f115(0x1c4)),_0x2a5fc7=document[_0x10f115(0x242)]('hly-unified-template-editor'),_0xb43f10=document['getElementById'](_0x10f115(0x235)),_0x256826=document[_0x10f115(0x25d)](_0x10f115(0x23c)),_0x300e7a=document[_0x10f115(0x242)](_0x10f115(0x129)),_0x509a18=document[_0x10f115(0x242)]('hly-unified-injection-role');if(!_0x228011)return;const _0x16a74b={'novel':'{{novel_text}}','chat':_0x10f115(0xa9),'lorebook':'{{lorebook_text}}','manual':_0x10f115(0xa0)};function _0xc77ce4(){const _0x534afa=_0x10f115,_0x35cdf0=_0x228011[_0x534afa(0x15e)],_0xe88796=_0x222c37['getSettings'](),_0x1fb55d=_0xe88796['injection_'+_0x35cdf0]||{};_0x2a5fc7['value']=_0x1fb55d[_0x534afa(0x268)]||'',_0xb43f10[_0x534afa(0x153)]='以\x20'+(_0x16a74b[_0x35cdf0]||_0x534afa(0xb0))+_0x534afa(0x139);const _0x9b2890=_0x1fb55d[_0x534afa(0x117)]!==undefined?String(_0x1fb55d[_0x534afa(0x117)]):'2';_0x256826[_0x534afa(0x1d2)](_0x13105c=>_0x13105c[_0x534afa(0x13e)]=_0x13105c[_0x534afa(0x15e)]===_0x9b2890),_0x300e7a[_0x534afa(0x15e)]=_0x1fb55d[_0x534afa(0x1aa)]||0x0,_0x509a18['value']=_0x1fb55d[_0x534afa(0xde)]!==undefined?String(_0x1fb55d[_0x534afa(0xde)]):'0';const _0x3dfb3a=_0x9b2890==='1';_0x300e7a[_0x534afa(0xd5)]=!_0x3dfb3a,_0x509a18[_0x534afa(0xd5)]=!_0x3dfb3a;}function _0x5f3b6e(){const _0x1c5035=_0x10f115,_0x4429de=_0x228011[_0x1c5035(0x15e)];updateAndSaveSetting('injection_'+_0x4429de+'.template',_0x2a5fc7[_0x1c5035(0x15e)]);const _0x430985=document[_0x1c5035(0x1dc)]('input[name=\x22hly-unified-injection-position\x22]:checked');_0x430985&&updateAndSaveSetting(_0x1c5035(0xdb)+_0x4429de+_0x1c5035(0x251),parseInt(_0x430985[_0x1c5035(0x15e)],0xa)),updateAndSaveSetting(_0x1c5035(0xdb)+_0x4429de+'.depth',parseInt(_0x300e7a[_0x1c5035(0x15e)],0xa)),updateAndSaveSetting(_0x1c5035(0xdb)+_0x4429de+'.depth_role',parseInt(_0x509a18['value'],0xa));}_0x228011[_0x10f115(0x1cd)](_0x10f115(0x1ee),_0xc77ce4);const _0x1a20be=debounce(_0x5f3b6e,0x12c);_0x2a5fc7[_0x10f115(0x1cd)](_0x10f115(0x82),_0x1a20be),_0x300e7a['addEventListener'](_0x10f115(0x1ee),_0x5f3b6e),_0x509a18['addEventListener']('change',_0x5f3b6e),_0x256826[_0x10f115(0x1d2)](_0x596ce7=>_0x596ce7['addEventListener'](_0x10f115(0x1ee),()=>{const _0x5e5de9=_0x10f115;_0x5f3b6e();const _0x21639b=_0x596ce7[_0x5e5de9(0x15e)]==='1'&&_0x596ce7[_0x5e5de9(0x13e)];_0x300e7a[_0x5e5de9(0xd5)]=!_0x21639b,_0x509a18['disabled']=!_0x21639b;})),_0xc77ce4();}function handleApiModeChange(){const _0x32c35e=_0x2eed1f,_0x34362a=document[_0x32c35e(0x242)]('hly-api-endpoint')['value'],_0x159129=document[_0x32c35e(0x242)](_0x32c35e(0x74)),_0x3e9434=document[_0x32c35e(0x242)](_0x32c35e(0xd2)),_0xe3fb22=document[_0x32c35e(0x242)](_0x32c35e(0x81)),_0x2481c1=_0xe3fb22[_0x32c35e(0x218)];if(!_0x159129||!_0x3e9434)return;_0x159129['style'][_0x32c35e(0x1e1)]='block',_0x3e9434[_0x32c35e(0x191)]['display']=_0x32c35e(0x1a1);switch(_0x34362a){case'google_direct':_0x159129[_0x32c35e(0x191)][_0x32c35e(0x1e1)]='none',_0x3e9434[_0x32c35e(0x1dc)](_0x32c35e(0x1df))[_0x32c35e(0x153)]=_0x32c35e(0xe0),_0x3e9434[_0x32c35e(0x1dc)](_0x32c35e(0x82))[_0x32c35e(0x147)]='请输入您的Google\x20API\x20Key';break;case _0x32c35e(0x1bf):_0x159129['querySelector']('label')[_0x32c35e(0x153)]='本地代理地址:',_0x159129[_0x32c35e(0x1dc)](_0x32c35e(0x82))[_0x32c35e(0x147)]='例如\x20http://127.0.0.1:8000/v1',_0x3e9434['style'][_0x32c35e(0x1e1)]=_0x32c35e(0xc7);break;case'custom':default:_0x159129[_0x32c35e(0x1dc)](_0x32c35e(0x1df))['textContent']='自定义路径:',_0x159129[_0x32c35e(0x1dc)](_0x32c35e(0x82))['placeholder']=_0x32c35e(0xf5),_0x3e9434[_0x32c35e(0x1dc)](_0x32c35e(0x1df))[_0x32c35e(0x153)]='通行令牌\x20(API\x20Key):';break;}}function loadSettingsToUI(){const _0x219a09=_0x2eed1f,_0x419957=_0x222c37['getSettings']();if(!_0x419957)return;document[_0x219a09(0x242)](_0x219a09(0xb1))['checked']=_0x419957[_0x219a09(0x99)][_0x219a09(0x209)],document['getElementById'](_0x219a09(0x18c))[_0x219a09(0x15e)]=_0x419957[_0x219a09(0x99)][_0x219a09(0xec)],document[_0x219a09(0x242)](_0x219a09(0x264))[_0x219a09(0x15e)]=_0x419957[_0x219a09(0x99)][_0x219a09(0x240)],document[_0x219a09(0x242)](_0x219a09(0x149))['value']=_0x419957[_0x219a09(0x99)][_0x219a09(0x1f7)];const _0x347d8a=document[_0x219a09(0x242)](_0x219a09(0x81));if(_0x347d8a['options'][_0x219a09(0x1a7)]===0x0){const _0x46bbd6=_0x419957[_0x219a09(0x99)][_0x219a09(0xed)],_0x16a0ca=new Option(_0x46bbd6,_0x46bbd6,!![],!![]);_0x347d8a[_0x219a09(0xe7)](_0x16a0ca);}_0x347d8a['value']=_0x419957[_0x219a09(0x99)][_0x219a09(0xed)],document[_0x219a09(0x242)](_0x219a09(0xf6))[_0x219a09(0x13e)]=_0x419957[_0x219a09(0x99)][_0x219a09(0x199)],document[_0x219a09(0x242)](_0x219a09(0x19a))[_0x219a09(0x15e)]=_0x419957[_0x219a09(0x181)][_0x219a09(0x1b3)],document[_0x219a09(0x242)](_0x219a09(0x1d5))['value']=_0x419957['advanced'][_0x219a09(0x1cb)],document[_0x219a09(0x242)](_0x219a09(0x17b))[_0x219a09(0x15e)]=_0x419957['advanced'][_0x219a09(0x111)],document['getElementById']('hly-query-message-count')[_0x219a09(0x15e)]=_0x419957['advanced'][_0x219a09(0x78)],document[_0x219a09(0x242)](_0x219a09(0x11f))[_0x219a09(0x15e)]=_0x419957[_0x219a09(0x181)]['maxResults'],document[_0x219a09(0x242)](_0x219a09(0x109))[_0x219a09(0x15e)]=_0x419957[_0x219a09(0x99)]['batchSize'],handleApiModeChange(),document[_0x219a09(0x242)]('hly-condensation-enabled')['checked']=_0x419957['condensation']['enabled'],document[_0x219a09(0x242)](_0x219a09(0x198))[_0x219a09(0x15e)]=_0x419957[_0x219a09(0x221)][_0x219a09(0x25f)],document[_0x219a09(0x242)](_0x219a09(0x10e))[_0x219a09(0x15e)]=_0x419957[_0x219a09(0x221)][_0x219a09(0x14a)],document[_0x219a09(0x242)](_0x219a09(0x237))[_0x219a09(0x13e)]=_0x419957['condensation'][_0x219a09(0xa2)][_0x219a09(0x7b)],document[_0x219a09(0x242)]('hly-include-ai')[_0x219a09(0x13e)]=_0x419957[_0x219a09(0x221)][_0x219a09(0xa2)]['ai'];const _0x504881=document[_0x219a09(0x242)]('hly-tag-extraction-toggle'),_0x17c410=document[_0x219a09(0x242)](_0x219a09(0x12f)),_0x1a212c=document[_0x219a09(0x242)](_0x219a09(0x239));_0x504881[_0x219a09(0x13e)]=_0x419957['condensation'][_0x219a09(0x222)],_0x17c410[_0x219a09(0x15e)]=_0x419957[_0x219a09(0x221)]['tags'],_0x1a212c['style']['display']=_0x504881[_0x219a09(0x13e)]?_0x219a09(0x1a1):_0x219a09(0xc7),document['getElementById'](_0x219a09(0x24e))[_0x219a09(0x13e)]=_0x419957['rerank'][_0x219a09(0x209)],document[_0x219a09(0x242)](_0x219a09(0xfd))[_0x219a09(0x15e)]=_0x419957[_0x219a09(0x18f)]['url'],document[_0x219a09(0x242)](_0x219a09(0x15f))[_0x219a09(0x15e)]=_0x419957[_0x219a09(0x18f)][_0x219a09(0x1f7)];const _0x4bee8b=document[_0x219a09(0x242)]('hly-rerank-model');if(_0x4bee8b[_0x219a09(0x232)]['length']===0x0){const _0x58807f=_0x419957[_0x219a09(0x18f)]['model'];if(_0x58807f){const _0x3e1768=new Option(_0x58807f,_0x58807f,!![],!![]);_0x4bee8b[_0x219a09(0xe7)](_0x3e1768);}}_0x4bee8b[_0x219a09(0x15e)]=_0x419957[_0x219a09(0x18f)]['model'],document[_0x219a09(0x242)]('hly-rerank-top-n')['value']=_0x419957[_0x219a09(0x18f)]['top_n'],document[_0x219a09(0x242)]('hly-rerank-hybrid-alpha')[_0x219a09(0x15e)]=_0x419957[_0x219a09(0x18f)][_0x219a09(0x12b)],document[_0x219a09(0x242)](_0x219a09(0x1a0))[_0x219a09(0x13e)]=_0x419957['rerank'][_0x219a09(0x199)],document['getElementById']('hly-super-sort-enabled')[_0x219a09(0x13e)]=_0x419957[_0x219a09(0x18f)]['superSortEnabled'];}function saveSettingsFromUI(_0x4b8aae=!![]){const _0x1fd7b9=_0x2eed1f,_0x5b0f6b=document[_0x1fd7b9(0x242)](_0x1fd7b9(0x6b));if(!_0x5b0f6b)return;const _0x49ebfc=_0x5b0f6b[_0x1fd7b9(0x25d)](_0x1fd7b9(0x1ba));_0x49ebfc['forEach'](_0x50b97b=>{const _0x36abf6=_0x1fd7b9,_0x427a39=_0x50b97b[_0x36abf6(0x13c)][_0x36abf6(0x193)];if(!_0x427a39)return;let _0x591493;const _0x505520=_0x50b97b[_0x36abf6(0x13c)]['type']||_0x36abf6(0xf1);if(_0x50b97b['type']==='checkbox')_0x591493=_0x50b97b[_0x36abf6(0x13e)];else{if(_0x50b97b[_0x36abf6(0x87)]==='radio'){if(!_0x50b97b['checked'])return;_0x591493=_0x50b97b['value'];}else _0x591493=_0x50b97b[_0x36abf6(0x15e)];}switch(_0x505520){case'integer':_0x591493=parseInt(_0x591493,0xa);break;case _0x36abf6(0x19d):_0x591493=parseFloat(_0x591493);break;case _0x36abf6(0x21f):if(typeof _0x591493!=='boolean')_0x591493=_0x591493===_0x36abf6(0x163);break;}const _0xb6fde7=_0x222c37[_0x36abf6(0x1f9)](),_0x56e00a=_0x427a39['split']('.');let _0x2c2428=_0xb6fde7;for(let _0xf2e9d=0x0;_0xf2e9d<_0x56e00a[_0x36abf6(0x1a7)]-0x1;_0xf2e9d++){_0x2c2428=_0x2c2428[_0x56e00a[_0xf2e9d]]=_0x2c2428[_0x56e00a[_0xf2e9d]]||{};}_0x2c2428[_0x56e00a[_0x56e00a[_0x36abf6(0x1a7)]-0x1]]=_0x591493;}),_0x222c37[_0x1fd7b9(0x70)](),!_0x4b8aae&&(log(_0x1fd7b9(0x1f1),_0x1fd7b9(0x249)),toastr[_0x1fd7b9(0x249)](_0x1fd7b9(0xb2),_0x1fd7b9(0x23f)));}function resetSettingsToUI(){const _0x43d5d1=_0x2eed1f;confirm(_0x43d5d1(0x176))&&(_0x222c37[_0x43d5d1(0x243)](),loadSettingsToUI(),toastr[_0x43d5d1(0x1a4)](_0x43d5d1(0x15c),'诏曰'));}async function updatePanelStatus(){const _0x2e3d7d=_0x2eed1f,_0x163d16=_0x222c37[_0x2e3d7d(0x250)](),_0x1060de=document[_0x2e3d7d(0x242)](_0x2e3d7d(0x1e2)),_0xe2e094=document[_0x2e3d7d(0x242)](_0x2e3d7d(0xcd));if(_0x163d16){const _0x22d101=_0x222c37['getLockedSessionInfo']();_0x22d101&&(_0x1060de[_0x2e3d7d(0x153)]=_0x2e3d7d(0x18b),_0xe2e094['textContent']=_0x22d101['id'],_0xe2e094[_0x2e3d7d(0x122)]='当前所有操作都将指向这个锁定的宝库:'+_0x22d101['id'],_0x1060de[_0x2e3d7d(0x22b)][_0x2e3d7d(0xe7)]('hly-locked-status'),_0xe2e094[_0x2e3d7d(0x22b)][_0x2e3d7d(0xe7)](_0x2e3d7d(0x101)));}else _0x1060de[_0x2e3d7d(0x153)]=_0x27cc29[_0x2e3d7d(0x107)](),_0xe2e094[_0x2e3d7d(0x153)]=_0x27cc29[_0x2e3d7d(0x13d)]()||'无',_0xe2e094[_0x2e3d7d(0x122)]='',_0x1060de['classList'][_0x2e3d7d(0x24c)]('hly-locked-status'),_0xe2e094[_0x2e3d7d(0x22b)]['remove'](_0x2e3d7d(0x101));const _0x285b3e=document[_0x2e3d7d(0x242)](_0x2e3d7d(0x71));_0x285b3e[_0x2e3d7d(0x153)]=_0x2e3d7d(0x1a9);try{const _0x257293=await _0x222c37['getVectorCount']();_0x285b3e[_0x2e3d7d(0x153)]=_0x257293;}catch(_0x59af74){console[_0x2e3d7d(0xf4)](_0x2e3d7d(0x1c5),_0x59af74),_0x285b3e[_0x2e3d7d(0x153)]=_0x2e3d7d(0x6f),_0x285b3e[_0x2e3d7d(0x122)]=_0x2e3d7d(0x102)+_0x59af74[_0x2e3d7d(0x13f)];}const _0x45eaba=document['getElementById'](_0x2e3d7d(0x1b7));if(_0x45eaba&&!_0x45eaba['dataset'][_0x2e3d7d(0xa1)]){const _0x3dbf6f=_0x222c37[_0x2e3d7d(0x1f9)](),_0x2981b4=await _0x222c37[_0x2e3d7d(0x154)]();if(_0x3dbf6f[_0x2e3d7d(0x186)]&&_0x3dbf6f[_0x2e3d7d(0x186)][_0x2981b4]){const _0x4c8035=_0x3dbf6f[_0x2e3d7d(0x186)][_0x2981b4];_0x45eaba[_0x2e3d7d(0x1d7)]='
上次已从第\x20'+_0x4c8035[_0x2e3d7d(0x207)]+_0x2e3d7d(0x1c0)+_0x4c8035[_0x2e3d7d(0x23d)]+'\x20楼。
';}else _0x45eaba[_0x2e3d7d(0x1d7)]='可在此预览凝识结果。
';}renderKnowledgeBases();}async function moveAllKnowledgeBases(_0x4deef9){const _0x4bf2d8=_0x2eed1f,_0x165969=_0x4deef9===_0x4bf2d8(0x1c3),_0x1df23b=_0x165969?'global':_0x4bf2d8(0x1eb),_0x122e8f=_0x165969?'局部':'全局',_0x2dece0=_0x165969?_0x222c37[_0x4bf2d8(0x143)]():_0x222c37[_0x4bf2d8(0x67)](),_0x316b91=Object['keys'](_0x2dece0);if(_0x316b91[_0x4bf2d8(0x1a7)]===0x0){toastr['info'](_0x4bf2d8(0x1b0)+(_0x165969?'全局':'局部')+_0x4bf2d8(0x75),'圣谕');return;}if(!confirm(_0x4bf2d8(0x1db)+_0x316b91['length']+_0x4bf2d8(0x1d3)+(_0x165969?'全局':'局部')+_0x4bf2d8(0x16d)+_0x122e8f+'】吗?'))return;log(_0x4bf2d8(0x96)+_0x316b91[_0x4bf2d8(0x1a7)]+'\x20个知识库从\x20'+_0x1df23b+'\x20移动到\x20'+(_0x165969?_0x4bf2d8(0x1eb):_0x4bf2d8(0x118))+_0x4bf2d8(0x1a9),_0x4bf2d8(0x1a4));const _0x2e9695=_0x316b91[_0x4bf2d8(0x1d8)](_0x59e46d=>_0x222c37['moveKnowledgeBase'](_0x59e46d,_0x1df23b));try{await Promise[_0x4bf2d8(0x160)](_0x2e9695),toastr[_0x4bf2d8(0x249)]('所有\x20'+_0x316b91[_0x4bf2d8(0x1a7)]+'\x20个知识库均已成功移动。',_0x4bf2d8(0x130)),log(_0x4bf2d8(0xb5),_0x4bf2d8(0x249));}catch(_0x1b8978){toastr[_0x4bf2d8(0xf4)]('批量移动过程中发生错误:\x20'+_0x1b8978[_0x4bf2d8(0x13f)],'警报'),log(_0x4bf2d8(0x220)+_0x1b8978[_0x4bf2d8(0x13f)],_0x4bf2d8(0xf4));}finally{await updatePanelStatus();}}async function deleteAllLocalKnowledgeBases(){const _0x34a7c4=_0x2eed1f,_0x348c07=_0x222c37[_0x34a7c4(0x67)](),_0x105924=Object[_0x34a7c4(0x119)](_0x348c07);if(_0x105924['length']===0x0){toastr[_0x34a7c4(0x1a4)]('当前角色没有任何局部知识库可供删除。','圣谕');return;}if(!confirm(_0x34a7c4(0x22d)+_0x105924[_0x34a7c4(0x1a7)]+_0x34a7c4(0x25a)))return;toastr[_0x34a7c4(0x1a4)](_0x34a7c4(0x123)+_0x105924[_0x34a7c4(0x1a7)]+_0x34a7c4(0x22a),'圣旨'),log(_0x34a7c4(0x19f)+_0x105924[_0x34a7c4(0x1a7)]+_0x34a7c4(0x22a),'warn');let _0x7eb903=0x0,_0x4fdef2=0x0;for(const _0x1d8c0f of _0x105924){try{await _0x222c37['removeKnowledgeBase'](_0x1d8c0f,_0x34a7c4(0x1eb)),_0x7eb903++;}catch(_0xe81d50){_0x4fdef2++,log('删除局部知识库\x20'+_0x1d8c0f+'\x20失败:\x20'+_0xe81d50[_0x34a7c4(0x13f)],_0x34a7c4(0xf4));}}_0x4fdef2>0x0?toastr[_0x34a7c4(0xf4)](_0x34a7c4(0x15d)+_0x4fdef2+_0x34a7c4(0x1b1),'警报'):toastr['success'](_0x34a7c4(0x182)+_0x7eb903+'\x20个局部知识库均已成功删除。',_0x34a7c4(0x130)),log(_0x34a7c4(0x24f)+_0x7eb903+_0x34a7c4(0x8f)+_0x4fdef2,_0x34a7c4(0x1a4)),await updatePanelStatus();}async function renderKnowledgeBases(){const _0x182e3a=_0x2eed1f,_0x4c8fc1=document[_0x182e3a(0x242)](_0x182e3a(0x12c)),_0x41f18e=document[_0x182e3a(0x242)]('hly-kb-list-global'),_0x30da28=document[_0x182e3a(0x242)](_0x182e3a(0x19b));if(!_0x4c8fc1||!_0x41f18e||!_0x30da28)return;_0x30da28['textContent']=_0x27cc29[_0x182e3a(0x107)]()||_0x182e3a(0x151);try{const _0x477031=_0x222c37['getLocalKnowledgeBases'](),_0x26fb83=_0x222c37['getGlobalKnowledgeBases']();await _renderKbList(_0x477031,_0x4c8fc1,'local','hly-kb-list-local-placeholder'),await _renderKbList(_0x26fb83,_0x41f18e,'global',_0x182e3a(0xb7));}catch(_0x725202){console[_0x182e3a(0xf4)](_0x182e3a(0x108),_0x725202),_0x4c8fc1[_0x182e3a(0x1d7)]=_0x182e3a(0x258)+_0x725202[_0x182e3a(0x13f)]+_0x182e3a(0x125),_0x41f18e[_0x182e3a(0x1d7)]='加载失败:\x20'+_0x725202[_0x182e3a(0x13f)]+_0x182e3a(0x125);}}async function _renderKbList(_0x4e03a9,_0x455848,_0xa770f2,_0x330db6){const _0x28cc2b=_0x2eed1f,_0x289a67=document[_0x28cc2b(0x242)](_0x330db6);_0x455848[_0x28cc2b(0x1d7)]='',_0x455848[_0x28cc2b(0x200)](_0x289a67);if(Object['keys'](_0x4e03a9)[_0x28cc2b(0x1a7)]===0x0){_0x289a67[_0x28cc2b(0x191)][_0x28cc2b(0x1e1)]=_0x28cc2b(0x1a1);return;}_0x289a67['style'][_0x28cc2b(0x1e1)]='none';for(const [_0x6fb85d,_0x19a1d7]of Object[_0x28cc2b(0xbd)](_0x4e03a9)){const _0x19bb62=document[_0x28cc2b(0x80)](_0x28cc2b(0xdf));_0x19bb62[_0x28cc2b(0x229)]='hly-kb-list-item',_0x19bb62[_0x28cc2b(0x13c)][_0x28cc2b(0x1b5)]=_0x6fb85d,_0x19bb62[_0x28cc2b(0x13c)][_0x28cc2b(0x1b6)]=_0xa770f2;const _0x229f47=await _0x222c37[_0x28cc2b(0xb8)](_0x6fb85d,_0xa770f2),_0x3f9f04=_0xa770f2===_0x28cc2b(0x1eb)?_0x28cc2b(0x1c1):_0x28cc2b(0xf0);_0x19bb62[_0x28cc2b(0x1d7)]=_0x28cc2b(0x17f)+_0x6fb85d+_0x28cc2b(0x1e9)+_0x6fb85d+'\x22>'+_0x19a1d7[_0x28cc2b(0x113)]+'\x20('+_0x229f47+_0x28cc2b(0x131)+_0x3f9f04+_0x28cc2b(0x69)+(_0x19a1d7['enabled']?_0x28cc2b(0x13e):'')+'>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20',_0x455848[_0x28cc2b(0x200)](_0x19bb62);}}async function handleKbAction(_0x25e2e9){const _0x41b462=_0x2eed1f,_0x16a086=_0x25e2e9[_0x41b462(0x18a)],_0x2e776d=_0x16a086[_0x41b462(0x10f)](_0x41b462(0xe4));if(!_0x2e776d)return;const _0x385851=_0x2e776d[_0x41b462(0x13c)][_0x41b462(0x1b5)],_0x181dc4=_0x2e776d['dataset']['kbScope'],_0x5d13a4=_0x2e776d['querySelector'](_0x41b462(0x202))['textContent'][_0x41b462(0x7a)]('\x20(')[0x0];if(_0x16a086[_0x41b462(0x22b)]['contains'](_0x41b462(0x253))){if(confirm('您确定要永久删除知识库【'+_0x5d13a4+_0x41b462(0x179)))try{await _0x222c37['removeKnowledgeBase'](_0x385851,_0x181dc4),log(_0x41b462(0x201)+_0x5d13a4+_0x41b462(0x262)+_0x385851+_0x41b462(0x234),_0x41b462(0x249)),toastr[_0x41b462(0x249)](_0x41b462(0xee)+_0x5d13a4+_0x41b462(0x19e)),await updatePanelStatus();}catch(_0x4f1b2d){log('删除知识库\x20'+_0x5d13a4+_0x41b462(0xe6)+_0x4f1b2d[_0x41b462(0x13f)],_0x41b462(0xf4)),toastr['error'](_0x41b462(0x252)+_0x4f1b2d[_0x41b462(0x13f)]);}}if(_0x16a086[_0x41b462(0x10f)](_0x41b462(0xc4))){const _0x1b15ac=_0x181dc4===_0x41b462(0x1eb)?'全局':'局部';if(confirm(_0x41b462(0x133)+_0x5d13a4+_0x41b462(0x16d)+_0x1b15ac+_0x41b462(0x197)))try{await _0x222c37['moveKnowledgeBase'](_0x385851,_0x181dc4),await updatePanelStatus();}catch(_0xe81869){log(_0x41b462(0xe9)+_0x5d13a4+_0x41b462(0xe6)+_0xe81869[_0x41b462(0x13f)],'error'),toastr[_0x41b462(0xf4)](_0x41b462(0x178)+_0xe81869[_0x41b462(0x13f)]);}}if(_0x16a086[_0x41b462(0x22b)][_0x41b462(0x26c)](_0x41b462(0x98))&&_0x25e2e9[_0x41b462(0x87)]===_0x41b462(0x1ee))try{await _0x222c37[_0x41b462(0xf3)](_0x385851,_0x181dc4),log(_0x41b462(0x201)+_0x5d13a4+_0x41b462(0x212),_0x41b462(0x249));}catch(_0x1f1695){log(_0x41b462(0x226)+_0x5d13a4+_0x41b462(0xc3)+_0x1f1695[_0x41b462(0x13f)],_0x41b462(0xf4)),toastr['error'](_0x41b462(0xbb)+_0x1f1695[_0x41b462(0x13f)]),_0x16a086[_0x41b462(0x13e)]=!_0x16a086[_0x41b462(0x13e)];}_0x16a086[_0x41b462(0x22b)]['contains'](_0x41b462(0xa3))&&_0x25e2e9[_0x41b462(0x87)]===_0x41b462(0x1ee)&&updateBulkActionUI(_0x181dc4);}function handleSelectAll(_0x1fe508,_0x4d1c0c){const _0x2ff17f=_0x2eed1f,_0x296d34=_0x1fe508[_0x2ff17f(0x18a)][_0x2ff17f(0x13e)],_0x1a5fc5=document[_0x2ff17f(0x242)](_0x2ff17f(0x95)+_0x4d1c0c),_0x539cca=_0x1a5fc5['querySelectorAll'](_0x2ff17f(0x24a));_0x539cca[_0x2ff17f(0x1d2)](_0x4eefdc=>_0x4eefdc[_0x2ff17f(0x13e)]=_0x296d34),updateBulkActionUI(_0x4d1c0c);}function _0x21f4(){const _0x4bd65b=['会话已解锁,将跟随当前角色。','\x22>\x20[',',\x20失败:\x20','condensation.exclusionRules','\x20条忆识。','93DFBTzE','您确定要永久删除选中的\x20','未找到符合条件的消息。','hly-kb-list-','开始将\x20','任务完成!成功录入\x20','hly-kb-toggle','retrieval','hly-historiography-results','成功获取\x20',',\x20向量:\x20','正在处理您提交的文书...',',重新开始。','\x20楼到第\x20','{{manual_text}}','finalText','messageTypes','hly-kb-item-checkbox','hanlinyuan-ingest-abort','.hly-nav-item','点击以锁定,让翰林院固定操作当前角色的宝库','圣旨已下',',从第\x20','{{chat_text}}','批量编纂任务已完成,但有部分错误。','[翰林院-枢纽]\x20预览过程发生错误:','.hly-preview-textarea','delete','send-date','processed','{{text}}','hly-retrieval-enabled','翰林院设定已存档封印。','[翰林院-枢纽]\x20加载书库列表失败:','锁定会话','批量移动完成。','finalMessages','hly-kb-list-global-placeholder','getVectorCount','is_user','此书库为空','切换状态失败:\x20','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
在这里定义需要从提取内容中排除的文本片段。例如,排除HTML注释,可以设置开始字符为\x20``。
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20