!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Logic={})}(this,(function(e){"use strict";function t(e){"false"===e.getAttribute("aria-expanded")?e.setAttribute("aria-expanded",!0):e.setAttribute("aria-expanded",!1)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,r=void 0,"symbol"==typeof(r=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"))?r:String(r)),i)}var o,r}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}function l(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=s(e);if(t){var o=s(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return l(this,n)}}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,r,s,a=[],l=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=r.call(n)).done)&&(a.push(i.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var h=function(){var e=document.querySelectorAll(".sub-nav-wrapper");e.length&&e.forEach((function(e){var t=e.querySelector(".sub-nav-container"),n=e.querySelector(".sub-nav"),i=e.querySelectorAll(".sub-nav-item"),o=i.length,r=n.offsetWidth/o,s=e.querySelector(".left-arrow"),a=e.querySelector(".right-arrow"),l=e.querySelector(".current"),c=document.querySelectorAll(".a-to-z"),d="",u="",p="",h="";function m(e){e.classList.remove("current"),e.removeAttribute("aria-current")}function g(e){for(var t=0;t<i.length;t++)m(i[t]);e.target.classList.add("current"),e.target.setAttribute("aria-current","page")}s.addEventListener("click",(function(){d=t.scrollLeft-r,E(t,d,300),setTimeout(b,500)})),s.addEventListener("mousedown",(function(e){e.preventDefault()})),a.addEventListener("click",(function(){d=t.scrollLeft+r,E(t,d,300),setTimeout(b,500)})),a.addEventListener("mousedown",(function(e){e.preventDefault()})),t.addEventListener("scroll",b),window.addEventListener("resize",(function(){var e;clearTimeout(e),e=setTimeout((function(){b()}),1e3)}));var f,y=window.location.hash;if(0===c.length)for(var v=0;v<i.length;v++)i[v].addEventListener("mousedown",(function(e){e.preventDefault()})),i[v].addEventListener("click",(function(e){g(e)})),(y||0!==v)&&m(i[v]),p=(u=i[v].attributes[0].value).replace(/\s+/g,"-").toLowerCase(),window.location.href.indexOf(p)>-1&&(h=e.querySelectorAll("[data-current='"+u+"']"));for(var w=0;w<h.length;w++)(f=h[w]).classList.add("current"),f.setAttribute("aria-current","page");function b(){var e=window.innerWidth-t.getBoundingClientRect().right;window.innerWidth-n.getBoundingClientRect().right>=e-1?a.classList.add("hide"):a.classList.remove("hide"),t.scrollLeft>0?s.classList.remove("hide"):s.classList.add("hide"),s.style.opacity=1,a.style.opacity=1}function E(e,t,n){var i=e.scrollLeft,o=t-i,r=0;!function t(){r+=20;var s=Math.easeInOutQuad(r,i,o,n);e.scrollLeft=s,r<n&&setTimeout(t,20)}()}setTimeout(b,500),Math.easeInOutQuad=function(e,t,n,i){return(e/=i/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t};!function(){var n=e.querySelector(".current");if(n){if(n===l)return;var o,r=l=n,s=i,a=window.innerWidth/2,c=l.offsetWidth;s.forEach((function(e){if(r===e){var t=parseInt(window.getComputedStyle(e.parentElement).paddingRight);o=e.offsetLeft-a+c/2+t}})),E(t,o,500)}}()}))},m=function(){if(!document.querySelector('[data-anchor="true"]'))return!1;h();var e=document.querySelectorAll('[data-anchor="true"]'),t=!1,n=new function(){this.isScrolling=!1;var e=this;document.querySelector(".course-page-header").querySelectorAll('a[href^="#"]').forEach((function(t){t.addEventListener("click",(function(){e.isScrolling=!0}))}));!function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:66;e&&"function"==typeof e&&window.addEventListener("scroll",(function(){window.clearTimeout(t),t=setTimeout(e,n)}),!1)}((function(){e.isScrolling=!1}))};window.addEventListener("scroll",(function(){n.isScrolling||t||(window.requestAnimationFrame((function(){var n;n=[],e.forEach((function(e){var t=e.getBoundingClientRect().top;t>60&&t<window.innerHeight/2&&""!==e.id&&n.push(e.id)})),0!==n.length&&(window.history.replaceState(null,null,"#"+n[0]),h()),t=!1})),t=!0)}))};function g(e,t,n,i,o){document.querySelectorAll(e).forEach((function(e){var r=e.querySelectorAll(t),s=e.querySelectorAll(n),a=[];performance.now(),s.forEach((function(e,t){var n=new Image;n.onload=function(){a.push(t),l&&(e.src=n.src,e.removeAttribute("data-src")),a.length===s.length&&(performance.now(),a=[],!0===o?function(e,t){e.forEach((function(e){e.style.opacity="1"})),t()}(r,i):i())};var l=e.hasAttribute("data-src");n.src=l?e.getAttribute("data-src"):e.getAttribute("src")}))}))}function f(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Array.from(document.querySelectorAll(e)).forEach((function(e){return function(e){var n=e.querySelectorAll(t),i=0;function o(){for(var e=0;e<n.length;e++)n[e].clientHeight>i&&(i=n[e].clientHeight)}function r(){i=0,o();for(var e=0;e<n.length;e++){var t=i-n[e].clientHeight;n[e].style.marginTop=t+"px"}}function s(){for(var e=0;e<n.length;e++)n[e].style.marginTop="0px"}function a(){window.innerWidth<600?s():r()}a()}(e)})),"function"==typeof n&&n()}var y=function(){document.querySelectorAll(".vertical-nav").forEach((function(e){if(null!==e.querySelector(".vertical-nav .nav-container")){for(var t=e.querySelectorAll(".vertical-nav li"),n="",i="",o="",r=0;r<t.length;r++)t[r].addEventListener("mousedown",(function(e){e.preventDefault()})),t[r].classList.remove("current"),t[r].removeAttribute("aria-current"),i=(n=t[r].attributes[0].value).replace(/\s+/g,"-").toLowerCase(),window.location.href.indexOf(i)>-1&&(o=e.querySelectorAll("[data-current='"+n+"']")[0]);null!==t&&null!==o&&(a(),l());for(var s=0;s<o.length;s++)o[s].classList.add("current"),o[s].setAttribute("aria-current","page")}function a(){for(var e=0;e<t.length;e++)t[e].addEventListener("click",c),t[e].removeAttribute("class"),t[e].removeAttribute("aria-current")}function l(){var n=e.querySelector(".nav-active-bar"),i=o;o.parentNode;for(var r=t,s=r.length,a=0;a<s;++a)if(i===r[a]){var l=44*a;n.style.marginTop=l+"px";break}}function c(e){o=e.target.parentNode,a(),o.classList.add("current"),o.setAttribute("aria-current","page"),l()}}))};class v{constructor(e,t){t=Object.assign({},v.defaults,t),this.element=e,this.opts=t,this.touchStartX=null,this.touchStartY=null,this.touchEndX=null,this.touchEndY=null,this.velocityX=null,this.velocityY=null,this.longPressTimer=null,this.doubleTapWaiting=!1,this.handlers={panstart:[],panmove:[],panend:[],swipeleft:[],swiperight:[],swipeup:[],swipedown:[],tap:[],doubletap:[],longpress:[]},this._onTouchStart=this.onTouchStart.bind(this),this._onTouchMove=this.onTouchMove.bind(this),this._onTouchEnd=this.onTouchEnd.bind(this),this.element.addEventListener("touchstart",this._onTouchStart,w),this.element.addEventListener("touchmove",this._onTouchMove,w),this.element.addEventListener("touchend",this._onTouchEnd,w),this.opts.mouseSupport&&!("ontouchstart"in window)&&(this.element.addEventListener("mousedown",this._onTouchStart,w),document.addEventListener("mousemove",this._onTouchMove,w),document.addEventListener("mouseup",this._onTouchEnd,w))}destroy(){this.element.removeEventListener("touchstart",this._onTouchStart),this.element.removeEventListener("touchmove",this._onTouchMove),this.element.removeEventListener("touchend",this._onTouchEnd),this.element.removeEventListener("mousedown",this._onTouchStart),document.removeEventListener("mousemove",this._onTouchMove),document.removeEventListener("mouseup",this._onTouchEnd),clearTimeout(this.longPressTimer),clearTimeout(this.doubleTapTimer)}on(e,t){if(this.handlers[e])return this.handlers[e].push(t),{type:e,fn:t,cancel:()=>this.off(e,t)}}off(e,t){if(this.handlers[e]){const n=this.handlers[e].indexOf(t);-1!==n&&this.handlers[e].splice(n,1)}}fire(e,t){for(let n=0;n<this.handlers[e].length;n++)this.handlers[e][n](t)}onTouchStart(e){this.thresholdX=this.opts.threshold("x",this),this.thresholdY=this.opts.threshold("y",this),this.disregardVelocityThresholdX=this.opts.disregardVelocityThreshold("x",this),this.disregardVelocityThresholdY=this.opts.disregardVelocityThreshold("y",this),this.touchStartX="mousedown"===e.type?e.screenX:e.changedTouches[0].screenX,this.touchStartY="mousedown"===e.type?e.screenY:e.changedTouches[0].screenY,this.touchMoveX=null,this.touchMoveY=null,this.touchEndX=null,this.touchEndY=null,this.longPressTimer=setTimeout((()=>this.fire("longpress",e)),this.opts.longPressTime),this.fire("panstart",e)}onTouchMove(e){if("mousemove"===e.type&&(!this.touchStartX||null!==this.touchEndX))return;const t=("mousemove"===e.type?e.screenX:e.changedTouches[0].screenX)-this.touchStartX;this.velocityX=t-this.touchMoveX,this.touchMoveX=t;const n=("mousemove"===e.type?e.screenY:e.changedTouches[0].screenY)-this.touchStartY;this.velocityY=n-this.touchMoveY,this.touchMoveY=n;const i=Math.abs(this.touchMoveX),o=Math.abs(this.touchMoveY);this.swipingHorizontal=i>this.thresholdX,this.swipingVertical=o>this.thresholdY,this.swipingDirection=i>o?this.swipingHorizontal?"horizontal":"pre-horizontal":this.swipingVertical?"vertical":"pre-vertical",Math.max(i,o)>this.opts.pressThreshold&&clearTimeout(this.longPressTimer),this.fire("panmove",e)}onTouchEnd(e){if("mouseup"===e.type&&(!this.touchStartX||null!==this.touchEndX))return;this.touchEndX="mouseup"===e.type?e.screenX:e.changedTouches[0].screenX,this.touchEndY="mouseup"===e.type?e.screenY:e.changedTouches[0].screenY,this.fire("panend",e),clearTimeout(this.longPressTimer);const t=this.touchEndX-this.touchStartX,n=Math.abs(t),i=this.touchEndY-this.touchStartY,o=Math.abs(i);n>this.thresholdX||o>this.thresholdY?(this.swipedHorizontal=this.opts.diagonalSwipes?Math.abs(t/i)<=this.opts.diagonalLimit:n>=o&&n>this.thresholdX,this.swipedVertical=this.opts.diagonalSwipes?Math.abs(i/t)<=this.opts.diagonalLimit:o>n&&o>this.thresholdY,this.swipedHorizontal&&(t<0?(this.velocityX<-this.opts.velocityThreshold||t<-this.disregardVelocityThresholdX)&&this.fire("swipeleft",e):(this.velocityX>this.opts.velocityThreshold||t>this.disregardVelocityThresholdX)&&this.fire("swiperight",e)),this.swipedVertical&&(i<0?(this.velocityY<-this.opts.velocityThreshold||i<-this.disregardVelocityThresholdY)&&this.fire("swipeup",e):(this.velocityY>this.opts.velocityThreshold||i>this.disregardVelocityThresholdY)&&this.fire("swipedown",e))):n<this.opts.pressThreshold&&o<this.opts.pressThreshold&&(this.doubleTapWaiting?(this.doubleTapWaiting=!1,clearTimeout(this.doubleTapTimer),this.fire("doubletap",e)):(this.doubleTapWaiting=!0,this.doubleTapTimer=setTimeout((()=>this.doubleTapWaiting=!1),this.opts.doubleTapTime),this.fire("tap",e)))}}v.defaults={threshold:(e,t)=>Math.max(25,Math.floor(.15*("x"===e?window.innerWidth||document.body.clientWidth:window.innerHeight||document.body.clientHeight))),velocityThreshold:10,disregardVelocityThreshold:(e,t)=>Math.floor(.5*("x"===e?t.element.clientWidth:t.element.clientHeight)),pressThreshold:8,diagonalSwipes:!1,diagonalLimit:Math.tan(.375*Math.PI),longPressTime:500,doubleTapTime:300,mouseSupport:!0};let w=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){w={passive:!0}}}))}catch(e){}var b=function(){function e(){n(this,e),this.apiKey="AIzaSyDbDzDqUdBI3BkKl6sQcr0HYCqwOl-4YQQ",this.mapClass=".gmaps--wrapper",this.cssVariable="--static-url",this.markerURL="https://ual-media-res.cloudinary.com/image/upload/v1592912183/download_onlpn2.png",this.defaultZoom=17,this.buildMaps()}return o(e,[{key:"getMaps",value:function(){return!!document.querySelector(this.mapClass)&&Array.from(document.querySelectorAll(this.mapClass))}},{key:"buildMaps",value:function(){var e=this,t=this.getMaps();if(!t)return!1;t.forEach((function(t){return e.buildMap(t)}))}},{key:"buildMap",value:function(e){var t=Object.assign({},e.dataset);if(!Object.prototype.hasOwnProperty.call(t,"address")&&!Object.prototype.hasOwnProperty.call(t,"longitude")&&!Object.prototype.hasOwnProperty.call(t,"latitude"))return!1;var n="light"===t.variant?this.getLightStyles():this.getDarkStyles(),i="https://maps.googleapis.com/maps/api/staticmap?&key=".concat(this.apiKey,"&center=").concat(this.getLocation(t),"&zoom=").concat(this.defaultZoom,"&format=jpeg&sensor=false&size=1000x594&scale=2&maptype=roadmap").concat(this.getMarker(t),"&").concat(this.buildStyles(n));e.style.setProperty("--static-url","url('".concat(i,"')"))}},{key:"getLocation",value:function(e){return Object.prototype.hasOwnProperty.call(e,"latitude")&&Object.prototype.hasOwnProperty.call(e,"longitude")?"".concat(e.latitude,",").concat(e.longitude):encodeURI(e.address)}},{key:"getMarker",value:function(e){return"true"!==e.marker?null:"&markers=icon:".concat(this.markerURL,"|").concat(this.getLocation(e))}},{key:"buildStyles",value:function(e){var t=[];return e.forEach((function(e){var n="";e.stylers&&e.stylers.length>0&&(n+=(Object.prototype.hasOwnProperty.call(e,"featureType")?"feature:"+e.featureType:"feature:all")+"|",n+=(Object.prototype.hasOwnProperty.call(e,"elementType")?"element:"+e.elementType:"element:all")+"|",e.stylers.forEach((function(e){var t=Object.keys(e)[0],i=e[t].toString().replace("#","0x");n+=t+":"+i+"|"}))),t.push("style="+encodeURIComponent(n))})),t.join("&")}},{key:"getLightStyles",value:function(){return[{featureType:"water",elementType:"geometry",stylers:[{color:"#e9e9e9"},{lightness:17}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:"#f5f5f5"},{lightness:20}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffffff"},{lightness:17}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#ffffff"},{lightness:29},{weight:.2}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#ffffff"},{lightness:18}]},{featureType:"road.local",elementType:"geometry",stylers:[{color:"#ffffff"},{lightness:16}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#f5f5f5"},{lightness:21}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#dedede"},{lightness:21}]},{elementType:"labels.text.stroke",stylers:[{visibility:"on"},{color:"#ffffff"},{lightness:16}]},{elementType:"labels.text.fill",stylers:[{saturation:0},{color:"#333333"},{lightness:40}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#f2f2f2"},{lightness:19}]},{featureType:"administrative",elementType:"geometry.fill",stylers:[{color:"#fefefe"},{lightness:20}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#fefefe"},{lightness:17},{weight:1.2}]},{featureType:"poi",elementType:"labels.text",stylers:[{visibility:"off"}]}]}},{key:"getDarkStyles",value:function(){return[{featureType:"all",elementType:"labels.text.fill",stylers:[{saturation:0},{color:"#000000"},{lightness:40}]},{featureType:"all",elementType:"labels.text.stroke",stylers:[{visibility:"on"},{color:"#000000"},{lightness:16}]},{featureType:"all",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"administrative",elementType:"geometry.fill",stylers:[{color:"#000000"},{lightness:20}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#000000"},{lightness:17},{weight:1.2}]},{featureType:"administrative",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"administrative.country",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"administrative.country",elementType:"geometry",stylers:[{visibility:"simplified"}]},{featureType:"administrative.country",elementType:"labels.text",stylers:[{visibility:"simplified"}]},{featureType:"administrative.province",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"administrative.locality",elementType:"all",stylers:[{visibility:"simplified"},{saturation:"-100"},{lightness:"30"}]},{featureType:"administrative.neighborhood",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"administrative.land_parcel",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"landscape",elementType:"all",stylers:[{visibility:"simplified"},{gamma:"0.00"},{lightness:"74"}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:"#000000"},{lightness:20}]},{featureType:"landscape.man_made",elementType:"all",stylers:[{lightness:"3"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#000000"},{lightness:21}]},{featureType:"road",elementType:"geometry",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#000000"},{lightness:17}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#000000"},{lightness:29},{weight:.2}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#000000"},{lightness:18}]},{featureType:"road.local",elementType:"geometry",stylers:[{color:"#000000"},{lightness:16}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#000000"},{lightness:19}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#000000"},{lightness:17}]},{featureType:"poi",elementType:"labels.text",stylers:[{visibility:"off"}]}]}}]),e}();function E(){var e=document.querySelector("#language-flagIcon"),t=document.querySelector("#language-dropdown-list"),n=document.querySelectorAll(".language-opt"),i=document.querySelectorAll(".language-selectedLang");function o(e){var n=e.getAttribute("data-lang"),o=e.querySelector(".language-flag").getAttribute("src"),r=i[0].getAttribute("src");i.forEach((function(e,i){r!==o&&(e.setAttribute("src",o),_handleLanguageClick(n),0===i&&t.classList.toggle("language-hideList"))}))}null!==e&&e.addEventListener("click",(function(){t.classList.toggle("language-hideList"),t.classList.contains("language-hideList")||function(){t.focus();var e=document.querySelector("#"+t.getAttribute("aria-activedescendant"));function n(){var i=window.event,r=i.which||i.keyCode,s=38,a=40,l=13,c=t.querySelectorAll(".language-opt"),d=Array.from(c);function u(e){var n=e.getAttribute("id");t.setAttribute("aria-activedescendant",n),e.setAttribute("aria-selected",!0),e.classList.add("focused"),d.filter((function(t){return t!==e})).forEach((function(e){e.classList.remove("focused"),e.removeAttribute("aria-selected")}))}r!==a&&r!==s||i.preventDefault(),r===a&&null!==e.nextElementSibling&&u(e=e.nextElementSibling),r===s&&null!==e.previousElementSibling&&u(e=e.previousElementSibling),r===l&&("true"===i.target.getAttribute("aria-expanded")&&(i.preventDefault(),i.target.setAttribute("aria-expanded",!1),t.classList.remove("language-hideList")),o(e),t.removeEventListener("keydown",n))}e.classList.add("focused"),e.setAttribute("aria-selected",!0),t.addEventListener("keydown",n)}()})),n.forEach((function(e){e.addEventListener("click",(function(){o(e)}))}))}e.AccordionLogic=function(){document.querySelectorAll(".ual-accordion__title").forEach((function(e){e.addEventListener("click",(function(e){var t=e.target.parentElement,n=e.target.nextElementSibling;if(t.classList.contains("animating"))return t.classList.remove("animating","collapsing"),void t.offsetWidth;var i=function(e){return n.addEventListener("animationend",e,{once:!0})};requestAnimationFrame((function(){return t.classList.add("animating")})),i((function(){return t.classList.remove("animating")})),null!==t.getAttribute("open")&&(e.preventDefault(),t.classList.add("collapsing"),i((function(){t.removeAttribute("open"),t.classList.remove("collapsing")})))}))}))},e.AfterApplicationLogic=function(){var e=document.getElementById("after-application-home-btn"),t=document.getElementById("after-application-international-btn");function n(n){var i,o,r,s=n.currentTarget.section;for(n.currentTarget.setAttribute("aria-checked","true"),"after-application-home-btn"===n.currentTarget.id&&t.setAttribute("aria-checked","false"),"after-application-international-btn"===n.currentTarget.id&&e.setAttribute("aria-checked","false"),o=document.getElementsByClassName("after-application-tab"),i=0;i<o.length;i++)o[i].style.display="none";for(r=document.getElementsByClassName("tab-link"),i=0;i<r.length;i++)r[i].className=r[i].className.replace(" selected","");document.getElementsByClassName(s)[0].style.display="grid"}e&&(document.addEventListener("keydown",(function(n){var i=document.activeElement===t,o=document.activeElement===e,r=13===n.keyCode;(r&&i||r&&o)&&document.activeElement.click(n)})),e.addEventListener("click",n),e.buttonName="home-btn",e.section="home",t.addEventListener("click",n),t.buttonName="international-btn",t.section="international")},e.ApplyNow23Logic=function(){var e=document.getElementById("home-tab-title"),t=document.getElementById("international-tab-title");function n(n){var i,o,r=n.currentTarget.section;for(n.currentTarget.setAttribute("aria-expanded","true"),"home-tab-title"===n.currentTarget.id&&(t.setAttribute("aria-expanded","false"),e.classList.add("active"),e.classList.remove("inactive"),t.classList.add("inactive"),t.classList.remove("active")),"international-tab-title"===n.currentTarget.id&&(e.setAttribute("aria-expanded","false"),e.classList.remove("active"),e.classList.add("inactive"),t.classList.remove("inactive"),t.classList.add("active")),o=document.getElementsByClassName("info-container"),i=0;i<o.length;i++)o[i].style.display="none";document.getElementsByClassName(r)[0].style.display="block"}e&&(document.addEventListener("keydown",(function(n){var i=document.activeElement===t,o=document.activeElement===e,r=13===n.keyCode&&32;(r&&i||r&&o)&&document.activeElement.click(n)})),e.addEventListener("click",n),e.buttonName="home-tab-title",e.section="home-tab-container",t.addEventListener("click",n),t.buttonName="apply-now-radio-btn-international",t.section="international-tab-container")},e.ApplyNowLogic=function(){var e=document.getElementById("apply-now-btn"),t=document.getElementById("apply-now-radio-btn-international");function n(n){var i,o,r,s=n.currentTarget.section;for(n.currentTarget.setAttribute("aria-checked","true"),"apply-now-btn"===n.currentTarget.id&&t.setAttribute("aria-checked","false"),"apply-now-radio-btn-international"===n.currentTarget.id&&e.setAttribute("aria-checked","false"),o=document.getElementsByClassName("apply-now-tab"),i=0;i<o.length;i++)o[i].style.display="none";for(r=document.getElementsByClassName("tab-link"),i=0;i<r.length;i++)r[i].className=r[i].className.replace(" selected","");document.getElementsByClassName(s)[0].style.display="block"}e&&(document.addEventListener("keydown",(function(n){var i=document.activeElement===t,o=document.activeElement===e,r=13===n.keyCode;(r&&i||r&&o)&&document.activeElement.click(n)})),e.addEventListener("click",n),e.buttonName="apply-now-btn",e.section="apply-home",t.addEventListener("click",n),t.buttonName="apply-now-radio-btn-international",t.section="apply-international")},e.AvailabilityTableLogic=function(){},e.BannerLogic=function(){var e=document.getElementsByClassName("btn");function t(){document.querySelector(".banner-container").classList.add("retract")}for(var n=0;n<e.length;n++)e[n].addEventListener("click",t)},e.BottomAlignCards=function(){var e=document.querySelectorAll(".bottom-align-cards");e.length>0&&e.forEach((function(e,t){var n=e.querySelectorAll(".caption-container"),i=e.querySelectorAll(".caption-container img"),o=e.querySelectorAll(".image-container"),r=Array.from(n),s=Array.from(i),a=Array.from(o),l=0,c=[];function u(e,t){var n=e.order,i=t.order,o=0;return n>i?o=1:n<i&&(o=-1),o}window.innerWidth<600&&(a.forEach((function(e,t){e.style.height=""})),r.forEach((function(e){e.classList.remove("caption-container-bottom-align")}))),window.innerWidth>600&&(r.forEach((function(e){e.classList.add("caption-container-bottom-align")})),a.forEach((function(e,t){e.style.height="400px"})),a.forEach((function(e,t){var n=document.body.getBoundingClientRect(),i=e.getBoundingClientRect().top-n.top,o=new Image;o.onload=function(){c.push({order:t,naturalOffset:i,offset:100*Math.ceil(i/100)+100,height:s[t].clientHeight}),l===s.length-1&&function(e){for(var t=e.reduce((function(e,t){var n=t.offset;return e.hasOwnProperty(n)?(e[n].push(t),e):(e[n]=[t],e)}),{}),n=null,i=function(){var e=d(r[o],2);e[0];var t=e[1];t.forEach((function(e,i){(0===i||e.height>n)&&(n=e.height),i===t.length-1&&t.forEach((function(e,t){a[e.order].style.height=n+"px"}))}))},o=0,r=Object.entries(t);o<r.length;o++)i()}(c.sort(u)),l++},o.onerror=function(e){l++},o.src=s[t].src})))}))},e.BottomAlignedCardLogic=function(){if(!document.querySelector(".bottom-aligned-opt"))return!1;var e,t;document.querySelector(".bottom-aligned-opt-1")?e=".bottom-aligned-opt-1":document.querySelector(".bottom-aligned-opt-2")&&(e=".bottom-aligned-opt-2"),document.querySelector(".card-article").querySelector(".caption-container-image").querySelector("img")?t=".caption-container-image img":document.querySelector(".card-article").querySelector(".caption-container-image")&&(t=".caption-container-image"),g(e,".card-article",t,(function(){f(e,t,(function(){window.addEventListener("resize",(function(){f(e,t)}))}))}),!0)},e.CaptionLogic=function(){for(var e=document.getElementsByClassName("caption-icon-button"),n=document.getElementsByClassName("stretch-left")[0],i=document.getElementsByClassName("stretch-right")[0],o=document.querySelectorAll(".b-lazy")[0],r=document.querySelectorAll(".header-banner .caption-icon-button"),s=document.querySelectorAll(".card-article"),a=0;a<e.length;a++)e[a].addEventListener("click",u);if(r.length>0)for(var l=0;l<r.length;l++)r[l].addEventListener("click",c);function c(){document.body.contains(n)?(n.classList.toggle("inverse"),i.classList.toggle("inverse"),o.classList.toggle("inverse")):document.body.contains(o)&&o.classList.toggle("inverse")}function d(e){var t=e.currentTarget.myParam;this.querySelectorAll(".caption-icon-button")[0],e.target.classList.contains("caption-icon")||e.target.classList.contains("caption-icon-button")||e.target.classList.contains("open-state")||e.target.classList.contains("closed-state")||(window.location.href=t)}function u(){var e=this.nextElementSibling,n=e.nextElementSibling,i=this.querySelector(".closed-state"),o=this.querySelector(".open-state");i.classList.toggle("hide-icon"),o.classList.toggle("hide-icon"),e.classList.toggle("inverse"),n.classList.toggle("display-caption-text"),t(this)}s.forEach((function(e){var t=e.querySelector(".card-anchor"),n=e.querySelector(".image-container"),i=e.querySelector(".caption-text-container");if(!t||!n||!t.hasAttribute("href")||i)return!1;n.addEventListener("click",d),n.myParam=t.getAttribute("href"),n.style.cursor="pointer"}))},e.CardHoverLogic=function(){if(!document.querySelector(".card-article"))return!1;var e=Array.from(document.querySelectorAll(".card-article")).filter((function(e){return e.querySelector(".card-text-container")}));if(!e)return!1;e.forEach((function(e){var t=e.querySelector(".caption-container"),n=e.querySelector("button"),i=e.querySelector(".card-anchor");e.addEventListener("mousemove",(function(i){if(t&&n){var o="true"===n.getAttribute("aria-expanded");n.contains(i.target)||o&&t.contains(i.target)?e.classList.remove("card-hover"):e.classList.add("card-hover")}else e.classList.add("card-hover")})),e.addEventListener("mouseleave",(function(){n&&n.contains(document.activeElement)&&document.activeElement.blur(),e.classList.remove("card-hover")})),i.addEventListener("focus",(function(){"true"===n.getAttribute("aria-expanded")?e.classList.remove("card-hover"):e.classList.add("card-hover")})),i.addEventListener("blur",(function(){e.classList.remove("card-hover")}))}))},e.CardPeopleLogic=function(){function e(){window.addEventListener("resize",(function(){f(".people-card-container",".image-container")}))}g(".people-card-container",".people-card",".people-card-img",(function(){return f(".people-card-container",".image-container",e)}),!0)},e.CheckBoxLogic=function(){},e.CollegeBannerLogic=function(){var e=document.getElementById("college-mobile-banner");null==e&&(window.onscroll=function(){var t=(e.currentStyle||window.getComputedStyle(e,!1)).backgroundImage.replace(/url\((['"])?(.*?)\1\)/gi,"$2").split(",")[0],n=new Image;if("none"!==t){n.src=t;var i=n.width-window.screen.width,o=2*(window.scrollY-e.offsetTop);window.scrollY>e.offsetTop&&(this.oldScroll>this.scrollY&&e.style.backgroundPosition>=0?e.style.backgroundPosition=o+"px":o<=i&&(e.style.backgroundPosition=-o+"px"),this.oldScroll=this.scrollY)}})},e.CountdownLogic=function(){var e,t=1e3,n=document.getElementById("countdown-val");function i(){var n,o,r,s,a,l;n=(new Date).getTime(),o=e-n,r=Math.floor(o/864e5),s=Math.floor(o%864e5/36e5),a=Math.floor(o%36e5/6e4),l=Math.floor(o%6e4/1e3),document.getElementById("countdown-val").innerHTML="<div class='countdown-unit-val'>"+r+":"+s+":"+a+":"+l+"</div>",o<0&&(window.clearTimeout(i),clearTimeout(i),document.getElementById("countdown-val").innerHTML="<div class='countdown-unit-val'>0<span class='countdown-unit'>days</span></div><div class='countdown-unit-val'>0<span class='countdown-unit'>hours</span></div><div class='countdown-unit-val'>0<span class='countdown-unit'>minutes</span></div><div class='countdown-unit-val'>0<span class='countdown-unit'>seconds</span></div>"),window.setTimeout(i,t)}n&&(e=new Date(n.getAttribute("data-custom-countdown-end"))),i()},e.CourseApplicationLogic=function(){var e=document.getElementsByClassName("home-btn")[0],t=document.getElementsByClassName("international-btn")[0];function n(e){var t,n,i,o=e.currentTarget.section;for(n=document.getElementsByClassName("course-application-tab"),t=0;t<n.length;t++)n[t].style.display="none";for(i=document.getElementsByClassName("tab-link"),t=0;t<i.length;t++)i[t].className=i[t].className.replace(" selected","");document.getElementsByClassName(o)[0].style.display="block",e.currentTarget.className+=" selected"}e&&(e.addEventListener("click",n),e.buttonName="home-btn",e.section="home",t.addEventListener("click",n),t.buttonName="international-btn",t.section="international")},e.CourseLogics=m,e.CoursePageLogic=function(){document.querySelectorAll(".course-page-header").forEach((function(e){if(!e.querySelector(".course-header-nav"))return!1;var t=e.querySelector(".course-header-nav"),n=e.querySelector(".headings");e.querySelector(".course-page-header .btn");var i,o,r=!1;function s(){window.innerWidth>600?t.classList.add("big"):t.classList.remove("big"),r=window.innerWidth>1008}function a(){var e=n.getBoundingClientRect().bottom,i=document.getElementsByTagName("nav")[0].clientHeight;e<=i&&!r?(t.classList.add("stick"),t.style.top=i+"px"):e>=i&&!r?(t.classList.remove("stick"),t.style.top="auto"):e<=i&&r?(t.classList.add("stick"),t.style.top=i+"px"):(t.classList.remove("stick"),t.style.top="auto")}s(),a(),window.addEventListener("scroll",(function(){i||(a(),window.requestAnimationFrame((function(){s(),i=!1})),i=!0)})),window.addEventListener("resize",(function(){window.clearTimeout(o),s(),o=setTimeout((function(){a()}),100)}),!1)}))},e.CoursePageLogic22=function(){document.querySelectorAll(".course-page-header").forEach((function(e){if(!e.querySelector(".course-header-nav"))return!1;var t,n,i=e.querySelector(".course-header-nav"),o=e.querySelector(".headings"),r=!1;function s(){window.innerWidth>600?i.classList.add("big"):i.classList.remove("big"),r=window.innerWidth>1008}function a(){var e=o.getBoundingClientRect().bottom,t=document.getElementsByTagName("nav")[0].clientHeight;e<=t&&!r?(i.classList.add("stick"),i.style.top=t+"px"):e>=t&&!r?(i.classList.remove("stick"),i.style.top="auto"):e<=t&&r?(i.classList.add("stick"),i.style.top=t+"px"):(i.classList.remove("stick"),i.style.top="auto")}s(),a(),window.addEventListener("scroll",(function(){t||(a(),window.requestAnimationFrame((function(){s(),t=!1})),t=!0)})),window.addEventListener("resize",(function(){window.clearTimeout(n),s(),n=setTimeout((function(){a()}),100)}),!1)}))},e.CourseUnitsLogic=function(){var e=document.getElementsByClassName("scroll-right")[0],t=document.getElementsByClassName("scroll-left")[0],n=document.getElementsByClassName("course-units")[0],i=document.getElementsByClassName("course-units-intro")[0],o=document.getElementsByClassName("course-learning-teaching")[0],r=0,s=document.getElementsByClassName("course-units-txt")[0];e.addEventListener("click",c),t.addEventListener("click",d);var a={threshold:function(e){return Math.max(25,Math.floor(.15*("x"===e?window.innerWidth||document.body.clientWidth:window.innerHeight||document.body.clientHeight)))},velocityThreshold:5,disregardVelocityThreshold:function(e,t){return Math.floor(.5*("x"===e?t.element.clientWidth:t.element.clientHeight))},pressThreshold:8,diagonalSwipes:!1,diagonalLimit:Math.tan(.375*Math.PI),mouseSupport:!0},l=new v(n,a);function c(){window.innerWidth>1008?(o.getBoundingClientRect().x>0&&(r-=80),s.style.marginLeft=r+"vw",t.style.display="inline-block",o.getBoundingClientRect().left-1500<200&&(e.style.display="none")):window.innerWidth<=1008&&window.innerWidth>=600?o.getBoundingClientRect().x>-400&&(r-=85,s.style.marginLeft=r+"vw",t.style.display="inline-block",o.getBoundingClientRect().left-500.75<-400&&(e.style.display="none")):window.innerHeight>650?o.getBoundingClientRect().x>-200&&(r-=85,s.style.marginLeft=r+"vw",t.style.display="inline-block",o.getBoundingClientRect().left-284.75<-200&&(e.style.display="none")):o.getBoundingClientRect().x>-500&&(r-=85,s.style.marginLeft=r+"vw",t.style.display="inline-block",o.getBoundingClientRect().left-284.75<-500&&(e.style.display="none"))}function d(){i.getBoundingClientRect().x<0&&(window.innerWidth>1008?r+=80:r+=85),s.style.marginLeft=r+"vw",window.innerWidth>=1008?i.getBoundingClientRect().x>-1500&&(t.style.display="none"):window.innerWidth<=1008&&window.innerWidth>=600?i.getBoundingClientRect().x>-1e3&&(t.style.display="none"):i.getBoundingClientRect().x>-500&&(t.style.display="none"),e.style.display="inline-block"}l.on("swiperight",(function(){d()})),l.on("swipeleft",(function(){c()}))},e.DropDownNavLogic=function(){document.addEventListener("click",(function(e){e.target.matches("li")&&(e.preventDefault(),e.target.classList.toggle("active"))}),!1)},e.FilterLogic=function(){var e,t=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=u(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,r=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw r}}}}(document.querySelectorAll(".filter-container .filter-heading"));try{for(t.s();!(e=t.n()).done;){for(var n=e.value,i=document.querySelectorAll(".filter-content"),o=0;o<i.length;o++)i[o].classList.add("hide");n.addEventListener("click",(function(e){if(e.target.classList.toggle("filter-open"),e.target.classList.toggle("filter-closed"),e.target.hasAttribute("aria-expanded")){var t=e.target.getAttribute("aria-expanded");e.target.setAttribute("aria-expanded","false"===t?"true":"false")}e.target.nextElementSibling.classList.toggle("hide")}))}}catch(e){t.e(e)}finally{t.f()}},e.FiltersLogic=function(){var e=document.querySelectorAll(".filters details"),t=!1,n=function(){var e,n;window.innerWidth<=1008?(t=!0,null===(e=document.querySelector(".filters details:first-child"))||void 0===e||e.setAttribute("open","")):(t=!1,null===(n=document.querySelector(".filters details:first-child"))||void 0===n||n.removeAttribute("open"))};n(),window.addEventListener("resize",n),document.addEventListener("click",(function(n){t||"radio"==n.target.getAttribute("type")||n.target.classList.contains("filter-summary")&&n.target.parentElement.hasAttribute("open")||n.target.closest(".filter-content")&&!n.target.classList.contains("filter-summary")&&"INPUT"!==n.target.tagName||e.forEach((function(e){return e.open=!1}))})),document.querySelectorAll(".filters input").forEach((function(t){t.addEventListener("blur",(function(t){t.target.getAttribute("name")!==t.relatedTarget.getAttribute("name")&&e.forEach((function(e){return e.open=!1}))}))}))},e.FormLogic=function(){var e=document.getElementById("course-application-form"),t=document.getElementById("colleges"),n=document.getElementById("learning"),i=document.getElementById("courses"),o=document.getElementById("mode"),r=document.getElementById("button");e.addEventListener("submit",(function(e){e.preventDefault(),function(){var e=document.getElementById("collegesValue").value,a=document.getElementById("learningValue").value,l=document.getElementById("coursesValue").value,c=document.getElementById("modeValue").value,d=function(e){e.parentNode.className="course-application-field-left error"},u=function(e){e.parentNode.className="course-application-field-left"},p=function(e){e.parentNode.className="course-application-field-right error"},h=function(e){e.parentNode.className="course-application-field-right"};""===e?d(t):u(t),""===a?p(n):h(n),""===l?d(i):u(i),""===c?p(o):h(o);var m=s.filter((function(t){return t.course===l&&t.study_modes===c&&t.distance_learning===a&&t.college===e}));r.setAttribute("value",m[0].application_link),window.open(m[0].application_link)}()}));var s=[{course:"MPhil",study_modes:"Full time",college:"CCW",distance_learning:"No",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CCWREMPHFD01&code2=0003"},{course:"MPhil",study_modes:"Part time",college:"CCW",distance_learning:"No",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CCWREMPHPD01&code2=0003"},{course:"PhD",study_modes:"Full time",college:"CCW",distance_learning:"No",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CCWREPHDFD01&code2=0003"},{course:"PhD",study_modes:"Part time",college:"CCW",distance_learning:"No",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CCWREPHDPD01&code2=0003"},{course:"MPhil",study_modes:"Full time",college:"CCW",distance_learning:"Yes",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CCWREMPHDD01&code2=0001"},{course:"MPhil",study_modes:"Part time",college:"CCW",distance_learning:"Yes",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CCWREMPHGD01&code2=0001"},{course:"PhD",study_modes:"Full time",college:"CCW",distance_learning:"Yes",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CCWREPHDDD01&code2=0001"},{course:"PhD",study_modes:"Part time",college:"CCW",distance_learning:"Yes",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CCWREPHDGD01&code2=0001"},{course:"MPhil",study_modes:"Full time",college:"CSM",distance_learning:"No",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CSMREMPHFD01&code2=0005"},{course:"MPhil",study_modes:"Part time",college:"CSM",distance_learning:"No",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CSMREMPHPD01&code2=0005"},{course:"PhD",study_modes:"Full time",college:"CSM",distance_learning:"No",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CSMREPHDFD01&code2=0005"},{course:"PhD",study_modes:"Part time",college:"CSM",distance_learning:"No",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CSMREPHDPD01&code2=0005"},{course:"MPhil",study_modes:"Full time",college:"CSM",distance_learning:"Yes",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CSMREMPHDD01&code2=0001"},{course:"MPhil",study_modes:"Part time",college:"CSM",distance_learning:"Yes",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CSMREMPHGD01&code2=0001"},{course:"PhD",study_modes:"Full time",college:"CSM",distance_learning:"Yes",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CSMREPHDDD01&code2=0001"},{course:"PhD",study_modes:"Part time",college:"CSM",distance_learning:"Yes",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CSMREPHDGD01&code2=0001"},{course:"MPhil",study_modes:"Full time",college:"LCC",distance_learning:"No",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=LCCREMPHFD01&code2=0005"},{course:"MPhil",study_modes:"Part time",college:"LCC",distance_learning:"No",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=LCCREMPHPD01&code2=0005"},{course:"PhD",study_modes:"Full time",college:"LCC",distance_learning:"No",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=LCCREPHDFD01&code2=0005"},{course:"PhD",study_modes:"Part time",college:"LCC",distance_learning:"No",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=LCCREPHDPD01&code2=0005"},{course:"MPhil",study_modes:"Full time",college:"LCC",distance_learning:"Yes",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=LCCREMPHDD01&code2=0001"},{course:"MPhil",study_modes:"Part time",college:"LCC",distance_learning:"Yes",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=LCCREMPHGD01&code2=0001"},{course:"PhD",study_modes:"Full time",college:"LCC",distance_learning:"Yes",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=LCCREPHDDD01&code2=0001"},{course:"PhD",study_modes:"Part time",college:"LCC",distance_learning:"Yes",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=LCCREPHDGD01&code2=0001"},{course:"MPhil",study_modes:"Full time",college:"LCF",distance_learning:"No",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=LCFREMPHFD01&code2=0004"},{course:"MPhil",study_modes:"Part time",college:"LCF",distance_learning:"No",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=LCFREMPHPD01&code2=0005"},{course:"PhD",study_modes:"Full time",college:"LCF",distance_learning:"No",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=LCFREPHDFD01&code2=0005"},{course:"PhD",study_modes:"Part time",college:"LCF",distance_learning:"No",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=LCFREPHDPD01&code2=0005"},{course:"MPhil",study_modes:"Full time",college:"LCF",distance_learning:"Yes",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=LCFREMPHDD01&code2=0001"},{course:"MPhil",study_modes:"Part time",college:"LCF",distance_learning:"Yes",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=LCFREMPHGD01&code2=0001"},{course:"PhD",study_modes:"Full time",college:"LCF",distance_learning:"Yes",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=LCFREPHDDD01&code2=0001"},{course:"PhD",study_modes:"Part time",college:"LCF",distance_learning:"Yes",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=LCFREPHDGD01&code2=0001"},{course:"MPhil",study_modes:"Full time",college:"CCI",distance_learning:"No",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CCIREMPHFD01&code2=0004"},{course:"MPhil",study_modes:"Part time",college:"CCI",distance_learning:"No",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CCIREMPHPD01&code2=0004"},{course:"PhD",study_modes:"Full time",college:"CCI",distance_learning:"No",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CCIREPHDFD01&code2=0004"},{course:"PhD",study_modes:"Part time",college:"CCI",distance_learning:"No",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CCIREPHDPD01&code2=0004"},{course:"MPhil",study_modes:"Full time",college:"CCI",distance_learning:"Yes",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CCIREMPHDD01&code2=0001"},{course:"MPhil",study_modes:"Part time",college:"CCI",distance_learning:"Yes",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CCIREMPHGD01&code2=0001"},{course:"PhD",study_modes:"Full time",college:"CCI",distance_learning:"Yes",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CCIREPHDDD01&code2=0001"},{course:"PhD",study_modes:"Part time",college:"CCI",distance_learning:"Yes",application_link:"https://sits.arts.ac.uk/urd/sits.urd/run/siw_ipp_lgn.login?process=siw_ipp_app&code1=CCIREPHDGD01&code2=0001"}]},e.GalleryLogic=function(e){g(".gallery-image-container",".gallery-image",".caption-container-image",(function(){document.querySelectorAll(".image-gallery-container").forEach((function(t){var n=t.querySelectorAll(".image-gallery .gallery-image img"),i=t.querySelectorAll(".image-gallery .glide__slides li"),o=t.querySelector(".close-btn"),r=t.querySelector(".open-btn"),s=t.querySelector(".image-gallery"),a=s.parentNode,l=t.querySelector(".image-expand-btn"),c=t.querySelector(".glide__arrow--left"),d=t.querySelector(".glide__arrow--right"),u=t.querySelector(".glide__track"),p=t.querySelectorAll(".interactive-btn"),h=t.querySelectorAll(".caption-icon-button"),m=t.querySelector(".glide__slides"),g="",f="",y=!1,v=!1,w=!1,b=t.querySelectorAll(".image-gallery"),E="";b.forEach((function(t){(E=new e(t,{focusAt:"center",perView:3,rewind:!1,keyboard:!1,gap:20})).mount()}));for(var L=function(){var e="";g=t.querySelector(".image-gallery li.glide__slide--active");for(var o=0;o<n.length;o++){var r=g.getBoundingClientRect(),s=i[o].getBoundingClientRect(),a=r.left+r.width,l=s.left+s.width,c=Math.pow(a-l,2),d=Math.sqrt(c)-Math.floor(45*Math.random());n[o].style.marginLeft=e+d+"px",n[o].parentNode.parentNode.parentNode.className.match(/\bglide__slide--active\b/)?e="-":n[o].style.marginLeft=e+d+"px"}},_=function(){for(var e=0;e<h.length;e++)h[e].classList.add("hide"),"true"===h[e].attributes[1].value&&h[e].click()},S=function(){v&&!w?k():w||C()},C=function(){s.classList.add("disable"),c.classList.add("disabled"),d.classList.add("disabled"),r.classList.remove("hide"),o.classList.add("hide"),L(),y=!1,T(l),T(m,!1)},k=function(){A(l),a.classList.remove("expand"),E.update({perView:3}),v=!1,_()},T=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.classList.add("disabled"),t&&e.setAttribute("aria-hidden","true")},A=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.classList.remove("disabled"),t&&e.setAttribute("aria-hidden","false")},q=0;q<p.length;q++)p[q].addEventListener("mousedown",(function(e){e.preventDefault()}));o.addEventListener("click",S),r.addEventListener("click",(function(){for(var e=0;e<n.length;e++)n[e].style.marginLeft="0px";s.classList.remove("disable"),r.classList.add("hide"),o.classList.remove("hide"),y=!0,A(l),A(m,!1)})),l.addEventListener("click",(function(){E.update({perView:1}),a.classList.add("expand"),v=!0,T(l),function(){for(var e=0;e<h.length;e++)h[e].classList.remove("hide")}()})),u.addEventListener("mousedown",(function(e){e.target.classList.contains("gallery-image-container")&&v&&S()})),window.addEventListener("resize",(function(){v?S():y||L()})),E.mount(),E.on("run.before",(function(){w=!0})),E.on("move.after",(function(){var e;w=!1,f=t.querySelector(".image-gallery li.glide__slide--active img"),e=E.index,y&&0===e?T(c):A(c),function(e){y&&e===n.length-1?T(d):A(d)}(E.index),l.style.height=f.offsetHeight+"px",l.style.width=f.offsetWidth+"px"})),window.addEventListener("keydown",(function(e){"Escape"===e.key&&y&&E._o.keyboard&&S()})),s.addEventListener("mouseenter",(function(){E.update({keyboard:!0})})),s.addEventListener("mouseleave",(function(){E.update({keyboard:!1})})),_(),S()}))}),!0)},e.GlobalNavLogic=function(){E();var e=document.querySelectorAll(".nav-menu .list-item-element"),n=Array.from(e);e.forEach((function(e,i){e.addEventListener("click",(function(){var i=e.getAttribute("aria-expanded"),o=e.getAttribute("aria-label");if(null!==i){var r=n.filter((function(t,n){return t!==e&&3!==n}));r.forEach((function(e){e.setAttribute("aria-expanded",!1)})),t(e),function(e){if(e.classList.contains("expandable-icon")){var t=e.querySelector(".open-icon"),i=e.querySelector(".close-icon");t.classList.toggle("display-none"),i.classList.toggle("display-none"),o()}e.classList.contains("main-menu-btn")&&r();function o(){var t=n.filter((function(t,n){return t!==e&&n>2}));t.forEach((function(e){var t=e.querySelector(".open-icon"),n=e.querySelector(".close-icon");null!==t&&null!==n&&t.classList.contains("display-none")&&(t.classList.remove("display-none"),n.classList.add("display-none")),"language-flagIcon"===e.id&&e.nextElementSibling.classList.add("language-hideList")}))}function r(){(document.body.scrollTop>60||document.documentElement.scrollTop>60)&&(document.body.scrollTop=0,document.documentElement.scrollTop=0)}}(e)}e.setAttribute("aria-label","Open"===o?"Closed":"Open")}))}))},e.HandleHeaderFluidScroll=function(){window.addEventListener("scroll",(function(){var e=document.getElementById("header-fluid");document.body.scrollTop>250||document.documentElement.scrollTop>250?e.classList.add("header-fluid-sm-version"):e.classList.remove("header-fluid-sm-version")}))},e.HandlePlayers=function(e,t){var i=function(){function e(t){n(this,e),this.offCanvasConfig=t,this.elements=this.createElements(),this.currentVideoInstance=null,this.currentPlayerElement=null,this.previousScrollPosition=0,this.videoCardInstance=null,this.handleOutsideClick=this.handleOutsideClick.bind(this),this.unsetVideo=this.unsetVideo.bind(this),this.handleKeyboardExit=this.handleKeyboardExit.bind(this),this.handleStop=this.handleStop.bind(this),this.toggleControlsOn=this.toggleControlsOn.bind(this),this.toggleControlsOff=this.toggleControlsOff.bind(this),this.videoStopped=!1}return o(e,[{key:"registerEvents",value:function(){if(this.elements.videoExitButton.addEventListener("click",this.unsetVideo),window.addEventListener("click",this.handleOutsideClick),window.addEventListener("keydown",this.handleKeyboardExit),this.currentVideoInstance.on("timeupdate",this.handleStop),"vimeo"===this.currentVideoInstance.provider){var e=this.elements.videoWrapper.querySelector(".plyr");e.addEventListener("mouseenter",this.toggleControlsOn),e.addEventListener("mouseleave",this.toggleControlsOff)}}},{key:"unregisterEvents",value:function(){if(this.elements.videoExitButton.removeEventListener("click",this.unsetVideo),window.removeEventListener("click",this.handleOutsideClick),window.removeEventListener("keydown",this.handleKeyboardExit),"vimeo"===this.currentVideoInstance.provider){var e=this.elements.videoWrapper.querySelector(".plyr");e.removeEventListener("mouseenter",this.toggleControlsOn),e.removeEventListener("mouseleave",this.toggleControlsOff)}}},{key:"toggleControlsOn",value:function(){this.currentVideoInstance.toggleControls(!0)}},{key:"toggleControlsOff",value:function(){this.currentVideoInstance.toggleControls(!0)}},{key:"createElements",value:function(){return document.querySelector(this.offCanvasConfig.appendTo).insertAdjacentHTML("afterbegin",'\n      <section class="grid-container-25 video-off-canvas" data-overlay="inactive" data-ual-video-overlay="true"> \n          <div class="video-off-canvas__container grid-col-full-width md-offset-left-2 md-offset-right-2 lg-offset-left-3 lg-offset-right-3">\n              <div class="plyr__video-embed video-off-canvas__wrapper">\n              <button class="video-off-canvas__btn" aria-label="Close video">\n              <svg\n                width="1em"\n                height="1em"\n                viewBox="0 0 14 14"\n                fill="none"\n                className="exit-svg"\n              >\n                <path\n                  fillRule="evenodd"\n                  clipRule="evenodd"\n                  d="M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z"\n                  fill="white"\n                />\n            </svg>\n            </button>\n          </div>\n          </div>\n      </section>'),{videoOverlay:document.querySelector(".video-off-canvas"),videoContainer:document.querySelector(".video-off-canvas__container"),videoWrapper:document.querySelector(".video-off-canvas__wrapper"),videoExitButton:document.querySelector(".video-off-canvas__btn")}}},{key:"setVideo",value:function(e){var t=this;this.previousScrollPosition=document.documentElement.scrollTop||document.body.scrollTop,this.videoCardInstance=e,window.scroll(0,0),this.hideOrShowMainPageContent(),this.elements.videoOverlay.setAttribute("data-overlay","active");var n=this.elements.videoWrapper,i=this.createElementWithClasses("div");i.setAttribute("data-plyr-provider",this.videoCardInstance.provider),i.setAttribute("data-plyr-embed-id",this.videoCardInstance.videoURL),n.insertBefore(i,this.elements.videoExitButton),this.currentPlayerElement=i,this.elements.videoOverlay.setAttribute("data-provider",this.videoCardInstance.provider),this.currentVideoInstance=new e.plyrInstance(i,this.getOptions()),"vimeo"===this.videoCardInstance.provider&&(this.currentVideoInstance.poster=this.videoCardInstance.poster),this.currentVideoInstance.on("ready",(function(){t.scrollIntoCenter(),t.videoStopped=!1,t.currentVideoInstance.play(),t.registerEvents()}))}},{key:"unsetVideo",value:function(){this.currentVideoInstance.stop(),this.destroyOverlayPlayer(),this.unregisterEvents(),this.currentVideoInstance=null,this.elements.videoOverlay.setAttribute("data-overlay","inactive"),this.hideOrShowMainPageContent(),window.scroll(0,this.previousScrollPosition),this.restoreFocus()}},{key:"handleStop",value:function(){var e=(100*this.currentVideoInstance.currentTime/this.currentVideoInstance.duration).toFixed();if(!Number(e))return!1;100===Number(e)&&(this.videoStopped=!0,this.currentVideoInstance.stop())}},{key:"handleKeyboardExit",value:function(e){return"escape"===e.key.toLowerCase()&&this.handleOutsideClick(e)}},{key:"handleOutsideClick",value:function(e){return!!this.currentVideoInstance&&(!(0===this.currentVideoInstance.currentTime&&!this.videoStopped)&&void(this.elements.videoWrapper.querySelector(".plyr").contains(e.target)||this.unsetVideo()))}},{key:"createElementWithClasses",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=document.createElement(e);return t&&(n.className=t),n}},{key:"destroyOverlayPlayer",value:function(){this.currentVideoInstance.destroy(),this.currentPlayerElement.remove()}},{key:"getOptions",value:function(){var e={youtube:{modestbranding:1,controls:1,disablekb:0},vimeo:{background:!0},keyboard:{focused:!0,global:!1},controls:["play","progress","mute","volume","captions","pip","airplay","fullscreen"],autoplay:!0};return e}},{key:"scrollIntoCenter",value:function(){return document.querySelector(".plyr").scrollIntoView({behavior:"smooth",block:"center",inline:"center"})}},{key:"hideOrShowMainPageContent",value:function(){var e=this.offCanvasConfig.pageContent,t=this.offCanvasConfig.className;Array.isArray(e)?e.forEach((function(e){if(!document.querySelector(e))return!1;document.querySelector(e).classList.toggle(t)})):e.querySelector(e).classList.toggle(t)}},{key:"restoreFocus",value:function(){this.videoCardInstance.playButton.focus()}}]),e}(),s=function(){function e(t,i,o){n(this,e),this.rootElement=t,this.plyrInstance=i,this.overlayInstance=o,this.playerElement=t.querySelector('[data-ual-plyr-root="true"]'),this.videoURL=this.getAttributeFromElement("data-plyr-embed-id"),this.provider=this.getAttributeFromElement("data-plyr-provider"),this.playButton=t.querySelector(".video-card__svg"),this.plyr=this.createPlyr(),this.poster=null,this.registerEvents()}return o(e,[{key:"getAttributeFromElement",value:function(e){return this.playerElement.getAttribute(e)}},{key:"createPlyr",value:function(){var t=e.maybeSetVideoURL(this.rootElement.querySelector('[data-ual-plyr-root="true"]')),n=new this.plyrInstance(t,this.getOptions());return"vimeo"==this.provider&&this.fetchAndSetPoster(),n}},{key:"getOptions",value:function(){return{}}},{key:"registerEvents",value:function(){var e=this;this.rootElement.addEventListener("click",(function(){e.overlayInstance.setVideo(e)})),this.plyr.on("ready",(function(e){return e.srcElement.setAttribute("tabindex","-1")}))}},{key:"fetchAndSetPoster",value:function(){var t=this,n=e.getVimeoVideoId(this.videoURL);n||(n=this.videoURL),fetch("https://vimeo.com/api/v2/video/".concat(n,".json")).then((function(e){return e.json()})).then((function(e){var n=e[0].thumbnail_large;t.poster=n,t.plyr.poster=t.poster}))}}],[{key:"maybeSetVideoURL",value:function(e){var t=e.getAttribute("data-plyr-embed-id"),n=/vimeo.*\/(\d+)/i.exec(t);return n&&e.setAttribute("data-plyr-embed-id","https://player.vimeo.com/video/".concat(n[1])),e}},{key:"getVimeoVideoId",value:function(e){var t=e.match(/(https?:\/\/)?(www\.)?(player\.)?vimeo\.com\/?(showcase\/)*([0-9))([a-z]*\/)*([0-9]{6,11})[?]?.*/),n=!1;return t&&7==t.length&&(n=t[6]),n}}]),e}(),a=function(e){r(i,e);var t=c(i);function i(){return n(this,i),t.apply(this,arguments)}return o(i,[{key:"registerEvents",value:function(){var e=this;this.rootElement.addEventListener("click",(function(){e.rootElement.classList.add("active"),e.plyr.play()}))}},{key:"getOptions",value:function(){var e={youtube:{modestbranding:1,controls:1,disablekb:0},vimeo:{background:!0},keyboard:{focused:!0,global:!1},controls:["stop","play","progress","mute","volume","captions","pip","airplay","fullscreen"],autoplay:!1,clickToPlay:!1,ratio:"1:1"};return e}}]),i}(s),l=Array.from(document.querySelectorAll('[data-ual-video="true"]'));if(0===l.length)return!1;var d=new i(t);l.forEach((function(t){if(!t.querySelector('[data-ual-plyr-root="true"]'))return!1;t.hasAttribute("data-ual-plyr-inline")&&"true"===t.getAttribute("data-ual-plyr-inline")?new a(t,e):new s(t,e,d)}))},e.LayoutMasonryGrid=function(){function e(e){var t,n,i,o=document.getElementsByClassName("card-masonry-grid")[0],r=parseInt(window.getComputedStyle(o).getPropertyValue("grid-auto-rows")),s=parseInt(window.getComputedStyle(o).getPropertyValue("grid-row-gap")),a=Math.ceil((e.querySelector(".content").getBoundingClientRect().height+s)/(r+s));if(null===e.previousElementSibling||null===e.previousElementSibling.previousElementSibling)e.style.gridRowStart="1";else{var l=e.previousElementSibling.previousElementSibling;e.style.gridRowStart=(n=(t=l).style.gridRowStart.split(" ").pop(),i=t.style.gridRowEnd.split(" ").pop(),parseFloat(n)+parseFloat(i))}e.style.gridRowEnd="span "+a,e.style.opacity="1"}function t(){for(var t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,n=document.getElementsByClassName("card-article"),i=0;i<n.length;i++);t>575&&function(){for(var t=document.getElementsByClassName("card-masonry-grid"),n=0;n<t.length;n++)for(var i=t[n].getElementsByClassName("card-article"),o=0;o<i.length;o++)e(i[o])}()}window.addEventListener("resize",t),document.getElementsByClassName("card-masonry-grid").length>0&&g(".card-masonry-grid",".card-article",".caption-container-image",t,!0)},e.NavLogic=h,e.OnlineCourseLogic=function(){var e=document.querySelector(".drop-btn"),t=document.querySelector(".sub-nav-mobile");if(t){m();var n=function(){var t=[{section:"Course Overview"},{section:"Course unit"},{section:"Entry requirement"},{section:"Fees and funding"},{section:"Careers"}].find((function(e){var t=e.section;return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.getBoundingClientRect();return n.bottom>160&&n.top<=window.innerHeight*t}(document.querySelector('[data-section="'.concat(t,'"]')))}));t&&function(t){for(var n=document.querySelectorAll(".sub-nav-item-mobile"),i=0;i<n.length;i++){var o=n[i];o.classList.remove("selected"),o.dataset.current===t&&(o.classList.add("selected"),e.textContent=t)}}(t.section)},i=function(){e.classList.toggle("active"),t.classList.toggle("active");var i=e.classList.contains("active");e.setAttribute("aria-expanded",i?"true":"false"),i?window.removeEventListener("scroll",n):window.addEventListener("scroll",n)};document.addEventListener("click",(function(i){t.contains(i.target)||e.contains(i.target)||(e.classList.remove("active"),t.classList.remove("active"),e.setAttribute("aria-expanded","false"),window.addEventListener("scroll",n))})),e.addEventListener("click",i),t.addEventListener("click",(function(t){if("A"===t.target.tagName){for(var o=document.querySelectorAll(".sub-nav-item-mobile"),r=0;r<o.length;r++){o[r].classList.remove("selected")}t.target.classList.add("selected"),e.textContent=t.target.dataset.current,i(),e.setAttribute("aria-expanded","false"),window.removeEventListener("scroll",n)}setTimeout((function(){window.addEventListener("scroll",n)}),1e3)})),window.addEventListener("scroll",n)}},e.PDFCatalogueLogic=function(e){var t,n;t=document.querySelectorAll(".pdf-catalogue-container"),n=document.querySelector(".pdf-catalogue-container"),t.forEach((function(t){var i=t.querySelectorAll(".pdf-catalogue-item"),o=t.querySelectorAll(".pdf-catalogue"),r=t.querySelector(".background-gradient");t.querySelectorAll(".pdf-catalogue-item a");var s=t.querySelectorAll(".pdf-image-container"),a=t.querySelector(".glide__slides"),l=t.querySelector(".glide__arrow--right"),c=t.querySelector(".glide__arrow--left"),d=t.querySelector(".glide__arrows"),u="";o.forEach((function(t){n.classList.contains("fifty-fifty-container")?(l.style.width="40%",c.style.width="40%",u=new e(t,{focusAt:0,perView:1,rewind:!1,keyboard:!0,dragThreshold:!0,swipeThreshold:!1,bound:!0,gap:0,breakpoints:{600:{perView:1,peek:{before:0,after:window.innerWidth/2}}},peek:{before:0,after:window.innerWidth/4.5}})):u=new e(t,{focusAt:0,perView:3,rewind:!1,keyboard:!0,dragThreshold:!0,swipeThreshold:!1,bound:!0,gap:0,breakpoints:{600:{perView:1,peek:{before:0,after:window.innerWidth/3}}},peek:{before:0,after:window.innerWidth/6.5}})}));var p=function(e){e.classList.add("hide"),e.setAttribute("aria-hidden","true")},h=function(e){e.classList.remove("hide"),e.setAttribute("aria-hidden","false")},m=function(){for(var e=0,t=0;t<s.length;t++)s[t].clientHeight>e&&(e=s[t].clientHeight);return e},g=function(){var e=m();!function(){for(var t=0;t<s.length;t++){var n=e-s[t].clientHeight;s[t].style.marginTop=n+"px"}}(),function(e){r.style.height="calc("+e+"px + 4vw)"}(m())},f=function(){i.length<u._o.perView&&p(d),i.length>u._o.perView&&h(d)};u.on("build.after",(function(){g(),f()})),u.on("run",(function(){u.index+u._o.perView+.5>=i.length?(a.style.marginLeft=i[0].offsetWidth/2+"px",p(l)):(a.style.marginLeft=0,h(l)),u.index>0?h(c):p(c)})),u.mount(),window.addEventListener("resize",(function(){g(),f(),window.innerWidth>600?u.update({perView:3,peek:{before:0,after:window.innerWidth/6.5}}):u.update({perView:1,peek:{before:0,after:window.innerWidth/3}})})),c.addEventListener("mousedown",(function(e){e.preventDefault()})),l.addEventListener("mousedown",(function(e){e.preventDefault()}));for(var y=0;y<i.length;y++)i[y].addEventListener("mousedown",(function(e){e.preventDefault()}))}))},e.PaginationLogic=function(){var e=document.getElementsByClassName("pagination-next"),t=document.getElementsByClassName("pagination-previous"),n=document.getElementsByClassName("dots-page");if(n.length>0)for(var i=0;i<n.length;i++)n[i].innerHTML="",n[i].className="ellipsis";if(window.innerWidth<600){if(e.length>0)for(var o=0;o<e.length;o++)e[o].children[0].innerHTML="<span class='sr-only'>Next page</span>";if(t.length>0)for(var r=0;r<t.length;r++)t[r].children[0].innerHTML="<span class='sr-only'>Previous page</span>"}else!function(){if(e.length>0)for(var n=0;n<e.length;n++)e[n].children[0].innerHTML="Next <span class='sr-only'>page</span>";if(t.length>0)for(var i=0;i<t.length;i++)t[i].children[0].innerHTML="Previous <span class='sr-only'>page</span>"}()},e.PeopleLogic=function(){document.querySelectorAll(".people-header").forEach((function(e){var t,n,i,o,r,s,a=e.querySelector(".sub-nav-wrapper"),l=e.querySelector(".people-header__content--bottom-margin"),c=e.querySelectorAll(".description-section");if(a){r=e.querySelectorAll(".sub-nav li"),s=e.querySelectorAll(".nav-tabs li"),(r.length<=1||s.length<=1)&&(s[0].parentNode.parentNode.remove(),r[0].parentNode.remove());var d=function(){l.getBoundingClientRect().bottom<=48?a.parentNode.classList.add("stick"):l.getBoundingClientRect().bottom>0&&a.parentNode.classList.remove("stick")};d();var u=(n=function(){var e;e=[],c.forEach((function(t){var n=t.getBoundingClientRect().top;n>60&&n<window.innerHeight/2&&e.push(t.id)})),void 0!==e[0]&&(window.history.replaceState(null,null,"#"+e[0]),window.innerWidth<600?h():y())},i=500,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];clearTimeout(o),o=setTimeout((function(){clearTimeout(o),n.apply(void 0,t)}),i)});window.addEventListener("scroll",(function(){t||(window.requestAnimationFrame((function(){d(),u(),t=!1})),t=!0)}))}}))},e.SearchListingDropDown=function(){document.querySelectorAll(".search-listing-drop-down").forEach((function(e){var t=e.querySelector(".toggle-btn"),n=e.querySelectorAll(".search-listing-drop-down .list li");t.addEventListener("click",(function(e){e.target.classList.toggle("open")})),n.forEach((function(e){e.addEventListener("click",(function(e){t.innerHTML=e.currentTarget.innerHTML}))}))}))},e.SplitPageAdvertLogic=function(){document.querySelectorAll(".creative-ops-advert").forEach((function(e){var t,n,i=e.querySelector(".advert-header__content__title"),o=e.querySelector(".advert__content__img"),r=e.querySelector(".advert__content__description"),s=e.querySelector(".advert__content--right"),a=e.querySelector(".advert__content--left"),l=e.querySelector(".advert__content--left .content-left-wrapper"),c=function(){window.innerWidth<=600?i.appendChild(o):r.prepend(o)},d=function(){s.getBoundingClientRect().top>=60&&window.innerWidth>=600?a.classList.add("top-stick"):s.getBoundingClientRect().bottom-80<=l.offsetHeight?a.classList.add("bottom-stick"):(a.classList.remove("bottom-stick"),a.classList.remove("top-stick"))};null!==o&&(c(),d()),window.addEventListener("resize",(function(){n||(window.requestAnimationFrame((function(){c(),n=!1})),n=!0)})),window.addEventListener("scroll",(function(){t||(window.requestAnimationFrame((function(){d(),t=!1})),t=!0)}))}))},e.SplitPageLogic=function(){document.querySelectorAll(".people-header").forEach((function(e){var t,n,i=e.querySelector(".people-header__content__title"),o=e.querySelector(".people-header__content__img"),r=e.querySelector(".people-header__content__description"),s=e.querySelector(".people-header__content--right"),a=e.querySelector(".people-header__content--left"),l=e.querySelector(".people-header__content--left .content-left-wrapper"),c=function(){window.innerWidth<=600?i.appendChild(o):r.prepend(o)},d=function(){s.getBoundingClientRect().top>=60&&window.innerWidth>=600?a.classList.add("top-stick"):s.getBoundingClientRect().bottom-80<=l.offsetHeight?a.classList.add("bottom-stick"):(a.classList.remove("bottom-stick"),a.classList.remove("top-stick"))};null!==o&&(c(),d()),window.addEventListener("resize",(function(){n||(window.requestAnimationFrame((function(){c(),n=!1})),n=!0)})),window.addEventListener("scroll",(function(){t||(window.requestAnimationFrame((function(){d(),t=!1})),t=!0)}))}))},e.StaticMap=b,e.Test=function(){document.querySelectorAll(".js-hazel-test-component").forEach((function(e){!function(e){var t=e.querySelector(".js-increment"),n=e.querySelector(".js-decrement"),i=0,o=e.querySelector(".js-count"),r=function(e){o.innerText=e};function s(){i++,r(i)}var a=function(){0!==i&&(i--,r(i))};t.addEventListener("click",s),n.addEventListener("click",a)}(e)}))},e.TestDemoLogic=function(){},e.TimelineLogic=function(){for(var e=document.getElementsByClassName("timeline"),t=function(t){var n,i,o,r,s=document.getElementsByClassName("start")[t],a=new Date(s.getAttribute("data-custom-date-start")),l=document.getElementsByClassName("end")[t],c=new Date(l.getAttribute("data-custom-date-end"));n=a,i=l,o=c,r=function(t){var n=new Date,i=document.getElementsByClassName("progress")[t],o=Math.round((n-a)/(c-a)*100)+"%";if(!0===e[t].classList.contains("horizontal")){if(i.style.width=o,document.getElementsByClassName("timeline-event")[t]){var r=document.getElementsByClassName("timeline-event-year")[t],s=document.getElementsByClassName("timeline-event-time")[t];parseInt(o)>0&&parseInt(o)<100?(r.style.marginRight=100-parseInt(o)+"%",s.style.marginRight=100-parseInt(o)+"%"):(r.classList.add("align-center"),s.classList.add("align-center"))}}else i.style.height=o},s.innerHTML=n.toLocaleDateString("en-US",{day:"2-digit",timeZone:"UTC"})+"<br/>"+n.toLocaleDateString("en-US",{month:"short",timeZone:"UTC"}),i.innerHTML=o.toLocaleDateString("en-US",{day:"2-digit",timeZone:"UTC"})+"<br/>"+o.toLocaleDateString("en-US",{month:"short",timeZone:"UTC"}),r(t,n,o)},n=0;n<e.length;n++)t(n)},e.ToggleLogic=function(){var e=document.querySelector(".toggle-off"),t=document.querySelector(".toggle-on"),n=document.querySelector(".toggle-icon");null!==e&&null!==t&&null!==n&&n.addEventListener("click",(function(){var i=document.querySelector(".toggle-icon").getAttribute("aria-checked"),o=document.querySelector(".toggle-icon").getAttribute("aria-label");e.classList.toggle("display-none"),t.classList.toggle("display-none"),n.setAttribute("aria-checked","True"===i?"False":"True"),n.setAttribute("aria-label","Closed"===o?"Open":"Closed")}))},e.TranslateLanguage=E,e.VerticalNavDynamicLogic=function(){var e=document.querySelectorAll(".vertical-nav");if(null!==e){var t=document.querySelectorAll(".people-header__content--right .navSectionAnchor h2");if(null!==t){t.length;var n=document.querySelector(".vertical-nav .nav-container .nav-tabs"),i=[];t.forEach((function(e,t){var o=e.innerText.replace(/\s/g,"").substring(0,25);if(i.includes(o)){for(var r=1;i.includes(o+r);)r++;o+=r}e.parentElement.setAttribute("id",o),i.push(o);var s="<li data-current='"+e.innerText+"' data-section-id='"+o+"'><a class='btn cta' href='#"+o+"'>"+e.innerText+"</a></li></li>";n.insertAdjacentHTML("beforeend",s)})),e.forEach((function(e){var t=e.querySelectorAll(".vertical-nav li"),n="",i="",o="";function r(){for(var e=0;e<t.length;e++)t[e].addEventListener("click",l),t[e].removeAttribute("class"),t[e].removeAttribute("aria-current")}for(var s=0;s<t.length;s++)t[s].addEventListener("mousedown",(function(e){e.preventDefault()})),t[s].classList.remove("current"),t[s].removeAttribute("aria-current"),i=(n=t[s].attributes[0].value).replace(/\s+/g,"-").toLowerCase(),window.location.href.indexOf(i)>-1&&(o=e.querySelectorAll("[data-current='"+n+"']")[0]);function a(){var n=e.querySelector(".nav-active-bar"),i=o;o.parentNode;for(var r=t,s=r.length,a=0;a<s;++a)if(i===r[a]){var l=44*a;n.style.marginTop=l+"px";break}}function l(e){o=e.target.parentNode,r(),o.classList.add("current"),o.setAttribute("aria-current","page"),a()}null!==t&&null!==o&&(r(),a());for(var c=0;c<o.length;c++)o[c].classList.add("current"),o[c].setAttribute("aria-current","page")}));var o=document.querySelectorAll(".people-header__content--right>section,.people-header__content--right>div");Array.from(o);for(var r,s,a=document.querySelectorAll(".vertical-nav li"),l={threshold:[0,.8,1],rootMargin:"60px 0px 0px 0px"},c=new IntersectionObserver((function(e,t){if(!(e[0].intersectionRatio<l.threshold[1])){e[0].target;for(var n=e[0].target;n&&!n.classList.contains("navSectionAnchorContainer");)n=n.previousElementSibling;if(s=n.querySelector(".navSectionAnchor").getAttribute("id"),r){var i=document.querySelector(".nav-tabs li[data-section-id='"+r+"']");i.classList.remove("current"),i.removeAttribute("aria-current")}var o=document.querySelector(".nav-tabs li[data-section-id='"+s+"']");o.classList.add("current"),o.setAttribute("aria-current","page");var c=document.querySelector(".nav-active-bar"),d=document.querySelector(".nav-tabs li[data-section-id='"+s+"']");d.parentNode;for(var u=a,p=u.length,h=0;h<p;++h)if(d===u[h]){var m=44*h;c.style.marginTop=m+"px";break}r=s}}),l),d=0;d<o.length;d++)c.observe(o[d])}}},e.VerticalNavLogic=y,e.VideoV3Logic=function(){document.querySelectorAll(".three-play-media-component").forEach((function(e){e.querySelector(".three-play-media-overlay").addEventListener("click",(function(){e.classList.remove("three-play-media-overlayed"),e.querySelector(".three-play-media-iframe").contentWindow.postMessage('{ "event":"command", "func":"playVideo"}',"*"),e.querySelector(".three-play-media-iframe").contentWindow.postMessage('{ "method":"play", "value":"true"}',"*")}))}))},e.bottomAlignedEventCardLogic=function(){if(!document.querySelector(".event-grid-bottom-aligned"))return!1;g(".event-grid-bottom-aligned",".event-card",".caption-container-image",(function(){f(".event-grid-bottom-aligned",".caption-container-image",(function(){window.addEventListener("resize",(function(){f(".event-grid-bottom-aligned",".caption-container-image")}))}))}),!0)},e.componentLogic=function(){document.getElementById("myTitle").addEventListener("click",(function(){}))},e.handlePlayer=function(e){var t=function(){function e(t,i,o){n(this,e),this.rootElement=t,this.videoState="stopped",this.transitionLength=700,this.instance=i,this.controller=o}return o(e,[{key:"transitionEnd",value:function(e){setTimeout(e.bind(this),this.transitionLength)}},{key:"setVideoState",value:function(e){this.videoState=e,this.controller.elements.videoContainer.setAttribute("data-video-state",e)}},{key:"setExpandedState",value:function(e){this.controller.elements.videoComponent.setAttribute("data-video-expanded",e)}},{key:"handleOpen",value:function(){if("stopped"!==this.videoState)return!1;this.controller.unregisterEvents(),this.rootElement.querySelector(".video-contained")||this.scrollIntoCenter(),this.controller.elements.videoContainer.classList.add("fade-out"),this.controller.elements.videoCaption.classList.add("fade-out"),this.setVideoState("loading"),this.transitionEnd(this.open)}},{key:"open",value:function(){this.rootElement.querySelector(".video-contained")?this.setExpandedState("false"):this.setExpandedState("true"),this.controller.elements.videoContainer.classList.remove("fade-out"),this.transitionEnd(this.play)}},{key:"play",value:function(){var e=this;this.rootElement.querySelector(".video-contained")||this.controller.elements.videoComponent.classList.add("bg-dark"),Promise.resolve(this.instance.play()).then((function(){return e.controller.registerEvents()})),this.setVideoState("playing")}},{key:"handleClose",value:function(){this.setVideoState("stopping"),this.instance.toggleControls(!1),this.instance.stop(),this.controller.unregisterEvents(),this.controller.elements.videoComponent.classList.remove("bg-dark"),this.controller.elements.videoContainer.classList.add("fade-out"),this.transitionEnd(this.close)}},{key:"close",value:function(){this.setExpandedState("false"),this.setVideoState("loading"),this.transitionEnd(this.prepareReset)}},{key:"prepareReset",value:function(){this.controller.elements.videoContainer.classList.remove("fade-out"),this.controller.elements.videoContainer.classList.add("fade-in"),this.setVideoState("stopped"),this.controller.elements.videoCaption.classList.remove("fade-out"),this.controller.elements.videoCaption.classList.add("fade-in"),this.transitionEnd(this.reset)}},{key:"reset",value:function(){this.controller.elements.videoContainer.classList.remove("fade-in"),this.controller.elements.videoCaption.classList.remove("fade-in"),this.controller.registerEvents()}},{key:"scrollIntoCenter",value:function(){return this.controller.elements.videoContainer.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})}}]),e}(),i=function(e){r(i,e);var t=c(i);function i(e,o,r){var s;return n(this,i),(s=t.call(this,e,o,r)).transitionLength=100,s}return o(i,[{key:"handleOpen",value:function(){var e=this;if("stopped"!==this.videoState)return!1;this.setVideoState("loading"),this.controller.unregisterEvents(),this.rootElement.querySelector(".video-contained")||(this.rootElement.classList.add("video-component-lightbox"),this.controller.elements.videoComponent.classList.add("bg-dark")),Promise.resolve(this.instance.play()).then((function(){return e.controller.registerEvents()})),this.transitionEnd((function(){return e.setVideoState("playing")}))}},{key:"handleClose",value:function(){this.controller.unregisterEvents(),this.rootElement.querySelector(".video-contained")||(this.controller.elements.videoComponent.classList.remove("bg-dark"),this.rootElement.classList.remove("video-component-lightbox")),this.instance.stop(),this.setVideoState("stopped"),this.controller.registerEvents()}}]),i}(t),s=function(){function e(t,i){n(this,e),this.rootElement=t,this.elements=this.registerElements(),this.instance=i,this.player=this.getPlayerType(),this.keysObject={toggle:[75],click:[31,13],exit:[27]},this.clickHandler=this.handleClickEvents.bind(this),this.handleClose=this.player.handleClose.bind(this.player),this.handleOutsideClick=this.handleOutsideClick.bind(this),this.handleKeyboardEvents=this.handleKeyboardEvents.bind(this),this.handleStop=this.handleStop.bind(this),this.registerEvents()}return o(e,[{key:"getPlayerType",value:function(){return this.rootElement.querySelector(".video-grid-item")||this.rootElement.querySelector(".video-lightbox-full-width")?new i(this.rootElement,this.instance,this):new t(this.rootElement,this.instance,this)}},{key:"registerElements",value:function(){var e={videoComponent:".video-component",videoContainer:".video-wrapper",overlayContent:".overlay-container",videoCaption:".video-caption-container",exitContainer:".exit-container",clickHandler:".video-overlay-content",playSVG:".svg-path",svgButton:".svg-container",plyrEl:".plyr__video-embed"};for(var t in e)e[t]=this.rootElement.querySelector(e[t]);return e}},{key:"registerEvents",value:function(){this.elements.clickHandler.addEventListener("click",this.clickHandler),this.elements.exitContainer.addEventListener("click",this.handleClose),this.elements.exitContainer.addEventListener("keydown",this.handleKeyboardEvents),this.elements.plyrEl.addEventListener("keydown",this.handleKeyboardEvents),this.elements.svgButton.addEventListener("keydown",this.handleKeyboardEvents),window.addEventListener("click",this.handleOutsideClick)}},{key:"unregisterEvents",value:function(){this.elements.clickHandler.removeEventListener("click",this.clickHandler),this.elements.exitContainer.removeEventListener("click",this.handleClose),this.elements.exitContainer.removeEventListener("keydown",this.handleKeyboardEvents),this.elements.plyrEl.addEventListener("keydown",this.handleKeyboardEvents),this.elements.svgButton.removeEventListener("keydown",this.handleKeyboardEvents),window.removeEventListener("click",this.handleOutsideClick)}},{key:"handleClickEvents",value:function(){"stopped"!==this.player.videoState||this.player.handleOpen()}},{key:"handleKeyboardEvents",value:function(e){if(document.activeElement.classList.contains("svg-container")){var t=e.which;if(this.keysObject.toggle.includes(t))return void this.handleClickEvents()}if(document.activeElement.classList.contains("exit-container")){var n=e.which;if(this.keysObject.click.includes(n)||this.keysObject.exit.includes(n))return void this.player.handleClose()}if(document.activeElement.classList.contains("plyr")){var i=e.which;if(this.keysObject.exit.includes(i))return void this.player.handleClose()}}},{key:"handleOutsideClick",value:function(e){if(0===this.instance.currentTime)return!1;this.rootElement.querySelector(".video-container").contains(e.target)||this.player.handleClose()}},{key:"handleStop",value:function(){var e=(100*this.instance.currentTime/this.instance.duration).toFixed();if(!Number(e))return!1;100===e&&this.player.handleClose()}}]),e}();void 0!==e&&function(){var t={youtube:{modestbranding:1,controls:1,disablekb:0},keyboard:{focused:!0,global:!1},controls:["play-large","restart","rewind","play","fast-forward","progress","current-time","duration","mute","volume","captions","settings","pip","airplay","fullscreen"]};document.querySelector(".video-contained")&&(t.ratio="1:1");var n=Array.from(document.querySelectorAll(".video-component-container"));if(!n)return!1;n.forEach((function(n){var i=n.querySelector(".__player_root");if(i){!function(e){var t=e.querySelector("iframe"),n=t.src,i=/vimeo.*\/(\d+)/i.exec(n);if(i)t.src="https://player.vimeo.com/video/".concat(i[1])}(i);var o=new e(i,t);new s(n,o)}}))}()},e.sbPeopleLogic=function(){var e=document.querySelectorAll(".sub-nav li"),t=document.querySelectorAll(".nav-tabs li"),n=document.querySelectorAll(".description-section");document.querySelector(".people-header__content__description"),n.forEach((function(i,o){null!==n[o].querySelector(".no-content")&&(e[o].classList.add("deleteme"),t[o].classList.add("deleteme"),n[o].classList.add("deleteme"))})),document.querySelectorAll(".deleteme"),document.querySelectorAll(".deleteme").forEach((function(e){return e.remove()}))},e.textBlockCombinedCourseLogic=function(){if(!document.querySelector('[data-reflow-content="true"]'))return!1;if(document.querySelector('[data-reflow-content-wrapped="true"]'))return!1;function e(e,t){var n=[];for(e=e.nextElementSibling;e&&!t.some((function(t){return e.matches(t)}))&&(n.push(e),e.nextElementSibling);)e=e.nextElementSibling;return n}function t(e,t,n){var i=document.createElement("div");i.classList.add("grid-col-md-1of2"),i.classList.add("text-block"),n%2==0?i.classList.add("course-grid-item-left"):i.classList.add("course-grid-item-right"),i.setAttribute("data-reflow-content-wrapped","true"),i.appendChild(e.cloneNode(!0)),t.length>0&&t.forEach((function(e){return i.appendChild(e)})),e.parentNode.replaceChild(i,e)}var n=document.querySelectorAll('[data-reflow-content="true"]'),i=["h2","h3","h4"];n.forEach((function(n){var o=n.firstElementChild,r=!1;if(!i.some((function(e){return o.matches(e)}))){var s=e(o,i);t(o,s,0),r=!0}var a=n.querySelectorAll(i.join(","));if(!a)return!1;a.forEach((function(n,o){n.classList.add("heading3"),n.classList.add("utility-heading-md"),t(n,e(n,i),o=r?o+1:o)})),n.classList=n.getAttribute("data-reflow-content-classlist")}))}}));
