`;\r\n if (placemark.imageFilename)\r\n {\r\n infoContent += `

`;\r\n }\r\n infoContent += `
${placemark.name}
${placemark.address.lineOne}`;\r\n if (placemark.address.lineTwo)\r\n {\r\n infoContent += `
${placemark.address.lineTwo}`;\r\n }\r\n if (placemark.address.town)\r\n {\r\n infoContent += `
${placemark.address.town}`;\r\n }\r\n if (placemark.address.county)\r\n {\r\n infoContent += `
${placemark.address.county}`;\r\n }\r\n if (placemark.address.postalCode)\r\n {\r\n infoContent += `
${placemark.address.postalCode}`;\r\n }\r\n infoContent += `
`;\r\n infoWindow = new google.maps.InfoWindow({\r\n content: infoContent\r\n });\r\n\r\n infoWindow.open(map, marker);\r\n}\r\n\r\nfunction loadTheme(data: JQueryXHR): void\r\n{\r\n mapStyle = data.responseJSON;\r\n\r\n if (mapElement == null)\r\n {\r\n return;\r\n }\r\n\r\n let apiPath = mapElement.dataset.apiPath;\r\n if (apiPath != null)\r\n {\r\n $.ajax({\r\n url: apiPath,\r\n complete: loadXmlDocument\r\n });\r\n }\r\n}\r\n\r\nfunction loadXmlDocument(data: JQueryXHR): void\r\n{\r\n if (mapElement == null)\r\n {\r\n return;\r\n }\r\n\r\n const placemarks = JSON.parse(data.responseText) as IOfficeMapPin[];\r\n\r\n map = new google.maps.Map(mapElement,\r\n {\r\n zoom: 16,\r\n center: new google.maps.LatLng(0, 0),\r\n mapTypeId: google.maps.MapTypeId.ROADMAP,\r\n styles: mapStyle\r\n });\r\n\r\n for (let i = 0; i < placemarks.length; i++)\r\n {\r\n const placemark = placemarks[i];\r\n const point = new google.maps.LatLng(placemark.latitude, placemark.longitude);\r\n\r\n const marker = new google.maps.Marker({\r\n map: map,\r\n position: point,\r\n title: placemark.name,\r\n icon: \"/site/img/map-pin.svg\"\r\n });\r\n\r\n google.maps.event.addListener(marker,\r\n \"click\",\r\n function (this: google.maps.Marker)\r\n {\r\n toggleMarker(placemark, this);\r\n });\r\n\r\n if (placemarks.length === 1 && mapElement.dataset.nopopup !== \"true\")\r\n {\r\n toggleMarker(placemark, marker);\r\n }\r\n\r\n placeMarkers.push(marker);\r\n }\r\n\r\n new MarkerClusterer({ markers: placeMarkers, map });\r\n\r\n findMapCenterAndZoom();\r\n setupDirections();\r\n}\r\n\r\nfunction findMapCenterAndZoom(): void\r\n{\r\n if (map == null)\r\n {\r\n return;\r\n }\r\n\r\n const bounds = new google.maps.LatLngBounds();\r\n placeMarkers.forEach((value: google.maps.Marker) =>\r\n {\r\n let point = value.getPosition();\r\n if (point != null)\r\n {\r\n bounds.extend(point);\r\n }\r\n });\r\n\r\n google.maps.event.addListener(map,\r\n \"zoom_changed\",\r\n () =>\r\n {\r\n const zoomChangeBoundsListener = google.maps.event.addListener(map,\r\n \"bounds_changed\",\r\n function (this: google.maps.Map)\r\n {\r\n const currentZoom = this.getZoom();\r\n if (currentZoom && currentZoom > 15 && initialZoom)\r\n {\r\n // Change max/min zoom here\r\n this.setZoom(15);\r\n initialZoom = false;\r\n }\r\n google.maps.event.removeListener(zoomChangeBoundsListener);\r\n });\r\n });\r\n\r\n initialZoom = true;\r\n map.fitBounds(bounds);\r\n}\r\n\r\nfunction findDirectionsKeyDown(ev: KeyboardEvent)\r\n{\r\n if (ev.key === \"Enter\")\r\n {\r\n ev.preventDefault();\r\n findDirections(ev);\r\n }\r\n}\r\n\r\nfunction findDirections(ev: Event)\r\n{\r\n if (ev.currentTarget == null)\r\n {\r\n return;\r\n }\r\n\r\n let rootElement = ev.currentTarget as HTMLElement;\r\n while (rootElement.attributes.getNamedItem(\"map-search\") == null)\r\n {\r\n if (rootElement.parentElement == null)\r\n {\r\n return;\r\n }\r\n\r\n rootElement = rootElement.parentElement;\r\n }\r\n\r\n const inputElem = rootElement.querySelector(\"input\");\r\n if (inputElem == null)\r\n {\r\n return;\r\n }\r\n\r\n const fromAddress = inputElem.value;\r\n\r\n if (directionsElement == null)\r\n {\r\n return;\r\n }\r\n\r\n directionsDisplay.setMap(map);\r\n directionsDisplay.setPanel(directionsElement);\r\n\r\n // get first placemark position\r\n let destination: google.maps.LatLng | null | undefined = null;\r\n\r\n if (placeMarkers.length > 1)\r\n {\r\n const locationSelect = searchElement?.querySelector(\"select\");\r\n if (locationSelect != null)\r\n {\r\n destination = placeMarkers[parseInt(locationSelect.value)].getPosition();\r\n }\r\n }\r\n else\r\n {\r\n destination = placeMarkers[0].getPosition();\r\n }\r\n\r\n if (destination == null)\r\n {\r\n return;\r\n }\r\n\r\n directionsService.route({\r\n origin: fromAddress,\r\n destination: destination,\r\n travelMode: google.maps.TravelMode.DRIVING,\r\n unitSystem: google.maps.UnitSystem.IMPERIAL,\r\n provideRouteAlternatives: true\r\n }, displayDirections);\r\n}\r\n\r\nfunction displayDirections(result: google.maps.DirectionsResult | null, status: google.maps.DirectionsStatus)\r\n{\r\n if (directionsElement == null || errorElement == null || result == null)\r\n {\r\n return;\r\n }\r\n\r\n if (status === google.maps.DirectionsStatus.OK)\r\n {\r\n directionsElement.style.display = \"block\";\r\n errorElement.style.display = \"none\";\r\n directionsDisplay.setDirections(result);\r\n }\r\n else\r\n {\r\n directionsElement.style.display = \"none\";\r\n errorElement.style.display = \"block\";\r\n }\r\n}\r\n\r\nfunction setupDirections()\r\n{\r\n if (searchElement == null)\r\n {\r\n return;\r\n }\r\n\r\n const group = document.createElement(\"div\");\r\n group.className = \"input-group\";\r\n\r\n const destination = document.createElement(\"input\");\r\n destination.type = \"text\";\r\n destination.autocomplete = \"postal-code\";\r\n destination.placeholder = \"Enter your postcode...\";\r\n destination.className = \"form-control\";\r\n destination.addEventListener(\"keydown\", findDirectionsKeyDown);\r\n group.appendChild(destination);\r\n\r\n const button = document.createElement(\"button\");\r\n button.type = \"button\";\r\n button.className = \"btn btn-dark\";\r\n button.addEventListener(\"click\", (ev) => findDirections(ev));\r\n\r\n const icon = document.createElement(\"i\");\r\n icon.className = \"la la-angle-right\";\r\n\r\n button.appendChild(icon);\r\n group.appendChild(button);\r\n searchElement.appendChild(group);\r\n\r\n if (placeMarkers.length > 1)\r\n {\r\n const select = document.createElement(\"select\");\r\n select.className = \"form-control mb-3\";\r\n\r\n for (let i = 0; i < placeMarkers.length; i++)\r\n {\r\n const label = placeMarkers[i].getTitle();\r\n if (label == null)\r\n {\r\n continue;\r\n }\r\n\r\n const option = document.createElement(\"option\");\r\n option.value = i.toFixed(0);\r\n option.text = label;\r\n\r\n select.appendChild(option);\r\n }\r\n\r\n select.addEventListener(\"change\", (ev) => { if (destination.value != \"\") findDirections(ev); });\r\n\r\n searchElement.prepend(select);\r\n }\r\n\r\n errorElement = document.createElement(\"div\");\r\n errorElement.className = \"alert alert-danger mt-3\";\r\n errorElement.style.display = \"none\";\r\n errorElement.innerText = \"There was an error searching for the specified location.\";\r\n searchElement.appendChild(errorElement);\r\n\r\n directionsService = new google.maps.DirectionsService();\r\n directionsDisplay = new google.maps.DirectionsRenderer();\r\n}\r\n\r\nfunction Initialize()\r\n{\r\n let elem = document.querySelector(\"div[map-element]\");\r\n if (elem != null && (elem instanceof HTMLElement))\r\n {\r\n mapElement = elem;\r\n\r\n const themePath = mapElement.dataset.theme ?? \"/site/map/theme.json\";\r\n $.ajax({\r\n url: themePath,\r\n complete: loadTheme\r\n });\r\n }\r\n\r\n elem = document.querySelector(\"div[map-search]\");\r\n if (elem != null && (elem instanceof HTMLElement))\r\n {\r\n searchElement = elem;\r\n }\r\n\r\n elem = document.querySelector(\"div[map-directions]\");\r\n if (elem != null && (elem instanceof HTMLElement))\r\n {\r\n directionsElement = elem;\r\n }\r\n}\r\n\r\nwindow.InitializeMapView = Initialize;","const documentSliders: GallerySlider[] = [];\r\n\r\nclass GallerySlider\r\n{\r\n private container: HTMLElement;\r\n\r\n constructor(container: HTMLElement)\r\n {\r\n this.container = container;\r\n\r\n const newNodes: Node[] = [];\r\n for (let i = 0; i < this.container.childNodes.length; i++)\r\n {\r\n const child = this.container.childNodes[i];\r\n\r\n if (child.nodeType == Node.ELEMENT_NODE)\r\n {\r\n newNodes.push(child.cloneNode(true));\r\n }\r\n else\r\n {\r\n child.remove();\r\n }\r\n }\r\n\r\n setInterval(() => this.advanceSlider(), 8000);\r\n }\r\n\r\n private advanceSlider()\r\n {\r\n this.container.classList.add(\"tick\");\r\n\r\n setTimeout(() => this.cleanSlider(), 500);\r\n }\r\n\r\n private cleanSlider()\r\n {\r\n const first = this.container.childNodes.item(0);\r\n this.container.appendChild(first);\r\n\r\n this.container.classList.remove(\"tick\");\r\n }\r\n}\r\n\r\nexport function Initialize()\r\n{\r\n const sliders = document.querySelectorAll(\"div.gallery-slider\");\r\n\r\n for (let i = 0; i < sliders.length; i++)\r\n {\r\n documentSliders.push(new GallerySlider(sliders[i] as HTMLElement));\r\n }\r\n}","import '../css/main.scss';\r\n\r\nimport 'jquery-validation';\r\n$.validator.unobtrusive = require('jquery-validation-unobtrusive');\r\nimport 'jssocials';\r\n\r\n/* Bootstrap modules - comment out as required */\r\nimport 'bootstrap/js/dist/alert';\r\nimport 'bootstrap/js/dist/button';\r\nimport 'bootstrap/js/dist/carousel';\r\nimport 'bootstrap/js/dist/collapse';\r\nimport 'bootstrap/js/dist/dropdown';\r\nimport 'bootstrap/js/dist/modal';\r\nimport 'bootstrap/js/dist/tab';\r\n// import 'bootstrap/js/dist/popover';\r\n// import 'bootstrap/js/dist/scrollspy';\r\n// import 'bootstrap/js/dist/toast';\r\n// import 'bootstrap/js/dist/tooltip';\r\n\r\nimport 'lazysizes';\r\nimport 'lazysizes/plugins/parent-fit/ls.parent-fit';\r\n\r\nimport '../../../Components/Base/BaseComponent/Content/Components/StyleSwitcher.ts';\r\n\r\nimport '../../../Components/Base/BaseComponent/Content/components/CKReadMore';\r\nimport '../../../Components/Base/BaseComponent/Content/components/MapOffices';\r\nimport '../../../Components/Base/BaseComponent/Content/components/AjaxPage';\r\n\r\nimport { InitialiseForElement as AjaxFormInitialise } from '../../../Components/Base/BaseComponent/Content/Components/PartialHost';\r\nimport { Initialise as RecaptchaFormInitialise } from '../../../Components/Base/BaseComponent/Content/Components/RecaptchaForm';\r\nimport { Initialize as InitializeGallerySliders } from './components/GallerySlider';\r\n\r\ndocument.body.classList.remove(\"no-js\");\r\ndocument.body.classList.add(\"js\");\r\n\r\n$(function ()\r\n{\r\n const forms = document.querySelectorAll(\"form[data-ajax]\");\r\n for (let i = 0; i < forms.length; i++)\r\n {\r\n if ((forms[i] as HTMLFormElement).dataset.recaptcha)\r\n {\r\n RecaptchaFormInitialise(forms[i] as HTMLFormElement);\r\n }\r\n else\r\n {\r\n AjaxFormInitialise(forms[i] as HTMLFormElement);\r\n }\r\n }\r\n\r\n $(\"[data-socials]\").each(function ()\r\n {\r\n $(this).jsSocials({\r\n showLabel: false,\r\n showCount: false,\r\n url: $(this).data(\"url\"),\r\n shares: [\"facebook\", \"twitter\", \"linkedin\", \"email\"]\r\n });\r\n });\r\n\r\n InitializeGallerySliders();\r\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// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (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};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t179: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunklincolnshire_flooring\"] = self[\"webpackChunklincolnshire_flooring\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [282,883], () => (__webpack_require__(4580)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","PartialQueue","params","this","url","callback","content","xhr","XMLHttpRequest","onreadystatechange","stateChange","abort","readyState","DONE","update","method","open","send","status","getResponse","responseText","updateViewContent","state","targetElement","innerHTML","scripts","querySelectorAll","i","length","scriptElem","scriptInsert","document","createElement","src","appendChild","createTextNode","innerText","trim","remove","forms","form","$","validator","unobtrusive","parse","validate","settings","submitHandler","UpdateState","action","FormData","stateObj","parentElement","RunQueue","item","pop","destroy","window","addEventListener","rootElem","rootElement","siteKey","dataset","recaptcha","recaptchaAction","grecaptcha","ready","execute","then","token","recaptchaCallback","tokenElem","type","name","value","append","SubmitElement","RecaptchaForm","SetActiveStyleSheet","title","a","getElementsByTagName","relAttr","getAttribute","disabled","cookie","nameEq","ca","split","c","charAt","substring","indexOf","readCookie","getPreferredStyleSheet","sheet","getActiveStyleSheet","days","expires","date","Date","setTime","getTime","toUTCString","createCookie","parentElem","ajaxTarget","pageCount","currentPage","loadingMore","scrollWait","parent","totalPages","ajaxUrl","ajaxPageInput","formData","loading","className","testScroll","passive","autoResponse","pageElem","page","toFixed","insertBefore","firstElementChild","classList","hasMorePages","fetchNextPageUrl","add","replace","setRequestHeader","fetchNextPageForm","set","urlParams","URLSearchParams","toString","testScrollEnd","parentPosition","getBoundingClientRect","bottom","y","height","scrollY","clearTimeout","setTimeout","create","pagesUrl","pagesForm","pagesCount","getElementById","tagName","AjaxPage","parseInt","autoElements","ToggleReadMore","ev","preventDefault","currentTarget","HTMLButtonElement","toggle","elems","map","infoWindow","initialZoom","directionsService","directionsDisplay","mapStyle","mapElement","searchElement","directionsElement","errorElement","placeMarkers","Array","toggleMarker","placemark","marker","close","infoContent","imageFilename","address","lineOne","lineTwo","town","county","postalCode","google","maps","InfoWindow","loadTheme","data","responseJSON","apiPath","ajax","complete","loadXmlDocument","placemarks","JSON","Map","zoom","center","LatLng","mapTypeId","MapTypeId","ROADMAP","styles","point","latitude","longitude","Marker","position","icon","event","addListener","nopopup","push","MarkerClusterer","markers","bounds","LatLngBounds","forEach","getPosition","extend","zoomChangeBoundsListener","currentZoom","getZoom","setZoom","removeListener","fitBounds","findMapCenterAndZoom","group","destination","autocomplete","placeholder","findDirectionsKeyDown","button","findDirections","select","label","getTitle","option","text","prepend","style","display","DirectionsService","DirectionsRenderer","setupDirections","key","attributes","getNamedItem","inputElem","querySelector","fromAddress","setMap","setPanel","locationSelect","route","origin","travelMode","TravelMode","DRIVING","unitSystem","UnitSystem","IMPERIAL","provideRouteAlternatives","displayDirections","result","DirectionsStatus","OK","setDirections","InitializeMapView","elem","HTMLElement","themePath","theme","documentSliders","container","newNodes","childNodes","child","nodeType","Node","ELEMENT_NODE","cloneNode","setInterval","advanceSlider","cleanSlider","first","sliders","GallerySlider","body","each","jsSocials","showLabel","showCount","shares","Initialize","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","call","m","O","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","j","Object","keys","every","splice","r","n","getter","__esModule","d","definition","o","defineProperty","enumerable","get","g","globalThis","Function","e","obj","prop","prototype","hasOwnProperty","Symbol","toStringTag","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","id","chunkLoadingGlobal","self","bind","__webpack_exports__"],"sourceRoot":""}