export function getProviderLevelKey(_0x484164={}){if(_0x484164?.['supportsReasoningLevel'])return'reasoningLevels';if(_0x484164?.['supportsEffortLevel'])return'effortLevels';return null;}export function getLevelsForSelectedModel(_0x5b23d4={},_0x48b358=''){const _0x350c2=getProviderLevelKey(_0x5b23d4);if(!_0x350c2)return[];const _0x19724c=Array['isArray'](_0x5b23d4[_0x350c2])?_0x5b23d4[_0x350c2]:[],_0x391e85=String(_0x48b358||'')['trim'](),_0x556c38=_0x391e85?(_0x5b23d4['models']||[])['find'](_0x2f10ce=>_0x2f10ce?.['id']===_0x391e85):null,_0x1c5336=Array['isArray'](_0x556c38?.[_0x350c2])?new Set(_0x556c38[_0x350c2]['map'](_0x259e12=>String(_0x259e12||'')['trim']())['filter'](Boolean)):null;return _0x1c5336?_0x19724c['filter'](_0x1616da=>_0x1c5336['has'](String(_0x1616da?.['id']||'')['trim']())):_0x19724c;}export function buildLevelOptionsHtml({providerData:providerData={},modelId:modelId='',emptyLabel:emptyLabel='Default',escapeAttr:_0x528633,escapeText:_0x29200e,stripDefaultLabelText:stripDefaultLabelText=_0x2c4b56=>String(_0x2c4b56||'')}={}){const _0x4d9119=getLevelsForSelectedModel(providerData,modelId),_0x4acd2c=_0x528633||_0x29200e||(_0x7d14fc=>String(_0x7d14fc||'')),_0x196ae4=_0x29200e||_0x528633||(_0x3a4b61=>String(_0x3a4b61||''));return'<option\x20value=\x22\x22>'+_0x196ae4(emptyLabel)+'</option>'+_0x4d9119['map'](_0x279c3e=>'<option\x20value=\x22'+_0x4acd2c(_0x279c3e['id'])+'\x22>'+_0x196ae4(stripDefaultLabelText(_0x279c3e['displayName']||_0x279c3e['id']))+'</option>')['join']('');}