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pC,OACA2B,aACAM,cACAH,iBAER,C,0FCvFA,MAAM,WAAEH,EAAU,eAAEG,EAAc,YAAEG,IAAgBG,EAAAA,EAAAA,KAM9CC,EAC0F,QAD3EC,EACkC,QADlCC,EAChB7B,YAAY,8CAAsC,IAAA6B,OAAA,EAAlDA,EAAoDC,MAAM,YAAiC,IAAAF,EAAAA,EAAI,GAE9FG,EAAqBJ,EAAgBzQ,MAAM8Q,GAA2C,OAArBA,IAO1DC,EAAWA,CAACC,EAAkBhB,EAAkC,CAAC,KAC1EhJ,QAAQiK,IAAID,EAAUhB,GACtBD,EAAWiB,EAAUhB,EAAW,EASvBkB,EAAgBA,CACzBC,EACAH,EACAhB,EAAkC,CAAC,MAE/Ba,GAAsBJ,EAAgBzQ,MAAM8Q,GAAsBA,GAAqBK,MACvFJ,EAASC,EAAU,CAAEG,YAAaA,KAAgBnB,GACtD,EASS1Q,EAAeA,CAAC0R,EAAkBb,EAA4BH,EAAkC,CAAC,KAC1GhJ,QAAQC,MAAMkJ,EAAWH,GACzBE,EAAeC,EAAoB,CAAEa,SAAUA,KAAahB,GAAa,EAShEoB,EAAqBA,CAACJ,EAAkB9J,EAAiB8I,EAAkC,CAAC,KACrG,MAAM/I,EAAQ,IAAIwD,MAAMvD,GACxB5H,EAAa0R,EAAU/J,EAAO+I,EAAW,EAMhCqB,EAAYhB,C","sources":["webpack://@sazka/web/./js/app/landing-page/widgets/components/bonus-popup.vue?a09b","webpack://@sazka/web/./js/app/landing-page/widgets/components/bonus-popup.vue","webpack://@sazka/web/./js/app/landing-page/widgets/components/bonus-popup.vue?0ec9","webpack://@sazka/web/./js/app/landing-page/widgets/_lp-bonuses.ts","webpack://@sazka/web/./js/app/shared/http-clients/bi-realtime/bi-realtime-http-client.ts","webpack://@sazka/web/./js/app/shared/http-clients/bi-realtime/bi-realtime-http-methods.ts","webpack://@sazka/web/../../libs/design-system/src/loader/loader.ts","webpack://@sazka/web/../../libs/utils/document-ready.ts","webpack://@sazka/web/../../libs/utils/logger/app-insights.ts","webpack://@sazka/web/../../libs/utils/logger/use-app-logger.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, createVNode as _createVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveDynamicComponent as _resolveDynamicComponent, normalizeClass as _normalizeClass, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createSlots as _createSlots } from \"vue\"\n\nconst _hoisted_1 = [\"innerHTML\"]\nconst _hoisted_2 = { class: \"bonus-detail__content\" }\nconst _hoisted_3 = [\"innerHTML\"]\nconst _hoisted_4 = { class: \"bonus-detail__buttons\" }\n\nimport DsModalDialog from \"@sazka/design-system/src/modal-dialog/ds-modal-dialog.vue\";\r\nimport WebpImage from \"@sazka/design-system/src/image/webp-image.vue\";\r\nimport { LandingPageBonusPopup } from \"../models/landing-page-bonus\";\r\nimport { computed, getCurrentInstance, nextTick, onMounted, ref, watch } from \"vue\";\r\nimport { BiRealtimeHttpMetods } from \"@/shared/http-clients/bi-realtime/bi-realtime-http-methods\";\r\nimport { useNgSession } from \"@sazka/ng/ng-session\";\r\nimport { Loader } from \"@sazka/design-system/src/loader/loader\";\r\nimport { ngFrameworkLoaded } from \"@sazka/ng/ng-integration\";\r\nimport { logException } from \"@sazka/utils/logger/use-app-logger\";\r\n\r\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'bonus-popup',\n  props: {\n    selectedBonus: {}\n  },\n  setup(__props: any) {\n\r\nconst { isLoggedIn } = useNgSession();\r\n\r\nconst props = __props;\r\n\r\nconst isModalVisible = ref(false);\r\n\r\nconst handleClick = async (bonusId: number): Promise<boolean> => {\r\n    Loader.show();\r\n    try {\r\n        await BiRealtimeHttpMetods.confirmPlayerBonus(bonusId);\r\n        return true;\r\n    } catch (ex) {\r\n        logException(\"confirm-player-bonus\", ex);\r\n    } finally {\r\n        Loader.hide();\r\n    }\r\n\r\n    return false;\r\n};\r\n\r\nconst playerBonusesIds = ref<number[]>([]);\r\n\r\nconst leftButtonIsBonus = computed(\r\n    () => props.selectedBonus.leftButtonType === \"BonusConfirmation\" && props.selectedBonus.leftButtonBonus > 0\r\n);\r\nconst leftButtonElement = computed(() => (leftButtonIsBonus.value ? \"button\" : \"a\"));\r\nconst leftButtonDisabled = computed(\r\n    () =>\r\n        leftButtonIsBonus.value &&\r\n        (!isLoggedIn.value || playerBonusesIds.value.some((b) => b == props.selectedBonus.leftButtonBonus))\r\n);\r\n\r\nconst leftButtonText = computed(() =>\r\n    leftButtonDisabled.value && isLoggedIn.value ? \"Bonus aktivován\" : props.selectedBonus?.leftButtonText\r\n);\r\n\r\nconst leftButtonClick = async () => {\r\n    if (!leftButtonIsBonus.value) {\r\n        return;\r\n    }\r\n\r\n    const success = await handleClick(props.selectedBonus.leftButtonBonus);\r\n    if (success) {\r\n        playerBonusesIds.value = [...playerBonusesIds.value, props.selectedBonus.leftButtonBonus];\r\n    }\r\n};\r\n\r\nconst rightButtonIsBonus = computed(\r\n    () => props.selectedBonus.rightButtonType === \"BonusConfirmation\" && props.selectedBonus.rightButtonBonus > 0\r\n);\r\nconst rightButtonElement = computed(() => (rightButtonIsBonus.value ? \"button\" : \"a\"));\r\n\r\nconst rightButtonDisabled = computed(\r\n    () =>\r\n        rightButtonIsBonus.value &&\r\n        (!isLoggedIn.value || playerBonusesIds.value.some((b) => b == props.selectedBonus.rightButtonBonus))\r\n);\r\n\r\nconst rightButtonText = computed(() =>\r\n    rightButtonDisabled.value && isLoggedIn.value ? \"Bonus aktivován\" : props.selectedBonus?.rightButtonText\r\n);\r\n\r\nconst rightButtonClick = async () => {\r\n    if (!rightButtonIsBonus.value) {\r\n        return;\r\n    }\r\n\r\n    const success = await handleClick(props.selectedBonus.rightButtonBonus);\r\n    if (success) {\r\n        playerBonusesIds.value = [...playerBonusesIds.value, props.selectedBonus.rightButtonBonus];\r\n    }\r\n};\r\n\r\nconst setupBonusConfirationCtas = async () => {\r\n    try {\r\n        const playersBonusAttributes = await BiRealtimeHttpMetods.getPlayerBonusAttributes();\r\n        playerBonusesIds.value =\r\n            playersBonusAttributes?.flatMap((bonusAttribute) =>\r\n                Object.values(bonusAttribute)\r\n                    .filter((value) => Array.isArray(value))\r\n                    .flat()\r\n            ) ?? [];\r\n    } catch (ex) {\r\n        logException(\"load-player-bonuses\", ex);\r\n    }\r\n};\r\n\r\nonMounted(async () => {\r\n    isModalVisible.value = true;\r\n\r\n    if (!leftButtonIsBonus.value && !rightButtonIsBonus.value) {\r\n        return;\r\n    }\r\n\r\n    await ngFrameworkLoaded();\r\n\r\n    // on login - setupBonusCta();\r\n    // on logout - disable all bonus ctas\r\n    watch(\r\n        isLoggedIn,\r\n        (newIsLoggedIn) => {\r\n            if (newIsLoggedIn) {\r\n                setupBonusConfirationCtas();\r\n            }\r\n        },\r\n        { immediate: true }\r\n    );\r\n});\r\n\r\nconst app = getCurrentInstance();\r\nconst closeModal = () => {\r\n    nextTick(() => {\r\n        app?.appContext.app.unmount();\r\n    });\r\n};\r\n\nreturn (_ctx: any,_cache: any) => {\n  return (_openBlock(), _createBlock(DsModalDialog, {\n    modelValue: isModalVisible.value,\n    \"onUpdate:modelValue\": [\n      _cache[0] || (_cache[0] = ($event: any) => ((isModalVisible).value = $event)),\n      closeModal\n    ],\n    class: \"bonus-detail\"\n  }, _createSlots({\n    content: _withCtx(() => [\n      _createElementVNode(\"div\", _hoisted_2, [\n        _createVNode(WebpImage, {\n          src: _ctx.selectedBonus?.image,\n          alt: \"\",\n          \"css-class\": \"bonus-detail__image\"\n        }, null, 8, [\"src\"]),\n        _createElementVNode(\"div\", {\n          class: \"bonus-detail__text\",\n          innerHTML: _ctx.selectedBonus?.text\n        }, null, 8, _hoisted_3)\n      ])\n    ]),\n    _: 2\n  }, [\n    (_ctx.selectedBonus?.title)\n      ? {\n          name: \"top\",\n          fn: _withCtx(() => [\n            _createElementVNode(\"h2\", {\n              class: \"bonus-detail__title\",\n              innerHTML: _ctx.selectedBonus?.title\n            }, null, 8, _hoisted_1)\n          ]),\n          key: \"0\"\n        }\n      : undefined,\n    (\r\n                (_ctx.selectedBonus?.leftButtonText && _ctx.selectedBonus?.leftButtonLink) ||\r\n                (_ctx.selectedBonus?.rightButtonText && _ctx.selectedBonus?.rightButtonLink)\r\n            )\n      ? {\n          name: \"bottom\",\n          fn: _withCtx(() => [\n            _createElementVNode(\"div\", _hoisted_4, [\n              (_ctx.selectedBonus?.leftButtonText)\n                ? (_openBlock(), _createBlock(_resolveDynamicComponent(leftButtonElement.value), {\n                    key: 0,\n                    class: _normalizeClass([\"btn\", _ctx.selectedBonus?.leftButtonStyle]),\n                    href: _ctx.selectedBonus?.leftButtonLink,\n                    target: _ctx.selectedBonus?.leftButtonOpenInNewTab ? '_blank' : undefined,\n                    rel: _ctx.selectedBonus?.leftButtonOpenInNewTab ? 'noopener noreferrer' : undefined,\n                    disabled: leftButtonDisabled.value,\n                    onClick: leftButtonClick\n                  }, {\n                    default: _withCtx(() => [\n                      _createTextVNode(_toDisplayString(leftButtonText.value), 1)\n                    ]),\n                    _: 1\n                  }, 8, [\"class\", \"href\", \"target\", \"rel\", \"disabled\"]))\n                : _createCommentVNode(\"\", true),\n              (_ctx.selectedBonus?.rightButtonText)\n                ? (_openBlock(), _createBlock(_resolveDynamicComponent(rightButtonElement.value), {\n                    key: 1,\n                    class: _normalizeClass([\"btn\", _ctx.selectedBonus?.rightButtonStyle]),\n                    href: _ctx.selectedBonus?.rightButtonLink,\n                    target: _ctx.selectedBonus?.rightButtonOpenInNewTab ? '_blank' : undefined,\n                    rel: _ctx.selectedBonus?.rightButtonOpenInNewTab ? 'noopener noreferrer' : undefined,\n                    disabled: rightButtonDisabled.value,\n                    onClick: rightButtonClick\n                  }, {\n                    default: _withCtx(() => [\n                      _createTextVNode(_toDisplayString(rightButtonText.value), 1)\n                    ]),\n                    _: 1\n                  }, 8, [\"class\", \"href\", \"target\", \"rel\", \"disabled\"]))\n                : _createCommentVNode(\"\", true)\n            ])\n          ]),\n          key: \"1\"\n        }\n      : undefined\n  ]), 1032, [\"modelValue\"]))\n}\n}\n\n})","<template>\r\n    <DsModalDialog v-model=\"isModalVisible\" @update:model-value=\"closeModal\" class=\"bonus-detail\">\r\n        <template #top v-if=\"selectedBonus?.title\">\r\n            <h2 class=\"bonus-detail__title\" v-html=\"selectedBonus?.title\"></h2>\r\n        </template>\r\n        <template #content>\r\n            <div class=\"bonus-detail__content\">\r\n                <WebpImage :src=\"selectedBonus?.image\" alt=\"\" css-class=\"bonus-detail__image\" />\r\n                <div class=\"bonus-detail__text\" v-html=\"selectedBonus?.text\"></div>\r\n            </div>\r\n        </template>\r\n        <template\r\n            #bottom\r\n            v-if=\"\r\n                (selectedBonus?.leftButtonText && selectedBonus?.leftButtonLink) ||\r\n                (selectedBonus?.rightButtonText && selectedBonus?.rightButtonLink)\r\n            \"\r\n        >\r\n            <div class=\"bonus-detail__buttons\">\r\n                <component\r\n                    :is=\"leftButtonElement\"\r\n                    v-if=\"selectedBonus?.leftButtonText\"\r\n                    class=\"btn\"\r\n                    :class=\"selectedBonus?.leftButtonStyle\"\r\n                    :href=\"selectedBonus?.leftButtonLink\"\r\n                    :target=\"selectedBonus?.leftButtonOpenInNewTab ? '_blank' : undefined\"\r\n                    :rel=\"selectedBonus?.leftButtonOpenInNewTab ? 'noopener noreferrer' : undefined\"\r\n                    :disabled=\"leftButtonDisabled\"\r\n                    @click=\"leftButtonClick\"\r\n                >\r\n                    {{ leftButtonText }}\r\n                </component>\r\n                <component\r\n                    :is=\"rightButtonElement\"\r\n                    v-if=\"selectedBonus?.rightButtonText\"\r\n                    class=\"btn\"\r\n                    :class=\"selectedBonus?.rightButtonStyle\"\r\n                    :href=\"selectedBonus?.rightButtonLink\"\r\n                    :target=\"selectedBonus?.rightButtonOpenInNewTab ? '_blank' : undefined\"\r\n                    :rel=\"selectedBonus?.rightButtonOpenInNewTab ? 'noopener noreferrer' : undefined\"\r\n                    :disabled=\"rightButtonDisabled\"\r\n                    @click=\"rightButtonClick\"\r\n                >\r\n                    {{ rightButtonText }}\r\n                </component>\r\n            </div>\r\n        </template>\r\n    </DsModalDialog>\r\n</template>\r\n\r\n<script lang=\"ts\" setup>\r\nimport DsModalDialog from \"@sazka/design-system/src/modal-dialog/ds-modal-dialog.vue\";\r\nimport WebpImage from \"@sazka/design-system/src/image/webp-image.vue\";\r\nimport { LandingPageBonusPopup } from \"../models/landing-page-bonus\";\r\nimport { computed, getCurrentInstance, nextTick, onMounted, ref, watch } from \"vue\";\r\nimport { BiRealtimeHttpMetods } from \"@/shared/http-clients/bi-realtime/bi-realtime-http-methods\";\r\nimport { useNgSession } from \"@sazka/ng/ng-session\";\r\nimport { Loader } from \"@sazka/design-system/src/loader/loader\";\r\nimport { ngFrameworkLoaded } from \"@sazka/ng/ng-integration\";\r\nimport { logException } from \"@sazka/utils/logger/use-app-logger\";\r\n\r\nconst { isLoggedIn } = useNgSession();\r\n\r\nconst props = defineProps<{\r\n    selectedBonus: LandingPageBonusPopup;\r\n}>();\r\n\r\nconst isModalVisible = ref(false);\r\n\r\nconst handleClick = async (bonusId: number): Promise<boolean> => {\r\n    Loader.show();\r\n    try {\r\n        await BiRealtimeHttpMetods.confirmPlayerBonus(bonusId);\r\n        return true;\r\n    } catch (ex) {\r\n        logException(\"confirm-player-bonus\", ex);\r\n    } finally {\r\n        Loader.hide();\r\n    }\r\n\r\n    return false;\r\n};\r\n\r\nconst playerBonusesIds = ref<number[]>([]);\r\n\r\nconst leftButtonIsBonus = computed(\r\n    () => props.selectedBonus.leftButtonType === \"BonusConfirmation\" && props.selectedBonus.leftButtonBonus > 0\r\n);\r\nconst leftButtonElement = computed(() => (leftButtonIsBonus.value ? \"button\" : \"a\"));\r\nconst leftButtonDisabled = computed(\r\n    () =>\r\n        leftButtonIsBonus.value &&\r\n        (!isLoggedIn.value || playerBonusesIds.value.some((b) => b == props.selectedBonus.leftButtonBonus))\r\n);\r\n\r\nconst leftButtonText = computed(() =>\r\n    leftButtonDisabled.value && isLoggedIn.value ? \"Bonus aktivován\" : props.selectedBonus?.leftButtonText\r\n);\r\n\r\nconst leftButtonClick = async () => {\r\n    if (!leftButtonIsBonus.value) {\r\n        return;\r\n    }\r\n\r\n    const success = await handleClick(props.selectedBonus.leftButtonBonus);\r\n    if (success) {\r\n        playerBonusesIds.value = [...playerBonusesIds.value, props.selectedBonus.leftButtonBonus];\r\n    }\r\n};\r\n\r\nconst rightButtonIsBonus = computed(\r\n    () => props.selectedBonus.rightButtonType === \"BonusConfirmation\" && props.selectedBonus.rightButtonBonus > 0\r\n);\r\nconst rightButtonElement = computed(() => (rightButtonIsBonus.value ? \"button\" : \"a\"));\r\n\r\nconst rightButtonDisabled = computed(\r\n    () =>\r\n        rightButtonIsBonus.value &&\r\n        (!isLoggedIn.value || playerBonusesIds.value.some((b) => b == props.selectedBonus.rightButtonBonus))\r\n);\r\n\r\nconst rightButtonText = computed(() =>\r\n    rightButtonDisabled.value && isLoggedIn.value ? \"Bonus aktivován\" : props.selectedBonus?.rightButtonText\r\n);\r\n\r\nconst rightButtonClick = async () => {\r\n    if (!rightButtonIsBonus.value) {\r\n        return;\r\n    }\r\n\r\n    const success = await handleClick(props.selectedBonus.rightButtonBonus);\r\n    if (success) {\r\n        playerBonusesIds.value = [...playerBonusesIds.value, props.selectedBonus.rightButtonBonus];\r\n    }\r\n};\r\n\r\nconst setupBonusConfirationCtas = async () => {\r\n    try {\r\n        const playersBonusAttributes = await BiRealtimeHttpMetods.getPlayerBonusAttributes();\r\n        playerBonusesIds.value =\r\n            playersBonusAttributes?.flatMap((bonusAttribute) =>\r\n                Object.values(bonusAttribute)\r\n                    .filter((value) => Array.isArray(value))\r\n                    .flat()\r\n            ) ?? [];\r\n    } catch (ex) {\r\n        logException(\"load-player-bonuses\", ex);\r\n    }\r\n};\r\n\r\nonMounted(async () => {\r\n    isModalVisible.value = true;\r\n\r\n    if (!leftButtonIsBonus.value && !rightButtonIsBonus.value) {\r\n        return;\r\n    }\r\n\r\n    await ngFrameworkLoaded();\r\n\r\n    // on login - setupBonusCta();\r\n    // on logout - disable all bonus ctas\r\n    watch(\r\n        isLoggedIn,\r\n        (newIsLoggedIn) => {\r\n            if (newIsLoggedIn) {\r\n                setupBonusConfirationCtas();\r\n            }\r\n        },\r\n        { immediate: true }\r\n    );\r\n});\r\n\r\nconst app = getCurrentInstance();\r\nconst closeModal = () => {\r\n    nextTick(() => {\r\n        app?.appContext.app.unmount();\r\n    });\r\n};\r\n</script>\r\n","import script from \"./bonus-popup.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./bonus-popup.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { LandingPageBonusPopup } from \"./models/landing-page-bonus\";\r\nimport { httpClient } from \"@sazka/utils/http-clients/http-client\";\r\nimport { type App, type Ref, createApp, ref } from \"vue\";\r\nimport BonusPopup from \"./components/bonus-popup.vue\";\r\nimport { AxiosError } from \"axios\";\r\nimport { useLocalStorage } from \"@sazka/utils/use-storage\";\r\n\r\nlet bonuses: LandingPageBonusPopup[];\r\nconst storageName = \"calendar-seen-bonuses\";\r\nconst seenBonuses = useLocalStorage().getJson<string[]>(storageName) ?? [];\r\n\r\nconst initData = async () => {\r\n    try {\r\n        const response = await httpClient.get<LandingPageBonusPopup[]>(\r\n            `/api/landing-page/bonus-popups?node-alias-path=${environment.nodeAliasPath}`\r\n        );\r\n        bonuses = response.data;\r\n    } catch (e) {\r\n        const err = e as AxiosError;\r\n        console.error(err.message);\r\n    }\r\n};\r\n\r\nconst showPopup = (selectedBonus: LandingPageBonusPopup) => {\r\n    const alertRef: Ref<App> = ref(null);\r\n\r\n    alertRef.value = createApp(BonusPopup, {\r\n        selectedBonus,\r\n    });\r\n\r\n    const root = document.createElement(\"div\");\r\n    alertRef.value.mount(root);\r\n};\r\n\r\nconst setupPopupOpeners = () => {\r\n    const popupOpeners = document.querySelectorAll(\".bonus-opener\");\r\n    popupOpeners.forEach((o) => {\r\n        o.addEventListener(\"click\", () => {\r\n            const bonusId = o.getAttribute(\"data-bonus-id\");\r\n            const selectedBonus = bonuses.find((b) => b.id.toString() === bonusId);\r\n            showPopup(selectedBonus);\r\n        });\r\n    });\r\n};\r\n\r\nconst setupPulsingBonuses = () => {\r\n    const activeBonuses = document.querySelectorAll(\".bonuses-calendar__bonus--active\");\r\n    activeBonuses.forEach((b) => {\r\n        if (!seenBonuses?.includes(b.getAttribute(\"data-bonus-id\"))) {\r\n            b.classList.add(\"bonuses-calendar__bonus--active--pulsing\");\r\n            b.addEventListener(\r\n                \"click\",\r\n                () => {\r\n                    b.classList.remove(\"bonuses-calendar__bonus--active--pulsing\");\r\n                    seenBonuses.push(b.getAttribute(\"data-bonus-id\"));\r\n                    useLocalStorage().setItem(storageName, JSON.stringify(seenBonuses), \"essential\");\r\n                },\r\n                { once: true }\r\n            );\r\n        }\r\n    });\r\n};\r\n\r\nconst setupShowMoreFeature = () => {\r\n    const bonusesGrid = document.querySelector(\"#bonuses-grid\");\r\n    const showMoreButton = document.querySelector<HTMLElement>(\"#bonuses-show-more\");\r\n    const showLessButton = document.querySelector<HTMLElement>(\"#bonuses-show-less\");\r\n\r\n    if (bonusesGrid && showMoreButton) {\r\n        showMoreButton.addEventListener(\"click\", () => {\r\n            bonusesGrid.classList.remove(\"bonuses-calendar__bonuses-grid--shortened\");\r\n            showMoreButton.hidden = true;\r\n            showLessButton.hidden = false;\r\n        });\r\n\r\n        showLessButton.addEventListener(\"click\", () => {\r\n            bonusesGrid.classList.add(\"bonuses-calendar__bonuses-grid--shortened\");\r\n            showLessButton.hidden = true;\r\n            showMoreButton.hidden = false;\r\n            $(\"html, body\").animate(\r\n                {\r\n                    scrollTop: bonusesGrid.scrollHeight,\r\n                },\r\n                400\r\n            );\r\n        });\r\n    }\r\n};\r\n\r\ndocument.ready(async () => {\r\n    await initData();\r\n    setupPopupOpeners();\r\n    setupShowMoreFeature();\r\n    setupPulsingBonuses();\r\n});\r\n","import axios, { AxiosRequestConfig } from \"axios\";\r\nimport { addSagAuthInterceptor } from \"@sazka/utils/http-clients/sag-auth-interceptor\";\r\nimport { addBtmIdInterceptor } from \"@sazka/utils/http-clients/btm-id-interceptor\";\r\nimport { useSagOptions } from \"@sazka/utils/http-clients/use-sag-options\";\r\n\r\nconst { getSagApiUrl } = useSagOptions();\r\n\r\n/**\r\n * Axios basic configuration\r\n * Some general configuration can be added like timeout, headers, params etc. More details can be found on https://github.com/axios/axios\r\n * */\r\nconst config: AxiosRequestConfig = {\r\n    baseURL: getSagApiUrl(\"realtime360\"),\r\n};\r\n\r\nexport const biRealtimeHttpClient = axios.create(config);\r\n\r\n/** Adding the request interceptors */\r\naddSagAuthInterceptor(biRealtimeHttpClient);\r\naddBtmIdInterceptor(biRealtimeHttpClient);\r\n","import { useNgSession } from \"@sazka/ng/ng-session\";\r\nimport { httpClient } from \"@sazka/utils/http-clients/http-client\";\r\nimport { biRealtimeHttpClient } from \"./bi-realtime-http-client\";\r\nimport { BiRealtimeBonusesAttributes, BiRealtimeBonusesResponse } from \"./bi-realtime-http-models\";\r\n\r\nconst { session } = useNgSession();\r\n\r\nexport namespace BiRealtimeHttpMetods {\r\n    export const getPlayerBonusAttributes = async (): Promise<BiRealtimeBonusesAttributes[]> => {\r\n        if (!session.value?.PlayerID) throw new Error(\"Session PlayerID is missing\");\r\n\r\n        const response = await biRealtimeHttpClient.get<BiRealtimeBonusesResponse>(\r\n            `dehBonusInfo/${session.value.PlayerID}`\r\n        );\r\n\r\n        return response.data?.Attributes ?? [];\r\n    };\r\n\r\n    export const getPlayersBonuses = async (): Promise<number[]> => {\r\n        const attributes = await getPlayerBonusAttributes();\r\n\r\n        const activeBonuses = attributes.find((a) => !!a.ACTIVE_BONUSES)?.ACTIVE_BONUSES ?? [];\r\n        const attachedBonuses = attributes.find((a) => !!a.ATTACHED_BONUSES)?.ATTACHED_BONUSES ?? [];\r\n        const completedBonuses = attributes.find((a) => !!a.COMPLETED_BONUSES)?.COMPLETED_BONUSES ?? [];\r\n        const partiallyCompletedBonuses =\r\n            attributes.find((a) => !!a.PARTIALLY_COMPLETED_BONUSES)?.PARTIALLY_COMPLETED_BONUSES ?? [];\r\n\r\n        return activeBonuses\r\n            .concat(attachedBonuses)\r\n            .concat(completedBonuses)\r\n            .concat(partiallyCompletedBonuses)\r\n            .map((b) => Number(b));\r\n    };\r\n\r\n    export const getPlayerAttachedBonuses = async (): Promise<number[]> => {\r\n        const attributes = await getPlayerBonusAttributes();\r\n\r\n        return attributes.find((a) => !!a.ATTACHED_BONUSES)?.ATTACHED_BONUSES ?? [];\r\n    };\r\n\r\n    export const confirmPlayerBonus = async (bonusId: number) => {\r\n        await httpClient.post(`/api/player/bonuses/${bonusId}/confirm`);\r\n    };\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","/**\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","import { ApplicationInsights, ITelemetryItem } from \"@microsoft/applicationinsights-web\";\r\nimport { NgSession } from \"@sazka/ng/model/ng-fw\";\r\nimport { Ref } from \"vue\";\r\n\r\nconst toTrack = [\r\n    \"trackEvent\",\r\n    \"trackPageView\",\r\n    \"trackPageViewPerformance\",\r\n    \"trackException\",\r\n    \"trackTrace\",\r\n    \"trackMetric\",\r\n    \"trackDependencyData\",\r\n    \"throwInternal\", // called when a message is logged internally\r\n    \"logInternalMessage\", // called when a message is logged internally\r\n    \"triggerSend\", // called when data is queued to be sent to the server\r\n    \"_sender\", // called when data is sent to the server\r\n];\r\n\r\nlet appInsights: ApplicationInsights = null;\r\n\r\nconst isDev = environment.env === \"Development\";\r\n\r\nlet ngSessionRef: Ref<NgSession> = null;\r\n\r\nasync function init() {\r\n    const extensions = [];\r\n    const extensionConfig = {};\r\n\r\n    if (!environment.isKasa) {\r\n        const { useNgSession } = await import(\"@sazka/ng/ng-session\");\r\n        ngSessionRef = useNgSession().session;\r\n    }\r\n\r\n    if (isDev) {\r\n        // eslint-disable-next-line @typescript-eslint/naming-convention\r\n        const { DebugPlugin } = await import(\"@microsoft/applicationinsights-debugplugin-js\");\r\n        const debugPluginInstance = new DebugPlugin();\r\n        extensions.push(debugPluginInstance);\r\n        extensionConfig[DebugPlugin.identifier] = {\r\n            trackers: toTrack,\r\n        };\r\n    }\r\n\r\n    appInsights = new ApplicationInsights({\r\n        config: {\r\n            connectionString: appSettings[\"APPLICATIONINSIGHTS_CONNECTION_STRING\"],\r\n            disableAjaxTracking: true,\r\n            disableFetchTracking: true,\r\n            disableDataLossAnalysis: false,\r\n            enableUnhandledPromiseRejectionTracking: true,\r\n            extensions: extensions,\r\n            extensionConfig: extensionConfig,\r\n        },\r\n    });\r\n\r\n    const telemetryInitializer = (envelope: ITelemetryItem) => {\r\n        envelope.data = envelope.data || {};\r\n        envelope.data.playerId = ngSessionRef?.value?.PlayerID ?? null;\r\n        envelope.data.location = window.location.href;\r\n        envelope.data.userAgent = window.navigator.userAgent;\r\n        envelope.data.mobileView = environment.isInAppView;\r\n    };\r\n\r\n    appInsights.addTelemetryInitializer(telemetryInitializer);\r\n    appInsights.loadAppInsights();\r\n}\r\n\r\nfunction trackEvent(name: string, properties: Record<string, any>) {\r\n    appInsights?.trackEvent(\r\n        {\r\n            name: name,\r\n        },\r\n        {\r\n            properties,\r\n        }\r\n    );\r\n}\r\n\r\n// Used to track exceptions with custom properties in addition to automatically tracked exceptions (other than base data).\r\nfunction trackException(exception: Error, properties: Record<string, any> = {}) {\r\n    appInsights?.trackException({ exception, properties });\r\n}\r\n\r\nfunction trackMetric(name: string, value: number) {\r\n    appInsights?.trackMetric({ name: name, average: value });\r\n}\r\n\r\nexport function useAppInsights() {\r\n    return {\r\n        init,\r\n        trackEvent,\r\n        trackMetric,\r\n        trackException,\r\n    };\r\n}\r\n","import { useAppInsights } from \"./app-insights\";\r\n\r\n/** You can add your namespace */\r\ntype KasaLoggerSegmentNames = \"kasa-apis\" | \"kasa-wheel-page\";\r\ntype WebLoggerSegmentNames = \"deh-general\" | \"bonusomat\" | \"golden-wheel\";\r\ntype AppLogggerSegmentNames = \"all\" | WebLoggerSegmentNames | KasaLoggerSegmentNames;\r\n\r\nconst { trackEvent, trackException, trackMetric } = useAppInsights();\r\n\r\n/**\r\n *   You can combinate more segments separated by semicolon in appsettings.\r\n *   etc. Sazka:Features:FeAppLoggerSegmentsEnabled: \"bonusomat;golden-wheel\"\r\n * */\r\nconst enabledSegments: AppLogggerSegmentNames[] =\r\n    (appSettings[\"Features:FeAppLoggerSegmentsEnabled\"]?.split(\";\") as AppLogggerSegmentNames[]) ?? [];\r\n\r\nconst isEnabledAllTrafic = enabledSegments.some((enableSegmentName) => enableSegmentName == \"all\");\r\n\r\n/**\r\n * Log event to console and app insights\r\n * @param codename Short event name string (code name of event)\r\n * @param properties Custom data to log\r\n */\r\nexport const logEvent = (codename: string, properties: Record<string, any> = {}) => {\r\n    console.log(codename, properties);\r\n    trackEvent(codename, properties);\r\n};\r\n\r\n/**\r\n * Log event to console and app insights if segmets debug mode is enabled\r\n * @param segmentName The name of the segment that must be enabled to send the event\r\n * @param codename Short event name string (code name of event)\r\n * @param properties Custom data to log\r\n */\r\nexport const logDebugEvent = (\r\n    segmentName: AppLogggerSegmentNames,\r\n    codename: string,\r\n    properties: Record<string, any> = {}\r\n) => {\r\n    if (isEnabledAllTrafic || enabledSegments.some((enableSegmentName) => enableSegmentName == segmentName)) {\r\n        logEvent(codename, { segmentName: segmentName, ...properties });\r\n    }\r\n};\r\n\r\n/**\r\n * Log exception to console and app insights. *\r\n * @param codename  Short exception name string (code name of event)\r\n * @param exception Object from the exception (try..catch value)\r\n * @param properties Custom data to log\r\n */\r\nexport const logException = (codename: string, exception: Error | unknown, properties: Record<string, any> = {}) => {\r\n    console.error(exception, properties);\r\n    trackException(exception as Error, { codename: codename, ...properties });\r\n};\r\n\r\n/**\r\n * Log custom exception to console and app insights.\r\n * @param codename  Short exception name string (code name of event)\r\n * @param message Short message of error\r\n * @param properties Custom data to log\r\n */\r\nexport const logCustomException = (codename: string, message: string, properties: Record<string, any> = {}) => {\r\n    const error = new Error(message);\r\n    logException(codename, error, properties);\r\n};\r\n\r\n/**\r\n * Log some metric to app insights\r\n */\r\nexport const logMetric = trackMetric;\r\n"],"names":["_hoisted_1","_hoisted_2","class","_hoisted_3","_hoisted_4","_defineComponent","__name","props","selectedBonus","setup","__props","isLoggedIn","useNgSession","isModalVisible","ref","handleClick","async","Loader","show","BiRealtimeHttpMetods","confirmPlayerBonus","bonusId","ex","logException","hide","playerBonusesIds","leftButtonIsBonus","computed","leftButtonType","leftButtonBonus","leftButtonElement","value","leftButtonDisabled","some","b","leftButtonText","_props$selectedBonus","leftButtonClick","success","rightButtonIsBonus","rightButtonType","rightButtonBonus","rightButtonElement","rightButtonDisabled","rightButtonText","_props$selectedBonus2","rightButtonClick","setupBonusConfirationCtas","_playersBonusAttribut","playersBonusAttributes","getPlayerBonusAttributes","flatMap","bonusAttribute","Object","values","filter","Array","isArray","flat","onMounted","ngFrameworkLoaded","watch","newIsLoggedIn","immediate","app","getCurrentInstance","closeModal","nextTick","appContext","unmount","_ctx","_cache","_ctx$selectedBonus3","_ctx$selectedBonus5","_ctx$selectedBonus6","_ctx$selectedBonus7","_ctx$selectedBonus8","_openBlock","_createBlock","DsModalDialog","modelValue","$event","_createSlots","content","_withCtx","_ctx$selectedBonus","_ctx$selectedBonus2","_createElementVNode","_createVNode","WebpImage","src","image","alt","innerHTML","text","_","title","name","fn","_ctx$selectedBonus4","key","undefined","leftButtonLink","rightButtonLink","_ctx$selectedBonus9","_ctx$selectedBonus10","_ctx$selectedBonus11","_ctx$selectedBonus12","_ctx$selectedBonus13","_ctx$selectedBonus14","_ctx$selectedBonus15","_ctx$selectedBonus16","_ctx$selectedBonus17","_ctx$selectedBonus18","_resolveDynamicComponent","_normalizeClass","leftButtonStyle","href","target","leftButtonOpenInNewTab","rel","disabled","onClick","default","_createTextVNode","_toDisplayString","_createCommentVNode","rightButtonStyle","rightButtonOpenInNewTab","__exports__","bonuses","storageName","seenBonuses","_useLocalStorage$getJ","useLocalStorage","getJson","initData","response","httpClient","get","environment","nodeAliasPath","data","e","err","console","error","message","showPopup","alertRef","createApp","BonusPopup","root","document","createElement","mount","setupPopupOpeners","popupOpeners","querySelectorAll","forEach","o","addEventListener","getAttribute","find","id","toString","setupPulsingBonuses","activeBonuses","includes","classList","add","remove","push","setItem","JSON","stringify","once","setupShowMoreFeature","bonusesGrid","querySelector","showMoreButton","showLessButton","hidden","$","animate","scrollTop","scrollHeight","ready","getSagApiUrl","useSagOptions","config","baseURL","biRealtimeHttpClient","axios","create","addSagAuthInterceptor","addBtmIdInterceptor","session","_session$value","_response$data$Attrib","_response$data","PlayerID","Error","Attributes","getPlayersBonuses","_attributes$find$ACTI","_attributes$find","_attributes$find$ATTA","_attributes$find2","_attributes$find$COMP","_attributes$find3","_attributes$find$PART","_attributes$find4","attributes","a","ACTIVE_BONUSES","attachedBonuses","ATTACHED_BONUSES","completedBonuses","COMPLETED_BONUSES","partiallyCompletedBonuses","PARTIALLY_COMPLETED_BONUSES","concat","map","Number","getPlayerAttachedBonuses","_attributes$find$ATTA2","_attributes$find5","post","isShown","this","lockNumber","showLoaderFromBackend","body","contains","showLoaderIn","aboveAll","color","clearTimeout","showTimeout","window","setTimeout","showNow","counted","isEditMode","loader","getElementById","textContent","showAboveAll","showNowAboveAll","hideTimeout","_defineProperty","_Loader","documentReady","callback","readyState","toTrack","appInsights","isDev","env","ngSessionRef","init","extensions","extensionConfig","isKasa","DebugPlugin","debugPluginInstance","identifier","trackers","ApplicationInsights","connectionString","appSettings","disableAjaxTracking","disableFetchTracking","disableDataLossAnalysis","enableUnhandledPromiseRejectionTracking","telemetryInitializer","envelope","_ngSessionRef$value$P","_ngSessionRef","playerId","location","userAgent","navigator","mobileView","isInAppView","addTelemetryInitializer","loadAppInsights","trackEvent","properties","_appInsights","trackException","exception","_appInsights2","trackMetric","_appInsights3","average","useAppInsights","enabledSegments","_appSettings$Features","_appSettings$Features2","split","isEnabledAllTrafic","enableSegmentName","logEvent","codename","log","logDebugEvent","segmentName","logCustomException","logMetric"],"sourceRoot":""}