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Aa6W,KACpCtK,EACAnN,KAAKuR,SACN,GAGP,EC1CU,EAAQ,KAWlBlN,OAAOkT,IAAM,IAAIA,C,ICpBnB,EAAQ,IAAR,CAAyB,CAAC,E","sources":["webpack://chow/./node_modules/svg4everybody/dist/svg4everybody.js","webpack://chow/webpack/bootstrap","webpack://chow/webpack/runtime/make namespace object","webpack://chow/./src/js/Constants/aria.js","webpack://chow/./src/js/Constants/class-names.js","webpack://chow/./src/js/Constants/events.js","webpack://chow/./src/js/Constants/key-codes.js","webpack://chow/./src/js/Constants/selectors.js","webpack://chow/./src/js/Utils/messagebus.js","webpack://chow/./src/js/components/views/Modal.js","webpack://chow/./src/js/ComponentMap.js","webpack://chow/./src/js/components/views/Accordion.js","webpack://chow/./src/js/components/views/Gallery.js","webpack://chow/./src/js/components/views/Header.js","webpack://chow/./src/js/components/views/ShowMore.js","webpack://chow/./src/js/components/views/SponsorScroll.js","webpack://chow/./src/js/components/views/VideoControl.js","webpack://chow/./src/js/Utils/debounce.js","webpack://chow/./src/js/components/services/ResizeService.js","webpack://chow/./src/js/components/services/ScrollService.js","webpack://chow/./src/js/components/services/index.js","webpack://chow/./src/js/App.js","webpack://chow/./src/js/index.js","webpack://chow/./node_modules/svg-spritemap-webpack-plugin/svg4everybody-helper.js"],"sourcesContent":["!function(root, factory) {\n \"function\" == typeof define && define.amd ? // AMD. Register as an anonymous module unless amdModuleId is set\n define([], function() {\n return root.svg4everybody = factory();\n }) : \"object\" == typeof module && module.exports ? // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory() : root.svg4everybody = factory();\n}(this, function() {\n /*! svg4everybody v2.1.9 | github.com/jonathantneal/svg4everybody */\n function embed(parent, svg, target) {\n // if the target exists\n if (target) {\n // create a document fragment to hold the contents of the target\n var fragment = document.createDocumentFragment(), viewBox = !svg.hasAttribute(\"viewBox\") && target.getAttribute(\"viewBox\");\n // conditionally set the viewBox on the svg\n viewBox && svg.setAttribute(\"viewBox\", viewBox);\n // copy the contents of the clone into the fragment\n for (// clone the target\n var clone = target.cloneNode(!0); clone.childNodes.length; ) {\n fragment.appendChild(clone.firstChild);\n }\n // append the fragment into the svg\n parent.appendChild(fragment);\n }\n }\n function loadreadystatechange(xhr) {\n // listen to changes in the request\n xhr.onreadystatechange = function() {\n // if the request is ready\n if (4 === xhr.readyState) {\n // get the cached html document\n var cachedDocument = xhr._cachedDocument;\n // ensure the cached html document based on the xhr response\n cachedDocument || (cachedDocument = xhr._cachedDocument = document.implementation.createHTMLDocument(\"\"), \n cachedDocument.body.innerHTML = xhr.responseText, xhr._cachedTarget = {}), // clear the xhr embeds list and embed each item\n xhr._embeds.splice(0).map(function(item) {\n // get the cached target\n var target = xhr._cachedTarget[item.id];\n // ensure the cached target\n target || (target = xhr._cachedTarget[item.id] = cachedDocument.getElementById(item.id)), \n // embed the target into the svg\n embed(item.parent, item.svg, target);\n });\n }\n }, // test the ready state change immediately\n xhr.onreadystatechange();\n }\n function svg4everybody(rawopts) {\n function oninterval() {\n // while the index exists in the live collection\n for (// get the cached index\n var index = 0; index < uses.length; ) {\n // get the current \n var use = uses[index], parent = use.parentNode, svg = getSVGAncestor(parent), src = use.getAttribute(\"xlink:href\") || use.getAttribute(\"href\");\n if (!src && opts.attributeName && (src = use.getAttribute(opts.attributeName)), \n svg && src) {\n if (polyfill) {\n if (!opts.validate || opts.validate(src, svg, use)) {\n // remove the element\n parent.removeChild(use);\n // parse the src and get the url and id\n var srcSplit = src.split(\"#\"), url = srcSplit.shift(), id = srcSplit.join(\"#\");\n // if the link is external\n if (url.length) {\n // get the cached xhr request\n var xhr = requests[url];\n // ensure the xhr request exists\n xhr || (xhr = requests[url] = new XMLHttpRequest(), xhr.open(\"GET\", url), xhr.send(), \n xhr._embeds = []), // add the svg and id as an item to the xhr embeds list\n xhr._embeds.push({\n parent: parent,\n svg: svg,\n id: id\n }), // prepare the xhr ready state change event\n loadreadystatechange(xhr);\n } else {\n // embed the local id into the svg\n embed(parent, svg, document.getElementById(id));\n }\n } else {\n // increase the index when the previous value was not \"valid\"\n ++index, ++numberOfSvgUseElementsToBypass;\n }\n }\n } else {\n // increase the index when the previous value was not \"valid\"\n ++index;\n }\n }\n // continue the interval\n (!uses.length || uses.length - numberOfSvgUseElementsToBypass > 0) && requestAnimationFrame(oninterval, 67);\n }\n var polyfill, opts = Object(rawopts), newerIEUA = /\\bTrident\\/[567]\\b|\\bMSIE (?:9|10)\\.0\\b/, webkitUA = /\\bAppleWebKit\\/(\\d+)\\b/, olderEdgeUA = /\\bEdge\\/12\\.(\\d+)\\b/, edgeUA = /\\bEdge\\/.(\\d+)\\b/, inIframe = window.top !== window.self;\n polyfill = \"polyfill\" in opts ? opts.polyfill : newerIEUA.test(navigator.userAgent) || (navigator.userAgent.match(olderEdgeUA) || [])[1] < 10547 || (navigator.userAgent.match(webkitUA) || [])[1] < 537 || edgeUA.test(navigator.userAgent) && inIframe;\n // create xhr requests object\n var requests = {}, requestAnimationFrame = window.requestAnimationFrame || setTimeout, uses = document.getElementsByTagName(\"use\"), numberOfSvgUseElementsToBypass = 0;\n // conditionally start the interval if the polyfill is active\n polyfill && oninterval();\n }\n function getSVGAncestor(node) {\n for (var svg = node; \"svg\" !== svg.nodeName.toLowerCase() && (svg = svg.parentNode); ) {}\n return svg;\n }\n return svg4everybody;\n});","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","//* ------------------------------------*\\\n// $ARIA STRINGS\n//* ------------------------------------*/\n\nconst ARIA = {\n EXPANDED: 'aria-expanded',\n HIDDEN: 'aria-hidden',\n SELECTED: 'aria-selected'\n};\n\nexport default ARIA;\n","//* ------------------------------------*\\\n// $CLASS NAMES - for class names\n// not CSS selectors\n//* ------------------------------------*/\n\nconst CLASS_NAMES = {\n ABOVE_BOTTOM: 'above-bottom',\n ABOVE_HALFWAY: 'above-halfway',\n ABOVE_VIEWPORT: 'above-viewport',\n ACTIVE: 'active',\n BELOW_BOTTOM: 'below-bottom',\n BELOW_HALFWAY: 'below-halfway',\n BELOW_VIEWPORT: 'below-viewport',\n BLINK: 'blink',\n ERROR: 'error',\n CLICK: 'click',\n CLOSED: 'closed',\n FADE: 'fade',\n FILTER_SELECTED: 'filter-selected',\n FIRST_BATCH: 'first-batch',\n FIXED: 'fixed',\n FILTERED: 'filtered',\n GALLERY_IMAGE_CONTAINER: 'gallery__image-container',\n HIDING: 'hiding',\n HIDDEN: 'hidden',\n HOVER: 'hover',\n IN_VIEWPORT: 'in-viewport',\n LISTING_FILTERS: 'listing-filters',\n LOADING: 'loading',\n LOADMORE: 'loadmore',\n MINI: 'mini',\n OPEN: 'open',\n OPENED: 'opened',\n PAUSED: 'paused',\n SCROLLED: 'scrolled',\n SEARCHING: 'searching',\n SELECTED: 'selected',\n SHOW: 'show',\n SITE_NAV_OPEN: 'site-nav__open',\n SUB_MENU: 'sub-menu',\n SUCCESS: 'success',\n VISUALLY_HIDDEN: 'visually-hidden'\n};\n\nexport default CLASS_NAMES;\n","//* ------------------------------------*\\\n// $EVENTS\n//* ------------------------------------*/\n\nconst EVENTS = {\n ANIMATIONEND: 'animationend',\n BEFOREUNLOAD: 'beforeunload',\n BLUR: 'blur',\n CHANGE: 'change',\n CLEAR_FILTERS: 'clearfilters',\n CLICK: 'click',\n CUSTOM_EVENT: 'customevent',\n DISPLAY_SUBHEADING: 'displaysubheading',\n DROPDOWN_CHANGED: 'dropdownchanged',\n FORM_ERROR: 'formerror',\n FORM_SUCCESS: 'formsuccess',\n FOCUS: 'focus',\n HEADER_HIDING: 'header-hiding',\n INPUT: 'input',\n KEY_DOWN: 'keydown',\n MOUSEMOVE: 'mousemove',\n MOUSEOUT: 'mouseout',\n MOUSEOVER: 'mouseover',\n PAGESHOW: 'pageshow',\n REQUEST_MADE: 'requestmade',\n RESIZE: 'resize',\n RESULTS_RETURNED: 'resultsreturnd',\n SCROLL: 'scroll',\n SIMULATED_CLICK: 'simulated-click',\n SHOW_HIDE: 'showhide',\n SUBMIT: 'submit',\n TOUCH_END: 'touchend',\n TOUCH_START: 'touchstart',\n TRANSITIONEND: 'transitionend',\n UPDATE_POST_COUNT: 'updatepostcount',\n UPDATE_IN_VIEWPORT_MODULES: 'updateinviewportmodules',\n UPDATE_SEARCH_WITH_NEW_ITEMS: 'updatesearchwithnewitems',\n UPDATE_SETTINGS: 'updatesettings',\n WHEEL: 'wheel'\n};\n\nexport default EVENTS;\n","//* ------------------------------------*\\\n// $KEY CODES\n//* ------------------------------------*/\n\nconst KEY_CODES = {\n ESCAPE: 27,\n SPACEBAR: 32,\n TAB: 9\n};\n\nexport default KEY_CODES;\n","//* --------------------------------------------------*\\\n// $SELECTORS - CSS selectors ONLY\n// - tag names, #ids, .classnames, [attributes], etc\n//* --------------------------------------------------*/\n\nconst SELECTORS = {\n ACCORDION_CONTENT: '.accordion__body',\n ACCORDION_TOGGLE: '.accordion__toggle',\n ANCHOR: 'a',\n ANCHOR_WITH_HREF: 'a[href]',\n API_RESULTS: '[data-loadcomponent=\"APIResults\"]',\n BG: '.component__background',\n BODY: 'body',\n BUTTON: 'button',\n CHECKED: ':checked',\n CHECKED_LABEL: ':checked + label',\n CHECKBOX: 'checkbox',\n CLOSE: '.close',\n CLOSE_SEARCH: '.close-search',\n DATA_BOTTOM: 'data-bottomposition',\n DATA_HALFWAY: 'data-halfway',\n DATA_HAS_ANIMATED: 'data-has-animated',\n DATA_LAZY_LOAD: 'data-lazyload',\n DATA_MOUSEFOLLOW: '[data-mousefollow]',\n DATA_POSITION: 'data-position',\n DATA_VISIBLE: '[data-visible]',\n DIV: 'div',\n DRAWER: '.drawer',\n FORM: 'form',\n HEADER: '.header',\n IMAGES_CONTAINER: '.gallery__image-container',\n IMAGES: '.gallery__image-frame',\n LOADMORE: '.loadmore',\n MODAL: 'dialog.modal',\n MODAL_CONTENT: '.modal__content',\n MODAL_CLOSE: '.modal__close',\n NAV_TRIGGER: '.nav-trigger',\n PLAYPAUSE: '.playpause',\n PLAYPAUSETEXT: '.playpause-text',\n SITE_NAV: '.site-nav',\n SLIDE: '.slide',\n SLIDES: '.slidecontainer',\n SLIDE_WRAP: '.slidewrap',\n SLIDE_WRAP_INNER: '.slidewrap-inner',\n SPAN: 'span'\n};\n\nexport default SELECTORS;\n","/**\n * A class which helps sending messages accoss modules via a DOM node\n */\nexport default class MessageBus {\n /**\n * sendEvent\n *\n * A function which lets you dispatch a custom event on\n * a Node. If the element is passed, it uses the element\n * available on the current `this` context.\n * @param {string} eventName Name of the custom event that is being triggered\n * @param {object} options Object which should be passed in the message\n * @param {object} element DOM node which the event should be attached to\n */\n sendEvent(eventName, options, element) {\n const evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(eventName, false, false, options);\n (element || this.element).dispatchEvent(evt);\n }\n}\n","import { EVENTS, SELECTORS } from '@bs/constants';\nimport { MessageBus } from '@bs/utils';\n\n/**\n * A class for the Modal module\n */\nexport default class Modal extends MessageBus {\n /**\n * Constructor function of the Modal class. Must receive one arguments, a DOM\n * node representing a delivery ticket.\n * @param element\n */\n constructor(element) {\n super();\n\n /**\n * @type {number} a number to be used as an ID\n */\n this.id = 0;\n\n /**\n * DOM node that is passed into the constructor\n * @property {object} element DOM node that is passed into the constructor\n */\n this.element = element;\n\n /**\n * Arrays to be populated with callback functions that will be triggered before modal open / after close\n * @property {Array} callbacks\n */\n this.opencallbacks = [];\n this.closecallbacks = [];\n\n // Initialize the view\n this.modalinit();\n }\n\n /**\n * Initializes the view by calling the functions to\n * create DOM references, setup event handlers and\n * then create the event listeners\n * @returns {object} ModalFunc A reference to the current instance of the class\n * @chainable\n */\n modalinit() {\n this.modalCacheDomReferences().modalSetupHandlers().modalEnable();\n\n return this;\n }\n\n /**\n * Cache DOM References\n *\n * Find all necessary DOM elements used in the view and cache them\n * @returns {object} ModalFunc A reference to the current instance of the class\n * @chainable\n */\n modalCacheDomReferences() {\n this.modal = document.querySelector(SELECTORS.MODAL);\n this.modalcontent = this.modal.querySelector(SELECTORS.MODAL_CONTENT);\n this.modalclose = this.modal.querySelector(SELECTORS.MODAL_CLOSE);\n this.body = document.body;\n\n return this;\n }\n\n /**\n * Bind event handlers with the proper context of `this`.\n * @returns {object} A reference to the current instance of the class\n * @chainable\n */\n modalSetupHandlers() {\n this.openModalHandler = this.openModal.bind(this);\n this.closeModalHandler = this.closeModal.bind(this);\n\n return this;\n }\n\n /**\n * Create event handlers to enable interaction with view\n * @returns {object} Search A reference to the current instance of the class\n * @chainable\n */\n modalEnable() {\n this.modalclose.addEventListener(EVENTS.CLICK, this.closeModalHandler);\n\n return this;\n }\n\n /**\n * The events trigger for opening and populating a modal with the image\n * @param {Event} e The event that triggered the modal open\n * @param {HTMLElement} html An html element to populate the modal with\n * @returns {object} Modal A reference to the current instance of the class\n * @chainable\n */\n openModal(e, html = null) {\n this.opencallbacks.forEach((callback) => {\n callback.callback();\n });\n\n this.scrollY = window.pageYOffset;\n this.body.style.position = 'fixed';\n this.body.style.top = `-${this.scrollY}`;\n\n if (html) {\n this.modalcontent.innerHTML = '';\n this.modalcontent.appendChild(html);\n }\n\n this.modal.showModal();\n\n return this;\n }\n\n /**\n * The events trigger for closing a modal\n * @returns {object} Modal A reference to the current instance of the class\n * @chainable\n */\n closeModal() {\n this.modal.close();\n this.modalcontent.innerHTML = '';\n\n this.body.style.position = '';\n this.body.style.top = '';\n window.scrollTo(0, this.scrollY);\n\n this.closecallbacks.forEach((callback) => {\n callback.callback();\n });\n\n return this;\n }\n\n /**\n * @desc A hook for pushing a callback function into the `callbacks` array. A unique\n * ID value for the callback is generated and a function is returned for removing\n * @param callback\n * @param onopen\n * the callback if need be.\n * @param {Function} `callback` A function to invoke by the Modal class\n * @param {boolean} `onopen` If true, fires before all other openModal functionality; if false, fires after all other closeModal functionality\n * @return {Function} `removeCallback` A function which will remove an entry from the `callbacks` array\n */\n addCallback(callback, onopen = true) {\n // Generate an id for the callback\n const id = this.getId();\n const callbackarray = onopen ? this.opencallbacks : this.closecallbacks;\n\n // Push function into array with a unique id\n callbackarray.push({\n id,\n callback\n });\n\n // Return the remove function\n return this.removeCallback.bind(this, id);\n }\n\n /**\n * Filters through the `callback` array and removes\n * the entry that corresponds to the id passed\n * in as an argument\n * @param {number} id An id value to filter by\n */\n removeCallback(id) {\n this.opencallbacks = this.callbacks.filter((item) => {\n return item.id !== id;\n });\n\n this.closecallbacks = this.callbacks.filter((item) => {\n return item.id !== id;\n });\n }\n\n /**\n * Generates an ID\n * @return {number} id the ID\n */\n getId() {\n return this.id + 1;\n }\n}\n","// Import all required modules\nimport Accordion from '@bs/components/views/Accordion';\nimport Gallery from '@bs/components/views/Gallery';\nimport Header from '@bs/components/views/Header';\nimport ShowMore from '@bs/components/views/ShowMore';\nimport SponsorScroll from '@bs/components/views/SponsorScroll';\nimport VideoControl from '@bs/components/views/VideoControl';\n\n// Export reference to all modules in an object\nexport default {\n Accordion,\n Gallery,\n Header,\n ShowMore,\n SponsorScroll,\n VideoControl\n};\n","import { ARIA, CLASS_NAMES, EVENTS, SELECTORS } from '@bs/constants';\n\n/**\n * A class for the Accordion module\n */\nexport default class Accordion {\n /**\n * Constructor function of the Accordion class. Must receive one arguments, a DOM\n * node representing a delivery ticket.\n * @param {HTMLElement} element - REQUIRED - the module's container\n */\n constructor(element) {\n /**\n * DOM node that is passed into the constructor\n * @property {object} element DOM node that is passed into the constructor\n */\n this.element = element;\n\n // Initialize the view\n this.init();\n }\n\n /**\n * Initializes the view by calling the functions to\n * create DOM references, setup event handlers and\n * then create the event listeners\n * @returns {object} Accordion A reference to the current instance of the class\n * @chainable\n */\n init() {\n this.cacheDomReferences().setupHandlers().enable();\n\n return this;\n }\n\n /**\n * Cache DOM References\n *\n * Find all necessary DOM elements used in the view and cache them\n * @returns {object} Header A reference to the current instance of the class\n * @chainable\n */\n cacheDomReferences() {\n this.trigger = this.element.querySelector(SELECTORS.ACCORDION_TOGGLE);\n\n return this;\n }\n\n /**\n * Bind event handlers with the proper context of `this`.\n * @returns {object} Accordion A reference to the current instance of the class\n * @chainable\n */\n setupHandlers() {\n this.toggleAccordionHandler = this.toggleAccordion.bind(this);\n\n return this;\n }\n\n /**\n * Create event handlers to enable interaction with view\n * @returns {object} Accordion A reference to the current instance of the class\n * @chainable\n */\n enable() {\n this.trigger.addEventListener(EVENTS.CLICK, this.toggleAccordionHandler);\n\n return this;\n }\n\n /**\n * toggles dropdown\n * @param {Event} event - the event object\n * @returns {object} Accordion A reference to the current instance of the class\n * @chainable\n */\n toggleAccordion() {\n this.element.classList.toggle(CLASS_NAMES.OPEN);\n const opened = this.trigger.getAttribute(ARIA.EXPANDED);\n if (opened === 'true') {\n this.trigger.setAttribute(ARIA.EXPANDED, false);\n } else {\n this.trigger.setAttribute(ARIA.EXPANDED, true);\n }\n\n return this;\n }\n}\n","import { CLASS_NAMES, EVENTS, SELECTORS } from '@bs/constants';\nimport Modal from './Modal';\n\n/**\n * A class for the Gallery module\n */\nexport default class Gallery extends Modal {\n /**\n * Constructor function of the Gallery class.\n * @param {HTMLElement} element - REQUIRED - the module's container\n */\n constructor(element) {\n super(element);\n /**\n * DOM node that is passed into the constructor\n * @property {object} element DOM node that is passed into the constructor\n */\n this.element = element;\n\n // Initialize the view\n this.init();\n }\n\n /**\n * Initializes the view by calling the functions to\n * create DOM references, setup event handlers and\n * then create the event listeners\n * @returns {object} GalleryFunc A reference to the current instance of the class\n * @chainable\n */\n init() {\n this.cacheDomReferences().setupHandlers().enable();\n\n return this;\n }\n\n /**\n * Cache DOM References\n *\n * Find all necessary DOM elements used in the view and cache them\n * @returns {object} GalleryFunc A reference to the current instance of the class\n * @chainable\n */\n cacheDomReferences() {\n this.button = this.element.querySelector(SELECTORS.LOADMORE);\n this.images = this.element.querySelectorAll(SELECTORS.IMAGES);\n\n return this;\n }\n\n /**\n * Bind event handlers with the proper context of `this`.\n * @returns {object} A reference to the current instance of the class\n * @chainable\n */\n setupHandlers() {\n this.showButton = this.showButtonHandler.bind(this);\n this.imageClick = this.imageClickHandler.bind(this);\n\n return this;\n }\n\n /**\n * Create event handlers to enable interaction with view\n * @returns {object} Search A reference to the current instance of the class\n * @chainable\n */\n enable() {\n this.button.addEventListener(EVENTS.CLICK, this.showButton);\n\n Array.prototype.forEach.call(this.images, (image) => {\n image.addEventListener(EVENTS.CLICK, this.imageClick);\n });\n\n return this;\n }\n\n /**\n * This events trigger for togglingthe play/pause button.\n * @returns {object} Gallery A reference to the current instance of the class\n * @chainable\n */\n showButtonHandler() {\n this.element.classList.remove(CLASS_NAMES.LOADMORE);\n this.button.remove();\n\n return this;\n }\n\n /**\n * The events trigger on click of an image\n * @param e\n * @returns {object} Gallery A reference to the current instance of the class\n * @chainable\n */\n imageClickHandler(e) {\n let elem = e.target;\n if (!elem.classList.contains(CLASS_NAMES.GALLERY_IMAGE_CONTAINER)) {\n elem = e.target.closest(SELECTORS.IMAGES_CONTAINER);\n }\n\n const html = elem.cloneNode(true);\n html.removeAttribute('tabindex');\n\n this.openModal(e, html);\n\n return this;\n }\n}\n","import { CLASS_NAMES, EVENTS, KEY_CODES, SELECTORS } from '@bs/constants';\n\n/**\n * A class for the Header module\n */\nexport default class Header {\n /**\n * Constructor function of the Header class. Must receive one arguments, a DOM\n * node representing a delivery ticket.\n * @param {HTMLElement} element - REQUIRED - the module's container\n * @param Services\n */\n constructor(element, Services) {\n /**\n * DOM node that is passed into the constructor\n * @property {object} element DOM node that is passed into the constructor\n */\n this.element = element;\n\n /**\n * Reference to the ScrollService singleton\n * @property {object}\n */\n this.ScrollService = Services.ScrollService;\n\n /**\n * Reference to the ResizeService singleton\n * @property {object}\n */\n this.ResizeService = Services.ResizeService;\n\n this.lastScroll = window.pageYOffset;\n this.documentHeight = document.documentElement.scrollHeight;\n this.viewportHeight = window.innerHeight;\n\n // Initialize the view\n this.init();\n }\n\n /**\n * Initializes the view by calling the functions to\n * create DOM references, setup event handlers and\n * then create the event listeners\n * @returns {object} HeaderFunc A reference to the current instance of the class\n * @chainable\n */\n init() {\n this.cacheDomReferences().setupHandlers().enable();\n\n return this;\n }\n\n /**\n * Cache DOM References\n *\n * Find all necessary DOM elements used in the view and cache them\n * @returns {object} HeaderFunc A reference to the current instance of the class\n * @chainable\n */\n cacheDomReferences() {\n this.body = document.querySelector(SELECTORS.BODY);\n this.hamburger = this.element.querySelector(SELECTORS.NAV_TRIGGER);\n this.siteHeader = document.querySelector(SELECTORS.HEADER);\n\n return this;\n }\n\n /**\n * Bind event handlers with the proper context of `this`.\n * @returns {object} A reference to the current instance of the class\n * @chainable\n */\n setupHandlers() {\n this.toggleHamburger = this.toggleHamburgerHandler.bind(this);\n this.onCloseHandler = this.onCloseTrigger.bind(this);\n this.onScrollFixedNavHandler = this.onScrollFixedNav.bind(this);\n this.onResizeHandler = this.onResize.bind(this);\n\n return this;\n }\n\n /**\n * Create event handlers to enable interaction with view\n * @returns {object} Search A reference to the current instance of the class\n * @chainable\n */\n enable() {\n if (this.hamburger !== null) {\n this.hamburger.addEventListener(EVENTS.CLICK, this.toggleHamburger);\n }\n\n // handle scroll\n this.ScrollService.addCallback(this.onScrollFixedNavHandler);\n\n // handle resize\n this.ResizeService.addCallback(this.onResizeHandler);\n\n return this;\n }\n\n /**\n * This events trigger for toggling hamburger menu.\n * @returns {void}\n */\n toggleHamburgerHandler() {\n this.body.classList.toggle(CLASS_NAMES.SITE_NAV_OPEN);\n if (this.body.classList.contains(CLASS_NAMES.SITE_NAV_OPEN)) {\n window.addEventListener(EVENTS.KEY_DOWN, this.onCloseHandler);\n }\n }\n\n /**\n * Handle clicks to the close button\n * @param {Event} event - the click event object\n */\n onCloseTrigger(event) {\n if (event.type === EVENTS.KEY_DOWN && event.keyCode !== KEY_CODES.ESCAPE) {\n return;\n }\n event.preventDefault();\n this.body.classList.remove(CLASS_NAMES.SITE_NAV_OPEN);\n window.removeEventListener(EVENTS.KEY_DOWN, this.onCloseHandler);\n }\n\n /**\n * Adds class of \"hidden\" to navbar if user is scrolling down\n *\n */\n onScrollFixedNav() {\n const scrollTop = window.pageYOffset;\n const viewportWidth =\n window.innerWidth || document.documentElement.clientWidth;\n // If scrolling down on large screen, hide nav\n if (viewportWidth > 1023) {\n if (\n (scrollTop > this.lastScroll && scrollTop > 0) ||\n scrollTop === this.documentHeight - this.viewportHeight + 1\n ) {\n this.siteHeader.classList.add(CLASS_NAMES.HIDDEN);\n } else {\n this.siteHeader.classList.remove(CLASS_NAMES.HIDDEN);\n\n if (scrollTop > 44) {\n this.siteHeader.classList.add(CLASS_NAMES.SCROLLED);\n } else {\n this.siteHeader.classList.remove(CLASS_NAMES.SCROLLED);\n }\n }\n this.lastScroll = scrollTop;\n }\n }\n\n /**\n * Sets variable with current window height\n *\n */\n onResize() {\n this.viewportHeight = window.innerHeight;\n }\n}\n","import { CLASS_NAMES, EVENTS, SELECTORS } from '@bs/constants';\n\n/**\n * A class for the ShowMore module\n */\nexport default class ShowMore {\n /**\n * Constructor function of the ShowMore class. Must receive one arguments, a DOM\n * node representing a delivery ticket.\n * @param {HTMLElement} element - REQUIRED - the module's container\n */\n constructor(element) {\n /**\n * DOM node that is passed into the constructor\n * @property {object} element DOM node that is passed into the constructor\n */\n this.element = element;\n\n // Initialize the view\n this.init();\n }\n\n /**\n * Initializes the view by calling the functions to\n * create DOM references, setup event handlers and\n * then create the event listeners\n * @returns {object} ShowMoreFunc A reference to the current instance of the class\n * @chainable\n */\n init() {\n this.cacheDomReferences().setupHandlers().enable();\n\n return this;\n }\n\n /**\n * Cache DOM References\n *\n * Find all necessary DOM elements used in the view and cache them\n * @returns {object} ShowMoreFunc A reference to the current instance of the class\n * @chainable\n */\n cacheDomReferences() {\n this.drawer = this.element.querySelector(SELECTORS.DRAWER);\n this.toggle = this.element.querySelector(SELECTORS.BUTTON);\n this.closedlabel = this.toggle.textContent;\n this.openedlabel = this.toggle.dataset.openlabel;\n\n return this;\n }\n\n /**\n * Bind event handlers with the proper context of `this`.\n * @returns {object} A reference to the current instance of the class\n * @chainable\n */\n setupHandlers() {\n this.opencloseButton = this.opencloseButtonHandler.bind(this);\n\n return this;\n }\n\n /**\n * Create event handlers to enable interaction with view\n * @returns {object} Search A reference to the current instance of the class\n * @chainable\n */\n enable() {\n this.toggle.addEventListener(EVENTS.CLICK, this.opencloseButton);\n\n return this;\n }\n\n /**\n * This events trigger for togglingthe play/pause button.\n * @returns {void}\n */\n opencloseButtonHandler() {\n this.drawer.classList.toggle(CLASS_NAMES.CLOSED);\n this.toggle.textContent =\n this.toggle.textContent === this.closedlabel\n ? this.openedlabel\n : this.closedlabel;\n }\n}\n","import { CLASS_NAMES, EVENTS, KEY_CODES, SELECTORS } from '@bs/constants';\n\n/**\n * A class for the SponsorScroll module\n */\nexport default class SponsorScroll {\n /**\n * Constructor function of the SponsorScroll class. Must receive one arguments, a DOM\n * node representing a delivery ticket.\n * @param {HTMLElement} element - REQUIRED - the module's container\n */\n constructor(element) {\n /**\n * DOM node that is passed into the constructor\n * @property {object} element DOM node that is passed into the constructor\n */\n this.element = element;\n\n this.autoscroller = null;\n this.intersectionObservers = [];\n this.scrollerpaused = true;\n this.canplay = false;\n\n // Initialize the view\n this.init();\n }\n\n /**\n * Initializes the view by calling the functions to\n * create DOM references, setup event handlers and\n * then create the event listeners\n * @returns {object} SponsorScroll A reference to the current instance of the class\n * @chainable\n */\n init() {\n this.cacheDomReferences()\n .setupHandlers()\n .enable()\n .startObserver()\n .startScroll();\n\n return this;\n }\n\n /**\n * Cache DOM References\n *\n * Find all necessary DOM elements used in the view and cache them\n * @returns {object} Header A reference to the current instance of the class\n * @chainable\n */\n cacheDomReferences() {\n this.slidewrapper = this.element.querySelector(SELECTORS.SLIDE_WRAP);\n this.slidewrappeinner = this.element.querySelector(\n SELECTORS.SLIDE_WRAP_INNER\n );\n this.slidecontainer = this.element.querySelector(SELECTORS.SLIDES);\n this.sliderwidth = this.slidecontainer.offsetWidth;\n this.slides = this.element.querySelectorAll(SELECTORS.SLIDE);\n\n this.playpause = this.element.querySelector(SELECTORS.PLAYPAUSE);\n this.playpausetext = this.playpause.querySelector(SELECTORS.PLAYPAUSETEXT);\n this.playlabel = this.playpause.dataset.play;\n this.pauselabel = this.playpausetext.textContent;\n\n return this;\n }\n\n /**\n * Bind event handlers with the proper context of `this`.\n * @returns {object} SponsorScroll A reference to the current instance of the class\n * @chainable\n */\n setupHandlers() {\n this.playpauseButton = this.playpauseButtonHandler.bind(this);\n this.keyDown = this.keyDownHandler.bind(this);\n\n return this;\n }\n\n /**\n * Create event handlers to enable interaction with view\n * @returns {object} Search A reference to the current instance of the class\n * @chainable\n */\n enable() {\n window.addEventListener(EVENTS.KEY_DOWN, this.keyDown);\n this.element.classList.add(CLASS_NAMES.ACTIVE);\n this.playpause.addEventListener(EVENTS.CLICK, this.playpauseButton);\n let activated = false;\n\n this.viewportObserver = new IntersectionObserver(\n ([e]) => {\n if (e.isIntersecting) {\n this.canplay = true;\n if (!activated) {\n this.startScroll();\n activated = true;\n }\n } else {\n this.canplay = false;\n this.pauseScroll();\n activated = false;\n }\n },\n {\n root: null,\n threshold: 0.9\n }\n );\n this.viewportObserver.observe(this.element);\n\n return this;\n }\n\n /**\n * Creates and fires interection observer\n * @returns {object} SponsorScroll A reference to the current instance of the class\n * @chainable\n */\n startObserver() {\n this.addObserver(this.slidecontainer, 0);\n\n return this;\n }\n\n /**\n * Creates and fires new interection observer\n * @param elem\n * @param key\n * @returns {object} SponsorScroll A reference to the current instance of the class\n * @chainable\n */\n addObserver(elem, key) {\n this.intersectionObservers[key] = new IntersectionObserver(\n ([e]) => {\n if (e.intersectionRect.left >= e.intersectionRect.width / 1.5) return;\n this.cloneSlides();\n },\n {\n threshold: [0, 0.25, 0.5, 0.75, 1] // Fires at 0%, 25%, 50%, 75%, and 100% visibility\n }\n );\n\n this.intersectionObservers[key].observe(elem);\n\n return this;\n }\n\n /**\n * starts scroll of slider\n * @returns {object} Search A reference to the current instance of the class\n * @chainable\n */\n startScroll() {\n if (this.canplay) {\n this.autoscroller = setInterval(() => {\n if (this.canplay) {\n this.slidewrapper.scrollLeft += 20;\n }\n }, 150);\n this.scrollerpaused = false;\n }\n\n return this;\n }\n\n /**\n * starts scroll of slider\n * @returns {object} Search A reference to the current instance of the class\n * @chainable\n */\n pauseScroll() {\n clearInterval(this.autoscroller);\n this.scrollerpaused = true;\n\n return this;\n }\n\n /**\n * clones slides\n * @returns {object} Search A reference to the current instance of the class\n * @chainable\n */\n cloneSlides() {\n const cloned = this.slidecontainer.cloneNode(true);\n this.slidewrappeinner.appendChild(cloned);\n const slidecontainers = this.element.querySelectorAll(SELECTORS.SLIDES);\n this.addObserver(\n slidecontainers[slidecontainers.length - 1],\n this.intersectionObservers.length\n );\n\n return this;\n }\n\n /**\n * This events trigger for togglingthe play/pause button.\n * @returns {void}\n */\n playpauseButtonHandler() {\n if (this.scrollerpaused) {\n this.startScroll();\n this.playpausetext.textContent = this.pauselabel;\n this.playpause.classList.remove(CLASS_NAMES.PAUSED);\n } else {\n this.pauseScroll();\n this.playpausetext.textContent = this.playlabel;\n this.playpause.classList.add(CLASS_NAMES.PAUSED);\n }\n }\n\n /**\n * This events trigger for keydown\n * @param e\n * @returns {void}\n */\n keyDownHandler(e) {\n if (e.keyCode === KEY_CODES.TAB && this.canplay === true) {\n // user is navigating via keyboard\n this.pauseScroll();\n this.canplay = false;\n\n const slidecontainers = this.element.querySelectorAll(SELECTORS.SLIDES);\n\n this.viewportObserver.unobserve(this.element);\n\n let index = 0;\n Array.prototype.forEach.call(this.intersectionObservers, (observer) => {\n observer.unobserve(slidecontainers[index]);\n index += 1;\n });\n\n const slides = this.element.querySelectorAll(\n `${SELECTORS.SLIDES}:not(:first-of-type)`\n );\n Array.prototype.forEach.call(slides, (slidegroup) => {\n slidegroup.remove();\n });\n\n this.slidewrapper.scrollLeft = 0;\n\n this.element.classList.remove(CLASS_NAMES.ACTIVE);\n\n window.removeEventListener(EVENTS.KEY_DOWN, this.keyDown);\n\n clearInterval(this.autoscroller);\n }\n\n return this;\n }\n}\n","import { CLASS_NAMES, EVENTS, SELECTORS } from '@bs/constants';\n\n/**\n * A class for the VideoControl module\n */\nexport default class VideoControl {\n /**\n * Constructor function of the VideoControl class. Must receive one arguments, a DOM\n * node representing a delivery ticket.\n * @param {HTMLElement} element - REQUIRED - the module's container\n */\n constructor(element) {\n /**\n * DOM node that is passed into the constructor\n * @property {object} element DOM node that is passed into the constructor\n */\n this.element = element;\n this.observer = null;\n\n // Initialize the view\n this.init();\n }\n\n /**\n * Initializes the view by calling the functions to\n * create DOM references, setup event handlers and\n * then create the event listeners\n * @returns {object} VideoControlFunc A reference to the current instance of the class\n * @chainable\n */\n init() {\n this.cacheDomReferences().setupHandlers().enable();\n\n return this;\n }\n\n /**\n * Cache DOM References\n *\n * Find all necessary DOM elements used in the view and cache them\n * @returns {object} VideoControlFunc A reference to the current instance of the class\n * @chainable\n */\n cacheDomReferences() {\n this.video = this.element;\n this.playpause = this.element.parentElement.querySelector(\n SELECTORS.PLAYPAUSE\n );\n this.playpausetext = this.playpause.querySelector(SELECTORS.PLAYPAUSETEXT);\n this.playlabel = this.playpause.dataset.play;\n this.pauselabel = this.playpausetext.textContent;\n\n return this;\n }\n\n /**\n * Bind event handlers with the proper context of `this`.\n * @returns {object} A reference to the current instance of the class\n * @chainable\n */\n setupHandlers() {\n this.playpauseButton = this.playpauseButtonHandler.bind(this);\n\n return this;\n }\n\n /**\n * Create event handlers to enable interaction with view\n * @returns {object} Search A reference to the current instance of the class\n * @chainable\n */\n enable() {\n this.playpause.addEventListener(EVENTS.CLICK, this.playpauseButton);\n\n // don't play the video is it is not in viewport\n this.observer = new IntersectionObserver(\n ([e]) => {\n if (e.isIntersecting) {\n this.video.play();\n } else {\n this.video.pause();\n }\n },\n {\n root: null,\n threshold: 0.5\n }\n );\n this.observer.observe(this.element);\n\n return this;\n }\n\n /**\n * This events trigger for togglingthe play/pause button.\n * @returns {void}\n */\n playpauseButtonHandler() {\n if (this.video.paused) {\n this.video.play();\n this.playpausetext.textContent = this.pauselabel;\n this.playpause.classList.remove(CLASS_NAMES.PAUSED);\n } else {\n this.video.pause();\n this.playpausetext.textContent = this.playlabel;\n this.playpause.classList.add(CLASS_NAMES.PAUSED);\n }\n }\n}\n","/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing.\n * @param {Function} func A function to call after N milliseconds\n * @param {number} wait The number of milliseconds to wait\n * @param {boolean} immediate Trigger the function on the leading edge instead of the trailing\n * @returns {Function} A function, that, as long as it continues to be invoked, will not be triggered\n */\nconst debounce = (func, wait, immediate) => {\n let timeout;\n return function debounced(...args) {\n const context = this;\n const later = function delayed() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n const callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n};\n\nexport default debounce;\n","import { debounce } from '@bs/utils';\nimport { EVENTS } from '@bs/constants';\n\n/**\n * ID\n * @type {number}\n * @ignore\n */\nlet id = 0;\n\n/**\n * Get ID\n *\n * Because file is loaded only once, this function\n * can be used to generate a unique id every time\n * it is called.\n * @returns {number} Unique ID value\n * @ignore\n */\nfunction getId() {\n id += 1;\n return id;\n}\n\n/**\n * Resize Service\n */\nexport default class ResizeService {\n /**\n * ResizeService constructor in which the `callbacks` array is created\n * as a property of the class.\n */\n constructor() {\n /**\n * An array to be populated with callback functions that will be triggered on resize\n * @property {Array} callbacks - The array of callback functions to be triggered on resize.\n */\n this.callbacks = [];\n\n this.init();\n }\n\n /**\n * @description Initialize the singleton by attaching the event listener to the window\n * @listener {Event} listens to the window resize event\n */\n init() {\n window.addEventListener(\n EVENTS.RESIZE,\n debounce(this.onResize.bind(this), 10)\n );\n }\n\n /**\n * @description The resize event handler. Itertates through the `callback` array and invokes each callback in the Array\n */\n onResize() {\n this.callbacks.forEach((callback) => {\n callback.callback();\n });\n }\n\n /**\n * @description A hook for pushing a callback function\n * into the `callbacks` array. A unique\n * ID value for the callback is generated\n * and a function is returned for removing\n * the callback if need be.\n * @param {Function} callback A function to invoke by the ResizeService\n * @returns {Function} `removeCallback` A function which will remove an entry from the `callbacks` array\n */\n addCallback(callback) {\n // Generate an id for the callback\n const newId = getId();\n\n // Push function into array with a unique id\n this.callbacks.push({\n id: newId,\n callback\n });\n\n // Return the remove function\n return this.removeCallback.bind(this, newId);\n }\n\n /**\n * Filters through the `callback` array and removes\n * the entry that corresponds to the id passed\n * in as an argument\n * @param {number} newId An id value to filter by\n */\n removeCallback(newId) {\n this.callbacks = this.callbacks.filter((item) => item.id !== newId);\n }\n}\n","import { debounce } from '@bs/utils';\nimport { EVENTS } from '@bs/constants';\n\n/**\n * ID\n * @type {number}\n * @ignore\n */\nlet id = 0;\n\n/**\n * Get ID\n *\n * Because file is loaded only once, this function\n * can be used to generate a unique id every time\n * it is called.\n * @returns {number} Unique ID value\n * @ignore\n */\nfunction getId() {\n id += 1;\n return id;\n}\n\n/**\n * Scroll Service\n */\nexport default class ScrollService {\n /**\n * Scroll Service constructor in which the `callbacks` array is created\n * as a property of the class.\n */\n constructor() {\n /**\n * An array to be populated with callback functions that will be triggered on scroll\n * @property {Array} callbacks - The array of callback functions to be triggered on scroll.\n */\n this.callbacks = [];\n\n this.init();\n }\n\n /**\n * @description Initialize the singleton by attaching the event listener to the window\n * @listener {Event} listens to the window scroll event\n */\n init() {\n window.addEventListener(\n EVENTS.SCROLL,\n debounce(this.onScroll.bind(this), 20)\n );\n }\n\n /**\n * @description The scroll event handler. Iterates through the `callback` array and invokes each callback in the Array\n */\n onScroll() {\n this.callbacks.forEach((callback) => {\n callback.callback();\n });\n }\n\n /**\n * @description A hook for pushing a callback function into the `callbacks` array. A unique\n * ID value for the callback is generated and a function is returned for removing\n * the callback if need be.\n * @param {Function} callback A function to invoke by the ScrollService\n * @returns {Function} `removeCallback` A function which will remove an entry from the `callbacks` array\n */\n addCallback(callback) {\n // Generate an id for the callback\n const newId = getId();\n\n // Push function into array with a unique id\n this.callbacks.push({\n id: newId,\n callback\n });\n\n // Return the remove function\n return this.removeCallback.bind(this, newId);\n }\n\n /**\n * Filters through the `callback` array and removes\n * the entry that corresponds to the id passed\n * in as an argument\n * @param {number} newId An id value to filter by\n */\n removeCallback(newId) {\n this.callbacks = this.callbacks.filter((item) => item.id !== newId);\n }\n}\n","// Import services\nimport ResizeService from './ResizeService';\nimport ScrollService from './ScrollService';\n\n/**\n * A singleton whose properties are individual services.\n *\n * Any service singleton service that needs to be instantiated\n * should be done so in the Services class.\n *\n * Services should not interact with the DOM, that should be\n * left to the Views. Services can simply be used to consolidate\n * an expensive event listener ('scroll', 'resize', etc). or\n * track state (like which modal is open at which time).\n */\nexport default class Services {\n /**\n * Services constructor that instantiates each service individually.\n * To add another services instiate it here.\n */\n constructor() {\n /**\n * A service which listens to the `window` resize event and\n * invokes an array of callbacks\n * @property {object} ResizeService A singleton instance of the ResizeService class\n */\n this.ResizeService = new ResizeService();\n\n /**\n * A service which listens to the `window` scroll event and\n * invokes an array of callbacks\n * @property {object} ScrollService A singleton instance of the ScrollService class\n */\n this.ScrollService = new ScrollService();\n }\n}\n","// now, on with the show!\nimport ComponentMap from './ComponentMap';\nimport Services from './components/services';\n\n/**\n * The top-level controller for the whole page. This component is responsible\n * for loading other controllers and views.\n */\nexport default class App {\n /**\n * Initialize all global JS components and call `loadcomponents`\n * to initialize all unique JS components\n */\n constructor() {\n /**\n * Services is the object which holds references to all services\n * created for pages. Services should be instantiated there and\n * then will be injected into each component for optional use via the\n * `loadcomponents` function\n * @type {Services}\n * @property {Services} Services - The object that holds references to all services created for pages.\n */\n this.Services = new Services();\n\n // Load each component\n this.loadPagecomponents();\n }\n\n /**\n * This function loops over all elements in the DOM with the\n * `data-loadcomponent` attribute and loads the specified view\n * or controller.\n *\n * To attach a JS component to an HTML element, in your markup you'd\n * do something like:
\n * where 'Examplecomponent' is your JS class name. You'd need to add that component to the ./componentMap.js\n * and make sure the component exists and is a proper ES6 class, and then you'll end up with\n * an ES6 class that is passed a reference to section.example-component on init.\n */\n loadPagecomponents() {\n const attribute = 'data-loadcomponent';\n Array.prototype.forEach.call(\n document.querySelectorAll(`[${attribute}]`),\n (element) => {\n // eslint-disable-next-line no-new\n new ComponentMap[element.getAttribute(attribute)](\n element,\n this.Services\n );\n }\n );\n }\n}\n","import App from './App';\n\n// This enables application of JS modules changes in HTML view.\n// Don't remove it!\nif (import.meta.hot) {\n import.meta.hot.accept();\n}\n\n// eslint-disable-next-line no-unused-vars\nconst css = require('../scss/style.scss');\n\n/**\n * The only purpose of this file is to bootstrap the App component\n * to the `window` whenever the page has finished loading. All\n * work to be done with loading components and any logic to perform\n * requests or update the DOM should be done their or in a specific\n * component.\n */\n(function bootstrapApp() {\n // Attach App to the window\n window.App = new App();\n})();\n","require('svg4everybody')({});\n"],"names":["this","root","svg4everybody","embed","parent","svg","target","fragment","document","createDocumentFragment","viewBox","hasAttribute","getAttribute","setAttribute","clone","cloneNode","childNodes","length","appendChild","firstChild","loadreadystatechange","xhr","onreadystatechange","readyState","cachedDocument","_cachedDocument","implementation","createHTMLDocument","body","innerHTML","responseText","_cachedTarget","_embeds","splice","map","item","id","getElementById","rawopts","oninterval","index","uses","use","parentNode","getSVGAncestor","src","opts","attributeName","polyfill","validate","removeChild","srcSplit","split","url","shift","join","requests","XMLHttpRequest","open","send","push","numberOfSvgUseElementsToBypass","requestAnimationFrame","Object","newerIEUA","webkitUA","olderEdgeUA","edgeUA","inIframe","window","top","self","test","navigator","userAgent","match","setTimeout","getElementsByTagName","node","nodeName","toLowerCase","factory","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","call","r","Symbol","toStringTag","defineProperty","value","EXPANDED","HIDDEN","SELECTED","ABOVE_BOTTOM","ABOVE_HALFWAY","ABOVE_VIEWPORT","ACTIVE","BELOW_BOTTOM","BELOW_HALFWAY","BELOW_VIEWPORT","BLINK","ERROR","CLICK","CLOSED","FADE","FILTER_SELECTED","FIRST_BATCH","FIXED","FILTERED","GALLERY_IMAGE_CONTAINER","HIDING","HOVER","IN_VIEWPORT","LISTING_FILTERS","LOADING","LOADMORE","MINI","OPEN","OPENED","PAUSED","SCROLLED","SEARCHING","SHOW","SITE_NAV_OPEN","SUB_MENU","SUCCESS","VISUALLY_HIDDEN","ANIMATIONEND","BEFOREUNLOAD","BLUR","CHANGE","CLEAR_FILTERS","CUSTOM_EVENT","DISPLAY_SUBHEADING","DROPDOWN_CHANGED","FORM_ERROR","FORM_SUCCESS","FOCUS","HEADER_HIDING","INPUT","KEY_DOWN","MOUSEMOVE","MOUSEOUT","MOUSEOVER","PAGESHOW","REQUEST_MADE","RESIZE","RESULTS_RETURNED","SCROLL","SIMULATED_CLICK","SHOW_HIDE","SUBMIT","TOUCH_END","TOUCH_START","TRANSITIONEND","UPDATE_POST_COUNT","UPDATE_IN_VIEWPORT_MODULES","UPDATE_SEARCH_WITH_NEW_ITEMS","UPDATE_SETTINGS","WHEEL","ESCAPE","SPACEBAR","TAB","ACCORDION_CONTENT","ACCORDION_TOGGLE","ANCHOR","ANCHOR_WITH_HREF","API_RESULTS","BG","BODY","BUTTON","CHECKED","CHECKED_LABEL","CHECKBOX","CLOSE","CLOSE_SEARCH","DATA_BOTTOM","DATA_HALFWAY","DATA_HAS_ANIMATED","DATA_LAZY_LOAD","DATA_MOUSEFOLLOW","DATA_POSITION","DATA_VISIBLE","DIV","DRAWER","FORM","HEADER","IMAGES_CONTAINER","IMAGES","MODAL","MODAL_CONTENT","MODAL_CLOSE","NAV_TRIGGER","PLAYPAUSE","PLAYPAUSETEXT","SITE_NAV","SLIDE","SLIDES","SLIDE_WRAP","SLIDE_WRAP_INNER","SPAN","MessageBus","sendEvent","eventName","options","element","evt","createEvent","initCustomEvent","dispatchEvent","Modal","constructor","super","opencallbacks","closecallbacks","modalinit","modalCacheDomReferences","modalSetupHandlers","modalEnable","modal","querySelector","modalcontent","modalclose","openModalHandler","openModal","bind","closeModalHandler","closeModal","addEventListener","e","html","forEach","callback","scrollY","pageYOffset","style","position","showModal","close","scrollTo","addCallback","onopen","getId","removeCallback","callbacks","filter","Accordion","init","cacheDomReferences","setupHandlers","enable","trigger","toggleAccordionHandler","toggleAccordion","classList","toggle","Gallery","button","images","querySelectorAll","showButton","showButtonHandler","imageClick","imageClickHandler","Array","prototype","image","remove","elem","contains","closest","removeAttribute","Header","Services","ScrollService","ResizeService","lastScroll","documentHeight","documentElement","scrollHeight","viewportHeight","innerHeight","hamburger","siteHeader","toggleHamburger","toggleHamburgerHandler","onCloseHandler","onCloseTrigger","onScrollFixedNavHandler","onScrollFixedNav","onResizeHandler","onResize","event","type","keyCode","preventDefault","removeEventListener","scrollTop","innerWidth","clientWidth","add","ShowMore","drawer","closedlabel","textContent","openedlabel","dataset","openlabel","opencloseButton","opencloseButtonHandler","SponsorScroll","autoscroller","intersectionObservers","scrollerpaused","canplay","startObserver","startScroll","slidewrapper","slidewrappeinner","slidecontainer","sliderwidth","offsetWidth","slides","playpause","playpausetext","playlabel","play","pauselabel","playpauseButton","playpauseButtonHandler","keyDown","keyDownHandler","activated","viewportObserver","IntersectionObserver","isIntersecting","pauseScroll","threshold","observe","addObserver","key","intersectionRect","left","width","cloneSlides","setInterval","scrollLeft","clearInterval","cloned","slidecontainers","unobserve","observer","slidegroup","VideoControl","video","parentElement","pause","paused","func","wait","immediate","timeout","args","context","callNow","clearTimeout","apply","newId","onScroll","App","loadPagecomponents","attribute","ComponentMap"],"sourceRoot":""}