1jQuery(function(e){new DLM_XHR_Download});let DLM_XHR_SPINNER_SVG='<svg class="dlm-xhr-loading-gif dlm-xhr-spinner" viewBox="0 0 44 44" width="22" height="22" aria-hidden="true"><circle cx="22" cy="22" r="18" fill="none" stroke="currentColor" stroke-width="6" opacity="0.25"></circle><circle class="dlm-spinner-arc" cx="22" cy="22" r="18" fill="none" stroke="currentColor" stroke-width="6" stroke-linecap="round" stroke-dasharray="28 200"></circle></svg>';class DLM_XHR_Download{responsHeaders={};constructor(){(dlmXHRinstance=this).init()}init(){dlmXHRinstance.attachButtonEvent()}attachButtonEvent(){jQuery("html,body").on("click",".dlm-no-access-modal-window > div",function(e){e.stopPropagation()}),jQuery("html, body").on("click",".dlm-no-access-modal-overlay, .dlm-no-access-modal-close, .dlm-no-access-modal-window",function(e){e.stopPropagation(),jQuery("#dlm-no-access-modal").remove()}),jQuery(document).on("keydown",function(e){"Escape"===e.key&&jQuery("#dlm-no-access-modal").remove()}),jQuery("html, body").on("click","a",function(e){let o=jQuery(this).attr("href"),d=!1;if(jQuery(this).hasClass("dlm-no-xhr-download")&&(d=!0),"undefined"!=typeof dlmNonXHRGlobalLinks&&0<dlmNonXHRGlobalLinks.length&&void 0!==o&&dlmNonXHRGlobalLinks.forEach(e=>{0<=o.indexOf(e)&&(d=!0)}),d)jQuery("#dlm-no-access-modal").remove();else{if("string"==typeof o)try{o=new URL(o,window.location.origin).href}catch(e){}var r,n;jQuery(document).trigger("dlm-xhr-download-button-click",[o,this,dlmXHRGlobalLinks]),void 0!==o&&0<=o.indexOf(dlmXHRGlobalLinks)&&(r=jQuery(this).data("redirect"),n=jQuery(this).attr("target"),void 0!==r&&!0===r&&"_blank"===n||dlmXHRinstance.handleDownloadClick(this,e))}})}handleDownloadClick(e,o){o.stopPropagation();var d=e.getAttribute("href"),d={button:e,href:d,buttonObj:jQuery(e)};-1===d.href.indexOf("blob:http")&&"#"!==d.href&&(o.preventDefault(),dlmXHRinstance.retrieveBlob(d))}retrieveBlob(e){let h=this,{button:f,href:w,buttonObj:x}=e,H,g=new XMLHttpRequest,b=dlmXHR.prevent_duplicates,y=x.attr("target"),R=x.attr("class");R=void 0!==R&&""!==R?R.replace("dlm-download-started","").replace("dlm-download-completed",""):"",x.addClass("dlm-download-started"),f.setAttribute("href","#"),f.removeAttribute("download"),f.setAttribute("disabled","disabled"),dlmXHRProgress&&(f.querySelector(".dlm-original-content")||Array.from(f.childNodes).forEach(e=>{var o;e.nodeType===Node.ELEMENT_NODE?e.classList.add("dlm-original-content"):e.nodeType===Node.TEXT_NODE&&""!==e.textContent.trim()&&((o=document.createElement("span")).className="dlm-original-content",e.replaceWith(o),o.appendChild(e))}),dlmXHRInlineSpinner?f.insertAdjacentHTML("beforeend",DLM_XHR_SPINNER_SVG):((e=document.createElement("img")).src=dlmXHRgif,e.className="dlm-xhr-loading-gif",f.appendChild(e)),x.append('<span class="dlm-xhr-progress"> 0%</span>')),jQuery(document).trigger("dlm_download_triggered",[this,f,x,H,g]);let C=!1;g.responseType="blob",g.onreadystatechange=function(){var{status:e,readyState:o,statusText:d}=g,r=g.getAllResponseHeaders().split("\r\n").reduce((e,o)=>{var[o,d]=o.split(": ");return e[o]=d,e},{});1<Object.keys(r).length&&(C=!0,h.responseHeaders=r);let n="download",t=!1,s=!1,a=!1,l=!1,i=null,m=!1,c=!1,p=!1,u=!1,v=!1;if(C&&void 0!==h.responseHeaders["dlm-file-name"]&&(t=h.responseHeaders["dlm-file-name"]),C&&void 0!==h.responseHeaders["dlm-no-waypoints"]&&(s=!0),C&&void 0!==h.responseHeaders["dlm-redirect"]&&(a=h.responseHeaders["dlm-redirect"]),C&&void 0!==h.responseHeaders["dlm-external-download"]&&(l=!0),C&&void 0!==h.responseHeaders["dlm-no-access"]&&(i=h.responseHeaders["dlm-no-access"]),C&&void 0!==h.responseHeaders["dlm-no-access-modal"]&&(m=h.responseHeaders["dlm-no-access-modal"]),C&&void 0!==h.responseHeaders["dlm-error"]&&(c=h.responseHeaders["dlm-error"]),C&&void 0!==h.responseHeaders["dlm-download-id"]&&(p=h.responseHeaders["dlm-download-id"]),C&&void 0!==h.responseHeaders["dlm-version-id"]&&(u=h.responseHeaders["dlm-version-id"]),C&&void 0!==h.responseHeaders["dlm-no-access-modal-text"]&&(v=h.responseHeaders["dlm-no-access-modal-text"]),C&&void 0!==h.responseHeaders["x-dlm-file-name"]&&(t=h.responseHeaders["x-dlm-file-name"]),C&&void 0!==h.responseHeaders["x-dlm-no-waypoints"]&&(s=!0),C&&void 0!==h.responseHeaders["x-dlm-redirect"]&&(a=h.responseHeaders["x-dlm-redirect"]),C&&void 0!==h.responseHeaders["x-dlm-external-download"]&&(l=!0),C&&void 0!==h.responseHeaders["x-dlm-no-access"]&&(i=h.responseHeaders["x-dlm-no-access"]),C&&void 0!==h.responseHeaders["x-dlm-no-access-modal"]&&(m=h.responseHeaders["x-dlm-no-access-modal"]),C&&void 0!==h.responseHeaders["x-dlm-error"]&&(c=h.responseHeaders["x-dlm-error"]),C&&void 0!==h.responseHeaders["x-dlm-download-id"]&&(p=h.responseHeaders["x-dlm-download-id"]),C&&void 0!==h.responseHeaders["x-dlm-version-id"]&&(u=h.responseHeaders["x-dlm-version-id"]),C&&void 0!==h.responseHeaders["x-dlm-no-access-modal-text"]&&(v=h.responseHeaders["x-dlm-no-access-modal-text"]),t?(n=t.replace(/\"/g,"").replace(";",""),n=decodeURI(n)):C&&void 0!==h.responseHeaders["content-disposition"]&&(n=(n=h.responseHeaders["content-disposition"].split(/(?:filename\*=UTF-8'')|(?:filename=)/)[1]).replace(/\"/g,"").replace(";",""),n=decodeURI(n)),c=c&&(c in dlmXHRtranslations?dlmXHRtranslations[c]:dlmXHRtranslations.error),2===g.readyState){if(C&&void 0!==h.responseHeaders["x-dlm-force-abort"]&&""!==h.responseHeaders["x-dlm-force-abort"])return f.removeAttribute("download"),f.setAttribute("href",w),x.removeClass().addClass(R).find("span.dlm-xhr-progress").remove(),x.find(".dlm-xhr-loading-gif").remove(),g.abort(),void jQuery("#dlm-no-access-modal").remove();if(s)return g.abort(),a?void(window.location.href=a):void(window.location.href=w);if(l)return g.abort(),void dlmXHRinstance.dlmExternalDownload(h.responseHeaders,f,x,n,w);if(0===Object.keys(h.responseHeaders).filter(e=>-1!==e.indexOf("dlm-")).length)return g.abort(),void(window.location.href=w);if(i&&"true"===i&&m&&0!=m)return dlmXHRinstance.dlmNoAccessModal(h.responseHeaders),f.removeAttribute("download"),f.setAttribute("href",w),x.removeClass().addClass(R).find("span.dlm-xhr-progress").remove(),x.find(".dlm-xhr-loading-gif").remove(),void g.abort();if(c&&""!==c&&null!==c)return dlmXHRinstance.dlmLogDownload(h.responseHeaders,"failed",!1),f.removeAttribute("download"),f.setAttribute("href",w),x.removeClass().addClass(R).find("span.dlm-xhr-progress").remove(),x.find(".dlm-xhr-loading-gif").remove(),g.abort(),void(m&&0!=m?dlmXHRinstance.dlmNoAccessModal(h.responseHeaders):(x.find(".dlm-xhr-error").remove(),x.append('<span class="dlm-xhr-error">'+c+"</span>")));if(a&&""!==a&&null!==a)return dlmXHRinstance.dlmLogDownload(h.responseHeaders,"redirected",!1,a,i,y),f.removeAttribute("download"),f.setAttribute("href",w),x.removeClass().addClass(R).find("span.dlm-xhr-progress").remove(),x.find(".dlm-xhr-loading-gif").remove(),void g.abort()}404==e&&2==o&&((r=document.createElement("p")).innerHTML=d,f.parentNode.appendChild(r)),401==e&&2==o?window.location.href=d:(403==e&&2==o&&((r=document.createElement("p")).innerHTML=d,f.parentNode.appendChild(r)),200==e&&4==o&&(d=g.response,H=URL.createObjectURL(d),f.removeEventListener("click",dlmXHRinstance.handleDownloadClick),f.setAttribute("download",""+n),f.setAttribute("href",H),f.click(),x.removeClass().addClass(R+" dlm-d
1ownload-complete"),dlmXHRinstance.attachButtonEvent(),jQuery(document).trigger("dlm_download_complete",[this,f,x,H]),dlmXHRinstance.dlmLogDownload(h.responseHeaders,"completed",b),window.URL.revokeObjectURL(H),f.removeAttribute("download"),f.setAttribute("href",w),x.find(".dlm-xhr-loading-gif").remove(),x.find("span.dlm-xhr-progress").remove(),setTimeout(function(){x.removeClass().addClass(R)},4e3)))},dlmXHRProgress&&g.addEventListener("progress",function(e){let o=e.total,d=(void 0!==e.total&&"undefined"!==e.total&&0!==e.total||void 0!==h.responseHeaders["x-dlm-filesize"]&&(o=h.responseHeaders["x-dlm-filesize"]),e.loaded/o*100);d=d.toFixed();var r;x.find("span.dlm-xhr-progress").remove(),r="dlm-download-started dlm-download-"+10*Math.ceil(d/10),1/0!=d&&x.append('<span class="dlm-xhr-progress"> '+d+"%</span>"),x.removeClass().addClass(R+" "+r),jQuery(document).trigger("dlm_download_progress",[this,f,x,H,e,d])}),g.onerror=function(){f.removeAttribute("download"),f.setAttribute("href",w),x.removeClass().addClass(R+" dlm-no-xhr-download").find("span.dlm-xhr-progress").remove(),x.find(".dlm-xhr-error").remove(),x.append('<span class="dlm-xhr-error">'+dlmXHRtranslations.error+"</span>"),console.log("** An error occurred during the transaction")},g.open("GET",w,!0),g.setRequestHeader("Cache-Control","no-store, no-cache, no-transform, max-age=0"),g.setRequestHeader("dlm-xhr-request","dlm_XMLHttpRequest"),g.send()}dlmLogDownload(e,o,n,t=null,s=null,a="_self"){var l=window.location.href,i=e["x-dlm-download-id"]??e["dlm-download-id"],m=e["x-dlm-version-id"]??e["dlm-version-id"],c=navigator.userAgent||"",c=/^((?!chrome|android|crios|fxios|edgios).)*safari/i.test(c)&&!/CriOS|FxiOS|EdgiOS/i.test(c);if(s&&t)if(c)window.location.href=t;else{let e=a||"_self",o=window.open(t,e,"noopener");o&&(o.location.href=t)}else{let d=new URLSearchParams({action:"log_dlm_xhr_download",download_id:i,version_id:m,status:o,cookie:n,currentURL:l,nonce:e["x-dlm-nonce"],log_token:e["x-dlm-log-token"]});for(var[p,u]of Object.entries(e))d.append(`responseHeaders[${p}]`,u);let r=[];if("completed"!==o||dlmXHR.countExcluded||document.querySelectorAll(`[id="download-link-${i}"]`).forEach(e=>{var o=e.querySelector(".dlm-download-count-value");o?r.push(o):(e=(o=e.closest(".dlm-download-box"))?o.querySelector(".dlm-download-count"):null)&&r.push(e)}),r.length){let o=new Set;r.forEach(e=>{e.dataset.countFormat&&o.add(e.dataset.countFormat)}),o.forEach(e=>d.append("count_formats[]",e)),fetch(dlmXHR.ajaxUrl,{method:"POST",body:d,keepalive:!0}).then(e=>e.json()).then(e=>{let d=e&&e.data?e.data:null;d&&r.forEach(e=>{var o=e.dataset.countFormat;o&&d.counts&&void 0!==d.counts[o]?e.textContent=d.counts[o]:void 0!==d.download_count&&(e.textContent=d.download_count)})}).catch(()=>{})}else try{navigator.sendBeacon(dlmXHR.ajaxUrl,new Blob([d.toString()],{type:"application/x-www-form-urlencoded;charset=UTF-8"}))}catch(e){try{fetch(dlmXHR.ajaxUrl,{method:"POST",body:d,keepalive:!0})}catch(e){}}if(t)if(c)window.location.href=t;else{let e=a||"_self",o=window.open(t,e,"noopener");s&&o&&(o.location.href=t)}}}dlmNoAccessModal(e){let o="empty-download",d="empty-version",r="empty-restriction",n="",s=(void 0!==e["dlm-download-id"]&&(o=e["dlm-download-id"]),void 0!==e["dlm-version-id"]&&(d=e["dlm-version-id"]),void 0!==e["dlm-no-access-modal-text"]&&(n=e["dlm-no-access-modal-text"]),void 0!==e["dlm-no-access-restriction"]&&(r=e["dlm-no-access-restriction"]),void 0!==e["x-dlm-download-id"]&&(o=e["x-dlm-download-id"]),void 0!==e["x-dlm-version-id"]&&(d=e["x-dlm-version-id"]),void 0!==e["x-dlm-no-access-modal-text"]&&(n=e["x-dlm-no-access-modal-text"]),void 0!==e["x-dlm-no-access-restriction"]&&(r=e["x-dlm-no-access-restriction"]),{download_id:o,version_id:d,modal_text:n,restriction:r,action:"no_access_dlm_xhr_download",nonce:e["x-dlm-nonce"]});jQuery(document).trigger("dlm-xhr-modal-data",[s,e]),document.dispatchEvent(new CustomEvent("dlm-xhr-modal-data",{detail:{data:s,headers:e}})),jQuery.post(dlmXHR.ajaxUrl,s,function(e){jQuery("#dlm-no-access-modal").remove();var o=document.createElement("div"),d=(o.innerHTML=e,/<script\b[^>]*>([\s\S]*?)<\/script>/gm);for(o.innerHTML=o.innerHTML.replace(d,"");
1null!==(n=d.exec(e));){var r=n[0],n=n[1],t=document.createElement("script"),r=r.match(/src=["']([^"']+)["']/),r=(r?t.src=r[1]:t.textContent=n,o.querySelector("#dlm-no-access-modal"));(r||document.body).appendChild(t)}for(;o.firstChild;)document.body.appendChild(o.firstChild);jQuery(document).trigger(s.action,[e,s]),document.dispatchEvent(new CustomEvent(s.action,{detail:[e,s]}))})}dlmExternalDownload(d,n,t,r,s){let a=new XMLHttpRequest,l=(t.attr("target"),t.attr("class")),i,e="";void 0!==d["dlm-external-download"]&&(e=d["dlm-external-download"]),void 0!==d["x-dlm-external-download"]&&(e=d["x-dlm-external-download"]),l=void 0!==l&&""!==l?l.replace("dlm-download-started","").replace("dlm-download-completed",""):"",t.addClass("dlm-download-started"),n.setAttribute("href","#"),n.removeAttribute("download"),n.setAttribute("disabled","disabled"),jQuery(document).trigger("dlm_download_triggered",[this,n,t,i,a]),a.responseType="blob",a.onreadystatechange=function(){var{status:e,readyState:o}=a;403===e?(dlmXHRinstance.dlmLogDownload(d,"failed",!1),a.abort(),t.find(".dlm-xhr-error").remove(),t.append('<span class="dlm-xhr-error">Acces Denied to file.</span>')):200==e&&4==o&&(e=a.response,i=URL.createObjectURL(e),n.removeEventListener("click",dlmXHRinstance.handleDownloadClick),n.setAttribute("download",""+r),n.setAttribute("href",i),n.click(),t.removeClass().addClass(l+" dlm-download-complete"),dlmXHRinstance.attachButtonEvent(),jQuery(document).trigger("dlm_download_complete",[this,n,t,i]),dlmXHRinstance.dlmLogDownload(d,"completed",!1),window.URL.revokeObjectURL(i),n.removeAttribute("download"),n.setAttribute("href",s),t.find(".dlm-xhr-loading-gif").remove(),t.find("span.dlm-xhr-progress").remove(),setTimeout(function(){t.removeClass().addClass(l)},1e3))},dlmXHRProgress&&a.addEventListener("progress",function(e){let o=e.total,d=(void 0!==e.total&&"undefined"!==e.total||(o=a.getResponseHeader("X-DLM-Filesize")),e.loaded/o*100);d=d.toFixed();var r;t.find("span.dlm-xhr-progress").remove(),r="dlm-download-started dlm-download-"+10*Math.ceil(d/10),1/0!=d&&t.append('<span class="dlm-xhr-progress"> '+d+"%</span>"),t.removeClass().addClass(l+" "+r),jQuery(document).trigger("dlm_download_progress",[this,n,t,i,e,d])}),a.onerror=function(){n.removeAttribute("download"),n.setAttribute("href",s),t.removeClass().addClass(l+" .dlm-no-xhr-download").find("span.dlm-xhr-progress").remove(),t.find(".dlm-xhr-error").remove(),t.append('<span class="dlm-xhr-error">'+dlmXHRtranslations.error+"</span>"),console.log("** An error occurred during the transaction")},a.open("GET",e,!0),a.setRequestHeader("Cache-Control","no-store, no-cache, no-transform, max-age=0"),a.setRequestHeader("dlm-xhr-request","dlm_XMLHttpRequest"),a.send()}}
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.