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nBvE,WAAWoN,QAAQugB,QAAQppB,EAC/B,CACJ,GACJ,C,2FCnEA,MAAMwsB,EAAgB,MACTntB,IAAI4E,GAAG0V,aAEP8S,EAAsB,KAAK,KAAMX,OAdgC5qB,EAcE,YAC5E,GAAIsrB,IACA,aAEE,8DACA,OAAQA,GACd,MAAME,EAAUrtB,IAAI4E,GAAG0V,aAAavV,YACpCsoB,EAAQC,iBAAmB,QAC3BD,EAAQE,SAASC,SAAW,KAC5BH,EAAQE,SAASE,SAAW,UAChC,EAtBW,KAFgE1rB,OAcH,KAZlDA,EAAIC,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAU7P,GAAS,IAAM8P,EAAKP,EAAUQ,KAAK/P,GAAS,CAAE,MAAO8M,GAAK8C,EAAO9C,EAAI,CAAE,CAC1F,SAASkD,EAAShQ,GAAS,IAAM8P,EAAKP,EAAiB,MAAEvP,GAAS,CAAE,MAAO8M,GAAK8C,EAAO9C,EAAI,CAAE,CAC7F,SAASgD,EAAKvG,GAJlB,IAAevJ,EAIauJ,EAAO0G,KAAON,EAAQpG,EAAOvJ,QAJ1CA,EAIyDuJ,EAAOvJ,MAJhDA,aAAiByP,EAAIzP,EAAQ,IAAIyP,GAAE,SAAUE,GAAWA,EAAQ3P,EAAQ,KAIjBkQ,KAAKL,EAAWG,EAAW,CAC7GF,GAAMP,EAAYA,EAAUY,MAQoB,UARS,KAAKJ,OAClE,IAPwC,IAA+BN,EAAGF,CAwB5E,G","sources":["webpack://@whistleout/webui/./Areas/Widgets/js/common/utils/QueryStringHelper.js","webpack://@whistleout/webui/./Areas/Widgets/js/common/utils/ReferrerHelper.js","webpack://@whistleout/webui/./Areas/Broadband/js/redux/broadbandApi.ts","webpack://@whistleout/webui/./Areas/Broadband/js/redux/broadbandSlice.ts","webpack://@whistleout/webui/./Areas/Broadband/js/redux/modalSlice.ts","webpack://@whistleout/webui/./Areas/Broadband/js/redux/searchSlice.ts","webpack://@whistleout/webui/./Areas/Shared/js/EmailMySearch.ts","webpack://@whistleout/webui/./Areas/Shared/js/vendor/deferred/slick.ts","webpack://@whistleout/webui/./Areas/Shared/js/common/core.ts","webpack://@whistleout/webui/./Areas/Shared/js/common/common.ts","webpack://@whistleout/webui/./Areas/Shared/js/utils/queryString.ts","webpack://@whistleout/webui/./Areas/Shared/js/common/rollbar.ts","webpack://@whistleout/webui/./Areas/Shared/js/polyfills/IdleCallback.ts","webpack://@whistleout/webui/./Areas/Shared/js/redux/sharedSlice.ts","webpack://@whistleout/webui/./Areas/Shared/js/redux/rootReducer.ts","webpack://@whistleout/webui/./Areas/Shared/js/redux/store.ts","webpack://@whistleout/webui/./Areas/Shared/js/utils/array.ts","webpack://@whistleout/webui/./Areas/Shared/js/utils/datalayer.ts","webpack://@whistleout/webui/./Areas/Shared/js/utils/timer.ts","webpack://@whistleout/webui/./Areas/Shared/js/vendor/deferred/bootstrap-select.ts"],"sourcesContent":["export function appendQueryParam(queryString, param) {\n var value = queryString;\n if (value.length > 0) value += '&';\n\n value += param;\n return value;\n}\n\nexport function updateQueryStringParameter(url, key, value) {\n if (url == null) return null;\n if (key == null) return url;\n\n var regex = new RegExp('(' + key + '=[^&]*)&?', 'i');\n var separator = url.indexOf('?') !== -1 ? '&' : '?';\n var result;\n if (url.match(regex)) {\n if (value === null || typeof value === 'undefined' || value.length === 0) {\n result = url.replace(regex, '').replace(/&$/, '');\n } else {\n result = url.replace(regex, key + '=' + value + '&').replace(/&$/, '');\n }\n }\n else {\n if (value === null || typeof value === 'undefined' || value.length === 0) {\n result = url;\n } else {\n result = url + separator + key + '=' + value;\n }\n }\n\n return result;\n}\n\nexport function getQueryStringParameter(name, url) {\n if (!url) url = window.location.href;\n // eslint-disable-next-line no-useless-escape\n name = name.replace(/[\\[\\]]/g, '\\\\$&');\n var regex = new RegExp('(^|[?&])' + name + '(=([^&#]*)|&|#|$)');\n\n var matches = regex.exec(url);\n if (!matches) return null;\n\n var match = matches[3];\n if (!match) return '';\n return decodeURIComponent(match.replace(/\\+/g, ' '));\n}","import * as QueryStringHelper from './QueryStringHelper';\n\nexport function getReferrerEncoded() {\n return QueryStringHelper.getQueryStringParameter('_r') || encodeURIComponent(document.referrer);\n}\n","import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react';\nexport const broadbandApi = createApi({\n reducerPath: 'broadband/api',\n baseQuery: fetchBaseQuery({ baseUrl: '/' }),\n endpoints: builder => ({\n getSearchResults: builder.query({\n query: ({ baseUrl, queryString }) => {\n return queryString.length ? `${baseUrl}?${queryString}` : baseUrl;\n }\n }),\n getTransactUrl: builder.query({\n query: args => {\n const queryParams = new URLSearchParams(args);\n return `/Ajax/Broadband/Product/GetTransactUrl/?${queryParams.toString()}`;\n }\n })\n })\n});\n","import { createSlice } from '@reduxjs/toolkit';\nimport { combineReducers } from 'redux';\nimport modal from './modalSlice';\nimport search from './searchSlice';\nexport const mapSearchModelToState = (searchModel) => {\n const state = {\n criteria: searchModel.state.criteria,\n settings: {\n coverageUrl: searchModel.coverageUrl,\n searchUrl: searchModel.searchUrl,\n resultsSearchCriteria: searchModel.state.criteria,\n pagedResultsUrl: searchModel.pagedResultsUrl,\n suppressCoverageCheck: searchModel.suppressCoverageCheck,\n embeddedMode: searchModel.embeddedMode,\n enforceAjax: searchModel.embeddedMode,\n allConnectionsSelected: searchModel.state.allConnectionsSelected,\n coverage: searchModel.state.coverage,\n hideSupplierFilter: searchModel.state.hideSupplierFilter,\n showMaxUpfrontSlider: searchModel.state.showMaxUpfrontSlider,\n suppliers: searchModel.state.suppliers,\n unavailableConnectionTypes: searchModel.state.unavailableConnectionTypes,\n defaultSearchCriteria: searchModel.defaultSearchCriteria,\n defaultPrepaidExpiryDays: searchModel.defaultPrepaidExpiryDays\n }\n };\n if (searchModel.filters) {\n state.settings.allContractTerms = searchModel.filters.allContractTerms;\n state.settings.defaultSuppliers = searchModel.filters.defaultSuppliers;\n }\n return state;\n};\nconst broadbandSlice = createSlice({\n name: 'broadband',\n initialState: {},\n reducers: {\n init(state, action) {\n state.search = mapSearchModelToState(action.payload);\n }\n }\n});\nconst features = combineReducers({\n search,\n modal\n});\nexport default function broadbandReducer(state, action) {\n const featuresState = features(state, action);\n return broadbandSlice.reducer(featuresState, action);\n}\nexport const actions = broadbandSlice.actions;\n","import { createSelector, createSlice } from '@reduxjs/toolkit';\nimport { produce } from 'immer';\nimport includes from 'lodash/includes';\nimport isEqual from 'lodash/isEqual';\nconst initialState = {};\nconst modalSlice = createSlice({\n name: 'broadband/modal',\n initialState,\n reducers: {\n showModal(state, action) {\n // Should we just select the first one by default?\n state.activeTab = action.payload.tabName || 'spend';\n state.criteria = produce(action.payload.criteria, draft => {\n return draft;\n });\n state.isOpen = true;\n },\n hideModal(state) {\n state.isOpen = false;\n // Reset search criteria\n state.criteria = {};\n },\n selectTab(state, action) {\n state.activeTab = action.payload;\n },\n updateCriteria(state, action) {\n if (isEqual(state.criteria, action.payload)) {\n return;\n }\n state.criteria = action.payload;\n },\n updateData(state, action) {\n state.criteria.data = action.payload;\n },\n updatePeakDataOnly(state, action) {\n state.criteria.peakDataOnly = action.payload;\n },\n updateSpeed(state, action) {\n state.criteria.speed = action.payload;\n },\n updateSpend(state, action) {\n const { min, max } = action.payload;\n state.criteria.common.minimumSpend = min;\n state.criteria.common.maximumSpend = max;\n },\n updateUpfront(state, action) {\n state.criteria.common.maximumUpfront = action.payload;\n },\n updateSelectedSuppliers(state, action) {\n const { keys, customerType } = action.payload;\n state.criteria.common.suppliers.values = keys;\n state.criteria.common.customerType = customerType;\n },\n updateCustomerType(state, action) {\n state.criteria.common.customerType = action.payload;\n },\n updateContractTerms(state, action) {\n const { selected, all } = action.payload;\n state.criteria.common.contractTerms = selected && selected.length === all.length ? [] : selected;\n },\n updateAdvancedOptions(state, action) {\n const options = action.payload;\n state.criteria.common.maxResultsPerSupplier = includes(options, 'single-result') ? 1 : null;\n state.criteria.staticIp = includes(options, 'static-ip');\n state.criteria.uploadNotCounted = includes(options, 'upload-not-counted');\n state.criteria.common.showLessResults = includes(options, 'less-results');\n },\n updatePrepaidExpiry(state, action) {\n state.criteria.prepaidExpiry = action.payload;\n },\n updateCurrentSupplier(state, action) {\n state.criteria.common.currentSupplierShortUrl = action.payload;\n },\n updateIncludeDealsOnly(state, action) {\n state.criteria.common.includeOffersWithCampaignOnly = action.payload;\n },\n updatePhoneBundle(state, action) {\n state.criteria.bundles.homePhone = action.payload;\n },\n updatePhoneCallsBundle(state, action) {\n state.criteria.bundles.homePhoneCalls = action.payload;\n },\n updateTvBundle(state, action) {\n state.criteria.bundles.tv = action.payload;\n },\n updateTvChannels(state, action) {\n state.criteria.bundles.tvChannels = action.payload;\n },\n updateLineRentalBundle(state, action) {\n state.criteria.bundles.lineRental = action.payload;\n },\n updateMobileBundle(state, action) {\n state.criteria.bundles.mobilePhone = action.payload;\n },\n updateModem(state, action) {\n const { modemShortUrl, simOnly } = action.payload;\n state.criteria.modemShortUrl = modemShortUrl;\n state.criteria.simOnly = simOnly;\n },\n updateConnectionTypes(state, action) {\n state.criteria.connectionTypes.values = action.payload;\n },\n addressChanged(state) {\n // Reset suppliers and bundles criteria\n state.criteria.common.suppliers = {\n values: []\n };\n state.criteria.common.customerType = null;\n state.criteria.bundles = {};\n }\n }\n});\nexport default modalSlice.reducer;\nexport const actions = modalSlice.actions;\nexport const selectModal = createSelector((state) => state === null || state === void 0 ? void 0 : state.broadband, p => p.modal);\n","import { createSelector, createSlice } from '@reduxjs/toolkit';\nimport { produce } from 'immer';\nimport defaultTo from 'lodash/defaultTo';\nimport isEqual from 'lodash/isEqual';\nconst initialState = {};\nconst sliceName = 'broadband/search';\nconst slice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n disableMaximumResultLimits(state) {\n state.criteria.common.enforceMaximumResultLimits = false;\n state.settings.enforceAjax = true;\n },\n hideFeaturedResults(state) {\n state.criteria.common.includeFeaturedResults = false;\n state.settings.enforceAjax = true;\n },\n includeNbnConnections(state, action) {\n const nbnConnectionTypes = action.payload;\n if (Array.isArray(nbnConnectionTypes)) {\n state.criteria.connectionTypes.values = [\n ...state.criteria.connectionTypes.values,\n ...nbnConnectionTypes\n ];\n }\n else {\n state.criteria.connectionTypes.values.push(nbnConnectionTypes);\n }\n },\n resetBundles(state) {\n state.criteria.bundles = {};\n },\n searchError(state) {\n return state;\n },\n searchSuccess(state, action) {\n const result = action.payload;\n return produce(state, p => {\n // TODO: Remove 'values' property and use simple array\n // Remove unused isAll and isEmpty fields\n //p.search.criteria.common.suppliers = result.criteria.common.suppliers.values;\n p.settings.suppliers = result.suppliers;\n p.settings.coverage = result.coverage;\n p.settings.unavailableConnectionTypes = result.unavailableConnectionTypes;\n p.settings.allConnectionsSelected = result.allAvailableConnectionsSelected;\n p.settings.hideSupplierFilter = result.hideSupplierFilter;\n p.settings.resultsSearchCriteria = result.criteria;\n });\n },\n updateAddress(state, action) {\n if (isEqual(state.criteria.common.address, action.payload)) {\n return state;\n }\n const baseCriteria = state.settings.embeddedMode ? state.settings.defaultSearchCriteria : state.criteria;\n state.settings.enforceAjax = false;\n state.criteria = produce(baseCriteria, draft => {\n var _a;\n draft.common.address = action.payload;\n const defaultSuppliers = state.settings.defaultSuppliers;\n draft.common.suppliers.values = defaultSuppliers && defaultSuppliers.length ? defaultSuppliers : [];\n draft.common.tab = WhistleOut.getSiteConfiguration().broadbandConfig.defaultTab;\n draft.connectionTypes.values = [];\n draft.bundles = {};\n const isSingleProvider = ((_a = state.criteria.common.suppliers.values) === null || _a === void 0 ? void 0 : _a.length) === 1;\n draft.common.enforceMaximumResultLimits = !isSingleProvider;\n // Preserve original criteria\n draft.speed = state.criteria.speed;\n draft.data = state.criteria.data;\n });\n },\n //changeBundles\n updateBundles(state, action) {\n const bundles = action.payload;\n state.criteria.bundles.homePhone = bundles.homePhone;\n state.criteria.bundles.tv = bundles.tv;\n state.criteria.bundles.lineRental = bundles.lineRental;\n state.criteria.bundles.mobilePhone = bundles.mobilePhone;\n },\n updateConnectionTypes(state, action) {\n state.settings.allConnectionsSelected = null;\n state.criteria.connectionTypes.values = Array.isArray(action.payload) ? action.payload : [action.payload];\n },\n // changeContractType\n updateContractType(state, action) {\n const { contractType, hide } = action.payload;\n if (contractType === 'prepaid') {\n return state;\n }\n const contractTerms = defaultTo(parseInt(contractType), null);\n if (hide === true) {\n if (state.criteria.common.contractTerms && state.criteria.common.contractTerms.length > 1) {\n state.criteria.common.contractTerms = state.criteria.common.contractTerms.filter(c => c !== contractTerms);\n }\n else {\n state.criteria.common.contractTerms = state.settings.allContractTerms.filter(c => c !== contractTerms);\n }\n }\n else {\n state.criteria.common.contractTerms = [contractTerms];\n }\n },\n updateCriteria(state, action) {\n if (isEqual(state, action.payload)) {\n return state;\n }\n state.settings.allConnectionsSelected = null;\n state.criteria = produce(action.payload, draft => {\n if (state.criteria.modemShortUrl !== draft.modemShortUrl) {\n draft.common.tab = null;\n }\n });\n },\n // changeData\n updateData(state, action) {\n if (action.payload === state.criteria.data) {\n return state;\n }\n state.criteria.data = action.payload;\n state.criteria.common.results.productLabel = null;\n },\n //changeModem\n updateModem(state, action) {\n if (action.payload === state.criteria.modemShortUrl) {\n return;\n }\n state.criteria.modemShortUrl = action.payload;\n state.settings.enforceAjax = true;\n },\n // planSummarySupplierChanged\n updatePlanSummarySupplier(state, action) {\n const { supplier, maxResults } = action.payload;\n state.criteria.common.suppliers.values = supplier ? [supplier] : [];\n state.criteria.common.enforceMaximumResultLimits = supplier ? false : true;\n state.criteria.common.tab = '';\n state.criteria.common.results.maximumNumberOfResults = maxResults;\n state.settings.enforceAjax = true;\n },\n // changeSort\n updateSort(state, action) {\n const { expression, isAscending } = action.payload;\n state.criteria.common.resultsSortExpression = expression;\n state.criteria.common.resultsSortAscending = isAscending;\n state.settings.enforceAjax = true;\n },\n // changeSpeed\n updateSpeed(state, action) {\n if (action.payload === state.criteria.speed) {\n return state;\n }\n state.criteria.speed = action.payload;\n state.criteria.common.results.productLabel = null;\n },\n // changeSpend\n updateSpend(state, action) {\n const { minValue, maxValue } = action.payload;\n const commonCriteria = state.criteria.common;\n if ((minValue === commonCriteria.minimumSpend || (minValue === -1 && !commonCriteria.minimumSpend)) &&\n (maxValue === commonCriteria.maximumSpend || (maxValue === -1 && !commonCriteria.maximumSpend))) {\n return state;\n }\n commonCriteria.maximumSpend = maxValue;\n commonCriteria.minimumSpend = minValue;\n },\n // changeSupplier\n updateSuppliers(state, action) {\n state.criteria.common.suppliers = {\n values: Array.isArray(action.payload) ? action.payload : [action.payload]\n };\n state.settings.enforceAjax = true;\n },\n // changeTab(value) {\n updateTab(state, action) {\n state.criteria.common.tab = action.payload;\n },\n widenResults(state, action) {\n const options = action.payload;\n if (options.reduceData) {\n state.criteria.data = 0;\n }\n if (options.increasePriceRange) {\n state.criteria.common.maximumSpend = -1;\n state.criteria.common.minimumSpend = 0;\n }\n if (options.includeAllContractLengths) {\n state.criteria.common.contractTerms = [];\n }\n if (options.includeAllSuppliers === true) {\n state.criteria.common.suppliers = { values: [] };\n }\n if (options.reduceSpeed === true) {\n state.criteria.speed = 0;\n }\n if (options.noPeakData === true) {\n state.criteria.peakDataOnly = false;\n }\n if (options.includeMoreConnectionTypes === true) {\n state.criteria.connectionTypes = { values: [] };\n }\n if (options.noDealsOnly === true) {\n state.criteria.common.includeOffersWithCampaignOnly = false;\n }\n if (options.includeAllPrepaidExpiry === true) {\n state.criteria.prepaidExpiry = null;\n }\n if (options.removeSelectedModem === true) {\n state.criteria.modemShortUrl = null;\n state.criteria.simOnly = false;\n }\n if (options.noUploadCounted === true) {\n state.criteria.uploadNotCounted = false;\n }\n if (options.noStaticIp === true) {\n state.criteria.staticIp = false;\n }\n if (options.noBundling === true) {\n state.criteria.bundles.tv = null;\n state.criteria.bundles.homePhone = null;\n state.criteria.bundles.lineRental = null;\n state.criteria.bundles.mobilePhone = null;\n }\n if (options.sortBy === true) {\n state.criteria.common.resultsSortExpression = null;\n state.criteria.common.resultsSortAscending = true;\n }\n }\n }\n});\nexport const actions = slice.actions;\nconst extraSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {},\n extraReducers: builder => {\n builder.addCase(slice.actions.searchSuccess, (state, action) => {\n slice.reducer(state, actions.updateCriteria(action.payload.criteria));\n });\n }\n});\nexport default function broadbandReducer(state, action) {\n return extraSlice.reducer(slice.reducer(state, action), action);\n}\nexport const selectCriteria = createSelector((state) => state, state => state.broadband.search.criteria);\n","export const EmailMySearch = {\n onSubmitClick: function (e) {\n const localContent = e.data.content;\n const email = localContent.find('input[data-email-address]');\n if (!e.data.emailMySearch.validateEmail(email, localContent)) {\n return;\n }\n const listId = localContent.find('[data-listid]').data('listid');\n const isSubscribeToNewsLetter = localContent.find('input[type=\"checkbox\"]').is(':checked');\n const data = {\n email: email.val(),\n listId: listId,\n searchUrl: window.location.href,\n isSubscribeToNewsLetter: isSubscribeToNewsLetter,\n token: wo$('#turnstile-response').val()\n };\n localContent.find('.fa-spinner').show();\n wo$.ajax({\n url: '/Marketing/SendVerificationEmail',\n data: data,\n type: 'POST',\n beforeSend: function () {\n localContent.find('button[data-save-search-submit]').prop('disabled', true);\n localContent.find('[data-invalid-email], [data-error]').hide();\n },\n success: function (data) {\n if (data.IsVerificationEmailSent) {\n const successMessage = localContent\n .find('[data-success-message]')\n .data('message')\n .replace('CustomerEmailAddress', email.val());\n localContent.find('[data-success-message]').html(successMessage);\n localContent.find('[data-invalid-email], [data-error], [data-formrow]').hide();\n localContent.find('[data-success]').show();\n }\n else if (data.IsVerifiedAlready) {\n localContent.find('[data-invalid-email], [data-error], [data-formrow]').hide();\n localContent.find('[data-verified-already]').show();\n }\n else {\n localContent.find('[data-error]').show();\n }\n },\n error: function () {\n localContent.find('[data-invalid-email]').hide();\n localContent.find('[data-error]').show();\n },\n complete: function () {\n localContent.find('.fa-spinner').hide();\n localContent.find('button[data-save-search-submit]').prop('disabled', false);\n if (WhistleOut.turnstileId && window.turnstile) {\n window.turnstile.reset(WhistleOut.turnstileId);\n }\n }\n });\n },\n modalInit: function (initContent) {\n this.modalContent = initContent;\n initContent.find('[data-invalid-email]').hide();\n initContent.on('show.bs.modal', () => {\n initContent.find('[data-formrow]').show();\n initContent.find('[data-invalid-email], [data-error], [data-success]').hide();\n initContent.find('input[type=\"checkbox\"]').prop('checked', false);\n initContent.find('input[data-email-address]').val('');\n initContent.find('div[data-formrow]').show();\n initContent.find('div[data-email-success]').hide();\n initContent.find('div[data-subscribe-success]').hide();\n initContent.find('[data-verified-already]').hide();\n initContent\n .find('button[data-save-search-submit]')\n .off('click')\n .on('click', { content: initContent, emailMySearch: this }, this.onSubmitClick);\n });\n },\n adInit: function (initContent, submitButton) {\n this.adContent = initContent;\n initContent.find('[data-invalid-email]').hide();\n if (submitButton) {\n submitButton.off('click').on('click', { content: initContent, emailMySearch: this }, this.onSubmitClick);\n }\n },\n validateEmail: function (email, content) {\n const config = WhistleOut.getSiteConfiguration();\n const regex = new RegExp(config.regex.email);\n if (!email.val() || !regex.test(email.val())) {\n content.find('[data-invalid-email]').show();\n return false;\n }\n return true;\n }\n};\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nexport function initSlick() {\n return __awaiter(this, void 0, void 0, function* () {\n if (wo$().slick) {\n return;\n }\n yield import('./slick.nomodule');\n });\n}\n","// TODO: Enable eslint rules and fix the code\n/* eslint-disable eqeqeq */\nexport class WhistleOutCore {\n showSiteNotice() {\n try {\n const siteNotice = wo$('#siteNotice');\n const divWrapper = siteNotice.children().first();\n if (divWrapper && divWrapper.length > 0) {\n const key = divWrapper.data('cookie-key') || 'SiteNotice';\n const expirationInHours = divWrapper.data('cookie-expiry');\n let slideTime = divWrapper.data('slide-duration');\n if (slideTime)\n slideTime = 300;\n let expirationDate;\n if (expirationInHours && expirationInHours > 0) {\n expirationDate = new Date();\n expirationDate.setTime(expirationDate.getTime() + expirationInHours * 60 * 60 * 1000);\n }\n else {\n expirationDate = null;\n }\n if (Cookies.get(key) == undefined) {\n const closeButton = siteNotice.find('#siteNoticeClose');\n if (closeButton && closeButton.length > 0) {\n if (slideTime == 0)\n siteNotice.toggle();\n else\n siteNotice.slideToggle(slideTime);\n closeButton.click(function () {\n siteNotice.slideToggle(slideTime);\n Cookies.set(key, '', { path: '/', expires: expirationDate });\n });\n }\n else {\n if (slideTime == 0)\n siteNotice.toggle();\n else\n siteNotice.slideToggle(slideTime);\n Cookies.set(key, '', { path: '/', expires: expirationDate });\n }\n }\n }\n }\n catch (e) {\n // TODO: Use 'instanceof' to only ignore errors of a certain type, and re-throw others\n }\n }\n bindExpressNotice() {\n wo$('#expressDisable').click(function () {\n const config = WhistleOut.getSiteConfiguration();\n Cookies.remove(config.cookieName, {\n path: '/',\n domain: config.cookieDomain\n });\n if (location.href.indexOf('adi=') === -1) {\n location.reload();\n }\n else {\n const url = WhistleOut.updateQueryStringParameter(location.href, 'adi', null);\n location.href = url;\n }\n });\n }\n bindTopNav() {\n wo$('#site-search-form').show();\n wo$('#site-search-query, #site-search-query-2').on('keydown', e => {\n if (e.which === 13) {\n WhistleOut.Core.search(wo$(e.currentTarget).val());\n return false;\n }\n });\n wo$('#search-term').on('keydown', e => {\n const target = wo$(e.currentTarget);\n if (e.which === 13 && target.val() && target.val().length) {\n WhistleOut.Core.search(target.val());\n return false;\n }\n });\n wo$('#search-term-button').on('click', () => {\n if (wo$('#search-term').val() && wo$('#search-term').val().length) {\n WhistleOut.Core.search(wo$('#search-term').val());\n }\n return false;\n });\n // Most likely based on https://stackoverflow.com/questions/36414922/how-to-keep-the-bootstrap-pop-over-enable-until-the-form-is-filled/36421312#36421312\n // Example: https://jsfiddle.net/sfw36go1/\n const popoverProto = () => wo$.fn.popover;\n const originalLeave = popoverProto().Constructor.prototype.leave;\n popoverProto().Constructor.prototype.leave = function (obj) {\n const self = obj instanceof this.constructor\n ? obj\n : wo$(obj.currentTarget)[this.type](this.getDelegateOptions())\n .data('bs.' + this.type);\n let container;\n let timeout;\n originalLeave.call(this, obj);\n if (obj.currentTarget) {\n container = wo$(obj.currentTarget).siblings('.popover');\n timeout = self.timeout;\n container.one('mouseenter', function () {\n clearTimeout(timeout);\n container.one('mouseleave', function () {\n popoverProto().Constructor.prototype.leave.call(self, self);\n });\n });\n }\n };\n const nav = wo$('.navbar');\n nav.find('a.dropdown-toggle').on('click', e => {\n const target = wo$(e.currentTarget);\n if (!nav.hasClass('in') && target.siblings('ul.dropdown-menu').is(':visible')) {\n const href = target.attr('href');\n location.href = href;\n }\n });\n wo$('.navbar').on('click', '#site-search-button-2', function () {\n const query = wo$('#site-search-query-2').val();\n WhistleOut.Core.search(query);\n });\n }\n search(query) {\n const url = wo$('#site-search').data('url');\n window.location.href = url + '?q=' + encodeURIComponent(query);\n }\n checkCountry() {\n try {\n if ((Cookies.get('woCountrySelector') == null || typeof Cookies.get('woCountrySelector') === 'undefined') &&\n document.referrer.indexOf('.whistleout.') === -1) {\n Cookies.set('woCountrySelector', '', { path: '/' });\n const config = WhistleOut.getSiteConfiguration();\n if (config.enableGeoCheck) {\n wo$.ajax({\n url: 'https://www.whistleout.com.au/cdn-cgi/trace',\n type: 'GET',\n success: function (result) {\n const matches = result.match('loc=(.{2})');\n if (matches && matches.length === 2) {\n let country = 0;\n switch (matches[1]) {\n case 'AU':\n country = 1;\n break;\n case 'US':\n country = 3;\n break;\n case 'CA':\n country = 5;\n break;\n case 'MX':\n country = 8;\n break;\n }\n if (country > 0 && country !== config.country) {\n WhistleOut.Core.showCountrySwitcher(country);\n }\n }\n }\n });\n }\n }\n }\n catch (e) {\n // TODO: Use 'instanceof' to only ignore errors of a certain type, and re-throw others\n }\n }\n showCountrySwitcher(country) {\n try {\n const data = {\n country: country\n };\n wo$.ajax({\n url: '/Layout/CountrySwitcher',\n data: data,\n type: 'GET',\n success: function (result) {\n if (result !== '') {\n wo$('#country-switcher-container').html(result);\n wo$('#country-switcher-modal').modal('show');\n }\n }\n });\n }\n catch (e) {\n // TODO: Use 'instanceof' to only ignore errors of a certain type, and re-throw others\n }\n }\n bindLinkStrip() {\n const strip = wo$('#suggested-articles');\n strip.affix({\n offset: { top: 400 }\n });\n wo$('#suggested-articles-close').on('click', function () {\n const expires = new Date();\n expires.setTime(expires.getTime() + 60 * 60 * 1000);\n Cookies.set('ShowStickyBottomStrip', '0', { path: '/', expires: expires });\n strip.hide();\n });\n }\n bindAdminLinks() {\n let timeout;\n wo$('#admin-links').hover(e => {\n clearTimeout(timeout);\n const target = wo$(e.currentTarget);\n target.animate({\n height: target.get(0).scrollHeight,\n opacity: 1\n }, 250);\n }, e => {\n const target = wo$(e.currentTarget);\n timeout = setTimeout(() => {\n target.animate({\n height: '30px',\n opacity: 0.7\n }, 250);\n }, 1000);\n });\n wo$('#admin-purge-cache').click(function () {\n if (confirm('Are you sure you want to purge this page from the cache?')) {\n const data = {\n url: location.href\n };\n wo$.ajax({\n url: '/Internal/Shared/Infrastructure/PurgeCacheUrl',\n type: 'POST',\n data: data,\n success: function () {\n alert('Success!');\n },\n error: function () {\n alert('An error has occurred purging this URL from the cache');\n }\n });\n }\n });\n }\n init() {\n wo$(() => {\n this.showSiteNotice();\n this.bindExpressNotice();\n this.bindAdminLinks();\n this.bindTopNav();\n this.bindLinkStrip();\n });\n }\n}\n","/* globals ga, gtag */\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { v4 as uuidv4 } from 'uuid';\nimport * as QueryStringHelper from '../../../Widgets/js/common/utils/QueryStringHelper';\nimport * as ReferrerHelper from '../../../Widgets/js/common/utils/ReferrerHelper';\nimport { EmailMySearch } from '../EmailMySearch';\nimport { getState } from '../redux/store';\nimport { initDataLayer, pushDataLayerItem } from '../utils/datalayer';\nimport * as queryStringUtils from '../utils/queryString';\nimport { tryWaitFor } from '../utils/timer';\nimport * as deferred from '../vendor/deferred';\nimport { WhistleOutCore } from './core';\nimport { rollbar } from './rollbar';\nwindow['wo$'] = window['wo$'] || jQuery.noConflict();\nwindow.jQuery = window.jQuery || window['wo$'];\nwindow.Cookies = window.Cookies || Cookies;\nconst scrollDefaultDuration = 500;\nconst scrollDefaultOffset = -100;\nexport class WhistleOutContext {\n constructor() {\n this.scope = 'shared';\n this.Core = new WhistleOutCore();\n this.notifications = wo$.Callbacks('unique');\n this.getQueryStringParameter = QueryStringHelper.getQueryStringParameter;\n this.appendQueryParam = QueryStringHelper.appendQueryParam;\n this.updateQueryStringParameter = QueryStringHelper.updateQueryStringParameter;\n this.endProgressEventName = 'endProgressEvent';\n this.pushDataLayerItem = pushDataLayerItem;\n this.applyPopover = (container) => {\n if (typeof container !== 'undefined') {\n container.find('[data-toggle=\"popover\"]').popover({ html: true });\n }\n wo$('[data-toggle=\"popover\"]').popover({ html: true });\n wo$('body').off('click', this.hideAllPopovers).on('click', this.hideAllPopovers);\n wo$('body')\n .off('hidden.bs.popover')\n .on('hidden.bs.popover', e => {\n if (wo$(e.target).data('bs.popover')) {\n wo$(e.target).data('bs.popover').inState.click = false;\n }\n });\n };\n this.storeSelectorModal = {\n show: function (selectedHandler) {\n const modal = wo$('#store-selector-modal');\n if (!modal.length)\n return;\n modal.keyup(e => {\n if (e.keyCode === 13) {\n this.submitStoreSelectorModal(selectedHandler);\n }\n });\n modal.find('#continue-button').click(() => {\n this.submitStoreSelectorModal(selectedHandler);\n });\n const $staff = modal.find('#staff');\n if ($staff.length > 0) {\n $staff.typeahead({\n minLength: 2,\n items: 'all',\n addItem: {\n id: 0,\n code: 'Other',\n name: 'Other'\n },\n source: function (query, process) {\n return wo$.ajax({\n url: '/Store/FindStaff',\n data: { search: query },\n dataType: 'json',\n type: 'POST',\n success: function (json) {\n return process(json);\n }\n });\n },\n afterSelect: function (item) {\n $staff.data('id', item.id);\n $staff.data('code', item.code);\n $staff.data('name', item.name);\n },\n matcher: function () {\n return true;\n },\n displayText: function (item) {\n return item.code ? item.name + ' (' + item.code + ')' : item.name;\n }\n });\n }\n const siteConfiguration = this.getSiteConfiguration();\n const currentStoreId = Cookies.get(siteConfiguration.selectedStoreCookieKey);\n if (currentStoreId) {\n modal.find('#store-select').val(currentStoreId);\n }\n modal.modal('show').on('shown.bs.modal', function () {\n modal.find('#staff').focus();\n });\n }\n };\n this.privateDataModalId = 'modal-privatedata';\n this.initialised = [];\n }\n initializeRollbar() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.Rollbar) {\n return;\n }\n this.config.rollbar = Object.assign(rollbar.config, this.config.rollbar);\n const siteConfig = this.getSiteConfiguration();\n if (siteConfig) {\n if (siteConfig.rollbarKey)\n rollbar.config.token = siteConfig.rollbarKey;\n if (siteConfig.rollbarEnvironment)\n rollbar.config.env = siteConfig.rollbarEnvironment;\n if (siteConfig.anonymiseTracking)\n rollbar.config.captureIp = siteConfig.anonymiseTracking !== true;\n }\n yield rollbar.init();\n this.Rollbar = rollbar.instance;\n });\n }\n readLookupData(parent, force) {\n if (!parent)\n throw Error('parent needs to be provided');\n if (force === true) {\n // Use attr instead to prevent jquery from caching client side data as it does not get updated when DOM is manipulated\n return JSON.parse(parent.find('div[data-client-side-data]').attr('data-client-side-data'));\n }\n return parent.find('div[data-client-side-data]').data('clientSideData');\n }\n setLookupData(parent, data) {\n if (!parent)\n throw Error('parent needs to be provided');\n return parent.find('div[data-client-side-data]').data('clientSideData', data);\n }\n getCurrentLocation(successCallback, failCallback) {\n this.getCurrentLocationViaHtml5(successCallback, () => {\n this.getCurrentLocationViaApi(successCallback, failCallback);\n });\n }\n getCurrentLatLng(successCallback, failCallback) {\n this.getCurrentLatLngViaHtml5(successCallback, () => {\n this.getCurrentLatLngViaApi(successCallback, failCallback);\n });\n }\n getCurrentLatLngViaHtml5(successCallback, failCallback) {\n if ('geolocation' in navigator &&\n (this.getSiteConfiguration() || {}).enableHtml5Geolocation) {\n navigator.geolocation.getCurrentPosition(function (position) {\n successCallback({\n lat: position.coords.latitude,\n lng: position.coords.longitude\n });\n }, failCallback);\n }\n else {\n if (failCallback)\n failCallback();\n }\n }\n getCurrentLocationViaHtml5(successCallback, failCallback) {\n this.getCurrentLatLngViaHtml5(function (latLng) {\n const lat = latLng.lat;\n const lng = latLng.lng;\n wo$.ajax({\n type: 'GET',\n url: '/Ajax/Shared/Geo/Geocode?lat=' + lat + '&lng=' + lng,\n success: function (addressResult) {\n addressResult.street = null;\n addressResult.streetNumber = null;\n if (!addressResult.city || addressResult.city.length < 1) {\n if (failCallback)\n failCallback();\n return;\n }\n successCallback({\n label: this.getLabel(addressResult),\n lat: lat,\n lng: lng,\n countryCode: (addressResult.country || {}).shortName\n });\n },\n error: function (jqXHR, textStatus, errorThrown) {\n return failCallback({\n jqXHR: jqXHR,\n textStatus: textStatus,\n errorThrown: errorThrown\n });\n }\n });\n }, failCallback);\n }\n getCurrentLatLngViaApi(successCallback, failCallback) {\n const cookie = this.getLocationCookie();\n if (cookie) {\n successCallback(cookie);\n return;\n }\n wo$.ajax({\n url: '/Ajax/Shared/Geo/GetCurrentCity',\n dataType: 'json,text',\n success: response => {\n if (!response || !response.city || response.city.length < 1) {\n if (failCallback)\n failCallback();\n return;\n }\n response.postal = null;\n const res = {\n lat: response.location.latitude,\n lng: response.location.longitude,\n countryCode: response.country.iso_code,\n label: this.getLabelFromMaxMind(response)\n };\n this.setLocationCookie(res);\n successCallback(res);\n },\n error: (jqXHR, textStatus, errorThrown) => {\n return failCallback({\n jqXHR: jqXHR,\n textStatus: textStatus,\n errorThrown: errorThrown\n });\n }\n });\n }\n getCurrentLocationViaApi(successCallback, failCallback) {\n const cookie = this.getLocationCookie();\n if (cookie && cookie.label) {\n successCallback(cookie);\n return;\n }\n const config = this.getSiteConfiguration();\n if (!config || !config.autoDetectLocation) {\n if (failCallback) {\n failCallback();\n return;\n }\n }\n this.getCurrentLatLngViaApi(function (addressResult) {\n successCallback(addressResult);\n }, failCallback);\n }\n setLocationCookie(value) {\n if (typeof window === 'undefined' || !window || !wo$) {\n return;\n }\n const key = 'location';\n if (!value) {\n Cookies.remove(key);\n return;\n }\n const now = new Date();\n const time = now.getTime();\n const oneDay = 1 * 24 * 60 * 60;\n const expireTime = time + oneDay;\n now.setTime(expireTime);\n Cookies.set(key, JSON.stringify(value), { path: '/', expires: now });\n }\n getLocationCookie() {\n const cookie = window.Cookies.get('location');\n return cookie ? JSON.parse(cookie) : null;\n }\n getLabel(address) {\n let label;\n if (address.streetNumber || address.street) {\n label =\n this.getComponentValue(address.streetNumber) +\n ' ' +\n this.getComponentValue(address.street, true) +\n ' ' +\n this.getComponentValue(address.city) +\n ', ' +\n this.getComponentValue(address.state, true) +\n ' ' +\n this.getComponentValue(address.postcode);\n }\n else if (address.postcode || address.city) {\n label =\n this.getComponentValue(address.city) +\n ', ' +\n this.getComponentValue(address.state, true) +\n ' ' +\n this.getComponentValue(address.postcode);\n }\n else if (address.state) {\n label = this.getComponentValue(address.state);\n }\n else {\n label = this.getComponentValue(address.country);\n }\n return label.trim();\n }\n getLabelFromMaxMind(address) {\n let label;\n if (address.city && (address.city.names || {}).en) {\n label = address.city.names.en;\n if (address.subdivisions && address.subdivisions.length) {\n label = label + ' ' + address.subdivisions[0].iso_code;\n }\n if (address.postal) {\n label = label + ', ' + address.postal.code;\n }\n }\n else if (address.subdivisions.length) {\n label = address.subdivisions[0].iso_code;\n }\n else {\n label = address.country.names.en;\n }\n return label.trim();\n }\n getComponentValue(component, preferShorter) {\n if (!component)\n return '';\n if (preferShorter === true && component.shortName && component.shortName.length > 0)\n return component.shortName;\n return component.longName;\n }\n appendReferrer(widgetLink) {\n const transaction = widgetLink.data('transaction');\n if (transaction === 'GoToSite') {\n const href = widgetLink.attr('href');\n const referrer = ReferrerHelper.getReferrerEncoded();\n if (referrer) {\n widgetLink.attr('href', QueryStringHelper.updateQueryStringParameter(href, 'r', referrer));\n }\n }\n }\n createSlider(sliderElement, textElement, sliderConfig, format, onChange, rebind) {\n if (!sliderElement || !textElement || !sliderConfig) {\n return;\n }\n if (!rebind) {\n rebind = false;\n }\n if (!rebind) {\n sliderElement\n .noUiSlider({\n step: 1,\n behaviour: 'drag',\n connect: 'lower',\n format: format,\n range: { min: [0], max: [sliderConfig.pegs.length - 1] },\n start: [0]\n })\n .on({\n slide: function () {\n const index = sliderElement.val();\n const text = sliderConfig.pegs[index].text;\n textElement.html(text);\n },\n set: function () {\n const index = sliderElement.val();\n sliderConfig.currentPeg = sliderConfig.pegs[index];\n const text = sliderConfig.pegs[index].text;\n textElement.html(text);\n },\n change: function () {\n const index = sliderElement.val();\n const currentPeg = sliderConfig.pegs[index];\n sliderConfig.currentPeg = currentPeg;\n if (onChange) {\n onChange(currentPeg);\n }\n }\n });\n }\n sliderElement.val(sliderConfig.currentPeg.index);\n }\n createDoubleSlider(sliderElement, textElement, sliderConfig, format, onChange, textMaxElement, showMaxTextForFullRange) {\n sliderElement\n .noUiSlider({\n step: 1,\n behaviour: 'drag',\n format: format,\n connect: true,\n range: { min: [0], max: [sliderConfig.pegs.length - 1] },\n start: [0, sliderConfig.pegs.length - 1]\n })\n .on({\n slide: function () {\n const index = sliderElement.val();\n if (textMaxElement) {\n textElement.html(sliderConfig.pegs[index[0]].text);\n textMaxElement.html(sliderConfig.pegs[index[1]].text);\n }\n else {\n let text = sliderConfig.pegs[index[0]].text + ' - ' + sliderConfig.pegs[index[1]].text;\n // If default ranges replace with any\n if (showMaxTextForFullRange &&\n sliderConfig.pegs[index[0]].value === sliderConfig.pegs[0].value &&\n sliderConfig.pegs[index[1]].value === sliderConfig.pegs[sliderConfig.pegs.length - 1].value) {\n text = sliderConfig.pegs[index[1]].text;\n }\n textElement.html(text);\n }\n },\n set: function () {\n const index = sliderElement.val();\n sliderConfig.currentPeg1 = sliderConfig.pegs[index[0]];\n sliderConfig.currentPeg2 = sliderConfig.pegs[index[1]];\n if (textMaxElement) {\n textElement.html(sliderConfig.pegs[index[0]].text);\n textMaxElement.html(sliderConfig.pegs[index[1]].text);\n }\n else {\n let text = sliderConfig.pegs[index[0]].text + ' - ' + sliderConfig.pegs[index[1]].text;\n // If default ranges replace with any\n if (showMaxTextForFullRange &&\n sliderConfig.pegs[index[0]].value === sliderConfig.pegs[0].value &&\n sliderConfig.pegs[index[1]].value === sliderConfig.pegs[sliderConfig.pegs.length - 1].value) {\n text = sliderConfig.pegs[index[1]].text;\n }\n textElement.html(text);\n }\n },\n update: function () {\n const index = sliderElement.val();\n if (textMaxElement) {\n textElement.html(sliderConfig.pegs[index[0]].text);\n textMaxElement.html(sliderConfig.pegs[index[1]].text);\n }\n else {\n const text = sliderConfig.pegs[index[0]].text + ' - ' + sliderConfig.pegs[index[1]].text;\n textElement.html(text);\n }\n },\n change: function () {\n const index = sliderElement.val();\n sliderConfig.currentPeg1 = sliderConfig.pegs[index[0]];\n sliderConfig.currentPeg2 = sliderConfig.pegs[index[1]];\n if (onChange) {\n onChange();\n }\n }\n })\n .val([sliderConfig.currentPeg1.index, sliderConfig.currentPeg2.index]);\n }\n isiOS() {\n return navigator && navigator.platform && /iP(hone|od|ad)/.test(navigator.platform);\n }\n startProgress(parent, trickleRate, trickleSpeed, showSpinner) {\n const element = wo$(parent);\n if (element.length === 0)\n return;\n if (typeof trickleRate === 'undefined')\n trickleRate = 0.1;\n if (typeof trickleSpeed === 'undefined')\n trickleSpeed = 0.1;\n if (typeof parent === 'undefined')\n parent = 'document';\n window.NProgress.configure({\n parent: parent,\n trickleRate: trickleRate,\n trickleSpeed: trickleSpeed,\n showSpinner: showSpinner === undefined ? true : showSpinner\n });\n window.NProgress.start();\n element.block({ message: null });\n let endProgressTimer;\n if (this.isiOS()) {\n // HACK: In iOS, the standard events such as 'pageshow', 'popstate' or 'unload' don't work when the page is cached\n // So we need to end the progress manually after an interval\n endProgressTimer = setTimeout(() => {\n this.endProgress(parent);\n }, 5000);\n }\n const onPageShow = event => {\n this.endProgressOnPageShow(event, parent, endProgressTimer);\n };\n // We need to explicitly call endProgress() if the page is from cache\n // otherwise the indicator never stops on History.Back in Safari,\n // because Safari reads the page from the AppCache\n window.addEventListener('pageshow', onPageShow, false);\n window.addEventListener(this.endProgressEventName, () => window.removeEventListener('pageshow', onpageshow, false));\n }\n endProgressOnPageShow(event, parent, endProgressTimer) {\n if (event.persisted) {\n if (endProgressTimer) {\n // Disable the iOS hack, because it's a normal workflow\n clearTimeout(endProgressTimer);\n }\n this.endProgress(parent);\n }\n dispatchEvent(new CustomEvent(this.endProgressEventName));\n }\n endProgress(parent) {\n if (typeof parent === 'undefined')\n parent = 'document';\n window.NProgress.done();\n wo$(parent).unblock({ message: null });\n }\n isPositiveNumber(value) {\n return wo$.isNumeric(value) && value !== '-1' && value !== -1;\n }\n isNumber(value) {\n return wo$.isNumeric(value);\n }\n replaceQueryString(url, newQuery) {\n if (url === null || url === undefined) {\n return url;\n }\n const regex = /\\?(.*)$/gi;\n const baseUrl = url.replace(regex, '');\n if (newQuery === null || newQuery === undefined) {\n return baseUrl;\n }\n newQuery = newQuery.replace(/^\\?/, '');\n return newQuery.length ? `${baseUrl}?${newQuery}` : baseUrl;\n }\n getAnalyticsClientSideData() {\n return this.config.analytics;\n }\n getSiteConfiguration() {\n var _a;\n if (this.siteConfiguration) {\n return this.siteConfiguration;\n }\n const siteConfigurationContainer = (_a = document.querySelector('#site-configuration-container')) !== null && _a !== void 0 ? _a : document.querySelector('#config');\n const config = siteConfigurationContainer\n ? this.readLookupData(wo$(siteConfigurationContainer))\n : null;\n this.siteConfiguration = config;\n return config;\n }\n isCookieEnabledByCategory(category) {\n const oneTrustCookieValue = Cookies.get('OptanonConsent');\n if (!oneTrustCookieValue) {\n return true;\n }\n if (oneTrustCookieValue.indexOf(`${category}:1`) >= 0) {\n return true;\n }\n return false;\n }\n isPerformanceCookieEnabled() {\n return this.isCookieEnabledByCategory('C0002');\n }\n isTargetingCookieEnabled() {\n return this.isCookieEnabledByCategory('C0004');\n }\n setYouTubeEnhancedPrivacy() {\n if (!this.isTargetingCookieEnabled()) {\n const frames = document.getElementsByTagName('iframe');\n for (let i = 0; i < frames.length; i++) {\n frames[i].src = frames[i].src.replace(/www.youtube.com/gi, 'www.youtube-nocookie.com');\n }\n }\n }\n trackGaEvent(category, action, label, value, fields) {\n const analyticsClientSideData = this.getAnalyticsClientSideData();\n const config = analyticsClientSideData.config;\n const data = analyticsClientSideData.data;\n wo$.each(config.accounts, (index, account) => {\n if (!account.affiliateOwned && data.includeEventTracking) {\n try {\n if (typeof fields === 'undefined') {\n ga(account.trackerId + '.send', 'event', category, action, label, value);\n }\n else {\n ga(account.trackerId + '.send', 'event', category, action, label, value, fields);\n }\n }\n catch (err) {\n this.Rollbar.error(`WhistleOut.trackGaEvent: category=${category}, action=${action}, label=${label}`, err);\n }\n }\n });\n }\n trackEvent(category, action, label, value, fields) {\n try {\n if (!this.isPerformanceCookieEnabled()) {\n return;\n }\n this.trackGaEvent(category, action, label, value, fields);\n this.pushGtmEvent(category, action, label, value);\n }\n catch (err) {\n this.Rollbar.error(`WhistleOut.trackEvent: category=${category}, action=${action}, label=${label}`, err);\n }\n }\n trackEventV2(name, params) {\n try {\n if (!this.isPerformanceCookieEnabled()) {\n return;\n }\n this.pushGtmEventV2(name, params);\n }\n catch (err) {\n this.Rollbar.error(`WhistleOut.trackEventV2: name=${name}`, err);\n }\n }\n sendPageview(url, analyticsClientSideData, config, data) {\n try {\n if ((!url || url.length <= 0) && analyticsClientSideData.data)\n url = data.trackingUrl;\n if (!url || url.length <= 0)\n url = location.pathname + location.search;\n wo$.each(config.accounts, function (index, account) {\n ga('create', account.accountNumber, { name: account.trackerId, useAmpClientId: true }, 'auto');\n if (account.linkIdTracking) {\n ga(account.trackerId + '.require', 'linkid');\n }\n if (account.optimizeAccount) {\n ga(account.trackerId + '.require', account.optimizeAccount);\n }\n if (url && url.length > 0) {\n ga(account.trackerId + '.set', 'page', url);\n }\n if (data.dimensions && data.dimensions.length > 0) {\n wo$.each(data.dimensions, function (index, value) {\n ga(account.trackerId + '.set', 'dimension' + (index + 1), value);\n });\n }\n if (config.anonymiseTracking) {\n ga(account.trackerId + '.set', 'anonymizeIp', true);\n }\n ga(account.trackerId + '.send', 'pageview');\n });\n }\n catch (err) {\n this.Rollbar.error(`WhistleOut.sendPageview: url=${url}`, err);\n }\n }\n // TODO: Name of the function only differs in casing, replace all usages with the original one and remove\n sendPageView(url, analyticsClientSideData, config, data) {\n this.sendPageview(url, analyticsClientSideData, config, data);\n }\n addPageImpression(url, analyticsClientSideData, config, data, values, isAjax, referrer) {\n try {\n if ((!url || url.length <= 0) && analyticsClientSideData.data)\n url = data.trackingUrl;\n if (!url || url.length <= 0)\n url = location.pathname + location.search;\n if (data.includeWhistleOutTracking) {\n if (!values || values.length <= 0)\n values = data.values;\n if (!values || values.length <= 0)\n values = '|||||||||||||||||||';\n if (isAjax !== true)\n isAjax = false;\n if (!referrer)\n referrer = document.referrer;\n const src = '/track?u=' +\n encodeURIComponent(url) +\n '&a=' +\n isAjax +\n '&v=' +\n values +\n '&p=' +\n data.productAreaId +\n '&af=' +\n config.affiliateId +\n '&ad=' +\n config.affiliateDomainId +\n '&tr=' +\n data.isTransaction +\n '&pr=' +\n data.isProduct +\n '&r=' +\n encodeURIComponent(referrer) +\n '&m=' +\n this.isMobileDevice();\n const image = new Image(1, 1);\n image.src = src;\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n image.onload = function () { };\n }\n }\n catch (err) {\n this.Rollbar.error(`WhistleOut.addPageImpression: url=${url}`, err);\n }\n }\n getWoUserId(userInfoCookieKey) {\n const userInfoCookieValue = Cookies.get(userInfoCookieKey);\n if (userInfoCookieValue) {\n const cookieValues = userInfoCookieValue.split('|');\n if (cookieValues && cookieValues[0]) {\n return cookieValues[0];\n }\n }\n return this.setWoUserId(userInfoCookieKey);\n }\n generateUuid() {\n // source code from https://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid/2117523#2117523\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n const r = (Math.random() * 16) | 0, v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n }\n setWoUserId(userInfoCookieKey) {\n let woUserId = '00000000-0000-0000-0000-000000000000';\n try {\n woUserId = uuidv4();\n }\n catch (_a) {\n woUserId = this.generateUuid();\n }\n Cookies.set(userInfoCookieKey, woUserId, { path: '/', expires: 60 });\n return woUserId;\n }\n trackPageView(url, values, isAjax, referrer) {\n try {\n const analyticsClientSideData = this.getAnalyticsClientSideData();\n const config = analyticsClientSideData.config;\n const data = analyticsClientSideData.data;\n if (config.trackPageImpression) {\n this.addPageImpression(url, analyticsClientSideData, config, data, values, isAjax, referrer);\n if (this.isPerformanceCookieEnabled()) {\n this.sendPageview(url, analyticsClientSideData, config, data);\n this.pushGtmPageView(config, data);\n }\n }\n }\n catch (err) {\n this.Rollbar.error(`WhistleOut.trackPageView: url=${url}`, err);\n }\n }\n pushGtmEvent(category, action, label, value) {\n try {\n let customNonInteraction = false;\n if (value && value.nonInteraction) {\n customNonInteraction = true;\n }\n const analyticsClientSideData = this.getAnalyticsClientSideData();\n const data = analyticsClientSideData.data;\n this.pushDataLayerItem({\n event: `wo_${category}_${action}`.toLowerCase(),\n customCategory: category,\n customAction: action,\n customLabel: label,\n customNonInteraction: customNonInteraction,\n customValue: isNaN(value) ? undefined : +value,\n customCountry: data.country,\n customProductAreaId: data.productAreaId,\n customUserId: this.getWoUserId(analyticsClientSideData.config.userInfoCookieKey)\n });\n }\n catch (err) {\n this.Rollbar.error(`WhistleOut.pushGtmEvent: category=${category}, action=${action}, label=${label}`, err);\n }\n }\n pushGtmEventV2(name, params) {\n try {\n const analyticsClientSideData = this.getAnalyticsClientSideData();\n const data = analyticsClientSideData.data;\n this.pushDataLayerItem(Object.assign({ event: name.toLowerCase(), customCountry: data.country, customProductAreaId: data.productAreaId, customUserId: this.getWoUserId(analyticsClientSideData.config.userInfoCookieKey) }, params));\n }\n catch (err) {\n this.Rollbar.error(`WhistleOut.pushGtmEventV2: name=${name}`, err);\n }\n }\n pushGtmPageView(config, data) {\n try {\n const dimensionNames = ['Author', 'LastUpdated', 'PageType'];\n const dataLayerValue = {\n event: 'customPageView',\n customUrl: `${location.pathname}${location.search}`\n };\n wo$.each(data.dimensions, function (index, value) {\n dataLayerValue[dimensionNames[index]] = value;\n });\n dataLayerValue['customCountry'] = data.country;\n dataLayerValue['customUserId'] = this.getWoUserId(config.userInfoCookieKey);\n this.pushDataLayerItem(dataLayerValue);\n }\n catch (err) {\n this.Rollbar.error('WhistleOut.pushGtmPageView', err);\n }\n }\n isMobileDevice() {\n return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n }\n getAds(productArea) {\n const placements = wo$('[data-adplacement]');\n if (placements.length > 0) {\n const data = {\n productArea: productArea,\n url: location.pathname + location.search,\n placements: wo$.makeArray(placements.map((i, el) => {\n const data = wo$(el).data();\n return {\n name: data.adplacement,\n tab: data.tab\n };\n }))\n };\n wo$.ajax({\n url: '/Ajax/Shared/Ad/Get',\n data: data,\n dataType: 'json',\n type: 'POST',\n success: result => {\n for (let x = 0; x < result.length; x++) {\n this.processAd(placements, result[x]);\n }\n this.applyPopover();\n this.stopPropagation();\n this.bindSubscribe();\n this.notifications.fire('AdsLoaded', { ads: result });\n }\n });\n }\n }\n processAd(placements, ad) {\n const filter = ad.Tab == null\n ? '[data-adplacement = \"' + ad.Placement + '\"]'\n : '[data-adplacement = \"' + ad.Placement + '\"][data-tab = \"' + ad.Tab + '\"]';\n const matchingPlacements = placements.filter(filter);\n if (matchingPlacements.length > 0) {\n let html = ad.Content;\n if (ad.TrackingHtml != null) {\n html += '
' + ad.TrackingHtml + '
';\n }\n if (html === '' || html == null) {\n if (ad.Placement !== 'TopNav') {\n // TODO: Fix invalid call, old API?\n matchingPlacements.slideUp(250, this.setAd(matchingPlacements, null));\n }\n }\n else if (ad.Placement === 'StickyBottomStrip') {\n if (typeof Cookies.get('ShowStickyBottomStrip') === 'undefined' ||\n Cookies.get('ShowStickyBottomStrip') === null) {\n wo$('#suggested-articles').remove();\n this.setAd(matchingPlacements, ad);\n matchingPlacements.each((i, el) => {\n this.setStickyBottomStripAd(wo$(el), ad);\n });\n }\n }\n else {\n this.setAd(matchingPlacements, ad);\n matchingPlacements.slideDown(250);\n }\n }\n }\n setAd(placements, ad) {\n let html = '';\n if (ad != null) {\n html = ad.Content;\n if (ad.TrackingHtml != null) {\n html += '
' + ad.TrackingHtml + '
';\n }\n }\n const onPlacement = (el) => {\n const placement = wo$(el);\n if (placement.children().length === 0) {\n placement.html(html);\n }\n else {\n placement.children().first().html(html);\n }\n if (ad != null && ad.Id != null) {\n const label = placement.data('adplacement') + ': ' + ad.Name + ' (' + ad.Id + ')';\n const observer = new IntersectionObserver((entries) => {\n if (entries.length > 0) {\n const entry = entries[0];\n if (entry.isIntersecting) {\n this.trackEvent('Ad', 'Show', label, { nonInteraction: true });\n observer.disconnect();\n }\n }\n }, {\n root: null,\n threshold: 0.1\n });\n observer.observe(placement[0]);\n placement.off('click').click(() => {\n this.trackEvent('Ad', 'Click', label);\n });\n EmailMySearch.adInit(placement.find('#ad-email-my-search'), placement.find('#ad-email-my-search').find('#my-search-ad-submit'));\n }\n };\n placements.each((i, el) => {\n onPlacement(el);\n });\n }\n setStickyBottomStripAd(placement, ad) {\n placement\n .affix({\n offset: { top: 400 }\n })\n .show()\n .find('[data-adclose]')\n .off('click')\n .on('click', (event) => {\n const expires = new Date();\n expires.setTime(expires.getTime() + 60 * 60 * 1000);\n Cookies.set('ShowStickyBottomStrip', '0', { path: '/', expires: expires });\n placement.remove();\n const label = placement.data('adplacement') + ': ' + ad.Name + ' (' + ad.Id + ')';\n this.trackEvent('Ad', 'Close', label);\n event.stopPropagation();\n });\n }\n hideAllPopovers(e) {\n if (wo$('.popover.in').length === 0) {\n return;\n }\n wo$('[data-toggle=\"popover\"]').each((i, el) => {\n const jObj = wo$(el);\n if (!jObj.is(e.target) &&\n jObj.has(e.target).length === 0 &&\n wo$('.popover').has(e.target).length === 0 &&\n wo$('.popover').hasClass('in')) {\n jObj.popover('hide');\n }\n });\n }\n triggerPopoverNotification(element, content, position) {\n // eslint-disable-next-line eqeqeq\n if (typeof position == 'undefined') {\n position = 'right';\n }\n const popoverElement = wo$(element);\n popoverElement.popover({\n trigger: 'manual',\n placement: position,\n html: true,\n content: content\n });\n popoverElement.popover('show');\n setTimeout(function () {\n popoverElement.popover('hide');\n }, 1200);\n }\n checkQueryParamExists(queryParam) {\n const url = location.href;\n if (url.indexOf('?' + queryParam + '=') !== -1)\n return true;\n else if (url.indexOf('&' + queryParam + '=') !== -1)\n return true;\n return false;\n }\n submitStoreSelectorModal(selectedHandler) {\n const modal = wo$('#store-selector-modal');\n if (!modal.length)\n return;\n const selectedStoreId = modal.find('#store-select').val();\n const staff = modal.find('#staff');\n let selectedStaff = null;\n if (staff.length > 0) {\n selectedStaff = {\n id: staff.data('id'),\n code: staff.data('code'),\n name: staff.data('name')\n };\n }\n if (!selectedStoreId ||\n selectedStoreId.length <= 0 ||\n // TODO: Fix the violation and enable the rule\n // eslint-disable-next-line eqeqeq\n (staff.length > 0 && (!selectedStaff || selectedStaff.id == undefined))) {\n modal.find('#store-error').show();\n return;\n }\n selectedHandler(selectedStoreId, selectedStaff);\n modal.find('#store-error').hide();\n modal.modal('hide');\n }\n showStoreSelector() {\n const siteConfiguration = this.getSiteConfiguration();\n if ((siteConfiguration &&\n siteConfiguration.forceStoreSelection === true &&\n (Cookies.get(siteConfiguration.selectedStoreCookieKey) == null ||\n Cookies.get(siteConfiguration.selectedStoreCookieKey) === '')) ||\n (siteConfiguration &&\n siteConfiguration.forceStoreStaffSelection === true &&\n (Cookies.get(siteConfiguration.selectedStaffCookieKey) == null ||\n Cookies.get(siteConfiguration.selectedStaffCookieKey) === ''))) {\n this.storeSelectorModal.show(this.selectStore);\n }\n }\n resetStore() {\n const siteConfiguration = this.getSiteConfiguration();\n Cookies.remove(siteConfiguration.selectedStoreCookieKey, { path: '/' });\n Cookies.remove(siteConfiguration.selectedStaffCookieKey, { path: '/' });\n // TODO: Browser ignores the parameter in `location.reload(true)`. If needed it should be done differently\n // see: https://stackoverflow.com/questions/55127650/location-reloadtrue-is-deprecated\n location.reload();\n }\n resetStaff(reload) {\n const siteConfiguration = this.getSiteConfiguration();\n Cookies.remove(siteConfiguration.selectedStaffCookieKey, { path: '/' });\n if (reload) {\n // TODO: Browser ignores the parameter in `location.reload(true)`. If needed it should be done differently\n // see: https://stackoverflow.com/questions/55127650/location-reloadtrue-is-deprecated\n location.reload();\n }\n }\n selectStore(selectedStoreId, selectedStaff) {\n const expires = new Date();\n expires.setFullYear(expires.getFullYear() + 1);\n Cookies.set(this.getSiteConfiguration().selectedStoreCookieKey, selectedStoreId, {\n path: '/',\n expires: expires\n });\n if (selectedStaff) {\n Cookies.set(this.getSiteConfiguration().selectedStaffCookieKey, JSON.stringify(selectedStaff), {\n path: '/',\n expires: expires\n });\n }\n // TODO: Browser ignores the parameter in `location.reload(true)`. If needed it should be done differently\n // see: https://stackoverflow.com/questions/55127650/location-reloadtrue-is-deprecated\n location.reload();\n }\n getStaff() {\n const value = Cookies.get(this.getSiteConfiguration().selectedStaffCookieKey);\n return JSON.parse(value);\n }\n getStaffId() {\n const staff = this.getStaff();\n return staff ? staff.id : '';\n }\n getStaffCode() {\n const staff = this.getStaff();\n return staff ? staff.code : '';\n }\n getStaffName() {\n const staff = this.getStaff();\n return staff ? staff.name : '';\n }\n getStoreName() {\n return this.getSiteConfiguration().storeName;\n }\n getStoreEmail() {\n return this.getSiteConfiguration().storeEmail;\n }\n bindStateSwitcher() {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n yield deferred.initBootstrapSelect();\n const $container = wo$('#state-switcher-container');\n if ($container.length === 0)\n return;\n const $province = $container.find('#province');\n if ($province && $province.length > 0) {\n this.applySelectPicker($province);\n this.applySelectPickersStyle();\n if (typeof Cookies.get('state') !== 'undefined' && Cookies.get('state') !== null) {\n $province.selectpicker('val', Cookies.get('state'));\n }\n $province.on('change', (e) => {\n const el = e.currentTarget;\n let href;\n if (el.value === null || el.value === '') {\n Cookies.remove('state', { path: '/' });\n href = this.updateQueryStringParameter(location.href, 'state', null);\n }\n else {\n href = this.updateQueryStringParameter(location.href, 'state', el.value);\n }\n // TODO: Browser ignores the parameter in `location.reload(true)`. If needed it should be done differently\n // see: https://stackoverflow.com/questions/55127650/location-reloadtrue-is-deprecated\n if (href === location.href)\n window.location.reload();\n else\n location.href = href;\n });\n }\n }\n catch (e) {\n console.log('Error in WhistleOut.bindStateSwitcher:', e);\n }\n });\n }\n bindModalLinks() {\n try {\n wo$('.js-modal-link').magnificPopup({\n type: 'iframe',\n removeDelay: 160,\n preloader: false,\n fixedContentPos: false\n });\n }\n catch (e) {\n console.log('Error in WhistleOut.bindModalLinks:', e);\n }\n }\n bindTextAdLinks() {\n wo$('#text-ads a').click(() => {\n const label = wo$(this).html();\n this.trackEvent('TextAd', 'Click', label);\n });\n }\n bindExpressResults() {\n wo$('#express-results-stop, #express-results-stop2').click(() => {\n Cookies.remove('expressmode', { path: '/' });\n const href = this.updateQueryStringParameter(location.href, 'express', null);\n // TODO: Browser ignores the parameter in `location.reload(true)`. If needed it should be done differently\n // see: https://stackoverflow.com/questions/55127650/location-reloadtrue-is-deprecated\n if (href === location.href)\n window.location.reload();\n else\n location.href = href;\n });\n }\n bindRetailSplash() {\n this.startRetailSplashTimer();\n wo$(document).on('click keydown keyup mousemove scroll', this.startRetailSplashTimer);\n }\n startRetailSplashTimer() {\n if (this.retailSplashTimer) {\n window.clearTimeout(this.retailSplashTimer);\n }\n this.retailSplashTimer = window.setTimeout(() => {\n if (wo$('#store-selector-modal').hasClass('in')) {\n this.startRetailSplashTimer();\n return;\n }\n wo$('#chatlio-widget').hide();\n wo$('#modal-retail-splash')\n .modal('show')\n .on('hide.bs.modal', () => {\n this.startRetailSplashTimer();\n wo$('#chatlio-widget').show();\n });\n }, 300000);\n }\n focusAndSelect(element, copyToClipboard) {\n const len = wo$(element).val().length;\n wo$(element)[0].setSelectionRange(0, len, 'backward');\n wo$(element).focus();\n if (copyToClipboard === true) {\n document.execCommand('Copy');\n }\n }\n applySelectPicker(element, config) {\n const callback = () => {\n element\n .selectpicker('destroy')\n .selectpicker(config || {})\n .selectpicker('refresh');\n };\n if (wo$.fn.selectpicker) {\n callback();\n return;\n }\n deferred.initBootstrapSelect().then(callback);\n }\n applySelectPickersStyle(parent) {\n const callback = () => {\n if (!parent) {\n parent = wo$('document,html');\n }\n parent.find('.filter-option').addClass('needsclick');\n };\n if (wo$.fn.selectpicker) {\n callback();\n return;\n }\n deferred.initBootstrapSelect().then(callback);\n }\n stopPropagation() {\n wo$('[data-stop-propagation]').click(function (event) {\n event.stopPropagation();\n });\n wo$('.yamm .dropdown-menu').click(function (event) {\n const target = wo$(event.target);\n if (!target.is('a'))\n event.stopPropagation();\n });\n }\n bindCta(parent) {\n if (!parent)\n parent = wo$(document);\n parent.find('a[data-cta]').on('click', (e) => {\n const data = wo$(e.currentTarget).data();\n const action = data.cta;\n const label = data.supplier;\n this.trackEvent('Transaction', action, label);\n });\n }\n bindClickUrl() {\n wo$('[data-click-url]').on('click', (e) => {\n const url = wo$(e.currentTarget).data('click-url');\n if (url) {\n location.href = url;\n }\n });\n }\n bindTrackClick() {\n wo$('[data-track-click]').on('click', (e) => {\n const url = wo$(e.currentTarget).data('track-click');\n if (url) {\n const html = '';\n wo$('body').append(html);\n }\n });\n }\n applyPromoAds(element) {\n element.find('[data-promo-click]').on('click', (e) => {\n e.stopPropagation();\n const parent = wo$(e.currentTarget).closest('[data-promo-url]');\n const supplier = parent.data('supplier');\n const url = parent.data('promo-url');\n this.trackEvent('DealStrip', 'Click', supplier);\n window.open(url, '_blank');\n });\n }\n checkSiteQueryString() {\n const state = this.getQueryStringParameter('state');\n if (state !== null) {\n if (state === '')\n Cookies.remove('state', { path: '/' });\n else\n Cookies.set('state', state, { path: '/', expires: 31 });\n }\n const express = this.getQueryStringParameter('express');\n if (express !== null) {\n Cookies.set('expressmode', 'true', { path: '/', expires: 60 });\n }\n }\n initHistoryTracker(obj) {\n obj.HistoryWrapper = {\n pushState: (data, title, url) => {\n history.pushState(data, title, url);\n },\n pushQuery: queryString => {\n const newUrl = this.replaceQueryString(`${window.location.origin}${window.location.pathname}`, queryString);\n history.pushState(null, document.title, newUrl);\n }\n };\n window.onpopstate = () => {\n location.reload();\n };\n }\n scrollTo(target, scrollDuration, scrollOffset) {\n if (typeof target === 'number') {\n window.scrollTo({\n top: target,\n behavior: 'smooth'\n });\n return;\n }\n if (typeof scrollDuration === 'undefined') {\n scrollDuration = scrollDefaultDuration;\n }\n if (typeof scrollOffset === 'undefined') {\n scrollOffset = scrollDefaultOffset;\n }\n const el = typeof target === 'string'\n ? (target === null || target === void 0 ? void 0 : target.startsWith('#'))\n ? document.getElementById(target.slice(1))\n : document.querySelector(target)\n : target;\n if (!el) {\n return;\n }\n const y = el.getBoundingClientRect().top + window.scrollY;\n this.scrollTo(y + scrollOffset);\n }\n bindScrollTo() {\n wo$('a[data-scrollto]').on('click', (e) => {\n e.stopPropagation();\n e.preventDefault();\n const el = e.currentTarget;\n const data = el.dataset;\n const scrollto = data.scrollto;\n const scrollDuration = Number.parseInt(data.scrollduration) || scrollDefaultDuration;\n const scrollOffset = Number.parseInt(data.scrolloffset) || scrollDefaultOffset;\n this.scrollTo(scrollto, scrollDuration, scrollOffset);\n });\n }\n bindShow() {\n wo$('a[data-show]').on('click', (e) => {\n const target = wo$(e.currentTarget).data('show');\n wo$(target).show();\n });\n }\n bindFocusAndSelect() {\n wo$('input[data-focusandselect]').on('click', (e) => {\n const el = e.currentTarget;\n this.focusAndSelect(el);\n });\n }\n bindTrackEvent() {\n wo$('body').on('click', '[data-trackevent]', (e) => {\n const el = e.currentTarget;\n const data = wo$(el).data();\n const category = data.category;\n const action = data.action;\n const label = data.label;\n this.trackEvent(category, action, label);\n });\n }\n bindSlick() {\n return __awaiter(this, void 0, void 0, function* () {\n yield deferred.initSlick();\n const container = wo$('.slick-container .responsive');\n container.show();\n container.slick({\n dots: true,\n infinite: false,\n speed: 500,\n slidesToShow: 14,\n slidesToScroll: 14,\n responsive: [\n {\n breakpoint: 1200,\n settings: {\n slidesToShow: 10,\n slidesToScroll: 10,\n infinite: true,\n dots: true\n }\n },\n {\n breakpoint: 992,\n settings: {\n slidesToShow: 6,\n slidesToScroll: 6,\n dots: true\n }\n },\n {\n breakpoint: 768,\n settings: {\n slidesToShow: 3,\n slidesToScroll: 3,\n dots: false\n }\n }\n ]\n });\n });\n }\n getRemarketingData() {\n const remarketing = wo$('#remarketing');\n return remarketing.length === 0 ? null : this.readLookupData(remarketing);\n }\n remarketing(data) {\n if (!this.isTargetingCookieEnabled()) {\n return;\n }\n const trackingCode = this.getSiteConfiguration().remarketingTrackingCode;\n if (data && typeof gtag !== 'undefined' && trackingCode) {\n gtag('event', 'conversion', {\n allow_custom_scripts: true,\n send_to: trackingCode,\n u1: data.supplier ? data.supplier : '',\n u2: data.data ? data.data : '',\n u3: data.planType ? data.planType : '',\n u4: data.phoneBrand ? data.phoneBrand : '',\n u5: data.phone ? data.phone : '',\n u6: data.tags ? data.tags : '',\n u7: data.connectionType ? data.connectionType : '',\n u8: data.bundles ? data.bundles : '',\n u9: data.numberOfLines ? data.numberOfLines : '',\n u10: data.postcode ? data.postcode : '',\n u11: data.tabletBrand ? data.tabletBrand : '',\n u12: data.tablet ? data.tablet : '',\n u13: data.speed ? data.speed : ''\n });\n }\n }\n bindGenericCallback() {\n wo$('[data-callback]').each(() => {\n const form = wo$(this);\n form.find('[data-submit]')\n .off('click')\n .on('click', () => {\n form.find('[data-success], [data-error]').hide();\n form.find('.has-error').removeClass('has-error');\n const $name = form.find('[data-name]');\n const $phone = form.find('[data-phone]');\n const $state = form.find('[data-state]');\n const data = {\n name: $name.val().trim(),\n phone: $phone.val().trim(),\n time: form.find('[data-time]').val(),\n state: $state.val()\n };\n let error = false;\n if (data.name === '') {\n $name.parents('.form-group').addClass('has-error');\n error = true;\n }\n const config = this.getSiteConfiguration();\n const regex = new RegExp(config.regex.phone);\n if (data.phone === '' || !regex.test(data.phone)) {\n $phone.parents('.form-group').addClass('has-error');\n error = true;\n }\n if (data.state === '') {\n $state.parents('.form-group').addClass('has-error');\n error = true;\n }\n if (!error) {\n wo$.ajax({\n url: '/Ajax/Shared/Callback/SubmitGeneric',\n type: 'POST',\n data: data,\n success: function () {\n form.find('[data-intro]').hide();\n form.find('[data-success]').show();\n form.find('[data-name]').val('');\n form.find('[data-phone]').val('');\n form.find('[data-state]').val('');\n },\n error: function () {\n form.find('[data-intro]').hide();\n form.find('[data-error]').show();\n }\n });\n }\n });\n });\n }\n checkAffiliateDomainCookie() {\n const config = this.getSiteConfiguration();\n if (config) {\n if (config.affiliateDomainId === 0) {\n Cookies.remove(config.cookieName, {\n path: '/',\n domain: config.cookieDomain\n });\n }\n else if (config.cookieDuration && config.cookieDuration !== '') {\n const expires = new Date();\n if (config.cookieDuration === -1) {\n expires.setTime(expires.getTime() + 525600 * 60 * 60 * 1000);\n }\n else {\n expires.setTime(expires.getTime() + config.cookieDuration * 60 * 1000);\n }\n Cookies.set(config.cookieName, String(config.affiliateDomainId), {\n path: '/',\n expires: expires,\n domain: config.cookieDomain\n });\n }\n }\n }\n bindDataTables() {\n function applySorting(element, config) {\n const sort = element.find('th[data-order]');\n const index = sort.index();\n const direction = sort.data('order') || 'asc';\n if (sort.length) {\n config.order = [[index, direction]];\n }\n }\n if (wo$.fn.dataTable) {\n wo$.fn.dataTable.ext.errMode = 'throw';\n wo$.extend(wo$.fn.dataTable.defaults, {\n searching: false,\n paging: false,\n info: false,\n ordering: true\n });\n wo$('.dataTables-sortableResponsive').each((i, el) => {\n const config = {\n columnDefs: [\n {\n orderable: false,\n targets: -1\n },\n {\n orderSequence: ['desc', 'asc'],\n targets: '_all'\n }\n ],\n fixedHeader: {\n headerOffset: 60\n },\n responsive: {\n details: false\n }\n };\n const jobj = wo$(el);\n applySorting(jobj, config);\n jobj.DataTable(config);\n });\n wo$('.dataTables-sortableResponsiveAllColumns').each((i, el) => {\n const config = {\n columnDefs: [\n {\n orderable: true,\n },\n {\n orderSequence: ['desc', 'asc'],\n targets: '_all'\n }\n ],\n fixedHeader: {\n headerOffset: 60\n },\n responsive: {\n details: false\n }\n };\n const jobj = wo$(el);\n applySorting(jobj, config);\n jobj.DataTable(config);\n });\n wo$('.dataTables-Sortable').each((i, el) => {\n const config = {\n columnDefs: [\n {\n orderable: true\n },\n {\n orderSequence: ['desc', 'asc'],\n targets: '_all'\n }\n ],\n fixedHeader: false,\n responsive: false\n };\n const jobj = wo$(el);\n applySorting(jobj, config);\n jobj.DataTable(config);\n });\n // TODO: Object doesn't match the type definition, fix\n wo$('.dataTables-notSortable').DataTable({\n fixedHeader: {\n headerOffset: 60\n },\n responsive: {\n details: true\n },\n ordering: false\n });\n // TODO: Object doesn't match the type definition, fix\n wo$('.dataTables-fixedHeight').DataTable({\n fixedHeader: false,\n responsive: false,\n ordering: false,\n scrollY: '500px',\n scrollX: true,\n scrollCollapse: true\n });\n }\n }\n bindCitiesAutoComplete(page) {\n const container = page.find('#cities');\n if (!container.length)\n return;\n const input = container.find('#search-city-input');\n input.val('');\n input.prop('disabled', false);\n const area = input.data('area');\n const icon = container.find('#city-search-icon');\n icon.removeClass();\n icon.addClass('fa fa-search');\n input.typeahead({\n selectOnBlur: false,\n minLength: 3,\n source: function (query, process) {\n return wo$.ajax({\n url: '/Ajax/Shared/Geo/Cities?query=' + query + '&area=' + area,\n dataType: 'json',\n success: function (json) {\n return process(json);\n }\n });\n },\n afterSelect: function (item) {\n if (item.url) {\n container.find('#search-city-input').prop('disabled', true);\n const icon = container.find('#city-search-icon');\n icon.removeClass();\n icon.addClass('fa fa-spinner fa-fw fa-spin');\n location.href = item.url;\n }\n },\n matcher: function () {\n return true;\n },\n displayText: function (item) {\n return item.displayText;\n }\n });\n container.find('#search-city-input').on('blur.bootstrap3Typeahead', function () {\n if (!container.find('#search-city-input').prop('disabled')) {\n container.find('#search-city-input').val('');\n }\n });\n }\n setPrivateDataCookieValue(disabled) {\n if (typeof window === 'undefined' || !window || !wo$) {\n return;\n }\n Cookies.set('hidePrivateData', String(disabled), { path: '/', expires: 365 });\n }\n getPrivateDataCookieValue() {\n if (typeof window === 'undefined' || !window || !wo$) {\n return false;\n }\n const result = Cookies.get('hidePrivateData');\n if (typeof result === 'undefined' || result == null) {\n return false;\n }\n return result === 'true' || /true/i.test(result);\n }\n bindPrivateDataModal(container) {\n if (typeof container === 'undefined') {\n container = wo$('body');\n }\n const hideData = this.getPrivateDataCookieValue();\n const modal = container.find(`#${this.privateDataModalId}`);\n modal.off('show.bs.modal').on('show.bs.modal', () => {\n const checkBox = container.find('#private-data-checkbox');\n checkBox.prop('checked', hideData);\n const applyButton = container.find('#private-data-apply-button');\n applyButton.off().click(() => {\n const checked = checkBox.prop('checked');\n if (checked !== hideData) {\n this.setPrivateDataCookieValue(checked);\n location.reload();\n }\n });\n });\n }\n bindPhoneSpecsModal(container) {\n if (typeof container === 'undefined') {\n container = wo$('body');\n }\n container\n .find('a[data-phone-specs-button]')\n .off('click')\n .on('click', (e) => {\n const el = e.currentTarget;\n const phoneShortUrl = wo$(el).data('phone-specs-button');\n if (!phoneShortUrl || phoneShortUrl.length < 1)\n return;\n let phoneSpecsContainer = wo$('#phone-specs-container');\n if (phoneSpecsContainer &&\n phoneSpecsContainer.length > 0 &&\n phoneSpecsContainer.data('phone-short-url') === phoneShortUrl) {\n phoneSpecsContainer.find('[data-phone-specs-modal]').modal('show');\n }\n else {\n const data = {\n phoneShortUrl: phoneShortUrl\n };\n const siteConfiguration = this.getSiteConfiguration();\n wo$.ajax({\n url: siteConfiguration.phoneSpecsModalUrl,\n data: data,\n type: 'GET',\n success: function (result) {\n if (result !== '') {\n if (!phoneSpecsContainer || phoneSpecsContainer.length < 1) {\n wo$('body').append('
');\n phoneSpecsContainer = wo$('#phone-specs-container');\n }\n phoneSpecsContainer.data('phone-short-url', phoneShortUrl);\n phoneSpecsContainer.html(result);\n phoneSpecsContainer.find('[data-phone-specs-modal]').modal('show');\n }\n }\n });\n }\n });\n }\n bindTabletSpecsModal(container) {\n if (typeof container === 'undefined') {\n container = wo$('body');\n }\n container\n .find('a[data-tablet-specs-button]')\n .off('click')\n .on('click', (e) => {\n const tabletShortUrl = wo$(e.currentTarget).data('tablet-specs-button');\n if (!tabletShortUrl || tabletShortUrl.length < 1)\n return;\n this.showTabletSpecs(tabletShortUrl);\n });\n }\n showTabletSpecs(tabletShortUrl) {\n let tabletSpecsContainer = wo$('#tablet-specs-container');\n if (tabletSpecsContainer &&\n tabletSpecsContainer.length > 0 &&\n tabletSpecsContainer.data('tablet-short-url') === tabletShortUrl) {\n tabletSpecsContainer.find('[data-tablet-specs-modal]').modal('show');\n }\n else {\n const data = {\n tabletShortUrl: tabletShortUrl\n };\n const siteConfiguration = this.getSiteConfiguration();\n wo$.ajax({\n url: siteConfiguration.tabletSpecsModalUrl,\n data: data,\n type: 'GET',\n success: function (result) {\n if (result !== '') {\n if (!tabletSpecsContainer || tabletSpecsContainer.length < 1) {\n wo$('body').append('
');\n tabletSpecsContainer = wo$('#tablet-specs-container');\n }\n tabletSpecsContainer.data('tablet-short-url', tabletShortUrl);\n tabletSpecsContainer.html(result);\n tabletSpecsContainer.find('[data-tablet-specs-modal]').modal('show');\n }\n }\n });\n }\n }\n bindBYODModal(container) {\n if (typeof container === 'undefined') {\n container = wo$('body');\n }\n container\n .find('[data-byod-modal-button]')\n .off('click')\n .on('click', () => {\n let byoModalContainer = wo$('#byo-modal-container');\n if (byoModalContainer && byoModalContainer.length > 0) {\n this.showBYODModal();\n }\n else {\n const siteConfiguration = this.getSiteConfiguration();\n wo$.ajax({\n url: siteConfiguration.byoPhonePickerModalUrl,\n type: 'GET',\n success: function (result) {\n if (result !== '') {\n if (!byoModalContainer || byoModalContainer.length < 1) {\n wo$('body').append('
');\n byoModalContainer = wo$('#byo-modal-container');\n }\n byoModalContainer.html(result);\n this.showBYODModal();\n }\n }\n });\n }\n });\n }\n showBYODModal() {\n if (this.byoPhonePickerController) {\n this.byoPhonePickerController.show(function (selectedModel, genericSearchUrl) {\n if (selectedModel) {\n location.href = selectedModel.searchUrl;\n }\n else if (genericSearchUrl) {\n location.href = genericSearchUrl;\n }\n });\n }\n }\n bindPhoneGallery(container) {\n if (typeof container === 'undefined') {\n container = wo$('body');\n }\n container\n .find('a[data-phone-gallery-button]')\n .off('click')\n .on('click', (e) => {\n const link = wo$(e.currentTarget);\n const phoneShortUrl = link.data('phone-gallery-button');\n if (!phoneShortUrl || phoneShortUrl.length < 1)\n return;\n const data = {\n phoneShortUrl: phoneShortUrl\n };\n const siteConfiguration = this.getSiteConfiguration();\n wo$.ajax({\n url: siteConfiguration.phoneGalleryUrl,\n data: data,\n type: 'GET',\n success: function (result) {\n if (result !== '') {\n const items = [];\n wo$.each(result, function (index, item) {\n items.push({ src: item });\n });\n wo$.magnificPopup.open({\n items: items,\n type: 'image',\n gallery: {\n enabled: true\n }\n });\n }\n }\n });\n });\n }\n showTabletGallery(tabletShortUrl) {\n const data = {\n tabletShortUrl: tabletShortUrl\n };\n const siteConfiguration = this.getSiteConfiguration();\n wo$.ajax({\n url: siteConfiguration.tabletGalleryUrl,\n data: data,\n type: 'GET',\n success: function (result) {\n if (result !== '') {\n const items = [];\n wo$.each(result, function (index, item) {\n items.push({ src: item });\n });\n wo$.magnificPopup.open({\n items: items,\n type: 'image',\n gallery: {\n enabled: true\n }\n });\n }\n }\n });\n }\n bindTabletGallery(container) {\n if (typeof container === 'undefined') {\n container = wo$('body');\n }\n container\n .find('a[data-tablet-gallery-button]')\n .off('click')\n .on('click', (e) => {\n const link = wo$(e.currentTarget);\n const tabletShortUrl = link.data('tablet-gallery-button');\n if (!tabletShortUrl || tabletShortUrl.length < 1)\n return;\n this.showTabletGallery(tabletShortUrl);\n });\n }\n copyToClipboard(value) {\n const input = wo$('').appendTo('body');\n input.val(value);\n input.select();\n document.execCommand('Copy');\n input.remove();\n }\n bindSubscribe() {\n const config = this.getSiteConfiguration();\n wo$('[data-subscribe]:not([data-bound])').each((i, el) => {\n const target = wo$(el);\n const email = target.find('[data-email]');\n const listId = target.data('listid');\n const eventLabel = target.data('eventlabel');\n target\n .find('[data-submit]')\n .off('click')\n .on('click', () => {\n target.find('[data-error]').hide();\n const regex = new RegExp(config.regex.email);\n if (!email.val() || !regex.test(email.val())) {\n target.find('[data-info]').hide();\n target.find('[data-info]').hide();\n target.find('[data-validate]').show();\n return;\n }\n if (!target.find('[data-consent]').is(':checked')) {\n target.find('[data-info]').hide();\n target.find('[data-validate]').show();\n return;\n }\n const data = {\n email: email.val(),\n listId: listId\n };\n wo$.ajax({\n url: config.subscribeUrl,\n data: data,\n type: 'POST',\n success: () => {\n target.find('[data-formrow]').hide();\n target.find('[data-success]').show();\n this.trackEvent('Subscribers', 'Subscribed', eventLabel || listId);\n },\n error: function () {\n target.find('[data-error]').show();\n },\n complete: function () {\n target.find('[data-info]').hide();\n target.find('[data-validate]').hide();\n }\n });\n });\n target.attr('data-bound', true); // TODO: Fix invalid parameter type\n });\n }\n bindNewsCarousel() {\n deferred.initSlick().then(() => {\n wo$('.news-carousel')\n .slick({\n dots: false,\n infinite: false,\n speed: 500,\n slidesToShow: 6,\n slidesToScroll: 6,\n responsive: [\n {\n breakpoint: 1200,\n settings: {\n slidesToShow: 6,\n slidesToScroll: 6,\n infinite: true,\n dots: false\n }\n },\n {\n breakpoint: 992,\n settings: {\n slidesToShow: 4,\n slidesToScroll: 4,\n dots: false\n }\n },\n {\n breakpoint: 768,\n settings: {\n slidesToShow: 1,\n slidesToScroll: 1,\n dots: false\n }\n }\n ]\n })\n .show();\n });\n }\n bindSlickSingle() {\n deferred.initSlick().then(() => {\n wo$('.slick-single')\n .slick({\n dots: false,\n infinite: false,\n speed: 500,\n slidesToShow: 1,\n slidesToScroll: 1\n })\n .show();\n });\n }\n encodeHtml(str) {\n const el = document.createElement('span');\n el.append(document.createTextNode(str));\n return el.innerHTML;\n }\n trueOrNull(val) {\n return val === true || val === 'true' ? true : null;\n }\n falseOrNull(val) {\n return val === false || val === 'false' ? false : null;\n }\n boolOrNull(val) {\n return this.trueOrNull(val) === true ? true : this.falseOrNull(val) === false ? false : null;\n }\n bindCriteriaFilters(elements, callback, criteria, mappingOverrides) {\n if (!elements || elements.length === 0) {\n return;\n }\n const getCommon = function (e) {\n if (!e.common) {\n e.common = {};\n }\n return e.common;\n };\n const getResults = function (e) {\n if (!e.results) {\n e.results = {};\n }\n return e.results;\n };\n const trueOrNull = this.trueOrNull;\n const falseOrNull = this.falseOrNull;\n // Based on Areas\\Shared\\React\\js\\utils\\CommonQueryString.js\n const mappings = Object.assign({\n address: function (e, val, key) {\n getCommon(e)[key] = val;\n },\n cache: function (e, val) {\n getCommon(e).useCache = falseOrNull(val);\n },\n campaignGroup: function (e, val, key) {\n getCommon(e)[key] = parseInt(val);\n },\n contract: function (e, val) {\n getCommon(e).contractTerms = (val || '').split(','); // TODO: Convert explicitly?\n },\n currentsupplier: function (e, val) {\n getCommon(e).currentSupplierShortUrl = val;\n },\n customer: function (e, val) {\n getCommon(e).customerType = val;\n },\n dealsonly: function (e, val) {\n getCommon(e).includeOffersWithCampaignOnly = trueOrNull(val);\n },\n debug: function (e, val, key) {\n getCommon(e)[key] = trueOrNull(val);\n },\n enforcemaximumresultlimits: function (e, val) {\n getCommon(e).enforceMaximumResultLimits = falseOrNull(val);\n },\n hidecoverage: function (e, val) {\n getCommon(e).hideCoverage = trueOrNull(val);\n },\n hideemptytabs: function (e, val) {\n getCommon(e).hideEmptyTabs = trueOrNull(val);\n },\n hideshare: function (e, val) {\n getCommon(e).hideShare = trueOrNull(val);\n },\n hidesort: function (e, val) {\n getCommon(e).hideSort = trueOrNull(val);\n },\n hidewidenresults: function (e, val) {\n getCommon(e).hideWidenResults = trueOrNull(val);\n },\n includefeatured: function (e, val) {\n getCommon(e).includeFeaturedResults = falseOrNull(val);\n },\n maxresults: function (e, val) {\n getResults(e).maximumNumberOfResults = parseInt(val);\n },\n maxresultspersupplier: function (e, val) {\n getCommon(e).maxResultsPerSupplier = parseInt(val);\n },\n minspend: function (e, val) {\n getCommon(e).minimumSpend = Number(val);\n },\n monetised: function (e, val) {\n getCommon(e).monetisedResultsOnly = trueOrNull(val);\n },\n pagesize: function (e, val) {\n getCommon(e).pageSize = parseInt(val);\n },\n product: function (e, val) {\n getCommon(e).products = (val || '').split(','); // TODO: Convert explicitly?\n },\n productlabel: function (e, val) {\n getCommon(e).productLabel = decodeURIComponent(val);\n },\n showall: function (e, val) {\n getCommon(e).showAllResults = trueOrNull(val);\n },\n showlessresults: function (e, val) {\n getCommon(e).showLessResults = trueOrNull(val);\n },\n showrowfilters: function (e, val) {\n getCommon(e).showRowFilters = falseOrNull(val);\n },\n showrowsorts: function (e, val) {\n getCommon(e).showRowSorts = falseOrNull(val);\n },\n sort: function (e, val) {\n getCommon(e).resultsSortExpression = val;\n },\n sortascending: function (e, val) {\n getCommon(e).resultsSortAscending = falseOrNull(val);\n },\n spend: function (e, val) {\n getCommon(e).maximumSpend = Number(val);\n },\n supplier: function (e, val) {\n getCommon(e).suppliers = {\n values: !val || val === '' ? [] : val.split(',')\n };\n },\n tab: function (e, val, key) {\n getCommon(e)[key] = val;\n },\n transact: function (e, val) {\n getCommon(e).hideTransactionLinks = falseOrNull(val);\n },\n upfront: function (e, val) {\n getCommon(e).maximumUpfront = Number(val);\n }\n }, mappingOverrides);\n // Store the criteria as a string to prevent it from being modified\n const defaultCriteria = JSON.stringify(criteria);\n elements\n .find('[data-criteria]')\n .off('click')\n .on('click', function (e) {\n e.preventDefault();\n let criteria = JSON.parse(defaultCriteria);\n const element = wo$(e.currentTarget);\n const query = element.data('criteria') || element.closest('[data-criteria]').data('criteria');\n if (!query) {\n callback(element, criteria);\n return;\n }\n if (!criteria) {\n criteria = {};\n }\n const keys = Object.keys(mappings);\n const args = query.split('&');\n for (let i = 0; i < args.length; i++) {\n const keyVal = args[i].split('=');\n if (keyVal[0]) {\n const key = keyVal[0].toLowerCase();\n const value = keyVal[1];\n if (keys.includes(key)) {\n for (let j = 0; j < keys.length; j++) {\n if (key === keys[j].toLowerCase()) {\n mappings[key](criteria, value, key);\n break;\n }\n }\n }\n else {\n criteria[key] = value;\n }\n }\n }\n callback(element, criteria);\n });\n }\n // Extracted from widgets/js/common\n showTracking() {\n const tracking = wo$('#tracking');\n const config = this.getSiteConfiguration();\n if (config.enableGeoCheck) {\n let country = 0;\n wo$.ajax({\n url: '/cdn-cgi/trace',\n type: 'GET',\n success: function (result) {\n const matches = result.match('loc=(.{2})');\n if (matches && matches.length === 2) {\n switch (matches[1]) {\n case 'AU':\n country = 1;\n break;\n case 'GB':\n country = 2;\n break;\n case 'US':\n country = 3;\n break;\n case 'NZ':\n country = 4;\n break;\n case 'CA':\n country = 5;\n break;\n case 'MX':\n country = 8;\n break;\n case 'CL':\n country = 9;\n break;\n }\n if (country === config.country) {\n tracking.html(tracking.data('html'));\n }\n }\n }\n });\n }\n }\n setCoverageCookie(coverage) {\n if (typeof window === 'undefined' || !window || !wo$) {\n return;\n }\n if (!coverage) {\n Cookies.set('coverage', null, { path: '/', expires: -1 });\n return;\n }\n Cookies.set('coverage', coverage, { path: '/', expires: 1 });\n }\n setDropdownIndex(dropdown, optionValue) {\n dropdown.val(optionValue);\n dropdown.trigger('change');\n }\n resetDoubleSlider(slider, sliderConfig) {\n slider.val([sliderConfig.pegs[0].index, sliderConfig.pegs[sliderConfig.pegs.length - 1].index]);\n }\n /**\n * Initialises module on document ready\n * @param module Module name, typically `import.meta.url`\n * @param init Initialisation function, including support for `async` functions\n */\n initModule(module = import.meta.url, init) {\n if (this.initialised.includes(module)) {\n return;\n }\n this.initialised.push(module);\n wo$(() => __awaiter(this, void 0, void 0, function* () {\n const result = init();\n if (result instanceof Promise) {\n yield result;\n }\n }));\n }\n waitForAddressCookieInit(addressInstance) {\n return __awaiter(this, void 0, void 0, function* () {\n console.time(`waitForAddressCookieInit(${addressInstance})`);\n yield tryWaitFor(() => {\n var _a, _b, _c;\n const state = getState().shared;\n /*\n console.debug({\n initialiesdWith: state.addressCookie.initialiesdWith?.label,\n cookie: JSON.parse(Cookies.get('address'))?.label\n });\n */\n return (!document.getElementById('location-header') ||\n (((_a = state.addressCookie.initialiesdWith) === null || _a === void 0 ? void 0 : _a.label) &&\n (addressInstance === 'any' ||\n ((_b = state.addressCookie.initialiesdWith) === null || _b === void 0 ? void 0 : _b.label) === ((_c = JSON.parse(Cookies.get('address'))) === null || _c === void 0 ? void 0 : _c.label))));\n }, {\n intervalMs: 100,\n timeoutMs: 500,\n timeoutMessage: `Timeout on waitForAddressCookieInit(${addressInstance})`,\n onTimeout: e => {\n console.warn(e);\n this.Rollbar.warning(e);\n }\n });\n console.timeEnd(`waitForAddressCookieInit(${addressInstance})`);\n /*\n const state = getState().shared;\n console.debug({\n initialiesdWith: state.addressCookie.initialiesdWith?.label,\n cookie: JSON.parse(Cookies.get('address'))?.label\n });\n */\n });\n }\n waitForExtraAnalyticsData() {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.waitForAddressCookieInit('exact');\n // Fallback to any address if the exact check failed\n yield this.waitForAddressCookieInit('any');\n console.time('waitForExtraAnalyticsData -> address or coverage cookie present');\n yield tryWaitFor(() => !!Cookies.get('address') || !!Cookies.get('coverage'), {\n timeoutMessage: 'Timeout on waiting for address or coverage cookie',\n timeoutMs: 100\n });\n console.timeEnd('waitForExtraAnalyticsData -> address or coverage cookie present');\n });\n }\n initAnalytics() {\n return __awaiter(this, void 0, void 0, function* () {\n initDataLayer();\n const analyticsClientSideData = this.getAnalyticsClientSideData();\n if (!analyticsClientSideData) {\n return;\n }\n const { data } = analyticsClientSideData;\n if (!data.trackInitialPageview) {\n return;\n }\n yield this.waitForExtraAnalyticsData();\n if (this.scope === 'shared') {\n this.trackPageView(null, null, null, data.referrer);\n }\n else {\n this.trackPageView();\n }\n });\n }\n /**\n * Common initialisation for both core site and widgets\n **/\n initBase() {\n return __awaiter(this, void 0, void 0, function* () {\n this.isInitRequested = true;\n yield this.initializeRollbar();\n this.initAnalytics();\n this.applyPopover();\n window.dispatchEvent(new CustomEvent('jQueryReady'));\n });\n }\n init() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.isInitRequested) {\n return;\n }\n yield this.initBase();\n queryStringUtils.extendPrototype();\n this.initModule(import.meta.url, () => __awaiter(this, void 0, void 0, function* () {\n this.setYouTubeEnhancedPrivacy();\n this.checkSiteQueryString();\n wo$.blockUI.defaults.overlayCSS = {};\n this.showStoreSelector();\n yield this.bindStateSwitcher();\n this.bindModalLinks();\n this.bindTextAdLinks();\n this.bindExpressResults();\n this.bindRetailSplash();\n this.stopPropagation();\n this.bindClickUrl();\n this.bindTrackClick();\n this.bindTrackEvent();\n this.bindShow();\n this.bindScrollTo();\n this.bindFocusAndSelect();\n this.bindGenericCallback();\n this.checkAffiliateDomainCookie();\n this.bindPhoneSpecsModal();\n this.bindTabletSpecsModal();\n this.bindPhoneGallery();\n this.bindTabletGallery();\n this.bindSubscribe();\n this.bindDataTables();\n this.bindPrivateDataModal();\n this.bindBYODModal();\n this.bindNewsCarousel();\n this.bindSlickSingle();\n this.Core.init();\n }));\n });\n }\n}\n","export function replaceQueryString(url, newQuery) {\n const regex = /\\?(.*)$/gi;\n let newUrl = url.replace(regex, '');\n if (newQuery[0] !== '?')\n newUrl += '?';\n newUrl += newQuery;\n return newUrl;\n}\n// TODO: Don't extend prototype, use a separate helper function instead\nexport function extendPrototype() {\n if (!String.prototype.replaceQueryString) {\n // ReSharper disable once NativeTypePrototypeExtending\n /* eslint-disable-next-line no-extend-native */\n String.prototype.replaceQueryString = function (newQuery) {\n return replaceQueryString(this, newQuery);\n };\n }\n}\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nexport const rollbar = {\n instance: {},\n config: {\n captureIp: false\n },\n init() {\n return __awaiter(this, void 0, void 0, function* () {\n const Rollbar = (yield import('rollbar')).default;\n this.instance = new Rollbar({\n accessToken: this.config.token,\n captureUncaught: false,\n captureUnhandledRejections: false,\n captureIp: this.config.captureIp,\n payload: {\n environment: this.config.env\n }\n });\n this.instance.configure({\n scrubFields: ['apiKey', 'password']\n });\n });\n }\n};\n","// See: https://developer.mozilla.org/en-US/docs/Web/API/Background_Tasks_API#Concepts_and_usage -> Falling back to setTimeout\nexport function init() {\n if (!window.requestIdleCallback) {\n window.requestIdleCallback =\n window.requestIdleCallback ||\n function (handler) {\n const startTime = Date.now();\n return setTimeout(function () {\n handler({\n didTimeout: false,\n timeRemaining: function () {\n return Math.max(0, 50.0 - (Date.now() - startTime));\n }\n });\n }, 1);\n };\n }\n if (!window.cancelIdleCallback) {\n window.cancelIdleCallback =\n window.cancelIdleCallback ||\n function (id) {\n clearTimeout(id);\n };\n }\n}\n","import { createSlice } from '@reduxjs/toolkit';\nconst sharedSlice = createSlice({\n name: 'shared',\n initialState: {\n addressCookie: {\n initialiesdWith: null\n }\n },\n reducers: {\n addressCookieInit(state, action) {\n state.addressCookie.initialiesdWith = action.payload.address;\n }\n }\n});\nexport default sharedSlice.reducer;\nexport const actions = sharedSlice.actions;\n","import { combineReducers } from 'redux';\nimport { broadbandApi } from '../../../Broadband/js/redux/broadbandApi';\nimport broadband from '../../../Broadband/js/redux/broadbandSlice';\nimport shared from './sharedSlice';\nconst features = {\n broadband,\n shared\n};\nconst apis = {\n // Unable to declare API in the broadband slice directly,\n // because 'state.' prefix is added causing incorrect state name, i.e. 'state.broadband/api'.\n [broadbandApi.reducerPath]: broadbandApi.reducer\n};\nconst rootReducer = combineReducers(Object.assign(Object.assign({}, features), apis));\nexport default rootReducer;\n","/* globals process */\nimport { configureStore } from '@reduxjs/toolkit';\nimport { setupListeners } from '@reduxjs/toolkit/query/react';\nimport { broadbandApi } from '../../../Broadband/js/redux/broadbandApi';\nimport rootReducer from './rootReducer';\nconst createStore = () => {\n const store = configureStore({\n preloadedState: {\n broadband: {}\n },\n reducer: rootReducer,\n devTools: process.env.NODE_ENV !== 'production',\n middleware: getDefaultMiddleware => getDefaultMiddleware().concat(broadbandApi.middleware)\n });\n // optional, but required for refetchOnFocus/refetchOnReconnect behaviors\n // see `setupListeners` docs - takes an optional callback as the 2nd arg for customization\n setupListeners(store.dispatch);\n return store;\n};\nexport const store = createStore();\nexport const { dispatch, getState, subscribe } = store;\n","export const onArrayPush = (target, callback) => {\n target.push = (...items) => {\n const res = Array.prototype.push.call(target, ...items);\n callback(items);\n return res;\n };\n};\n","import { onArrayPush } from './array';\nexport function pushDataLayerItem(item) {\n window.woDataLayer = window.woDataLayer || [];\n window.woDataLayer.push(item);\n}\nexport function pushDataLayerItemWidget(item) {\n pushDataLayerItem(item);\n}\nfunction getWidgetType() {\n const pathName = window.location.pathname;\n const matches = /^\\/widgets\\/(\\w+)([/|?].+)?/i.exec(pathName);\n return matches ? matches[1] : undefined;\n}\nexport function initDataLayer() {\n var _a;\n window.woDataLayer = (_a = window.woDataLayer) !== null && _a !== void 0 ? _a : [];\n // Set default values, reset unused (not explicitly set) parameters\n onArrayPush(window.woDataLayer, items => {\n var _a, _b, _c, _d, _e;\n for (let index = 0; index < items.length; index++) {\n const item = items[index];\n (_a = item['duration']) !== null && _a !== void 0 ? _a : (item['duration'] = undefined);\n (_b = item['error']) !== null && _b !== void 0 ? _b : (item['error'] = undefined);\n (_c = item['widget_type']) !== null && _c !== void 0 ? _c : (item['widget_type'] = undefined);\n (_d = item['widget_placement']) !== null && _d !== void 0 ? _d : (item['widget_placement'] = undefined);\n (_e = item['widget_type']) !== null && _e !== void 0 ? _e : (item['widget_type'] = getWidgetType());\n }\n });\n}\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nfunction initWaitForArgs(source) {\n // Set defaults\n return Object.assign({\n intervalMs: 50,\n timeoutMs: 5000,\n timeoutMessage: 'Timeout on waiting for condition',\n onTimeout: e => console.warn(e)\n }, source);\n}\n/**\n * Awaits for condition\n * @param condition condition check function\n * @param args\n * @throws Will throw error on timeout\n */\nexport function waitFor(condition, args) {\n args = initWaitForArgs(args);\n return new Promise((resolve, reject) => {\n const onResolve = () => {\n // console.debug(`Condition met, location: ${window.location}`);\n resolve();\n };\n if (condition()) {\n onResolve();\n return;\n }\n let cancel = false;\n const interval = setInterval(() => {\n // console.debug(`Checking condition, location: ${window.location}`);\n if (!condition()) {\n return;\n }\n clearInterval(interval);\n cancel = true;\n onResolve();\n }, args.intervalMs);\n setTimeout(() => {\n clearInterval(interval);\n if (cancel) {\n return;\n }\n // Don't create the error immediately to avoid it being logged incorrectly\n const error = () => new Error(args.timeoutMessage);\n reject(error());\n if (args.onTimeout) {\n args.onTimeout(error());\n }\n }, args.timeoutMs);\n });\n}\n/**\n * Awaits for condition wihtout throwing timeout error\n * @param condition condition check function\n * @param args\n */\nexport function tryWaitFor(condition, args) {\n return __awaiter(this, void 0, void 0, function* () {\n args = initWaitForArgs(args);\n try {\n yield waitFor(condition, args);\n }\n catch (error) {\n if (error.message === args.timeoutMessage && args.onTimeout) {\n args.onTimeout(error);\n return;\n }\n WhistleOut.Rollbar.warning(error);\n }\n });\n}\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport once from 'lodash/once';\nimport { waitFor } from '../../utils/timer';\nconst isInitialised = () => {\n return !!wo$.fn.selectpicker;\n};\nexport const initBootstrapSelect = once(() => __awaiter(void 0, void 0, void 0, function* () {\n if (isInitialised()) {\n return;\n }\n yield import('./bootstrap-select.nomodule');\n yield waitFor(isInitialised);\n const context = wo$.fn.selectpicker.Constructor;\n context.BootstrapVersion = '3.3.6';\n context.DEFAULTS.iconBase = 'fa';\n context.DEFAULTS.tickIcon = 'fa-check';\n}));\n"],"names":["appendQueryParam","queryString","param","value","length","updateQueryStringParameter","url","key","regex","RegExp","separator","indexOf","match","replace","getQueryStringParameter","name","window","location","href","matches","exec","decodeURIComponent","getReferrerEncoded","QueryStringHelper","encodeURIComponent","document","referrer","broadbandApi","reducerPath","baseQuery","baseUrl","endpoints","builder","getSearchResults","query","getTransactUrl","args","URLSearchParams","toString","mapSearchModelToState","searchModel","state","criteria","settings","coverageUrl","searchUrl","resultsSearchCriteria","pagedResultsUrl","suppressCoverageCheck","embeddedMode","enforceAjax","allConnectionsSelected","coverage","hideSupplierFilter","showMaxUpfrontSlider","suppliers","unavailableConnectionTypes","defaultSearchCriteria","defaultPrepaidExpiryDays","filters","allContractTerms","defaultSuppliers","broadbandSlice","initialState","reducers","init","action","search","payload","features","modal","broadbandReducer","featuresState","reducer","actions","modalSlice","showModal","activeTab","tabName","draft","isOpen","hideModal","selectTab","updateCriteria","updateData","data","updatePeakDataOnly","peakDataOnly","updateSpeed","speed","updateSpend","min","max","common","minimumSpend","maximumSpend","updateUpfront","maximumUpfront","updateSelectedSuppliers","keys","customerType","values","updateCustomerType","updateContractTerms","selected","all","contractTerms","updateAdvancedOptions","options","maxResultsPerSupplier","staticIp","uploadNotCounted","showLessResults","updatePrepaidExpiry","prepaidExpiry","updateCurrentSupplier","currentSupplierShortUrl","updateIncludeDealsOnly","includeOffersWithCampaignOnly","updatePhoneBundle","bundles","homePhone","updatePhoneCallsBundle","homePhoneCalls","updateTvBundle","tv","updateTvChannels","tvChannels","updateLineRentalBundle","lineRental","updateMobileBundle","mobilePhone","updateModem","modemShortUrl","simOnly","updateConnectionTypes","connectionTypes","addressChanged","broadband","p","sliceName","slice","disableMaximumResultLimits","enforceMaximumResultLimits","hideFeaturedResults","includeFeaturedResults","includeNbnConnections","nbnConnectionTypes","Array","isArray","push","resetBundles","searchError","searchSuccess","result","allAvailableConnectionsSelected","updateAddress","address","baseCriteria","_a","tab","WhistleOut","getSiteConfiguration","broadbandConfig","defaultTab","isSingleProvider","updateBundles","updateContractType","contractType","hide","parseInt","filter","c","results","productLabel","updatePlanSummarySupplier","supplier","maxResults","maximumNumberOfResults","updateSort","expression","isAscending","resultsSortExpression","resultsSortAscending","minValue","maxValue","commonCriteria","updateSuppliers","updateTab","widenResults","reduceData","increasePriceRange","includeAllContractLengths","includeAllSuppliers","reduceSpeed","noPeakData","includeMoreConnectionTypes","noDealsOnly","includeAllPrepaidExpiry","removeSelectedModem","noUploadCounted","noStaticIp","noBundling","sortBy","extraSlice","extraReducers","addCase","EmailMySearch","onSubmitClick","e","localContent","content","email","find","emailMySearch","validateEmail","listId","isSubscribeToNewsLetter","is","val","token","wo$","show","ajax","type","beforeSend","prop","success","IsVerificationEmailSent","successMessage","html","IsVerifiedAlready","error","complete","turnstileId","turnstile","reset","modalInit","initContent","this","modalContent","on","off","adInit","submitButton","adContent","config","test","initSlick","thisArg","generator","slick","P","Promise","resolve","reject","fulfilled","step","next","rejected","done","then","apply","WhistleOutCore","showSiteNotice","siteNotice","divWrapper","children","first","expirationInHours","expirationDate","slideTime","Date","setTime","getTime","undefined","Cookies","get","closeButton","toggle","slideToggle","click","set","path","expires","bindExpressNotice","remove","cookieName","domain","cookieDomain","reload","bindTopNav","which","Core","currentTarget","target","popoverProto","fn","popover","originalLeave","Constructor","prototype","leave","obj","self","constructor","getDelegateOptions","container","timeout","call","siblings","one","clearTimeout","nav","hasClass","attr","checkCountry","enableGeoCheck","country","showCountrySwitcher","bindLinkStrip","strip","affix","offset","top","bindAdminLinks","hover","animate","height","scrollHeight","opacity","setTimeout","confirm","alert","_arguments","jQuery","noConflict","WhistleOutContext","scope","notifications","Callbacks","endProgressEventName","pushDataLayerItem","applyPopover","hideAllPopovers","inState","storeSelectorModal","selectedHandler","keyup","keyCode","submitStoreSelectorModal","$staff","typeahead","minLength","items","addItem","id","code","source","process","dataType","json","afterSelect","item","matcher","displayText","siteConfiguration","currentStoreId","selectedStoreCookieKey","focus","privateDataModalId","initialised","initializeRollbar","Rollbar","rollbar","Object","assign","siteConfig","rollbarKey","rollbarEnvironment","env","anonymiseTracking","captureIp","instance","readLookupData","parent","force","Error","JSON","parse","setLookupData","getCurrentLocation","successCallback","failCallback","getCurrentLocationViaHtml5","getCurrentLocationViaApi","getCurrentLatLng","getCurrentLatLngViaHtml5","getCurrentLatLngViaApi","navigator","enableHtml5Geolocation","geolocation","getCurrentPosition","position","lat","coords","latitude","lng","longitude","latLng","addressResult","street","streetNumber","city","label","getLabel","countryCode","shortName","jqXHR","textStatus","errorThrown","cookie","getLocationCookie","response","postal","res","iso_code","getLabelFromMaxMind","setLocationCookie","autoDetectLocation","now","expireTime","stringify","getComponentValue","postcode","trim","names","en","subdivisions","component","preferShorter","longName","appendReferrer","widgetLink","ReferrerHelper","createSlider","sliderElement","textElement","sliderConfig","format","onChange","rebind","noUiSlider","behaviour","connect","range","pegs","start","slide","index","text","currentPeg","change","createDoubleSlider","textMaxElement","showMaxTextForFullRange","currentPeg1","currentPeg2","update","isiOS","platform","startProgress","trickleRate","trickleSpeed","showSpinner","element","endProgressTimer","NProgress","configure","block","message","endProgress","addEventListener","event","endProgressOnPageShow","removeEventListener","onpageshow","persisted","dispatchEvent","CustomEvent","unblock","isPositiveNumber","isNumeric","isNumber","replaceQueryString","newQuery","getAnalyticsClientSideData","analytics","siteConfigurationContainer","querySelector","isCookieEnabledByCategory","category","oneTrustCookieValue","isPerformanceCookieEnabled","isTargetingCookieEnabled","setYouTubeEnhancedPrivacy","frames","getElementsByTagName","i","src","trackGaEvent","fields","analyticsClientSideData","each","accounts","account","affiliateOwned","includeEventTracking","ga","trackerId","err","trackEvent","pushGtmEvent","trackEventV2","params","pushGtmEventV2","sendPageview","trackingUrl","pathname","accountNumber","useAmpClientId","linkIdTracking","optimizeAccount","dimensions","sendPageView","addPageImpression","isAjax","includeWhistleOutTracking","productAreaId","affiliateId","affiliateDomainId","isTransaction","isProduct","isMobileDevice","image","Image","onload","getWoUserId","userInfoCookieKey","userInfoCookieValue","cookieValues","split","setWoUserId","generateUuid","r","Math","random","woUserId","trackPageView","trackPageImpression","pushGtmPageView","customNonInteraction","nonInteraction","toLowerCase","customCategory","customAction","customLabel","customValue","isNaN","customCountry","customProductAreaId","customUserId","dimensionNames","dataLayerValue","customUrl","userAgent","getAds","productArea","placements","makeArray","map","el","adplacement","x","processAd","stopPropagation","bindSubscribe","fire","ads","ad","Tab","Placement","matchingPlacements","Content","TrackingHtml","slideUp","setAd","setStickyBottomStripAd","slideDown","onPlacement","placement","Id","Name","observer","IntersectionObserver","entries","isIntersecting","disconnect","root","threshold","observe","jObj","has","triggerPopoverNotification","popoverElement","trigger","checkQueryParamExists","queryParam","selectedStoreId","staff","selectedStaff","showStoreSelector","forceStoreSelection","forceStoreStaffSelection","selectedStaffCookieKey","selectStore","resetStore","resetStaff","setFullYear","getFullYear","getStaff","getStaffId","getStaffCode","getStaffName","getStoreName","storeName","getStoreEmail","storeEmail","bindStateSwitcher","$container","$province","applySelectPicker","applySelectPickersStyle","selectpicker","bindModalLinks","magnificPopup","removeDelay","preloader","fixedContentPos","bindTextAdLinks","bindExpressResults","bindRetailSplash","startRetailSplashTimer","retailSplashTimer","focusAndSelect","copyToClipboard","len","setSelectionRange","execCommand","callback","addClass","bindCta","cta","bindClickUrl","bindTrackClick","append","applyPromoAds","closest","open","checkSiteQueryString","initHistoryTracker","HistoryWrapper","pushState","title","history","pushQuery","newUrl","origin","onpopstate","scrollTo","scrollDuration","scrollOffset","behavior","startsWith","getElementById","y","getBoundingClientRect","scrollY","bindScrollTo","preventDefault","dataset","scrollto","Number","scrollduration","scrolloffset","bindShow","bindFocusAndSelect","bindTrackEvent","bindSlick","dots","infinite","slidesToShow","slidesToScroll","responsive","breakpoint","getRemarketingData","remarketing","trackingCode","remarketingTrackingCode","gtag","allow_custom_scripts","send_to","u1","u2","u3","planType","u4","phoneBrand","u5","phone","u6","tags","u7","connectionType","u8","u9","numberOfLines","u10","u11","tabletBrand","u12","tablet","u13","bindGenericCallback","form","removeClass","$name","$phone","$state","time","parents","checkAffiliateDomainCookie","cookieDuration","String","bindDataTables","applySorting","sort","direction","order","dataTable","ext","errMode","extend","defaults","searching","paging","info","ordering","columnDefs","orderable","targets","orderSequence","fixedHeader","headerOffset","details","jobj","DataTable","scrollX","scrollCollapse","bindCitiesAutoComplete","page","input","area","icon","selectOnBlur","setPrivateDataCookieValue","disabled","getPrivateDataCookieValue","bindPrivateDataModal","hideData","checkBox","checked","bindPhoneSpecsModal","phoneShortUrl","phoneSpecsContainer","phoneSpecsModalUrl","bindTabletSpecsModal","tabletShortUrl","showTabletSpecs","tabletSpecsContainer","tabletSpecsModalUrl","bindBYODModal","byoModalContainer","showBYODModal","byoPhonePickerModalUrl","byoPhonePickerController","selectedModel","genericSearchUrl","bindPhoneGallery","phoneGalleryUrl","gallery","enabled","showTabletGallery","tabletGalleryUrl","bindTabletGallery","appendTo","select","eventLabel","subscribeUrl","bindNewsCarousel","bindSlickSingle","encodeHtml","str","createElement","createTextNode","innerHTML","trueOrNull","falseOrNull","boolOrNull","bindCriteriaFilters","elements","mappingOverrides","getCommon","mappings","cache","useCache","campaignGroup","contract","currentsupplier","customer","dealsonly","debug","enforcemaximumresultlimits","hidecoverage","hideCoverage","hideemptytabs","hideEmptyTabs","hideshare","hideShare","hidesort","hideSort","hidewidenresults","hideWidenResults","includefeatured","maxresults","getResults","maxresultspersupplier","minspend","monetised","monetisedResultsOnly","pagesize","pageSize","product","products","productlabel","showall","showAllResults","showlessresults","showrowfilters","showRowFilters","showrowsorts","showRowSorts","sortascending","spend","transact","hideTransactionLinks","upfront","defaultCriteria","keyVal","includes","j","showTracking","tracking","setCoverageCookie","setDropdownIndex","dropdown","optionValue","resetDoubleSlider","slider","initModule","module","waitForAddressCookieInit","addressInstance","_b","_c","shared","addressCookie","initialiesdWith","intervalMs","timeoutMs","timeoutMessage","onTimeout","warning","waitForExtraAnalyticsData","initAnalytics","trackInitialPageview","initBase","isInitRequested","blockUI","overlayCSS","default","accessToken","captureUncaught","captureUnhandledRejections","environment","scrubFields","requestIdleCallback","handler","startTime","didTimeout","timeRemaining","cancelIdleCallback","sharedSlice","addressCookieInit","apis","store","preloadedState","devTools","middleware","getDefaultMiddleware","concat","dispatch","createStore","getState","subscribe","onArrayPush","woDataLayer","pushDataLayerItemWidget","getWidgetType","pathName","initDataLayer","o","_d","_e","__awaiter","initWaitForArgs","waitFor","condition","onResolve","cancel","interval","setInterval","clearInterval","tryWaitFor","isInitialised","initBootstrapSelect","context","BootstrapVersion","DEFAULTS","iconBase","tickIcon"],"sourceRoot":""}