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A,IADGwC,GAA4BA,EAA2B3P,GACrD1B,EAAIqP,EAAShS,OAAQ2C,IACzBmR,EAAU9B,EAASrP,GAChB6O,EAAoByB,EAAEY,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOtC,EAAoBM,EAAEC,EAAO,EAGjCqC,EAAqBC,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FD,EAAmB3D,QAAQsD,EAAqBO,KAAK,KAAM,IAC3DF,EAAmB7P,KAAOwP,EAAqBO,KAAK,KAAMF,EAAmB7P,KAAK+P,KAAKF,G,KC7CvF,IAAIG,EAAsB/C,EAAoBM,OAAEtT,EAAW,CAAC,KAAK,IAAOgT,EAAoB,QAC5F+C,EAAsB/C,EAAoBM,EAAEyC,E","sources":["webpack://pizza-hut/webpack/runtime/chunk loaded","webpack://pizza-hut/./src/shared/types.ts","webpack://pizza-hut/./src/dataLayer/viewportHelpers.ts","webpack://pizza-hut/./src/dataLayer/dataLayerWrapper.ts","webpack://pizza-hut/./src/dataLayer/types.ts","webpack://pizza-hut/./src/dataLayer/productPage/product-module.ts","webpack://pizza-hut/./src/dataLayer/homePage/offers-promotions.ts","webpack://pizza-hut/./src/dataLayer/traceIdHandler.ts","webpack://pizza-hut/./src/apps/ThankYouApp/types.ts","webpack://pizza-hut/./src/shared/utils.ts","webpack://pizza-hut/./src/shared/helpers/routing-helpers.ts","webpack://pizza-hut/./src/shared/helpers/index.ts","webpack://pizza-hut/./src/apps/ProductsApp/types/dto.types.ts","webpack://pizza-hut/./src/shared/helpers/coupons-helpers.ts","webpack://pizza-hut/./src/dataLayer/productPage/cart-module.ts","webpack://pizza-hut/./src/dataLayer/index.ts","webpack://pizza-hut/./src/dataLayer/homePage/localization-module.ts","webpack://pizza-hut/./src/dataLayer/productPage/variant-module.ts","webpack://pizza-hut/./src/dataLayer/checkoutPage/checkout-module.ts","webpack://pizza-hut/./src/dataLayer/thankYoyPage/thankYou-module.ts","webpack://pizza-hut/webpack/bootstrap","webpack://pizza-hut/webpack/runtime/compat get default export","webpack://pizza-hut/webpack/runtime/define property getters","webpack://pizza-hut/webpack/runtime/global","webpack://pizza-hut/webpack/runtime/hasOwnProperty shorthand","webpack://pizza-hut/webpack/runtime/runtimeId","webpack://pizza-hut/webpack/runtime/jsonp chunk loading","webpack://pizza-hut/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","import { openNewWindow } from './helpers/routing-helpers';\r\n/* eslint-disable @typescript-eslint/no-explicit-any */\r\n/* eslint-disable no-extend-native */\r\n/* eslint-disable func-names */\r\ndeclare global {\r\n interface Array {\r\n orderByDesc(propertyName: string): void;\r\n orderByAsc(propertyName: string): void;\r\n removeDuplicates(): any[];\r\n }\r\n}\r\n\r\nArray.prototype.orderByAsc = function (propertyName: string): void {\r\n this.sort((a, b) => {\r\n return a[propertyName] - b[propertyName];\r\n });\r\n};\r\nArray.prototype.orderByDesc = function (propertyName: string): void {\r\n this.sort((a, b) => {\r\n return b[propertyName] - a[propertyName];\r\n });\r\n};\r\nArray.prototype.removeDuplicates = function (): any[] {\r\n const removedDuplicates = new Set(this);\r\n const arrayWithoutDuplicates = Array.from(removedDuplicates);\r\n return arrayWithoutDuplicates;\r\n};\r\n\r\nexport interface StaticContent {\r\n messages: {\r\n tooltipsGeoDisabled: string;\r\n tooltipsFillAddress: string;\r\n tooltipsFillStreetNumber: string;\r\n tooltipsAdressConfirmation: string;\r\n errorMessagesWrongAddress: string;\r\n errorMessagesWrongStreetNumber: string;\r\n errorMessagesImpossibleToLocateDelivery: string;\r\n errorMessagesImpossibleToLocatePickup: string;\r\n errorMessagesNoStores: string;\r\n errorModalTitle: string;\r\n errorModalDescription: string;\r\n\r\n // TODO update to return not as a part of messages\r\n apiKey: string;\r\n };\r\n simplifiedFooter: {\r\n Name: string;\r\n Url: string;\r\n OpenInNewWindow?: { Value: boolean };\r\n }[];\r\n configuration: {\r\n hideCouponsScratchedPrices: boolean;\r\n }\r\n}\r\n\r\nexport interface PropertyChangedPayload {\r\n name: string;\r\n value: string;\r\n}\r\n\r\nexport interface PropertyChangedEventArgs {\r\n target: {\r\n name: string;\r\n value: T;\r\n };\r\n}\r\n\r\nexport interface ServerSideValidationPayload {\r\n fieldName: string;\r\n message: string;\r\n status: number;\r\n errorCode: string;\r\n}\r\n\r\nexport interface GeneralServerError {\r\n succeeded: boolean;\r\n status: number;\r\n errorCode: string;\r\n contentMessageForErrorFound: boolean;\r\n contextDescription: string;\r\n errorDescription: string;\r\n errorTranslations: {\r\n title: string;\r\n description: string;\r\n },\r\n detail: string;\r\n}\r\n\r\nexport interface PlaceOrderError extends GeneralServerError {\r\n entitiesErrors: {\r\n entityIdentifier: string;\r\n entityType: string;\r\n errorCode: string;\r\n }[];\r\n}\r\n\r\nexport interface LoaderPayload {\r\n value: boolean;\r\n}\r\n\r\nexport enum UserMessageType {\r\n INFO,\r\n WARNING,\r\n ERROR,\r\n}\r\nexport interface UserMessage {\r\n type: UserMessageType;\r\n message: string;\r\n status?: number;\r\n}\r\n\r\nexport enum OrderDistributionType {\r\n Delivery = 'DELIVERY',\r\n Pickup = 'PICKUP',\r\n}\r\n\r\nexport interface ValidatorItem {\r\n fn(value: string): boolean;\r\n message: string;\r\n messageType: UserMessageType;\r\n}\r\n\r\nexport interface ValidationResult {\r\n messages: UserMessage[];\r\n success: boolean;\r\n}\r\n\r\nexport interface AppCookies {\r\n 'pizza-hut-access-token': {\r\n email: string;\r\n phone: string;\r\n };\r\n}\r\n\r\nexport interface SupportedCulture {\r\n isDefault: boolean;\r\n id: string;\r\n fullName: string;\r\n shortName: string;\r\n}\r\n\r\nexport interface ModalProps {\r\n submitCallbackFn?(): void;\r\n cancelCallbackFn(): void;\r\n}\r\n\r\nexport enum OrderStatusEnum {\r\n CreatingOrder = 0,\r\n AwaitingExternalPayment = 1,\r\n PaymentSettledButNotYetSuppliedToStore = 2,\r\n ReceivedByStore = 3,\r\n InOven = 4,\r\n ReadyForDispatch = 5,\r\n OutForDelivery = 6,\r\n Completed = 7,\r\n Cancelled = 8,\r\n ReceivedButFutureOrder = 9,\r\n ExternalPaymentFailed = 10,\r\n AwaitingExternalValidation = 11,\r\n ExternalValidationFailed = 12,\r\n AwaitingExternalCreation = 13,\r\n ExternalCreationFailed = 14,\r\n ExternalCreationTimedOut = 15,\r\n}\r\n\r\nexport enum AppReviewTarget {\r\n NATIVE_STORE = 'NATIVE_STORE',\r\n DB = 'DB'\r\n}\r\n\r\nexport interface AppConfiguration {\r\n maxChangeableToppingsForEditPizza: number;\r\n maxExtraToppingsForEditPizza: number;\r\n maxToppingsForCustomPizza: number;\r\n appReviewsEnabled: boolean;\r\n positiveReviewsTarget: AppReviewTarget;\r\n negativeReviewsTarget: AppReviewTarget;\r\n}\r\n\r\nexport enum ApplicationType {\r\n MOBILE = 'Mobile',\r\n WEBSITE = 'Website'\r\n}\r\n","export function getVisibleElementsPositions(elementClass: string): number[] {\r\n const products: HTMLCollectionOf = document.getElementsByClassName(elementClass);\r\n\r\n const productsArray = Array.from(products);\r\n\r\n const productPositions = productsArray.map((el, idx) => {\r\n if (isElementInViewport(el)) return idx;\r\n });\r\n\r\n return productPositions.filter((value) => value !== undefined) as number[];\r\n}\r\n\r\nfunction isElementInViewport(el: Element): boolean {\r\n const rect = el.getBoundingClientRect();\r\n\r\n return (\r\n rect.top >= 0 &&\r\n rect.left >= 0 &&\r\n rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\r\n rect.right <= (window.innerWidth || document.documentElement.clientWidth)\r\n );\r\n}\r\n","export function DataLayerWrapper(fnk: () => void) {\r\n try {\r\n return fnk();\r\n } catch (gtmError) {\r\n logGTMError(gtmError);\r\n }\r\n}\r\n\r\nfunction logGTMError(error: string | unknown) {\r\n console.warn('Error during data collection function execution:', error);\r\n}\r\n","export const DataLayerEvents = {\r\n screenLoad: (name: string) => `screen.load.auto.dataLayer.load.${name}`,\r\n modalLoad: (name: string) => `screen.load.artificialPageView.${name}`,\r\n moduleLoad: 'module.load.auto.dataLayer.load',\r\n moduleClick: (name: string) => `moduleItem.interact.manual.click.${name}`,\r\n moduleVisibleItems: 'module.load.auto.dataLayer.load.viewportItems',\r\n user: {\r\n localisationSuccess: 'user.interact.auto.success.localisationSuccess',\r\n localisationError: 'user.interact.auto.success.localisationError',\r\n },\r\n product: {\r\n load: 'product.load.auto.dataLayer.load',\r\n addToCart: 'product.interact.manual.click.addToCart',\r\n removeFromCart: 'product.interact.manual.click.removeFromCart',\r\n view: 'product.interact.manual.view',\r\n customize: 'product.interact.manual.click.customize',\r\n visibleItems: 'product.load.auto.dataLayer.load.viewportItems',\r\n goToDetails: 'product.load.auto.dataLayer.load.manual.click',\r\n },\r\n promotion: {\r\n load: 'promotion.load.auto.dataLayer.load',\r\n click: 'promotion.interact.manual.click',\r\n addToCart: 'promotion.interact.manual.click.addToCart',\r\n visibleItems: 'promotion.load.auto.dataLayer.load.viewportItems',\r\n view: 'promotion.interact.manual.view',\r\n },\r\n cart: {\r\n load: 'cart.load.auto.dataLayer.load',\r\n submit: 'cart.interact.manual.submit.orderSubmit',\r\n error: 'cart.load.auto.error.orderError',\r\n promoCodeAdded: 'cart.interact.manual.submit.promoCodeAdded',\r\n paymentSelected: 'cart.interact.payment.selected',\r\n },\r\n transaction: {\r\n success: 'transaction.load.auto.success.transactionSuccess',\r\n },\r\n variant: {\r\n select: 'variant.interact.manual.click.select',\r\n unselect: 'variant.interact.manual.click.unselect',\r\n },\r\n};\r\n\r\nexport const UserLoginStatuses = {\r\n loggedIn: 'loggedIn',\r\n loggedOut: 'loggedOut',\r\n};\r\nexport interface DataToPush {\r\n data: object;\r\n name: string;\r\n}\r\n","/* eslint-disable import/prefer-default-export */\r\nimport { AppliedCoupon, BasketItem, BasketOffer } from 'apps/ProductsApp/types/basket.types';\r\nimport { Offer, OfferChoice, OfferDetails, Option, Product } from 'apps/ProductsApp/types/dto.types';\r\nimport { getVisibleElementsPositions } from '../viewportHelpers';\r\nimport { DataLayerWrapper } from '../dataLayerWrapper';\r\nimport { DataLayerEvents } from '../types';\r\n\r\nlet scrollTimer: ReturnType;\r\n\r\nexport function initProductsDataLayer() {\r\n window.gtm.productsModule = {\r\n addProductToBasket: (product: Product, option: Option, price: string, position: number) => {\r\n DataLayerWrapper(() => {\r\n window.gtm.pushToDataLayer({\r\n event: DataLayerEvents.product.addToCart,\r\n product: {\r\n id: product.id,\r\n name: product.title,\r\n variantId: option.sku.optionId,\r\n variantName: getOptionDescription(product, option),\r\n variantType: product.categoryId === 'PIZ' ? 'Pizza Crust' : option.type,\r\n category: product.categoryId,\r\n value: {\r\n displayGross: price,\r\n },\r\n purchaseMethod: 'main',\r\n position,\r\n brand: 'pizza-hut',\r\n list: product.categoryId,\r\n sku: { productId: product.options[0].sku.productId, optionId: product.options[0].sku.optionId },\r\n },\r\n });\r\n });\r\n },\r\n addDealToBasket: (deal: OfferDetails, position: number | string) => {\r\n DataLayerWrapper(() => {\r\n window.gtm.pushToDataLayer({\r\n event: DataLayerEvents.promotion.addToCart,\r\n product: {\r\n id: deal.code,\r\n name: deal.title,\r\n category: 'OFFERS',\r\n value: {\r\n displayGross: deal.price,\r\n },\r\n purchaseMethod: 'deal',\r\n bundleItems: getBundleItems(deal.choiceSlots),\r\n position,\r\n },\r\n });\r\n });\r\n },\r\n removeProductFromBasket: (product: BasketItem) => {\r\n DataLayerWrapper(() => {\r\n window.gtm.pushToDataLayer({\r\n event: DataLayerEvents.product.removeFromCart,\r\n product: {\r\n id: product.sku.productId,\r\n quantity: product.amount,\r\n variants: [\r\n {\r\n id: product.sku.optionId,\r\n price: product.price,\r\n },\r\n ],\r\n },\r\n });\r\n });\r\n },\r\n removeDealFromBasket: (offer: BasketOffer) => {\r\n DataLayerWrapper(() => {\r\n window.gtm.pushToDataLayer({\r\n event: DataLayerEvents.product.removeFromCart,\r\n product: {\r\n id: offer.appliedDealIdentifier,\r\n quantity: 1,\r\n variants: [\r\n offer.choices.map((cs) => {\r\n return {\r\n id: cs.sku.productId,\r\n price: cs.price,\r\n };\r\n }),\r\n ],\r\n },\r\n });\r\n });\r\n },\r\n removeCouponFromBasket: (coupon: AppliedCoupon) => {\r\n DataLayerWrapper(() => {\r\n window.gtm.pushToDataLayer({\r\n event: DataLayerEvents.product.removeFromCart,\r\n product: {\r\n id: coupon.code,\r\n type: coupon.type,\r\n name: coupon.description,\r\n },\r\n });\r\n });\r\n },\r\n customize: (product: Product) => {\r\n DataLayerWrapper(() => {\r\n window.gtm.pushToDataLayer({\r\n event: DataLayerEvents.product.customize,\r\n interactionElement: {\r\n method: 'customise-button',\r\n },\r\n products: [{ id: product.id, name: product.title }],\r\n });\r\n });\r\n },\r\n productsLoad: (products: Product[], isDelivery: boolean, showPrice = false) => {\r\n DataLayerWrapper(() => {\r\n window.gtm.pushToDataLayer({\r\n event: DataLayerEvents.product.load,\r\n assets: {\r\n products: [\r\n products.map((pr, idx) => {\r\n return {\r\n bundleItems: [],\r\n category: pr.categoryId,\r\n id: pr.id,\r\n name: pr.title,\r\n purchaseMethod: 'main',\r\n variants: getVariants(pr.options),\r\n value: {\r\n displayGross: showPrice\r\n ? isDelivery\r\n ? pr.options[0].deliveryPrice\r\n : pr.options[0].pickupPrice\r\n : 'not localized',\r\n },\r\n position: idx,\r\n brand: 'pizza-hut',\r\n list: pr.categoryId,\r\n sku: { productId: pr.options[0].sku.productId, optionId: pr.options[0].sku.optionId },\r\n };\r\n }),\r\n ],\r\n },\r\n products: products.map((pr) => ({ id: pr.id, name: pr.title })),\r\n });\r\n });\r\n DataLayerWrapper(() => {\r\n const impressions = getVisibleElementsPositions('product-card').map((position) => {\r\n const product = products[position];\r\n return {\r\n ...product,\r\n options:\r\n product.categoryId === 'PIZ'\r\n ? product.options.map((option) => {\r\n return { ...option, type: 'Pizza Crust' };\r\n })\r\n : product.options,\r\n };\r\n });\r\n if (!impressions || impressions.length === 0) return;\r\n window.gtm.pushToDataLayer({\r\n event: DataLayerEvents.product.visibleItems,\r\n ecommerce: {\r\n impressions,\r\n },\r\n });\r\n });\r\n },\r\n productsScroll: (products: Product[]) => {\r\n clearTimeout(scrollTimer);\r\n scrollTimer = setTimeout(() => {\r\n DataLayerWrapper(() => {\r\n const impressions = getVisibleElementsPositions('product-card').map((position) => {\r\n const product = products[position];\r\n return {\r\n ...product,\r\n options:\r\n product.categoryId === 'PIZ'\r\n ? product.options.map((option) => {\r\n return { ...option, type: 'Pizza Crust' };\r\n })\r\n : product.options,\r\n };\r\n });\r\n if (!impressions || impressions.length === 0) return;\r\n\r\n window.gtm.pushToDataLayer({\r\n event: DataLayerEvents.product.visibleItems,\r\n ecommerce: {\r\n impressions,\r\n },\r\n });\r\n });\r\n }, 1000);\r\n },\r\n dealsLoad: (deals: Offer[]) => {\r\n DataLayerWrapper(() => {\r\n window.gtm.pushToDataLayer({\r\n event: DataLayerEvents.promotion.load,\r\n assets: {\r\n products: [\r\n deals.map((deal) => {\r\n return {\r\n bundleItems: [],\r\n category: 'offers',\r\n id: deal.code,\r\n name: deal.title,\r\n purchaseMethod: 'deal',\r\n variants: [],\r\n value: {\r\n displayGross: deal.price,\r\n },\r\n };\r\n }),\r\n ],\r\n },\r\n products: deals.map((deal) => ({ id: deal.code, name: deal.title })),\r\n });\r\n });\r\n DataLayerWrapper(() => {\r\n const impressions = getVisibleElementsPositions('offer-card').map((position) => deals[position]);\r\n if (!impressions || impressions.length === 0) return;\r\n window.gtm.pushToDataLayer({\r\n event: DataLayerEvents.promotion.visibleItems,\r\n ecommerce: {\r\n impressions,\r\n },\r\n });\r\n });\r\n },\r\n dealsScroll: (deals: Offer[]) => {\r\n clearTimeout(scrollTimer);\r\n\r\n scrollTimer = setTimeout(() => {\r\n DataLayerWrapper(() => {\r\n const impressions = getVisibleElementsPositions('offer-card').map((position) => deals[position]);\r\n if (!impressions || impressions.length === 0) return;\r\n window.gtm.pushToDataLayer({\r\n event: DataLayerEvents.promotion.visibleItems,\r\n ecommerce: {\r\n impressions,\r\n },\r\n });\r\n });\r\n }, 1000);\r\n },\r\n view: (productName: string) => {\r\n DataLayerWrapper(() => {\r\n window.gtm.pushToDataLayer({\r\n event: DataLayerEvents.product.view,\r\n products: [productName],\r\n });\r\n });\r\n },\r\n dealCompleted: (choices: OfferChoice[]) => {\r\n DataLayerWrapper(() => {\r\n if (!choices || choices.length === 0) return;\r\n window.gtm.pushToDataLayer({\r\n event: DataLayerEvents.promotion.view,\r\n products: [...getBundleItems(choices)],\r\n });\r\n });\r\n },\r\n goToProductDetails: (product: Product) => {\r\n DataLayerWrapper(() => {\r\n window.gtm.pushToDataLayer({\r\n event: DataLayerEvents.product.goToDetails,\r\n ecommerce: {\r\n impressions: {\r\n product: {\r\n id: product.id,\r\n name: product.title,\r\n category: product.categoryId,\r\n purchaseMethod: 'main',\r\n brand: 'pizza-hut',\r\n list: product.categoryId,\r\n sku: { productId: product.options[0].sku.productId, optionId: product.options[0].sku.optionId },\r\n },\r\n },\r\n },\r\n });\r\n });\r\n },\r\n };\r\n}\r\n\r\nfunction getBundleItems(choices: OfferChoice[]): string[] {\r\n const bundleItems = choices.map((cs) => {\r\n return cs.choices.length === 1 ? cs.choices[0].title : cs.selectedChoice ? cs.selectedChoice.sku.productTitle : 'unknown';\r\n });\r\n return bundleItems;\r\n}\r\n\r\nfunction getVariants(options: Option[]): any[] {\r\n if (!options || options.length < 1) return [];\r\n const variants = options.map((opt) => {\r\n return {\r\n id: opt.sku.optionId,\r\n name: opt.title,\r\n type: opt.type,\r\n value: {\r\n delivery: opt.deliveryPrice,\r\n pickup: opt.pickupPrice,\r\n },\r\n };\r\n });\r\n return variants;\r\n}\r\nfunction getOptionDescription(product: Product, selectedOption: Option): string {\r\n const productIsPizza = product.categoryId === 'PIZ';\r\n if (productIsPizza) {\r\n return `${selectedOption.type} - ${selectedOption.title}`;\r\n }\r\n return selectedOption.title;\r\n}\r\n","/* eslint-disable object-shorthand */\r\n/* eslint-disable import/prefer-default-export */\r\nimport { CrossSellOffer } from 'apps/ProductsApp/types/basket.types';\r\nimport { Offer } from 'apps/ProductsApp/types/dto.types';\r\nimport { DataLayerWrapper } from '../dataLayerWrapper';\r\nimport { DataLayerEvents } from '../types';\r\nimport { getVisibleElementsPositions } from '../viewportHelpers';\r\n\r\nlet scrollTimer: ReturnType;\r\n\r\nexport function initOffersAndPromotionsDataLayer() {\r\n gtm.promotionsModule = {\r\n clicked: function (id, name, url) {\r\n DataLayerWrapper(() => {\r\n gtm.pushToDataLayer({\r\n event: DataLayerEvents.moduleClick(name),\r\n assets: {\r\n links: [\r\n {\r\n id,\r\n type: 'internal',\r\n name,\r\n attributes: {\r\n destination: url,\r\n },\r\n },\r\n ],\r\n },\r\n });\r\n });\r\n },\r\n load: function (id: string[], name: string[], url: string[]): void {\r\n const modules = id.map((_, index) => {\r\n return {\r\n id: id[index],\r\n name: name[index],\r\n placement: 'offers-homepage',\r\n subType: 'recommendations',\r\n type: 'merchandising',\r\n };\r\n });\r\n const assets = id.map((_, index) => {\r\n return {\r\n promotions: [\r\n {\r\n attributes: {\r\n destination: {\r\n pathname: url[index],\r\n },\r\n },\r\n id: id[index],\r\n name: name[index],\r\n },\r\n ],\r\n };\r\n });\r\n DataLayerWrapper(() => {\r\n gtm.pushToDataLayer({\r\n event: DataLayerEvents.moduleLoad,\r\n modules,\r\n assets,\r\n });\r\n });\r\n },\r\n crossSellClicked: (crossSellOffer: CrossSellOffer) => {\r\n DataLayerWrapper(() => {\r\n gtm.pushToDataLayer({\r\n event: DataLayerEvents.moduleClick('cross-sell'),\r\n modules: [\r\n {\r\n id: crossSellOffer.code,\r\n name: crossSellOffer.title,\r\n type: 'cross-sell',\r\n placement: 'basket',\r\n },\r\n ],\r\n assets: {\r\n promotions: [\r\n {\r\n id: crossSellOffer.code,\r\n name: crossSellOffer.title,\r\n unit: {\r\n name: crossSellOffer.sizeUnitName,\r\n },\r\n },\r\n ],\r\n },\r\n });\r\n });\r\n },\r\n crossSellLoad: (crossSellOffer: CrossSellOffer) => {\r\n DataLayerWrapper(() => {\r\n gtm.pushToDataLayer({\r\n event: DataLayerEvents.moduleLoad,\r\n modules: [\r\n {\r\n id: crossSellOffer.code,\r\n name: crossSellOffer.title,\r\n type: 'cross-sell',\r\n placement: 'basket',\r\n },\r\n ],\r\n assets: {\r\n promotions: [\r\n {\r\n id: crossSellOffer.code,\r\n name: crossSellOffer.title,\r\n unit: {\r\n name: crossSellOffer.sizeUnitName,\r\n },\r\n },\r\n ],\r\n },\r\n });\r\n });\r\n },\r\n offerClicked: function (offer: Offer) {\r\n DataLayerWrapper(() => {\r\n gtm.pushToDataLayer({\r\n event: DataLayerEvents.promotion.click,\r\n modules: [\r\n {\r\n id: offer.code,\r\n name: offer.title,\r\n type: 'offer',\r\n list: 'offers',\r\n },\r\n ],\r\n assets: {\r\n promotions: [\r\n {\r\n id: offer.code,\r\n name: offer.title,\r\n },\r\n ],\r\n },\r\n });\r\n });\r\n },\r\n homePageOffersScroll: function (offers: { id: string; name: string; url: string }[]) {\r\n clearTimeout(scrollTimer);\r\n scrollTimer = setTimeout(() => {\r\n const visiblePromotions = getVisibleElementsPositions('promo-container');\r\n\r\n if (visiblePromotions.length > 0) {\r\n DataLayerWrapper(() => {\r\n gtm.pushToDataLayer({\r\n event: DataLayerEvents.moduleVisibleItems,\r\n promotions: {\r\n impressions: visiblePromotions.map((position) => {\r\n const offer = offers[position];\r\n return {\r\n attributes: {\r\n destination: {\r\n pathname: offer.url,\r\n },\r\n },\r\n id: offer.id,\r\n name: offer.name,\r\n };\r\n }),\r\n },\r\n });\r\n });\r\n }\r\n }, 1000);\r\n },\r\n };\r\n}\r\n","// generate traceId on script load\r\nimport { BasketItem } from 'apps/ProductsApp/types/basket.types';\r\nimport { ThankYouProduct } from 'apps/ThankYouApp/types';\r\n\r\nconst successfulOrdersKey = 'successfulOrderIds';\r\n\r\nexport const generateTraceId = function () {\r\n const traceId = localStorage.getItem('traceId');\r\n if (!traceId) {\r\n let dt = new Date().getTime();\r\n const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\r\n const r = (dt + Math.random() * 16) % 16 | 0;\r\n dt = Math.floor(dt / 16);\r\n return (c == 'x' ? r : (r & 0x3) | 0x8).toString(16);\r\n });\r\n localStorage.setItem('traceId', uuid);\r\n }\r\n};\r\n\r\nexport const increasePurchasedTimes = function () {\r\n const purchased = localStorage.getItem('purchased');\r\n if (!purchased) {\r\n localStorage.setItem('purchased', '1');\r\n } else {\r\n const purchasedTimes = parseInt(purchased) + 1;\r\n localStorage.setItem('purchased', purchasedTimes.toString());\r\n }\r\n};\r\nexport const addSuccessfulOrder = function (orderId: string) {\r\n const savedSuccessfulOrders = localStorage.getItem(successfulOrdersKey);\r\n let successfulOrders = [];\r\n if (!savedSuccessfulOrders) {\r\n successfulOrders.push(orderId);\r\n } else {\r\n successfulOrders = JSON.parse(savedSuccessfulOrders) as string[];\r\n successfulOrders.push(orderId);\r\n }\r\n localStorage.setItem(successfulOrdersKey, JSON.stringify(successfulOrders));\r\n};\r\n\r\nexport const isOrderSuccessfulEventPushed = function (orderId: string): boolean {\r\n const savedSuccessfulOrders = localStorage.getItem(successfulOrdersKey);\r\n if (savedSuccessfulOrders) {\r\n const orders = JSON.parse(savedSuccessfulOrders) as string[];\r\n if (orders && orders.indexOf(orderId) !== -1) return true;\r\n }\r\n return false;\r\n};\r\n\r\nexport const constructProductsFromThankYouProduct = function (orderedProducts: ThankYouProduct[], paymentMethodCode: string): any[] {\r\n const products: any[] = [];\r\n orderedProducts.forEach((product) => {\r\n const dataLayerProduct = {\r\n brand: 'pizza-hut',\r\n category: product.productCategoryCode,\r\n id: product.id,\r\n list: product.productCategoryCode,\r\n name: product.name,\r\n purchaseMethod: paymentMethodCode,\r\n variantId: product.optionId,\r\n variantName:\r\n product.productCategoryCode.toUpperCase() === 'PIZ'\r\n ? `${product.optionSubType} - ${product.optionName}`\r\n : product.optionName,\r\n variantType: product.optionType,\r\n displayGross: product.price,\r\n };\r\n products.push(dataLayerProduct);\r\n });\r\n return products;\r\n};\r\n\r\nexport const constructProductsFromBasketItem = function (orderedProducts: BasketItem[], paymentMethodCode: string | undefined): any[] {\r\n const products: any[] = [];\r\n orderedProducts.forEach((product) => {\r\n const dataLayerProduct = {\r\n brand: 'pizza-hut',\r\n category: product.categoryId,\r\n id: product.sku?.productId,\r\n list: product.categoryId,\r\n name: product.sku?.productTitle,\r\n purchaseMethod: paymentMethodCode,\r\n variantId: product.sku?.optionId,\r\n variantName:\r\n product.categoryId.toUpperCase() === 'PIZ'\r\n ? `${product.sku?.optionSubTitle} - ${product.sku?.optionTitle}`\r\n : product.sku?.optionTitle,\r\n variantType: product.sku?.optionCategory,\r\n displayGross: product.price,\r\n };\r\n products.push(dataLayerProduct);\r\n });\r\n return products;\r\n};\r\n","import { OrderStatusEnum } from 'shared/types';\r\n\r\nexport interface OrderDetailsState {\r\n totalPriceIncVat: number;\r\n totalPriceBeforeDiscountIncVat: number;\r\n paymentMethod: string;\r\n paymentMethodCode: string;\r\n paymentMethodImageUrl: string;\r\n storePhoneNumber: string;\r\n customerAddress?: ThankYouAddress;\r\n storeAddress: ThankYouAddress;\r\n storeId: number;\r\n deliveryType: ThankYouDeliveryType;\r\n deliveryTime: Date;\r\n orderedProducts: ThankYouProduct[];\r\n customerEmailAddress: string;\r\n orderReference: string;\r\n orderStatus: OrderStatusEnum;\r\n deliveryPrice?: number;\r\n usedOffers: {\r\n code: string;\r\n title: string;\r\n }[];\r\n trackingMapUrl?: string;\r\n}\r\n\r\nexport interface ThankYouAddress {\r\n id?: number;\r\n type: string;\r\n street: string;\r\n streetNumber: string;\r\n zipCode: string;\r\n city: string;\r\n country: string;\r\n remark: string;\r\n}\r\n\r\nexport interface ThankYouProduct {\r\n id: string;\r\n name: string;\r\n price: number;\r\n optionName: string;\r\n productCategoryCode: string;\r\n optionType: string;\r\n optionSubType: string;\r\n optionId: number;\r\n quantity: number;\r\n}\r\n\r\nexport enum ThankYouDeliveryType {\r\n DELIVERY = 'Send',\r\n PICKUP = 'PickUp',\r\n}\r\n\r\nexport interface ThankYouStaticContent {\r\n mainHeader: string;\r\n addressDetails: AddressDetailsStaticContent;\r\n storeDetails: {\r\n heading: string;\r\n addressPrefix: string;\r\n phoneNumber: string;\r\n };\r\n contact: ContactStaticContent;\r\n paymentMethodHeading: string;\r\n basket: ThankYouBasketStaticContent;\r\n statusLabels: {\r\n orderPlacedLoggedIn: StatusLabel;\r\n orderPlacedNotLoggedIn: StatusLabel;\r\n orderConfirmed: StatusLabel;\r\n inTheOven: StatusLabel;\r\n orderPacking: StatusLabel;\r\n outForDelivery: StatusLabel;\r\n almostThere: StatusLabel;\r\n arrived: StatusLabel;\r\n };\r\n pickupStatusLabels: {\r\n orderPlacedLoggedIn: StatusLabel;\r\n orderPlacedNotLoggedIn: StatusLabel;\r\n orderInPreparation: StatusLabel;\r\n orderInTheOven: StatusLabel;\r\n orderInPacking: StatusLabel;\r\n orderReady: StatusLabel;\r\n };\r\n callStore: string;\r\n openInTheMaps: string;\r\n storeDirections: string;\r\n appReviewModals: AppReviewModalsStaticContent;\r\n}\r\n\r\nexport interface AppReviewModalsStaticContent {\r\n reviewTypeModalStaticContent: ReviewTypeModalStaticContent,\r\n positiveReviewModalStaticContent: ReviewInputModalStaticContent,\r\n negativeReviewModalStaticContent: ReviewInputModalStaticContent,\r\n reviewPlacedModalStaticContent: ReviewPlacedModalStaticContent\r\n}\r\n\r\nexport interface ReviewTypeModalStaticContent {\r\n header: string,\r\n content: string,\r\n}\r\n\r\nexport interface ReviewInputModalStaticContent {\r\n placeholder: string,\r\n submitButtonText: string,\r\n}\r\n\r\nexport interface ReviewPlacedModalStaticContent {\r\n content: string,\r\n}\r\n\r\nexport interface StatusLabel {\r\n header: string;\r\n infoText: string;\r\n}\r\n\r\nexport interface AddressDetailsStaticContent {\r\n heading: string;\r\n addressText: string;\r\n phoneNumber: string;\r\n deliveryTime: string;\r\n confirmationEmail: string;\r\n orderTracker: string;\r\n}\r\n\r\nexport interface ContactStaticContent {\r\n heading: string;\r\n phoneNumber: string;\r\n}\r\n\r\nexport interface ThankYouBasketStaticContent {\r\n orderNumber: string;\r\n orderSummary: string;\r\n total: string;\r\n totalSaved: string;\r\n deliveryCharge: string;\r\n}\r\n\r\nexport enum AppReviewStatus {\r\n HIDDEN,\r\n CHOICE,\r\n POSITIVE_REVIEW,\r\n NEGATIVE_REVIEW,\r\n NATIVE_REVIEW,\r\n PLACED\r\n}","import { compose } from 'redux';\r\n\r\nconst composeEnhancers = (process.env.NODE_ENV === 'development' && window && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) || compose;\r\n\r\nexport default composeEnhancers;\r\n\r\nexport interface LoadReduxFromLocalStorageParams {\r\n state: TState;\r\n key: string;\r\n}\r\nexport function LoadReduxFromLocalStorage({ state, key }: LoadReduxFromLocalStorageParams): TState {\r\n try {\r\n const sessionItem = localStorage.getItem(key);\r\n\r\n if (!sessionItem) {\r\n return state;\r\n }\r\n\r\n return {\r\n ...state,\r\n ...JSON.parse(sessionItem),\r\n };\r\n } catch (ex) {\r\n console.debug(`Problem with loading state from session storage for key ${key}`);\r\n console.log(ex);\r\n }\r\n\r\n return state;\r\n}\r\n\r\nexport function LoadReduxItemFromLocalStorage(defaultValue: T, key: string): T {\r\n try {\r\n const sessionItem = localStorage.getItem(key);\r\n\r\n if (!sessionItem) {\r\n return defaultValue;\r\n }\r\n\r\n return JSON.parse(sessionItem);\r\n } catch (ex) {\r\n console.debug(`Problem with loading redux state item from session storage for key ${key}`);\r\n console.log(ex);\r\n }\r\n\r\n return defaultValue;\r\n}\r\n\r\nexport function storeDataInCookie(key: string, value: T, expirationDate?: Date): void {\r\n const cookieValue = `${encodeURIComponent(String(value))}; path=/${\r\n expirationDate ? `; expires=${expirationDate.toUTCString()}` : ''\r\n }`;\r\n document.cookie = `${key}=${cookieValue}`;\r\n}\r\n\r\nexport function removeDataFromCookie(key: string) {\r\n document.cookie = `${encodeURIComponent(key)}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`;\r\n}\r\n\r\nexport function LoadReduxFromCookie({ state, key }: LoadReduxFromLocalStorageParams): TState {\r\n try {\r\n const cookieState = document.cookie.split('; ')?.find((row) => row.startsWith(`${key}=`));\r\n\r\n if (!cookieState) {\r\n return state;\r\n }\r\n\r\n const decodedCookieState = decodeURIComponent(cookieState).split('=')[1].split('; ')[0];\r\n\r\n return {\r\n ...state,\r\n ...JSON.parse(decodedCookieState),\r\n };\r\n } catch (ex) {\r\n console.debug(`Problem with loading state from session storage for key ${key}`);\r\n console.log(ex);\r\n }\r\n\r\n return state;\r\n}\r\n\r\nexport function cookieExists(key: string) {\r\n const cookieData = document.cookie.split('; ')?.find((row) => row.startsWith(`${key}=`));\r\n if (!cookieData) return false;\r\n return true;\r\n}\r\nexport function removeBasketFromLocalStorage() {\r\n localStorage.removeItem('basket');\r\n localStorage.removeItem('addressWizzard');\r\n}\r\n\r\nexport function capitalizeFirstLetter(value?: string): string {\r\n if (!value) return '';\r\n return value.charAt(0).toUpperCase() + value.slice(1);\r\n}\r\n","/* eslint-disable @typescript-eslint/no-explicit-any */\r\n\r\nimport { removeDataFromCookie } from 'shared/utils';\r\n\r\nexport const redirectToHomePage = (): void => {\r\n window.location.href = hostURL();\r\n};\r\n\r\nexport const logout = (): void => {\r\n removeDataFromCookie('pizza-hut-access-token');\r\n window.location.href = `${hostURL()}account/sign-out`;\r\n};\r\n\r\nexport const hostURL = (): string => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const url = (document.getElementById('baseUrl') as any).value;\r\n return `${url}/`;\r\n};\r\nexport const appCulture = (): string => {\r\n const culture = (document.getElementById('requestedCulture') as any).value;\r\n return culture;\r\n};\r\n\r\nconst getClientURL = (): string => {\r\n const host = hostURL();\r\n const href = document.getElementsByTagName('base')[0].getAttribute('href');\r\n return host + href;\r\n};\r\n\r\nexport const getRedirectURL = (href: string): string => {\r\n const url = `${getClientURL()}/${href}`;\r\n return url;\r\n};\r\n\r\nexport const getOtherAppRedirectURL = (href: string): string => {\r\n const url = hostURL() + href;\r\n return url;\r\n};\r\n\r\nexport const redirectToOtherAppURL = (href: string): void => {\r\n const url = hostURL() + href;\r\n window.location.href = url;\r\n};\r\n\r\nexport const redirectToExternalURL = (href: string): void => {\r\n window.location.href = href;\r\n};\r\n\r\nexport const redirectToURL = (href: string): void => {\r\n const url = hostURL() + href;\r\n window.location.href = url;\r\n};\r\n\r\nexport const redirectToNotFound = (): void => {\r\n const url = `${hostURL()}not-found`;\r\n window.location.href = url;\r\n};\r\n\r\nexport const backToHistory = (): void => {\r\n // eslint-disable-next-line no-restricted-globals\r\n history.back();\r\n};\r\nexport const redirectToMainPage = (): void => {\r\n window.location.href = hostURL();\r\n};\r\n\r\nexport const parametersToObject = (args: string): any => {\r\n const value = args.substring(1, args.length);\r\n const obj: any = {};\r\n\r\n if (value == null || value === undefined) return obj;\r\n\r\n const splitOperator = '&';\r\n const equalOperator = '=';\r\n const parameters = value.split(splitOperator);\r\n\r\n for (let index = 0; index < parameters.length; index++) {\r\n const element = parameters[index];\r\n const keyAndValueArray = element.split(equalOperator);\r\n // eslint-disable-next-line prefer-destructuring\r\n obj[keyAndValueArray[0]] = keyAndValueArray[1];\r\n }\r\n\r\n return obj;\r\n};\r\n\r\nexport const openNewWindow = (href: string): void => {\r\n const url = hostURL() + href;\r\n window.open(url);\r\n};\r\n","/* eslint-disable no-restricted-globals */\r\nimport * as _routingHelpers from './routing-helpers';\r\n\r\n// exports\r\nexport const RoutingHelpers = _routingHelpers;\r\n\r\nexport const DateTime = {\r\n now: (): string => {\r\n const date = new Date();\r\n const timestamp = `${date.getFullYear()}-${\r\n date.getMonth() + 1\r\n }-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;\r\n return timestamp;\r\n },\r\n formatTimeHHMM: (date: Date): string => {\r\n const hour = date.getHours().toString().length === 1 ? `0${date.getHours()}` : date.getHours().toString();\r\n const minutes = date.getMinutes().toString().length === 1 ? `0${date.getMinutes()}` : date.getMinutes().toString();\r\n\r\n return `${hour}:${minutes}`;\r\n },\r\n // method to format DD/MM/YYYY to Date object\r\n formatToDateObject: (date: string): Date | undefined => {\r\n if (!date || date.length === 0) return undefined;\r\n const year = date.slice(6);\r\n const month = date.slice(3, 5);\r\n const day = date.slice(0, 2);\r\n\r\n return new Date(`${year}-${month}-${day}`);\r\n },\r\n};\r\n\r\nexport const StringHelper = {\r\n GetFirstNWords: (sourceString: string, n: number): string => {\r\n return sourceString && typeof n === 'number' ? sourceString.split(' ').slice(0, n).join(' ') : '';\r\n },\r\n OmitFirstNWords: (sourceString: string, n: number): string => {\r\n if (sourceString && typeof n === 'number') {\r\n const words = sourceString.split(' ');\r\n return words.slice(n, words.length).join(' ');\r\n }\r\n return '';\r\n },\r\n};\r\n\r\nexport const PaymentHelper = {\r\n getCurrencyISOCode(): string {\r\n const currency = (document.getElementById('defaultCurrency') as any).value;\r\n return currency;\r\n },\r\n getDefaultCulture(): string {\r\n const culture = (document.getElementById('defaultCulture') as any).value;\r\n return culture;\r\n },\r\n formatToDisplay(value: number): string {\r\n return new Intl.NumberFormat(this.getDefaultCulture(), { style: 'currency', currency: this.getCurrencyISOCode() }).format(\r\n value,\r\n );\r\n },\r\n formatStringToDisplay(value: string): string {\r\n const valAsNumber = parseFloat(value.replace(',', '.'));\r\n if (isNaN(valAsNumber)) return '';\r\n return this.formatToDisplay(valAsNumber);\r\n },\r\n};\r\n\r\n// eslint-disable-next-line\r\nexport const FieldsToBooleanCondition = (obj: any): boolean => {\r\n const keys = Object.keys(obj);\r\n let result = false;\r\n keys.forEach((key) => {\r\n if (obj[key] !== false) result = obj[key] !== false;\r\n });\r\n return result;\r\n};\r\n","import { BasketItem, SKU } from 'apps/ProductsApp/types/basket.types';\r\n\r\nexport interface Option {\r\n sku: SKU;\r\n title: string;\r\n name: string;\r\n deliveryPrice: number;\r\n pickupPrice: number;\r\n type: string;\r\n subType: string;\r\n sortOrder: number;\r\n extraCharge?: number;\r\n default: boolean;\r\n}\r\n\r\nexport interface OptionDetails extends Option {\r\n additionalToppings?: ToppingBase[];\r\n defaultToppings?: ToppingBase[];\r\n description: string;\r\n id: number;\r\n image: string;\r\n xTastyProducts: number[];\r\n}\r\n\r\nexport interface Tag {\r\n id: string;\r\n title: string;\r\n iconUrl: string;\r\n}\r\n\r\nexport enum StoreStockStatus {\r\n Unknown = 0,\r\n IsInStock = 1,\r\n OutOfStock = 2,\r\n}\r\n\r\nexport interface Product {\r\n id: string;\r\n title: string;\r\n route: string;\r\n categoryId: string;\r\n description: string;\r\n isCustomizable: boolean;\r\n isCreateCustomPizza: boolean;\r\n isRestrictedForDeliveryTime: boolean;\r\n isXTasty: boolean;\r\n menuImage: {\r\n label: string;\r\n url: string;\r\n toolTip: string;\r\n };\r\n options: Option[];\r\n tags: Tag[];\r\n stockStatus: StoreStockStatus;\r\n}\r\n\r\nexport interface ProductDetails extends Product {\r\n productPage: {\r\n productDetailDescription: string;\r\n productDetailMetaDescription: string;\r\n productDetailMetaKeywords: string;\r\n productDetailSubTitle: string;\r\n productDetailTitle: string;\r\n productDetailImage: {\r\n label: string;\r\n url: string;\r\n toolTip: string;\r\n };\r\n };\r\n additionalInfo: string;\r\n}\r\n\r\nexport interface Category {\r\n id: string;\r\n title: string;\r\n route: string;\r\n}\r\n\r\nexport interface CategoryDto {\r\n id: string;\r\n title: string;\r\n route: string;\r\n products: Product[];\r\n}\r\n\r\nexport interface ProductDetails extends Product {\r\n options: OptionDetails[];\r\n customProductImage: string;\r\n customProductImageSmall: string;\r\n xTastyImage: string;\r\n xTastySlicesCount?: number;\r\n xTastyProducts?: XTastyProduct[]\r\n}\r\n\r\nexport interface XTastyProduct {\r\n id: string,\r\n title: string\r\n}\r\n\r\nexport interface ToppingBase {\r\n id: number;\r\n price: number;\r\n}\r\n\r\nexport interface Topping extends ToppingBase {\r\n title: string;\r\n description?: string;\r\n imageUrl?: string;\r\n imageThumbnailUrl: string;\r\n categoryId: string;\r\n}\r\n\r\nexport interface Offer {\r\n altText: string;\r\n title: string;\r\n code: string;\r\n description: string;\r\n shortDescription: string;\r\n price?: number;\r\n imagePath: string;\r\n mobileImagePath: string;\r\n forDelivery: boolean;\r\n forPickup: boolean;\r\n isPopular: boolean;\r\n defaultCouponPrice?: number;\r\n}\r\n\r\nexport interface OfferDetails extends Offer {\r\n allowRepetition: boolean;\r\n choiceSlots: OfferChoice[];\r\n type: OfferTypes;\r\n}\r\n\r\nexport interface OfferCustomizationDetails extends OfferDetails {\r\n isComplete: boolean;\r\n calculatedOfferPrice?: number; // please always calculate on backend side.\r\n appliedDealId?: string;\r\n position: number | string;\r\n}\r\n\r\nexport enum OfferTypes {\r\n EURO_DEAL_PLUS = 'EURO_DEAL_PLUS',\r\n PERC_DIS = 'PERC_DIS',\r\n OTHER = 'OTHER',\r\n FXD_DIS = 'FXD_DIS',\r\n XTH_PIZ_FRE = 'XTH_PIZ_FRE',\r\n XTH_PIZ_FRE_PLS = 'XTH_PIZ_FRE_PLS',\r\n FXD_ORD_DSC = 'FXD_ORD_DSC',\r\n PERC_ORD_DSC = 'PERC_ORD_DSC'\r\n}\r\nexport interface SelectedChoice\r\n extends Pick<\r\n BasketItem,\r\n | 'sku'\r\n | 'price'\r\n | 'basePrice'\r\n | 'xTastyChoices'\r\n | 'removedToppings'\r\n | 'addedToppings'\r\n | 'extraCharge'\r\n | 'specificationToppingsPrices'\r\n > {\r\n isFree?: boolean;\r\n appliedDealIndex?: number;\r\n}\r\n\r\nexport interface OfferChoice {\r\n selectedChoice?: SelectedChoice;\r\n choices: Product[];\r\n}\r\n\r\nexport interface AppConfiguration {\r\n maxChangeableToppingsForEditPizza: number;\r\n maxExtraToppingsForEditPizza: number;\r\n maxToppingsForCustomPizza: number;\r\n}\r\n\r\nexport interface OrderDetailsResponse {\r\n orderId: number;\r\n orderDate: string;\r\n isAsap: boolean;\r\n firstName: string;\r\n lastName: string;\r\n emailAddress: string;\r\n phoneNumber: string;\r\n street: string;\r\n streetNumber: string;\r\n city: string;\r\n district: string;\r\n country: string;\r\n addressAddition: string;\r\n addressRemark: string;\r\n receiptCompanyData: {\r\n isCompanyCustomer: boolean;\r\n companyName: string;\r\n companyAddress: string;\r\n vatId: string;\r\n };\r\n orderRemark: string;\r\n}\r\n\r\nexport interface OffersComboDto {\r\n couponId: string;\r\n isPossible: boolean;\r\n remarks: string;\r\n}\r\n\r\nexport interface ProductSEO {\r\n html: string;\r\n header: string;\r\n title: string;\r\n}\r\n","import { OfferChoice, OfferTypes } from 'apps/ProductsApp/types/dto.types';\r\n\r\nexport const isOfferComplexType = (couponType: OfferTypes): boolean => {\r\n if (isTwoForOneOffer(couponType)) return true;\r\n switch (couponType) {\r\n case OfferTypes.EURO_DEAL_PLUS:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n};\r\n\r\nexport const isTwoForOneOffer = (type?: OfferTypes): boolean => {\r\n if (type === OfferTypes.XTH_PIZ_FRE || type === OfferTypes.XTH_PIZ_FRE_PLS) return true;\r\n return false;\r\n};\r\n\r\nexport const getCheapestSelectedItemIndex = (choiceSlots: OfferChoice[]): number => {\r\n const productBasePrices = choiceSlots\r\n .map((choice) => {\r\n if (choice.selectedChoice) return choice.selectedChoice.basePrice;\r\n })\r\n .filter((basePrice) => basePrice !== undefined) as number[];\r\n const lowestPrice = Math.min(...productBasePrices);\r\n\r\n // Si Senior, there can be couple of items with same , lowest price\r\n const lowestPricedItems = choiceSlots.filter((el) => el.selectedChoice?.basePrice === lowestPrice);\r\n if (lowestPricedItems) {\r\n lowestPricedItems.sort((a, b) => {\r\n const totalLowerPriceA =\r\n (a.selectedChoice?.basePrice ?? 0) + (a.selectedChoice?.specificationToppingsPrices?.totalToppingsPrice ?? 0);\r\n const totalLowerPriceB =\r\n (b.selectedChoice?.basePrice ?? 0) + (b.selectedChoice?.specificationToppingsPrices?.totalToppingsPrice ?? 0);\r\n return totalLowerPriceA - totalLowerPriceB;\r\n });\r\n }\r\n return choiceSlots.findIndex((el) => el === lowestPricedItems[0]);\r\n};\r\n","import { LocalizationState } from 'apps/LocalizationApp/Store/reducers';\r\nimport { AppliedCoupon, Basket, BasketItem, BasketOffer } from 'apps/ProductsApp/types/basket.types';\r\nimport { Offer } from 'apps/ProductsApp/types/dto.types';\r\nimport { PaymentHelper } from 'shared/helpers';\r\nimport { isOfferComplexType } from 'shared/helpers/coupons-helpers';\r\nimport { OrderDistributionType } from 'shared/types';\r\nimport { DataLayerWrapper } from '../dataLayerWrapper';\r\nimport { DataLayerEvents } from '../types';\r\n\r\n// eslint-disable-next-line import/prefer-default-export\r\nexport function initCartDataLayer(): void {\r\n window.gtm.cartModule = {\r\n cartRecalculated: (basket: Basket, localization: LocalizationState, cartId: string) => {\r\n DataLayerWrapper(() => {\r\n const basketItems = basket.items.filter((item) => !item.isCompilationPart);\r\n\r\n const cartLines = [...getBasketItems(basketItems), ...getBasketDeals(basket.compiledOffers)];\r\n const cartCoupons = getCoupons(basket.coupons);\r\n gtm.pushToDataLayer({\r\n event: DataLayerEvents.cart.load,\r\n cart: {\r\n id: cartId,\r\n currency: PaymentHelper.getCurrencyISOCode(),\r\n lines: cartLines.map((cl, index) => {\r\n return { ...cl, id: `${cartId}-${index + 1}` };\r\n }),\r\n discount: {\r\n lines: cartCoupons.map((cc, index) => {\r\n return { ...cc, id: `${cartId}-${cartLines.length + index + 1}` };\r\n }),\r\n },\r\n shipping: {\r\n storeId: localization.currentStore?.id,\r\n value: {\r\n displayGross: basket.deliveryCharge ?? 0,\r\n },\r\n discount: {},\r\n type: localization.distributionType === OrderDistributionType.Delivery ? 'delivery' : 'collection',\r\n deliveryTime: localization.selectedOrderTime,\r\n },\r\n value: {\r\n displayGross: basket.totalPrice,\r\n },\r\n },\r\n });\r\n });\r\n },\r\n offerPromoAdded: (offer: Offer, cartId: string) => {\r\n DataLayerWrapper(() => {\r\n gtm.pushToDataLayer({\r\n event: DataLayerEvents.cart.promoCodeAdded,\r\n discountLine: {\r\n cartId,\r\n id: offer.code,\r\n name: offer.title,\r\n type: offer.shortDescription,\r\n value: {\r\n displayGross: offer.price,\r\n },\r\n code: offer.code,\r\n category: 'offer',\r\n },\r\n });\r\n });\r\n },\r\n };\r\n}\r\n\r\nfunction getBasketItems(items: BasketItem[]): any[] {\r\n if (!items || items.length === 0) return [];\r\n return items.map((item) => {\r\n return {\r\n product: {\r\n category: item.categoryId,\r\n id: item.sku.productId,\r\n name: item.sku.productTitle,\r\n purchaseMethod: 'main',\r\n attributes: {},\r\n bundleItems: {},\r\n variant: {\r\n id: item.sku.optionId,\r\n type: item.sku.optionSubTitle,\r\n name: item.sku.optionTitle,\r\n value: {\r\n displayGross: item.price,\r\n },\r\n },\r\n },\r\n value: { displayGross: item.price },\r\n };\r\n });\r\n}\r\nfunction getBasketDeals(deals: BasketOffer[]): any[] {\r\n if (!deals || deals.length === 0) return [];\r\n return deals.map((deal) => {\r\n return {\r\n product: {\r\n category: 'deal',\r\n id: deal.appliedDealIdentifier,\r\n name: deal.title,\r\n purchaseMethod: 'deal',\r\n attributes: {},\r\n bundleItems: getBasketItems(deal.choices),\r\n },\r\n value: { displayGross: deal.price },\r\n };\r\n });\r\n}\r\n\r\nfunction getCoupons(coupons: AppliedCoupon[]): any[] {\r\n if (!coupons || coupons.length === 0) return [];\r\n const filtered = coupons.filter((cp) => !isOfferComplexType(cp.type));\r\n return filtered.map((coupon) => {\r\n return {\r\n id: coupon.identifier,\r\n name: coupon.displayTitle,\r\n description: coupon.description,\r\n type: coupon.type,\r\n code: coupon.code,\r\n value: {\r\n displayGross: coupon.discount,\r\n },\r\n };\r\n });\r\n}\r\n","import { OrderDistributionType } from 'shared/types';\r\nimport { initProductsDataLayer } from './productPage/product-module';\r\nimport { initLocalizationDataLayer } from './homePage/localization-module';\r\nimport { initOffersAndPromotionsDataLayer } from './homePage/offers-promotions';\r\nimport { generateTraceId } from './traceIdHandler';\r\nimport { DataLayerEvents, DataToPush, UserLoginStatuses } from './types';\r\nimport initCheckoutDataLayer from './checkoutPage/checkout-module';\r\nimport { initCartDataLayer } from './productPage/cart-module';\r\nimport { initVariantDataLayer } from './productPage/variant-module';\r\nimport { DataLayerWrapper } from './dataLayerWrapper';\r\nimport initThankYouDataLayer from './thankYoyPage/thankYou-module';\r\n\r\ngenerateTraceId();\r\n\r\nwindow.gtm = {} as GoogleTagManager;\r\ngtm = {\r\n pushToDataLayer(data: any) {\r\n if (data === undefined) {\r\n return;\r\n }\r\n if (!window.dataLayer) {\r\n window.dataLayer = [];\r\n }\r\n window.dataLayer.push(data as never);\r\n },\r\n\r\n screenLoad(screenType: string, screenName: string, dataToPush?: DataToPush) {\r\n DataLayerWrapper(() => {\r\n let data: any = {\r\n screen: {\r\n name: screenName,\r\n type: screenType,\r\n },\r\n platform: {\r\n type: getPlatformType(),\r\n culture: getCulture(),\r\n name: 'phz',\r\n environment: 'live',\r\n },\r\n user: getUserDataLayer(),\r\n };\r\n\r\n if (dataToPush !== undefined) {\r\n data[dataToPush.name] = dataToPush.data;\r\n }\r\n this.pushToDataLayer({\r\n event: DataLayerEvents.screenLoad(screenType),\r\n data,\r\n });\r\n });\r\n },\r\n\r\n moduleLoad(modules, assets) {\r\n DataLayerWrapper(() => {\r\n const module = {\r\n event: DataLayerEvents.moduleLoad,\r\n modules,\r\n assets,\r\n };\r\n this.pushToDataLayer(module);\r\n });\r\n },\r\n\r\n modalLoad(artificialScreenName) {\r\n DataLayerWrapper(() => {\r\n const data = {\r\n event: DataLayerEvents.modalLoad(artificialScreenName),\r\n artificialPageViewName: artificialScreenName,\r\n };\r\n this.pushToDataLayer(data);\r\n });\r\n },\r\n} as GoogleTagManager;\r\n\r\ninitOffersAndPromotionsDataLayer();\r\ninitLocalizationDataLayer();\r\ninitProductsDataLayer();\r\ninitVariantDataLayer();\r\ninitCartDataLayer();\r\ninitCheckoutDataLayer();\r\ninitThankYouDataLayer();\r\n\r\nfunction getUserDataLayer() {\r\n const token = decodeCookieFor('pizza-hut-access-token');\r\n return {\r\n cid: getCustomerIdFromCookie(),\r\n status: token ? UserLoginStatuses.loggedIn : UserLoginStatuses.loggedOut,\r\n traceId: getTraceId(),\r\n customer: {\r\n id: token ? token.UserId : 'notLogged',\r\n status: getCustomerPurchaseStatus(),\r\n deliveryType: getDeliveryType(),\r\n },\r\n device: {\r\n typeRollup: getDeviceType(),\r\n },\r\n location: getUserLocation(),\r\n };\r\n}\r\nfunction getDeliveryType() {\r\n const location = decodeCookieFor('localization');\r\n const isSelectedLocation = location?.currentStore && location.currentStore?.id;\r\n if (isSelectedLocation) {\r\n const distribution = location.distributionType === OrderDistributionType.Delivery ? 'A domicilio' : 'A recoger';\r\n return distribution;\r\n }\r\n\r\n return null;\r\n}\r\n\r\nfunction getCustomerIdFromCookie() {\r\n const ga = decodeCookieFor('_ga', false);\r\n if (ga && ga.length > 0) {\r\n return ga.slice(ga.indexOf('.'), ga.lastIndexOf('.')).slice(ga.indexOf('.'), ga.length);\r\n }\r\n return '';\r\n}\r\n\r\nfunction decodeCookieFor(objectName: string, parseJSON = true) {\r\n const decodedCookie = decodeURIComponent(document.cookie);\r\n const cookies = decodedCookie.split(';');\r\n\r\n for (let i = 0; i < cookies.length; i++) {\r\n if (cookies[i].indexOf(objectName) !== -1) {\r\n const stringCookie = cookies[i].replace(/ /g, '').substr(objectName.length + 1, decodedCookie.length);\r\n return parseJSON ? JSON.parse(stringCookie) : stringCookie;\r\n }\r\n }\r\n\r\n return undefined;\r\n}\r\n\r\nfunction getUserLocation() {\r\n const location = decodeCookieFor('localization');\r\n if (location && location.currentStore) return { storeId: location.currentStore.id };\r\n return 'unknown';\r\n}\r\n\r\nfunction getTraceId() {\r\n return localStorage.traceId;\r\n}\r\n\r\nfunction getCustomerPurchaseStatus() {\r\n const purchased = localStorage.getItem('purchased');\r\n if (!purchased || purchased === '0') {\r\n return 'non-purchaser';\r\n }\r\n if (purchased === '1') {\r\n return 'first';\r\n }\r\n return 'repeat';\r\n}\r\n\r\nfunction getDeviceType() {\r\n return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ? 'mobile' : 'desktop';\r\n}\r\n\r\nfunction getPlatformType() {\r\n return window.S4DWebBridge() != null ? 'ConsumerApp' : 'Website';\r\n}\r\n\r\nfunction getCulture() {\r\n return document.documentElement.lang;\r\n}\r\n","import { OrderDistributionType } from 'shared/types';\r\nimport { DataLayerWrapper } from '../dataLayerWrapper';\r\nimport { DataLayerEvents } from '../types';\r\n\r\nexport function initLocalizationDataLayer() {\r\n window.gtm.localizationModule = {\r\n deliveryTabClicked: () => {\r\n pushLocalizationClick('localisation-delivery', 'delivery-tab', 'show-delivery-tab');\r\n },\r\n collectionTabClicked: () => {\r\n pushLocalizationClick('localisation-collection', 'collection-tab', 'show-collection-tab');\r\n },\r\n inputClickedOnDelivery: () => {\r\n pushLocalizationClick('localisation-delivery-input-location', 'location-input', 'input-location');\r\n },\r\n suggestionClickedOnDelivery: () => {\r\n pushLocalizationClick('localisation-delivery-select-location', 'location-1', 'select-location');\r\n },\r\n submitClickedOnDelivery: () => {\r\n pushLocalizationClick('localisation-delivery-submit-location', 'submit-button', 'submit-location');\r\n },\r\n geolocationClickedOnDelivery: () => {\r\n pushLocalizationClick('localisation-delivery-auto-locate', 'geolocation-button', 'auto-locate');\r\n },\r\n inputClickedOnCollection: () => {\r\n pushLocalizationClick('localisation-collection-input-location', 'location-input', 'input-location');\r\n },\r\n suggestionClickedOnCollection: () => {\r\n pushLocalizationClick('localisation-collection-select-location', 'location-1', 'select-location');\r\n },\r\n submitClickedOnCollection: () => {\r\n pushLocalizationClick('localisation-collection-submit-location', 'submit-button', 'submit-location');\r\n },\r\n geolocationClickedOnCollection: () => {\r\n pushLocalizationClick('localisation-collection-auto-locate', 'geolocation-button', 'auto-locate');\r\n },\r\n changeAddressClicked: () => {\r\n pushLocalizationClick('localisation-change', 'change-location', 'change-localisation');\r\n },\r\n localizationSuccess: (distributionType: OrderDistributionType, storeId: string) => {\r\n DataLayerWrapper(() => {\r\n gtm.pushToDataLayer({\r\n event: DataLayerEvents.user.localisationSuccess,\r\n cart: {\r\n shipping: {\r\n type: distributionType === OrderDistributionType.Delivery ? 'delivery' : 'collection',\r\n storeId,\r\n },\r\n },\r\n });\r\n });\r\n },\r\n localizationError: () => {\r\n DataLayerWrapper(() => {\r\n gtm.pushToDataLayer({\r\n event: DataLayerEvents.user.localisationError,\r\n error: {\r\n message: 'Lo sentimos aun no entregamos a esta direccion',\r\n },\r\n });\r\n });\r\n },\r\n orderTimeSelected: () => {\r\n DataLayerWrapper(() => {\r\n gtm.pushToDataLayer({\r\n event: DataLayerEvents.moduleClick('order-time-selected'),\r\n assets: {\r\n tools: [\r\n {\r\n id: 'order-time-submit',\r\n type: 'order',\r\n name: 'time-slot',\r\n attributes: {\r\n function: 'change-order-time-slot',\r\n },\r\n },\r\n ],\r\n },\r\n });\r\n });\r\n },\r\n };\r\n\r\n function pushLocalizationClick(id: string, name: string, func: string) {\r\n DataLayerWrapper(() => {\r\n window.gtm.pushToDataLayer({\r\n event: DataLayerEvents.moduleClick(name),\r\n assets: {\r\n tools: [\r\n {\r\n id,\r\n type: 'storefinder',\r\n name,\r\n attributes: {\r\n function: func,\r\n },\r\n },\r\n ],\r\n },\r\n });\r\n });\r\n }\r\n}\r\n","import { OptionDetails, Topping } from 'apps/ProductsApp/types/dto.types';\r\nimport { DataLayerWrapper } from '../dataLayerWrapper';\r\nimport { DataLayerEvents } from '../types';\r\n\r\nexport function initVariantDataLayer() {\r\n window.gtm.variantModule = {\r\n selectTopping: (topping: Topping, productId: string) => {\r\n DataLayerWrapper(() => {\r\n gtm.pushToDataLayer({\r\n event: DataLayerEvents.variant.select,\r\n variant: {\r\n id: topping.id,\r\n productId,\r\n category: topping.categoryId,\r\n type: 'topping-sauce',\r\n name: topping.title,\r\n value: {\r\n displayGross: topping.price,\r\n },\r\n },\r\n });\r\n });\r\n },\r\n unselectTopping: (topping: Topping, productId: string) => {\r\n DataLayerWrapper(() => {\r\n gtm.pushToDataLayer({\r\n event: DataLayerEvents.variant.unselect,\r\n variant: {\r\n id: topping.id,\r\n productId,\r\n category: topping.categoryId,\r\n type: 'topping-sauce',\r\n name: topping.title,\r\n value: {\r\n displayGross: topping.price,\r\n },\r\n },\r\n });\r\n });\r\n },\r\n selectOption: (option: OptionDetails, productId: string, isDelivery: boolean) => {\r\n DataLayerWrapper(() => {\r\n gtm.pushToDataLayer({\r\n event: DataLayerEvents.variant.select,\r\n variant: {\r\n id: option.id,\r\n productId,\r\n type: 'size-crust',\r\n name: option.title,\r\n value: {\r\n displayGross: isDelivery ? option.deliveryPrice : option.pickupPrice,\r\n },\r\n },\r\n });\r\n });\r\n },\r\n selectRecipe: (productId: string, recipeId: string) => {\r\n DataLayerWrapper(() => {\r\n gtm.pushToDataLayer({\r\n event: DataLayerEvents.variant.select,\r\n variant: {\r\n id: recipeId,\r\n productId,\r\n type: 'recipe-flavour',\r\n },\r\n });\r\n });\r\n },\r\n };\r\n}\r\n","import { OrderDetailsState, ThankYouDeliveryType, ThankYouProduct } from 'apps/ThankYouApp/types';\r\nimport { addSuccessfulOrder, increasePurchasedTimes, isOrderSuccessfulEventPushed, constructProductsFromBasketItem, constructProductsFromThankYouProduct } from '../traceIdHandler';\r\nimport { DataLayerEvents, DataToPush } from '../types';\r\nimport { DataLayerWrapper } from '../dataLayerWrapper';\r\nimport { BasketItem } from 'apps/ProductsApp/types/basket.types';\r\nimport { PaymentHelper } from 'shared/helpers';\r\n\r\nfunction initCheckoutDataLayer() {\r\n window.gtm.checkoutModule = {\r\n orderSubmit: (cartId: string) => {\r\n DataLayerWrapper(() => {\r\n window.gtm.pushToDataLayer({\r\n event: DataLayerEvents.cart.submit,\r\n cart: {\r\n id: cartId,\r\n },\r\n });\r\n });\r\n },\r\n orderError: (cartId: string) => {\r\n DataLayerWrapper(() => {\r\n window.gtm.pushToDataLayer({\r\n event: DataLayerEvents.cart.error,\r\n cart: {\r\n id: cartId,\r\n },\r\n });\r\n });\r\n },\r\n paymentMethodSelected: (id: string, name: string) => {\r\n DataLayerWrapper(() => {\r\n window.gtm.pushToDataLayer({\r\n event: DataLayerEvents.cart.paymentSelected,\r\n payment: {\r\n id,\r\n name,\r\n },\r\n });\r\n });\r\n },\r\n transactionSuccess: (orderId: string, thankYou: OrderDetailsState) => {\r\n DataLayerWrapper(() => {\r\n if (isOrderSuccessfulEventPushed(orderId)) return;\r\n addSuccessfulOrder(orderId);\r\n window.gtm.pushToDataLayer({\r\n event: DataLayerEvents.transaction.success,\r\n transaction: {\r\n id: orderId,\r\n cart: {\r\n currency: PaymentHelper.getCurrencyISOCode(),\r\n lines: thankYou.orderedProducts.map((op) => {\r\n return {\r\n ...op,\r\n };\r\n }),\r\n shipping: {\r\n value: {\r\n displayGross: thankYou.deliveryPrice,\r\n },\r\n discount: {},\r\n type: thankYou.deliveryType === ThankYouDeliveryType.DELIVERY ? 'delivery' : 'collection',\r\n deliveryTime: thankYou.deliveryTime,\r\n },\r\n value: {\r\n displayGross: thankYou.totalPriceIncVat,\r\n },\r\n },\r\n store: { ...thankYou.storeAddress, storeId: thankYou.storeId },\r\n value: {\r\n displayGross: thankYou.totalPriceIncVat,\r\n },\r\n payment: {\r\n type: thankYou.paymentMethod,\r\n },\r\n usedOffers: {\r\n ...thankYou.usedOffers,\r\n },\r\n },\r\n });\r\n });\r\n },\r\n increasePurchases: () => {\r\n DataLayerWrapper(() => {\r\n increasePurchasedTimes();\r\n });\r\n },\r\n checkoutScreenLoad: (orderedProducts: BasketItem[], paymentMethodCode: string | undefined) => {\r\n DataLayerWrapper(() => {\r\n const products = constructProductsFromBasketItem(orderedProducts, paymentMethodCode);\r\n const dataToPush: DataToPush = { name: 'products', data: products };\r\n gtm.screenLoad('checkout', 'checkout.details', dataToPush);\r\n });\r\n }\r\n };\r\n}\r\nexport default initCheckoutDataLayer;\r\n","import { ThankYouProduct } from 'apps/ThankYouApp/types';\r\nimport { constructProductsFromThankYouProduct } from '../traceIdHandler';\r\nimport { DataToPush } from '../types';\r\nimport { DataLayerWrapper } from '../dataLayerWrapper';\r\n\r\nfunction initThankYouDataLayer() {\r\n window.gtm.thankYouModule = {\r\n thankYouScreenLoad: (orderedProducts: ThankYouProduct[], paymentMethodCode: string) => {\r\n DataLayerWrapper(() => {\r\n const products = constructProductsFromThankYouProduct(orderedProducts, paymentMethodCode);\r\n const dataToPush: DataToPush = { name: 'products', data: products };\r\n gtm.screenLoad('checkout', 'checkout.confirmation', dataToPush);\r\n });\r\n },\r\n appFeedback: (isPositive: boolean) => {\r\n DataLayerWrapper(() => {\r\n const event = 'WebAppFeedback';\r\n const value = isPositive ? 'good' : 'bad';\r\n const dataToPush = { event, value };\r\n gtm.pushToDataLayer(dataToPush);\r\n });\r\n }\r\n };\r\n}\r\n\r\nexport default initThankYouDataLayer;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","__webpack_require__.j = 674;","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t674: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkpizza_hut\"] = self[\"webpackChunkpizza_hut\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [96], () => (__webpack_require__(4096)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","UserMessageType","OrderDistributionType","OrderStatusEnum","AppReviewTarget","ApplicationType","getVisibleElementsPositions","elementClass","products","document","getElementsByClassName","Array","from","map","el","idx","rect","getBoundingClientRect","top","left","bottom","window","innerHeight","documentElement","clientHeight","right","innerWidth","clientWidth","isElementInViewport","filter","value","undefined","DataLayerWrapper","fnk","gtmError","error","console","warn","prototype","orderByAsc","propertyName","this","sort","a","b","orderByDesc","removeDuplicates","removedDuplicates","Set","scrollTimer","DataLayerEvents","name","getBundleItems","choices","cs","length","title","selectedChoice","sku","productTitle","getOptionDescription","product","selectedOption","categoryId","type","ThankYouDeliveryType","AppReviewStatus","successfulOrdersKey","PaymentHelper","getElementById","StoreStockStatus","OfferTypes","isTwoForOneOffer","XTH_PIZ_FRE","XTH_PIZ_FRE_PLS","getBasketItems","items","item","category","id","productId","purchaseMethod","attributes","bundleItems","variant","optionId","optionSubTitle","optionTitle","displayGross","price","decodeCookieFor","objectName","parseJSON","decodedCookie","decodeURIComponent","cookie","cookies","split","i","indexOf","stringCookie","replace","substr","JSON","parse","getUserLocation","location","currentStore","storeId","localStorage","getItem","Date","getTime","uuid","c","r","Math","random","floor","toString","setItem","generateTraceId","gtm","pushToDataLayer","data","dataLayer","push","screenLoad","screenType","screenName","dataToPush","token","purchased","ga","screen","platform","S4DWebBridge","culture","lang","environment","user","cid","slice","lastIndexOf","status","traceId","customer","UserId","deliveryType","distributionType","Delivery","device","typeRollup","test","navigator","userAgent","event","moduleLoad","modules","assets","module","modalLoad","artificialScreenName","artificialPageViewName","promotionsModule","clicked","url","links","destination","load","_","index","placement","subType","promotions","pathname","crossSellClicked","crossSellOffer","code","unit","sizeUnitName","crossSellLoad","offerClicked","offer","list","homePageOffersScroll","offers","clearTimeout","setTimeout","visiblePromotions","impressions","position","pushLocalizationClick","func","tools","function","localizationModule","deliveryTabClicked","collectionTabClicked","inputClickedOnDelivery","suggestionClickedOnDelivery","submitClickedOnDelivery","geolocationClickedOnDelivery","inputClickedOnCollection","suggestionClickedOnCollection","submitClickedOnCollection","geolocationClickedOnCollection","changeAddressClicked","localizationSuccess","cart","shipping","localizationError","message","orderTimeSelected","initLocalizationDataLayer","productsModule","addProductToBasket","option","variantId","variantName","variantType","brand","options","addDealToBasket","deal","choiceSlots","removeProductFromBasket","quantity","amount","variants","removeDealFromBasket","appliedDealIdentifier","removeCouponFromBasket","coupon","description","customize","interactionElement","method","productsLoad","isDelivery","showPrice","pr","opt","delivery","deliveryPrice","pickup","pickupPrice","ecommerce","productsScroll","dealsLoad","deals","dealsScroll","view","productName","dealCompleted","goToProductDetails","variantModule","selectTopping","topping","unselectTopping","selectOption","selectRecipe","recipeId","cartModule","cartRecalculated","basket","localization","cartId","coupons","basketItems","isCompilationPart","cartLines","compiledOffers","cartCoupons","cp","couponType","EURO_DEAL_PLUS","identifier","displayTitle","discount","currency","lines","cl","cc","deliveryCharge","deliveryTime","selectedOrderTime","totalPrice","offerPromoAdded","discountLine","shortDescription","checkoutModule","orderSubmit","orderError","paymentMethodSelected","payment","transactionSuccess","orderId","thankYou","savedSuccessfulOrders","orders","isOrderSuccessfulEventPushed","successfulOrders","stringify","addSuccessfulOrder","transaction","orderedProducts","op","DELIVERY","totalPriceIncVat","store","storeAddress","paymentMethod","usedOffers","increasePurchases","purchasedTimes","parseInt","increasePurchasedTimes","checkoutScreenLoad","paymentMethodCode","forEach","dataLayerProduct","toUpperCase","optionCategory","constructProductsFromBasketItem","thankYouModule","thankYouScreenLoad","productCategoryCode","optionSubType","optionName","optionType","constructProductsFromThankYouProduct","appFeedback","isPositive","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","__webpack_modules__","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","j","Object","keys","every","key","splice","n","getter","__esModule","d","definition","o","defineProperty","enumerable","get","g","globalThis","Function","e","obj","prop","hasOwnProperty","call","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","self","bind","__webpack_exports__"],"sourceRoot":""}