"use strict";function stickyHeader(){window.pageYOffset>headerTop?(document.body.style.paddingTop=header.offsetHeight+"px",header.classList.add("sticky")):(document.body.style.paddingTop=0,header.classList.remove("sticky"))}function mobileNav(n){n.preventDefault();menu.classList.toggle("toggleNav");this.innerHTML=this.innerHTML===togglebtnHtml?"<i class='fas fa-times'><\/i>":togglebtnHtml}function RedirectToSearchPage(){window.location="/search?keyword="+globalSearchBoxInput.value.trim()}function scrollWindow(n,t){TweenLite.to(window,1,{scrollTo:{y:document.querySelector("#"+n),offsetY:t,autoKill:!1}})}function scrollMilestones(){function i(n){if(n=document.querySelector("#"+n),n&&n.parentElement){if(n.parentElement.classList.contains("container"))return n.id==="milestone-nav-5AE28507DAE3486E8BA6D75442FBAC9C"?n.parentElement.offsetTop<=window.pageYOffset+600&&n.parentElement.offsetTop+n.parentElement.scrollHeight>window.pageYOffset+600:n.parentElement.offsetTop<=window.pageYOffset+300&&n.parentElement.offsetTop+n.parentElement.scrollHeight>window.pageYOffset+300;if(n.parentElement.classList.contains("milestonesNav")){if(n.parentElement.parentElement)return n.parentElement.parentElement.offsetTop<=window.pageYOffset+500&&n.parentElement.parentElement.offsetTop+n.parentElement.parentElement.scrollHeight>window.pageYOffset+500}else return n.offsetTop<=window.pageYOffset+500&&n.offsetTop+n.scrollHeight>window.pageYOffset+500}}function r(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:".home-ctas";t=document.querySelector(t);t&&t.offsetTop<=window.pageYOffset+700&&t.offsetTop+t.scrollHeight>window.pageYOffset+700&&(n.style.opacity="0")}var n=document.querySelector("#milestoneIndicators"),t=void 0;n&&(t=n.querySelectorAll(".milestoneIndicator"));t&&(window.screen.width>=768&&(document.body.scrollTop>600||document.documentElement.scrollTop>600?(n.style.opacity="1",n.style.top=""):n.style.top="100%"),t.forEach(function(n){n.classList.remove("-isActive");i(n.dataset.id)&&n.classList.add("-isActive")}));r()}var header,headerTop;window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach);header=document.querySelector(".header");headerTop=header.offsetTop;window.addEventListener("scroll",stickyHeader);var togglebtn=header.querySelector(".toggleNav-btn"),togglebtnHtml=togglebtn.innerHTML,menu=document.querySelector(".header-nav"),globalSearchBox=header.querySelector(".header .-textinput"),globalSearchForm=document.querySelector("#globalSearchForm"),globalSearchBoxInput=document.querySelector("#txtGlobalSearch"),globalSearchBoxInputIcon=document.querySelector(".globalSearchInputIcon");togglebtn.addEventListener("click",mobileNav);globalSearchForm.addEventListener("submit",function(n){n.preventDefault();RedirectToSearchPage()});globalSearchBoxInputIcon.addEventListener("click",function(){globalSearchBox.classList.toggle("-expanded");var n=globalSearchBoxInput.value.trim();n!=""&&RedirectToSearchPage()});var SocialShare=function(){function i(){t.style.visibility=t.style.visibility==="visible"?"":"visible"}var n=document.querySelector(".js-share"),t=document.querySelector(".socialBtns");return n&&n.addEventListener("click",i),{showShareIcons:i}}(),copyToClipboard=function(n){var t=document.createElement("textarea"),i;t.value=n;t.setAttribute("readonly","");t.style.position="absolute";t.style.left="-9999px";document.body.appendChild(t);i=document.getSelection().rangeCount>0?document.getSelection().getRangeAt(0):!1;t.select();document.execCommand("copy");document.body.removeChild(t);i&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(i))},CiteArticle=function(){function i(){if(n.value===""){var i=document.querySelector("#AuthorName"),r=document.querySelector("#ArticleTitle"),t=document.querySelector("#PublishedYear"),e=document.querySelector("#AlertMessage"),f=document.querySelector("#CiteBruderhofHistoricalArchiveText"),u=document.querySelector("#DocumentId");i!=null&&i.value!==""&&(n.value+=i.value+", ");r!=null&&r.value!==""&&(n.value+=r.value);t!=null&&t.value!==""&&t.value!=="0"&&(n.value+=", "+t.value+", ");(t==null||t.value==""||t.value=="0")&&(n.value+=", ");u!=null&&u.value!==""&&(n.value+=u.value+", ");f!=null&&(n.value+=f.value)}copyToClipboard(n.value);alert(e.value)}var t=document.querySelector(".cite-article"),n=document.querySelector("#CiteArticleText");t&&t.addEventListener("click",i)}(),VisitSource=function(){function i(){var n=window.open(t.value,"_blank");n.focus()}var n=document.querySelector(".visit-source"),t=document.querySelector("#VisitSourceUrl");n&&t&&(t.value!==""?n.addEventListener("click",i):n.classList.toggle("hidden"))}(),MilestoneIndicator=function(){function h(){var n=this.querySelector(".milestoneIndicatorName");n.innerHTML=this.dataset.title}function c(){var n=this.querySelector(".milestoneIndicatorName");n.innerHTML=""}var r=document.querySelector("#milestoneIndicators"),t=void 0,u=document.querySelector("#goToMilestones"),n,o,s;if(u&&u.addEventListener("click",function(){scrollWindow("milestone-nav-506A9FF7F5404DC39F29E9A4B351FBD6",300)}),r&&(t=r.querySelectorAll(".milestoneIndicator")),t){var l=function(n){n.addEventListener("mouseover",h);n.addEventListener("mouseout",c);n.addEventListener("click",function(t){t.preventDefault();var i=n.dataset.id,r=document.querySelector("#milestone-nav-506A9FF7F5404DC39F29E9A4B351FBD6"),u=r.offsetHeight-500;switch(i){case"milestone-nav-506A9FF7F5404DC39F29E9A4B351FBD6":scrollWindow("milestone-nav-506A9FF7F5404DC39F29E9A4B351FBD6",u);break;case"milestone-nav-5AE28507DAE3486E8BA6D75442FBAC9C":scrollWindow("milestone-nav-5AE28507DAE3486E8BA6D75442FBAC9C",650);break;case"milestone-nav-0E88518248AD46FC984497967BE11C0C":scrollWindow("milestone-nav-0E88518248AD46FC984497967BE11C0C",200);break;case"milestone-nav-7FC16521E33E4815A118186E424AD01E":scrollWindow("milestone-nav-7FC16521E33E4815A118186E424AD01E",60);break;default:scrollWindow(this.dataset.id,150)}})},i=!0,f=!1,e=undefined;try{for(n=t[Symbol.iterator]();!(i=(o=n.next()).done);i=!0)s=o.value,l(s)}catch(a){f=!0;e=a}finally{try{!i&&n.return&&n.return()}finally{if(f)throw e;}}}}();window.onscroll=function(){scrollMilestones()};"use strict";var DocumentFullScreen=function(){function i(n){n.preventDefault();documentScanImagesModal.open()}var n=document.querySelector(".full-screen"),t=document.querySelector(".documentScanImagesGallery");n&&t&&n.addEventListener("click",i)}(),DocumentDowloadOriginal=function(){var n=document.querySelector(".download-original"),t;n&&(t=document.querySelector(".docDownloadImages"),t&&n.addEventListener("click",function(n){n.preventDefault();docDownloadImagesModal.open()}))}(),DocumentDowload=function(){function o(){t=document.querySelector(".docDownloadImages");t&&(f=t.querySelector(".js-cancel"),n=t.querySelector(".js-download"),i=t.querySelectorAll(".form-group__check.-docimage"),r=t.querySelector("#chkSelectAll"),e=t.querySelector("#DocumentName"),u=t.querySelector("#docImageDownloadMsg"))}function s(){function t(t,i){$.post({url:"/api/Documents/ExportImages",data:{imageUrls:t,fileName:i},dataType:"json",crossDomain:!1,traditional:!0,beforeSend:function(){u.style.display="block";n.classList.add("-disabled")},success:function(t){setTimeout(function(){var i=JSON.parse(t);i.success===!0&&(window.location.href="/api/Documents/DownloadFile?fileName="+i.file_name+"&isZipFile="+i.is_zip_file);u.style.display="none";n.classList.remove("-disabled");docDownloadImagesModal.close()},1e3)},error:function(t){console.log(t);u.style.display="none";n.classList.remove("-disabled");docDownloadImagesModal.close()}})}r&&r.addEventListener("click",function(){this.checked===!0?(i.forEach(function(n){n.setAttribute("checked","checked");n.checked=!0}),n.classList.remove("-disabled")):(i.forEach(function(n){n.setAttribute("checked","");n.removeAttribute("checked");n.checked=!1}),n.classList.add("-disabled"))});i&&i.forEach(function(t){t.addEventListener("click",function(){t.checked===!0?(this.setAttribute("checked","checked"),this.checked=!0):(this.setAttribute("checked",""),this.removeAttribute("checked"),this.checked=!1);var u=0;i.forEach(function(n){n.checked&&u++});i.length===u?(r.setAttribute("checked","checked"),r.checked=!0):(r.setAttribute("checked",""),r.removeAttribute("checked"),r.checked=!1);u>0?n.classList.remove("-disabled"):n.classList.add("-disabled")})});n&&n.addEventListener("click",function(n){n.preventDefault();var r=[],u=0;i.forEach(function(n){n.checked&&(r[u]=n.dataset.imageurl,u++)});t(r,e.value)});f&&f.addEventListener("click",function(n){n.preventDefault();docDownloadImagesModal.close()})}function h(){o();s()}var t=void 0,f=void 0,n=void 0,i=void 0,r=void 0,e=void 0,u=void 0;h()}()