1 2'use strict';function InitUploader(u,c){c.arrFiles.push(u);let inputFile=document.getElementById(u+'_inputFile');if(inputFile!==null){let dropArea=document.getElementById('mfu-drop-area');if(dropArea!==null){dropArea.addEventListener('drop',()=>{CheckBytes(c.clientID);});} 3inputFile.addEventListener('change',(e)=>{CheckBytes(c.clientID);});}} 4function SetupCheckBytes(c){if(c.button){c.buttonBg=c.button.style.backgroundColor;} 5if(window.FileReader&&window.File&&window.FileList&&window.Blob){c.fileSupport=true;} 6else{c.button.disabled=true;c.button.style.backgroundColor='gray';let ele=document.getElementById(c.clientID);if(ele!==null){let p=ele.parentNode;const sp=document.createElement('span');sp.className='ErrorLabel';sp.innerHTML=c.supportMsg;p.insertBefore(sp,ele);}}} 7function CheckBytes(c){if(c.fileSupport){let totalBytes=0.00;let fileSize=0;let inputFile;for(let i=0;i<c.arrFiles.length;i++){inputFile=document.getElementById(c.arrFiles[i]+'_inputFile');if(inputFile!==null){if(inputFile.files.length>0){for(let j=0;j<inputFile.files.length;j++){if(inputFile.files[j]!==null){fileSize=inputFile.files[j].size;if(fileSize>0){totalBytes+=fileSize;}}}}}} 8let cErrMsg=document.getElementById(c.clientID+'_errorMsg');if(totalBytes>c.maxSize){c.button.disabled=true;c.button.style.backgroundColor='gray';if(cErrMsg!==null){cErrMsg.innerHTML=c.errorMsg.replace('[total_mb]',parseFloat(totalBytes/1048576).toFixed(2));} 9else{let ele=document.getElementById(c.clientID);let p=c.parentNode;let errLbl=ele.querySelector('.ErrorLabel');if(errLbl!==null){const spErrLbl=document.createElement('span');spErrLbl.className='ErrorLabel';spErrLbl.innerHTML='<br />';p.insertBefore(spErrLbl,ele);} 10let spTotMb=document.createElement('span');spTotMb.id=c.clientID+"_errorMsg";spTotMb.className='ErrorLabel';spTotMb.innerHTML=c.errorMsg.replace('[total_mb]',parseFloat(totalBytes/1048576).toFixed(2));p.insertBefore(spTotMb,ele);}} 11else{c.button.disabled=false;c.button.style.backgroundColor=c.buttonBg;if(cErrMsg!==null){cErrMsg.remove();}}}}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.