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(_0x2e7fc0,{minFiles:minFiles=DEFAULT_LAZY_RENDER_MIN_FILES,maxFiles:maxFiles=DEFAULT_LAZY_RENDER_MAX_FILES,serverMaxFiles:serverMaxFiles=null}={}){const _0x3af147=getLazyRenderUpperBound({'maxFiles':maxFiles,'serverMaxFiles':serverMaxFiles});return _0x2e7fc0>=minFiles&&_0x2e7fc0<=_0x3af147;}export function shouldAutoCollapseDiff(_0x45fd8d,{threshold:threshold=DEFAULT_AUTO_COLLAPSE_MIN_FILES}={}){return _0x45fd8d>=threshold;}export function getNextRenderedCount({renderedCount:_0x22b7b6,totalFiles:_0x2c7723,chunkSize:chunkSize=DEFAULT_LAZY_RENDER_CHUNK_SIZE}){return Math['min'](_0x22b7b6+chunkSize,_0x2c7723);}export function renderedCountForTarget({renderedCount:_0x192ba6,targetIndex:_0x584284,totalFiles:_0x53636a,chunkSize:chunkSize=DEFAULT_LAZY_RENDER_CHUNK_SIZE}){let _0x518dab=_0x192ba6;while(_0x518dab<=_0x584284&&_0x518dab<_0x53636a){_0x518dab=getNextRenderedCount({'renderedCount':_0x518dab,'totalFiles':_0x53636a,'chunkSize':chunkSize});}return _0x518dab;}export function getLazyLoadMoreText({filesLength:_0x631cd4,renderedCount:_0x18df78,chunkSize:_0x3cb723}){const _0x47e4a8=Math['max'](0x0,_0x631cd4-_0x18df78),_0x2a174d=Math['min'](_0x3cb723,_0x47e4a8);return'Load\x20'+_0x2a174d['toLocaleString']()+'\x20more\x20files\x20('+_0x18df78['toLocaleString']()+'\x20/\x20'+_0x631cd4['toLocaleString']()+')';}export function getFileNameFromDiffFile(_0x48aca9){return _0x48aca9?.['newPath']||_0x48aca9?.['oldPath']||'';}export function buildCollapsedStateUpdates({files:_0x38343f,collapsed:_0x514f24,storageKeyPrefix:_0x203f8c,getStorageKey:_0x3a651c}){const _0x34d419=[];for(const _0x59f042 of _0x38343f||[]){const _0x357b59=getFileNameFromDiffFile(_0x59f042);if(!_0x357b59)continue;_0x34d419['push']({'key':_0x3a651c(_0x203f8c,_0x357b59),'value':String(_0x514f24),'fileName':_0x357b59});}return _0x34d419;}