From b0ed97dc96b5b265bc24acbb20ec708090aaddad Mon Sep 17 00:00:00 2001
From: Wx-2025 <351320169@qq.com>
Date: Fri, 22 Aug 2025 06:41:42 +0800
Subject: [PATCH] Update state.js
---
ui/state.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/state.js b/ui/state.js
index 37949aa..e8ed4eb 100644
--- a/ui/state.js
+++ b/ui/state.js
@@ -1 +1 @@
-function _0x34be(_0x263bcc,_0x4da51a){const _0x3a6175=_0x3a61();return _0x34be=function(_0x34be57,_0x2d539d){_0x34be57=_0x34be57-0x1b7;let _0x587cc6=_0x3a6175[_0x34be57];return _0x587cc6;},_0x34be(_0x263bcc,_0x4da51a);}(function(_0x52c305,_0x5a7f03){const _0x3c1401=_0x34be,_0x333ec6=_0x52c305();while(!![]){try{const _0x2470d9=-parseInt(_0x3c1401(0x1c3))/0x1+parseInt(_0x3c1401(0x222))/0x2*(-parseInt(_0x3c1401(0x1ba))/0x3)+parseInt(_0x3c1401(0x1bc))/0x4*(parseInt(_0x3c1401(0x223))/0x5)+parseInt(_0x3c1401(0x1c6))/0x6*(parseInt(_0x3c1401(0x203))/0x7)+parseInt(_0x3c1401(0x1c5))/0x8*(parseInt(_0x3c1401(0x20d))/0x9)+-parseInt(_0x3c1401(0x1c8))/0xa+-parseInt(_0x3c1401(0x205))/0xb*(parseInt(_0x3c1401(0x1b9))/0xc);if(_0x2470d9===_0x5a7f03)break;else _0x333ec6['push'](_0x333ec6['shift']());}catch(_0x42c359){_0x333ec6['push'](_0x333ec6['shift']());}}}(_0x3a61,0x44c9c));import{extension_settings}from'/scripts/extensions.js';import{characters,this_chid}from'/script.js';import{extensionName,defaultSettings}from'../utils/settings.js';import{pluginAuthStatus}from'../utils/auth.js';let availableModels=[],latestUpdateInfo=null,newVersionAvailable=![];export function setUpdateInfo(_0x172219,_0x289969){newVersionAvailable=_0x172219,latestUpdateInfo=_0x289969;}function _0x3a61(){const _0x184665=['loreActivationMode','#amily2_model_notes','plotOpt_worldbookSource','worldbookEnabled','historiographySmallAutoEnable','#amily2_optimization_exclusion_enabled',']\x20(state.js)\x20剧情优化UI已根据合并设置更新。','checked','showOptimizationToast','append','optimizationMode','请检查API配置后点击\x22刷新模型\x22','#amily2_api_provider','#amily2_system_prompt','forEach','val','#amily2_optimization_enabled','#amily2_output_format_prompt','已选择:\x20','suppressToast','#amily2_worldbook_enabled','text','summarizationPrompt','#amily2_show_optimization_toast','\x20个可用模型','#amily2_summarization_enabled','#amily2_lore_depth_input','input[name=\x22amily2_lorebook_target\x22][value=\x22','88809oLDqeh','#amily2_auto_hide_threshold','2618SYmkow','#amily2_opt_rate_erotic','#amily2_preset_selector','plotOpt_mainPrompt','empty','#amily2_opt_enabled','iconLocation','#auth_panel','585pSuQJB','outputFormatPrompt','#amily2_enabled','.plugin-features','plotOpt_enabled','#amily2_opt_worldbook_enabled','model','summarizationEnabled','attr','','change','optimizationEnabled','#amily2_auto_hide_threshold_value','tavernProfile','plotOpt_worldbook_enabled','#amily2_update_indicator','contextMessages','#amily2_max_tokens','length','hide','authorized','112786bwRmnx','10VhTJeH','lorebookTarget','#amily2_opt_final_system_directive','plotOpt_rateErotic','loreDepth','#amily2_model','#amily2_opt_rate_main','type','#amily2_main_prompt','#amily2_suppress_toast','log','#amily2_lore_depth_container','data','24636TVhxQa','15Fejbze','已加载\x20','820384KoQXUj','#amily2_api_key','input[name=\x22amily2_icon_location\x22][value=\x22','#amily2_lore_insertion_position','plotOpt_worldbookCharLimit','show','#amily2_mhb_small_auto_enabled','100230BbiarU','html','29768BFvutY','264citSxE','historiographySmallTriggerThreshold','577200hazBjN','#amily2_optimization_target_tag','extensions','enabled','autoHideThreshold','','maxTokens','#amily2_update_button_new','plotOpt_rateMain','selected','input[name=\x22amily2_optimization_mode\x22][value=\x22','#amily2_opt_system_prompt','#amily2_temperature','#amily2_temperature_value','#amily2_context_messages','apiKey','character','input[name=\x22amily2_opt_worldbook_source\x22][value=\x22','apiUrl','#amily2_context_messages_value','trigger','plotOpt_ratePersonal','mainPrompt','#amily2_opt_rate_cuckold','loreInsertionPosition','plotOpt_contextLimit','#amily2_opt_rate_personal','#amily2_api_url','undefined','prop','_value'];_0x3a61=function(){return _0x184665;};return _0x3a61();}export function applyUpdateIndicator(){const _0x5817d4=_0x34be;newVersionAvailable?($('#amily2_update_indicator')[_0x5817d4(0x1c1)](),$(_0x5817d4(0x1cf))[_0x5817d4(0x1c1)]()):($(_0x5817d4(0x21c))[_0x5817d4(0x220)](),$(_0x5817d4(0x1cf))['hide']());}export function getLatestUpdateInfo(){return latestUpdateInfo;}export function setAvailableModels(_0x26c506){availableModels=_0x26c506;}export function populateModelDropdown(){const _0x4febd3=_0x34be,_0x28bb7a=$(_0x4febd3(0x228)),_0x24b30b=$(_0x4febd3(0x1e8));_0x28bb7a[_0x4febd3(0x209)]();const _0x3117ca=extension_settings[extensionName]?.[_0x4febd3(0x213)]||'';if(availableModels['length']===0x0){_0x28bb7a['append'](_0x4febd3(0x216)),_0x24b30b['html'](_0x4febd3(0x1f2));return;}const _0x379984=$(_0x4febd3(0x1cd))[_0x4febd3(0x1f6)]('')[_0x4febd3(0x1fc)]('--\x20选择模型\x20--');_0x28bb7a['append'](_0x379984),availableModels[_0x4febd3(0x1f5)](_0x36e6f9=>{const _0x205c42=_0x4febd3,_0x1d698b=$(_0x205c42(0x1cd))[_0x205c42(0x1f6)](_0x36e6f9)[_0x205c42(0x1fc)](_0x36e6f9);_0x36e6f9===_0x3117ca&&_0x1d698b[_0x205c42(0x215)](_0x205c42(0x1d1),'selected'),_0x28bb7a[_0x205c42(0x1f0)](_0x1d698b);}),_0x3117ca&&_0x28bb7a[_0x4febd3(0x1f6)]()===_0x3117ca?_0x24b30b['html'](_0x4febd3(0x1f9)+_0x3117ca+''):_0x24b30b[_0x4febd3(0x1c4)](_0x4febd3(0x1bb)+availableModels[_0x4febd3(0x21f)]+_0x4febd3(0x1ff));}export function updateUI(){const _0x3b2041=_0x34be;if(!pluginAuthStatus[_0x3b2041(0x221)])$('#auth_panel')[_0x3b2041(0x1c1)](),$(_0x3b2041(0x210))[_0x3b2041(0x220)]();else{$(_0x3b2041(0x20c))[_0x3b2041(0x220)](),$(_0x3b2041(0x210))[_0x3b2041(0x1c1)]();const _0x589bbd=extension_settings[extensionName];if(!_0x589bbd)return;$(_0x3b2041(0x20f))[_0x3b2041(0x1e5)](_0x3b2041(0x1ee),_0x589bbd[_0x3b2041(0x1cb)]),$(_0x3b2041(0x1f3))[_0x3b2041(0x1f6)](_0x589bbd['apiProvider']||'openai'),$(_0x3b2041(0x1e3))[_0x3b2041(0x1f6)](_0x589bbd[_0x3b2041(0x1da)]),$(_0x3b2041(0x1e3))['attr'](_0x3b2041(0x22a),'text'),$(_0x3b2041(0x1bd))[_0x3b2041(0x1f6)](_0x589bbd[_0x3b2041(0x1d7)]),$(_0x3b2041(0x228))[_0x3b2041(0x1f6)](_0x589bbd[_0x3b2041(0x213)]),$(_0x3b2041(0x207))['val'](_0x589bbd[_0x3b2041(0x21a)]),$(_0x3b2041(0x1f3))[_0x3b2041(0x1dc)](_0x3b2041(0x217)),$(_0x3b2041(0x21e))[_0x3b2041(0x1f6)](_0x589bbd[_0x3b2041(0x1ce)]),$('#amily2_max_tokens_value')[_0x3b2041(0x1fc)](_0x589bbd[_0x3b2041(0x1ce)]),$(_0x3b2041(0x1d4))['val'](_0x589bbd['temperature']),$(_0x3b2041(0x1d5))[_0x3b2041(0x1fc)](_0x589bbd['temperature']),$(_0x3b2041(0x1d6))['val'](_0x589bbd[_0x3b2041(0x21d)]),$(_0x3b2041(0x1db))[_0x3b2041(0x1fc)](_0x589bbd['contextMessages']),$(_0x3b2041(0x1c9))[_0x3b2041(0x1f6)](_0x589bbd['optimizationTargetTag']),$(_0x3b2041(0x1d2)+_0x589bbd[_0x3b2041(0x1f1)]+'\x22]')['prop']('checked',!![]),$(_0x3b2041(0x1f7))[_0x3b2041(0x1e5)]('checked',_0x589bbd[_0x3b2041(0x218)]),$(_0x3b2041(0x1ec))[_0x3b2041(0x1e5)]('checked',_0x589bbd['optimizationExclusionEnabled']),$(_0x3b2041(0x1fe))[_0x3b2041(0x1e5)](_0x3b2041(0x1ee),_0x589bbd[_0x3b2041(0x1ef)]),$(_0x3b2041(0x22c))[_0x3b2041(0x1e5)](_0x3b2041(0x1ee),_0x589bbd[_0x3b2041(0x1fa)]),$(_0x3b2041(0x1f4))[_0x3b2041(0x1f6)](_0x589bbd['systemPrompt']),$(_0x3b2041(0x22b))[_0x3b2041(0x1f6)](_0x589bbd[_0x3b2041(0x1de)]),$(_0x3b2041(0x1f8))['val'](_0x589bbd[_0x3b2041(0x20e)]),$('#amily2_summarization_prompt')[_0x3b2041(0x1f6)](_0x589bbd[_0x3b2041(0x1fd)]),$(_0x3b2041(0x1fb))[_0x3b2041(0x1e5)]('checked',_0x589bbd[_0x3b2041(0x1ea)]),$(_0x3b2041(0x200))['prop'](_0x3b2041(0x1ee),_0x589bbd[_0x3b2041(0x214)]),$(_0x3b2041(0x202)+_0x589bbd[_0x3b2041(0x224)]+'\x22]')[_0x3b2041(0x1e5)](_0x3b2041(0x1ee),!![]),$(_0x3b2041(0x1be)+_0x589bbd[_0x3b2041(0x20b)]+'\x22]')['prop'](_0x3b2041(0x1ee),!![]),$('#amily2_auto_hide_enabled')[_0x3b2041(0x1e5)](_0x3b2041(0x1ee),_0x589bbd['autoHideEnabled']),$(_0x3b2041(0x204))['val'](_0x589bbd[_0x3b2041(0x1cc)]),$(_0x3b2041(0x219))['text'](_0x589bbd[_0x3b2041(0x1cc)]),$('#amily2_lore_activation_mode')[_0x3b2041(0x1f6)](_0x589bbd[_0x3b2041(0x1e7)]),$(_0x3b2041(0x1bf))[_0x3b2041(0x1f6)](_0x589bbd[_0x3b2041(0x1e0)]),$(_0x3b2041(0x201))[_0x3b2041(0x1f6)](_0x589bbd[_0x3b2041(0x227)]),_0x589bbd[_0x3b2041(0x1e0)]==='at_depth'?$(_0x3b2041(0x1b7))[_0x3b2041(0x1c1)]():$('#amily2_lore_depth_container')[_0x3b2041(0x220)](),_0x589bbd['historiographySmallAutoEnable']!==undefined&&$(_0x3b2041(0x1c2))['prop'](_0x3b2041(0x1ee),_0x589bbd[_0x3b2041(0x1eb)]),_0x589bbd[_0x3b2041(0x1c7)]!==undefined&&$('#amily2_mhb_small_trigger_count')[_0x3b2041(0x1f6)](_0x589bbd[_0x3b2041(0x1c7)]),populateModelDropdown(),updatePlotOptimizationUI();}}function getMergedPlotOptSettings(){const _0x1f546e=_0x34be,_0x5042aa=characters&&typeof this_chid!==_0x1f546e(0x1e4)&&characters[this_chid]?characters[this_chid]:null,_0x3b170b=extension_settings[extensionName]||defaultSettings,_0x156e96=_0x5042aa?.[_0x1f546e(0x1b8)]?.[_0x1f546e(0x1ca)]?.[extensionName]||{};return{..._0x3b170b,..._0x156e96};}export function updatePlotOptimizationUI(){const _0x28ff4c=_0x34be,_0x5cd286=getMergedPlotOptSettings();if(!_0x5cd286)return;$(_0x28ff4c(0x20a))[_0x28ff4c(0x1e5)]('checked',_0x5cd286[_0x28ff4c(0x211)]),$(_0x28ff4c(0x212))['prop']('checked',_0x5cd286[_0x28ff4c(0x21b)]),$('#amily2_opt_main_prompt')['val'](_0x5cd286[_0x28ff4c(0x208)]),$(_0x28ff4c(0x1d3))['val'](_0x5cd286['plotOpt_systemPrompt']),$(_0x28ff4c(0x225))[_0x28ff4c(0x1f6)](_0x5cd286['plotOpt_finalSystemDirective']),$(_0x28ff4c(0x229))[_0x28ff4c(0x1f6)](_0x5cd286[_0x28ff4c(0x1d0)]),$(_0x28ff4c(0x1e2))['val'](_0x5cd286[_0x28ff4c(0x1dd)]),$(_0x28ff4c(0x206))[_0x28ff4c(0x1f6)](_0x5cd286[_0x28ff4c(0x226)]),$(_0x28ff4c(0x1df))[_0x28ff4c(0x1f6)](_0x5cd286['plotOpt_rateCuckold']);const _0x369bc7={'#amily2_opt_context_limit':_0x28ff4c(0x1e1),'#amily2_opt_worldbook_char_limit':_0x28ff4c(0x1c0)};for(const _0x4410ff in _0x369bc7){const _0xdc15d2=_0x369bc7[_0x4410ff],_0x114e24=_0x5cd286[_0xdc15d2],_0xa40bdc=_0x4410ff+_0x28ff4c(0x1e6);_0x114e24!==undefined&&($(_0x4410ff)[_0x28ff4c(0x1f6)](_0x114e24),$(_0xa40bdc)[_0x28ff4c(0x1fc)](_0x114e24));}const _0x38d64a=_0x5cd286[_0x28ff4c(0x1e9)]||_0x28ff4c(0x1d8);$(_0x28ff4c(0x1d9)+_0x38d64a+'\x22]')[_0x28ff4c(0x1e5)]('checked',!![]),console[_0x28ff4c(0x22d)]('['+extensionName+_0x28ff4c(0x1ed));}
+(function(_0x4f598d,_0x18ee0e){const _0x1de62f=_0x545f,_0x44e696=_0x4f598d();while(!![]){try{const _0x2acc4b=parseInt(_0x1de62f(0x16b))/0x1*(-parseInt(_0x1de62f(0x1be))/0x2)+-parseInt(_0x1de62f(0x1a8))/0x3*(parseInt(_0x1de62f(0x180))/0x4)+parseInt(_0x1de62f(0x1c1))/0x5+parseInt(_0x1de62f(0x151))/0x6+-parseInt(_0x1de62f(0x197))/0x7*(parseInt(_0x1de62f(0x18e))/0x8)+parseInt(_0x1de62f(0x1bd))/0x9+-parseInt(_0x1de62f(0x16d))/0xa*(-parseInt(_0x1de62f(0x177))/0xb);if(_0x2acc4b===_0x18ee0e)break;else _0x44e696['push'](_0x44e696['shift']());}catch(_0x3f6fb4){_0x44e696['push'](_0x44e696['shift']());}}}(_0x1f40,0x85335));import{extension_settings}from'/scripts/extensions.js';function _0x545f(_0x28fb39,_0x4ae6cd){const _0x1f408b=_0x1f40();return _0x545f=function(_0x545fb9,_0x29e91c){_0x545fb9=_0x545fb9-0x14e;let _0x53d716=_0x1f408b[_0x545fb9];return _0x53d716;},_0x545f(_0x28fb39,_0x4ae6cd);}import{characters,this_chid}from'/script.js';import{extensionName,defaultSettings}from'../utils/settings.js';import{pluginAuthStatus}from'../utils/auth.js';let availableModels=[],latestUpdateInfo=null,newVersionAvailable=![];export function setUpdateInfo(_0x5cf9e6,_0x10ff15){newVersionAvailable=_0x5cf9e6,latestUpdateInfo=_0x10ff15;}export function applyUpdateIndicator(){const _0x17f3e3=_0x545f;newVersionAvailable?($('#amily2_update_indicator')[_0x17f3e3(0x1c5)](),$('#amily2_update_button_new')['show']()):($(_0x17f3e3(0x14e))[_0x17f3e3(0x1bf)](),$(_0x17f3e3(0x17d))[_0x17f3e3(0x1bf)]());}function _0x1f40(){const _0x762864=['tavernProfile','#amily2_auto_hide_threshold_value','input[name=\x22amily2_opt_worldbook_source\x22][value=\x22','trigger','change','lorebookTarget','mainPrompt','at_depth','optimizationEnabled','showOptimizationToast','historiographySmallTriggerThreshold','#amily2_summarization_prompt','#amily2_opt_worldbook_enabled','892035yogwgD','52906jJltbR','hide','#amily2_worldbook_enabled','2564405HrGgrC','plotOpt_systemPrompt','plotOpt_tableEnabled','#amily2_model_notes','show','#amily2_main_prompt','#amily2_context_messages','historiographySmallAutoEnable','#amily2_summarization_enabled','#amily2_update_indicator','','selected','3347616kbIIBX','#auth_panel','attr','#amily2_lore_depth_container','loreActivationMode','_value','loreInsertionPosition','#amily2_preset_selector','#amily2_opt_main_prompt','#amily2_context_messages_value','#amily2_lore_activation_mode','extensions','text','loreDepth','temperature','#amily2_output_format_prompt','plotOpt_rateMain','enabled','plotOpt_finalSystemDirective','input[name=\x22amily2_optimization_mode\x22][value=\x22','summarizationEnabled','plotOpt_worldbookSource','','maxTokens','#amily2_temperature_value','openai','21NlcIfd','apiKey','392920VGgohb','\x20个可用模型','contextMessages','plotOpt_worldbookCharLimit','length','已加载\x20','empty','#amily2_mhb_small_auto_enabled','iconLocation','#amily2_api_provider','319DlujGT','optimizationExclusionEnabled',']\x20(state.js)\x20剧情优化UI已根据合并设置更新。','#amily2_api_url','','checked','#amily2_update_button_new','append','data','595124KGKEVp','apiProvider','#amily2_opt_rate_personal','autoHideThreshold','prop','.plugin-features','#amily2_optimization_exclusion_enabled','input[name=\x22amily2_lorebook_target\x22][value=\x22','#amily2_system_prompt','authorized','#amily2_show_optimization_toast','systemPrompt','#amily2_opt_table_enabled','#amily2_enabled','1334648VRuAOL','log','undefined','请检查API配置后点击\x22刷新模型\x22','#amily2_auto_hide_threshold','html','type','summarizationPrompt','autoHideEnabled','7yFKMRm','suppressToast','outputFormatPrompt','#amily2_lore_depth_input','forEach','optimizationMode','plotOpt_rateCuckold','val','#amily2_optimization_target_tag','#amily2_auto_hide_enabled','#amily2_max_tokens','#amily2_opt_final_system_directive','--\x20选择模型\x20--','plotOpt_contextLimit','#amily2_suppress_toast','#amily2_opt_rate_cuckold','plotOpt_ratePersonal','21xLfGdE','#amily2_opt_system_prompt','model','#amily2_model','plotOpt_rateErotic','#amily2_mhb_small_trigger_count','plotOpt_mainPrompt','#amily2_optimization_enabled'];_0x1f40=function(){return _0x762864;};return _0x1f40();}export function getLatestUpdateInfo(){return latestUpdateInfo;}export function setAvailableModels(_0x5ec215){availableModels=_0x5ec215;}export function populateModelDropdown(){const _0x288c8b=_0x545f,_0x162541=$(_0x288c8b(0x1ab)),_0xec2fa0=$(_0x288c8b(0x1c4));_0x162541[_0x288c8b(0x173)]();const _0xedfd3=extension_settings[extensionName]?.['model']||'';if(availableModels[_0x288c8b(0x171)]===0x0){_0x162541[_0x288c8b(0x17e)](_0x288c8b(0x14f)),_0xec2fa0[_0x288c8b(0x193)](_0x288c8b(0x191));return;}const _0x355067=$(_0x288c8b(0x167))[_0x288c8b(0x19e)]('')[_0x288c8b(0x15d)](_0x288c8b(0x1a3));_0x162541[_0x288c8b(0x17e)](_0x355067),availableModels[_0x288c8b(0x19b)](_0x526d06=>{const _0x425315=_0x288c8b,_0x1bd211=$(_0x425315(0x167))['val'](_0x526d06)['text'](_0x526d06);_0x526d06===_0xedfd3&&_0x1bd211[_0x425315(0x153)](_0x425315(0x150),_0x425315(0x150)),_0x162541['append'](_0x1bd211);}),_0xedfd3&&_0x162541[_0x288c8b(0x19e)]()===_0xedfd3?_0xec2fa0[_0x288c8b(0x193)]('已选择:\x20'+_0xedfd3+_0x288c8b(0x17b)):_0xec2fa0[_0x288c8b(0x193)](_0x288c8b(0x172)+availableModels[_0x288c8b(0x171)]+_0x288c8b(0x16e));}export function updateUI(){const _0x1f27f8=_0x545f;if(!pluginAuthStatus[_0x1f27f8(0x189)])$(_0x1f27f8(0x152))[_0x1f27f8(0x1c5)](),$('.plugin-features')[_0x1f27f8(0x1bf)]();else{$('#auth_panel')['hide'](),$(_0x1f27f8(0x185))['show']();const _0xbbd72a=extension_settings[extensionName];if(!_0xbbd72a)return;$(_0x1f27f8(0x18d))[_0x1f27f8(0x184)](_0x1f27f8(0x17c),_0xbbd72a[_0x1f27f8(0x162)]),$(_0x1f27f8(0x176))[_0x1f27f8(0x19e)](_0xbbd72a[_0x1f27f8(0x181)]||_0x1f27f8(0x16a)),$('#amily2_api_url')['val'](_0xbbd72a['apiUrl']),$(_0x1f27f8(0x17a))[_0x1f27f8(0x153)](_0x1f27f8(0x194),'text'),$('#amily2_api_key')[_0x1f27f8(0x19e)](_0xbbd72a[_0x1f27f8(0x16c)]),$(_0x1f27f8(0x1ab))['val'](_0xbbd72a[_0x1f27f8(0x1aa)]),$(_0x1f27f8(0x158))[_0x1f27f8(0x19e)](_0xbbd72a[_0x1f27f8(0x1b0)]),$(_0x1f27f8(0x176))[_0x1f27f8(0x1b3)](_0x1f27f8(0x1b4)),$(_0x1f27f8(0x1a1))[_0x1f27f8(0x19e)](_0xbbd72a[_0x1f27f8(0x168)]),$('#amily2_max_tokens_value')[_0x1f27f8(0x15d)](_0xbbd72a[_0x1f27f8(0x168)]),$('#amily2_temperature')[_0x1f27f8(0x19e)](_0xbbd72a[_0x1f27f8(0x15f)]),$(_0x1f27f8(0x169))['text'](_0xbbd72a[_0x1f27f8(0x15f)]),$(_0x1f27f8(0x1c7))[_0x1f27f8(0x19e)](_0xbbd72a[_0x1f27f8(0x16f)]),$(_0x1f27f8(0x15a))[_0x1f27f8(0x15d)](_0xbbd72a[_0x1f27f8(0x16f)]),$(_0x1f27f8(0x19f))['val'](_0xbbd72a['optimizationTargetTag']),$(_0x1f27f8(0x164)+_0xbbd72a[_0x1f27f8(0x19c)]+'\x22]')['prop'](_0x1f27f8(0x17c),!![]),$(_0x1f27f8(0x1af))['prop'](_0x1f27f8(0x17c),_0xbbd72a[_0x1f27f8(0x1b8)]),$(_0x1f27f8(0x186))['prop'](_0x1f27f8(0x17c),_0xbbd72a[_0x1f27f8(0x178)]),$(_0x1f27f8(0x18a))[_0x1f27f8(0x184)](_0x1f27f8(0x17c),_0xbbd72a[_0x1f27f8(0x1b9)]),$(_0x1f27f8(0x1a5))[_0x1f27f8(0x184)](_0x1f27f8(0x17c),_0xbbd72a[_0x1f27f8(0x198)]),$(_0x1f27f8(0x188))[_0x1f27f8(0x19e)](_0xbbd72a[_0x1f27f8(0x18b)]),$(_0x1f27f8(0x1c6))[_0x1f27f8(0x19e)](_0xbbd72a[_0x1f27f8(0x1b6)]),$(_0x1f27f8(0x160))['val'](_0xbbd72a[_0x1f27f8(0x199)]),$(_0x1f27f8(0x1bb))['val'](_0xbbd72a[_0x1f27f8(0x195)]),$(_0x1f27f8(0x1c0))[_0x1f27f8(0x184)](_0x1f27f8(0x17c),_0xbbd72a['worldbookEnabled']),$(_0x1f27f8(0x1c9))[_0x1f27f8(0x184)](_0x1f27f8(0x17c),_0xbbd72a[_0x1f27f8(0x165)]),$(_0x1f27f8(0x187)+_0xbbd72a[_0x1f27f8(0x1b5)]+'\x22]')[_0x1f27f8(0x184)](_0x1f27f8(0x17c),!![]),$('input[name=\x22amily2_icon_location\x22][value=\x22'+_0xbbd72a[_0x1f27f8(0x175)]+'\x22]')[_0x1f27f8(0x184)](_0x1f27f8(0x17c),!![]),$(_0x1f27f8(0x1a0))[_0x1f27f8(0x184)](_0x1f27f8(0x17c),_0xbbd72a[_0x1f27f8(0x196)]),$(_0x1f27f8(0x192))[_0x1f27f8(0x19e)](_0xbbd72a[_0x1f27f8(0x183)]),$(_0x1f27f8(0x1b1))[_0x1f27f8(0x15d)](_0xbbd72a[_0x1f27f8(0x183)]),$(_0x1f27f8(0x15b))[_0x1f27f8(0x19e)](_0xbbd72a[_0x1f27f8(0x155)]),$('#amily2_lore_insertion_position')[_0x1f27f8(0x19e)](_0xbbd72a['loreInsertionPosition']),$(_0x1f27f8(0x19a))['val'](_0xbbd72a[_0x1f27f8(0x15e)]),_0xbbd72a[_0x1f27f8(0x157)]===_0x1f27f8(0x1b7)?$('#amily2_lore_depth_container')[_0x1f27f8(0x1c5)]():$(_0x1f27f8(0x154))['hide'](),_0xbbd72a[_0x1f27f8(0x1c8)]!==undefined&&$(_0x1f27f8(0x174))['prop'](_0x1f27f8(0x17c),_0xbbd72a[_0x1f27f8(0x1c8)]),_0xbbd72a[_0x1f27f8(0x1ba)]!==undefined&&$(_0x1f27f8(0x1ad))['val'](_0xbbd72a[_0x1f27f8(0x1ba)]),populateModelDropdown(),updatePlotOptimizationUI();}}function getMergedPlotOptSettings(){const _0x11d7a0=_0x545f,_0x3cd9b3=characters&&typeof this_chid!==_0x11d7a0(0x190)&&characters[this_chid]?characters[this_chid]:null,_0x55902d=extension_settings[extensionName]||defaultSettings,_0x2e860b=_0x3cd9b3?.[_0x11d7a0(0x17f)]?.[_0x11d7a0(0x15c)]?.[extensionName]||{};return{..._0x55902d,..._0x2e860b};}export function updatePlotOptimizationUI(){const _0xe5ec6f=_0x545f,_0x2df89a=getMergedPlotOptSettings();if(!_0x2df89a)return;$('#amily2_opt_enabled')[_0xe5ec6f(0x184)](_0xe5ec6f(0x17c),_0x2df89a['plotOpt_enabled']),$(_0xe5ec6f(0x1bc))['prop'](_0xe5ec6f(0x17c),_0x2df89a['plotOpt_worldbook_enabled']),$(_0xe5ec6f(0x18c))[_0xe5ec6f(0x184)](_0xe5ec6f(0x17c),_0x2df89a[_0xe5ec6f(0x1c3)]),$(_0xe5ec6f(0x159))[_0xe5ec6f(0x19e)](_0x2df89a[_0xe5ec6f(0x1ae)]),$(_0xe5ec6f(0x1a9))[_0xe5ec6f(0x19e)](_0x2df89a[_0xe5ec6f(0x1c2)]),$(_0xe5ec6f(0x1a2))[_0xe5ec6f(0x19e)](_0x2df89a[_0xe5ec6f(0x163)]),$('#amily2_opt_rate_main')[_0xe5ec6f(0x19e)](_0x2df89a[_0xe5ec6f(0x161)]),$(_0xe5ec6f(0x182))['val'](_0x2df89a[_0xe5ec6f(0x1a7)]),$('#amily2_opt_rate_erotic')[_0xe5ec6f(0x19e)](_0x2df89a[_0xe5ec6f(0x1ac)]),$(_0xe5ec6f(0x1a6))['val'](_0x2df89a[_0xe5ec6f(0x19d)]);const _0x541619={'#amily2_opt_context_limit':_0xe5ec6f(0x1a4),'#amily2_opt_worldbook_char_limit':_0xe5ec6f(0x170)};for(const _0x64f4ec in _0x541619){const _0x5b8d0e=_0x541619[_0x64f4ec],_0x2a023c=_0x2df89a[_0x5b8d0e],_0x4d3381=_0x64f4ec+_0xe5ec6f(0x156);_0x2a023c!==undefined&&($(_0x64f4ec)[_0xe5ec6f(0x19e)](_0x2a023c),$(_0x4d3381)[_0xe5ec6f(0x15d)](_0x2a023c));}const _0x327e5e=_0x2df89a[_0xe5ec6f(0x166)]||'character';$(_0xe5ec6f(0x1b2)+_0x327e5e+'\x22]')[_0xe5ec6f(0x184)]('checked',!![]),console[_0xe5ec6f(0x18f)]('['+extensionName+_0xe5ec6f(0x179));}