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(_0x4c2372,{minFiles:minFiles=DEFAULT_LAZY_RENDER_MIN_FILES,maxFiles:maxFiles=DEFAULT_LAZY_RENDER_MAX_FILES,serverMaxFiles:serverMaxFiles=null}={}){const _0x3d9024=getLazyRenderUpperBound({'maxFiles':maxFiles,'serverMaxFiles':serverMaxFiles});return _0x4c2372>=minFiles&&_0x4c2372<=_0x3d9024;}export function shouldAutoCollapseDiff(_0x46fc59,{threshold:threshold=DEFAULT_AUTO_COLLAPSE_MIN_FILES}={}){return _0x46fc59>=threshold;}export function getNextRenderedCount({renderedCount:_0x2f4c0d,totalFiles:_0x49ea4d,chunkSize:chunkSize=DEFAULT_LAZY_RENDER_CHUNK_SIZE}){return Math['min'](_0x2f4c0d+chunkSize,_0x49ea4d);}export function renderedCountForTarget({renderedCount:_0x106364,targetIndex:_0x2a4866,totalFiles:_0x588246,chunkSize:chunkSize=DEFAULT_LAZY_RENDER_CHUNK_SIZE}){let _0x401054=_0x106364;while(_0x401054<=_0x2a4866&&_0x401054<_0x588246){_0x401054=getNextRenderedCount({'renderedCount':_0x401054,'totalFiles':_0x588246,'chunkSize':chunkSize});}return _0x401054;}export function getLazyLoadMoreText({filesLength:_0x5665ae,renderedCount:_0x3de25d,chunkSize:_0x4e2a9f}){const _0x506200=Math['max'](0x0,_0x5665ae-_0x3de25d),_0x44c647=Math['min'](_0x4e2a9f,_0x506200);return'Load\x20'+_0x44c647['toLocaleString']()+'\x20more\x20files\x20('+_0x3de25d['toLocaleString']()+'\x20/\x20'+_0x5665ae['toLocaleString']()+')';}export function getFileNameFromDiffFile(_0x1e313e){return _0x1e313e?.['newPath']||_0x1e313e?.['oldPath']||'';}export function buildCollapsedStateUpdates({files:_0x4d92ce,collapsed:_0x84ef69,storageKeyPrefix:_0x3d58e6,getStorageKey:_0xf77b2c}){const _0x1168e8=[];for(const _0x103d1f of _0x4d92ce||[]){const _0x51c750=getFileNameFromDiffFile(_0x103d1f);if(!_0x51c750)continue;_0x1168e8['push']({'key':_0xf77b2c(_0x3d58e6,_0x51c750),'value':String(_0x84ef69),'fileName':_0x51c750});}return _0x1168e8;}