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,CACJ,CACIC,GAAInB,EACJoB,KAAM,wBACNJ,SAAUA,EACVK,SAAU,kBAAkBK,SAMpD,CAGM,SAAUb,EAAuBb,EAAkBgB,EAAkBU,GACvEzC,UAAUC,KAAK,CACXQ,MAAO,qBACP6B,OAAQ,CACJC,KAAM,CACFN,OAAQ,CACJ,CACIC,GAAInB,EACJoB,KAAM,wBACNJ,SAAUA,EACVK,SAAU,kBAAkBK,SAMpD,CAGM,SAAUE,EAA6B5B,EAAkBgB,EAAkBK,GAC7EpC,UAAUC,KAAK,CACXQ,MAAO,wBACP6B,OAAQ,CACJI,QAAS,CACLT,OAAQ,CACJ,CACIC,GAAInB,EACJoB,KAAM,qBACNJ,SAAUA,EACVK,SAAU,sBAAsBA,SAMxD,CAGM,SAAUQ,EAAwB7B,EAAkBgB,EAAkBK,GACxEpC,UAAUC,KAAK,CACXQ,MAAO,qBACP6B,OAAQ,CACJC,KAAM,CACFN,OAAQ,CACJ,CACIC,GAAInB,EACJoB,KAAM,qBACNJ,SAAUA,EACVK,SAAU,sBAAsBA,SAMxD,C","sources":["webpack://@sazka/kasa-loyalty/./js/app/data-layer/services/page.ts","webpack://@sazka/kasa-loyalty/./js/app/data-layer/_homepage-analytics.ts","webpack://@sazka/kasa-loyalty/./js/app/data-layer/services/promotions.ts"],"sourcesContent":["// DL2.10 Main page of Sazka Klub\r\nexport function dataLayerHomepage() {\r\n    dataLayer.push({\r\n        page: {\r\n            type: \"sazkaklub.home\",\r\n            kind: \"sazkaklub.home\",\r\n            verticalCode: \"sazkaklub\",\r\n            verticalCodeStrict: \"sazkaklub\",\r\n            gameCode: \"no_game\",\r\n            gameCodeStrict: \"no_game\",\r\n        },\r\n        event: \"pageReady\",\r\n    });\r\n}\r\n","import { dataLayerHomepage } from \"@/data-layer/services/page\";\r\nimport { dataLayerHPBannerImpression, dataLayerHPBannerClick } from \"@/data-layer/services/promotions\";\r\n\r\nconst dataLayerHomepageBanners = () => {\r\n    const banners = document.querySelectorAll<HTMLElement>(\".hero-card\");\r\n\r\n    for (const banner of banners) {\r\n        const bannerId = banner.querySelector<HTMLElement>(\".hero-card__inner\").dataset.aCodename;\r\n        const bannerText = banner.querySelector<HTMLElement>(\".hero-card__title\").innerText;\r\n        const bannerOrder = (Array.from(banners).indexOf(banner) + 1).toString();\r\n\r\n        dataLayerHPBannerImpression(bannerId, bannerText, bannerOrder);\r\n\r\n        banner.addEventListener(\"click\", () => {\r\n            dataLayerHPBannerClick(bannerId, bannerText, bannerOrder);\r\n        });\r\n    }\r\n};\r\n\r\n$(() => {\r\n    dataLayerHomepage();\r\n    dataLayerHomepageBanners();\r\n});\r\n","type Position = \"top\" | \"middle\" | \"bottom\";\r\n\r\n// DL4.10 Top banner impression.\r\nexport function dataLayerTopBannerImpression(bannerId: string, creative: string) {\r\n    dataLayer.push({\r\n        impression: {\r\n            promos: [\r\n                {\r\n                    id: bannerId,\r\n                    name: \"sazkaklub.toppopup\",\r\n                    creative: creative,\r\n                    position: \"sazkaklub.top\",\r\n                },\r\n            ],\r\n        },\r\n    });\r\n}\r\n\r\n// DL4.11a Clicking on top banner\r\nexport function dataLayerTopBannerClick(bannerId: string, creative: string) {\r\n    dataLayer.push({\r\n        event: \"action.show.promos\",\r\n        action: {\r\n            show: {\r\n                promos: [\r\n                    {\r\n                        id: bannerId,\r\n                        name: \"sazkaklub.toppopup\",\r\n                        creative: creative,\r\n                        position: \"sazkaklub.top\",\r\n                    },\r\n                ],\r\n            },\r\n        },\r\n    });\r\n}\r\n\r\n// DL4.11b Clicking on top banner\r\nexport function dataLayerTopBannerClose(bannerId: string, creative: string) {\r\n    dataLayer.push({\r\n        event: \"action.show.promos\",\r\n        action: {\r\n            show: {\r\n                promos: [\r\n                    {\r\n                        id: `${bannerId}.close`,\r\n                        name: \"sazkaklub.toppopup\",\r\n                        creative: creative,\r\n                        position: \"sazkaklub.top\",\r\n                    },\r\n                ],\r\n            },\r\n        },\r\n    });\r\n}\r\n\r\n// DL4.20 Player data banner impression\r\nexport function dataLayerPlayerBannerImpression(bannerId: string, creative: string, position: Position) {\r\n    dataLayer.push({\r\n        event: \"action.impress.promos\",\r\n        action: {\r\n            impress: {\r\n                promos: [\r\n                    {\r\n                        id: bannerId,\r\n                        name: \"sazkaklub.playerData.popup\",\r\n                        creative: creative,\r\n                        position: `sazkaklub.home.${position}`,\r\n                    },\r\n                ],\r\n            },\r\n        },\r\n    });\r\n}\r\n\r\n// DL4.21 Player data banner click\r\nexport function dataLayerPlayerBannerClick(bannerId: string, creative: string, position: Position) {\r\n    dataLayer.push({\r\n        event: \"action.show.promos\",\r\n        action: {\r\n            show: {\r\n                promos: [\r\n                    {\r\n                        id: bannerId,\r\n                        name: \"sazkaklub.playerData.popup\",\r\n                        creative: creative,\r\n                        position: `sazkaklub.home.${position}`,\r\n                    },\r\n                ],\r\n            },\r\n        },\r\n    });\r\n}\r\n\r\n// DL4.30 Home page banner impression\r\nexport function dataLayerHPBannerImpression(bannerId: string, creative: string, orderNumber: string) {\r\n    dataLayer.push({\r\n        event: \"action.impress.promos\",\r\n        action: {\r\n            impress: {\r\n                promos: [\r\n                    {\r\n                        id: bannerId,\r\n                        name: \"sazkaklub.home.banner\",\r\n                        creative: creative,\r\n                        position: `sazkaklub.home.${orderNumber}`,\r\n                    },\r\n                ],\r\n            },\r\n        },\r\n    });\r\n}\r\n\r\n// DL4.31 Home page banner click\r\nexport function dataLayerHPBannerClick(bannerId: string, creative: string, orderNumber: string) {\r\n    dataLayer.push({\r\n        event: \"action.show.promos\",\r\n        action: {\r\n            show: {\r\n                promos: [\r\n                    {\r\n                        id: bannerId,\r\n                        name: \"sazkaklub.home.banner\",\r\n                        creative: creative,\r\n                        position: `sazkaklub.home.${orderNumber}`,\r\n                    },\r\n                ],\r\n            },\r\n        },\r\n    });\r\n}\r\n\r\n// DL4.40 SMS Spin banner impression\r\nexport function dataLayerSMSBannerImpression(bannerId: string, creative: string, position: Position) {\r\n    dataLayer.push({\r\n        event: \"action.impress.promos\",\r\n        action: {\r\n            impress: {\r\n                promos: [\r\n                    {\r\n                        id: bannerId,\r\n                        name: \"sazkaklub.sms.spin\",\r\n                        creative: creative,\r\n                        position: `sazkaklub.sms.spin.${position}`,\r\n                    },\r\n                ],\r\n            },\r\n        },\r\n    });\r\n}\r\n\r\n// DL4.41 SMS Spin banner click\r\nexport function dataLayerSMSBannerClick(bannerId: string, creative: string, position: Position) {\r\n    dataLayer.push({\r\n        event: \"action.show.promos\",\r\n        action: {\r\n            show: {\r\n                promos: [\r\n                    {\r\n                        id: bannerId,\r\n                        name: \"sazkaklub.sms.spin\",\r\n                        creative: creative,\r\n                        position: `sazkaklub.sms.spin.${position}`,\r\n                    },\r\n                ],\r\n            },\r\n        },\r\n    });\r\n}\r\n"],"names":["dataLayerHomepage","dataLayer","push","page","type","kind","verticalCode","verticalCodeStrict","gameCode","gameCodeStrict","event","dataLayerHomepageBanners","banners","document","querySelectorAll","banner","bannerId","querySelector","dataset","aCodename","bannerText","innerText","bannerOrder","Array","from","indexOf","toString","dataLayerHPBannerImpression","addEventListener","dataLayerHPBannerClick","$","dataLayerTopBannerImpression","creative","impression","promos","id","name","position","dataLayerTopBannerClick","action","show","dataLayerTopBannerClose","orderNumber","impress","dataLayerSMSBannerImpression","dataLayerSMSBannerClick"],"sourceRoot":""}