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EAAW,qDAAqDC,MAASD,QAAiB,+BAExFI,EACM,oCACIJ,EAAW,sBAAwB,uCACbE,aAC1B,uDAGZC,gEAKRQ,EAASpS,EAAEmS,GACjBnS,EAAE,QAAQqB,OAAO+Q,GACjBA,EAAOC,MAAM,QACbD,EAAOlS,KAAK,qBAAqByG,GAAG,SAAS,KACzC9B,GAAQ,GACRuN,EAAOC,MAAM,OAAO,IAExBD,EAAOzL,GAAG,mBAAmB,KACzByL,EAAOC,MAAM,WAAWlR,SACpBnB,EAAE,kBAAkBJ,QACpBI,EAAE,QAAQsF,SAAS,cAEvBT,GAAQ,EAAK,GACf,G,iBCjDJ,SAAUmE,EAAiDsJ,EAAgBC,EAAY,IACzF,OAAO,IAAInP,SAAStE,IAChB,GAAmC,oBAAxB0T,qBAAqC,CAC5C,MAAMlF,EAAU,CACZiF,UAAWA,GAGTE,EAAW,IAAID,sBAAqB,CAACE,EAASD,KAChDC,EACKrW,QAAQsW,GAAUA,EAAMC,gBAAkBD,EAAME,mBAAqBN,IACrE9V,SAASkW,IACN7T,EAAI6T,GACJF,EAASK,UAAUH,EAAMI,OAAO,GAClC,GACPzF,GAEHmF,EAASO,QAAQV,EACrB,MACIxT,EAAI,KACR,GAER,C","sources":["webpack://@sazka/web/./js/app/casino/analytics-casino.ts","webpack://@sazka/web/./js/app/casino/favorite-games/casino-favorite-games-renderer.ts","webpack://@sazka/web/./js/app/casino/favorite-games/casino-favorite-games.ts","webpack://@sazka/web/./js/app/casino/widgets/_favorite-recomended.ts","webpack://@sazka/web/../../libs/design-system/src/loader/loader.ts","webpack://@sazka/web/../../libs/utils/carousel/use-flickity-dots.ts","webpack://@sazka/web/../../libs/utils/carousel/flickity-patched.ts","webpack://@sazka/web/../../libs/utils/debounce.ts","webpack://@sazka/web/../../libs/utils/document-ready.ts","webpack://@sazka/web/../../libs/utils/sazka-alert.ts","webpack://@sazka/web/../../libs/utils/viewport-enter.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 { CasinoFavoriteGameDto } from \"@/casino/favorite-games/casino-favorite-game-dto\";\r\nimport { WebpHelper } from \"@sazka/utils/webp-helper\";\r\nimport { CasinoFavoriteGames } from \"@/casino/favorite-games/casino-favorite-games\";\r\n\r\nexport class CasinoFavoriteGamesRenderer {\r\n public static readonly addFavoriteStartEventName = \"add-favorite-game-start\";\r\n public static readonly addFavoriteEndEventName = \"add-favorite-game-end\";\r\n\r\n /**\r\n * Get data to favorite games from API, up to limit.\r\n * Render favorite games based on data\r\n */\r\n public static renderFavoriteGames(container: HTMLElement, limit: number = null) {\r\n CasinoFavoriteGames.getFavoriteGames(limit)\r\n .then((res) => {\r\n document.dispatchEvent(\r\n new Event(CasinoFavoriteGamesRenderer.addFavoriteStartEventName, { bubbles: true })\r\n );\r\n this.renderGames(container, res);\r\n document.dispatchEvent(\r\n new Event(CasinoFavoriteGamesRenderer.addFavoriteEndEventName, { bubbles: true })\r\n );\r\n })\r\n .catch((rej) => {\r\n console.error(rej);\r\n });\r\n }\r\n\r\n /**\r\n * Render last added favorite game to container (get data from API).\r\n * Do nothing if container already has <limit> items, or last added favorite game is already rendered in container.\r\n */\r\n public static addFavoriteGame(container: HTMLElement, limit?: number) {\r\n if (limit && container.children.length >= limit) return;\r\n\r\n // last favorite game is already rendered -> don't render it again\r\n const favoriteGames = CasinoFavoriteGames.loadFavoriteGamesFromSession();\r\n const renderedGamesIds = $.map($(container).find(\".product-card\"), (x) =>\r\n parseInt($(x as HTMLElement).data(\"game-id\"))\r\n );\r\n if (renderedGamesIds.includes(favoriteGames[favoriteGames.length - 1])) return;\r\n\r\n CasinoFavoriteGames.getFavoriteGames(limit)\r\n .then((res) => {\r\n document.dispatchEvent(\r\n new Event(CasinoFavoriteGamesRenderer.addFavoriteStartEventName, { bubbles: true })\r\n );\r\n this.renderGames(container, [res[res.length - 1]]);\r\n document.dispatchEvent(\r\n new Event(CasinoFavoriteGamesRenderer.addFavoriteEndEventName, { bubbles: true })\r\n );\r\n })\r\n .catch((rej) => {\r\n console.error(rej);\r\n });\r\n }\r\n\r\n /**\r\n * Get list of favorite games from storage.\r\n * Remove all rendered games that are not among favorites.\r\n * If rendered games count is < limit -> render favorite games up to limit.\r\n */\r\n public static removeFavoriteGame(container: HTMLElement, limit?: number) {\r\n const favoriteGames = CasinoFavoriteGames.loadFavoriteGamesFromSession();\r\n this.removeGames(container, favoriteGames);\r\n\r\n if (limit && container.children.length < limit) {\r\n this.fillGamesToLimit(container, limit);\r\n }\r\n }\r\n\r\n private static fillGamesToLimit(container: HTMLElement, limit: number) {\r\n CasinoFavoriteGames.getFavoriteGames(limit)\r\n .then((res) => {\r\n const renderedGamesIds = $.map($(container).find(\".game-launcher\"), (x) =>\r\n $(x as HTMLElement).data(\"game-id\")\r\n );\r\n const gamesToDisplay = res\r\n .filter((x) => !renderedGamesIds.includes(parseInt(x.externalSystemID)))\r\n .slice(0, limit - container.children.length);\r\n this.renderGames(container, gamesToDisplay);\r\n })\r\n .catch((rej) => {\r\n console.error(rej);\r\n });\r\n }\r\n\r\n private static removeGames(container: HTMLElement, gameIds: number[]) {\r\n for (let i = 0; i < container.children.length; i++) {\r\n const child = container.children[i];\r\n const $child = $(child);\r\n const childGameId = $child.data(\"game-id\") ?? $child.find(\"[data-game-id]\").data(\"game-id\");\r\n if (!gameIds.includes(childGameId)) {\r\n child.remove();\r\n }\r\n }\r\n }\r\n\r\n private static renderGames(container: HTMLElement, gamesData: CasinoFavoriteGameDto[]) {\r\n $(container).append(this.applyTransformation(gamesData));\r\n }\r\n\r\n private static applyTransformation(gamesData: CasinoFavoriteGameDto[]): string {\r\n return gamesData.map(this.standardTransformation).join(\"\");\r\n }\r\n\r\n private static standardTransformation(gameData: CasinoFavoriteGameDto) {\r\n return `\r\n <div class=\"product-card product-card--casino favorite\" data-manufacturer=\"${\r\n gameData.manufacturerGuid\r\n }\"> \r\n <a href=\"${gameData.url.relative}\" id=\"${\r\n gameData.codeName\r\n }-banner\" class=\"product-card__inner game-launcher favorite\" data-game-id=\"${gameData.externalSystemID}\"\r\n data-game-code=\"${gameData.codeName}\"\r\n data-manufacturer-name=\"${gameData.manufacturer}\">\r\n ${WebpHelper.createPictureTag(gameData.teaserImageUrl, gameData.name, \"product-card__img\")}\r\n ${\r\n gameData.gradient\r\n ? `<em class=\"product-card__gradient\" ${\r\n gameData.gradientColor\r\n ? `style=\"background-image:linear-gradient(38deg,${gameData.gradientColor}CC 0%,${gameData.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 gameData.jackpot\r\n ? `<div class=\"jackpot\">${WebpHelper.createPictureTag(\r\n gameData.jackpot.jackpotLogo,\r\n \"Logo jackpotu \" + gameData.jackpot.jackpotName,\r\n \"jackpot__logo\"\r\n )}</div>`\r\n : \"\"\r\n }\r\n <h3 class=\"product-card__title\">${gameData.nameCard || gameData.name}</h3>\r\n </a>\r\n </div>\r\n `;\r\n }\r\n}\r\n","import { CasinoFavoriteGameDto } from \"@/casino/favorite-games/casino-favorite-game-dto\";\r\nimport { useNgSession } from \"@sazka/ng/ng-session\";\r\nimport { Loader } from \"@sazka/design-system/src/loader/loader\";\r\nimport { httpClient } from \"@sazka/utils/http-clients/http-client\";\r\nimport { useSessionStorage } from \"@sazka/utils/use-storage\";\r\nimport { watch } from \"vue\";\r\nimport { sazkaAlert } from \"@sazka/utils/sazka-alert\";\r\n\r\nexport class CasinoFavoriteGames {\r\n public static interactionsDisabled = false;\r\n private static favoriteGames: Array<number> = [];\r\n private static readonly cookieKey = \"favorite-games\";\r\n public static readonly addFavoriteEventName = \"add-favorite-game\";\r\n public static readonly removeFavoriteEventName = \"remove-favorite-game\";\r\n public static readonly removeFavoriteStartEventName = \"remove-favorite-game-start\";\r\n\r\n private static readonly ErrorTitleOnSave = \"PÅ™i ukládánà nastal problém\";\r\n private static readonly ErrorTextOnSave =\r\n \"PÅ™i ukládánà vaÅ¡ich oblÃbených her nastal problém. Zkuste to prosÃm pozdÄ›ji.\";\r\n\r\n private static store: ReturnType<typeof useSessionStorage>;\r\n public static get Store(): ReturnType<typeof useSessionStorage> {\r\n if (!this.store) {\r\n this.store = useSessionStorage();\r\n }\r\n return this.store;\r\n }\r\n\r\n private static setFavoriteGames(games: Array<number>) {\r\n this.favoriteGames = games || [];\r\n if (!games || games.length == 0) {\r\n this.Store.removeItem(this.cookieKey);\r\n } else {\r\n this.Store.setJson(this.cookieKey, this.favoriteGames, \"essential\");\r\n }\r\n }\r\n\r\n public static addFavoriteGame(id: number, saveOnBackend = true) {\r\n this.setFavoriteGames([...this.favoriteGames, id]);\r\n this.highlight();\r\n\r\n const promise = new Promise(async (res, rej) => {\r\n if (saveOnBackend) {\r\n try {\r\n const data = await httpClient.post(`/api/casino/favorite-games/${id}`);\r\n res(data);\r\n } catch {\r\n sazkaAlert(this.ErrorTitleOnSave, this.ErrorTextOnSave);\r\n this.removeFavoriteGame(id, false);\r\n rej();\r\n }\r\n } else {\r\n res(true);\r\n }\r\n });\r\n\r\n return promise;\r\n }\r\n\r\n public static removeFavoriteGame(id: number, saveOnBackend = true) {\r\n const favorites = JSON.parse(JSON.stringify(this.favoriteGames));\r\n favorites.splice(favorites.indexOf(id), 1);\r\n this.setFavoriteGames(favorites);\r\n this.highlight();\r\n\r\n const promise = new Promise(async (res, rej) => {\r\n if (saveOnBackend) {\r\n try {\r\n const data = await httpClient.delete(`/api/casino/favorite-games/${id}`);\r\n res(data);\r\n } catch {\r\n this.addFavoriteGame(id, false);\r\n rej();\r\n }\r\n } else {\r\n res(true);\r\n }\r\n });\r\n\r\n return promise;\r\n }\r\n\r\n public static isFavoriteGame(id: number) {\r\n return this.favoriteGames.includes(id);\r\n }\r\n\r\n public static putFavoriteGames(favoriteGames: number[]) {\r\n return new Promise(async (res, rej) => {\r\n Loader.show();\r\n try {\r\n const data = await httpClient.put(\"/api/casino/favorite-games\", favoriteGames);\r\n res(data);\r\n } catch {\r\n rej();\r\n sazkaAlert(this.ErrorTitleOnSave, this.ErrorTextOnSave);\r\n }\r\n Loader.hide();\r\n });\r\n }\r\n\r\n private static loadFavoriteGames(): Promise<Array<number>> {\r\n return new Promise<Array<number>>((res, rej) => {\r\n $.getJSON(\"/api/casino/favorite-games/ids\")\r\n .done((data) => res(data?.games ?? []))\r\n .catch(() => rej());\r\n });\r\n }\r\n\r\n public static getFavoriteGames(limit?: number): Promise<Array<CasinoFavoriteGameDto>> {\r\n let data = null;\r\n if (limit) {\r\n data = {\r\n limit: limit,\r\n };\r\n }\r\n return new Promise<Array<CasinoFavoriteGameDto>>((res, rej) => {\r\n $.getJSON(\"/api/casino/favorite-games\", data)\r\n .done((data) => res(data?.games ?? []))\r\n .catch(() => rej());\r\n });\r\n }\r\n\r\n public static onLogin() {\r\n return this.loadFavoriteGames()\r\n .then((data) => {\r\n this.setFavoriteGames(data);\r\n this.highlight();\r\n return Promise.resolve(data);\r\n })\r\n .catch(() => {\r\n this.setFavoriteGames([]);\r\n this.highlight();\r\n });\r\n }\r\n\r\n public static onLogout() {\r\n this.setFavoriteGames(null);\r\n this.unHighlight();\r\n }\r\n\r\n public static loadFavoriteGamesFromSession() {\r\n const favorites = this.Store.getJson<number[]>(this.cookieKey);\r\n\r\n if (favorites) {\r\n this.setFavoriteGames(favorites);\r\n this.highlight();\r\n } else {\r\n // we have arrived to section, which requires favorite casino games\r\n this.onLogin();\r\n }\r\n\r\n return [...this.favoriteGames]; // return new array to prevent modifications\r\n }\r\n\r\n public static hasFavoriteGames() {\r\n return (this.loadFavoriteGamesFromSession()?.length ?? 0) > 0;\r\n }\r\n\r\n private static highlight() {\r\n this.unHighlight();\r\n for (const element of this.favoriteGames) {\r\n const fav = element;\r\n $(`.product-card__inner[data-game-id=\"${fav}\"]`).addClass(\"favorite\");\r\n }\r\n }\r\n\r\n private static unHighlight() {\r\n $(\".product-card__inner.favorite\").removeClass(\"favorite\");\r\n }\r\n\r\n public static animation(card: JQuery, iconClass: string, text: string) {\r\n card.append(`\r\n <div class=\"favorite-confirm\">\r\n <span class='${iconClass}'></span>\r\n ${text}\r\n </div>`);\r\n\r\n setTimeout(() => {\r\n card.find(\".favorite-confirm\").addClass(\"favorite-confirm__fade\");\r\n }, 0);\r\n\r\n const promise = new Promise<void>((res) => {\r\n setTimeout(() => {\r\n card.find(\".favorite-confirm\").removeClass(\"favorite-confirm__fade\");\r\n res();\r\n }, 3000);\r\n });\r\n\r\n setTimeout(() => {\r\n card.find(\".favorite-confirm\").remove();\r\n }, 3300);\r\n\r\n return promise;\r\n }\r\n\r\n public static triggerFavoriteAdded(gameCode: string) {\r\n dataLayer.push({\r\n event: \"action.addFavorite.hry\",\r\n action: {\r\n addFavorite: {\r\n gameCode: gameCode,\r\n },\r\n },\r\n });\r\n\r\n document.dispatchEvent(new Event(CasinoFavoriteGames.addFavoriteEventName, { bubbles: true }));\r\n }\r\n\r\n public static triggerFavoriteRemovedStart(gameCode: string) {\r\n dataLayer.push({\r\n event: \"action.removeFavorite.hry\",\r\n action: {\r\n removeFavorite: {\r\n gameCode: gameCode,\r\n },\r\n },\r\n });\r\n document.dispatchEvent(new Event(CasinoFavoriteGames.removeFavoriteStartEventName, { bubbles: true }));\r\n }\r\n\r\n public static triggerFavoriteRemoved() {\r\n document.dispatchEvent(new Event(CasinoFavoriteGames.removeFavoriteEventName, { bubbles: true }));\r\n }\r\n}\r\n\r\nexport const useCasinoFavoriteGames = () => {\r\n const { isLoggedIn } = useNgSession();\r\n if (isLoggedIn.value) {\r\n CasinoFavoriteGames.loadFavoriteGamesFromSession();\r\n }\r\n\r\n watch(isLoggedIn, (newValue) => {\r\n if (newValue) {\r\n CasinoFavoriteGames.onLogin();\r\n } else {\r\n CasinoFavoriteGames.onLogout();\r\n }\r\n });\r\n\r\n $(document).on(\"click\", \".product-card--casino .product-card__star\", (e) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n\r\n if (!useNgSession().isLoggedIn.value) {\r\n return;\r\n }\r\n if (CasinoFavoriteGames.interactionsDisabled) {\r\n sazkaAlert(\r\n \"ProbÃhá Å™azenÃ\",\r\n \"PÅ™idávánà a odebÃránà z oblÃbených se zpÅ™Ãstupnà po dokonÄenà řazenà vaÅ¡ich oblÃbených her.\"\r\n );\r\n return;\r\n }\r\n\r\n const elem = $(e.currentTarget);\r\n const card = elem.closest(\".product-card__inner\");\r\n const gameId = card.data(\"game-id\");\r\n const gameCodeName = card.data(\"game-code\");\r\n\r\n if (CasinoFavoriteGames.isFavoriteGame(gameId)) {\r\n CasinoFavoriteGames.removeFavoriteGame(gameId).then(() => {\r\n CasinoFavoriteGames.triggerFavoriteRemovedStart(gameCodeName ?? gameId);\r\n CasinoFavoriteGames.animation(card, \"product-card__delete\", \"Odebráno<br/>z oblÃbených her\").then(\r\n () => {\r\n CasinoFavoriteGames.triggerFavoriteRemoved();\r\n }\r\n );\r\n });\r\n } else {\r\n CasinoFavoriteGames.addFavoriteGame(gameId).then(() => {\r\n CasinoFavoriteGames.triggerFavoriteAdded(gameCodeName ?? gameId); // cannot wait for animation to finish here - floor would render last game multiple times (in case more games are marked at once)\r\n CasinoFavoriteGames.animation(card, \"product-card__star\", \"PÅ™idáno mezi<br/>oblÃbené hry\");\r\n });\r\n }\r\n });\r\n};\r\n","import { useNgSession } from \"@sazka/ng/ng-session\";\r\nimport { watch } from \"vue\";\r\nimport { CasinoFavoriteGames } from \"@/casino/favorite-games/casino-favorite-games\";\r\nimport { CasinoFavoriteGamesRenderer } from \"@/casino/favorite-games/casino-favorite-games-renderer\";\r\nimport { FlickityPatched } from \"@sazka/utils/carousel/flickity-patched\";\r\nimport { ResponsiveUtils } from \"@sazka/utils/responsive-utils\";\r\nimport { onViewportEnter } from \"@sazka/utils/viewport-enter\";\r\nimport { debounce } from \"@sazka/utils/debounce\";\r\nimport { CasinoAnalytics } from \"../analytics-casino\";\r\n\r\nclass FavoritesRecomended {\r\n private readonly favoritesShowedClassName = \"favorites-hidden\";\r\n\r\n private readonly root: HTMLElement;\r\n\r\n private readonly favoriteContainer: HTMLElement;\r\n private readonly favoriteCardsContainer: HTMLElement;\r\n private favoriteCarousel: FlickityPatched;\r\n\r\n private readonly recomendedContainer: HTMLElement;\r\n private readonly recomendedNavContainer: HTMLElement;\r\n private recomendedCarousel: FlickityPatched;\r\n\r\n private hasSeenFavorites: boolean;\r\n\r\n constructor(root: Element) {\r\n this.root = root as HTMLElement;\r\n\r\n this.favoriteContainer = this.root.querySelector(\".favorites-recomended__favorites\");\r\n this.favoriteCardsContainer = this.favoriteContainer.querySelector(\".favorites-recomended__scrollable\");\r\n\r\n this.recomendedContainer = this.root.querySelector(\".favorites-recomended__recomended\");\r\n this.recomendedNavContainer = this.recomendedContainer.querySelector(\".favorites-recomended__navigation\");\r\n\r\n this.init();\r\n }\r\n\r\n private async init() {\r\n if (this.recomendedContainer) {\r\n this.initCarouselForRecomended();\r\n }\r\n\r\n document.addEventListener(CasinoFavoriteGames.addFavoriteEventName, () => {\r\n this.addFavoriteGameHandler();\r\n });\r\n\r\n document.addEventListener(CasinoFavoriteGamesRenderer.addFavoriteStartEventName, () => {\r\n if (this.favoriteCarousel) {\r\n this.favoriteCarousel.destroy();\r\n }\r\n });\r\n\r\n document.addEventListener(CasinoFavoriteGamesRenderer.addFavoriteEndEventName, () => {\r\n this.favoriteCarousel = this.setupCarousel(this.favoriteContainer);\r\n if (!this.hasSeenFavorites) {\r\n this.hasSeenFavorites = true;\r\n CasinoAnalytics.pushGameImpressions(\"favourite\");\r\n }\r\n });\r\n\r\n document.addEventListener(CasinoFavoriteGames.removeFavoriteStartEventName, () => {\r\n this.removeFavoriteGameStartHandler();\r\n });\r\n\r\n document.addEventListener(CasinoFavoriteGames.removeFavoriteEventName, () => {\r\n this.favoriteCarousel.destroy();\r\n this.removeFavoriteGameHandler();\r\n this.favoriteCarousel = this.setupCarousel(this.favoriteContainer);\r\n });\r\n\r\n const userIsLoggedIn = useNgSession().isLoggedIn;\r\n\r\n watch(userIsLoggedIn, (newVal) => {\r\n this.onUserStateChange(newVal);\r\n });\r\n\r\n if (userIsLoggedIn.value) {\r\n CasinoFavoriteGamesRenderer.renderFavoriteGames(this.favoriteCardsContainer);\r\n //this.showSection();\r\n const cardCount = CasinoFavoriteGames.loadFavoriteGamesFromSession()?.length;\r\n this.handleVisibility(cardCount > 0);\r\n }\r\n\r\n const resizeDebounced = debounce(() => this.handleNavVisibility(), 300);\r\n window.addEventListener(\"resize\", resizeDebounced, { passive: true });\r\n }\r\n\r\n private async initCarouselForRecomended() {\r\n await onViewportEnter(this.root, 0);\r\n\r\n this.recomendedCarousel = this.setupCarousel(this.recomendedContainer);\r\n const recommendationLinks = this.recomendedContainer.querySelectorAll(\"a\");\r\n recommendationLinks.forEach((l) => {\r\n l.addEventListener(\"click\", () => {\r\n const recommendation = l.querySelector(\".link-card__header\").textContent;\r\n CasinoAnalytics.pushRecommendationClick(recommendation);\r\n });\r\n });\r\n }\r\n\r\n private onUserStateChange(isLoggedIn: boolean) {\r\n if (!isLoggedIn) {\r\n const favoritesCount = CasinoFavoriteGames.loadFavoriteGamesFromSession()?.length;\r\n if (favoritesCount > 0) {\r\n this.handleVisibility(false);\r\n }\r\n this.hasSeenFavorites = false;\r\n } else {\r\n CasinoFavoriteGames.onLogin().then(() => {\r\n // update count after promise resolves - no favorites otherwise (even if user has some)\r\n const favoritesCount = CasinoFavoriteGames.loadFavoriteGamesFromSession()?.length;\r\n // we don't want handleVisibility with false if user has no favorites\r\n if (favoritesCount > 0) {\r\n if (this.favoriteCardsContainer.children.length === 0) {\r\n CasinoFavoriteGamesRenderer.renderFavoriteGames(this.favoriteCardsContainer);\r\n }\r\n this.handleVisibility(true);\r\n this.hasSeenFavorites = true;\r\n CasinoAnalytics.pushGameImpressions(\"favourite\");\r\n }\r\n });\r\n }\r\n }\r\n\r\n private addFavoriteGameHandler() {\r\n if (CasinoFavoriteGames.loadFavoriteGamesFromSession().length === 1) {\r\n this.handleVisibility(true);\r\n }\r\n\r\n CasinoFavoriteGamesRenderer.addFavoriteGame(this.favoriteCardsContainer);\r\n }\r\n\r\n private removeFavoriteGameHandler() {\r\n CasinoFavoriteGamesRenderer.removeFavoriteGame(this.favoriteCardsContainer);\r\n }\r\n\r\n private removeFavoriteGameStartHandler() {\r\n if (CasinoFavoriteGames.loadFavoriteGamesFromSession().length === 0) {\r\n this.handleVisibility(false);\r\n }\r\n }\r\n\r\n private handleVisibility(hasFavoriteGames: boolean) {\r\n if (hasFavoriteGames && this.root.classList.contains(this.favoritesShowedClassName)) {\r\n this.showSection();\r\n this.favoriteCarousel = this.setupCarousel(this.favoriteContainer);\r\n } else if (!hasFavoriteGames && !this.root.classList.contains(this.favoritesShowedClassName)) {\r\n this.hideSection();\r\n this.favoriteCarousel.destroy();\r\n }\r\n }\r\n\r\n private handleNavVisibility() {\r\n if (\r\n ResponsiveUtils.breakpointUp(\"sm2\") &&\r\n this.recomendedCarousel?.slides.length == 1 &&\r\n !this.recomendedNavContainer.classList.contains(\"d-none\")\r\n ) {\r\n this.recomendedNavContainer.classList.add(\"d-none\");\r\n } else if (\r\n this.recomendedCarousel?.slides.length > 1 &&\r\n this.recomendedNavContainer.classList.contains(\"d-none\")\r\n ) {\r\n this.recomendedNavContainer.classList.remove(\"d-none\");\r\n }\r\n }\r\n\r\n private showSection() {\r\n this.root.classList.remove(this.favoritesShowedClassName);\r\n this.recomendedCarousel.reposition();\r\n this.recomendedCarousel.resize();\r\n this.handleNavVisibility();\r\n }\r\n\r\n private hideSection() {\r\n this.root.classList.add(this.favoritesShowedClassName);\r\n this.recomendedCarousel.reposition();\r\n this.recomendedCarousel.resize();\r\n this.handleNavVisibility();\r\n }\r\n\r\n private setupCarousel(root: Element): FlickityPatched {\r\n const carousel = new FlickityPatched(root.querySelector(\".favorites-recomended__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(\".favorites-recomended__navigation\"),\r\n // Doesnt 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 nav = root.querySelector(\".favorites-recomended__navigation\");\r\n\r\n carousel.resize();\r\n\r\n if (ResponsiveUtils.breakpointUp(\"sm2\") && carousel.slides.length == 1) {\r\n nav.classList.add(\"d-none\");\r\n } else if (\r\n ResponsiveUtils.breakpointUp(\"sm2\") &&\r\n carousel.slides.length > 1 &&\r\n nav.classList.contains(\"d-none\")\r\n ) {\r\n nav.classList.remove(\"d-none\");\r\n }\r\n\r\n if (root === this.favoriteContainer) {\r\n const nextButton = this.favoriteContainer.querySelector(\".flickity-button.next\");\r\n nextButton.addEventListener(\"click\", () => CasinoAnalytics.pushGameImpressions(\"favourite\"));\r\n }\r\n\r\n return carousel;\r\n }\r\n}\r\n\r\ndocument.ready(() => {\r\n const root = document.querySelector(\"#favorites-recomended\");\r\n if (!root) return;\r\n return new FavoritesRecomended(root);\r\n});\r\n","import { documentReady } from \"@sazka/utils/document-ready\";\r\n\r\ndeclare const environment: any;\r\ntype ColorVariant = \"yellow\" | \"blue\";\r\n\r\n/**\r\n * Loader tells user, he has to wait for some ajax operation\r\n */\r\nexport class Loader {\r\n private static showTimeout: number;\r\n private static hideTimeout: number;\r\n private static lockNumber = 0;\r\n public static get isShown() {\r\n return this.lockNumber > 0;\r\n }\r\n\r\n static {\r\n // loader from backend\r\n if (document.body) {\r\n this.showLoaderFromBackend();\r\n } else {\r\n documentReady(() => {\r\n this.showLoaderFromBackend();\r\n });\r\n }\r\n }\r\n\r\n static showLoaderFromBackend() {\r\n if (document.body.classList.contains(\"loader\")) {\r\n this.lockNumber++;\r\n }\r\n }\r\n\r\n /**\r\n * Shows loader after some time in miliseconds\r\n * This is to reduce flickering when ajax actions are super-fast\r\n *\r\n * @param showLoaderIn Time in miliseconds, after which, loaded will be shown\r\n * @param text Title (waiting message) displayed in loader\r\n */\r\n static show(showLoaderIn = 30, text?: string, aboveAll = false, color: ColorVariant = \"yellow\") {\r\n this.clearTimeout();\r\n this.lockNumber++;\r\n\r\n this.showTimeout = window.setTimeout(() => {\r\n this.showNow(text, aboveAll, true, color);\r\n }, showLoaderIn);\r\n }\r\n\r\n /**\r\n * Shows loader right away\r\n * @param text Title (waiting message) displayed in loader\r\n */\r\n static showNow(text?: string, aboveAll = false, counted = false, color: ColorVariant = \"yellow\") {\r\n if (!counted) {\r\n this.lockNumber++;\r\n }\r\n\r\n if (!environment.isEditMode) {\r\n const loader = document.getElementById(\"loader\");\r\n\r\n if (!loader) return;\r\n\r\n if (aboveAll) {\r\n loader.classList.add(\"loader--above-all\");\r\n } else {\r\n loader.classList.remove(\"loader--above-all\");\r\n }\r\n if (text) {\r\n loader.querySelector(\".loader__text\").textContent = text;\r\n loader.classList.add(\"loader--with-text\");\r\n } else {\r\n loader.querySelector(\".loader__text\").textContent = \"\";\r\n loader.classList.remove(\"loader--with-text\");\r\n }\r\n\r\n if (color === \"blue\") {\r\n loader.classList.add(\"loader--blue\");\r\n }\r\n\r\n document.body.classList.add(\"loader\", \"loader--fade-in\");\r\n this.clearTimeout();\r\n }\r\n }\r\n\r\n /**\r\n * Shows loader after delay with z-index of 9999\r\n * @param text Title (waiting message) displayed in loader\r\n */\r\n static showAboveAll(showLoaderIn = 30, text?: string) {\r\n this.show(showLoaderIn, text, true);\r\n }\r\n\r\n /**\r\n * Shows loader right away with z-index of 9999\r\n * @param text Title (waiting message) displayed in loader\r\n */\r\n static showNowAboveAll(text?: string) {\r\n this.showNow(text, true);\r\n }\r\n\r\n /**\r\n * Hides loader\r\n */\r\n static hide() {\r\n this.lockNumber--;\r\n if (this.lockNumber > 0) return;\r\n\r\n this.clearTimeout();\r\n document.body.classList.remove(\"loader--fade-in\");\r\n this.hideTimeout = window.setTimeout(() => {\r\n document.body.classList.remove(\"loader\");\r\n const loader = document.getElementById(\"loader\");\r\n loader.querySelector(\".loader__text\").textContent = \"\";\r\n loader.classList.remove(\"loader--with-text\");\r\n }, 150);\r\n }\r\n\r\n private static clearTimeout() {\r\n if (this.showTimeout) {\r\n clearTimeout(this.showTimeout);\r\n this.showTimeout = null;\r\n }\r\n if (this.hideTimeout) {\r\n clearTimeout(this.hideTimeout);\r\n this.hideTimeout = null;\r\n }\r\n }\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","/**\r\n * Debounce function - use like this:\r\n * var handler = debounce(function(){ do the work}, 100);\r\n * $(window).scroll(handler);\r\n * @param func callback function\r\n * @param wait time in milliseconds to wait\r\n * @param immediate\r\n */\r\n\r\ntype CallbackFunction = (...args: any[]) => any;\r\n\r\nexport function debounce<T extends CallbackFunction>(func: T, wait: number, immediate = false) {\r\n let timeout: number | null;\r\n\r\n return function (this: ThisParameterType<T>, ...args: Parameters<T>) {\r\n /* eslint-disable @typescript-eslint/no-this-alias */\r\n const context = this;\r\n const later = function () {\r\n timeout = null;\r\n if (!immediate) func.apply(context, args);\r\n };\r\n const callNow = immediate && !timeout;\r\n clearTimeout(timeout as number);\r\n timeout = window.setTimeout(later, wait);\r\n if (callNow) func.apply(context, args);\r\n };\r\n}\r\n","/**\r\n * Vanila JS variant to jQuery $(() => {}).\r\n * @param {callback} callback\r\n * @example - documentReady(() => {}).\r\n * This function is binding to document.ready\r\n * */\r\nexport function documentReady(callback: () => void) {\r\n if (document.readyState !== \"loading\") {\r\n return callback();\r\n } else {\r\n document.addEventListener(\"DOMContentLoaded\", callback);\r\n }\r\n}\r\n","/**\r\n * @deprecated Use showAlert a DS component\r\n */\r\nexport const sazkaAlert = (\r\n title: string,\r\n text: string = null,\r\n linkText: string = null,\r\n link: string = null,\r\n buttonText = \"OK\",\r\n customHtml = \"\",\r\n hasExtraButton = true,\r\n errorCode?: number\r\n): Promise<boolean> => {\r\n return new Promise((resolve) => {\r\n const heading = $(\r\n `<h2 class=\"sazka-alert__title\" style=\"visibility:hidden; display:inline-block;\">${title}</h2>`\r\n );\r\n $(\"body\").append(heading);\r\n const maxWidth = Math.max(heading.width(), 300);\r\n heading.remove();\r\n\r\n const template = `\r\n <div class=\"modal fade sazka-alert\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\">\r\n <div class=\"modal-dialog modal-dialog-centered\">\r\n <div class=\"modal-content modal-content--without-close\">\r\n ${errorCode ? `<span class='sazka-alert__ecode'>ecode: ${errorCode}</span>` : \"\"}\r\n <h2 class=\"sazka-alert__title\">${title}</h2>\r\n ${text ? `<p class=\"sazka-alert__text\" style=\"max-width: ${maxWidth}px;\">${text}</p>` : \"\"}\r\n <div class=\"sazka-alert__button-group\">\r\n ${linkText ? `<a class=\"btn btn-primary sazka-alert--btn\" href=\"${link}\">${linkText}</a>` : \"\"}\r\n ${\r\n hasExtraButton\r\n ? `<button type=\"button\" class=\"btn ${\r\n linkText ? \"btn-outline-primary\" : \"btn-primary\"\r\n }\" data-dismiss=\"modal\">${buttonText}</button>`\r\n : \"\"\r\n }\r\n </div>\r\n ${customHtml}\r\n </div>\r\n </div>\r\n </div>`;\r\n\r\n const $modal = $(template);\r\n $(\"body\").append($modal);\r\n $modal.modal(\"show\");\r\n $modal.find(\".sazka-alert--btn\").on(\"click\", () => {\r\n resolve(false);\r\n $modal.modal(\"hide\");\r\n });\r\n $modal.on(\"hidden.bs.modal\", () => {\r\n $modal.modal(\"dispose\").remove();\r\n if ($(\".modal:visible\").length) {\r\n $(\"body\").addClass(\"modal-open\");\r\n }\r\n resolve(true);\r\n });\r\n });\r\n};\r\n","/**\r\n * Returns a Promise that resolves when the given HTML element enters the viewport.\r\n *\r\n * @param {HTMLElement | Element} htmlElement - The HTML element to observe.\r\n * @param {number} [threshold=0.7] - The threshold for intersection.\r\n * @return {Promise<IntersectionObserverEntry | null>} A Promise that resolves with the intersection entry or null if IntersectionObserver is not supported.\r\n */\r\nexport function onViewportEnter<T extends HTMLElement | Element>(htmlElement: T, threshold = 0.7) {\r\n return new Promise((res) => {\r\n if (typeof IntersectionObserver != \"undefined\") {\r\n const options = {\r\n threshold: threshold,\r\n };\r\n\r\n const observer = new IntersectionObserver((entries, observer) => {\r\n entries\r\n .filter((entry) => entry.isIntersecting && entry.intersectionRatio >= threshold)\r\n .forEach((entry) => {\r\n res(entry);\r\n observer.unobserve(entry.target);\r\n });\r\n }, options);\r\n\r\n observer.observe(htmlElement as HTMLElement);\r\n } else {\r\n res(null);\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","CasinoFavoriteGamesRenderer","renderFavoriteGames","container","limit","CasinoFavoriteGames","getFavoriteGames","then","res","dispatchEvent","Event","addFavoriteStartEventName","bubbles","this","renderGames","addFavoriteEndEventName","catch","rej","console","error","addFavoriteGame","children","length","favoriteGames","loadFavoriteGamesFromSession","renderedGamesIds","$","map","find","x","parseInt","data","includes","removeFavoriteGame","removeGames","fillGamesToLimit","gamesToDisplay","externalSystemID","slice","gameIds","i","_$child$data","child","$child","childGameId","remove","gamesData","append","applyTransformation","standardTransformation","join","gameData","manufacturerGuid","url","relative","codeName","manufacturer","WebpHelper","createPictureTag","teaserImageUrl","name","gradient","gradientColor","jackpot","jackpotLogo","jackpotName","nameCard","_defineProperty","Store","store","useSessionStorage","setFavoriteGames","setJson","cookieKey","removeItem","saveOnBackend","highlight","promise","Promise","async","httpClient","post","sazkaAlert","ErrorTitleOnSave","ErrorTextOnSave","favorites","JSON","parse","stringify","splice","delete","isFavoriteGame","putFavoriteGames","Loader","show","put","hide","loadFavoriteGames","getJSON","done","_data$games","_data$games2","onLogin","resolve","onLogout","unHighlight","getJson","hasFavoriteGames","_this$loadFavoriteGam","_this$loadFavoriteGam2","element","fav","addClass","removeClass","animation","card","iconClass","text","setTimeout","triggerFavoriteAdded","addFavorite","addFavoriteEventName","triggerFavoriteRemovedStart","removeFavorite","removeFavoriteStartEventName","triggerFavoriteRemoved","removeFavoriteEventName","useCasinoFavoriteGames","isLoggedIn","useNgSession","value","watch","newValue","on","e","preventDefault","stopPropagation","interactionsDisabled","elem","currentTarget","closest","gameId","gameCodeName","FavoritesRecomended","constructor","root","favoriteContainer","favoriteCardsContainer","recomendedContainer","recomendedNavContainer","init","initCarouselForRecomended","addEventListener","addFavoriteGameHandler","favoriteCarousel","destroy","setupCarousel","hasSeenFavorites","removeFavoriteGameStartHandler","removeFavoriteGameHandler","userIsLoggedIn","newVal","onUserStateChange","_CasinoFavoriteGames$","cardCount","handleVisibility","resizeDebounced","debounce","handleNavVisibility","passive","onViewportEnter","recomendedCarousel","recommendationLinks","l","textContent","_CasinoFavoriteGames$3","favoritesCount","_CasinoFavoriteGames$2","classList","contains","favoritesShowedClassName","showSection","hideSection","_this$recomendedCarou","_this$recomendedCarou2","ResponsiveUtils","breakpointUp","slides","add","reposition","resize","carousel","FlickityPatched","contain","autoPlay","imagesLoaded","groupCells","cellAlign","dotsOptions","rootEl","useDsClasses","nav","nextButton","ready","isShown","lockNumber","showLoaderFromBackend","body","showLoaderIn","aboveAll","color","clearTimeout","showTimeout","showNow","counted","environment","isEditMode","loader","getElementById","showAboveAll","showNowAboveAll","hideTimeout","_Loader","documentReady","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","initPrevButton","initDots","initNextButton","replaceChildren","prevNextButtons","initButton","btn","btnType","icon","setAttributes","setAttribute","carouselBtn","getElementFromInstance","arrow","svgElem","removeAttribute","elType","prevButton","pageDots","holder","el","attrs","key","childNodes","nodeType","Flickity","selector","_options$dotsOptions","super","dotsRoot","cells","slide","style","pointerEvents","deactivatePageDots","getPrototypeOf","warn","superDeactivatePageDot","deactivate","bind","unbindStartEvent","log","parent","deactivatePrevNextButtons","superDeactivatePrevButton","superDeactivateNextButton","isAnimating","func","wait","immediate","timeout","args","context","later","apply","callNow","callback","readyState","title","linkText","link","buttonText","customHtml","hasExtraButton","errorCode","heading","maxWidth","Math","max","template","$modal","modal","htmlElement","threshold","IntersectionObserver","observer","entries","entry","isIntersecting","intersectionRatio","unobserve","target","observe"],"sourceRoot":""}