Files
ST-Amily2-Chat-Optimisation/ui/hanlinyuan-bindings.js
2025-08-06 22:26:30 +08:00

2 lines
48 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const _0x3ad8df=_0x2a4d;(function(_0xd21b7d,_0x43c720){const _0x29a77a=_0x2a4d,_0x3315f1=_0xd21b7d();while(!![]){try{const _0x1e44ff=-parseInt(_0x29a77a(0x23a))/0x1+-parseInt(_0x29a77a(0x2f2))/0x2+parseInt(_0x29a77a(0x2d8))/0x3+-parseInt(_0x29a77a(0x1da))/0x4+-parseInt(_0x29a77a(0x285))/0x5*(parseInt(_0x29a77a(0x1bc))/0x6)+parseInt(_0x29a77a(0x1af))/0x7+-parseInt(_0x29a77a(0x275))/0x8*(-parseInt(_0x29a77a(0x1ac))/0x9);if(_0x1e44ff===_0x43c720)break;else _0x3315f1['push'](_0x3315f1['shift']());}catch(_0x13b10a){_0x3315f1['push'](_0x3315f1['shift']());}}}(_0x34d8,0x730f7));import{getContext}from'/scripts/extensions.js';import*as _0x3ae7b8 from'../core/rag-processor.js';import*as _0x3162d4 from'../core/historiographer.js';import*as _0x376d9a from'../core/utils/context-utils.js';import*as _0x3cc817 from'../core/ingestion-manager.js';import{showContentModal,showHtmlModal}from'./page-window.js';function _0x2a4d(_0x27f132,_0x188e02){const _0x34d828=_0x34d8();return _0x2a4d=function(_0x2a4d4f,_0x23f97f){_0x2a4d4f=_0x2a4d4f-0x196;let _0x2e78b4=_0x34d828[_0x2a4d4f];return _0x2e78b4;},_0x2a4d(_0x27f132,_0x188e02);}import{extractBlocksByTags,applyExclusionRules}from'../core/utils/rag-tag-extractor.js';_0x3ad8df(0x1a6);function setupGlobalEventHandlers(){const _0x364a18=_0x3ad8df;window[_0x364a18(0x1b8)]=()=>saveSettingsFromUI(![]),window[_0x364a18(0x1e8)]=resetSettingsToUI,window['testHLYApi']=testApi,window['fetchHLYEmbeddingModels']=fetchHLYEmbeddingModels,window[_0x364a18(0x2e9)]=fetchHLYRerankModels,window['updateHLYMemoryCount']=updatePanelStatus,window['purgeHLYStorage']=purgeStorage,window[_0x364a18(0x29a)]=startCondensation,window['previewHLYCondensation']=previewCondensation,window[_0x364a18(0x1db)]=ingestManualText,window[_0x364a18(0x204)]=log,window[_0x364a18(0x2bf)]=showStats,window['startHLYHistoriography']=startHistoriography;}function updateAndSaveSetting(_0x15f64a,_0x245a44){const _0x2f2482=_0x3ad8df,_0x1ba27e=_0x3ae7b8[_0x2f2482(0x2a4)]();if(!_0x1ba27e)return;const _0x4a3799=_0x15f64a[_0x2f2482(0x23d)]('.');let _0x473997=_0x1ba27e;for(let _0x4dc3bc=0x0;_0x4dc3bc<_0x4a3799[_0x2f2482(0x2fa)]-0x1;_0x4dc3bc++){_0x473997=_0x473997[_0x4a3799[_0x4dc3bc]]=_0x473997[_0x4a3799[_0x4dc3bc]]||{};}_0x473997[_0x4a3799[_0x4a3799[_0x2f2482(0x2fa)]-0x1]]=_0x245a44,_0x3ae7b8[_0x2f2482(0x200)](),log(_0x2f2482(0x248)+_0x15f64a+_0x2f2482(0x2ae)+JSON[_0x2f2482(0x289)](_0x245a44),_0x2f2482(0x2aa));}function bindAutoSaveEvents(){const _0x219c80=_0x3ad8df,_0x5e4c2d=document[_0x219c80(0x2ce)]('hly-modal-container');if(!_0x5e4c2d)return;_0x5e4c2d['addEventListener']('change',_0x119baf=>{const _0xbf507a=_0x219c80,_0x18fce7=_0x119baf[_0xbf507a(0x257)],_0x5c76c4=_0x18fce7[_0xbf507a(0x25e)][_0xbf507a(0x26f)];if(!_0x5c76c4)return;let _0x1e0fa7;const _0x253afa=_0x18fce7['dataset'][_0xbf507a(0x1a1)]||_0xbf507a(0x201);if(_0x18fce7[_0xbf507a(0x1a1)]===_0xbf507a(0x24e))_0x1e0fa7=_0x18fce7[_0xbf507a(0x2d3)];else{if(_0x18fce7[_0xbf507a(0x1a1)]==='radio'){if(_0x18fce7[_0xbf507a(0x2d3)]){const _0x40ecf1=_0x5e4c2d[_0xbf507a(0x2d4)]('input[name=\x22'+_0x18fce7[_0xbf507a(0x1b3)]+'\x22]'),_0x563b1e=Array[_0xbf507a(0x1b6)](_0x40ecf1)[_0xbf507a(0x1d4)](_0x239479=>_0x239479[_0xbf507a(0x2d3)]);_0x1e0fa7=_0x563b1e[_0xbf507a(0x232)];}else return;}else _0x1e0fa7=_0x18fce7['value'];}switch(_0x253afa){case'integer':_0x1e0fa7=parseInt(_0x1e0fa7,0xa);break;case _0xbf507a(0x2f5):_0x1e0fa7=parseFloat(_0x1e0fa7);break;case _0xbf507a(0x2d6):typeof _0x1e0fa7!==_0xbf507a(0x2d6)&&(_0x1e0fa7=_0x1e0fa7===_0xbf507a(0x249));break;}if(_0x18fce7['type']===_0xbf507a(0x2ee)&&!_0x18fce7[_0xbf507a(0x2d3)])return;updateAndSaveSetting(_0x5c76c4,_0x1e0fa7);});}export function bindHanlinyuanEvents(){const _0x417f13=_0x3ad8df,_0x59a51c=getContext();if(!_0x59a51c){console[_0x417f13(0x262)](_0x417f13(0x287));return;}setupGlobalEventHandlers(),bindPanelToggleEvents(),bindInternalUIEvents(),bindTutorialEvents(),bindAutoSaveEvents(),bindSessionLockEvent();if(_0x3ae7b8['initialize'])_0x3ae7b8[_0x417f13(0x2a3)]();else{console[_0x417f13(0x262)](_0x417f13(0x241));return;}loadSettingsToUI(),loadWorldbookList(),log(_0x417f13(0x239),_0x417f13(0x2ef));const _0x275b76=document[_0x417f13(0x2ce)]('hanlinyuan-ingest-novel-file-input'),_0x4949ca=document['getElementById'](_0x417f13(0x244)),_0x1672ab=document[_0x417f13(0x2ce)](_0x417f13(0x265)),_0x27bd03=document['getElementById']('hanlinyuan-ingest-abort'),_0x11c07c=document['getElementById'](_0x417f13(0x1f0)),_0x465d82=document[_0x417f13(0x2ce)](_0x417f13(0x1c9)),_0x2f060c=document['getElementById'](_0x417f13(0x2fc)),_0x13ab74=document[_0x417f13(0x2ce)](_0x417f13(0x1be));let _0x1793eb=null,_0x1c3492=null;_0x275b76[_0x417f13(0x2f1)](_0x417f13(0x27e),_0x557352=>{const _0x1942e5=_0x417f13;_0x1793eb=_0x557352['target'][_0x1942e5(0x20c)][0x0],_0x1793eb?(_0x4949ca['textContent']=_0x1793eb[_0x1942e5(0x1b3)],_0x4949ca[_0x1942e5(0x240)]=_0x1793eb['name']):_0x4949ca['textContent']=_0x1942e5(0x258);}),_0x1672ab['addEventListener'](_0x417f13(0x27c),async()=>{const _0x2e81d8=_0x417f13;if(!_0x1793eb){toastr['warning'](_0x2e81d8(0x235));return;}let _0x56f9df=0x0;const _0x241c49=_0x3cc817[_0x2e81d8(0x2e2)](_0x1793eb),_0x208509=_0x3cc817['loadProgress'](_0x241c49);if(_0x208509){const _0x3ab78b=(_0x208509[_0x2e81d8(0x21c)]/_0x208509['totalChunks']*0x64)[_0x2e81d8(0x2b7)](0x1),_0x74f031=confirm(_0x2e81d8(0x2f0)+_0x3ab78b+_0x2e81d8(0x24f));_0x74f031?(_0x56f9df=_0x208509['processedChunks'],toastr[_0x2e81d8(0x2ef)](_0x2e81d8(0x19e)+(_0x56f9df+0x1)+_0x2e81d8(0x254),_0x2e81d8(0x1dc)),log(_0x2e81d8(0x1c7)+_0x241c49+_0x2e81d8(0x271)+_0x56f9df+_0x2e81d8(0x1a4),'info')):(_0x3cc817[_0x2e81d8(0x213)](_0x241c49),toastr[_0x2e81d8(0x2ef)](_0x2e81d8(0x227),_0x2e81d8(0x1dc)),log(_0x2e81d8(0x222)+_0x241c49+',重新开始。','warn'));}_0x1c3492=new AbortController();const _0x1c3467=_0x1c3492['signal'];_0x13ab74['style'][_0x2e81d8(0x1e6)]=_0x2e81d8(0x2d1),_0x11c07c['style']['display']=_0x2e81d8(0x1c8),_0x2f060c[_0x2e81d8(0x1e9)]=_0x2e81d8(0x1f5),_0x465d82[_0x2e81d8(0x232)]=0x0;try{const _0x82198=await _0x1793eb[_0x2e81d8(0x251)](),_0x105c1c=_0x1b1d19=>{const _0x51fd43=_0x2e81d8;_0x2f060c['textContent']=_0x51fd43(0x1a3)+_0x1b1d19['message']+'\x20('+_0x1b1d19[_0x51fd43(0x2e7)]+'/'+_0x1b1d19[_0x51fd43(0x1ec)]+')',_0x465d82['value']=_0x1b1d19[_0x51fd43(0x2e7)]/_0x1b1d19[_0x51fd43(0x1ec)]*0x64;},_0x548904=()=>{const _0x1ed63c=_0x2e81d8;updatePanelStatus(),log('[实时刷新]\x20批次完成忆识总数已更新。',_0x1ed63c(0x2ef));},_0x20ef38=await _0x3ae7b8[_0x2e81d8(0x26d)](_0x82198,'novel',_0x1793eb[_0x2e81d8(0x1b3)],_0x105c1c,_0x1c3467,log,_0x548904,_0x241c49,_0x56f9df);if(_0x20ef38[_0x2e81d8(0x2aa)])toastr[_0x2e81d8(0x2aa)](_0x2e81d8(0x1c5)+_0x20ef38[_0x2e81d8(0x1d9)]+'\x20个知识块'),_0x2f060c[_0x2e81d8(0x1e9)]=_0x2e81d8(0x1ad)+_0x20ef38[_0x2e81d8(0x1d9)]+_0x2e81d8(0x24a),_0x465d82[_0x2e81d8(0x232)]=0x64,updatePanelStatus();else throw new Error(_0x20ef38[_0x2e81d8(0x262)]||_0x2e81d8(0x2b2));}catch(_0x5073f5){_0x5073f5[_0x2e81d8(0x1b3)]===_0x2e81d8(0x2a8)?(toastr[_0x2e81d8(0x2ef)](_0x2e81d8(0x29c)),_0x2f060c[_0x2e81d8(0x1e9)]=_0x2e81d8(0x266)):(toastr[_0x2e81d8(0x262)](_0x2e81d8(0x1bb)+_0x5073f5['message']+_0x2e81d8(0x24b)),_0x2f060c[_0x2e81d8(0x1e9)]='错误:\x20'+_0x5073f5[_0x2e81d8(0x1c4)]);}finally{setTimeout(()=>{const _0x4ad322=_0x2e81d8;_0x13ab74['style'][_0x4ad322(0x1e6)]='flex',_0x11c07c[_0x4ad322(0x2d0)][_0x4ad322(0x1e6)]=_0x4ad322(0x2d1),_0x275b76[_0x4ad322(0x232)]='',_0x1793eb=null,_0x4949ca[_0x4ad322(0x1e9)]='未选择文件';},0xbb8);}}),_0x27bd03[_0x417f13(0x2f1)](_0x417f13(0x27c),()=>{_0x1c3492&&_0x1c3492['abort']();});}function bindSessionLockEvent(){const _0x4c87f8=_0x3ad8df,_0x52b9ed=document[_0x4c87f8(0x2ce)](_0x4c87f8(0x2df));if(!_0x52b9ed)return;_0x52b9ed[_0x4c87f8(0x2f1)](_0x4c87f8(0x27c),async()=>{const _0x3173bc=_0x4c87f8,_0x1f75eb=await _0x3ae7b8[_0x3173bc(0x1de)]();updateSessionLockUI(_0x1f75eb);if(_0x1f75eb){const _0x28953a=_0x3ae7b8[_0x3173bc(0x1e7)]();_0x28953a&&(toastr['success'](_0x3173bc(0x22c)+_0x28953a['id'],_0x3173bc(0x273)),log('会话已锁定到宝库:\x20'+_0x28953a['id'],_0x3173bc(0x2aa)));}else toastr[_0x3173bc(0x2ef)](_0x3173bc(0x22a),'诏曰'),log(_0x3173bc(0x250),_0x3173bc(0x2ef));updatePanelStatus();}),updateSessionLockUI(_0x3ae7b8[_0x4c87f8(0x27d)]());}function _0x34d8(){const _0x25505a=['title','[翰林院-枢纽]\x20核心法典未能提供初始化圣旨','\x20条忆识。','根据标签提取或内容排除条件,未找到任何有效内容。','hanlinyuan-ingest-novel-file-name','appendChild','rerank','hly-rerank-hybrid-alpha','[自动保存]\x20设置项\x20\x27','true','\x20个知识块。','。进度已保存,可稍后重试。','成功加载\x20','hly-','checkbox','%。是否从上次中断之处继续?','会话已解锁。','text','hly-log-output','content','\x20块继续录入。','hly-match-threshold','检测到预览后待处理的文本,开始直接凝识...','target','未选择文件','innerHTML','\x20进行编纂...','大功告成','<option\x20value=\x22\x22>请选择一个书库...</option>','用户尝试录入空文本。','dataset','手动录入成功,新增\x20','点击以解锁,让翰林院跟随当前角色','comment','error','查看宝库状态成功集合ID=','[翰林院-枢纽]\x20获取Rerank模型列表失败:','hanlinyuan-ingest-novel-start','任务已中止。','hly-exclusion-rules-btn','.hly-preview-item-v2','翰林院使用教程','queryMessageCount','手动录入','testApiConnection','ingestTextToHanlinyuan','用户请求查看宝库状态。','settingKey','fetchRerankModels',',从第\x20','hly-historiography-results','圣旨已下','聊天记录从第\x20','7556368gQnRVB','\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<details\x20class=\x22hly-preview-details\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<summary\x20class=\x22hly-preview-summary\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20第\x20','》获取条目列表...','retrieval','凝识完成!新增\x20','hly-layer-start','template','click','isSessionLocked','change','\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22text\x22\x20class=\x22hly-imperial-brush\x22\x20value=\x22','正在查询宝库状态...','mes',')\x20进行编纂...','正在准备凝识...','当前所有操作都将指向这个锁定的宝库:','10ANwhTa','锁定会话','[翰林院-枢纽]\x20未能获取SillyTavern上下文绑定失败。','无法获取总数:\x20','stringify','[翰林院-枢纽]\x20加载书库列表失败:','开始对《','matchThreshold','<option\x20value=\x22\x22>正在加载条目...</option>','depth','hly-delete-rule-btn','hly-layer-end','加载书库列表失败:\x20','\x20楼凝识至第\x20','请先选择一个书库和要编纂的条目。','预览并编辑凝识内容','hly-retrieval-enabled','hly-rerank-url','\x0a所用模型:\x20','hly-api-endpoint',')\x20的编纂任务已完成。','startHLYCondensation','beforeend','任务已由用户中止。进度已保存,可随时继续。','hly-include-ai','condensationHistory','点击以锁定,让翰林院固定操作当前角色的宝库','createElement','\x20个书库。','hly-current-chat-id','initialize','getSettings','join','hly-embedding-model','<p\x20class=\x22hly-record-hint\x22><i>上次已从第\x20','AbortError','编纂任务已完成。','success','</textarea>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</details>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22hly-preview-delete-btn-v2\x22\x20data-target=\x22','hly-locked-status','正在处理您确认后的文书...','\x27\x20已更新为:\x20','depth_role','hly-injection-role','hly-retrieval-notify','未知错误','log-success','【手动存档】所有设定已存档封印。','hly-injection-depth','insertAdjacentHTML','toFixed','log-error','正在处理预览后的文本...','\x20楼的内容共\x20','scrollTop','tags','N/A','.hly-nav-item','showHLYStats','.hly-tab-pane','[翰林院-枢纽]\x20手动录入过程发生错误:','宝库状态','准备对《','getCharacterName','querySelector','正在采集消息...','宝库已清空。','<option\x20value=\x22\x22>加载失败</option>','<option>获取失败</option>','url','enabled','hly-tag-extraction-toggle','\x20个Rerank模型。','getElementById','手动录入失败:\x20','style','none','.hly-preview-textarea','checked','querySelectorAll','hly-batch-size','boolean','<option\x20value=\x22\x22>请选择一个条目...</option>','422841tzRyYj','tab','forEach','chunkSize','圣谕不明','embeddingModel','\x0a<pre>\x0a翰林院宝库状态\x0a--------------------\x0a集合ID:\x20','hly-session-lock-btn','warning','preview-item-','generateJobId','push','神力连接通畅!','已选择\x20','未能获取到任何模型。','processed','预览后文本录入成功,新增\x20','fetchHLYRerankModels','翰林院设定已存档封印。','span','fa-circle-info','notify','radio','info','启禀大人,发现此书上次录入已完成\x20','addEventListener','116292dCGxAw','hly-chunk-size','翰林院启奏','float','condensation','key','<option\x20value=\x22\x22>未找到任何书库</option>','remove','length','hly-tag-input-container','hanlinyuan-ingest-status','》中的条目【','未能获取到任何Rerank模型。','batchSize','会话已锁定','解锁会话','根据当前勾选条件,未找到符合的消息可供预览。','hly-condensation-results','凝识失败:\x20','processCondensation','hly-rerank-model','custom','\x22\x20title=\x22删除此条\x22>&times;</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20','injection','getMessagesForCondensation','遵命,将从第\x20','\x20条消息开始凝识...','model','type','trim','处理中:\x20','\x20块开始。','hly-condensation-enabled','use\x20strict','add','maxResults','\x22\x20placeholder=\x22开始字符,\x20如\x20<!--\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>到</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22text\x22\x20class=\x22hly-imperial-brush\x22\x20value=\x22','getVectorCount','warn','9lBOrtr','任务完成!成功录入\x20','toLocaleTimeString','2700894AMGZPo','...','聊天记录\x20','.hly-preview-delete-btn-v2','name','\x20楼:\x20[','input','from','input[name=\x22hly-injection-position\x22][value=\x22','saveHLYSettings','getCollectionId','内容排除规则已保存。','录入失败:\x20','806046zwgWjj','contains','hanlinyuan-ingest-novel-controls','正在为《','-tab','start','amily2_open_hanlin_tutorial','正在获取可用书库列表...','message','成功录入\x20','加载条目失败:\x20','[断点续传]\x20用户选择继续任务\x20','block','hanlinyuan-ingest-progress-bar','scrollHeight','options','\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22hly-exclusion-rule-row\x22\x20data-index=\x22','active','.hly-log-placeholder','messageTypes','map','】已成功编纂入库。','azure','apiKey','find','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22hly-preview-item-v2\x22\x20id=\x22','val','\x22\x20placeholder=\x22结束字符,\x20如\x20-->\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22hly-delete-rule-btn\x22\x20title=\x22删除此规则\x22>&times;</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20','hly-log-entry\x20','count','1946892cEDaFH','ingestHLYManualText','圣旨已达','获取Rerank模型失败:\x20','toggleSessionLock','manual','\x22></i>\x20[','\x20个模型。','[翰林院-枢纽]\x20编纂过程发生错误:','未知的编纂错误','hly-injection-template','\x20楼到第\x20','display','getLockedSessionInfo','resetHLYSettings','textContent','#hly-rules-list','<option>未找到模型</option>','total','fa-check-circle','finalText','\x0a</pre>\x0a\x20\x20\x20\x20\x20\x20\x20\x20','hanlinyuan-ingest-progress-container','end','purgeStorage','includes','<option>正在获取...</option>','正在读取文件...','\x20楼已成功凝识新增\x20','position','\x0a\x0a---\x0a\x0a','\x0a忆识总数:\x20','selectedIndex','此操作将彻底清空当前角色的所有忆识(向量),且无法恢复。您确定要继续吗?','预览失败:\x20','integer','清空宝库失败。','文书录入失败:\x20','saveSettings','string','hly-exclusion-rules-container','文书已成功录入宝库,新增\x20','hlyLog','\x20个条目。','fas\x20fa-lock-open','hly-overlap-size','hly-current-vector-count','.hly-exclusion-rule-row','fetchEmbeddingModels','classList','files','已采集\x20','严重错误','fas\x20fa-lock','toggle','[翰林院-枢纽]\x20更新忆识数量失败:','chat','clearJob','</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20id=\x22hly-add-rule-btn\x22\x20class=\x22hly-action-button\x22\x20style=\x22margin-top:\x2010px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<i\x20class=\x22fas\x20fa-plus\x22></i>\x20添加新规则\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<style>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.hly-exclusion-rule-row\x20{\x20display:\x20flex;\x20align-items:\x20center;\x20gap:\x2010px;\x20margin-bottom:\x2010px;\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.hly-exclusion-rule-row\x20input\x20{\x20flex-grow:\x201;\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.hly-delete-rule-btn\x20{\x20background:\x20#c0392b;\x20color:\x20white;\x20border:\x20none;\x20border-radius:\x2050%;\x20width:\x2024px;\x20height:\x2024px;\x20cursor:\x20pointer;\x20font-size:\x2016px;\x20line-height:\x2024px;\x20text-align:\x20center;\x20padding:\x200;\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20</style>\x0a\x20\x20\x20\x20','编纂失败:\x20','hly-hist-select-entry','\x20楼到\x20','className','layerEnd','data','getLoresForWorldbook','processedChunks','\x20楼。</i></p>','》的条目失败:','》中的条目\x20(Key:\x20','[翰林院-枢纽]\x20预览过程发生错误:','编辑内容排除规则','[断点续传]\x20用户选择放弃旧任务\x20','hly-hist-select-library','disabled','each','advanced','遵命,将从头开始录入此书。','收到手动录入请求,文本长度:\x20','input[name=\x22hly-injection-position\x22]:checked','会话已解锁,将跟随当前角色。','成功获取\x20','会话已锁定到:\x20','<option\x20value=\x22\x22>请先选择书库</option>','获取模型失败:\x20','filter','exclusionRules','录入内容不能为空。','value','hly-rerank-notify','hly-include-user','请先选择一个\x20.txt\x20文件',']\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</summary>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22hly-preview-content\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<textarea\x20class=\x22hly-preview-textarea\x22>','编纂任务已开始...','customApiUrl','[翰林院-枢纽]\x20已成功连接各部政令畅通。','186497RIQkPJ','开始获取模型列表...','apiEndpoint','split','未找到符合条件的消息。','查询宝库状态失败:\x20'];_0x34d8=function(){return _0x25505a;};return _0x34d8();}function updateSessionLockUI(_0x2c6a8e){const _0x48c223=_0x3ad8df,_0x4a02ab=document['getElementById'](_0x48c223(0x2df));if(!_0x4a02ab)return;const _0x25617b=_0x4a02ab[_0x48c223(0x2c5)]('i'),_0x10ce2f=_0x4a02ab[_0x48c223(0x2c5)](_0x48c223(0x2eb));_0x2c6a8e?(_0x4a02ab[_0x48c223(0x20b)][_0x48c223(0x1a7)]('active'),_0x25617b[_0x48c223(0x218)]=_0x48c223(0x20f),_0x10ce2f[_0x48c223(0x1e9)]=_0x48c223(0x301),_0x4a02ab['title']=_0x48c223(0x260)):(_0x4a02ab['classList'][_0x48c223(0x2f9)]('active'),_0x25617b[_0x48c223(0x218)]=_0x48c223(0x206),_0x10ce2f['textContent']=_0x48c223(0x286),_0x4a02ab[_0x48c223(0x240)]=_0x48c223(0x29f));}function bindPanelToggleEvents(){const _0x3f40a5=_0x3ad8df,_0x34b52a=document[_0x3f40a5(0x2ce)]('amily2_open_rag_palace');if(_0x34b52a){}}function bindTutorialEvents(){const _0x2770d2=_0x3ad8df,_0xf47b7a=document[_0x2770d2(0x2ce)](_0x2770d2(0x1c2));_0xf47b7a&&_0xf47b7a[_0x2770d2(0x2f1)](_0x2770d2(0x27c),()=>{const _0xab79cc=_0x2770d2;showContentModal(_0xab79cc(0x269),'scripts/extensions/third-party/ST-Amily2-Chat-Optimisation/HanLin.md');});}function bindInternalUIEvents(){const _0x5d2130=_0x3ad8df,_0x12b14e=document[_0x5d2130(0x2d4)](_0x5d2130(0x2be));_0x12b14e[_0x5d2130(0x2da)](_0x28a958=>{const _0x83f71d=_0x5d2130;_0x28a958['addEventListener'](_0x83f71d(0x27c),()=>{const _0x57dc0d=_0x83f71d,_0x5ea7fa=_0x28a958[_0x57dc0d(0x25e)][_0x57dc0d(0x2d9)],_0xf000a0=_0x57dc0d(0x24d)+_0x5ea7fa+_0x57dc0d(0x1c0);document[_0x57dc0d(0x2d4)](_0x57dc0d(0x2c0))[_0x57dc0d(0x2da)](_0x471315=>{const _0x2e774e=_0x57dc0d;_0x471315[_0x2e774e(0x20b)][_0x2e774e(0x210)](_0x2e774e(0x1cd),_0x471315['id']===_0xf000a0);}),_0x12b14e[_0x57dc0d(0x2da)](_0x50eaf8=>_0x50eaf8[_0x57dc0d(0x20b)]['toggle'](_0x57dc0d(0x1cd),_0x50eaf8===_0x28a958));});});const _0x5165e6=document['getElementById']('hly-api-endpoint');_0x5165e6&&_0x5165e6[_0x5d2130(0x2f1)](_0x5d2130(0x27e),toggleCustomEndpointDocket);const _0x3dce1b=document[_0x5d2130(0x2d4)]('input[name=\x22hly-injection-position\x22]');_0x3dce1b['forEach'](_0x37e0c1=>{const _0x146532=_0x5d2130;_0x37e0c1[_0x146532(0x2f1)]('change',toggleInjectionDetails);});const _0x139af2=document['getElementById'](_0x5d2130(0x2cc)),_0x1ad02f=document[_0x5d2130(0x2ce)](_0x5d2130(0x2fb));_0x139af2&&_0x1ad02f&&_0x139af2['addEventListener'](_0x5d2130(0x27e),()=>{const _0x45b877=_0x5d2130;_0x1ad02f[_0x45b877(0x2d0)][_0x45b877(0x1e6)]=_0x139af2[_0x45b877(0x2d3)]?_0x45b877(0x1c8):_0x45b877(0x2d1);});const _0xecd252=document[_0x5d2130(0x2ce)](_0x5d2130(0x223));_0xecd252&&_0xecd252[_0x5d2130(0x2f1)](_0x5d2130(0x27e),handleWorldbookSelectionChange);const _0x13f258=document['getElementById'](_0x5d2130(0x267));_0x13f258&&_0x13f258[_0x5d2130(0x2f1)](_0x5d2130(0x27c),showExclusionRulesModal);}function toggleInjectionDetails(){const _0x5b5964=_0x3ad8df,_0x41dae2=document[_0x5b5964(0x2c5)](_0x5b5964(0x229))[_0x5b5964(0x232)],_0x52c2ab=document[_0x5b5964(0x2ce)](_0x5b5964(0x2b5)),_0x8b08b4=document[_0x5b5964(0x2ce)](_0x5b5964(0x2b0)),_0x33653a=_0x41dae2==='1';_0x52c2ab[_0x5b5964(0x224)]=!_0x33653a,_0x8b08b4[_0x5b5964(0x224)]=!_0x33653a;}function toggleCustomEndpointDocket(){const _0x516e4d=_0x3ad8df,_0x4c2300=document[_0x516e4d(0x2ce)](_0x516e4d(0x298))[_0x516e4d(0x232)],_0xc464fe=document['getElementById']('hly-custom-endpoint-docket');_0xc464fe&&(_0xc464fe['style'][_0x516e4d(0x1e6)]=_0x4c2300===_0x516e4d(0x19a)||_0x4c2300===_0x516e4d(0x1d2)?_0x516e4d(0x1c8):'none');}function loadSettingsToUI(){const _0x36656b=_0x3ad8df,_0x3c66db=_0x3ae7b8[_0x36656b(0x2a4)]();if(!_0x3c66db)return;document['getElementById'](_0x36656b(0x295))[_0x36656b(0x2d3)]=_0x3c66db['retrieval']['enabled'],document[_0x36656b(0x2ce)](_0x36656b(0x298))[_0x36656b(0x232)]=_0x3c66db[_0x36656b(0x278)][_0x36656b(0x23c)],document[_0x36656b(0x2ce)]('hly-custom-api-url')[_0x36656b(0x232)]=_0x3c66db[_0x36656b(0x278)][_0x36656b(0x238)],document[_0x36656b(0x2ce)]('hly-api-key')[_0x36656b(0x232)]=_0x3c66db[_0x36656b(0x278)][_0x36656b(0x1d3)];const _0x534754=document[_0x36656b(0x2ce)](_0x36656b(0x2a6));if(_0x534754[_0x36656b(0x1cb)]['length']===0x0){const _0x3a5bd6=_0x3c66db['retrieval']['embeddingModel'],_0x4fb46d=new Option(_0x3a5bd6,_0x3a5bd6,!![],!![]);_0x534754['add'](_0x4fb46d);}_0x534754[_0x36656b(0x232)]=_0x3c66db[_0x36656b(0x278)][_0x36656b(0x2dd)],document[_0x36656b(0x2ce)](_0x36656b(0x2b1))[_0x36656b(0x2d3)]=_0x3c66db[_0x36656b(0x278)][_0x36656b(0x2ed)],document[_0x36656b(0x2ce)](_0x36656b(0x2f3))[_0x36656b(0x232)]=_0x3c66db[_0x36656b(0x226)][_0x36656b(0x2db)],document[_0x36656b(0x2ce)](_0x36656b(0x207))[_0x36656b(0x232)]=_0x3c66db['advanced']['overlap'],document['getElementById'](_0x36656b(0x255))[_0x36656b(0x232)]=_0x3c66db[_0x36656b(0x226)][_0x36656b(0x28c)],document[_0x36656b(0x2ce)]('hly-query-message-count')[_0x36656b(0x232)]=_0x3c66db[_0x36656b(0x226)][_0x36656b(0x26a)],document[_0x36656b(0x2ce)]('hly-max-results')[_0x36656b(0x232)]=_0x3c66db[_0x36656b(0x226)][_0x36656b(0x1a8)],document[_0x36656b(0x2ce)](_0x36656b(0x2d5))['value']=_0x3c66db[_0x36656b(0x278)][_0x36656b(0x2ff)],document[_0x36656b(0x2ce)](_0x36656b(0x1e4))[_0x36656b(0x232)]=_0x3c66db[_0x36656b(0x19c)][_0x36656b(0x27b)];const _0x4fcd6f=document[_0x36656b(0x2c5)](_0x36656b(0x1b7)+_0x3c66db[_0x36656b(0x19c)][_0x36656b(0x1f7)]+'\x22]');_0x4fcd6f&&(_0x4fcd6f[_0x36656b(0x2d3)]=!![]);document['getElementById']('hly-injection-depth')['value']=_0x3c66db[_0x36656b(0x19c)][_0x36656b(0x28e)],document[_0x36656b(0x2ce)](_0x36656b(0x2b0))[_0x36656b(0x232)]=_0x3c66db['injection'][_0x36656b(0x2af)],toggleInjectionDetails(),document['getElementById'](_0x36656b(0x1a5))[_0x36656b(0x2d3)]=_0x3c66db['condensation'][_0x36656b(0x2cb)],document['getElementById'](_0x36656b(0x27a))[_0x36656b(0x232)]=_0x3c66db[_0x36656b(0x2f6)]['layerStart'],document['getElementById']('hly-layer-end')['value']=_0x3c66db[_0x36656b(0x2f6)][_0x36656b(0x219)],document['getElementById'](_0x36656b(0x234))['checked']=_0x3c66db[_0x36656b(0x2f6)]['messageTypes']['user'],document[_0x36656b(0x2ce)](_0x36656b(0x29d))[_0x36656b(0x2d3)]=_0x3c66db[_0x36656b(0x2f6)][_0x36656b(0x1cf)]['ai'];const _0x16bdf7=document[_0x36656b(0x2ce)](_0x36656b(0x2cc)),_0x1a36e9=document['getElementById']('hly-tag-input'),_0x30498b=document[_0x36656b(0x2ce)](_0x36656b(0x2fb));_0x16bdf7['checked']=_0x3c66db['condensation']['tagExtractionEnabled'],_0x1a36e9['value']=_0x3c66db[_0x36656b(0x2f6)][_0x36656b(0x2bc)],_0x30498b[_0x36656b(0x2d0)][_0x36656b(0x1e6)]=_0x16bdf7[_0x36656b(0x2d3)]?'block':_0x36656b(0x2d1),document['getElementById']('hly-rerank-enabled')[_0x36656b(0x2d3)]=_0x3c66db[_0x36656b(0x246)][_0x36656b(0x2cb)],document[_0x36656b(0x2ce)](_0x36656b(0x296))[_0x36656b(0x232)]=_0x3c66db[_0x36656b(0x246)][_0x36656b(0x2ca)],document[_0x36656b(0x2ce)]('hly-rerank-api-key')[_0x36656b(0x232)]=_0x3c66db[_0x36656b(0x246)][_0x36656b(0x1d3)];const _0x54b9b5=document[_0x36656b(0x2ce)](_0x36656b(0x199));if(_0x54b9b5[_0x36656b(0x1cb)]['length']===0x0){const _0x4eec9f=_0x3c66db['rerank'][_0x36656b(0x1a0)];if(_0x4eec9f){const _0x3ccc16=new Option(_0x4eec9f,_0x4eec9f,!![],!![]);_0x54b9b5['add'](_0x3ccc16);}}_0x54b9b5[_0x36656b(0x232)]=_0x3c66db['rerank']['model'],document[_0x36656b(0x2ce)]('hly-rerank-top-n')[_0x36656b(0x232)]=_0x3c66db['rerank']['top_n'],document[_0x36656b(0x2ce)](_0x36656b(0x247))[_0x36656b(0x232)]=_0x3c66db['rerank']['hybrid_alpha'],document[_0x36656b(0x2ce)](_0x36656b(0x233))[_0x36656b(0x2d3)]=_0x3c66db[_0x36656b(0x246)][_0x36656b(0x2ed)],toggleCustomEndpointDocket();}function saveSettingsFromUI(_0x4e9a12=!![]){const _0x3096db=_0x3ad8df,_0x2f1b4c=document[_0x3096db(0x2ce)]('hly-modal-container');if(!_0x2f1b4c)return;const _0x54521e=_0x2f1b4c[_0x3096db(0x2d4)]('[data-setting-key]');_0x54521e[_0x3096db(0x2da)](_0x585468=>{const _0x37bb30=_0x3096db,_0x35e440=_0x585468['dataset'][_0x37bb30(0x26f)];if(!_0x35e440)return;let _0x190170;const _0x8ad6b=_0x585468[_0x37bb30(0x25e)][_0x37bb30(0x1a1)]||_0x37bb30(0x201);if(_0x585468['type']===_0x37bb30(0x24e))_0x190170=_0x585468['checked'];else{if(_0x585468['type']===_0x37bb30(0x2ee)){if(!_0x585468[_0x37bb30(0x2d3)])return;_0x190170=_0x585468[_0x37bb30(0x232)];}else _0x190170=_0x585468[_0x37bb30(0x232)];}switch(_0x8ad6b){case _0x37bb30(0x1fd):_0x190170=parseInt(_0x190170,0xa);break;case'float':_0x190170=parseFloat(_0x190170);break;case'boolean':if(typeof _0x190170!==_0x37bb30(0x2d6))_0x190170=_0x190170===_0x37bb30(0x249);break;}const _0x53753b=_0x3ae7b8['getSettings'](),_0xe23284=_0x35e440['split']('.');let _0x314fa4=_0x53753b;for(let _0x3229f6=0x0;_0x3229f6<_0xe23284[_0x37bb30(0x2fa)]-0x1;_0x3229f6++){_0x314fa4=_0x314fa4[_0xe23284[_0x3229f6]]=_0x314fa4[_0xe23284[_0x3229f6]]||{};}_0x314fa4[_0xe23284[_0xe23284['length']-0x1]]=_0x190170;}),_0x3ae7b8[_0x3096db(0x200)](),!_0x4e9a12&&(log(_0x3096db(0x2b4),_0x3096db(0x2aa)),toastr[_0x3096db(0x2aa)](_0x3096db(0x2ea),_0x3096db(0x1dc)));}function resetSettingsToUI(){const _0x1afab0=_0x3ad8df;confirm('您确定要将所有设定恢复为出厂默认值吗?')&&(_0x3ae7b8['resetSettings'](),loadSettingsToUI(),toastr[_0x1afab0(0x2ef)]('翰林院设定已重置为初始状态。','诏曰'));}async function updatePanelStatus(){const _0x1c054e=_0x3ad8df,_0x50c501=_0x3ae7b8[_0x1c054e(0x27d)](),_0x5a7b6a=document[_0x1c054e(0x2ce)]('hly-current-character-name'),_0x239402=document[_0x1c054e(0x2ce)](_0x1c054e(0x2a2));if(_0x50c501){const _0x450b1e=_0x3ae7b8['getLockedSessionInfo']();_0x450b1e&&(_0x5a7b6a[_0x1c054e(0x1e9)]=_0x1c054e(0x300),_0x239402[_0x1c054e(0x1e9)]=_0x450b1e['id'],_0x239402[_0x1c054e(0x240)]=_0x1c054e(0x284)+_0x450b1e['id'],_0x5a7b6a[_0x1c054e(0x20b)][_0x1c054e(0x1a7)]('hly-locked-status'),_0x239402[_0x1c054e(0x20b)][_0x1c054e(0x1a7)](_0x1c054e(0x2ac)));}else _0x5a7b6a[_0x1c054e(0x1e9)]=_0x376d9a[_0x1c054e(0x2c4)](),_0x239402[_0x1c054e(0x1e9)]=_0x376d9a['getChatId']()||'无',_0x239402[_0x1c054e(0x240)]='',_0x5a7b6a[_0x1c054e(0x20b)]['remove'](_0x1c054e(0x2ac)),_0x239402['classList'][_0x1c054e(0x2f9)]('hly-locked-status');const _0x5587c3=document[_0x1c054e(0x2ce)](_0x1c054e(0x208));_0x5587c3[_0x1c054e(0x1e9)]=_0x1c054e(0x1b0);try{const _0x17f835=await _0x3ae7b8[_0x1c054e(0x1aa)]();_0x5587c3[_0x1c054e(0x1e9)]=_0x17f835;}catch(_0x16b193){console[_0x1c054e(0x262)](_0x1c054e(0x211),_0x16b193),_0x5587c3[_0x1c054e(0x1e9)]=_0x1c054e(0x2bd),_0x5587c3['title']=_0x1c054e(0x288)+_0x16b193['message'];}const _0x4c695f=document['getElementById']('hly-condensation-results');if(_0x4c695f&&!_0x4c695f[_0x1c054e(0x25e)][_0x1c054e(0x1ee)]){const _0x1b9d47=_0x3ae7b8[_0x1c054e(0x2a4)](),_0x3b817f=await _0x3ae7b8[_0x1c054e(0x1b9)]();if(_0x1b9d47[_0x1c054e(0x29e)]&&_0x1b9d47['condensationHistory'][_0x3b817f]){const _0x2e40e2=_0x1b9d47[_0x1c054e(0x29e)][_0x3b817f];_0x4c695f['innerHTML']=_0x1c054e(0x2a7)+_0x2e40e2['start']+_0x1c054e(0x292)+_0x2e40e2[_0x1c054e(0x1f1)]+_0x1c054e(0x21d);}else _0x4c695f['innerHTML']='<p\x20class=\x22hly-record-hint\x22>可在此预览凝识结果。</p>';}}async function testApi(){const _0x5845cc=_0x3ad8df;toastr[_0x5845cc(0x2ef)]('正在测试神力连接...','圣旨');try{await _0x3ae7b8[_0x5845cc(0x26c)](),toastr[_0x5845cc(0x2aa)](_0x5845cc(0x2e4),'圣意');}catch(_0x14cabf){toastr[_0x5845cc(0x262)]('神力连接失败:\x20'+_0x14cabf['message'],'警报');}}async function fetchHLYEmbeddingModels(){const _0x354375=_0x3ad8df,_0x16d8d4=document[_0x354375(0x2ce)]('hly-embedding-model'),_0x58e60c=_0x16d8d4[_0x354375(0x232)];_0x16d8d4[_0x354375(0x259)]='<option>正在获取...</option>',_0x16d8d4['disabled']=!![];try{log(_0x354375(0x23b),_0x354375(0x2ef));const _0x4d789c=await _0x3ae7b8[_0x354375(0x20a)]();_0x16d8d4['innerHTML']='';if(_0x4d789c[_0x354375(0x2fa)]===0x0){_0x16d8d4[_0x354375(0x259)]=_0x354375(0x1eb),toastr[_0x354375(0x1ab)]('未能获取到任何模型。','翰林院启奏'),log(_0x354375(0x2e6),_0x354375(0x1ab));return;}_0x4d789c[_0x354375(0x2da)](_0x59fff2=>{const _0x196768=_0x354375,_0x45126d=new Option(_0x59fff2,_0x59fff2);_0x16d8d4[_0x196768(0x1a7)](_0x45126d);}),_0x4d789c[_0x354375(0x1f3)](_0x58e60c)?_0x16d8d4[_0x354375(0x232)]=_0x58e60c:_0x16d8d4[_0x354375(0x1fa)]=0x0,toastr[_0x354375(0x2aa)]('成功获取\x20'+_0x4d789c[_0x354375(0x2fa)]+_0x354375(0x1e1),'圣意'),log(_0x354375(0x22b)+_0x4d789c['length']+_0x354375(0x1e1),_0x354375(0x2aa));}catch(_0x48cd4d){console[_0x354375(0x262)]('[翰林院-枢纽]\x20获取模型列表失败:',_0x48cd4d),toastr['error'](_0x354375(0x22e)+_0x48cd4d['message'],'严重错误'),log('获取模型失败:\x20'+_0x48cd4d[_0x354375(0x1c4)],'error'),_0x16d8d4['innerHTML']=_0x354375(0x2c9);}finally{_0x16d8d4[_0x354375(0x224)]=![];}}async function fetchHLYRerankModels(){const _0x308ee5=_0x3ad8df,_0x3d34e2=document[_0x308ee5(0x2ce)]('hly-rerank-model'),_0x156b87=_0x3d34e2[_0x308ee5(0x232)];_0x3d34e2[_0x308ee5(0x259)]=_0x308ee5(0x1f4),_0x3d34e2['disabled']=!![];try{log('开始获取Rerank模型列表...',_0x308ee5(0x2ef));const _0x477aa1=await _0x3ae7b8[_0x308ee5(0x270)]();_0x3d34e2[_0x308ee5(0x259)]='';if(_0x477aa1['length']===0x0){_0x3d34e2[_0x308ee5(0x259)]=_0x308ee5(0x1eb),toastr[_0x308ee5(0x1ab)]('未能获取到任何Rerank模型。',_0x308ee5(0x2f4)),log(_0x308ee5(0x2fe),'warn');return;}_0x477aa1['forEach'](_0x26acd8=>{const _0x3e0dd9=_0x308ee5,_0x7e97c9=new Option(_0x26acd8,_0x26acd8);_0x3d34e2[_0x3e0dd9(0x1a7)](_0x7e97c9);}),_0x477aa1['includes'](_0x156b87)?_0x3d34e2[_0x308ee5(0x232)]=_0x156b87:_0x3d34e2[_0x308ee5(0x1fa)]=0x0,toastr[_0x308ee5(0x2aa)]('成功获取\x20'+_0x477aa1[_0x308ee5(0x2fa)]+_0x308ee5(0x2cd),'圣意'),log('成功获取\x20'+_0x477aa1['length']+_0x308ee5(0x2cd),_0x308ee5(0x2aa));}catch(_0x3e3ac2){console['error'](_0x308ee5(0x264),_0x3e3ac2),toastr[_0x308ee5(0x262)](_0x308ee5(0x1dd)+_0x3e3ac2[_0x308ee5(0x1c4)],_0x308ee5(0x20e)),log(_0x308ee5(0x1dd)+_0x3e3ac2[_0x308ee5(0x1c4)],_0x308ee5(0x262)),_0x3d34e2[_0x308ee5(0x259)]=_0x308ee5(0x2c9);}finally{_0x3d34e2[_0x308ee5(0x224)]=![];}}async function purgeStorage(){const _0x1a4bec=_0x3ad8df;if(confirm(_0x1a4bec(0x1fb))){toastr[_0x1a4bec(0x2ef)]('正在清空宝库...','圣旨');const _0x150b08=await _0x3ae7b8[_0x1a4bec(0x1f2)]();_0x150b08?toastr[_0x1a4bec(0x2aa)](_0x1a4bec(0x2c7),'圣意'):toastr[_0x1a4bec(0x262)](_0x1a4bec(0x1fe),'警报'),await updatePanelStatus();}}async function startCondensation(){const _0x1a54eb=_0x3ad8df,_0x13c1ff=document[_0x1a54eb(0x2ce)]('hly-condensation-results'),_0x5874d9=_0x13c1ff['dataset'][_0x1a54eb(0x1ee)],_0x356ae2=document['getElementById']('hly-layer-start')['value'],_0x14d298=document['getElementById'](_0x1a54eb(0x290))[_0x1a54eb(0x232)],_0x11a6a7={'start':parseInt(_0x356ae2),'end':parseInt(_0x14d298)};try{if(_0x5874d9&&_0x5874d9[_0x1a54eb(0x1a2)]()){log(_0x1a54eb(0x256),_0x1a54eb(0x2ef)),toastr[_0x1a54eb(0x2ef)](_0x1a54eb(0x2ad),'圣旨'),_0x13c1ff[_0x1a54eb(0x1e9)]=_0x1a54eb(0x2b9);const _0x532be5=await _0x3ae7b8[_0x1a54eb(0x26d)](_0x5874d9,'chat_history',_0x1a54eb(0x1b1)+_0x11a6a7[_0x1a54eb(0x1c1)]+'-'+_0x11a6a7[_0x1a54eb(0x1f1)],()=>{},null,log,()=>{},null,0x0,_0x11a6a7);if(_0x532be5[_0x1a54eb(0x2aa)]){toastr[_0x1a54eb(0x2aa)](_0x1a54eb(0x203)+_0x532be5[_0x1a54eb(0x1d9)]+_0x1a54eb(0x242),_0x1a54eb(0x25b)),log(_0x1a54eb(0x2e8)+_0x532be5[_0x1a54eb(0x1d9)]+'\x20条忆识。',_0x1a54eb(0x2aa));const _0x3c643d=_0x11a6a7[_0x1a54eb(0x1f1)]===0x0?getContext()['chat'][_0x1a54eb(0x2fa)]:_0x11a6a7[_0x1a54eb(0x1f1)];_0x13c1ff[_0x1a54eb(0x1e9)]=_0x1a54eb(0x274)+_0x11a6a7[_0x1a54eb(0x1c1)]+_0x1a54eb(0x1e5)+_0x3c643d+_0x1a54eb(0x1f6)+_0x532be5[_0x1a54eb(0x1d9)]+_0x1a54eb(0x242),delete _0x13c1ff['dataset'][_0x1a54eb(0x1ee)];}else throw new Error(_0x532be5['error']||'未知错误');}else{_0x13c1ff['textContent']=_0x1a54eb(0x2c6),toastr[_0x1a54eb(0x2ef)](_0x1a54eb(0x283),'圣旨'),log('未检测到预览文本,按标准流程采集消息...','info');const _0x3b6e43=_0x3ae7b8[_0x1a54eb(0x19d)]();if(!_0x3b6e43||_0x3b6e43[_0x1a54eb(0x2fa)]===0x0){toastr['warning']('未找到符合条件的消息可供凝识。',_0x1a54eb(0x2f4)),_0x13c1ff[_0x1a54eb(0x1e9)]=_0x1a54eb(0x23e);return;}_0x13c1ff[_0x1a54eb(0x1e9)]=_0x1a54eb(0x20d)+_0x3b6e43[_0x1a54eb(0x2fa)]+_0x1a54eb(0x19f),toastr[_0x1a54eb(0x2ef)](_0x1a54eb(0x20d)+_0x3b6e43[_0x1a54eb(0x2fa)]+_0x1a54eb(0x19f),_0x1a54eb(0x2f4));const _0x593db2=await _0x3ae7b8[_0x1a54eb(0x198)](_0x3b6e43,log,_0x11a6a7);if(_0x593db2['success']){toastr[_0x1a54eb(0x2aa)](_0x1a54eb(0x279)+_0x593db2[_0x1a54eb(0x1d9)]+_0x1a54eb(0x242),_0x1a54eb(0x25b));const _0xd83830=_0x11a6a7[_0x1a54eb(0x1f1)]===0x0?getContext()[_0x1a54eb(0x212)][_0x1a54eb(0x2fa)]:_0x11a6a7[_0x1a54eb(0x1f1)];_0x13c1ff[_0x1a54eb(0x1e9)]='聊天记录从第\x20'+_0x11a6a7[_0x1a54eb(0x1c1)]+_0x1a54eb(0x1e5)+_0xd83830+_0x1a54eb(0x1f6)+_0x593db2[_0x1a54eb(0x1d9)]+_0x1a54eb(0x242);}else throw new Error(_0x593db2[_0x1a54eb(0x262)]||_0x1a54eb(0x2b2));}}catch(_0x526058){console['error']('[翰林院-枢纽]\x20凝识过程发生错误:',_0x526058),toastr[_0x1a54eb(0x262)]('凝识失败:\x20'+_0x526058[_0x1a54eb(0x1c4)],_0x1a54eb(0x20e)),_0x13c1ff[_0x1a54eb(0x1e9)]=_0x1a54eb(0x197)+_0x526058['message'];}finally{await updatePanelStatus();}}async function loadWorldbookList(){const _0xb47aa1=_0x3ad8df,_0x46901e=document['getElementById'](_0xb47aa1(0x223));if(!_0x46901e)return;try{log(_0xb47aa1(0x1c3),_0xb47aa1(0x2ef));const _0x1c63b8=await _0x3162d4['getAvailableWorldbooks']();_0x46901e['innerHTML']=_0xb47aa1(0x25c);if(_0x1c63b8[_0xb47aa1(0x2fa)]===0x0){_0x46901e[_0xb47aa1(0x259)]=_0xb47aa1(0x2f8);return;}_0x1c63b8[_0xb47aa1(0x2da)](_0x474fb0=>{const _0xc29708=_0xb47aa1,_0x47df5c=new Option(_0x474fb0,_0x474fb0);_0x46901e[_0xc29708(0x1a7)](_0x47df5c);}),log(_0xb47aa1(0x24c)+_0x1c63b8[_0xb47aa1(0x2fa)]+_0xb47aa1(0x2a1),_0xb47aa1(0x2aa));}catch(_0x943d89){console[_0xb47aa1(0x262)](_0xb47aa1(0x28a),_0x943d89),log(_0xb47aa1(0x291)+_0x943d89['message'],_0xb47aa1(0x262)),_0x46901e['innerHTML']=_0xb47aa1(0x2c8);}}async function handleWorldbookSelectionChange(){const _0x5a165b=_0x3ad8df,_0x299862=document[_0x5a165b(0x2ce)]('hly-hist-select-library'),_0x53cd47=document['getElementById'](_0x5a165b(0x216)),_0x3d07ed=_0x299862[_0x5a165b(0x232)];_0x53cd47[_0x5a165b(0x259)]=_0x5a165b(0x28d),_0x53cd47[_0x5a165b(0x224)]=!![];if(!_0x3d07ed){_0x53cd47[_0x5a165b(0x259)]=_0x5a165b(0x22d);return;}try{log(_0x5a165b(0x1bf)+_0x3d07ed+_0x5a165b(0x277),'info');const _0x501161=await _0x3162d4[_0x5a165b(0x21b)](_0x3d07ed);_0x53cd47[_0x5a165b(0x259)]=_0x5a165b(0x2d7);if(_0x501161[_0x5a165b(0x2fa)]===0x0){_0x53cd47[_0x5a165b(0x259)]='<option\x20value=\x22\x22>此书库为空</option>';return;}_0x501161[_0x5a165b(0x2da)](_0x34b6ff=>{const _0x1da58c=_0x5a165b,_0x5d6b2b=new Option(_0x34b6ff[_0x1da58c(0x261)]+'\x20(Key:\x20'+_0x34b6ff['key']+')',_0x34b6ff[_0x1da58c(0x2f7)]);_0x53cd47[_0x1da58c(0x1a7)](_0x5d6b2b);}),log(_0x5a165b(0x24c)+_0x501161[_0x5a165b(0x2fa)]+_0x5a165b(0x205),_0x5a165b(0x2aa));}catch(_0x4f78b7){console[_0x5a165b(0x262)]('[翰林院-枢纽]\x20加载《'+_0x3d07ed+_0x5a165b(0x21e),_0x4f78b7),log(_0x5a165b(0x1c6)+_0x4f78b7[_0x5a165b(0x1c4)],_0x5a165b(0x262)),_0x53cd47[_0x5a165b(0x259)]=_0x5a165b(0x2c8);}finally{_0x53cd47[_0x5a165b(0x224)]=![];}}async function startHistoriography(){const _0xebb27f=_0x3ad8df,_0x57bea5=document['getElementById']('hly-hist-select-library')[_0xebb27f(0x232)],_0x3df4fa=document[_0xebb27f(0x2ce)]('hly-hist-select-entry')[_0xebb27f(0x232)],_0x52accd=document[_0xebb27f(0x2ce)](_0xebb27f(0x272));if(!_0x57bea5||!_0x3df4fa){toastr[_0xebb27f(0x2e0)](_0xebb27f(0x293),_0xebb27f(0x2dc));return;}_0x52accd[_0xebb27f(0x1e9)]=_0xebb27f(0x2c3)+_0x57bea5+_0xebb27f(0x21f)+_0x3df4fa+_0xebb27f(0x282),toastr['info'](_0xebb27f(0x237),'圣旨'),log(_0xebb27f(0x28b)+_0x57bea5+'》-'+_0x3df4fa+_0xebb27f(0x25a),_0xebb27f(0x2ef));try{const _0x4cca1a=await _0x3162d4['executeCompilation'](_0x57bea5,_0x3df4fa);if(_0x4cca1a[_0xebb27f(0x2aa)]){const _0x4765a5=document[_0xebb27f(0x2ce)](_0xebb27f(0x216)),_0x3edf61=_0x4765a5[_0xebb27f(0x1cb)][_0x4765a5['selectedIndex']][_0xebb27f(0x251)],_0x1d7f08='《'+_0x57bea5+_0xebb27f(0x2fd)+_0x3edf61+_0xebb27f(0x1d1);_0x52accd[_0xebb27f(0x1e9)]=_0x1d7f08,toastr['success'](_0xebb27f(0x2a9),_0xebb27f(0x25b)),log('对《'+_0x57bea5+'》中条目\x20(Key:\x20'+_0x3df4fa+_0xebb27f(0x299),_0xebb27f(0x2aa));}else throw new Error(_0x4cca1a[_0xebb27f(0x262)]||_0xebb27f(0x1e3));}catch(_0xa1da00){console[_0xebb27f(0x262)](_0xebb27f(0x1e2),_0xa1da00),toastr[_0xebb27f(0x262)](_0xebb27f(0x215)+_0xa1da00[_0xebb27f(0x1c4)],_0xebb27f(0x20e)),_0x52accd[_0xebb27f(0x1e9)]='编纂失败:\x20'+_0xa1da00['message'];}}async function showStats(){const _0x15e74c=_0x3ad8df;try{log(_0x15e74c(0x26e),_0x15e74c(0x2ef)),toastr[_0x15e74c(0x2ef)](_0x15e74c(0x280),'圣旨');const _0x34dde5=await _0x3ae7b8['getVectorCount'](),_0xefc2df=await _0x3ae7b8[_0x15e74c(0x1b9)](),_0x4525af=_0x3ae7b8['getSettings'](),_0x2e7984=_0x15e74c(0x2de)+_0xefc2df+_0x15e74c(0x1f9)+_0x34dde5+'\x0a--------------------\x0aAPI端点:\x20'+_0x4525af[_0x15e74c(0x278)][_0x15e74c(0x23c)]+_0x15e74c(0x297)+_0x4525af[_0x15e74c(0x278)][_0x15e74c(0x2dd)]+_0x15e74c(0x1ef);toastr[_0x15e74c(0x2ef)](_0x2e7984,_0x15e74c(0x2c2),{'timeOut':0x3a98,'extendedTimeOut':0x1388,'tapToDismiss':!![],'closeButton':!![]}),log(_0x15e74c(0x263)+_0xefc2df+',\x20忆识总数='+_0x34dde5,'success');}catch(_0x1e4cf0){console[_0x15e74c(0x262)]('[翰林院-枢纽]\x20查询宝库状态失败:',_0x1e4cf0),toastr[_0x15e74c(0x262)]('查询宝库状态失败:\x20'+_0x1e4cf0[_0x15e74c(0x1c4)],_0x15e74c(0x20e)),log(_0x15e74c(0x23f)+_0x1e4cf0['message'],_0x15e74c(0x262));}}function showExclusionRulesModal(){const _0x121b26=_0x3ad8df,_0x391b3a=_0x3ae7b8[_0x121b26(0x2a4)](),_0x2101d1=_0x391b3a['condensation'][_0x121b26(0x230)]||[],_0x5b5fcd=(_0x2a1385={'start':'','end':''},_0x2b9fea)=>_0x121b26(0x1cc)+_0x2b9fea+_0x121b26(0x27f)+_0x2a1385[_0x121b26(0x1c1)]+_0x121b26(0x1a9)+_0x2a1385[_0x121b26(0x1f1)]+_0x121b26(0x1d7),_0x538860=_0x2101d1[_0x121b26(0x1d0)](_0x5b5fcd)[_0x121b26(0x2a5)](''),_0x3eea51='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22hly-exclusion-rules-container\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20class=\x22hly-notes\x22>在这里定义需要从提取内容中排除的文本片段。例如排除HTML注释可以设置开始字符为\x20`<!--`,结束字符为\x20`-->`。</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22hly-rules-list\x22>'+_0x538860+_0x121b26(0x214);showHtmlModal(_0x121b26(0x221),_0x3eea51,{'okText':'保存规则','onOk':_0x40fca6=>{const _0x34239b=_0x121b26,_0x137930=[];_0x40fca6[_0x34239b(0x1d4)](_0x34239b(0x209))['each'](function(){const _0xdd39d1=_0x34239b,_0x568531=$(this)[_0xdd39d1(0x1d4)](_0xdd39d1(0x1b5))['eq'](0x0)[_0xdd39d1(0x1d6)]()[_0xdd39d1(0x1a2)](),_0x1ce6ad=$(this)[_0xdd39d1(0x1d4)](_0xdd39d1(0x1b5))['eq'](0x1)[_0xdd39d1(0x1d6)]()[_0xdd39d1(0x1a2)]();_0x568531&&_0x1ce6ad&&_0x137930[_0xdd39d1(0x2e3)]({'start':_0x568531,'end':_0x1ce6ad});}),updateAndSaveSetting('condensation.exclusionRules',_0x137930),toastr[_0x34239b(0x2aa)](_0x34239b(0x1ba),_0x34239b(0x1dc));}});const _0x322ac7=document[_0x121b26(0x2ce)](_0x121b26(0x202)),_0xcd2243=_0x322ac7['querySelector'](_0x121b26(0x1ea));_0x322ac7[_0x121b26(0x2c5)]('#hly-add-rule-btn')[_0x121b26(0x2f1)](_0x121b26(0x27c),()=>{const _0x1a1261=_0x121b26,_0x4704cf=_0xcd2243['children'][_0x1a1261(0x2fa)],_0x5954a2=_0x5b5fcd({'start':'','end':''},_0x4704cf);_0xcd2243[_0x1a1261(0x2b6)](_0x1a1261(0x29b),_0x5954a2);}),_0xcd2243['addEventListener'](_0x121b26(0x27c),_0x517bb6=>{const _0x368fe9=_0x121b26;_0x517bb6['target'][_0x368fe9(0x20b)][_0x368fe9(0x1bd)](_0x368fe9(0x28f))&&_0x517bb6[_0x368fe9(0x257)]['closest'](_0x368fe9(0x209))['remove']();});}function previewCondensation(){const _0x26ff9c=_0x3ad8df,_0xd7817a=document[_0x26ff9c(0x2ce)](_0x26ff9c(0x196));try{const _0xe5af8e=_0x3ae7b8[_0x26ff9c(0x2a4)](),_0x49102b=_0xe5af8e['condensation'][_0x26ff9c(0x230)]||[],_0xe59339={'user':document['getElementById'](_0x26ff9c(0x234))[_0x26ff9c(0x2d3)],'ai':document[_0x26ff9c(0x2ce)](_0x26ff9c(0x29d))[_0x26ff9c(0x2d3)]},_0x47b031=document[_0x26ff9c(0x2ce)](_0x26ff9c(0x2cc))['checked'],_0x4c152c=_0x47b031?document[_0x26ff9c(0x2ce)]('hly-tag-input')[_0x26ff9c(0x232)][_0x26ff9c(0x23d)](',')[_0x26ff9c(0x1d0)](_0x3b7c3e=>_0x3b7c3e[_0x26ff9c(0x1a2)]())[_0x26ff9c(0x22f)](Boolean):[],_0x491340=_0x3ae7b8['getMessagesForCondensation'](_0xe59339);if(!_0x491340||_0x491340[_0x26ff9c(0x2fa)]===0x0){_0xd7817a['textContent']=_0x26ff9c(0x302),toastr[_0x26ff9c(0x2e0)](_0x26ff9c(0x23e),_0x26ff9c(0x2f4));return;}const _0x5df05c=_0x491340['map']((_0x455dd7,_0x52b443)=>{const _0x334910=_0x26ff9c;let _0x53a180;if(_0x455dd7['is_user'])_0x53a180=_0x455dd7['mes'];else{if(_0x47b031&&_0x4c152c[_0x334910(0x2fa)]>0x0){const _0x1c9cec=extractBlocksByTags(_0x455dd7[_0x334910(0x281)],_0x4c152c);_0x53a180=_0x1c9cec[_0x334910(0x2a5)]('\x0a\x0a');}else _0x53a180=_0x455dd7[_0x334910(0x281)];_0x53a180=applyExclusionRules(_0x53a180,_0x49102b);}return{'id':_0x334910(0x2e1)+_0x52b443,'name':_0x455dd7[_0x334910(0x1b3)],'content':_0x53a180[_0x334910(0x1a2)]()};})[_0x26ff9c(0x22f)](_0x5d85af=>_0x5d85af[_0x26ff9c(0x253)]);if(_0x5df05c[_0x26ff9c(0x2fa)]===0x0){_0xd7817a[_0x26ff9c(0x1e9)]=_0x26ff9c(0x243),toastr['warning']('根据标签提取或内容排除条件,未找到任何有效内容。','翰林院启奏');return;}const _0x5e2fed=_0x5df05c[_0x26ff9c(0x1d0)]((_0x2fabb5,_0x289ac5)=>_0x26ff9c(0x1d5)+_0x2fabb5['id']+_0x26ff9c(0x276)+(_0x289ac5+0x1)+_0x26ff9c(0x1b4)+_0x2fabb5[_0x26ff9c(0x1b3)]+_0x26ff9c(0x236)+_0x2fabb5[_0x26ff9c(0x253)]+_0x26ff9c(0x2ab)+_0x2fabb5['id']+_0x26ff9c(0x19b))[_0x26ff9c(0x2a5)]('');showHtmlModal(_0x26ff9c(0x294),'<div\x20class=\x22hly-preview-container-v2\x22>'+_0x5e2fed+'</div>',{'okText':'确认并更新预览','onOk':_0x1597d3=>{const _0x3d5bc0=_0x26ff9c,_0x13c9fd=[];_0x1597d3[_0x3d5bc0(0x1d4)](_0x3d5bc0(0x268))[_0x3d5bc0(0x225)](function(){const _0x3a26a0=_0x3d5bc0,_0x161ce2=$(this)[_0x3a26a0(0x1d4)](_0x3a26a0(0x2d2))[_0x3a26a0(0x1d6)]();_0x161ce2[_0x3a26a0(0x1a2)]()&&_0x13c9fd[_0x3a26a0(0x2e3)](_0x161ce2);});const _0x264f2e=_0x13c9fd['join'](_0x3d5bc0(0x1f8)),_0x2fc6f0=document['getElementById']('hly-layer-start')[_0x3d5bc0(0x232)],_0x31f519=document[_0x3d5bc0(0x2ce)](_0x3d5bc0(0x290))[_0x3d5bc0(0x232)];_0xd7817a['textContent']=_0x3d5bc0(0x2e5)+_0x2fc6f0+_0x3d5bc0(0x217)+_0x31f519+_0x3d5bc0(0x2ba)+_0x13c9fd['length']+'\x20条有效条目请点击“开始凝识”进入自动向量化流程。',_0xd7817a[_0x3d5bc0(0x25e)][_0x3d5bc0(0x1ee)]=_0x264f2e,toastr[_0x3d5bc0(0x2aa)]('预览内容已更新,可随时开始凝识。','圣旨已达');}}),$(_0x26ff9c(0x1b2))['on'](_0x26ff9c(0x27c),function(_0x388157){const _0x5a2905=_0x26ff9c;_0x388157['preventDefault']();const _0x525a98=$(this)[_0x5a2905(0x21a)]('target');$('#'+_0x525a98)[_0x5a2905(0x2f9)]();});}catch(_0x49c8bd){console['error'](_0x26ff9c(0x220),_0x49c8bd),_0xd7817a[_0x26ff9c(0x1e9)]=_0x26ff9c(0x1fc)+_0x49c8bd[_0x26ff9c(0x1c4)],toastr[_0x26ff9c(0x262)](_0x26ff9c(0x1fc)+_0x49c8bd[_0x26ff9c(0x1c4)],_0x26ff9c(0x20e));}}function log(_0x91a448,_0x46545c=_0x3ad8df(0x2ef)){const _0x34c887=_0x3ad8df,_0x44ae7d=document[_0x34c887(0x2ce)](_0x34c887(0x252));if(!_0x44ae7d)return;const _0x26a4ee=document[_0x34c887(0x2a0)]('p'),_0x46d3d4=new Date()[_0x34c887(0x1ae)]();let _0x4e6da6=_0x34c887(0x2ec),_0x41bf51='log-info';switch(_0x46545c){case _0x34c887(0x2aa):_0x4e6da6=_0x34c887(0x1ed),_0x41bf51=_0x34c887(0x2b3);break;case _0x34c887(0x262):_0x4e6da6='fa-times-circle',_0x41bf51=_0x34c887(0x2b8);break;case'warn':_0x4e6da6='fa-exclamation-triangle',_0x41bf51='log-warn';break;}_0x26a4ee[_0x34c887(0x218)]=_0x34c887(0x1d8)+_0x41bf51,_0x26a4ee[_0x34c887(0x259)]='<i\x20class=\x22fa-solid\x20'+_0x4e6da6+_0x34c887(0x1e0)+_0x46d3d4+']\x20'+_0x91a448;const _0x4d29d9=_0x44ae7d['querySelector'](_0x34c887(0x1ce));_0x4d29d9&&_0x4d29d9[_0x34c887(0x2f9)](),_0x44ae7d[_0x34c887(0x245)](_0x26a4ee),_0x44ae7d[_0x34c887(0x2bb)]=_0x44ae7d[_0x34c887(0x1ca)];}async function ingestManualText(){const _0x5afa5e=_0x3ad8df,_0x371e96=document[_0x5afa5e(0x2ce)]('hly-manual-text'),_0x42747a=_0x371e96[_0x5afa5e(0x232)][_0x5afa5e(0x1a2)]();if(!_0x42747a){toastr[_0x5afa5e(0x2e0)](_0x5afa5e(0x231),_0x5afa5e(0x2f4)),log(_0x5afa5e(0x25d),_0x5afa5e(0x1ab));return;}log(_0x5afa5e(0x228)+_0x42747a[_0x5afa5e(0x2fa)],'info'),toastr[_0x5afa5e(0x2ef)]('正在处理您提交的文书...','圣旨');try{const _0x1587d9=await _0x3ae7b8[_0x5afa5e(0x26d)](_0x42747a,_0x5afa5e(0x1df),_0x5afa5e(0x26b));if(_0x1587d9[_0x5afa5e(0x2aa)])toastr[_0x5afa5e(0x2aa)](_0x5afa5e(0x203)+_0x1587d9[_0x5afa5e(0x1d9)]+_0x5afa5e(0x242),_0x5afa5e(0x25b)),log(_0x5afa5e(0x25f)+_0x1587d9[_0x5afa5e(0x1d9)]+_0x5afa5e(0x242),_0x5afa5e(0x2aa)),_0x371e96[_0x5afa5e(0x232)]='';else throw new Error(_0x1587d9[_0x5afa5e(0x262)]||_0x5afa5e(0x2b2));}catch(_0x12ba5b){console[_0x5afa5e(0x262)](_0x5afa5e(0x2c1),_0x12ba5b),toastr['error'](_0x5afa5e(0x1ff)+_0x12ba5b[_0x5afa5e(0x1c4)],_0x5afa5e(0x20e)),log(_0x5afa5e(0x2cf)+_0x12ba5b[_0x5afa5e(0x1c4)],_0x5afa5e(0x262));}finally{await updatePanelStatus();}}