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KAAa+F,WAAW4B,WAAWC,KAAK,CACvE5B,QAAUhG,KAAa+F,WAAWC,QAClC6B,iBAAkBA,KAEdL,QAAQM,IAAI,aAAa,EAE7BC,OAAQ,CAAE/B,QAAShG,KAAKgH,YAEtBkB,EAA6BlI,KAAa+F,WAAW4B,WAAWC,KAAK,CACvE5B,QAAUhG,KAAamG,WAAWH,QAClC6B,iBAAkBA,KAEdL,QAAQM,IAAI,aAAa,EAE7BC,OAAQ,CAAE/B,QAAShG,KAAKgH,YAE5BiB,IACAC,GACJ,CACJ,CAKAnF,MAAAA,GACU/C,KAAamI,aACfpB,MAAMhE,QAEd,E","sources":["webpack://@sazka/web/./js/app/casino/analytics-casino.ts","webpack://@sazka/web/./js/app/casino/casino-product-card-renderer.ts","webpack://@sazka/web/./js/app/casino/widgets/_promo-carousel.ts","webpack://@sazka/web/../../libs/utils/carousel/use-flickity-dots.ts","webpack://@sazka/web/../../libs/utils/carousel/flickity-patched.ts"],"sourcesContent":["export namespace CasinoAnalytics {\r\n export const pushGameImpressions = (placement: string) => {\r\n window.dataLayer.push({\r\n action: {\r\n impress: {\r\n products: null,\r\n },\r\n },\r\n });\r\n\r\n const gamesWrapper = document.querySelector(`[data-a-games-placement=\\\"${placement}\\\"]`);\r\n const games = Array.from(gamesWrapper.querySelectorAll<HTMLElement>(\".game-launcher\")).filter((g) =>\r\n g.parentElement.checkVisibility()\r\n );\r\n\r\n const products = [];\r\n\r\n games.forEach((game) => {\r\n const position = games.indexOf(game) + 1;\r\n\r\n if (!game.parentElement.ariaHidden) {\r\n const product = {\r\n id: game.dataset.gameCode,\r\n gameCode: game.dataset.gameCode,\r\n verticalCode: \"hry\",\r\n placement: placement,\r\n position: position,\r\n supplier: game.dataset.manufacturerName,\r\n };\r\n\r\n products.push(product);\r\n }\r\n });\r\n\r\n window.dataLayer.push({\r\n event: \"action.impress.products\",\r\n action: {\r\n impress: {\r\n products: products,\r\n },\r\n },\r\n });\r\n };\r\n\r\n export const pushRecommendationClick = (recommendation: string) => {\r\n window.dataLayer.push({\r\n event: \"action.recommendationClick.hry\",\r\n action: {\r\n recommendationClick: {\r\n label: recommendation,\r\n },\r\n },\r\n });\r\n };\r\n\r\n export const pushGameFilterOpen = () => {\r\n window.dataLayer.push({\r\n event: \"action.openFilters.hry\",\r\n });\r\n };\r\n\r\n export const pushGameFilterClose = () => {\r\n window.dataLayer.push({\r\n event: \"action.closeFilters.hry\",\r\n });\r\n };\r\n\r\n export const pushApplyFilter = (currentFilter: string, allFilters: string[]) => {\r\n window.dataLayer.push({\r\n event: \"action.applyFilter.hry\",\r\n action: {\r\n applyFilter: {\r\n label: currentFilter,\r\n },\r\n },\r\n page: {\r\n filters: allFilters,\r\n },\r\n });\r\n };\r\n\r\n export const pushRemoveFilter = (currentFilter: string, allFilters: string[]) => {\r\n window.dataLayer.push({\r\n event: \"action.removeFilter.hry\",\r\n action: {\r\n removeFilter: {\r\n label: currentFilter,\r\n },\r\n },\r\n page: {\r\n filters: allFilters,\r\n },\r\n });\r\n };\r\n\r\n export const pushJacpotsNavigationClick = (direction: \"left\" | \"right\") => {\r\n window.dataLayer.push({\r\n event: \"action.swipeSupplier.hry\",\r\n action: {\r\n swipeSupplier: {\r\n label: `jackpot-${direction}`,\r\n },\r\n },\r\n });\r\n };\r\n}\r\n","import { PromoCardModel } from \"@/casino/models/promo-card-model\";\r\nimport { WebpHelper } from \"@sazka/utils/webp-helper\";\r\n\r\nexport class CasinoProductCardRenderer {\r\n public static renderCasinoCard(model: PromoCardModel, addonClass: string) {\r\n return `\r\n <div class=\"product-card product-card--casino${addonClass ? \" \" + addonClass : \"\"}\" data-manufacturer=\"${\r\n model.webManufacturerFilterHide ? \"0\" : model.manufacturerGuid\r\n }\">\r\n <a href=\"${model.url.relative}\" \r\n id=\"${model.codeName}-banner\" \r\n class=\"product-card__inner game-launcher${addonClass ? \" \" + addonClass : \"\"}\"\r\n data-game-id=\"${model.externalSystemID}\" \r\n data-game-code=\"${model.codeName}\"\r\n data-manufacturer-name=${model.manufacturer}>\r\n \r\n ${WebpHelper.createPictureTag(model.teaserImageUrl, model.name, \"product-card__img\")}\r\n\r\n ${\r\n model.gradient\r\n ? `<em class=\"product-card__gradient\" ${\r\n model.gradientColor\r\n ? `style=\"background-image:linear-gradient(38deg,${model.gradientColor}CC 0%,${model.gradientColor}00 52%);\"`\r\n : \"\"\r\n }></em>`\r\n : \"\"\r\n }\r\n <button type=\"button\" aria-label=\"PĹ™idat do oblĂbenĂ˝ch her\" class=\"product-card__star\"></button> \r\n ${\r\n model.jackpot\r\n ? `<div class=\"jackpot\">${WebpHelper.createPictureTag(\r\n model.jackpot.jackpotLogo,\r\n \"Logo jackpotu \" + model.jackpot.jackpotName,\r\n \"jackpot__logo\"\r\n )}</div>`\r\n : \"\"\r\n }\r\n \r\n <h3 class=\"product-card__title\">${model.name}</h3>\r\n </a>\r\n </div>\r\n `;\r\n }\r\n}\r\n","import { useNgSession } from \"@sazka/ng/ng-session\";\r\nimport { FlickityPatched } from \"@sazka/utils/carousel/flickity-patched\";\r\nimport { watch } from \"vue\";\r\nimport { CasinoAnalytics } from \"@/casino/analytics-casino\";\r\nimport { httpClient } from \"@sazka/utils/http-clients/http-client\";\r\nimport { PromoCardModel } from \"../models/promo-card-model\";\r\nimport { CasinoProductCardRenderer } from \"../casino-product-card-renderer\";\r\nimport { ResponsiveUtils } from \"@sazka/utils/responsive-utils\";\r\nclass PromoCarousel {\r\n mostPlayedCarousel: FlickityPatched;\r\n newestCarousel: FlickityPatched;\r\n isTickets: boolean;\r\n\r\n constructor() {\r\n const { isLoggedIn } = useNgSession();\r\n\r\n const mostPlayedCarouselRoot = document.querySelector(\".casino-promo-carousel__most-played\");\r\n this.isTickets = $(\".casino-promo-carousel__most-played\").closest(\".casino-promo--tickets\").length > 0;\r\n\r\n if (mostPlayedCarouselRoot) {\r\n this.mostPlayedCarousel = this.setupCarousel(mostPlayedCarouselRoot);\r\n\r\n watch(isLoggedIn, () => {\r\n // Re-render for tickets that shows for logged players\r\n if (this.isTickets) {\r\n this.mostPlayedCarousel && this.mostPlayedCarousel.destroy();\r\n this.mostPlayedCarousel = this.setupCarousel(mostPlayedCarouselRoot);\r\n } else {\r\n httpClient.post<PromoCardModel[]>(\"/api/casino/most-played-games\").then((responce) => {\r\n const newCards = responce.data\r\n .map((item) => CasinoProductCardRenderer.renderCasinoCard(item, null))\r\n .join(\"\");\r\n\r\n this.mostPlayedCarousel.destroy();\r\n\r\n const cardsWrapper = mostPlayedCarouselRoot.querySelector(\".casino-promo-carousel__scrollable\");\r\n cardsWrapper.innerHTML = newCards;\r\n cardsWrapper.setAttribute(\r\n \"data-a-games-placement\",\r\n isLoggedIn.value ? \"myMostPlayed\" : \"mostPlayed\"\r\n );\r\n\r\n this.mostPlayedCarousel = this.setupCarousel(mostPlayedCarouselRoot);\r\n });\r\n }\r\n });\r\n }\r\n\r\n const mostPlayedHeader = mostPlayedCarouselRoot.querySelector(\"#most-played-title\");\r\n if (mostPlayedHeader) {\r\n const noUserText = mostPlayedHeader.getAttribute(\"data-no-user-text\");\r\n\r\n watch(isLoggedIn, () => {\r\n if (isLoggedIn.value) {\r\n mostPlayedHeader.innerHTML = \"Moje nejhranÄ›jšĂ\";\r\n } else {\r\n mostPlayedHeader.innerHTML = noUserText;\r\n }\r\n });\r\n }\r\n\r\n const newestCarouselRoot = document.querySelector(\".casino-promo-carousel__newest\");\r\n if (newestCarouselRoot) {\r\n this.newestCarousel = this.setupCarousel(newestCarouselRoot);\r\n\r\n watch(isLoggedIn, () => {\r\n if (this.isTickets) {\r\n this.newestCarousel && this.newestCarousel.destroy();\r\n this.newestCarousel = this.setupCarousel(newestCarouselRoot);\r\n }\r\n });\r\n }\r\n }\r\n\r\n private setupCarousel(root: Element): FlickityPatched {\r\n const { isLoggedIn } = useNgSession();\r\n\r\n let cardsNum = 0;\r\n root.querySelectorAll<HTMLElement>(\".product-card\").forEach((x) => {\r\n if (x.classList.contains(\"authenticated\") && !isLoggedIn.value) x.style.display = \"none\";\r\n else {\r\n x.style.display = \"block\";\r\n cardsNum++;\r\n }\r\n });\r\n\r\n if (cardsNum <= 2 || (cardsNum === 3 && ResponsiveUtils.breakpointUp(\"md\"))) return;\r\n\r\n const carousel = new FlickityPatched(root.querySelector(\".casino-promo-carousel__scrollable\"), {\r\n contain: true,\r\n autoPlay: false,\r\n imagesLoaded: true,\r\n groupCells: true,\r\n cellAlign: \"left\",\r\n dotsOptions: {\r\n rootEl: root.querySelector(\".casino-promo-carousel__navigation\"),\r\n // Doesn't make sense to use DS carousel indicator\r\n // Specifically for this widget\r\n useDsClasses: false,\r\n },\r\n });\r\n\r\n const cgpMostPlayedButtonNext = root.querySelector(\".flickity-button.next\");\r\n\r\n carousel.resize();\r\n\r\n if (!this.isTickets) {\r\n const placement = root.querySelector<HTMLElement>(\"[data-a-games-placement]\")?.dataset.aGamesPlacement;\r\n CasinoAnalytics.pushGameImpressions(placement);\r\n cgpMostPlayedButtonNext.addEventListener(\"click\", () => CasinoAnalytics.pushGameImpressions(placement));\r\n }\r\n\r\n return carousel;\r\n }\r\n\r\n public static init() {\r\n new PromoCarousel();\r\n }\r\n}\r\n\r\ndocument.ready(() => {\r\n PromoCarousel.init();\r\n});\r\n","/* eslint-disable @typescript-eslint/naming-convention */\r\nimport type { FlickityDotsOptions } from \"./flickity-dots-options\";\r\nimport { FlickityPatched } from \"./flickity-patched\";\r\n\r\nconst PATH_ATTRS_MAP = {\r\n \"clip-rule\": \"evenodd\",\r\n \"fill-rule\": \"evenodd\",\r\n};\r\n\r\nconst SVG_ATTRS_MAP = {\r\n viewBox: \"0 0 24 24\",\r\n width: \"24\",\r\n height: \"24\",\r\n};\r\n\r\nconst DS_ARROW_CLASS = \"ds-carousel-indicator__arrow\";\r\n\r\nconst BTN_CLASSES = [\"button\", \"button--sm\", \"button--text\"];\r\n\r\nconst defaultDotsOptions: FlickityDotsOptions = {\r\n rootEl: null,\r\n dots: null,\r\n theme: \"light\",\r\n next: null,\r\n prev: null,\r\n nextIcon:\r\n \"M6.257 2.331a1 1 0 0 1 1.412-.074l10 9a1 1 0 0 1 0 1.486l-10 9a1 1 0 1 1-1.338-1.486L15.505 12 6.331 3.743a1 1 0 0 1-.074-1.412Z\",\r\n prevIcon:\r\n \"M17.743 2.331a1 1 0 0 1-.074 1.412L8.495 12l9.174 8.257a1 1 0 1 1-1.338 1.486l-10-9a1 1 0 0 1 0-1.486l10-9a1 1 0 0 1 1.412.074Z\",\r\n useDsClasses: true,\r\n useCustomPrevNextButtons: false,\r\n};\r\n\r\n/**\r\n * When calling init method with config object\r\n * it will render dots at the rootEl you define\r\n */\r\nexport function useFlickityDots(carousel: FlickityPatched, options: FlickityDotsOptions) {\r\n const carouselInstance = carousel;\r\n if (Object.keys(options).length === 0) return;\r\n const config = Object.assign(defaultDotsOptions, options);\r\n\r\n if (config.useDsClasses && (carouselInstance as any).isInitActivated) {\r\n const indicatorClass = [\"ds-carousel-indicator\"];\r\n\r\n if (config.theme === \"dark\") indicatorClass.push(\"is-dark\");\r\n\r\n config.rootEl.classList.add(...indicatorClass);\r\n\r\n initPrevButton();\r\n initDots();\r\n initNextButton();\r\n }\r\n\r\n config.rootEl.append(\r\n config.prev || getElementFromInstance(\"prev\"),\r\n config.dots || getElementFromInstance(\"dots\"),\r\n config.next || getElementFromInstance(\"next\")\r\n );\r\n\r\n if (!getElementFromInstance(\"prev\") || !getElementFromInstance(\"next\")) {\r\n [...config.rootEl.childNodes].filter((child) => child.nodeType === 3).map((el) => el.remove());\r\n }\r\n\r\n /**\r\n * Destroy custom dots\r\n */\r\n function destroy() {\r\n if (config.rootEl.children.length > 0) config.rootEl.replaceChildren();\r\n }\r\n\r\n function initPrevButton() {\r\n if (!(carouselInstance as any).options.prevNextButtons && config.useCustomPrevNextButtons) {\r\n initButton(config.prev, \"prev\", config.prevIcon);\r\n }\r\n }\r\n\r\n function initNextButton() {\r\n if (!(carouselInstance as any).options.prevNextButtons && config.useCustomPrevNextButtons) {\r\n initButton(config.next, \"next\", config.nextIcon);\r\n }\r\n }\r\n\r\n function initButton(btn: HTMLElement, btnType: \"prev\" | \"next\", icon: string) {\r\n if (btn) {\r\n btn?.classList.add(`${DS_ARROW_CLASS}`, `${DS_ARROW_CLASS}--${btnType}`, ...BTN_CLASSES);\r\n setAttributes(btn?.querySelector(\".flickity-button-icon\"), SVG_ATTRS_MAP);\r\n btn?.querySelector<SVGPathElement>(\".arrow\").setAttribute(\"d\", icon);\r\n } else {\r\n const carouselBtn = getElementFromInstance(btnType);\r\n const arrow = carouselBtn.querySelector(\".arrow\");\r\n const svgElem = carouselBtn.querySelector(\".flickity-button-icon\");\r\n\r\n setAttributes(svgElem, SVG_ATTRS_MAP);\r\n setAttributes(arrow, PATH_ATTRS_MAP);\r\n arrow.setAttribute(\"d\", icon);\r\n arrow.removeAttribute(\"transform\");\r\n carouselBtn.classList.add(`${DS_ARROW_CLASS}`, `${DS_ARROW_CLASS}--${btnType}`, ...BTN_CLASSES);\r\n }\r\n }\r\n\r\n function initDots() {\r\n if (config.dots) {\r\n config.dots.classList.add(\"ds-carousel-indicator__dots\");\r\n } else {\r\n const dots = getElementFromInstance(\"dots\");\r\n dots.classList.add(\"ds-carousel-indicator__dots\");\r\n }\r\n }\r\n\r\n function getElementFromInstance(elType: \"prev\" | \"next\" | \"dots\") {\r\n switch (elType) {\r\n case \"prev\":\r\n return (\r\n (carouselInstance as any).options.prevNextButtons &&\r\n ((carouselInstance as any).prevButton.element as HTMLElement)\r\n );\r\n case \"dots\":\r\n return (\r\n (carouselInstance as any).options.pageDots &&\r\n ((carouselInstance as any).pageDots.holder as HTMLElement)\r\n );\r\n case \"next\":\r\n return (\r\n (carouselInstance as any).options.prevNextButtons &&\r\n ((carouselInstance as any).nextButton.element as HTMLElement)\r\n );\r\n }\r\n }\r\n\r\n function setAttributes(el: Element, attrs: Record<string, any>) {\r\n for (const key in attrs) {\r\n el.setAttribute(key, attrs[key]);\r\n }\r\n }\r\n\r\n return {\r\n destroy,\r\n };\r\n}\r\n","import Flickity from \"flickity\";\r\nimport { FlickityDotsOptions } from \"./flickity-dots-options\";\r\nimport { useFlickityDots } from \"./use-flickity-dots\";\r\n\r\nexport interface FlickityPatchedOptions extends Flickity.Options {\r\n dotsOptions?: FlickityDotsOptions;\r\n}\r\n\r\n/**\r\n * @deprecated Instead use KeenSlider in new components\r\n */\r\nexport class FlickityPatched extends Flickity {\r\n dots: ReturnType<typeof useFlickityDots>;\r\n dotsRoot: HTMLElement = null;\r\n\r\n constructor(selector: string | Element, options?: FlickityPatchedOptions) {\r\n super(selector, options);\r\n this.dotsRoot = options?.dotsOptions?.rootEl;\r\n\r\n this.on(\"dragStart\", () => {\r\n (this.cells as any[]).forEach((slide) => (slide.element.style.pointerEvents = \"none\"));\r\n });\r\n this.on(\"dragEnd\", () => (this.cells as any[]).forEach((slide) => (slide.element.style.pointerEvents = \"all\")));\r\n this.on(\"destroy\", () => {\r\n if (this.dots) this.dots.destroy();\r\n });\r\n\r\n if (options.dotsOptions) {\r\n this.dots = useFlickityDots(this, options.dotsOptions);\r\n }\r\n }\r\n\r\n // The following two methods fix the error that Flickity throws when there is different parent for dotsOptions and Carousel\r\n deactivatePageDots() {\r\n try {\r\n // Try to call flicity deactivatePageDots first\r\n Object.getPrototypeOf(Object.getPrototypeOf(this)).deactivatePageDots();\r\n } catch (e) {\r\n console.warn(\"Flickity deactivatePageDots failed calling its override.\");\r\n const superDeactivatePageDot = (this as any).pageDots.deactivate.bind({\r\n holder: this.dotsRoot.querySelector(\".flickity-page-dots\"),\r\n unbindStartEvent: () => {\r\n // Could not figure out what this was supposed to do. So there is just console.log to prevent TS error.\r\n console.log(\"unbidStart\");\r\n },\r\n parent: { element: this.dotsRoot },\r\n });\r\n superDeactivatePageDot();\r\n }\r\n }\r\n\r\n deactivatePrevNextButtons() {\r\n try {\r\n // Try to call flicity deactivatePrevNextButtons first\r\n Object.getPrototypeOf(Object.getPrototypeOf(this)).deactivatePrevNextButtons();\r\n } catch (e) {\r\n console.warn(\"Flickity deactivatePrevNextButtons failed calling its override.\");\r\n const superDeactivatePrevButton = (this as any).prevButton.deactivate.bind({\r\n element: (this as any).prevButton.element,\r\n unbindStartEvent: () => {\r\n // Could not figure out what this was supposed to do. So there is just console.log to prevent TS error.\r\n console.log(\"unbidStart\");\r\n },\r\n parent: { element: this.dotsRoot },\r\n });\r\n const superDeactivateNextButton = (this as any).prevButton.deactivate.bind({\r\n element: (this as any).nextButton.element,\r\n unbindStartEvent: () => {\r\n // Could not figure out what this was supposed to do. So there is just console.log to prevent TS error.\r\n console.log(\"unbidStart\");\r\n },\r\n parent: { element: this.dotsRoot },\r\n });\r\n superDeactivatePrevButton();\r\n superDeactivateNextButton();\r\n }\r\n }\r\n\r\n // FIX iOS 15 issues - when dragging, page moves\r\n // see https://github.com/metafizzy/flickity/issues/1177#issuecomment-981194285\r\n // can be removed when flickity fixes https://github.com/metafizzy/flickity/issues/1196\r\n resize() {\r\n if (!(this as any).isAnimating) {\r\n super.resize();\r\n }\r\n }\r\n}\r\n"],"names":["CasinoAnalytics","pushGameImpressions","placement","window","dataLayer","push","action","impress","products","gamesWrapper","document","querySelector","games","Array","from","querySelectorAll","filter","g","parentElement","checkVisibility","forEach","game","position","indexOf","ariaHidden","product","id","dataset","gameCode","verticalCode","supplier","manufacturerName","event","pushRecommendationClick","recommendation","recommendationClick","label","pushGameFilterOpen","pushGameFilterClose","pushApplyFilter","currentFilter","allFilters","applyFilter","page","filters","pushRemoveFilter","removeFilter","pushJacpotsNavigationClick","direction","swipeSupplier","CasinoProductCardRenderer","renderCasinoCard","model","addonClass","webManufacturerFilterHide","manufacturerGuid","url","relative","codeName","externalSystemID","manufacturer","WebpHelper","createPictureTag","teaserImageUrl","name","gradient","gradientColor","jackpot","jackpotLogo","jackpotName","PromoCarousel","constructor","_defineProperty","isLoggedIn","useNgSession","mostPlayedCarouselRoot","this","isTickets","$","closest","length","mostPlayedCarousel","setupCarousel","watch","destroy","httpClient","post","then","responce","newCards","data","map","item","join","cardsWrapper","innerHTML","setAttribute","value","mostPlayedHeader","noUserText","getAttribute","newestCarouselRoot","newestCarousel","root","cardsNum","x","classList","contains","style","display","ResponsiveUtils","breakpointUp","carousel","FlickityPatched","contain","autoPlay","imagesLoaded","groupCells","cellAlign","dotsOptions","rootEl","useDsClasses","cgpMostPlayedButtonNext","resize","_root$querySelector","aGamesPlacement","addEventListener","init","ready","PATH_ATTRS_MAP","SVG_ATTRS_MAP","viewBox","width","height","DS_ARROW_CLASS","BTN_CLASSES","defaultDotsOptions","dots","theme","next","prev","nextIcon","prevIcon","useCustomPrevNextButtons","useFlickityDots","options","carouselInstance","Object","keys","config","assign","isInitActivated","indicatorClass","add","initPrevButton","initDots","initNextButton","children","replaceChildren","prevNextButtons","initButton","btn","btnType","icon","setAttributes","carouselBtn","getElementFromInstance","arrow","svgElem","removeAttribute","elType","prevButton","element","pageDots","holder","nextButton","el","attrs","key","append","childNodes","child","nodeType","remove","Flickity","selector","_options$dotsOptions","super","dotsRoot","on","cells","slide","pointerEvents","deactivatePageDots","getPrototypeOf","e","console","warn","superDeactivatePageDot","deactivate","bind","unbindStartEvent","log","parent","deactivatePrevNextButtons","superDeactivatePrevButton","superDeactivateNextButton","isAnimating"],"sourceRoot":""}