export const DEFAULT_LAZY_RENDER_MIN_FILES=0xc8;export const DEFAULT_LAZY_RENDER_MAX_FILES=0x3e7;export const DEFAULT_LAZY_RENDER_CHUNK_SIZE=0x28;export const DEFAULT_AUTO_COLLAPSE_MIN_FILES=0xc8;export function getLazyRenderUpperBound({maxFiles:maxFiles=DEFAULT_LAZY_RENDER_MAX_FILES,serverMaxFiles:serverMaxFiles=null}={}){if(!Number['isFinite'](serverMaxFiles))return maxFiles;return Math['min'](maxFiles,serverMaxFiles);}export function shouldUseLazyRendering(_0x2140ea,{minFiles:minFiles=DEFAULT_LAZY_RENDER_MIN_FILES,maxFiles:maxFiles=DEFAULT_LAZY_RENDER_MAX_FILES,serverMaxFiles:serverMaxFiles=null}={}){const _0x1cdeb1=getLazyRenderUpperBound({'maxFiles':maxFiles,'serverMaxFiles':serverMaxFiles});return _0x2140ea>=minFiles&&_0x2140ea<=_0x1cdeb1;}export function shouldAutoCollapseDiff(_0x3e36ff,{threshold:threshold=DEFAULT_AUTO_COLLAPSE_MIN_FILES}={}){return _0x3e36ff>=threshold;}export function getNextRenderedCount({renderedCount:_0x3e5395,totalFiles:_0x4b5f22,chunkSize:chunkSize=DEFAULT_LAZY_RENDER_CHUNK_SIZE}){return Math['min'](_0x3e5395+chunkSize,_0x4b5f22);}export function renderedCountForTarget({renderedCount:_0x46527d,targetIndex:_0x2898ed,totalFiles:_0x41dde5,chunkSize:chunkSize=DEFAULT_LAZY_RENDER_CHUNK_SIZE}){let _0x688ae8=_0x46527d;while(_0x688ae8<=_0x2898ed&&_0x688ae8<_0x41dde5){_0x688ae8=getNextRenderedCount({'renderedCount':_0x688ae8,'totalFiles':_0x41dde5,'chunkSize':chunkSize});}return _0x688ae8;}export function getLazyLoadMoreText({filesLength:_0x1690bf,renderedCount:_0x35e9f4,chunkSize:_0x38e94f}){const _0xdd64ff=Math['max'](0x0,_0x1690bf-_0x35e9f4),_0x3692d6=Math['min'](_0x38e94f,_0xdd64ff);return'Load\x20'+_0x3692d6['toLocaleString']()+'\x20more\x20files\x20('+_0x35e9f4['toLocaleString']()+'\x20/\x20'+_0x1690bf['toLocaleString']()+')';}export function getFileNameFromDiffFile(_0x483028){return _0x483028?.['newPath']||_0x483028?.['oldPath']||'';}export function buildCollapsedStateUpdates({files:_0x32f10a,collapsed:_0x5cc7de,storageKeyPrefix:_0x3de497,getStorageKey:_0x367a58}){const _0x49ffdb=[];for(const _0x1b0aec of _0x32f10a||[]){const _0x119070=getFileNameFromDiffFile(_0x1b0aec);if(!_0x119070)continue;_0x49ffdb['push']({'key':_0x367a58(_0x3de497,_0x119070),'value':String(_0x5cc7de),'fileName':_0x119070});}return _0x49ffdb;}