PageSourceSearch

https://www.onetrustacademies.org.uk/_site/js/min/functions.min.js?cache=260715

js onetrustacademies.org.uk collected 2026-09-29 11:31:01 UTC 8,380 bytes, 1 lines download raw bytes

1"use strict";function inView(){var e=document.querySelectorAll("[data-inview]");if("IntersectionObserver"in window){var a=new IntersectionObserver(function(e,t){for(var n=0;n<e.length;n++)if(e[n].isIntersecting){var i=e[n].target;viewed(i),a.unobserve(i)}},{threshold:0});console.log("inViewObserver",a);for(var t=0;t<e.length;t++)a.observe(e[t])}else{for(var n=[],i=0;i<e.length;i++){for(var o=e[i],l=0,r=o.dataset.inview;o;)l+=o.offsetTop-o.scrollTop+o.clientTop,o=o.offsetParent;l<intScrollPosition+document.documentElement.clientHeight+0*e[i].clientHeight?viewed(e[i]):n.push([l+0*e[i].clientHeight,e[i],r])}document.addEventListener("scroll",function(){for(var e=intScrollPosition+document.documentElement.clientHeight,t=0;t<n.length;t++)n[t][0]<e&&(viewed(n[t][1]),n.splice(t,1))})}}function viewed(e){var t=e.getAttribute("data-inview"),n=e.getAttribute("data-owlview");if(""!==t?document.querySelector(t).classList.add("inview"):e.classList.add("inview"),void 0!==n&&(console.log("element",e),loadOwlImages($(e))),e.hasAttribute("data-callback")){var i=e.getAttribute("data-callback");window[i](e)}}function lazyLoad(){var e=document.querySelectorAll("[data-lazy]");if("IntersectionObserver"in window)for(var a=new IntersectionObserver(function(e,t){for(var n=0;n<e.length;n++)if(e[n].isIntersecting){var i=e[n].target;writeImg(i,i.getAttribute("data-lazy")),a.unobserve(i)}},{rootMargin:"0px 0px 0px 0px"}),t=0;t<e.length;t++)a.observe(e[t]);else{for(var n=[],i=0;i<e.length;i++){var o=e[i],l=o.getAttribute("data-lazy").replace(/\s/g,"%20"),r=o.getBoundingClientRect().top+document.documentElement.scrollTop;r<intScrollPosition+document.documentElement.clientHeight-0?writeImg(e[i],e[i].getAttribute("data-lazy")):n.push([r-0,e[i],l])}document.addEventListener("scroll",function(){for(var e=intScrollPosition+document.documentElement.clientHeight,t=0;t<n.length;t++)n[t][0]<e&&(writeImg(n[t][1],n[t][2]),n.splice(t,1))})}}function writeImg(n,e){n.classList.add("lazy--prep");var i=n.querySelector(".lazy__load__img");null==i&&((i=document.createElement("div")).className="lazy__load__img",n.appendChild(i));var a=e||n.getAttribute("data-img"),o=new Image;o.src=a,n.hasAttribute("data-alt")?o.alt=n.getAttribute("data-alt"):o.alt="",o.onload=function(){if(n.hasAttribute("data-bg"))i.style.backgroundImage="url("+a+")";else if(i.appendChild(o),"false"!==n.getAttribute("data-fill")){var e=o.naturalWidth,t=o.naturalHeight;resizeImg(o,e,t)}setTimeout(function(){n.classList.add("lazy--loaded")},300)},o.onerror=function(){if(console.log("error on element "+n+" - thumbnail loaded"),n.hasAttribute("data-bg"))i.style.backgroundImage="url("+strFallbackPath+")";else if(!o.src.includes(strFallbackPath)&&(o.src=strFallbackPath,i.appendChild(o),"false"!==n.getAttribute("data-fill"))){var e=o.naturalWidth,t=o.naturalHeight;resizeImg(o,e,t)}setTimeout(function(){n.classList.add("lazy--loaded")},300)}}function resizeImg(e,t,n){var i=e.parentElement,a=t/n,o=i.offsetWidth,l=i.offsetHeight;parseInt(o/a)<l?(e.width=parseInt(l*a),e.height=parseInt(l)):(e.width=parseInt(o),e.height=parseInt(o/a))}function findSlide(e,t){if($(e).find("[data-img]").length){var n=$(e).find("[data-img]")[0];n.classList.contains("lazy--loaded")||writeImg(n)}}function loadCycle(e,t,n,i){if("string"==typeof e)e=$(e);t&&(e.on("cycle-initialized",function(e,t){findSlide(t.slides[0])}),e.on("cycle-before",function(e,t,n,i,a){findSlide(i)})),n&&e.on("cycle-before",function(e,t,n,i,a){var o=$(i),l=$(n);o.addClass("animate--in").siblings().removeClass("animate--out"),l.removeClass("animate--in").addClass("animate--out"),setTimeout(function(){l.removeClass("animate--out")},1e3)}),e.cycle(i)}function loadOwlCarousel(t,e,n){if("string"==typeof t)t=$(t);t.owlCarousel(n),e&&t.on("translated.owl.carousel",function(e){loadOwlImages(t)})}function loadOwlImages(e){e.find(".active").each(function(){findSlide($(this))})}function itemGrouping(e,t,n,i){for(var a=$(e),o=0;o<a.length;o+=t)a.slice(o,o+t).wrapAll(n).stop();i&&i()}function popup(e){return window.open(e,"popup","width=550, height=550, toolbar=0"),!1}function parallax(){for(var e=document.querySelectorAll("[data-parallax]"),t=new IntersectionObserver(function(e,t){for(var n=0;n<e.length;n++)for(var i=e[n].target,a=0;a<arrParallaxView.length;a++){var o=arrParallaxView[a];i==o[0]&&(o[2]=e[n].isIntersecting)}},{rootMargin:"50px 0px 50px 0px"}),n=0;n<e.length;n++){for(var i=e[n],a=document.querySelectorAll(i.getAttribute("data-watch"))[0],o=!1,l=0;l<arrParallaxView.length;l++){if(arrParallaxView[l][0]==a){o=l;break}}!1===o?(arrParallaxView.push([a,[i],!1]),t.observe(a)):arrParallaxView[o][1].push(i)}}function parallaxScroll(e){for(var t=0;t<arrParallaxView.length;t++){var n=arrParallaxView[t];if(1==n[2])for(var i=0;i<n[1].length;i++){var a=n[1][i],o=a.getAttribute("data-multiplier")||.1,l=a.getBoundingClientRect().top+e+a.offsetHeight/2,r=void 0;switch(a.getAttribute("data-parallax")){case"centre":r=(e-(l-intWinHeight/2))*o;break;case"centreFixed":0<(r=(e-(l-intWinHeight/2))*o)&&(r=0);break;case"centreInvert":r=(l-intWinHeight/2-e)*o;break;case"centreInvertFixed":(r=(l-intWinHeight/2-e)*o)<0&&(r=0);break;case"top":r=e*o;break;case"topInvert":r=-e*o;break;case"bottom":r=(e+intWinHeight-intDocHeight)*o;break;case"bottomInvert":r=-(e+intWinHeight-intDocHeight)*o}a.style.transform="translate3D(0,"+r+"px, 0)"}}}function stickyMenu(e,t,n,i){var a=document.getElementsByClassName(t)[0],o=a.offsetHeight;(a.offsetTop+o)*n<e?mason.classList.add(i):mason.classList.remove(i)}function checkAnimationFrame(){(intScrollPosition=window.pageYOffset)!==prevScrollPosition&&scrollHandle(intScrollPosition),window.requestAnimationFrame(checkAnimationFrame)}function scrollHandle(e){5<=Math.abs(prevScrollPosition-intScrollPosition)&&(prevScrollPosition<intScrollPosition?mason.classList.remove("mason--scrollingup"):mason.classList.add("mason--scrollingup")),stickyMenu(prevScrollPosition=intScrollPosition,"hero",.5,"mason--prep"),stickyMenu(intScrollPosition,"hero",1,"mason--sticky"),"IntersectionObserver"in window&&parallaxScroll(intScrollPosition),"function"==typeof customScroll&&customScroll(intScrollPosition)}function runCustomAccordion(e,t,n,i){var a=$(e);if(a.length<1)return!1;
1a.unbind("click"),a.on("click",t,function(){var e=$(this),t=e.parent("li");t.siblings().removeClass("active").find(n).slideUp(i),t.hasClass("active")?(t.removeClass("active"),e.next(n).stop().slideUp(i)):(t.addClass("active"),e.next(n).stop().slideDown(i))})}var mason=document.getElementsByClassName("mason")[0],$window=$(window),blnAdmin=mason.classList.contains("mason--admin"),blnHome=mason.classList.contains("mason--home"),blnInner=mason.classList.contains("mason--inner"),blnForm=!!$(".content__form, .content__block__form").length,objFit="objectFit"in document.documentElement.style,strFallbackPath="/_site/images/design/thumbnail.jpg";console.log("objFitFallback",objFit);var intScrollPosition=0,prevScrollPosition=0,blnTicking=!1,intWinHeight=0,intDocHeight=0,arrParallaxView=[];document.addEventListener("DOMContentLoaded",function(){lazyLoad(),inView(),scripts(),intScrollPosition=window.pageYOffset,intWinHeight=window.innerHeight,intDocHeight=document.documentElement.scrollHeight,"IntersectionObserver"in window&&parallax()}),window.onload=function(){scrollHandle(intScrollPosition),mason.classList.add("mason--loaded")},window.addEventListener("resize",function(){if(!objFit)for(var e=document.querySelectorAll('.lazy--loaded:not([data-fill="false"])'),t=0;t<e.length;t++){var n=e[t];if(n.classList.contains("lazy--loaded")){var i=n.querySelector("img"),a=i.naturalWidth,o=i.naturalHeight;resizeImg(n.querySelector("img"),a,o)}}}),$('[data-popupsource="true"]').each(function(){$(this).e4eDialog({title:"Select Source",width:400,height:450,buttons:[{id:"select",label:"Select",fn:"selectItem()",className:"primary"},"cancel"]})});var arrAnchors=document.querySelectorAll("[data-anchor]");arrAnchors.forEach(function(t){t.addEventListener("click",function(e){e.preventDefault(),document.querySelector(t.dataset.anchor).scrollIntoView({behavior:"smooth"})})}),window.requestAnimationFrame(checkAnimationFrame),window.onresize=function(){intWinHeight=window.innerHeight,intDocHeight=document.body.scrollHeight,scrollHandle(intScrollPosition)},runCustomAccordion(".menu__list",".menu__list__item__button",".menu__list__item__sub",400);

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.