mirror of
https://github.com/Wx-2025/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 19:45:50 +00:00
2 lines
34 KiB
JavaScript
2 lines
34 KiB
JavaScript
(function(_0x499061,_0x3ef614){const _0x45d086=_0x35a5,_0x47c15b=_0x499061();while(!![]){try{const _0x2fca8c=-parseInt(_0x45d086(0x1c8))/0x1*(parseInt(_0x45d086(0xc4))/0x2)+-parseInt(_0x45d086(0x177))/0x3*(-parseInt(_0x45d086(0xf3))/0x4)+parseInt(_0x45d086(0xfc))/0x5+parseInt(_0x45d086(0x1c6))/0x6+-parseInt(_0x45d086(0x17b))/0x7*(-parseInt(_0x45d086(0xd2))/0x8)+parseInt(_0x45d086(0xfa))/0x9*(-parseInt(_0x45d086(0x109))/0xa)+-parseInt(_0x45d086(0x1b1))/0xb*(parseInt(_0x45d086(0x11c))/0xc);if(_0x2fca8c===_0x3ef614)break;else _0x47c15b['push'](_0x47c15b['shift']());}catch(_0x5705b7){_0x47c15b['push'](_0x47c15b['shift']());}}}(_0x1815,0x6353d));function _0x1815(){const _0x16ffb4=['notify','未找到符合条件的消息。','style','apiKey','hly-rerank-api-key','此操作将彻底清空当前角色的所有忆识(向量),且无法恢复。您确定要继续吗?',')\x20的编纂任务已完成。','boolean','hly-hist-select-entry','大功告成','收到手动录入请求,文本长度:\x20','preview-item-','content','[自动保存]\x20设置项\x20\x27','checkbox','none','圣谕不明','手动录入失败:\x20','开始对《','batchSize','翰林院使用教程','\x20条忆识。','layerEnd','</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','success','log-error','getSettings','正在处理您确认后的文书...','未能获取到任何模型。','getChatId','未能获取到任何Rerank模型。','push','injection','chunkSize','[翰林院-枢纽]\x20核心法典未能提供初始化圣旨!','hly-rerank-notify','正在处理预览后的文本...','tags','innerHTML','click','block','depth_role','hly-tag-input','scripts/extensions/third-party/ST-Amily2-Chat-Optimisation/HanLin.md','tagExtractionEnabled','[翰林院-枢纽]\x20加载书库列表失败:','getElementById','getAvailableWorldbooks','matchThreshold','hly-current-vector-count','用户尝试录入空文本。','resetHLYSettings','-tab','retrieval','condensation','请先选择一个书库和要编纂的条目。','initialize','成功加载\x20','[data-setting-key]','正在处理您提交的文书...','hly-tag-input-container','编纂任务已完成。','hly-api-endpoint','fa-times-circle','map','filter','name','input[name=\x22','customApiUrl','warn','fetchHLYRerankModels','1836750ZoeWtN','\x20个条目。','hly-current-character-name','hybrid_alpha','9121dpoFjh','获取模型失败:\x20','message','fa-circle-info','getMessagesForCondensation','正在清空宝库...','开始获取模型列表...','join','已采集\x20','true','hly-include-ai','mes','严重错误','正在测试神力连接...','正在为《','\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','warning','\x20条内容进行凝识:\x0a\x0a',')\x20进行编纂...','hly-rerank-hybrid-alpha','textContent','hly-custom-endpoint-docket','target','log-warn','<option>获取失败</option>','hly-retrieval-notify','length','[翰林院-枢纽]\x20获取Rerank模型列表失败:','display','amily2_open_hanlin_tutorial','hly-chunk-size','hly-query-message-count','\x0a--------------------\x0aAPI端点:\x20','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22hly-preview-item-v2\x22\x20id=\x22','ingestHLYManualText','预览失败:\x20','getCharacterName','翰林院设定已重置为初始状态。','data','input[name=\x22hly-injection-position\x22]','\x0a</pre>\x0a\x20\x20\x20\x20\x20\x20\x20\x20','hly-rerank-url','hly-injection-depth','type','enabled','split','凝识失败:\x20','圣旨已达','error','querySelector','executeCompilation','change','hly-layer-start','翰林院设定已存档封印。','8689318eSiTCK','[翰林院-枢纽]\x20已成功连接各部,政令畅通。','加载书库列表失败:\x20','\x0a忆识总数:\x20','key','active','user','className','开始获取Rerank模型列表...','comment','getLoresForWorldbook','清空宝库失败。','getCollectionId','layerStart','toLocaleTimeString','checked','正在准备凝识...','》获取条目列表...','hly-include-user','最终将对以下\x20','[翰林院-枢纽]\x20凝识过程发生错误:','3747222jRWpkV','hly-rerank-model','1zxVfSz','hly-rerank-enabled',']\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>','hly-manual-text','add','count','tab','根据标签提取条件,未找到任何有效内容。','\x22\x20title=\x22删除此条\x22>×</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20','appendChild','\x20条消息,开始凝识...','hly-embedding-model','disabled','209234wiLTYm','[翰林院-枢纽]\x20预览过程发生错误:','value','.hly-nav-item','<option\x20value=\x22\x22>此书库为空</option>','》中的条目\x20(Key:\x20','<option\x20value=\x22\x22>加载失败</option>','》的条目失败:','querySelectorAll','azure','log-success','hly-injection-role','startHLYCondensation','确认并更新预览','616kRbTvG','.hly-preview-delete-btn-v2','[翰林院-枢纽]\x20编纂过程发生错误:','fa-check-circle','用户请求查看宝库状态。','previewHLYCondensation','神力连接失败:\x20','hly-','forEach','<i\x20class=\x22fa-solid\x20','overlap','预览并编辑凝识内容','hly-max-results','saveSettings','手动录入成功,新增\x20','宝库已清空。','remove','hly-api-key','model','scrollTop','maxResults','准备对《','purgeStorage','获取Rerank模型失败:\x20','成功获取\x20','info','[翰林院-枢纽]\x20手动录入过程发生错误:','【手动存档】所有设定已存档封印。','options','trim','未知的编纂错误','find','凝识完成!新增\x20','4XPFnAf','dataset','string','<option\x20value=\x22\x22>请先选择书库</option>','settingKey','<div\x20class=\x22hly-preview-container-v2\x22>','[翰林院-枢纽]\x20未能获取SillyTavern上下文,绑定失败。','9uoMCRq','hly-custom-api-url','2368805ZRufOu','hly-modal-container','编纂任务已开始...','文书已成功录入宝库,新增\x20','.hly-preview-item-v2','finalText','未找到符合条件的消息可供凝识。','classList','.hly-log-placeholder','hly-condensation-results','includes','resetSettings','apiEndpoint','5094790HaDtlx','\x27\x20已更新为:\x20','ingestTextToHanlinyuan','radio','[翰林院-枢纽]\x20加载《','getVectorCount','</div>','hly-injection-template','编纂失败:\x20','log-info','float','录入内容不能为空。','正在获取可用书库列表...','.hly-tab-pane','hly-hist-select-library','\x22></i>\x20[','<option>未找到模型</option>','\x20个模型。','hly-tag-extraction-toggle','12rtyFsm','input[name=\x22hly-injection-position\x22][value=\x22','翰林院启奏','addEventListener','fetchHLYEmbeddingModels','depth','advanced','selectedIndex','<option>正在获取...</option>','showHLYStats','<option\x20value=\x22\x22>请选择一个书库...</option>','hly-rerank-top-n','embeddingModel','from','hly-layer-end','integer','rerank','...','未知错误','\x20进行编纂...'];_0x1815=function(){return _0x16ffb4;};return _0x1815();}import{getContext}from'/scripts/extensions.js';import*as _0x384ded from'../core/rag-processor.js';import*as _0x30b7df from'../core/historiographer.js';function _0x35a5(_0x3e7170,_0x3489d8){const _0x1815cc=_0x1815();return _0x35a5=function(_0x35a52e,_0x44735a){_0x35a52e=_0x35a52e-0xc2;let _0x3d9fc6=_0x1815cc[_0x35a52e];return _0x3d9fc6;},_0x35a5(_0x3e7170,_0x3489d8);}import*as _0x24f29f from'../core/utils/context-utils.js';import{showContentModal,showHtmlModal}from'./page-window.js';import{extractBlocksByTags}from'../core/utils/rag-tag-extractor.js';'use\x20strict';function setupGlobalEventHandlers(){const _0x723b53=_0x35a5;window['saveHLYSettings']=()=>saveSettingsFromUI(![]),window[_0x723b53(0x163)]=resetSettingsToUI,window['testHLYApi']=testApi,window[_0x723b53(0x120)]=fetchHLYEmbeddingModels,window[_0x723b53(0x176)]=fetchHLYRerankModels,window['updateHLYMemoryCount']=updatePanelStatus,window['purgeHLYStorage']=purgeStorage,window[_0x723b53(0xd0)]=startCondensation,window[_0x723b53(0xd7)]=previewCondensation,window[_0x723b53(0x19d)]=ingestManualText,window['hlyLog']=log,window[_0x723b53(0x125)]=showStats,window['startHLYHistoriography']=startHistoriography;}function updateAndSaveSetting(_0x315a6c,_0x203849){const _0x2a4eb8=_0x35a5,_0x5edae0=_0x384ded[_0x2a4eb8(0x14a)]();if(!_0x5edae0)return;const _0x38b5f3=_0x315a6c[_0x2a4eb8(0x1a8)]('.');let _0x87000a=_0x5edae0;for(let _0x55c0fa=0x0;_0x55c0fa<_0x38b5f3['length']-0x1;_0x55c0fa++){_0x87000a=_0x87000a[_0x38b5f3[_0x55c0fa]]=_0x87000a[_0x38b5f3[_0x55c0fa]]||{};}_0x87000a[_0x38b5f3[_0x38b5f3[_0x2a4eb8(0x195)]-0x1]]=_0x203849,_0x384ded[_0x2a4eb8(0xdf)](),log(_0x2a4eb8(0x13d)+_0x315a6c+_0x2a4eb8(0x10a)+JSON['stringify'](_0x203849),_0x2a4eb8(0x148));}function bindAutoSaveEvents(){const _0x4f11c4=_0x35a5,_0x56722e=document[_0x4f11c4(0x15e)](_0x4f11c4(0xfd));if(!_0x56722e)return;_0x56722e['addEventListener'](_0x4f11c4(0x1ae),_0x39b5ec=>{const _0x5d626b=_0x4f11c4,_0x482e28=_0x39b5ec[_0x5d626b(0x191)],_0x4c8683=_0x482e28[_0x5d626b(0xf4)][_0x5d626b(0xf7)];if(!_0x4c8683)return;let _0x16e64e;const _0xf66488=_0x482e28[_0x5d626b(0xf4)][_0x5d626b(0x1a6)]||_0x5d626b(0xf5);if(_0x482e28[_0x5d626b(0x1a6)]===_0x5d626b(0x13e))_0x16e64e=_0x482e28[_0x5d626b(0x1c0)];else{if(_0x482e28['type']===_0x5d626b(0x10c)){if(_0x482e28[_0x5d626b(0x1c0)]){const _0x526365=_0x56722e[_0x5d626b(0xcc)](_0x5d626b(0x173)+_0x482e28[_0x5d626b(0x172)]+'\x22]'),_0xaefa6=Array[_0x5d626b(0x129)](_0x526365)[_0x5d626b(0xf1)](_0x5844a7=>_0x5844a7[_0x5d626b(0x1c0)]);_0x16e64e=_0xaefa6[_0x5d626b(0xc6)];}else return;}else _0x16e64e=_0x482e28['value'];}switch(_0xf66488){case _0x5d626b(0x12b):_0x16e64e=parseInt(_0x16e64e,0xa);break;case _0x5d626b(0x113):_0x16e64e=parseFloat(_0x16e64e);break;case _0x5d626b(0x137):typeof _0x16e64e!=='boolean'&&(_0x16e64e=_0x16e64e===_0x5d626b(0x184));break;}if(_0x482e28[_0x5d626b(0x1a6)]==='radio'&&!_0x482e28[_0x5d626b(0x1c0)])return;updateAndSaveSetting(_0x4c8683,_0x16e64e);});}export function bindHanlinyuanEvents(){const _0x58b207=_0x35a5,_0x3ba2d7=getContext();if(!_0x3ba2d7){console[_0x58b207(0x1ab)](_0x58b207(0xf9));return;}setupGlobalEventHandlers(),bindPanelToggleEvents(),bindInternalUIEvents(),bindTutorialEvents(),bindAutoSaveEvents();if(_0x384ded[_0x58b207(0x168)])_0x384ded['initialize']();else{console[_0x58b207(0x1ab)](_0x58b207(0x152));return;}loadSettingsToUI(),loadWorldbookList(),log(_0x58b207(0x1b2),'info');}function bindPanelToggleEvents(){const _0x57b57d=document['getElementById']('amily2_open_rag_palace');if(_0x57b57d){}}function bindTutorialEvents(){const _0xb6718=_0x35a5,_0x378751=document['getElementById'](_0xb6718(0x198));_0x378751&&_0x378751[_0xb6718(0x11f)](_0xb6718(0x157),()=>{const _0x10cbcc=_0xb6718;showContentModal(_0x10cbcc(0x144),_0x10cbcc(0x15b));});}function bindInternalUIEvents(){const _0x452098=_0x35a5,_0x301683=document[_0x452098(0xcc)](_0x452098(0xc7));_0x301683[_0x452098(0xda)](_0x80d354=>{const _0x13c968=_0x452098;_0x80d354[_0x13c968(0x11f)](_0x13c968(0x157),()=>{const _0x131ffb=_0x13c968,_0x4d5371=_0x80d354[_0x131ffb(0xf4)][_0x131ffb(0x1ce)],_0xc87cfd=_0x131ffb(0xd9)+_0x4d5371+_0x131ffb(0x164);document['querySelectorAll'](_0x131ffb(0x116))['forEach'](_0x23fedc=>{const _0x449af8=_0x131ffb;_0x23fedc[_0x449af8(0x103)]['toggle'](_0x449af8(0x1b6),_0x23fedc['id']===_0xc87cfd);}),_0x301683['forEach'](_0x85246f=>_0x85246f[_0x131ffb(0x103)]['toggle'](_0x131ffb(0x1b6),_0x85246f===_0x80d354));});});const _0x12cafd=document[_0x452098(0x15e)](_0x452098(0x16e));_0x12cafd&&_0x12cafd['addEventListener'](_0x452098(0x1ae),toggleCustomEndpointDocket);const _0x527d07=document[_0x452098(0xcc)](_0x452098(0x1a2));_0x527d07[_0x452098(0xda)](_0x30ffd5=>{const _0x4be260=_0x452098;_0x30ffd5['addEventListener'](_0x4be260(0x1ae),toggleInjectionDetails);});const _0x290589=document[_0x452098(0x15e)](_0x452098(0x11b)),_0x38d966=document[_0x452098(0x15e)](_0x452098(0x16c));_0x290589&&_0x38d966&&_0x290589[_0x452098(0x11f)](_0x452098(0x1ae),()=>{const _0x2102e6=_0x452098;_0x38d966[_0x2102e6(0x132)][_0x2102e6(0x197)]=_0x290589[_0x2102e6(0x1c0)]?_0x2102e6(0x158):_0x2102e6(0x13f);});const _0x37ccd8=document[_0x452098(0x15e)]('hly-hist-select-library');_0x37ccd8&&_0x37ccd8[_0x452098(0x11f)]('change',handleWorldbookSelectionChange);}function toggleInjectionDetails(){const _0x4d821c=_0x35a5,_0x3c7f1e=document['querySelector']('input[name=\x22hly-injection-position\x22]:checked')[_0x4d821c(0xc6)],_0x224fd0=document[_0x4d821c(0x15e)](_0x4d821c(0x1a5)),_0x205519=document[_0x4d821c(0x15e)]('hly-injection-role'),_0x35598f=_0x3c7f1e==='1';_0x224fd0['disabled']=!_0x35598f,_0x205519[_0x4d821c(0xc3)]=!_0x35598f;}function toggleCustomEndpointDocket(){const _0x5eafc3=_0x35a5,_0x51b2b1=document[_0x5eafc3(0x15e)](_0x5eafc3(0x16e))['value'],_0x2d0402=document[_0x5eafc3(0x15e)](_0x5eafc3(0x190));_0x2d0402&&(_0x2d0402[_0x5eafc3(0x132)][_0x5eafc3(0x197)]=_0x51b2b1==='custom'||_0x51b2b1===_0x5eafc3(0xcd)?_0x5eafc3(0x158):'none');}function loadSettingsToUI(){const _0x494640=_0x35a5,_0x2f1051=_0x384ded[_0x494640(0x14a)]();if(!_0x2f1051)return;document[_0x494640(0x15e)]('hly-retrieval-enabled')['checked']=_0x2f1051[_0x494640(0x165)][_0x494640(0x1a7)],document[_0x494640(0x15e)](_0x494640(0x16e))[_0x494640(0xc6)]=_0x2f1051[_0x494640(0x165)][_0x494640(0x108)],document[_0x494640(0x15e)](_0x494640(0xfb))[_0x494640(0xc6)]=_0x2f1051[_0x494640(0x165)][_0x494640(0x174)],document[_0x494640(0x15e)](_0x494640(0xe3))[_0x494640(0xc6)]=_0x2f1051['retrieval'][_0x494640(0x133)];const _0x4c91e1=document[_0x494640(0x15e)](_0x494640(0xc2));if(_0x4c91e1[_0x494640(0xee)][_0x494640(0x195)]===0x0){const _0x23387b=_0x2f1051[_0x494640(0x165)][_0x494640(0x128)],_0x5642bc=new Option(_0x23387b,_0x23387b,!![],!![]);_0x4c91e1[_0x494640(0x1cc)](_0x5642bc);}_0x4c91e1['value']=_0x2f1051[_0x494640(0x165)]['embeddingModel'],document[_0x494640(0x15e)](_0x494640(0x194))[_0x494640(0x1c0)]=_0x2f1051['retrieval'][_0x494640(0x130)],document['getElementById'](_0x494640(0x199))[_0x494640(0xc6)]=_0x2f1051['advanced'][_0x494640(0x151)],document[_0x494640(0x15e)]('hly-overlap-size')[_0x494640(0xc6)]=_0x2f1051['advanced'][_0x494640(0xdc)],document['getElementById']('hly-match-threshold')[_0x494640(0xc6)]=_0x2f1051['advanced'][_0x494640(0x160)],document['getElementById'](_0x494640(0x19a))[_0x494640(0xc6)]=_0x2f1051[_0x494640(0x122)]['queryMessageCount'],document[_0x494640(0x15e)](_0x494640(0xde))[_0x494640(0xc6)]=_0x2f1051[_0x494640(0x122)][_0x494640(0xe6)],document[_0x494640(0x15e)]('hly-batch-size')[_0x494640(0xc6)]=_0x2f1051['retrieval'][_0x494640(0x143)],document[_0x494640(0x15e)](_0x494640(0x110))[_0x494640(0xc6)]=_0x2f1051['injection']['template'];const _0x2dc864=document[_0x494640(0x1ac)](_0x494640(0x11d)+_0x2f1051[_0x494640(0x150)]['position']+'\x22]');_0x2dc864&&(_0x2dc864[_0x494640(0x1c0)]=!![]);document['getElementById']('hly-injection-depth')[_0x494640(0xc6)]=_0x2f1051['injection'][_0x494640(0x121)],document[_0x494640(0x15e)](_0x494640(0xcf))[_0x494640(0xc6)]=_0x2f1051[_0x494640(0x150)][_0x494640(0x159)],toggleInjectionDetails(),document[_0x494640(0x15e)]('hly-condensation-enabled')['checked']=_0x2f1051['condensation']['enabled'],document['getElementById'](_0x494640(0x1af))['value']=_0x2f1051[_0x494640(0x166)][_0x494640(0x1be)],document[_0x494640(0x15e)](_0x494640(0x12a))['value']=_0x2f1051['condensation'][_0x494640(0x146)],document[_0x494640(0x15e)]('hly-include-user')[_0x494640(0x1c0)]=_0x2f1051[_0x494640(0x166)]['messageTypes'][_0x494640(0x1b7)],document[_0x494640(0x15e)](_0x494640(0x185))[_0x494640(0x1c0)]=_0x2f1051[_0x494640(0x166)]['messageTypes']['ai'];const _0x2022cf=document['getElementById'](_0x494640(0x11b)),_0x54d781=document[_0x494640(0x15e)](_0x494640(0x15a)),_0xc08c33=document[_0x494640(0x15e)](_0x494640(0x16c));_0x2022cf['checked']=_0x2f1051[_0x494640(0x166)][_0x494640(0x15c)],_0x54d781[_0x494640(0xc6)]=_0x2f1051['condensation'][_0x494640(0x155)],_0xc08c33['style'][_0x494640(0x197)]=_0x2022cf[_0x494640(0x1c0)]?_0x494640(0x158):_0x494640(0x13f),document[_0x494640(0x15e)](_0x494640(0x1c9))[_0x494640(0x1c0)]=_0x2f1051[_0x494640(0x12c)][_0x494640(0x1a7)],document[_0x494640(0x15e)](_0x494640(0x1a4))[_0x494640(0xc6)]=_0x2f1051[_0x494640(0x12c)]['url'],document[_0x494640(0x15e)](_0x494640(0x134))[_0x494640(0xc6)]=_0x2f1051[_0x494640(0x12c)]['apiKey'];const _0x43844f=document[_0x494640(0x15e)](_0x494640(0x1c7));if(_0x43844f[_0x494640(0xee)]['length']===0x0){const _0x50e841=_0x2f1051[_0x494640(0x12c)][_0x494640(0xe4)];if(_0x50e841){const _0x10e00c=new Option(_0x50e841,_0x50e841,!![],!![]);_0x43844f[_0x494640(0x1cc)](_0x10e00c);}}_0x43844f[_0x494640(0xc6)]=_0x2f1051[_0x494640(0x12c)]['model'],document['getElementById'](_0x494640(0x127))[_0x494640(0xc6)]=_0x2f1051['rerank']['top_n'],document[_0x494640(0x15e)](_0x494640(0x18e))[_0x494640(0xc6)]=_0x2f1051[_0x494640(0x12c)][_0x494640(0x17a)],document[_0x494640(0x15e)](_0x494640(0x153))[_0x494640(0x1c0)]=_0x2f1051[_0x494640(0x12c)][_0x494640(0x130)],toggleCustomEndpointDocket();}function saveSettingsFromUI(_0x542eea=!![]){const _0x3b6f63=_0x35a5,_0x352c7d=document[_0x3b6f63(0x15e)](_0x3b6f63(0xfd));if(!_0x352c7d)return;const _0x532370=_0x352c7d['querySelectorAll'](_0x3b6f63(0x16a));_0x532370[_0x3b6f63(0xda)](_0x578134=>{const _0x423d38=_0x3b6f63,_0x1bf108=_0x578134[_0x423d38(0xf4)][_0x423d38(0xf7)];if(!_0x1bf108)return;let _0x150190;const _0x3cd3fb=_0x578134['dataset'][_0x423d38(0x1a6)]||_0x423d38(0xf5);if(_0x578134[_0x423d38(0x1a6)]===_0x423d38(0x13e))_0x150190=_0x578134[_0x423d38(0x1c0)];else{if(_0x578134[_0x423d38(0x1a6)]===_0x423d38(0x10c)){if(!_0x578134[_0x423d38(0x1c0)])return;_0x150190=_0x578134[_0x423d38(0xc6)];}else _0x150190=_0x578134[_0x423d38(0xc6)];}switch(_0x3cd3fb){case _0x423d38(0x12b):_0x150190=parseInt(_0x150190,0xa);break;case _0x423d38(0x113):_0x150190=parseFloat(_0x150190);break;case _0x423d38(0x137):if(typeof _0x150190!==_0x423d38(0x137))_0x150190=_0x150190===_0x423d38(0x184);break;}const _0x371496=_0x384ded[_0x423d38(0x14a)](),_0xc7a487=_0x1bf108[_0x423d38(0x1a8)]('.');let _0x33b514=_0x371496;for(let _0x2f5f1f=0x0;_0x2f5f1f<_0xc7a487[_0x423d38(0x195)]-0x1;_0x2f5f1f++){_0x33b514=_0x33b514[_0xc7a487[_0x2f5f1f]]=_0x33b514[_0xc7a487[_0x2f5f1f]]||{};}_0x33b514[_0xc7a487[_0xc7a487['length']-0x1]]=_0x150190;}),_0x384ded['saveSettings'](),!_0x542eea&&(log(_0x3b6f63(0xed),_0x3b6f63(0x148)),toastr[_0x3b6f63(0x148)](_0x3b6f63(0x1b0),'圣旨已达'));}function resetSettingsToUI(){const _0xb6a481=_0x35a5;confirm('您确定要将所有设定恢复为出厂默认值吗?')&&(_0x384ded[_0xb6a481(0x107)](),loadSettingsToUI(),toastr[_0xb6a481(0xeb)](_0xb6a481(0x1a0),'诏曰'));}async function updatePanelStatus(){const _0x54b397=_0x35a5;document[_0x54b397(0x15e)](_0x54b397(0x179))[_0x54b397(0x18f)]=_0x24f29f[_0x54b397(0x19f)](),document[_0x54b397(0x15e)]('hly-current-chat-id')['textContent']=_0x24f29f[_0x54b397(0x14d)]()||'无';const _0x175a4a=document['getElementById'](_0x54b397(0x161));_0x175a4a[_0x54b397(0x18f)]=_0x54b397(0x12d);try{const _0x32d77a=await _0x384ded[_0x54b397(0x10e)]();_0x175a4a[_0x54b397(0x18f)]=_0x32d77a;}catch(_0x30529f){console['error']('[翰林院-枢纽]\x20更新忆识数量失败:',_0x30529f),_0x175a4a[_0x54b397(0x18f)]='错误';}}async function testApi(){const _0x17c6b6=_0x35a5;toastr[_0x17c6b6(0xeb)](_0x17c6b6(0x188),'圣旨');try{await _0x384ded['testApiConnection'](),toastr['success']('神力连接通畅!','圣意');}catch(_0x2d3a7b){toastr[_0x17c6b6(0x1ab)](_0x17c6b6(0xd8)+_0x2d3a7b[_0x17c6b6(0x17d)],'警报');}}async function fetchHLYEmbeddingModels(){const _0x1f1fe5=_0x35a5,_0xd16a72=document[_0x1f1fe5(0x15e)](_0x1f1fe5(0xc2)),_0x4ab491=_0xd16a72[_0x1f1fe5(0xc6)];_0xd16a72[_0x1f1fe5(0x156)]=_0x1f1fe5(0x124),_0xd16a72['disabled']=!![];try{log(_0x1f1fe5(0x181),_0x1f1fe5(0xeb));const _0x25ad45=await _0x384ded['fetchEmbeddingModels']();_0xd16a72[_0x1f1fe5(0x156)]='';if(_0x25ad45['length']===0x0){_0xd16a72['innerHTML']=_0x1f1fe5(0x119),toastr[_0x1f1fe5(0x175)](_0x1f1fe5(0x14c),_0x1f1fe5(0x11e)),log(_0x1f1fe5(0x14c),_0x1f1fe5(0x175));return;}_0x25ad45['forEach'](_0x1aa725=>{const _0x3a79c2=_0x1f1fe5,_0x120459=new Option(_0x1aa725,_0x1aa725);_0xd16a72[_0x3a79c2(0x1cc)](_0x120459);}),_0x25ad45[_0x1f1fe5(0x106)](_0x4ab491)?_0xd16a72[_0x1f1fe5(0xc6)]=_0x4ab491:_0xd16a72[_0x1f1fe5(0x123)]=0x0,toastr['success'](_0x1f1fe5(0xea)+_0x25ad45[_0x1f1fe5(0x195)]+_0x1f1fe5(0x11a),'圣意'),log('成功获取\x20'+_0x25ad45[_0x1f1fe5(0x195)]+'\x20个模型。',_0x1f1fe5(0x148));}catch(_0x563456){console[_0x1f1fe5(0x1ab)]('[翰林院-枢纽]\x20获取模型列表失败:',_0x563456),toastr[_0x1f1fe5(0x1ab)](_0x1f1fe5(0x17c)+_0x563456[_0x1f1fe5(0x17d)],_0x1f1fe5(0x187)),log('获取模型失败:\x20'+_0x563456[_0x1f1fe5(0x17d)],_0x1f1fe5(0x1ab)),_0xd16a72[_0x1f1fe5(0x156)]=_0x1f1fe5(0x193);}finally{_0xd16a72[_0x1f1fe5(0xc3)]=![];}}async function fetchHLYRerankModels(){const _0x3db5c6=_0x35a5,_0xc09a62=document[_0x3db5c6(0x15e)](_0x3db5c6(0x1c7)),_0x237a83=_0xc09a62[_0x3db5c6(0xc6)];_0xc09a62[_0x3db5c6(0x156)]='<option>正在获取...</option>',_0xc09a62[_0x3db5c6(0xc3)]=!![];try{log(_0x3db5c6(0x1b9),_0x3db5c6(0xeb));const _0x206ddd=await _0x384ded['fetchRerankModels']();_0xc09a62['innerHTML']='';if(_0x206ddd['length']===0x0){_0xc09a62[_0x3db5c6(0x156)]=_0x3db5c6(0x119),toastr['warn'](_0x3db5c6(0x14e),_0x3db5c6(0x11e)),log(_0x3db5c6(0x14e),_0x3db5c6(0x175));return;}_0x206ddd[_0x3db5c6(0xda)](_0x536737=>{const _0x5cdced=_0x3db5c6,_0xf7a18b=new Option(_0x536737,_0x536737);_0xc09a62[_0x5cdced(0x1cc)](_0xf7a18b);}),_0x206ddd[_0x3db5c6(0x106)](_0x237a83)?_0xc09a62[_0x3db5c6(0xc6)]=_0x237a83:_0xc09a62['selectedIndex']=0x0,toastr[_0x3db5c6(0x148)](_0x3db5c6(0xea)+_0x206ddd[_0x3db5c6(0x195)]+'\x20个Rerank模型。','圣意'),log(_0x3db5c6(0xea)+_0x206ddd['length']+'\x20个Rerank模型。',_0x3db5c6(0x148));}catch(_0x19d83a){console['error'](_0x3db5c6(0x196),_0x19d83a),toastr[_0x3db5c6(0x1ab)](_0x3db5c6(0xe9)+_0x19d83a['message'],_0x3db5c6(0x187)),log(_0x3db5c6(0xe9)+_0x19d83a['message'],_0x3db5c6(0x1ab)),_0xc09a62[_0x3db5c6(0x156)]='<option>获取失败</option>';}finally{_0xc09a62[_0x3db5c6(0xc3)]=![];}}async function purgeStorage(){const _0x376f0c=_0x35a5;if(confirm(_0x376f0c(0x135))){toastr[_0x376f0c(0xeb)](_0x376f0c(0x180),'圣旨');const _0x3f92a7=await _0x384ded[_0x376f0c(0xe8)]();_0x3f92a7?toastr[_0x376f0c(0x148)](_0x376f0c(0xe1),'圣意'):toastr[_0x376f0c(0x1ab)](_0x376f0c(0x1bc),'警报'),await updatePanelStatus();}}async function startCondensation(){const _0x35e1a3=_0x35a5,_0x2ec6a7=document[_0x35e1a3(0x15e)](_0x35e1a3(0x105)),_0x3b0d03=_0x2ec6a7[_0x35e1a3(0xf4)][_0x35e1a3(0x101)];try{if(_0x3b0d03&&_0x3b0d03[_0x35e1a3(0xef)]()){log('检测到预览后待处理的文本,开始直接凝识...','info'),toastr[_0x35e1a3(0xeb)](_0x35e1a3(0x14b),'圣旨'),_0x2ec6a7[_0x35e1a3(0x18f)]=_0x35e1a3(0x154);const _0x583acf=await _0x384ded[_0x35e1a3(0x10b)](_0x3b0d03);if(_0x583acf[_0x35e1a3(0x148)])toastr[_0x35e1a3(0x148)](_0x35e1a3(0xff)+_0x583acf['count']+_0x35e1a3(0x145),_0x35e1a3(0x139)),log('预览后文本录入成功,新增\x20'+_0x583acf['count']+_0x35e1a3(0x145),_0x35e1a3(0x148)),_0x2ec6a7[_0x35e1a3(0x18f)]=_0x35e1a3(0xf2)+_0x583acf[_0x35e1a3(0x1cd)]+_0x35e1a3(0x145),delete _0x2ec6a7[_0x35e1a3(0xf4)][_0x35e1a3(0x101)];else throw new Error(_0x583acf[_0x35e1a3(0x1ab)]||_0x35e1a3(0x12e));}else{_0x2ec6a7[_0x35e1a3(0x18f)]='正在采集消息...',toastr[_0x35e1a3(0xeb)](_0x35e1a3(0x1c1),'圣旨'),log('未检测到预览文本,按标准流程采集消息...',_0x35e1a3(0xeb));const _0x6ff13d=_0x384ded['getMessagesForCondensation']();if(!_0x6ff13d||_0x6ff13d[_0x35e1a3(0x195)]===0x0){toastr[_0x35e1a3(0x18b)](_0x35e1a3(0x102),_0x35e1a3(0x11e)),_0x2ec6a7[_0x35e1a3(0x18f)]='未找到符合条件的消息。';return;}_0x2ec6a7['textContent']=_0x35e1a3(0x183)+_0x6ff13d[_0x35e1a3(0x195)]+'\x20条消息,开始凝识...',toastr['info'](_0x35e1a3(0x183)+_0x6ff13d['length']+_0x35e1a3(0x1d2),_0x35e1a3(0x11e));const _0x1e29ec=await _0x384ded['processCondensation'](_0x6ff13d);if(_0x1e29ec[_0x35e1a3(0x148)])toastr[_0x35e1a3(0x148)](_0x35e1a3(0xf2)+_0x1e29ec['count']+_0x35e1a3(0x145),'大功告成'),_0x2ec6a7[_0x35e1a3(0x18f)]='凝识完成!新增\x20'+_0x1e29ec[_0x35e1a3(0x1cd)]+'\x20条忆识。';else throw new Error(_0x1e29ec[_0x35e1a3(0x1ab)]||_0x35e1a3(0x12e));}}catch(_0x472a55){console['error'](_0x35e1a3(0x1c5),_0x472a55),toastr[_0x35e1a3(0x1ab)]('凝识失败:\x20'+_0x472a55[_0x35e1a3(0x17d)],'严重错误'),_0x2ec6a7[_0x35e1a3(0x18f)]=_0x35e1a3(0x1a9)+_0x472a55['message'];}finally{await updatePanelStatus();}}async function loadWorldbookList(){const _0x2eec28=_0x35a5,_0x244533=document['getElementById'](_0x2eec28(0x117));if(!_0x244533)return;try{log(_0x2eec28(0x115),_0x2eec28(0xeb));const _0x1d1076=await _0x30b7df[_0x2eec28(0x15f)]();_0x244533[_0x2eec28(0x156)]=_0x2eec28(0x126);if(_0x1d1076['length']===0x0){_0x244533['innerHTML']='<option\x20value=\x22\x22>未找到任何书库</option>';return;}_0x1d1076[_0x2eec28(0xda)](_0x59f305=>{const _0x45d9a0=new Option(_0x59f305,_0x59f305);_0x244533['add'](_0x45d9a0);}),log('成功加载\x20'+_0x1d1076[_0x2eec28(0x195)]+'\x20个书库。','success');}catch(_0x99c835){console[_0x2eec28(0x1ab)](_0x2eec28(0x15d),_0x99c835),log(_0x2eec28(0x1b3)+_0x99c835[_0x2eec28(0x17d)],_0x2eec28(0x1ab)),_0x244533[_0x2eec28(0x156)]=_0x2eec28(0xca);}}async function handleWorldbookSelectionChange(){const _0x15a57a=_0x35a5,_0x1225d6=document[_0x15a57a(0x15e)]('hly-hist-select-library'),_0x308ab2=document[_0x15a57a(0x15e)]('hly-hist-select-entry'),_0x445b18=_0x1225d6['value'];_0x308ab2[_0x15a57a(0x156)]='<option\x20value=\x22\x22>正在加载条目...</option>',_0x308ab2['disabled']=!![];if(!_0x445b18){_0x308ab2['innerHTML']=_0x15a57a(0xf6);return;}try{log(_0x15a57a(0x189)+_0x445b18+_0x15a57a(0x1c2),_0x15a57a(0xeb));const _0x722f3=await _0x30b7df[_0x15a57a(0x1bb)](_0x445b18);_0x308ab2[_0x15a57a(0x156)]='<option\x20value=\x22\x22>请选择一个条目...</option>';if(_0x722f3[_0x15a57a(0x195)]===0x0){_0x308ab2[_0x15a57a(0x156)]=_0x15a57a(0xc8);return;}_0x722f3[_0x15a57a(0xda)](_0x2417ed=>{const _0x2eabe5=_0x15a57a,_0x510ccf=new Option(_0x2417ed[_0x2eabe5(0x1ba)]+'\x20(Key:\x20'+_0x2417ed[_0x2eabe5(0x1b5)]+')',_0x2417ed[_0x2eabe5(0x1b5)]);_0x308ab2[_0x2eabe5(0x1cc)](_0x510ccf);}),log(_0x15a57a(0x169)+_0x722f3[_0x15a57a(0x195)]+_0x15a57a(0x178),_0x15a57a(0x148));}catch(_0x43dd96){console[_0x15a57a(0x1ab)](_0x15a57a(0x10d)+_0x445b18+_0x15a57a(0xcb),_0x43dd96),log('加载条目失败:\x20'+_0x43dd96['message'],_0x15a57a(0x1ab)),_0x308ab2[_0x15a57a(0x156)]=_0x15a57a(0xca);}finally{_0x308ab2['disabled']=![];}}async function startHistoriography(){const _0x52ebe8=_0x35a5,_0x4ae381=document['getElementById']('hly-hist-select-library')[_0x52ebe8(0xc6)],_0x27d0b7=document[_0x52ebe8(0x15e)](_0x52ebe8(0x138))[_0x52ebe8(0xc6)],_0x36592d=document[_0x52ebe8(0x15e)]('hly-historiography-results');if(!_0x4ae381||!_0x27d0b7){toastr[_0x52ebe8(0x18b)](_0x52ebe8(0x167),_0x52ebe8(0x140));return;}_0x36592d[_0x52ebe8(0x18f)]=_0x52ebe8(0xe7)+_0x4ae381+_0x52ebe8(0xc9)+_0x27d0b7+_0x52ebe8(0x18d),toastr[_0x52ebe8(0xeb)](_0x52ebe8(0xfe),'圣旨'),log(_0x52ebe8(0x142)+_0x4ae381+'》-'+_0x27d0b7+_0x52ebe8(0x12f),'info');try{const _0x56bfee=await _0x30b7df[_0x52ebe8(0x1ad)](_0x4ae381,_0x27d0b7);if(_0x56bfee[_0x52ebe8(0x148)]){const _0x4799ad='对《'+_0x4ae381+'》中条目\x20(Key:\x20'+_0x27d0b7+_0x52ebe8(0x136);_0x36592d[_0x52ebe8(0x18f)]=_0x56bfee[_0x52ebe8(0x13c)],toastr[_0x52ebe8(0x148)](_0x52ebe8(0x16d),_0x52ebe8(0x139)),log(_0x4799ad,'success');}else throw new Error(_0x56bfee['error']||_0x52ebe8(0xf0));}catch(_0x1486f6){console[_0x52ebe8(0x1ab)](_0x52ebe8(0xd4),_0x1486f6),toastr[_0x52ebe8(0x1ab)]('编纂失败:\x20'+_0x1486f6[_0x52ebe8(0x17d)],_0x52ebe8(0x187)),_0x36592d[_0x52ebe8(0x18f)]=_0x52ebe8(0x111)+_0x1486f6[_0x52ebe8(0x17d)];}}async function showStats(){const _0x46e15e=_0x35a5;try{log(_0x46e15e(0xd6),_0x46e15e(0xeb)),toastr[_0x46e15e(0xeb)]('正在查询宝库状态...','圣旨');const _0x380b06=await _0x384ded[_0x46e15e(0x10e)](),_0x3727e6=_0x384ded[_0x46e15e(0x1bd)](),_0x46d181=_0x384ded['getSettings'](),_0x140add='\x0a<pre>\x0a翰林院宝库状态\x0a--------------------\x0a集合ID:\x20'+_0x3727e6+_0x46e15e(0x1b4)+_0x380b06+_0x46e15e(0x19b)+_0x46d181['retrieval'][_0x46e15e(0x108)]+'\x0a所用模型:\x20'+_0x46d181[_0x46e15e(0x165)][_0x46e15e(0x128)]+_0x46e15e(0x1a3);toastr[_0x46e15e(0xeb)](_0x140add,'宝库状态',{'timeOut':0x3a98,'extendedTimeOut':0x1388,'tapToDismiss':!![],'closeButton':!![]}),log('查看宝库状态成功:集合ID='+_0x3727e6+',\x20忆识总数='+_0x380b06,_0x46e15e(0x148));}catch(_0x5f4ddc){console[_0x46e15e(0x1ab)]('[翰林院-枢纽]\x20查询宝库状态失败:',_0x5f4ddc),toastr[_0x46e15e(0x1ab)]('查询宝库状态失败:\x20'+_0x5f4ddc[_0x46e15e(0x17d)],_0x46e15e(0x187)),log('查询宝库状态失败:\x20'+_0x5f4ddc[_0x46e15e(0x17d)],'error');}}function previewCondensation(){const _0x59b219=_0x35a5,_0x1b6e33=document['getElementById'](_0x59b219(0x105));try{const _0x5bede8={'user':document[_0x59b219(0x15e)](_0x59b219(0x1c3))['checked'],'ai':document[_0x59b219(0x15e)](_0x59b219(0x185))[_0x59b219(0x1c0)]},_0x219044=document['getElementById']('hly-tag-extraction-toggle')[_0x59b219(0x1c0)],_0x2a43dd=_0x219044?document[_0x59b219(0x15e)](_0x59b219(0x15a))[_0x59b219(0xc6)]['split'](',')[_0x59b219(0x170)](_0x14ddee=>_0x14ddee[_0x59b219(0xef)]())[_0x59b219(0x171)](Boolean):[],_0x17b2cc=_0x384ded[_0x59b219(0x17f)](_0x5bede8);if(!_0x17b2cc||_0x17b2cc['length']===0x0){_0x1b6e33[_0x59b219(0x18f)]='根据当前勾选条件,未找到符合的消息可供预览。',toastr['warning'](_0x59b219(0x131),'翰林院启奏');return;}const _0x1404ee=_0x17b2cc['map']((_0x34995f,_0x4fdbce)=>{const _0xcb2576=_0x59b219;let _0x2fc31f;if(_0x219044&&_0x2a43dd[_0xcb2576(0x195)]>0x0){const _0x3f18cc=extractBlocksByTags(_0x34995f[_0xcb2576(0x186)],_0x2a43dd);_0x2fc31f=_0x3f18cc['join']('\x0a\x0a');}else _0x2fc31f=_0x34995f[_0xcb2576(0x186)];return{'id':_0xcb2576(0x13b)+_0x4fdbce,'name':_0x34995f[_0xcb2576(0x172)],'content':_0x2fc31f[_0xcb2576(0xef)]()};})['filter'](_0x3fd747=>_0x3fd747[_0x59b219(0x13c)]);if(_0x1404ee[_0x59b219(0x195)]===0x0){_0x1b6e33['textContent']=_0x59b219(0x1cf),toastr[_0x59b219(0x18b)](_0x59b219(0x1cf),_0x59b219(0x11e));return;}const _0x38f423=_0x1404ee['map']((_0x306789,_0xda01c2)=>_0x59b219(0x19c)+_0x306789['id']+_0x59b219(0x18a)+(_0xda01c2+0x1)+'\x20楼:\x20['+_0x306789[_0x59b219(0x172)]+_0x59b219(0x1ca)+_0x306789[_0x59b219(0x13c)]+_0x59b219(0x147)+_0x306789['id']+_0x59b219(0x1d0))[_0x59b219(0x182)]('');showHtmlModal(_0x59b219(0xdd),_0x59b219(0xf8)+_0x38f423+_0x59b219(0x10f),{'okText':_0x59b219(0xd1),'onOk':_0x390797=>{const _0x4b62fc=_0x59b219,_0x3b0157=[];_0x390797[_0x4b62fc(0xf1)](_0x4b62fc(0x100))['each'](function(){const _0x40d7c2=_0x4b62fc,_0x20b669=$(this)[_0x40d7c2(0xf1)]('.hly-preview-textarea')['val']();_0x20b669['trim']()&&_0x3b0157[_0x40d7c2(0x14f)](_0x20b669);});const _0x3d4907=_0x3b0157[_0x4b62fc(0x182)]('\x0a\x0a---\x0a\x0a');_0x1b6e33[_0x4b62fc(0x18f)]=_0x4b62fc(0x1c4)+_0x3b0157[_0x4b62fc(0x195)]+_0x4b62fc(0x18c)+_0x3d4907,_0x1b6e33[_0x4b62fc(0xf4)]['finalText']=_0x3d4907,toastr['success']('预览内容已更新,可随时开始凝识。',_0x4b62fc(0x1aa));}}),$(_0x59b219(0xd3))['on']('click',function(_0xaba426){const _0x22dac0=_0x59b219;_0xaba426['preventDefault']();const _0x91c7e6=$(this)[_0x22dac0(0x1a1)](_0x22dac0(0x191));$('#'+_0x91c7e6)[_0x22dac0(0xe2)]();});}catch(_0xc69b98){console[_0x59b219(0x1ab)](_0x59b219(0xc5),_0xc69b98),_0x1b6e33[_0x59b219(0x18f)]='预览失败:\x20'+_0xc69b98[_0x59b219(0x17d)],toastr['error'](_0x59b219(0x19e)+_0xc69b98['message'],'严重错误');}}function log(_0x4555a8,_0x4262b0='info'){const _0x469af4=_0x35a5,_0x35be6c=document[_0x469af4(0x15e)]('hly-log-output');if(!_0x35be6c)return;const _0x466439=document['createElement']('p'),_0x32e422=new Date()[_0x469af4(0x1bf)]();let _0x55d1f3=_0x469af4(0x17e),_0x4eb0ce=_0x469af4(0x112);switch(_0x4262b0){case _0x469af4(0x148):_0x55d1f3=_0x469af4(0xd5),_0x4eb0ce=_0x469af4(0xce);break;case _0x469af4(0x1ab):_0x55d1f3=_0x469af4(0x16f),_0x4eb0ce=_0x469af4(0x149);break;case _0x469af4(0x175):_0x55d1f3='fa-exclamation-triangle',_0x4eb0ce=_0x469af4(0x192);break;}_0x466439[_0x469af4(0x1b8)]='hly-log-entry\x20'+_0x4eb0ce,_0x466439[_0x469af4(0x156)]=_0x469af4(0xdb)+_0x55d1f3+_0x469af4(0x118)+_0x32e422+']\x20'+_0x4555a8;const _0x31e3ef=_0x35be6c[_0x469af4(0x1ac)](_0x469af4(0x104));_0x31e3ef&&_0x31e3ef[_0x469af4(0xe2)](),_0x35be6c[_0x469af4(0x1d1)](_0x466439),_0x35be6c[_0x469af4(0xe5)]=_0x35be6c['scrollHeight'];}async function ingestManualText(){const _0x22b2b=_0x35a5,_0x379c38=document['getElementById'](_0x22b2b(0x1cb)),_0x209772=_0x379c38['value']['trim']();if(!_0x209772){toastr[_0x22b2b(0x18b)](_0x22b2b(0x114),_0x22b2b(0x11e)),log(_0x22b2b(0x162),_0x22b2b(0x175));return;}log(_0x22b2b(0x13a)+_0x209772[_0x22b2b(0x195)],_0x22b2b(0xeb)),toastr[_0x22b2b(0xeb)](_0x22b2b(0x16b),'圣旨');try{const _0x5d8ae2=await _0x384ded[_0x22b2b(0x10b)](_0x209772);if(_0x5d8ae2[_0x22b2b(0x148)])toastr['success'](_0x22b2b(0xff)+_0x5d8ae2[_0x22b2b(0x1cd)]+_0x22b2b(0x145),_0x22b2b(0x139)),log(_0x22b2b(0xe0)+_0x5d8ae2[_0x22b2b(0x1cd)]+_0x22b2b(0x145),_0x22b2b(0x148)),_0x379c38[_0x22b2b(0xc6)]='';else throw new Error(_0x5d8ae2[_0x22b2b(0x1ab)]||'未知错误');}catch(_0x94e67){console[_0x22b2b(0x1ab)](_0x22b2b(0xec),_0x94e67),toastr['error']('文书录入失败:\x20'+_0x94e67[_0x22b2b(0x17d)],_0x22b2b(0x187)),log(_0x22b2b(0x141)+_0x94e67['message'],_0x22b2b(0x1ab));}finally{await updatePanelStatus();}}
|