function debounce(t,e,i){"use strict";var n;return function(){var s=this,r=arguments,o=function(){n=null,i||t.apply(s,r)},a=i&&!n;clearTimeout(n),n=setTimeout(o,e),a&&t.apply(s,r)}}function materializeUpdateLabelPaddingHeight(t){t.hasClass("form__component")&&(t=t.find(".form__field"));var e=t.next(".form__label--moved"),i=t.closest(".twitter-typeahead");if(i.length&&(e=i.next(".form__label--moved")),e.length){var n=e.innerHeight();t.css("padding-top",n+5)}}function checkFieldEmpty(t){var e=t.val().length&&!(" "===t.val());e?t.addClass("form__field--not-empty"):t.removeClass("form__field--not-empty"),"search"===t.attr("type")&&setTimeout(function(){var i=t.closest(".twitter-typeahead");i.length&&(e?i.addClass("twitter-typeahead--not-empty"):i.removeClass("twitter-typeahead--not-empty"))})}function initXFP(){if($form.length){if("undefined"!=typeof FileUploads){(new FileUploads).init()}if(office365MobileControl(),"undefined"!=typeof InPageBranching){var t=new InPageBranching;const e={attributes:!0,childList:!0,subtree:!0},i=function(t,e){Array.prototype.forEach.call(t,function(t){"attributes"===t.type&&"style"===t.attributeName&&"function"==typeof materializeFormsInit&&materializeFormsInit()})},n=new MutationObserver(i);t.init(),$form.get().forEach(function(t){var i=t.getElementsByClassName("js-branch-section");i.length&&Array.prototype.forEach.call(i,function(t){n.observe(t,e)})})}}}function office365MobileControl(){if(void 0!==$officeBookingCalendar){jQuery.extend(verge);var t=$officeBookingCalendar.find(".calendar__dates tr"),e=t.find("td");t.click(function(e){if(!(verge.viewportW()>=breakpointMidWidth)){var i=$(this);void 0!==$(e.target).attr("data-label")&&(i.hasClass("is-expanded")?i.removeClass("is-expanded"):(t.removeClass("is-expanded"),i.addClass("is-expanded")))}}),e.click(function(t){if(!(verge.viewportW()>=breakpointMidWidth)){var e=$(this);e.hasClass("is-disabled")||$(t.target).hasClass("form__label--radio")||(e.hasClass("is-expanded")?e.removeClass("is-expanded"):(e.removeClass("is-expanded"),e.addClass("is-expanded")))}})}}function initMaps(){$map.length&&($map.next(".form__append-group .button").click(function(t){t.preventDefault()}),$map.find("iframe").removeAttr("frameborder").attr("title","Embedded Map"),setTimeout(function(){$map.find("img, area").attr("alt","embedded map image"),$map.find('span[role="checkbox"]').removeAttr("role").attr("aria-label","Embedded Map Checkbox")},500))}function initCookieBanner(){$cookieBanner.length&&(cookieBannerSetHeight(),$cookieBanner.find(".cookie-banner__accept").click(function(t){t.preventDefault(),$.cookie("acceptCookies",1,{expires:7,path:"/",secure:"https"===document.location.protocol}),$cookieBanner.addClass("cookie-banner--hidden is-animating"),setTimeout(function(){$widgetColourBlocks.removeClass("is-animating")},500)}))}function cookieBannerSetHeight(){$cookieBanner.length&&$cookieBanner.removeAttr("style").css("max-height",$cookieBanner.outerHeight())}function boxedToggle(t,e,i){"use strict";var n,s=t,r=s.prev(".list"),o=r.prop("scrollHeight"),e=void 0!==e?e:3,i=void 0!==i?i:500;if(s.data("open-text",s.html()),o>i&&(o=i,r.addClass("needs-scrollbar")),r.length){var a=r.find(".list__item");a.each(function(t){t>=e&&$(this).attr("aria-hidden","true")});var l=r.height();r.css("max-height",l),s.click(function(){clearTimeout(n),r.addClass("is-animating"),"false"===s.attr("aria-expanded")?(a.each(function(t){t>=e&&$(this).attr("aria-hidden","false")}),s.attr("aria-expanded","true"),s.text("Show less"),n=setTimeout(function(){r.removeClass("is-animating")},100),r.addClass("is-open"),r.css("max-height",o)):(a.each(function(t){t>=e&&$(this).attr("aria-hidden","true")}),s.attr("aria-expanded","false"),s.html(s.data("open-text")),n=setTimeout(function(){r.removeClass("is-animating")},800),r.removeClass("is-open"),r.animate({scrollTop:0},"slow"),r.css("max-height",l))}),s.on("mousedown touchend",function(){s.addClass("hide-focus")}),s.on("keydown blur",function(){s.removeClass("hide-focus")})}}function typeaheadAddLabelsToHintFields(){setTimeout(function(){var t=$form.find(".tt-hint");t.length&&t.each(function(t){var e=$(this),i="tt-hint-"+t;e.attr("id",i).removeAttr("accesskey"),e.before('')})},0)}function hideFunnelbackDropdownOnClickOutside(t){$siteHeader.add($pageHeader).find(".tt-dropdown-menu").length&&($(t.target).closest(".tt-dropdown-menu").length||$body.find(".tt-dropdown-menu").hide())}function positionFunnelbackSortFilter(){var t=$siteMain.find(".sidebar"),e=t.find("> .search-results__sort-by:first-child"),i=$siteContent.find("> .search-results__sort-by:first-child");windowWidthbreakpointMidWidth&&(i.prependTo(t),$searchResultsSortFilter=t.find(".search-results__sort-by"))}function initMultichannelAutocomplete(){var t="https://bolton.funnelback.co.uk/s/suggest.json";$siteSearchField.autocompletion({datasets:{organic:{name:"Suggestions",collection:"bolton-website-meta",profile:"_default",program:t,show:6,template:{suggestion:'',header:'',empty:'No suggestions found.
'}},events:{name:"Events",collection:"bolton-whats-on",profile:"_default",program:t,show:3,template:{suggestion:function(t){var e="";return e+=''+t.label.title,t.label.date?e+="
Date: "+t.label.date.replace("|",", ")+"":e+="",t.label.startTime&&t.label.endTime&&(e+='Time: '+t.label.startTime.replace(/:00$/,"").replace("|",", ")+" - "+t.label.endTime.replace(/:00$/,"").replace("|",", ")+""),e+=" "},header:'',empty:'No suggestions found.
'}},news:{name:"News",collection:"bolton-news",profile:"_default",program:t,show:3,template:{suggestion:function(t){var e="";return e+='"},header:'',empty:'No suggestions found.
'}}},typeahead:{classNames:{menu:"tt-dropdown-menu"}}})}!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(t){var e=-1,i=-1,n=function(t){return parseFloat(t)||0},s=function(e){var i=t(e),s=null,r=[];return i.each(function(){var e=t(this),i=e.offset().top-n(e.css("margin-top")),o=r.length>0?r[r.length-1]:null;null===o?r.push(e):Math.floor(Math.abs(s-i))<=1?r[r.length-1]=o.add(e):r.push(e),s=i}),r},r=function(e){var i={byRow:!0,property:"height",target:null,remove:!1};return"object"==typeof e?t.extend(i,e):("boolean"==typeof e?i.byRow=e:"remove"===e&&(i.remove=!0),i)},o=t.fn.matchHeight=function(e){var i=r(e);if(i.remove){var n=this;return this.css(i.property,""),t.each(o._groups,function(t,e){e.elements=e.elements.not(n)}),this}return this.length<=1&&!i.target?this:(o._groups.push({elements:this,options:i}),o._apply(this,i),this)};o.version="0.7.2",o._groups=[],o._throttle=80,o._maintainScroll=!1,o._beforeUpdate=null,o._afterUpdate=null,o._rows=s,o._parse=n,o._parseOptions=r,o._apply=function(e,i){var a=r(i),l=t(e),c=[l],h=t(window).scrollTop(),u=t("html").outerHeight(!0),d=l.parents().filter(":hidden");return d.each(function(){var e=t(this);e.data("style-cache",e.attr("style"))}),d.css("display","block"),a.byRow&&!a.target&&(l.each(function(){var e=t(this),i=e.css("display");"inline-block"!==i&&"flex"!==i&&"inline-flex"!==i&&(i="block"),e.data("style-cache",e.attr("style")),e.css({display:i,"padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px",overflow:"hidden"})}),c=s(l),l.each(function(){var e=t(this);e.attr("style",e.data("style-cache")||"")})),t.each(c,function(e,i){var s=t(i),r=0;if(a.target)r=a.target.outerHeight(!1);else{if(a.byRow&&s.length<=1)return void s.css(a.property,"");s.each(function(){var e=t(this),i=e.attr("style"),n=e.css("display");"inline-block"!==n&&"flex"!==n&&"inline-flex"!==n&&(n="block");var s={display:n};s[a.property]="",e.css(s),e.outerHeight(!1)>r&&(r=e.outerHeight(!1)),i?e.attr("style",i):e.css("display","")})}s.each(function(){var e=t(this),i=0;a.target&&e.is(a.target)||("border-box"!==e.css("box-sizing")&&(i+=n(e.css("border-top-width"))+n(e.css("border-bottom-width")),i+=n(e.css("padding-top"))+n(e.css("padding-bottom"))),e.css(a.property,r-i+"px"))})}),d.each(function(){var e=t(this);e.attr("style",e.data("style-cache")||null)}),o._maintainScroll&&t(window).scrollTop(h/u*t("html").outerHeight(!0)),this},o._applyDataApi=function(){var e={};t("[data-match-height], [data-mh]").each(function(){var i=t(this),n=i.attr("data-mh")||i.attr("data-match-height");e[n]=n in e?e[n].add(i):i}),t.each(e,function(){this.matchHeight(!0)})};var a=function(e){o._beforeUpdate&&o._beforeUpdate(e,o._groups),t.each(o._groups,function(){o._apply(this.elements,this.options)}),o._afterUpdate&&o._afterUpdate(e,o._groups)};o._update=function(n,s){if(s&&"resize"===s.type){var r=t(window).width();if(r===e)return;e=r}n?-1===i&&(i=setTimeout(function(){a(s),i=-1},o._throttle)):a(s)},t(o._applyDataApi);var l=t.fn.on?"on":"bind";t(window)[l]("load",function(t){o._update(!1,t)}),t(window)[l]("resize orientationchange",function(t){o._update(!0,t)})}),window.matchMedia||(window.matchMedia=function(){"use strict";var t=window.styleMedia||window.media;if(!t){var e=document.createElement("style"),i=document.getElementsByTagName("script")[0],n=null;e.type="text/css",e.id="matchmediajs-test",i.parentNode.insertBefore(e,i),n="getComputedStyle"in window&&window.getComputedStyle(e,null)||e.currentStyle,t={matchMedium:function(t){var i="@media "+t+"{ #matchmediajs-test { width: 1px; } }";return e.styleSheet?e.styleSheet.cssText=i:e.textContent=i,"1px"===n.width}}}return function(e){return{matches:t.matchMedium(e||"all"),media:e||"all"}}}()),function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(jQuery){return e(t,jQuery)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,jQuery){"use strict";function e(e,s,o){function a(t,i,n){var s,a="$()."+e+'("'+i+'")';return t.each(function(t,l){var c=o.data(l,e);if(!c)return void r(e+" not initialized. Cannot call methods, i.e. "+a);var h=c[i];if(!h||"_"==i.charAt(0))return void r(a+" is not a valid method");var u=h.apply(c,n);s=void 0===s?u:s}),void 0!==s?s:t}function l(t,i){t.each(function(t,n){var r=o.data(n,e);r?(r.option(i),r._init()):(r=new s(n,i),o.data(n,e,r))})}(o=o||jQuery||t.jQuery)&&(s.prototype.option||(s.prototype.option=function(t){o.isPlainObject(t)&&(this.options=o.extend(!0,this.options,t))}),o.fn[e]=function(t){if("string"==typeof t){return a(this,t,n.call(arguments,1))}return l(this,t),this},i(o))}function i(t){!t||t&&t.bridget||(t.bridget=e)}var n=Array.prototype.slice,s=t.console,r=void 0===s?function(){}:function(t){s.error(t)};return i(jQuery||t.jQuery),e}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],s=0;s1&&(t=e.modulo(t,this.slideableWidth),t-=this.slideableWidth,this.shiftWrapCells(t)),t+=this.cursorPosition,t=this.options.rightToLeft?-t:t;var i=this.getPositionValue(t);this.slider.style.transform=this.isAnimating?"translate3d("+i+",0,0)":"translateX("+i+")";var n=this.slides[0];if(n){var s=-this.x-n.target,r=s/this.slidesWidth;this.dispatchEvent("scroll",null,[r,s])}},i.positionSliderAtSelected=function(){this.cells.length&&(this.x=-this.selectedSlide.target,this.velocity=0,this.positionSlider())},i.getPositionValue=function(t){return this.options.percentPosition?.01*Math.round(t/this.size.innerWidth*1e4)+"%":Math.round(t)+"px"},i.settle=function(t){this.isPointerDown||Math.round(100*this.x)!=Math.round(100*t)||this.restingFrames++,this.restingFrames>2&&(this.isAnimating=!1,delete this.isFreeScrolling,this.positionSlider(),this.dispatchEvent("settle",null,[this.selectedIndex]))},i.shiftWrapCells=function(t){var e=this.cursorPosition+t;this._shiftCells(this.beforeShiftCells,e,-1);var i=this.size.innerWidth-(t+this.slideableWidth+this.cursorPosition);this._shiftCells(this.afterShiftCells,i,1)},i._shiftCells=function(t,e,i){for(var n=0;n0?i:0;s.wrapShift(r),e-=s.size.outerWidth}},i._unshiftCells=function(t){if(t&&t.length)for(var e=0;e0){var i=this.cells[t-1];e=i.x+i.size.outerWidth}for(var n=this.cells.length,s=t;s0;){var s=this.cells[e];if(!s)break;n.push(s),e+=i,t-=s.size.outerWidth}return n},p._containSlides=function(){if(this.options.contain&&!this.options.wrapAround&&this.cells.length){var t=this.options.rightToLeft,e=t?"marginRight":"marginLeft",i=t?"marginLeft":"marginRight",n=this.slideableWidth-this.getLastCell().size[i],s=n1))return t;var i=n.modulo(t,e),s=Math.abs(i-this.selectedIndex),r=Math.abs(i+e-this.selectedIndex),o=Math.abs(i-e-this.selectedIndex);!this.isDragSelect&&r=e&&(this.x+=this.slideableWidth)},p.previous=function(t,e){this.select(this.selectedIndex-1,t,e)},p.next=function(t,e){this.select(this.selectedIndex+1,t,e)},p.updateSelectedSlide=function(){var t=this.slides[this.selectedIndex];t&&(this.unselectSelectedSlide(),this.selectedSlide=t,t.select(),this.selectedCells=t.cells,this.selectedElements=t.getCellElements(),this.selectedCell=t.cells[0],this.selectedElement=this.selectedElements[0])},p.unselectSelectedSlide=function(){this.selectedSlide&&this.selectedSlide.unselect()},p.selectCell=function(t,e,i){var n=this.queryCell(t);if(n){var s=this.getCellSlideIndex(n);this.select(s,e,i)}},p.getCellSlideIndex=function(t){for(var e=0;e *"),this.getCell(t))},p.getAdjacentCellElements=function(t,e){if(!t)return this.selectedSlide.getCellElements();e=void 0===e?this.selectedIndex:e;var i=this.slides.length;if(1+2*t>=i)return this.getCellElements();for(var s=[],r=e-t;r<=e+t;r++){var o=this.options.wrapAround?n.modulo(r,i):r,a=this.slides[o];a&&(s=s.concat(a.getCellElements()))}return s},p.queryCell=function(t){return"number"==typeof t?this.cells[t]:("string"==typeof t&&(t=this.element.querySelector(t)),this.getCell(t))},p.uiChange=function(){this.emitEvent("uiChange")},p.childUIPointerDown=function(t){this.emitEvent("childUIPointerDown",[t])},p.onresize=function(){this.watchCSS(),this.resize()},n.debounceMethod(l,"onresize",150),p.resize=function(){if(this.isActive){this.getSize(),this.options.wrapAround&&(this.x=n.modulo(this.x,this.slideableWidth)),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize(),this.emitEvent("resize");var t=this.selectedElements&&this.selectedElements[0];this.selectCell(t,!1,!0)}},p.watchCSS=function(){this.options.watchCSS&&(-1!=c(this.element,":after").content.indexOf("flickity")?this.activate():this.deactivate())},p.onkeydown=function(t){
var e=document.activeElement&&document.activeElement!=this.element;if(this.options.accessibility&&!e){var i=l.keyboardHandlers[t.keyCode];i&&i.call(this)}},l.keyboardHandlers={37:function(){var t=this.options.rightToLeft?"next":"previous";this.uiChange(),this[t]()},39:function(){var t=this.options.rightToLeft?"previous":"next";this.uiChange(),this[t]()}},p.focus=function(){var e=t.pageYOffset;this.element.focus({preventScroll:!0}),t.pageYOffset!=e&&t.scrollTo(t.pageXOffset,e)},p.deactivate=function(){this.isActive&&(this.element.classList.remove("flickity-enabled"),this.element.classList.remove("flickity-rtl"),this.unselectSelectedSlide(),this.cells.forEach(function(t){t.destroy()}),this.element.removeChild(this.viewport),a(this.slider.children,this.element),this.options.accessibility&&(this.element.removeAttribute("tabIndex"),this.element.removeEventListener("keydown",this)),this.isActive=!1,this.emitEvent("deactivate"))},p.destroy=function(){this.deactivate(),t.removeEventListener("resize",this),this.emitEvent("destroy"),jQuery&&this.$element&&jQuery.removeData(this.element,"flickity"),delete this.element.flickityGUID,delete d[this.guid]},n.extend(p,o),l.data=function(t){t=n.getQueryElement(t);var e=t&&t.flickityGUID;return e&&d[e]},n.htmlInit(l,"flickity"),jQuery&&jQuery.bridget&&jQuery.bridget("flickity",l),l.setJQuery=function(t){jQuery=t},l.Cell=s,l}),function(t,e){"function"==typeof define&&define.amd?define("unipointer/unipointer",["ev-emitter/ev-emitter"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.Unipointer=e(t,t.EvEmitter)}(window,function(t,e){function i(){}function n(){}var s=n.prototype=Object.create(e.prototype);s.bindStartEvent=function(t){this._bindStartEvent(t,!0)},s.unbindStartEvent=function(t){this._bindStartEvent(t,!1)},s._bindStartEvent=function(e,i){i=void 0===i||i;var n=i?"addEventListener":"removeEventListener",s="mousedown";t.PointerEvent?s="pointerdown":"ontouchstart"in t&&(s="touchstart"),e[n](s,this)},s.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},s.getTouch=function(t){for(var e=0;e3||Math.abs(t.y)>3},n.pointerUp=function(t,e){this.emitEvent("pointerUp",[t,e]),this._dragPointerUp(t,e)},n._dragPointerUp=function(t,e){this.isDragging?this._dragEnd(t,e):this._staticClick(t,e)},n._dragStart=function(t,e){this.isDragging=!0,this.isPreventingClicks=!0,this.dragStart(t,e)},n.dragStart=function(t,e){this.emitEvent("dragStart",[t,e])},n._dragMove=function(t,e,i){this.isDragging&&this.dragMove(t,e,i)},n.dragMove=function(t,e,i){t.preventDefault(),this.emitEvent("dragMove",[t,e,i])},n._dragEnd=function(t,e){this.isDragging=!1,setTimeout(function(){delete this.isPreventingClicks}.bind(this)),this.dragEnd(t,e)},n.dragEnd=function(t,e){this.emitEvent("dragEnd",[t,e])},n.onclick=function(t){this.isPreventingClicks&&t.preventDefault()},n._staticClick=function(t,e){this.isIgnoringMouseUp&&"mouseup"==t.type||(this.staticClick(t,e),"mouseup"!=t.type&&(this.isIgnoringMouseUp=!0,setTimeout(function(){delete this.isIgnoringMouseUp}.bind(this),400)))},n.staticClick=function(t,e){this.emitEvent("staticClick",[t,e])},i.getPointerPoint=e.getPointerPoint,i}),function(t,e){"function"==typeof define&&define.amd?define("flickity/js/drag",["./flickity","unidragger/unidragger","fizzy-ui-utils/utils"],function(i,n,s){return e(t,i,n,s)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./flickity"),require("unidragger"),require("fizzy-ui-utils")):t.Flickity=e(t,t.Flickity,t.Unidragger,t.fizzyUIUtils)}(window,function(t,e,i,n){function s(){return{x:t.pageXOffset,y:t.pageYOffset}}n.extend(e.defaults,{draggable:">1",dragThreshold:3}),e.createMethods.push("_createDrag");var r=e.prototype;n.extend(r,i.prototype),r._touchActionValue="pan-y";var o="createTouch"in document,a=!1;r._createDrag=function(){this.on("activate",this.onActivateDrag),this.on("uiChange",this._uiChangeDrag),this.on("childUIPointerDown",this._childUIPointerDownDrag),this.on("deactivate",this.onDeactivateDrag),this.on("cellChange",this.updateDraggable),o&&!a&&(t.addEventListener("touchmove",function(){}),a=!0)},r.onActivateDrag=function(){this.handles=[this.viewport],this.bindHandles(),this.updateDraggable()},r.onDeactivateDrag=function(){this.unbindHandles(),this.element.classList.remove("is-draggable")},r.updateDraggable=function(){">1"==this.options.draggable?this.isDraggable=this.slides.length>1:this.isDraggable=this.options.draggable,this.isDraggable?this.element.classList.add("is-draggable"):this.element.classList.remove("is-draggable")},r.bindDrag=function(){this.options.draggable=!0,this.updateDraggable()},r.unbindDrag=function(){this.options.draggable=!1,this.updateDraggable()},r._uiChangeDrag=function(){delete this.isFreeScrolling},r._childUIPointerDownDrag=function(t){t.preventDefault(),this.pointerDownFocus(t)},r.pointerDown=function(e,i){if(!this.isDraggable)return void this._pointerDownDefault(e,i);this.okayPointerDown(e)&&(this._pointerDownPreventDefault(e),this.pointerDownFocus(e),document.activeElement!=this.element&&this.pointerDownBlur(),this.dragX=this.x,this.viewport.classList.add("is-pointer-down"),this.pointerDownScroll=s(),t.addEventListener("scroll",this),this._pointerDownDefault(e,i))},r._pointerDownDefault=function(t,e){this.pointerDownPointer=e,this._bindPostStartEvents(t),this.dispatchEvent("pointerDown",t,[e])};var l={INPUT:!0,TEXTAREA:!0,SELECT:!0};return r.pointerDownFocus=function(t){l[t.target.nodeName]||this.focus()},r._pointerDownPreventDefault=function(t){var e="touchstart"==t.type,i="touch"==t.pointerType,n=l[t.target.nodeName];e||i||n||t.preventDefault()},r.hasDragStarted=function(t){return Math.abs(t.x)>this.options.dragThreshold},r.pointerUp=function(t,e){delete this.isTouchScrolling,this.viewport.classList.remove("is-pointer-down"),this.dispatchEvent("pointerUp",t,[e]),this._dragPointerUp(t,e)},r.pointerDone=function(){t.removeEventListener("scroll",this),delete this.pointerDownScroll},r.dragStart=function(e,i){this.isDraggable&&(this.dragStartPosition=this.x,this.startAnimation(),t.removeEventListener("scroll",this),this.dispatchEvent("dragStart",e,[i]))},r.pointerMove=function(t,e){var i=this._dragPointerMove(t,e);this.dispatchEvent("pointerMove",t,[e,i]),this._dragMove(t,e,i)},r.dragMove=function(t,e,i){if(this.isDraggable){t.preventDefault(),this.previousDragX=this.dragX;var n=this.options.rightToLeft?-1:1;this.options.wrapAround&&(i.x=i.x%this.slideableWidth);var s=this.dragStartPosition+i.x*n;if(!this.options.wrapAround&&this.slides.length){var r=Math.max(-this.slides[0].target,this.dragStartPosition);s=s>r?.5*(s+r):s;var o=Math.min(-this.getLastSlide().target,this.dragStartPosition);s=sthis.slides[0].target&&-n1,r=s?n.modulo(e,i):e,o=this.slides[r];if(!o)return null;var a=s?this.slideableWidth*Math.floor(e/i):0;return t-(o.target+a)},r.dragEndBoostSelect=function(){if(void 0===this.previousDragX||!this.dragMoveTime||new Date-this.dragMoveTime>100)return 0;var t=this.getSlideDistance(-this.dragX,this.selectedIndex),e=this.previousDragX-this.dragX;return t>0&&e>0?1:t<0&&e<0?-1:0},r.staticClick=function(t,e){var i=this.getParentCell(t.target),n=i&&i.element,s=i&&this.cells.indexOf(i);this.dispatchEvent("staticClick",t,[e,n,s])},r.onscroll=function(){var t=s(),e=this.pointerDownScroll.x-t.x,i=this.pointerDownScroll.y-t.y;(Math.abs(e)>3||Math.abs(i)>3)&&this._pointerDone()},e}),function(t,e){"function"==typeof define&&define.amd?define("tap-listener/tap-listener",["unipointer/unipointer"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("unipointer")):t.TapListener=e(t,t.Unipointer)}(window,function(t,e){function i(t){this.bindTap(t)}var n=i.prototype=Object.create(e.prototype);return n.bindTap=function(t){t&&(this.unbindTap(),this.tapElement=t,this._bindStartEvent(t,!0))},n.unbindTap=function(){this.tapElement&&(this._bindStartEvent(this.tapElement,!0),delete this.tapElement)},n.pointerUp=function(i,n){if(!this.isIgnoringMouseUp||"mouseup"!=i.type){var s=e.getPointerPoint(n),r=this.tapElement.getBoundingClientRect(),o=t.pageXOffset,a=t.pageYOffset;if(s.x>=r.left+o&&s.x<=r.right+o&&s.y>=r.top+a&&s.y<=r.bottom+a&&this.emitEvent("tap",[i,n]),"mouseup"!=i.type){this.isIgnoringMouseUp=!0;var l=this;setTimeout(function(){delete l.isIgnoringMouseUp},400)}}},n.destroy=function(){this.pointerDone(),this.unbindTap()},i}),function(t,e){"function"==typeof define&&define.amd?define("flickity/js/prev-next-button",["./flickity","tap-listener/tap-listener","fizzy-ui-utils/utils"],function(i,n,s){return e(t,i,n,s)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./flickity"),require("tap-listener"),require("fizzy-ui-utils")):e(t,t.Flickity,t.TapListener,t.fizzyUIUtils)}(window,function(t,e,i,n){"use strict";function s(t,e){this.direction=t,this.parent=e,this._create()}function r(t){return"string"==typeof t?t:"M "+t.x0+",50 L "+t.x1+","+(t.y1+50)+" L "+t.x2+","+(t.y2+50)+" L "+t.x3+",50 L "+t.x2+","+(50-t.y2)+" L "+t.x1+","+(50-t.y1)+" Z"}var o="http://www.w3.org/2000/svg";s.prototype=Object.create(i.prototype),s.prototype._create=function(){this.isEnabled=!0,this.isPrevious=-1==this.direction;var t=this.parent.options.rightToLeft?1:-1;this.isLeft=this.direction==t;var e=this.element=document.createElement("button");e.className="flickity-button flickity-prev-next-button",e.className+=this.isPrevious?" previous":" next",e.setAttribute("type","button"),this.disable(),e.setAttribute("aria-label",this.isPrevious?"Previous":"Next");var i=this.createSVG();e.appendChild(i),this.on("tap",this.onTap),this.parent.on("select",this.update.bind(this)),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},s.prototype.activate=function(){this.bindTap(this.element),this.element.addEventListener("click",this),this.parent.element.appendChild(this.element)},s.prototype.deactivate=function(){this.parent.element.removeChild(this.element),i.prototype.destroy.call(this),this.element.removeEventListener("click",this)},s.prototype.createSVG=function(){var t=document.createElementNS(o,"svg");t.setAttribute("class","flickity-button-icon"),t.setAttribute("viewBox","0 0 100 100");var e=document.createElementNS(o,"path"),i=r(this.parent.options.arrowShape);return e.setAttribute("d",i),e.setAttribute("class","arrow"),this.isLeft||e.setAttribute("transform","translate(100, 100) rotate(180) "),t.appendChild(e),t},s.prototype.onTap=function(){if(this.isEnabled){this.parent.uiChange();var t=this.isPrevious?"previous":"next";this.parent[t]()}},s.prototype.handleEvent=n.handleEvent,s.prototype.onclick=function(t){var e=document.activeElement;e&&e==this.element&&this.onTap(t,t)},s.prototype.enable=function(){this.isEnabled||(this.element.disabled=!1,this.isEnabled=!0)},s.prototype.disable=function(){this.isEnabled&&(this.element.disabled=!0,this.isEnabled=!1)},s.prototype.update=function(){var t=this.parent.slides;if(this.parent.options.wrapAround&&t.length>1)return void this.enable();var e=t.length?t.length-1:0,i=this.isPrevious?0:e;this[this.parent.selectedIndex==i?"disable":"enable"]()},s.prototype.destroy=function(){this.deactivate()},n.extend(e.defaults,{prevNextButtons:!0,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}}),e.createMethods.push("_createPrevNextButtons");var a=e.prototype;return a._createPrevNextButtons=function(){this.options.prevNextButtons&&(this.prevButton=new s(-1,this),this.nextButton=new s(1,this),this.on("activate",this.activatePrevNextButtons))},a.activatePrevNextButtons=function(){this.prevButton.activate(),this.nextButton.activate(),this.on("deactivate",this.deactivatePrevNextButtons)},a.deactivatePrevNextButtons=function(){this.prevButton.deactivate(),this.nextButton.deactivate(),this.off("deactivate",this.deactivatePrevNextButtons)},e.PrevNextButton=s,e}),function(t,e){"function"==typeof define&&define.amd?define("flickity/js/page-dots",["./flickity","tap-listener/tap-listener","fizzy-ui-utils/utils"],function(i,n,s){return e(t,i,n,s)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./flickity"),require("tap-listener"),require("fizzy-ui-utils")):e(t,t.Flickity,t.TapListener,t.fizzyUIUtils)}(window,function(t,e,i,n){function s(t){this.parent=t,this._create()}s.prototype=new i,s.prototype._create=function(){this.holder=document.createElement("ol"),this.holder.className="flickity-page-dots",this.dots=[],this.on("tap",this.onTap),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},s.prototype.activate=function(){this.setDots(),this.bindTap(this.holder),this.parent.element.appendChild(this.holder)},s.prototype.deactivate=function(){this.parent.element.removeChild(this.holder),i.prototype.destroy.call(this)},s.prototype.setDots=function(){var t=this.parent.slides.length-this.dots.length;t>0?this.addDots(t):t<0&&this.removeDots(-t)},s.prototype.addDots=function(t){for(var e=document.createDocumentFragment(),i=[],n=this.dots.length,s=n+t,r=n;r=this.cells.length)){var o=this.cells.slice(n,s+1);this.navSelectedElements=o.map(function(t){return t.element}),this.changeNavSelectedClass("add")}}},n.changeNavSelectedClass=function(t){this.navSelectedElements.forEach(function(e){e.classList[t]("is-nav-selected")})},n.activateAsNavFor=function(){this.navCompanionSelect(!0)},n.removeNavSelectedElements=function(){this.navSelectedElements&&(this.changeNavSelectedClass("remove"),delete this.navSelectedElements)},n.onNavStaticClick=function(t,e,i,n){"number"==typeof n&&this.navCompanion.selectCell(n)},n.deactivateAsNavFor=function(){this.removeNavSelectedElements()},n.destroyAsNavFor=function(){this.navCompanion&&(this.navCompanion.off("select",this.onNavCompanionSelect),this.off("staticClick",this.onNavStaticClick),delete this.navCompanion)},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("imagesloaded/imagesloaded",["ev-emitter/ev-emitter"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,function(t,e){function i(t,e){for(var i in e)t[i]=e[i];return t}function n(t){return Array.isArray(t)?t:"object"==typeof t&&"number"==typeof t.length?c.call(t):[t]}function s(t,e,r){if(!(this instanceof s))return new s(t,e,r);var o=t;if("string"==typeof t&&(o=document.querySelectorAll(t)),!o)return void l.error("Bad element for imagesLoaded "+(o||t));this.elements=n(o),this.options=i({},this.options),"function"==typeof e?r=e:i(this.options,e),r&&this.on("always",r),this.getImages(),a&&(this.jqDeferred=new a.Deferred),setTimeout(this.check.bind(this))}function r(t){this.img=t}function o(t,e){this.url=t,this.element=e,this.img=new Image}var a=t.jQuery,l=t.console,c=Array.prototype.slice;s.prototype=Object.create(e.prototype),s.prototype.options={},s.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},s.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);var e=t.nodeType;if(e&&h[e]){for(var i=t.querySelectorAll("img"),n=0;nt._pfLastSize)&&(t._pfLastSize=t.offsetWidth,n=t.sizes,t.sizes+=",100vw",setTimeout(function(){t.sizes=n}))},s=function(){var t,e=document.querySelectorAll("picture > img, img[srcset][sizes]");for(t=0;t2.7?a=i+1:(r=e-i,s=Math.pow(t-.6,1.5),o=r*s,n&&(o+=.1*s),a=t+o):a=i>1?Math.sqrt(t*e):t,a>i}function o(t){var e,i=m.getSet(t),n=!1;"pending"!==i&&(n=g,i&&(e=m.setRes(i),m.applySetCandidate(e,t))),t[m.ns].evaled=n}function a(t,e){return t.res-e.res}function l(t,e,i){var n;return!i&&e&&(i=t[m.ns].sets,i=i&&i[i.length-1]),n=c(e,i),n&&(e=m.makeUrl(e),t[m.ns].curSrc=e,t[m.ns].curCan=n,n.res||J(n,n.set.sizes)),n}function c(t,e){var i,n,s;if(t&&e)for(s=m.parseSet(e),t=m.makeUrl(t),i=0;ii;i++)s=o[i],s[m.ns]=!0,(r=s.getAttribute("srcset"))&&e.push({srcset:r,media:s.getAttribute("media"),type:s.getAttribute("type"),sizes:s.getAttribute("sizes")})}function u(t,e){function i(e){var i,n=e.exec(t.substring(u));return n?(i=n[0],u+=i.length,i):void 0}function s(){var t,i,n,s,a,l,c,h,u,p=!1,f={};for(s=0;su?p=!0:i=u):V.test(c)&&"h"===l?((n||i)&&(p=!0),0===h?p=!0:n=h):p=!0;p||(f.url=r,t&&(f.w=t),i&&(f.d=i),n&&(f.h=n),n||i||t||(f.d=1),1===f.d&&(e.has1x=!0),f.set=e,d.push(f))}for(var r,o,a,l,c,h=t.length,u=0,d=[];;){if(i(W),u>=h)return d;r=i(U),o=[],","===r.slice(-1)?(r=r.replace(q,""),s()):function(){for(i(R),a="",l="in descriptor";;){if(c=t.charAt(u),"in descriptor"===l)if(n(c))a&&(o.push(a),a="",l="after descriptor");else{if(","===c)return u+=1,a&&o.push(a),void s();if("("===c)a+=c,l="in parens";else{if(""===c)return a&&o.push(a),void s();a+=c}}else if("in parens"===l)if(")"===c)a+=c,l="in descriptor";else{if(""===c)return o.push(a),void s();a+=c}else if("after descriptor"===l)if(n(c));else{if(""===c)return void s();l="in descriptor",u-=1}u+=1}}()}}function d(t){var e,i,s,r,o,a,l=/^(?:[+-]?[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i,c=/^calc\((?:[0-9a-z \.\+\-\*\/\(\)]+)\)$/i;for(i=function(t){function e(){r&&(o.push(r),r="")}function i(){o[0]&&(a.push(o),o=[])}for(var s,r="",o=[],a=[],l=0,c=0,h=!1;;){if(""===(s=t.charAt(c)))return e(),i(),a;if(h){if("*"===s&&"/"===t[c+1]){h=!1,c+=2,e();continue}c+=1}else{if(n(s)){if(t.charAt(c-1)&&n(t.charAt(c-1))||!r){c+=1;continue}if(0===l){e(),c+=1;continue}s=" "}else if("("===s)l+=1;else if(")"===s)l-=1;else{if(","===s){e(),i(),c+=1;continue}if("/"===s&&"*"===t.charAt(c+1)){h=!0,c+=2;continue}}r+=s,c+=1}}}(t),s=i.length,e=0;s>e;e++)if(r=i[e],o=r[r.length-1],function(t){return!!(l.test(t)&&parseFloat(t)>=0)||(!!c.test(t)||("0"===t||"-0"===t||"+0"===t))}(o)){if(a=o,r.pop(),0===r.length)return a;if(r=r.join(" "),m.matchesMedia(r))return a}return"100vw"}e.createElement("picture");var p,f,g,m={},v=!1,y=function(){},b=e.createElement("img"),w=b.getAttribute,k=b.setAttribute,_=b.removeAttribute,S=e.documentElement,x={},C={algorithm:""},E="data-pfsrc",P=E+"set",A=navigator.userAgent,$=/rident/.test(A)||/ecko/.test(A)&&A.match(/rv\:(\d+)/)&&RegExp.$1>35,L="currentSrc",D=/\s+\+?\d+(e\d+)?w/,N=/(\([^)]+\))?\s*(.+)/,I=t.picturefillCFG,M="font-size:100%!important;",T=!0,z={},B={},F=t.devicePixelRatio,H={px:1,in:96},O=e.createElement("a"),j=!1,R=/^[ \t\n\r\u000c]+/,W=/^[, \t\n\r\u000c]+/,U=/^[^ \t\n\r\u000c]+/,q=/[,]+$/,V=/^\d+$/,G=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,K=function(t,e,i,n){t.addEventListener?t.addEventListener(e,i,n||!1):t.attachEvent&&t.attachEvent("on"+e,i)},Q=function(t){var e={};return function(i){return i in e||(e[i]=t(i)),e[i]}},X=function(){var t=/^([\d\.]+)(em|vw|px)$/,e=function(){for(var t=arguments,e=0,i=t[0];++e in t;)i=i.replace(t[e],t[++e]);return i},i=Q(function(t){return"return "+e((t||"").toLowerCase(),/\band\b/g,"&&",/,/g,"||",/min-([a-z-\s]+):/g,"e.$1>=",/max-([a-z-\s]+):/g,"e.$1<=",/calc([^)]+)/g,"($1)",/(\d+[\.]*[\d]*)([a-z]+)/g,"($1 * e.$2)",/^(?!(e.[a-z]|[0-9\.&=|><\+\-\*\(\)\/])).*/gi,"")+";"});return function(e,n){var s;if(!(e in z))if(z[e]=!1,n&&(s=e.match(t)))z[e]=s[1]*H[s[2]];else try{z[e]=new Function("e",i(e))(H)}catch(t){}return z[e]}}(),J=function(t,e){return t.w?(t.cWidth=m.calcListLength(e||"100vw"),t.res=t.w/t.cWidth):t.res=t.d,t},Y=function(t){if(v){var i,n,s,r=t||{};if(r.elements&&1===r.elements.nodeType&&("IMG"===r.elements.nodeName.toUpperCase()?r.elements=[r.elements]:(r.context=r.elements,r.elements=null)),i=r.elements||m.qsa(r.context||e,r.reevaluate||r.reselect?m.sel:m.selShort),s=i.length){for(m.setupRun(r),j=!0,n=0;s>n;n++)m.fillImg(i[n],r);m.teardownRun(r)}}};t.console&&console.warn,L in b||(L="src"),x["image/jpeg"]=!0,x["image/gif"]=!0,x["image/png"]=!0,x["image/svg+xml"]=e.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"),m.ns=("pf"+(new Date).getTime()).substr(0,9),m.supSrcset="srcset"in b,m.supSizes="sizes"in b,m.supPicture=!!t.HTMLPictureElement,m.supSrcset&&m.supPicture&&!m.supSizes&&function(t){b.srcset="data:,a",t.src="data:,a",m.supSrcset=b.complete===t.complete,m.supPicture=m.supSrcset&&m.supPicture}(e.createElement("img")),m.supSrcset&&!m.supSizes?function(){var t="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",i=e.createElement("img"),n=function(){2===i.width&&(m.supSizes=!0),f=m.supSrcset&&!m.supSizes,v=!0,setTimeout(Y)};i.onload=n,i.onerror=n,i.setAttribute("sizes","9px"),i.srcset=t+" 1w,data:image/gif;base64,R0lGODlhAgABAPAAAP///wAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw== 9w",i.src=t}():v=!0,m.selShort="picture>img,img[srcset]",m.sel=m.selShort,m.cfg=C,m.DPR=F||1,m.u=H,m.types=x,m.setSize=y,m.makeUrl=Q(function(t){return O.href=t,O.href}),m.qsa=function(t,e){return"querySelector"in t?t.querySelectorAll(e):[]},m.matchesMedia=function(){return t.matchMedia&&(matchMedia("(min-width: 0.1em)")||{}).matches?m.matchesMedia=function(t){return!t||matchMedia(t).matches}:m.matchesMedia=m.mMQ,m.matchesMedia.apply(this,arguments)},m.mMQ=function(t){return!t||X(t)},m.calcLength=function(t){var e=X(t,!0)||!1;return 0>e&&(e=!1),e},m.supportsType=function(t){return!t||x[t]},m.parseSize=Q(function(t){var e=(t||"").match(N);return{media:e&&e[1],length:e&&e[2]}}),m.parseSet=function(t){return t.cands||(t.cands=u(t.srcset,t)),t.cands},m.getEmValue=function(){var t;if(!p&&(t=e.body)){var i=e.createElement("div"),n=S.style.cssText,s=t.style.cssText;i.style.cssText="position:absolute;left:0;visibility:hidden;display:block;padding:0;border:none;font-size:1em;width:1em;overflow:hidden;clip:rect(0px, 0px, 0px, 0px)",S.style.cssText=M,t.style.cssText=M,t.appendChild(i),p=i.offsetWidth,t.removeChild(i),p=parseFloat(p,10),S.style.cssText=n,t.style.cssText=s}return p||16},m.calcListLength=function(t){if(!(t in B)||C.uT){var e=m.calcLength(d(t));B[t]=e||H.width}return B[t]},m.setRes=function(t){var e;if(t){e=m.parseSet(t);for(var i=0,n=e.length;n>i;i++)J(e[i],t.sizes)}return e},m.setRes.res=J,m.applySetCandidate=function(t,e){if(t.length){var i,n,s,o,c,h,u,d,p,f=e[m.ns],g=m.DPR;if(h=f.curSrc||e[L],u=f.curCan||l(e,h,t[0].set),u&&u.set===t[0].set&&((p=$&&!e.complete&&u.res-.1>g)||(u.cached=!0,u.res>=g&&(c=u))),!c)for(t.sort(a),o=t.length,c=t[o-1],n=0;o>n;n++)if(i=t[n],i.res>=g){s=n-1,c=t[s]&&(p||h!==m.makeUrl(i.url))&&r(t[s].res,i.res,g,t[s].cached)?t[s]:i;break}c&&(d=m.makeUrl(c.url),f.curSrc=d,f.curCan=c,d!==h&&m.setSrc(e,c),m.setSize(e))}},m.setSrc=function(t,e){var i;t.src=e.url,"image/svg+xml"===e.set.type&&(i=t.style.width,t.style.width=t.offsetWidth+1+"px",t.offsetWidth+1&&(t.style.width=i))},m.getSet=function(t){var e,i,n,s=!1,r=t[m.ns].sets;for(e=0;er?i=setTimeout(s,e-r):(i=null,t())};return function(){n=new Date,i||(i=setTimeout(s,e))}}(a,99)),K(e,"readystatechange",s)}(),m.picturefill=Y,m.fillImgs=Y,m.teardownRun=y,Y._=m,t.picturefillCFG={pf:m,push:function(t){var e=t.shift();"function"==typeof m[e]?m[e].apply(m,t):(C[e]=t[0],j&&m.fillImgs({reselect:!0}))}};for(;I&&I.length;)t.picturefillCFG.push(I.shift());t.picturefill=Y,"object"==typeof module&&"object"==typeof module.exports?module.exports=Y:"function"==typeof define&&define.amd&&define("picturefill",function(){return Y}),m.supPicture||(x["image/webp"]=function(e,i){var n=new t.Image;return n.onerror=function(){x[e]=!1,Y()},n.onload=function(){x[e]=1===n.width,Y()},n.src=i,"pending"}("image/webp","data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA=="))}(window,document),function(t,e,i){"undefined"!=typeof module&&module.exports?module.exports=i():t.verge=i()}(this,0,function(){function t(){return{width:h(),height:u()}}function e(t,e){var i={};return e=+e||0,i.width=(i.right=t.right+e)-(i.left=t.left-e),i.height=(i.bottom=t.bottom+e)-(i.top=t.top-e),i}function i(t,i){return!(!(t=t&&!t.nodeType?t[0]:t)||1!==t.nodeType)&&e(t.getBoundingClientRect(),i)}function n(e){e=null==e?t():1===e.nodeType?i(e):e;var n=e.height,s=e.width;return n="function"==typeof n?n.call(e):n,(s="function"==typeof s?s.call(e):s)/n}var s={},r="undefined"!=typeof window&&window,o="undefined"!=typeof document&&document,a=o&&o.documentElement,l=r.matchMedia||r.msMatchMedia,c=l?function(t){return!!l.call(r,t).matches}:function(){return!1},h=s.viewportW=function(){var t=a.clientWidth,e=r.innerWidth;return t=0&&n.left<=h()},s.inY=function(t,e){var n=i(t,e);return!!n&&n.bottom>=0&&n.top<=u()},s.inViewport=function(t,e){var n=i(t,e);return!!n&&n.bottom>=0&&n.right>=0&&n.top<=u()&&n.left<=h()},s}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t(require("jquery")):t(jQuery)}(function(t){function e(){var e,i,n={height:c.innerHeight,width:c.innerWidth};return n.height||!(e=l.compatMode)&&t.support.boxModel||(i="CSS1Compat"===e?h:l.body,n={height:i.clientHeight,width:i.clientWidth}),n}function i(){return{top:c.pageYOffset||h.scrollTop||l.body.scrollTop,left:c.pageXOffset||h.scrollLeft||l.body.scrollLeft}}function n(){if(a.length){var n=0,o=t.map(a,function(t){var e=t.data.selector,i=t.$element;return e?i.find(e):i});for(s=s||e(),r=r||i();nr.top&&u.topr.left&&u.left= 2.0.0-beta.1",7:">= 4.0.0"};e.REVISION_CHANGES=d;n.prototype={constructor:n,logger:u.default,log:u.default.log,registerHelper:function(t,e){if("[object Object]"===r.toString.call(t)){if(e)throw new a.default("Arg not supported with multiple helpers");r.extend(this.helpers,t)}else this.helpers[t]=e},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,e){if("[object Object]"===r.toString.call(t))r.extend(this.partials,t);else{if(void 0===e)throw new a.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=e}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,e){if("[object Object]"===r.toString.call(t)){if(e)throw new a.default("Arg not supported with multiple decorators");r.extend(this.decorators,t)}else this.decorators[t]=e},unregisterDecorator:function(t){delete this.decorators[t]}};var p=u.default.log;e.log=p,e.createFrame=r.createFrame,e.logger=u.default},function(t,e){"use strict";function i(t){return h[t]}function n(t){for(var e=1;e":">",'"':""","'":"'","`":"`","=":"="},u=/[&<>"'`=]/g,d=/[&<>"'`=]/,p=Object.prototype.toString;e.toString=p;var f=function(t){return"function"==typeof t};f(/x/)&&(e.isFunction=f=function(t){return"function"==typeof t&&"[object Function]"===p.call(t)}),e.isFunction=f;var g=Array.isArray||function(t){return!(!t||"object"!=typeof t)&&"[object Array]"===p.call(t)};e.isArray=g},function(t,e,i){"use strict";function n(t,e){var i=e&&e.loc,o=void 0,a=void 0;i&&(o=i.start.line,a=i.start.column,t+=" - "+o+":"+a);for(var l=Error.prototype.constructor.call(this,t),c=0;c0?(i.ids&&(i.ids=[i.name]),t.helpers.each(e,i)):s(this);if(i.data&&i.ids){var o=n.createFrame(i.data);o.contextPath=n.appendContextPath(i.data.contextPath,i.name),i={data:o}}return r(e,i)})},t.exports=e.default},function(t,e,i){"use strict";var n=i(1).default;e.__esModule=!0;var s=i(5),r=i(6),o=n(r);e.default=function(t){t.registerHelper("each",function(t,e){function i(e,i,r){c&&(c.key=e,c.index=i,c.first=0===i,c.last=!!r,h&&(c.contextPath=h+e)),l+=n(t[e],{data:c,blockParams:s.blockParams([t[e],e],[h+e,null])})}if(!e)throw new o.default("Must pass iterator to #each");var n=e.fn,r=e.inverse,a=0,l="",c=void 0,h=void 0;if(e.data&&e.ids&&(h=s.appendContextPath(e.data.contextPath,e.ids[0])+"."),s.isFunction(t)&&(t=t.call(this)),e.data&&(c=s.createFrame(e.data)),t&&"object"==typeof t)if(s.isArray(t))for(var u=t.length;a=0?e:parseInt(t,10)}return t},log:function(t){if(t=s.lookupLevel(t),"undefined"!=typeof console&&s.lookupLevel(s.level)<=t){var e=s.methodMap[t];console[e]||(e="log");for(var i=arguments.length,n=Array(i>1?i-1:0),r=1;r2&&w.push("'"+this.terminals_[v]+"'");_=this.lexer.showPosition?"Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[d]||d)+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==d?"end of input":"'"+(this.terminals_[d]||d)+"'"),this.parseError(_,{text:this.lexer.match,token:this.terminals_[d]||d,line:this.lexer.yylineno,loc:h,expected:w})}}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+f+", token: "+d);switch(g[0]){case 1:i.push(d),n.push(this.lexer.yytext),s.push(this.lexer.yylloc),i.push(g[1]),d=null,p?(d=p,p=null):(l=this.lexer.yyleng,o=this.lexer.yytext,a=this.lexer.yylineno,h=this.lexer.yylloc,c>0&&c--);break;case 2:if(y=this.productions_[g[1]][1],k.$=n[n.length-y],k._$={first_line:s[s.length-(y||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(y||1)].first_column,last_column:s[s.length-1].last_column},u&&(k._$.range=[s[s.length-(y||1)].range[0],s[s.length-1].range[1]]),void 0!==(m=this.performAction.call(k,o,l,a,this.yy,g[1],n,s)))return m;y&&(i=i.slice(0,-1*y*2),n=n.slice(0,-1*y),s=s.slice(0,-1*y)),i.push(this.productions_[g[1]][0]),n.push(k.$),s.push(k._$),b=r[i[i.length-2]][i[i.length-1]],i.push(b);break;case 3:return!0}}return!0}},i=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t){return this._input=t,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e-1),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this},more:function(){return this._more=!0,this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,i,n,s;this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),o=0;oe[0].length)||(e=i,n=o,this.options.flex));o++);return e?(s=e[0].match(/(?:\r\n?|\n).*/g),s&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],t=this.performAction.call(this,this.yy,this,r[n],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t||void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return void 0!==t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)}};return t.options={},t.performAction=function(t,e,i,n){function s(t,i){return e.yytext=e.yytext.substr(t,e.yyleng-i)}switch(i){case 0:if("\\\\"===e.yytext.slice(-2)?(s(0,1),this.begin("mu")):"\\"===e.yytext.slice(-1)?(s(0,1),this.begin("emu")):this.begin("mu"),e.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(e.yytext=e.yytext.substr(5,e.yyleng-9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(e.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return e.yytext=s(1,2).replace(/\\"/g,'"'),80;case 32:return e.yytext=s(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return e.yytext=e.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},t.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],t.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},t}();return e.lexer=i,t.prototype=e,e.Parser=t,new t}();e.default=i,t.exports=e.default},function(t,e,i){"use strict";function n(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=t}function s(t,e,i){void 0===e&&(e=t.length);var n=t[e-1],s=t[e-2];return n?"ContentStatement"===n.type?(s||!i?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original):void 0:i}function r(t,e,i){void 0===e&&(e=-1);var n=t[e+1],s=t[e+2];return n?"ContentStatement"===n.type?(s||!i?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original):void 0:i}function o(t,e,i){var n=t[null==e?0:e+1];if(n&&"ContentStatement"===n.type&&(i||!n.rightStripped)){var s=n.value;n.value=n.value.replace(i?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==s}}function a(t,e,i){var n=t[null==e?t.length-1:e-1];if(n&&"ContentStatement"===n.type&&(i||!n.leftStripped)){var s=n.value;return n.value=n.value.replace(i?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==s,n.leftStripped}}var l=i(1).default;e.__esModule=!0;var c=i(39),h=l(c);n.prototype=new h.default,n.prototype.Program=function(t){var e=!this.options.ignoreStandalone,i=!this.isRootSeen;this.isRootSeen=!0;for(var n=t.body,l=0,c=n.length;l0)throw new m.default("Invalid path: "+n,{loc:i});".."===c&&(r++,o+="../")}}return{type:"PathExpression",data:t,depth:r,parts:s,original:n,loc:i}}function c(t,e,i,n,s,r){var o=n.charAt(3)||n.charAt(2),a="{"!==o&&"&"!==o;return{type:/\*/.test(n)?"Decorator":"MustacheStatement",path:t,params:e,hash:i,escaped:a,strip:s,loc:this.locInfo(r)}}function h(t,e,i,s){n(t,i),s=this.locInfo(s);var r={type:"Program",body:e,strip:{},loc:s};return{type:"BlockStatement",path:t.path,
params:t.params,hash:t.hash,program:r,openStrip:{},inverseStrip:{},closeStrip:{},loc:s}}function u(t,e,i,s,r,o){s&&s.path&&n(t,s);var a=/\*/.test(t.open);e.blockParams=t.blockParams;var l=void 0,c=void 0;if(i){if(a)throw new m.default("Unexpected inverse block on decorator",i);i.chain&&(i.program.body[0].closeStrip=s.strip),c=i.strip,l=i.program}return r&&(r=l,l=e,e=r),{type:a?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:l,openStrip:t.strip,inverseStrip:c,closeStrip:s&&s.strip,loc:this.locInfo(o)}}function d(t,e){if(!e&&t.length){var i=t[0].loc,n=t[t.length-1].loc;i&&n&&(e={source:i.source,start:{line:i.start.line,column:i.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function p(t,e,i,s){return n(t,i),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:i&&i.strip,loc:this.locInfo(s)}}var f=i(1).default;e.__esModule=!0,e.SourceLocation=s,e.id=r,e.stripFlags=o,e.stripComment=a,e.preparePath=l,e.prepareMustache=c,e.prepareRawBlock=h,e.prepareBlock=u,e.prepareProgram=d,e.preparePartialBlock=p;var g=i(6),m=f(g)},function(t,e,i){"use strict";function n(){}function s(t,e,i){if(null==t||"string"!=typeof t&&"Program"!==t.type)throw new h.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var n=i.parse(t,e),s=(new i.Compiler).compile(n,e);return(new i.JavaScriptCompiler).compile(s,e)}function r(t,e,i){function n(){var n=i.parse(t,e),s=(new i.Compiler).compile(n,e),r=(new i.JavaScriptCompiler).compile(s,e,void 0,!0);return i.template(r)}function s(t,e){return r||(r=n()),r.call(this,t,e)}if(void 0===e&&(e={}),null==t||"string"!=typeof t&&"Program"!==t.type)throw new h.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=u.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var r=void 0;return s._setup=function(t){return r||(r=n()),r._setup(t)},s._child=function(t,e,i,s){return r||(r=n()),r._child(t,e,i,s)},s}function o(t,e){if(t===e)return!0;if(u.isArray(t)&&u.isArray(e)&&t.length===e.length){for(var i=0;i1)throw new h.default("Unsupported number of partial arguments: "+i.length,t);i.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):i.push({type:"PathExpression",parts:[],depth:0}));var n=t.name.original,s="SubExpression"===t.name.type;s&&this.accept(t.name),this.setupFullMustacheParams(t,e,void 0,!0);var r=t.indent||"";this.options.preventIndent&&r&&(this.opcode("appendContent",r),r=""),this.opcode("invokePartial",s,n,r),this.opcode("append")},PartialBlockStatement:function(t){this.PartialStatement(t)},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(t){this.DecoratorBlock(t)},ContentStatement:function(t){t.value&&this.opcode("appendContent",t.value)},CommentStatement:function(){},SubExpression:function(t){a(t);var e=this.classifySexpr(t);"simple"===e?this.simpleSexpr(t):"helper"===e?this.helperSexpr(t):this.ambiguousSexpr(t)},ambiguousSexpr:function(t,e,i){var n=t.path,s=n.parts[0],r=null!=e||null!=i;this.opcode("getContext",n.depth),this.opcode("pushProgram",e),this.opcode("pushProgram",i),n.strict=!0,this.accept(n),this.opcode("invokeAmbiguous",s,r)},simpleSexpr:function(t){var e=t.path;e.strict=!0,this.accept(e),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,e,i){var n=this.setupFullMustacheParams(t,e,i),s=t.path,r=s.parts[0];if(this.options.knownHelpers[r])this.opcode("invokeKnownHelper",n.length,r);else{if(this.options.knownHelpersOnly)throw new h.default("You specified knownHelpersOnly, but used the unknown helper "+r,t);s.strict=!0,s.falsy=!0,this.accept(s),this.opcode("invokeHelper",n.length,s.original,p.default.helpers.simpleId(s))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var e=t.parts[0],i=p.default.helpers.scopedId(t),n=!t.depth&&!i&&this.blockParamIndex(e);n?this.opcode("lookupBlockParam",n,t.parts):e?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,i):this.opcode("pushContext")},StringLiteral:function(t){this.opcode("pushString",t.value)},NumberLiteral:function(t){this.opcode("pushLiteral",t.value)},BooleanLiteral:function(t){this.opcode("pushLiteral",t.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(t){var e=t.pairs,i=0,n=e.length;for(this.opcode("pushHash");i=0)return[e,s]}}}},function(t,e,i){"use strict";function n(t){this.value=t}function s(){}function r(t,e,i,n){var s=e.popStack(),r=0,o=i.length;for(t&&o--;r0&&(e+=", "+i.join(", "));var n=0;for(var s in this.aliases){var r=this.aliases[s];this.aliases.hasOwnProperty(s)&&r.children&&r.referenceCount>1&&(e+=", alias"+ ++n+"="+s,r.children[0]="alias"+n)}var o=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&o.push("blockParams"),this.useDepths&&o.push("depths");var a=this.mergeSource(e);return t?(o.push(a),Function.apply(this,o)):this.source.wrap(["function(",o.join(","),") {\n ",a,"}"])},mergeSource:function(t){var e=this.environment.isSimple,i=!this.forceBuffer,n=void 0,s=void 0,r=void 0,o=void 0;return this.source.each(function(t){t.appendToBuffer?(r?t.prepend(" + "):r=t,o=t):(r&&(s?r.prepend("buffer += "):n=!0,o.add(";"),r=o=void 0),s=!0,e||(i=!1))}),i?r?(r.prepend("return "),o.add(";")):s||this.source.push('return "";'):(t+=", buffer = "+(n?"":this.initializeBuffer()),r?(r.prepend("return buffer + "),o.add(";")):this.source.push("return buffer;")),t&&this.source.prepend("var "+t.substring(2)+(n?"":";\n")),this.source.merge()},blockValue:function(t){var e=this.aliasable("helpers.blockHelperMissing"),i=[this.contextName(0)];this.setupHelperArgs(t,0,i);var n=this.popStack();i.splice(1,0,n),this.push(this.source.functionCall(e,"call",i))},ambiguousBlockValue:function(){var t=this.aliasable("helpers.blockHelperMissing"),e=[this.contextName(0)];this.setupHelperArgs("",0,e,!0),this.flushInline();var i=this.topStack();e.splice(1,0,i),this.pushSource(["if (!",this.lastHelper,") { ",i," = ",this.source.functionCall(t,"call",e),"}"])},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t},append:function(){if(this.isInline())this.replaceStack(function(t){return[" != null ? ",t,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(t){this.lastContext=t},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(t,e,i,n){var s=0;n||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(t[s++])),this.resolvePath("context",t,s,e,i)},lookupBlockParam:function(t,e){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",e,1)},lookupData:function(t,e,i){t?this.pushStackLiteral("container.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",e,0,!0,i)},resolvePath:function(t,e,i,n,s){var o=this;if(this.options.strict||this.options.assumeObjects)return void this.push(r(this.options.strict&&s,this,e,t));for(var a=e.length;ithis.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var t=this.inlineStack;this.inlineStack=[];for(var e=0,i=t.length;e'+t+""):void e.append(''+t+"")})}}(),$("table:not(.calendar)").each(function(){var t=$(this);t.wrap('').wrap('');var e=t.closest(".table__wrapper"),i=e.parents(".table__wrapper").length;t.outerWidth()>e.outerWidth()&&!i&&e.addClass("table__wrapper--scroll"),$window.on("resize orientationchange",debounce(function(){t.outerWidth()>e.outerWidth()&&!i?e.addClass("table__wrapper--scroll"):e.removeClass("table__wrapper--scroll")},100))}),function(){"use strict";$siteSearchField.length&&$siteSearchField.on("keydown",function(t){9===t.keyCode&&t.shiftKey&&$body.find(".tt-dropdown-menu").hide()});var t=$body.find(".search-results__sort-by");if(t.length){positionFunnelbackSortFilter();var e=t.find(".list__link"),i=t.find(".button[data-a11y-toggle]");e.click(function(){var t=$(this);e.removeClass("is-active").removeAttr("tabindex"),t.addClass("is-active").attr("tabindex","-1")}),e.last().on("keydown",function(t){var e=$(this);9!==t.keyCode||t.shiftKey||(e.closest(".list").attr("aria-hidden","true"),i.attr("aria-expanded","false"))}),i.on("keydown",function(e){9===e.keyCode&&e.shiftKey&&(i.attr("aria-expanded","false"),t.find(".list").attr("aria-hidden","true"))})}}(),function(t){function e(){if(!(windowWidthi.top?($this.remove(),e=!1):$mainNavigationDropdown.find(".list__item:nth-child("+n+")").addClass("is-featured"):$this.remove()}),$mainNavigationFeaturedMenuList.find(".list__item--dropdown-button").appendTo($mainNavigationFeaturedMenuList)}}function i(){if($categoryNavigation.removeClass("category-navigation--loading"),$categoryNavigation.length){var t;$categoryNavigationToggleButton.click(function(){clearTimeout(t),$categoryNavigationList.addClass("is-animating"),"false"===$categoryNavigationToggleButton.attr("aria-expanded")?($categoryNavigationList.css("max-height",$categoryNavigationListHeight),t=setTimeout(function(){$categoryNavigationList.removeClass("is-animating")},10)):($categoryNavigationList.removeAttr("style"),t=setTimeout(function(){$categoryNavigationList.removeClass("is-animating")},700))})}}function n(){var t=window.location.protocol;if(-1!=navigator.userAgent.indexOf("MSIE")&&"https:"==t)return void alert("You are viewing a secure website. We do not currently support BrowseAloud services on secure sites.");null===r&&(r=document.getElementsByTagName("body")[0].appendChild(document.createElement("script")),r.src=t+"//babm.texthelp.com/Bookmarklet.ashx?l=uk")}function s(t){if($browseAloudButton.length){if(void 0!==t.currentSrc)var e=t.currentSrc.indexOf("https://plus.browsealoud.com/"),i=t.currentSrc.indexOf("/images/close-toolbar.svg");(void 0!==t.currentSrc&&-1!==e&&-1!==i||"ba-close-toolbar"===t.id)&&$browseAloudButton.attr("aria-expanded","false").focus()}}var r=null;$document.ready(function(){if(initXFP(),$document.click(function(t){hideFunnelbackDropdownOnClickOutside(t),s(t.target)}),$mainNavigationToggle.click(function(){windowWidth>=breakpointSmallWidth&&("true"===$mainNavigationDropdown.attr("aria-hidden")?$mainNavigationDropdown.css("max-height",$mainNavigationDropdownHeight):$mainNavigationDropdown.removeAttr("style"))}),$siteHeaderMenuToggle.add($mainNavigationToggle).click(function(){clearTimeout(mobileNavigationToggleAnimating),$body.toggleClass("navigation-open navigation-animating"),"false"===$siteHeaderMenuToggle.attr("aria-expanded")?($mainNavigationToggleText.text("Less"),mobileNavigationToggleAnimating=setTimeout(function(){$body.removeClass("navigation-animating")},10)):($body.removeClass("navigation-open"),$mainNavigationToggleText.text("More"),mobileNavigationToggleAnimating=setTimeout(function(){$body.removeClass("navigation-animating")},400))}),$browseAloudButton.length&&$browseAloudButton.click(function(t){if("true"===$browseAloudButton.attr("aria-expanded"))$browseAloudButton.attr("aria-expanded","false");else{$body.find("#__ba_panel .__ba_hidden").length?$browseAloudButton.attr("aria-expanded","false"):(n(),$browseAloudButton.attr("aria-expanded","true"))}"undefined"!=typeof BrowseAloud&&BrowseAloud.panel.toggleBar(!0,t)}),$alerts.length&&$alerts.each(function(){var e=t(this),i=e.find(".alert__button-list");i.length&&e.add(i).matchHeight()}),$formCheckboxToggle.length&&$formCheckboxToggle.each(function(){var e,i=t(this),n=i.next(".form__label--checkbox-toggle");i.on("change",function(){clearTimeout(e),n.addClass("is-animating"),e=setTimeout(function(){n.removeClass("is-animating")},400)}),n.on("mousedown touchend",function(){n.addClass("hide-focus")}),$form.on("keydown",function(){n.removeClass("hide-focus")})}),$boxedToggle.each(function(e){boxedToggle(t(this))}),windowWidth<=breakpointMidWidth&&$pagesInToggle.each(function(e){boxedToggle(t(this),6,pagesInToggleHeight)}),$listing.length){$listing.find(".listing__article").each(function(e){var i=t(this);i.one("inview",function(){setTimeout(function(){i.removeClass("listing__article--loading")},200),setTimeout(function(){i.removeClass("listing__article--loading-animation")},900)})})}if($categoryNavigationToggleButton.add($formSelect).on("mousedown touchend",function(){t(this).addClass("hide-focus")}),$categoryNavigationToggleButton.add($formSelect).on("blur",function(){t(this).removeClass("hide-focus")}),t("[data-matchHeight]").each(function(){var e=t(this),i=e.attr("data-matchHeight");e.find(i).matchHeight()}),$imageWrapper.one("inview",function(){setTimeout(function(){$imageWrapper.removeClass("image__wrapper--loading")},200)}),$widgetFeaturedNews.length){var e,i=$widgetFeaturedNews.find(".featured-news__button-wrapper .button");$widgetFeaturedNews.one("inview",function(){setTimeout(function(){$widgetFeaturedNews.removeClass("featured-news--loading")},200),setTimeout(function(){$widgetFeaturedNews.removeClass("featured-news--loading-animation")},900)}),$widgetFeaturedNewsMoreItems.removeClass("is-loading"),i.click(function(){var i=t(this),n=i.find(".button__text");clearTimeout(e),$widgetFeaturedNewsMoreItems.addClass("is-animating"),"false"===i.attr("aria-expanded")?(n.html('Show less news'),e=setTimeout(function(){$widgetFeaturedNewsMoreItems.css("max-height",$widgetFeaturedNewsMoreItemsHeight),$widgetFeaturedNewsMoreItems.removeClass("is-animating")},100)):(n.html('Show more news articles'),$widgetFeaturedNewsMoreItems.css("max-height",0),e=setTimeout(function(){$widgetFeaturedNewsMoreItems.removeClass("is-animating")},800))}),i.on("keydown",function(t){13==t.keyCode&&$html.add($body).animate({scrollTop:i.offset().top-space},1e3)})}$widgetPopularPagesNav.length&&$widgetPopularPagesNav.each(function(){var e=t(this),i=e.prop("scrollHeight"),n=e.find(".popular-pages__list--dropdown"),s=e.find(".popular-pages__button-wrapper .button");if(n.length){var r;n.attr("aria-hidden","true");var o=e.outerHeight(!0);e.css("max-height",o),s.click(function(){var s=t(this),a=s.find(".button__text");clearTimeout(r),e.addClass("is-animating"),s.removeClass("tab-jump"),"false"===s.attr("aria-expanded")?(n.attr("aria-hidden","false"),e.css("max-height",i),s.attr("aria-expanded","true"),a.html('Show less navigation links'),r=setTimeout(function(){e.removeClass("is-animating")},100)):(n.attr("aria-hidden","true"),e.css("max-height",o),s.attr("aria-expanded","false"),a.html('Show more navigation links'),r=setTimeout(function(){e.removeClass("is-animating")},800))}),s.on("keydown",function(e){9===e.keyCode&&($this=t(this),e.shiftKey||"true"!==$this.attr("aria-expanded")||$this.hasClass("tab-jump")||(e.preventDefault(),$this.addClass("tab-jump"),n.find(".list__item:first-child .list__link").focus())),13==e.keyCode&&$html.add($body).animate({scrollTop:$widgetPopularPagesNav.offset().top-space},1e3)})}}),$widgetLatestTweets.length&&($widgetLatestTweetsCarousel=$widgetLatestTweets.find(".latest-tweets__carousel"),$carouselCount=$widgetLatestTweetsCarousel.find(".carousel__slide").length,$carouselCount>1&&($widgetLatestTweetsCarousel.flickity({autoPlay:5e3,cellalign:"left",cellSelector:".carousel__slide",dots:!0,draggable:!1,prevNextButtons:!1,wrapAround:!0}),$widgetLatestTweetsCarousel.each(function(){$this=t(this);var e=($this.data("flickity"),$this.find("a")),i=$this.find(".flickity-slider"),n=$this.closest(".latest-tweets__inner");$this.on("focus",function(t){n.addClass("has-focus")}),$this.on("blur",function(t){n.removeClass("has-focus")}),e.on("focus",function(e){var n=t(this),s=n.closest(".carousel__slide");if($widgetLatestTweetsCarousel.flickity("stopPlayer"),i.addClass("has-focus"),!s.hasClass("is-selected")){var r=s.index();$widgetLatestTweetsCarousel.flickity("select",r,!1,!0)}}),e.first().on("keydown",function(t){9===t.keyCode&&t.shiftKey&&($widgetLatestTweetsCarousel.flickity("playPlayer"),i.removeClass("has-focus"))}),e.last().on("keydown",function(t){9===t.keyCode&&(t.shiftKey||($widgetLatestTweetsCarousel.flickity("playPlayer"),i.removeClass("has-focus")))}),e.on("blur",function(t){i.removeClass("has-focus")})}))),$flickityCarousel.length&&$flickityCarousel.flickity({autoPlay:5e3,accessibility:!1,adaptiveHeight:!0,cellalign:"left",cellSelector:".slide",draggable:!1,pageDots:!1,wrapAround:!0}),initCookieBanner()}),window.addEventListener("load",function(){if(e(),i(),initMaps(),initMultichannelAutocomplete(),typeaheadAddLabelsToHintFields(),$widgetColourBlocks.length){$widgetColourBlocks.find(".colour-block__image");$widgetColourBlocks.one("inview",function(){setTimeout(function(){$widgetColourBlocks.removeClass("colour-blocks--loading")},200),setTimeout(function(){$widgetColourBlocks.removeClass("colour-blocks--loading-animation")},900)})}$materializeFormFields.length&&$materializeFormFields.each(function(){var e=t(this);checkFieldEmpty(e),materializeUpdateLabelPaddingHeight(e)}),$flickityCarousel.length&&$flickityCarousel.flickity("resize")}),$window.resize(debounce(function(){if($window.width()!=windowWidth){if(windowWidth=$window.width(),windowHeight=$window.height(),e(),cookieBannerSetHeight(),$categoryNavigation.length&&"false"===$categoryNavigationList.attr("aria-hidden")&&$categoryNavigationList.css("max-height",$categoryNavigationList.prop("scrollHeight")),windowWidth>=breakpointSmallWidth&&("false"===$mainNavigationDropdown.attr("aria-hidden")?$mainNavigationDropdown.css("max-height",$categoryNavigationList.prop("scrollHeight")):($mainNavigationDropdown.removeAttr("style"),$mainNavigationDropdown.attr("aria-hidden","false"),$mainNavigationDropdownHeight=$mainNavigationDropdown.prop("scrollHeight"),$mainNavigationDropdown.css("max-height",$categoryNavigationList.prop("scrollHeight")),$mainNavigationDropdown.attr("aria-hidden","true"))),$boxedToggle.length&&$boxedToggle.each(function(e){var i=t(this),n=i.prev(".list");n.hasClass("is-open")?n.css("max-height",n.prop("scrollHeight")):(n.removeAttr("style"),setTimeout(function(){n.css("max-height",n.height())},600))}),$pagesInToggle.length){var i=$pagesInToggle.prev(".list");i.removeAttr("style").removeClass("is-open needs-scrollbar"),i.find(".list__item").removeAttr("aria-hidden"),$pagesInToggle.unbind(),windowWidth<=breakpointMidWidth?$pagesInToggle.each(function(){var e=t(this);e.unbind().attr("aria-expanded","false"),e.html(e.data("open-text")),boxedToggle(e,6,pagesInToggleHeight)}):(i.removeAttr("style").removeClass("is-open needs-scrollbar"),i.find(".list__item").removeAttr("aria-hidden"))}$widgetFeaturedNewsMoreItems.length&&($widgetFeaturedNewsMoreItems.addClass("is-loading"),$widgetFeaturedNewsMoreItemsHeight=$widgetFeaturedNewsMoreItems.prop("scrollHeight"),"false"===$widgetFeaturedNewsMoreItems.attr("aria-hidden")&&$widgetFeaturedNewsMoreItems.css("max-height",$widgetFeaturedNewsMoreItemsHeight),setTimeout(function(){$widgetFeaturedNewsMoreItems.removeClass("is-loading")},600)),$widgetPopularPagesNav.length&&$widgetPopularPagesNav.each(function(){var e=t(this),i=e.find(".popular-pages__list--dropdown");if(i.length){var n=e.prop("scrollHeight");e.removeAttr("style"),"true"===i.attr("aria-hidden")&&i.removeAttr("aria-hidden"),popularPagesMinHeight=n-i.prop("scrollHeight"),"false"===i.attr("aria-hidden")?e.css("max-height",n):(i.attr("aria-hidden","true"),e.css("min-height",popularPagesMinHeight))}}),$materializeFormFields.length&&$materializeFormFields.each(function(){materializeUpdateLabelPaddingHeight(t(this))}),positionFunnelbackSortFilter()}},100))}(jQuery);