@smartico/public-api 0.0.378 → 0.0.380
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nvmrc +1 -1
- package/README.md +31 -2
- package/dist/Store/BuyStoreItemErrorCode.d.ts +9 -1
- package/dist/Tournaments/TournamentRegistrationError.d.ts +3 -1
- package/dist/WSAPI/WSAPI.d.ts +13 -1235
- package/dist/WSAPI/WSAPIAvatars.d.ts +78 -0
- package/dist/WSAPI/WSAPIBase.d.ts +71 -0
- package/dist/WSAPI/WSAPIBonuses.d.ts +26 -0
- package/dist/WSAPI/WSAPIClans.d.ts +388 -0
- package/dist/WSAPI/WSAPIGamePick.d.ts +308 -0
- package/dist/WSAPI/WSAPIGeneral.d.ts +30 -0
- package/dist/WSAPI/WSAPIInbox.d.ts +126 -0
- package/dist/WSAPI/WSAPIJackpots.d.ts +109 -0
- package/dist/WSAPI/WSAPILeaderBoard.d.ts +25 -0
- package/dist/WSAPI/WSAPIMiniGames.d.ts +94 -0
- package/dist/WSAPI/WSAPIMissions.d.ts +517 -0
- package/dist/WSAPI/WSAPIRaffles.d.ts +119 -0
- package/dist/WSAPI/WSAPIStore.d.ts +656 -0
- package/dist/WSAPI/WSAPITournaments.d.ts +501 -0
- package/dist/WSAPI/WSAPITypes.d.ts +145 -85
- package/dist/WSAPI/WSAPIUser.d.ts +383 -0
- package/dist/index.js +3818 -1528
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +3180 -981
- package/dist/index.modern.mjs.map +1 -1
- package/docs/api/README.md +56 -2
- package/docs/api/classes/WSAPIAvatars.md +116 -0
- package/docs/api/classes/WSAPIBonuses.md +50 -0
- package/docs/api/classes/WSAPIClans.md +66 -0
- package/docs/api/classes/WSAPIGamePick.md +181 -0
- package/docs/api/classes/WSAPIGeneral.md +63 -0
- package/docs/api/classes/WSAPIInbox.md +277 -0
- package/docs/api/classes/WSAPIJackpots.md +185 -0
- package/docs/api/classes/WSAPILeaderBoard.md +39 -0
- package/docs/api/classes/WSAPIMiniGames.md +175 -0
- package/docs/api/classes/WSAPIMissions.md +611 -0
- package/docs/api/classes/WSAPIRaffles.md +195 -0
- package/docs/api/classes/WSAPIStore.md +744 -0
- package/docs/api/classes/WSAPITournaments.md +104 -0
- package/docs/api/classes/WSAPIUser.md +200 -0
- package/docs/api/enumerations/AchievementClaimPeriodTypeId.md +13 -0
- package/docs/api/enumerations/BuyStoreItemErrorCode.md +32 -0
- package/docs/api/interfaces/ClanPrizePublicMeta.md +41 -0
- package/docs/api/interfaces/ClanPrizeStructureEntry.md +7 -1
- package/docs/api/interfaces/ClanPublicMeta.md +4 -0
- package/docs/api/interfaces/SAWTemplateUI.md +10 -0
- package/docs/api/interfaces/TAchCategory.md +19 -4
- package/docs/api/interfaces/TBuyStoreItemResult.md +26 -8
- package/docs/api/interfaces/TMissionClaimRewardResult.md +14 -3
- package/docs/api/interfaces/TMissionOptInResult.md +10 -3
- package/docs/api/interfaces/TMissionOrBadge.md +6 -2
- package/docs/api/interfaces/TStoreItem.md +21 -1
- package/docs/api/interfaces/TTournamentDetailed.md +8 -0
- package/docs/api/interfaces/UserAchievement.md +1 -1
- package/docs/ui/clans/UIGuide_getClanInfo.md +153 -0
- package/docs/ui/clans/UIGuide_getClans.md +172 -0
- package/docs/ui/clans/UIGuide_joinClan.md +196 -0
- package/docs/ui/missions/UIGuide_getAchCategories.md +17 -0
- package/docs/ui/missions/UIGuide_getBadges.md +237 -0
- package/docs/ui/missions/UIGuide_getMissions.md +268 -0
- package/docs/ui/missions/UIGuide_requestMissionClaimReward.md +21 -0
- package/docs/ui/missions/UIGuide_requestMissionOptIn.md +16 -0
- package/docs/ui/store/UIGuide_buyStoreItem.md +133 -0
- package/docs/ui/store/UIGuide_getStoreCategories.md +19 -0
- package/docs/ui/store/UIGuide_getStoreItems.md +264 -0
- package/docs/ui/store/UIGuide_getStorePurchasedItems.md +122 -0
- package/docs/ui/tournaments/UIGuide_getClanTournamentPlayers.md +140 -0
- package/docs/ui/tournaments/UIGuide_getTournamentInstanceInfo.md +265 -0
- package/docs/ui/tournaments/UIGuide_getTournamentsList.md +236 -0
- package/docs/ui/tournaments/UIGuide_registerInTournament.md +156 -0
- package/docs/ui/user/UIGuide_getLevels.md +162 -0
- package/docs/ui/user/UIGuide_getUserProfile.md +213 -0
- package/package.json +3 -3
- package/scripts/postdoc-cleanup.js +195 -0
- package/src/Missions/MissionsUtils.ts +5 -2
- package/src/Store/BuyStoreItemErrorCode.ts +8 -0
- package/src/Store/StoreItem.ts +1 -0
- package/src/Store/StoreItemPurchased.ts +1 -0
- package/src/Store/StoreItemType.ts +1 -1
- package/src/Tournaments/TournamentRegistrationError.ts +4 -0
- package/src/WSAPI/WSAPI.ts +27 -2007
- package/src/WSAPI/WSAPIAvatars.ts +127 -0
- package/src/WSAPI/WSAPIBase.ts +93 -0
- package/src/WSAPI/WSAPIBonuses.ts +54 -0
- package/src/WSAPI/WSAPIClans.ts +417 -0
- package/src/WSAPI/WSAPIGamePick.ts +382 -0
- package/src/WSAPI/WSAPIGeneral.ts +57 -0
- package/src/WSAPI/WSAPIInbox.ts +222 -0
- package/src/WSAPI/WSAPIJackpots.ts +212 -0
- package/src/WSAPI/WSAPILeaderBoard.ts +40 -0
- package/src/WSAPI/WSAPIMiniGames.ts +181 -0
- package/src/WSAPI/WSAPIMissions.ts +572 -0
- package/src/WSAPI/WSAPIRaffles.ts +175 -0
- package/src/WSAPI/WSAPIStore.ts +732 -0
- package/src/WSAPI/WSAPITournaments.ts +541 -0
- package/src/WSAPI/WSAPITypes.ts +145 -87
- package/src/WSAPI/WSAPIUser.ts +456 -0
- package/tsconfig.json +17 -1
- package/docs/api/classes/WSAPI.md +0 -1927
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.modern.mjs","sources":["../src/Base/ClassId.ts","../src/IntUtils.ts","../src/MiniGames/SAWBuyInType.ts","../src/MiniGames/SAWUtils.ts","../src/MiniGames/SAWAcknowledgeType.ts","../src/MiniGames/SAWAskForUsername.ts","../src/MiniGames/SAWGameType.ts","../src/MiniGames/SAWExposeUserSpinId.ts","../src/MiniGames/SAWGameLayout.ts","../src/MiniGames/SAWPrizeType.ts","../src/MiniGames/SAWGetTemplatesResponse.ts","../src/MiniGames/SAWSpinErrorCode.ts","../src/MiniGames/SAWWinSoundType.ts","../src/MiniGames/SAWWinningHistoryResponse.ts","../src/MiniGames/PrizeModifiers.ts","../src/MiniGames/SAWWheelLayout.ts","../src/MiniGames/SAWGameDifficulty.ts","../src/MiniGames/AttemptPeriodType.ts","../src/NodeCache.ts","../src/OCache.ts","../src/Core/ActivityTypeLimited.ts","../src/Core/CoreUtils.ts","../src/Core/PublicLabelSettings.ts","../src/Core/TranslationArea.ts","../src/Inbox/GetInboxMessagesResponse.ts","../src/Inbox/InboxMessage.ts","../src/Inbox/InboxMessageType.ts","../src/Inbox/OpenLinksType.ts","../src/Inbox/InboxCategories.ts","../src/Inbox/InboxReadStatus.ts","../src/Store/BuyStoreItemErrorCode.ts","../src/Store/StoreCategory.ts","../src/Store/StoreItemPurchaseType.ts","../src/Store/StoreItemType.ts","../src/Store/StoreItem.ts","../src/Store/StoreItemPurchased.ts","../src/Missions/AchievementStatus.ts","../src/Missions/AchievementTaskType.ts","../src/Missions/AchievementType.ts","../src/Missions/AchievementAvailabilityStatus.ts","../src/Missions/BadgesTimeLimitStates.ts","../src/Missions/MissionsUtils.ts","../src/Missions/UserAchievement.ts","../src/Missions/ScheduledMissionType.ts","../src/Missions/AchievementCategory.ts","../src/Missions/MissionCategory.ts","../src/Missions/AchievementClaimTypeId.ts","../src/Tournaments/GetClanTournamentPlayersResponse.ts","../src/Tournaments/TournamentRegistrationType.ts","../src/Tournaments/TournamentRegistrationStatus.ts","../src/Tournaments/TournamentInstanceStatus.ts","../src/Tournaments/TournamentUtils.ts","../src/Tournaments/Tournament.ts","../src/Tournaments/GetTournamentInfoResponse.ts","../src/Tournaments/TournamentRegistrationError.ts","../src/Tournaments/TournamentType.ts","../src/Leaderboard/LeaderBoardPeriodType.ts","../src/Leaderboard/LeaderBoards.ts","../src/Level/GetLevelMapResponse.ts","../src/Raffle/GetRafflesResponse.ts","../src/Raffle/GetDrawRunResponse.ts","../src/Raffle/Raffle.ts","../src/Raffle/RaffleDraw.ts","../src/Raffle/GetRaffleDrawRunsHistoryResponse.ts","../src/Raffle/RaffleClaimPrizeResponse.ts","../src/WSAPI/WSAPI.ts","../src/CustomSections/AchCustomSection.ts","../src/CustomSections/UICustomSection.ts","../src/Bonuses/Bonus.ts","../src/Bonuses/BonusStatus.ts","../src/ActivityLog/UserBalanceType.ts","../src/ActivityLog/GetActivityLogResponse.ts","../src/ActivityLog/PointChangeSourceType.ts","../src/Avatars/GetAvatarsListResponse.ts","../src/Avatars/GetAvatarsCustomizedResponse.ts","../src/Avatars/GetAvatarPromptsResponse.ts","../src/Jackpots/GetJackpotWinnersResponse.ts","../src/Jackpots/GetJackpotEligibleGamesResponse.ts","../src/SmarticoAPI.ts","../src/CookieStore.ts","../src/Analytics/AnalyticStoreData.ts","../src/Quiz/SportTypes.ts","../src/Quiz/MarketsType.ts","../src/Quiz/MarketsAnswers.ts","../src/Quiz/MarketsInfo.ts","../src/Quiz/MarketsPerSport.ts","../src/Jackpots/JackpotContributionType.ts","../src/Jackpots/JackpotPot.ts","../src/Jackpots/JackpotType.ts","../src/Avatars/AvatarCustomizeErrorCode.ts","../src/Clans/JoinClanErrorCode.ts"],"sourcesContent":["export enum ClassId {\n\tPING = 1,\n\tPONG = 2,\n\n\tINIT = 3,\n\tINIT_RESPONSE = 4,\n\tIDENTIFY = 5,\n\tIDENTIFY_RESPONSE = 6,\n\tLOGIN = 7,\n\tLOGOUT = 8,\n\tEVENT = 9,\n\tEVENT_RESPONSE = 10,\n\n\tLOGIN_RESPONSE = 11,\n\tLOGOUT_RESPONSE = 12,\n\n\tGET_TRANSLATIONS_REQUEST = 13,\n\tGET_TRANSLATIONS_RESPONSE = 14,\n\n\t/*\n !Important, if adding new messages that are 'acting' on behalf of the client,\n you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION\n */\n\n\tCLIENT_ENGAGEMENT_IMPRESSION_REQUEST = 103,\n\tCLIENT_ENGAGEMENT_ACTION_REQUEST = 104,\n\tCLIENT_EXECUTE_DEEPLINK_EVENT = 105,\n\tCLIENT_ENGAGEMENT_FAILED_REQUEST = 106,\n\tCLIENT_EXECUTE_JS_EVENT = 107,\n\tCLIENT_PUBLIC_PROPERTIES_CHANGED_EVENT = 108,\n\tCLIENT_ENGAGEMENT_EVENT_NEW = 110,\n\n\tCLIENT_TRACK_ACTIVITY_REQUEST = 155,\n\tCLIENT_SET_AVATAR_REQUEST = 157,\n\tCLIENT_SET_AVATAR_RESPONSE = 158,\n\n\tCLIENT_SET_CUSTOM_USERNAME_REQUEST = 159,\n\tCLIENT_SET_CUSTOM_USERNAME_RESPONSE = 160,\n\n\tCHECK_SEGMENT_MATCH_REQUEST = 161,\n\tCHECK_SEGMENT_MATCH_RESPONSE = 162,\n\n\t/*\n !Important, if adding new messages that are 'acting' on behalf of the client,\n you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION\n */\n\n\t// 500-1000 - Achievements\n\tGET_LEVEL_MAP_REQUEST = 500,\n\tGET_LEVEL_MAP_RESPONSE = 501,\n\tGET_ACHIEVEMENT_MAP_REQUEST = 502,\n\tGET_ACHIEVEMENT_MAP_RESPONSE = 503,\n\tRELOAD_ACHIEVEMENTS_EVENT = 504,\n\tGET_LEADERS_BOARD_REQUEST = 505,\n\tGET_LEADERS_BOARD_RESPONSE = 506,\n\tGET_SHOP_ITEMS_REQUEST = 509,\n\tGET_SHOP_ITEMS_RESPONSE = 510,\n\tBUY_SHOP_ITEM_REQUEST = 511,\n\tBUY_SHOP_ITEM_RESPONSE = 512,\n\tGET_INBOX_MESSAGES_REQUEST = 513,\n\tGET_INBOX_MESSAGES_RESPONSE = 514,\n\tGET_SHOP_CATEGORIES_REQUEST = 515,\n\tGET_SHOP_CATEGORIES_RESPONSE = 516,\n\tGET_TOURNAMENT_LOBBY_REQUEST = 517,\n\tGET_TOURNAMENT_LOBBY_RESPONSE = 518,\n\tGET_TOURNAMENT_INFO_REQUEST = 519,\n\tGET_TOURNAMENT_INFO_RESPONSE = 520,\n\tTOURNAMENT_REGISTER_REQUEST = 521,\n\tTOURNAMENT_REGISTER_RESPONSE = 522,\n\tGET_CUSTOM_SECTIONS_REQUEST = 523,\n\tGET_CUSTOM_SECTIONS_RESPONSE = 524,\n\tMISSION_OPTIN_REQUEST = 525,\n\tMISSION_OPTIN_RESPONSE = 526,\n\n\t/*\n !Important, if adding new messages that are 'acting' on behalf of the client,\n you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION\n */\n\n\tGET_ACHIEVEMENT_USER_REQUEST = 527,\n\tGET_ACHIEVEMENT_USER_RESPONSE = 528,\n\n\tMARK_INBOX_READ_REQUEST = 529,\n\tMARK_INBOX_READ_RESPONSE = 530,\n\tMARK_INBOX_STARRED_REQUEST = 531,\n\tMARK_INBOX_STARRED_RESPONSE = 532,\n\tMARK_INBOX_DELETED_REQUEST = 535,\n\tMARK_INBOX_DELETED_RESPONSE = 536,\n\n\tGET_ACH_CATEGORIES_REQUEST = 537,\n\tGET_ACH_CATEGORIES_RESPONSE = 538,\n\n\tACHIEVEMENT_CLAIM_PRIZE_REQUEST = 539,\n\tACHIEVEMENT_CLAIM_PRIZE_RESPONSE = 540,\n\n\tACH_SHOP_ITEM_HISTORY_REQUEST = 541,\n\tACH_SHOP_ITEM_HISTORY_RESPONSE = 542,\n\n\tGET_RELATED_ACH_N_TOURNAMENTS_REQUEST = 543,\n\tGET_RELATED_ACH_N_TOURNAMENTS_RESPONSE = 544,\n\n\tGET_POINT_HISTORY_REQUEST = 545,\n\tGET_POINT_HISTORY_RESPONSE = 546,\n\n\tGET_AVATARS_LIST_REQUEST = 560,\n\tGET_AVATARS_LIST_RESPONSE = 561,\n\tGET_AVATARS_CUSTOMIZED_REQUEST = 562,\n\tGET_AVATARS_CUSTOMIZED_RESPONSE = 563,\n\tGET_AVATAR_PROMPTS_REQUEST = 564,\n\tGET_AVATAR_PROMPTS_RESPONSE = 565,\n\n\tGET_CLAN_LIST_REQUEST = 570,\n\tGET_CLAN_LIST_RESPONSE = 571,\n\n\tGET_CLAN_INFO_REQUEST = 572,\n\tGET_CLAN_INFO_RESPONSE = 573,\n\n\tJOIN_CLAN_REQUEST = 574,\n\tJOIN_CLAN_RESPONSE = 575,\n\n\tGET_CLAN_TOURNAMENT_PLAYERS_REQUEST = 576,\n\tGET_CLAN_TOURNAMENT_PLAYERS_RESPONSE = 577,\n\n\t/*\n !Important, if adding new messages that are 'acting' on behalf of the client,\n you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION\n */\n\n\tGET_BONUSES_REQUEST = 600,\n\tGET_BONUSES_RESPONSE = 601,\n\tCLAIM_BONUS_REQUEST = 602,\n\tCLAIM_BONUS_RESPONSE = 603,\n\n\tSAW_GET_SPINS_REQUEST = 700,\n\tSAW_GET_SPINS_RESPONSE = 701,\n\tSAW_DO_SPIN_REQUEST = 702,\n\tSAW_DO_SPIN_RESPONSE = 703,\n\tSAW_AKNOWLEDGE_REQUEST = 704,\n\tSAW_AKNOWLEDGE_RESPONSE = 705,\n\tSAW_SPINS_COUNT_PUSH = 706,\n\tSAW_SHOW_SPIN_PUSH = 707,\n\tSAW_PRIZE_DROP_WIN_PUSH = 708,\n\tSAW_PRIZE_DROP_WIN_AKNOWLEDGE_REQUEST = 709,\n\tSAW_PRIZE_DROP_WIN_AKNOWLEDGE_RESPONSE = 710,\n\tSAW_AKNOWLEDGE_SPIN_PUSH = 711,\n\tSAW_DO_SPIN_BATCH_REQUEST = 712,\n\tSAW_DO_SPIN_BATCH_RESPONSE = 713,\n\tSAW_AKNOWLEDGE_BATCH_REQUEST = 714,\n\tSAW_AKNOWLEDGE_BATCH_RESPONSE = 715,\n\n\tGET_SAW_HISTORY_REQUEST = 716,\n\tGET_SAW_HISTORY_RESPONSE = 717,\n\n\t/*\n !Important, if adding new messages that are 'acting' on behalf of the client,\n you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION\n */\n\n\tJP_GET_JACKPOTS_REQUEST = 800,\n\tJP_GET_JACKPOTS_RESPONSE = 801,\n\n\tJP_GET_LATEST_POTS_REQUEST = 802,\n\tJP_GET_LATEST_POTS_RESPONSE = 803,\n\n\tJP_OPTIN_REQUEST = 804,\n\tJP_OPTIN_RESPONSE = 805,\n\n\tJP_OPTOUT_REQUEST = 806,\n\tJP_OPTOUT_RESPONSE = 807,\n\n\tJP_WIN_PUSH = 808,\n\tJP_GET_WINNERS_REQUEST = 809,\n\tJP_GET_WINNERS_RESPONSE = 810,\n\n\tJP_GET_ELIGIBLE_GAMES_REQUEST = 811,\n\tJP_GET_ELIGIBLE_GAMES_RESPONSE = 812,\n\n\tRAF_GET_RAFFLES_REQUEST = 902,\n\tRAF_GET_RAFFLES_RESPONSE = 903,\n\tRAF_GET_DRAW_RUN_REQUEST = 904,\n\tRAF_GET_DRAW_RUN_RESPONSE = 905,\n\tRAF_GET_DRAW_HISTORY_REQUEST = 906,\n\tRAF_GET_DRAW_HISTORY_RESPONSE = 907,\n\tRAF_CLAIM_PRIZE_REQUEST = 908,\n\tRAF_CLAIM_PRIZE_RESPONSE = 909,\n\tRAF_OPTIN_REQUEST = 916,\n\tRAF_OPTIN_RESPONSE = 917,\n\t/*\n\tRAF_GET_TICKETS_REQUEST = 902,\n\tRAF_GET_TICKETS_RESPONSE = 903,\n\n\tRAF_CLAIM_PRIZE_REQUEST = 906,\n\t*/\n\n\tBNR_GET_BANNER_PLACEMENTS_REQUEST = 950,\n\tBNR_GET_BANNER_PLACEMENTS_RESPONSE = 951,\n\tBNR_GET_BANNER_CONTENT_REQUEST = 952,\n\tBNR_GET_BANNER_CONTENT_RESPONSE = 953,\n\n\t/*\n !Important, if adding new messages that are 'acting' on behalf of the client,\n you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION\n */\n\n\tREGISTER_PUSH_NOTIFICATIONS_TOKEN_REQ = 1003,\n\tREGISTER_PUSH_NOTIFICATIONS_TOKEN_RESP = 2003,\n\n\tCLIENT_DEBUG_REQUEST = 77777,\n\n\t/*\n !Important, if adding new messages that are 'acting' on behalf of the client,\n you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION\n */\n\n\tUNSUPPORTED_COMMAND = 99999,\n}\n","class IntUtils {\n\tpublic static uuid(): string {\n\t\tlet a: any;\n\t\tlet b: any;\n\t\tfor (\n\t\t\tb = a = '';\n\t\t\ta++ < 36;\n\t\t\tb += (a * 51) & 52 ? (a ^ 15 ? 8 ^ (Math.random() * (a ^ 20 ? 16 : 4)) : 4).toString(16) : '-'\n\t\t) {}\n\t\treturn b;\n\t}\n\n\tpublic static isNotNull(val: any): boolean {\n\t\treturn typeof val !== 'undefined' && val !== null;\n\t}\n\n\tpublic static isNotEmpty(val: string): boolean {\n\t\treturn typeof val !== 'undefined' && val !== null && val.length > 0;\n\t}\n\n\tpublic static replaceAll(value: string, regex: string, replacement: string | number): string {\n\t\tif (IntUtils.isNotNull(value)) {\n\t\t\treturn value.replace(new RegExp(IntUtils.escapeRegExp(regex), 'g'), replacement?.toString());\n\t\t}\n\t\treturn value;\n\t}\n\n\tpublic static escapeRegExp(v: string): string {\n\t\tif (IntUtils.isNotEmpty(v)) {\n\t\t\treturn v.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n\t\t}\n\t\treturn v;\n\t}\n\n\tpublic static JsonOrText = (str: string): any => {\n\t\tif (str && str.includes && (str.includes('{') || str.includes('['))) {\n\t\t\ttry {\n\t\t\t\treturn JSON.parse(str);\n\t\t\t} catch (e) {\n\t\t\t\treturn str;\n\t\t\t}\n\t\t}\n\t\treturn str || {};\n\t};\n\n\t// public static wsTimeToEpoch = (time: string): number => {\n\t// if (time) {\n\t// return moment.utc(time, \"DD/MM/YYYY HH:mm:ss\").valueOf()\n\t// } else {\n\t// return null\n\t// }\n\t// }\n\n\tpublic static isWithinPeriod = (timestamp: number, period: 'today' | 'thisWeek' | 'thisMonth'): boolean => {\n\t\tconst now = new Date();\n\t\tconst completedDate = new Date(timestamp);\n\n\t\tswitch (period) {\n\t\t\tcase 'today':\n\t\t\t\treturn (\n\t\t\t\t\tnow.getFullYear() === completedDate.getFullYear() &&\n\t\t\t\t\tnow.getMonth() === completedDate.getMonth() &&\n\t\t\t\t\tnow.getDate() === completedDate.getDate()\n\t\t\t\t);\n\t\t\tcase 'thisWeek':\n\t\t\t\tconst startOfWeek = new Date(now);\n\t\t\t\tstartOfWeek.setDate(now.getDate() - now.getDay());\n\t\t\t\tstartOfWeek.setHours(0, 0, 0, 0);\n\n\t\t\t\tconst endOfWeek = new Date(startOfWeek);\n\t\t\t\tendOfWeek.setDate(startOfWeek.getDate() + 6);\n\t\t\t\tendOfWeek.setHours(23, 59, 59, 999);\n\n\t\t\t\treturn completedDate >= startOfWeek && completedDate <= endOfWeek;\n\t\t\tcase 'thisMonth':\n\t\t\t\treturn now.getFullYear() === completedDate.getFullYear() && now.getMonth() === completedDate.getMonth();\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t};\n}\n\nexport { IntUtils };\n","export enum SAWBuyInType {\n\tFree = 1,\n\tPoints = 2,\n\tSpins = 3,\n\tGems = 4,\n\tDiamonds = 5,\n}\n\nexport enum SAWBuyInTypeName {\n\tFree = 'free',\n\tPoints = 'points',\n\tSpins = 'spins',\n\tUnknown = 'unknown',\n\tGems = 'gems',\n\tDiamonds = 'diamonds',\n}\n\n/** @hidden */\nexport const SAWBuyInTypeNamed = (type: SAWBuyInType): SAWBuyInTypeName => {\n\treturn (\n\t\t{\n\t\t\t[SAWBuyInType.Free]: SAWBuyInTypeName.Free,\n\t\t\t[SAWBuyInType.Points]: SAWBuyInTypeName.Points,\n\t\t\t[SAWBuyInType.Spins]: SAWBuyInTypeName.Spins,\n\t\t\t[SAWBuyInType.Gems]: SAWBuyInTypeName.Gems,\n\t\t\t[SAWBuyInType.Diamonds]: SAWBuyInTypeName.Diamonds,\n\t\t}[type] || SAWBuyInTypeName.Unknown\n\t);\n};\n","import { SAWBuyInType } from './SAWBuyInType';\nimport { SAWTemplate } from './SAWTemplate';\n\nclass SAWUtils {\n\tpublic static canPlay = (t: SAWTemplate, user_balances: {ach_points_balance: number, ach_gems_balance: number, ach_diamonds_balance: number}): boolean => {\n\t\tif (t === null || t === undefined) {\n\t\t\treturn false;\n\t\t}\n\n\t\tswitch (t.saw_buyin_type_id) {\n\t\t\tcase SAWBuyInType.Free: {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcase SAWBuyInType.Spins: {\n\t\t\t\treturn t.spin_count !== null && t.spin_count > 0;\n\t\t\t}\n\t\t\tcase SAWBuyInType.Points:\n\t\t\tcase SAWBuyInType.Gems:\n\t\t\tcase SAWBuyInType.Diamonds: {\n\t\t\t\tlet balance = user_balances.ach_points_balance;\n\t\t\t\tif (t.saw_buyin_type_id === SAWBuyInType.Gems) {\n\t\t\t\t\tbalance = user_balances.ach_gems_balance;\n\t\t\t\t} else if (t.saw_buyin_type_id === SAWBuyInType.Diamonds) {\n\t\t\t\t\tbalance = user_balances.ach_diamonds_balance;\n\t\t\t\t}\n\t\t\t\treturn t.buyin_cost_points <= balance;\n\t\t\t}\n\t\t\t\n\t\t\tdefault: {\n\t\t\t\tconsole.error('MiniGamesUtils.canPlay: Unknwon SAW buyin type ' + t.saw_buyin_type_id);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t};\n}\n\nexport { SAWUtils };\n","export enum SAWAcknowledgeType {\n\tSilent = 1,\n\tQuickMessage = 2,\n\tFullMessage = 3,\n\tExplicityAcknowledge = 4\n}\n\nexport enum SAWAcknowledgeTypeName {\n\tSilent = 'silent',\n\tQuickMessage = 'quick-message',\n\tFullMessage = 'full-message',\n\tExplicityAcknowledge = 'explicity-acknowledge'\n}\n\n/** @hidden */\nexport const SAWAcknowledgeTypeNamed = (type: SAWAcknowledgeType): SAWAcknowledgeTypeName => {\n\treturn (\n\t\t{\n\t\t\t[SAWAcknowledgeType.Silent]: SAWAcknowledgeTypeName.Silent,\n\t\t\t[SAWAcknowledgeType.QuickMessage]: SAWAcknowledgeTypeName.QuickMessage,\n\t\t\t[SAWAcknowledgeType.FullMessage]: SAWAcknowledgeTypeName.FullMessage,\n\t\t\t[SAWAcknowledgeType.ExplicityAcknowledge]: SAWAcknowledgeTypeName.ExplicityAcknowledge\n\t\t}[type]\n\t);\n};\n","export enum SAWAskForUsername {\n\tNOASK = 'no-ask',\n\tONSUMBIT = 'on-submit',\n}\n","export enum SAWGameType {\n\tSpinAWheel = 1,\n\tScratchCard = 2,\n\tMatchX = 3,\n\tGiftBox = 4,\n\tPrizeDrop = 5,\n\tQuiz = 6,\n\tLootboxWeekdays = 7,\n\tLootboxCalendarDays = 8,\n\tTreasureHunt = 9,\n\tVoyager = 10,\n\tPlinko = 11,\n\tCoinFlip = 12,\n}\n\nexport enum SAWGameTypeName {\n\tSpinAWheel = 'wheel',\n\tScratchCard = 'scratch',\n\tMatchX = 'matchx',\n\tGiftBox = 'giftbox',\n\tPrizeDrop = 'prizedrop',\n\tQuiz = 'quiz',\n\tLootboxWeekdays = 'lootbox_weekdays',\n\tLootboxCalendarDays = 'lootbox_calendar_days',\n\tTreasureHunt = 'treasure_hunt',\n\tVoyager = 'voyager',\n\tPlinko = 'plinko',\n\tCoinFlip = 'coin_flip',\n\tUnknown = 'unknown',\n}\n\n/** @hidden */\nexport const SAWGameTypeNamed = (type: SAWGameType): SAWGameTypeName => {\n\treturn (\n\t\t{\n\t\t\t[SAWGameType.SpinAWheel]: SAWGameTypeName.SpinAWheel,\n\t\t\t[SAWGameType.ScratchCard]: SAWGameTypeName.ScratchCard,\n\t\t\t[SAWGameType.MatchX]: SAWGameTypeName.MatchX,\n\t\t\t[SAWGameType.GiftBox]: SAWGameTypeName.GiftBox,\n\t\t\t[SAWGameType.PrizeDrop]: SAWGameTypeName.PrizeDrop,\n\t\t\t[SAWGameType.Quiz]: SAWGameTypeName.Quiz,\n\t\t\t[SAWGameType.LootboxWeekdays]: SAWGameTypeName.LootboxWeekdays,\n\t\t\t[SAWGameType.LootboxCalendarDays]: SAWGameTypeName.LootboxCalendarDays,\n\t\t\t[SAWGameType.TreasureHunt]: SAWGameTypeName.TreasureHunt,\n\t\t\t[SAWGameType.Voyager]: SAWGameTypeName.Voyager,\n\t\t\t[SAWGameType.Plinko]: SAWGameTypeName.Plinko,\n\t\t\t[SAWGameType.CoinFlip]: SAWGameTypeName.CoinFlip,\n\t\t}[type] || SAWGameTypeName.Unknown\n\t);\n};\n","export enum SAWExposeUserSpinId {\n UserId = 1,\n SpinId = 2,\n}\n\nexport enum SAWExposeUserSpinIdName {\n UserId = 'userId',\n SpinId = 'spinId',\n}\n\n/** @hidden */\nexport const SAWExposeUserSpinIdNamed = (id: SAWExposeUserSpinId): SAWExposeUserSpinIdName => {\n return (\n {\n [SAWExposeUserSpinId.UserId]: SAWExposeUserSpinIdName.UserId,\n [SAWExposeUserSpinId.SpinId]: SAWExposeUserSpinIdName.SpinId,\n }[id]\n );\n};","export enum SAWGameLayout {\n Horizontal = 1,\n VerticalMap = 2,\n}\n\nexport enum SAWGameLayoutName {\n Horizontal = 'horizontal',\n VerticalMap = 'vertical-map',\n}\n\n/** @hidden */\nexport const SAWGameLayoutNamed = (layout: SAWGameLayout): SAWGameLayoutName => {\n return (\n {\n [SAWGameLayout.Horizontal]: SAWGameLayoutName.Horizontal,\n [SAWGameLayout.VerticalMap]: SAWGameLayoutName.VerticalMap,\n }[layout]\n );\n};","export enum SAWPrizeType {\n\tNO_PRIZE = 1,\n\tPOINTS = 2,\n\tBONUS = 3,\n\tMANUAL = 4,\n\tSPIN = 5,\n\tJACKPOT = 6,\n\tCHANGE_LEVEL = 7,\n\tMISSION = 8,\n\tRAFFLE_TICKET = 9,\n\tGEMS_AND_DIAMONDS = 10,\n}\n\nexport enum MiniGamePrizeTypeName {\n\tNO_PRIZE = 'no-prize',\n\tPOINTS = 'points',\n\tBONUS = 'bonus',\n\tMANUAL = 'manual',\n\tSPIN = 'spin',\n\tJACKPOT = 'jackpot',\n\tCHANGE_LEVEL = 'change-level',\n\tMISSION = 'mission',\n\tRAFFLE_TICKET = 'raffle-ticket',\n\tGEMS_AND_DIAMONDS = 'gems-and-diamonds',\n\tUNKNOWN = 'unknown',\n}\n\n/** @hidden */\nexport const MiniGamePrizeTypeNamed = (type: SAWPrizeType): MiniGamePrizeTypeName => {\n\treturn (\n\t\t{\n\t\t\t[SAWPrizeType.NO_PRIZE]: MiniGamePrizeTypeName.NO_PRIZE,\n\t\t\t[SAWPrizeType.POINTS]: MiniGamePrizeTypeName.POINTS,\n\t\t\t[SAWPrizeType.BONUS]: MiniGamePrizeTypeName.BONUS,\n\t\t\t[SAWPrizeType.MANUAL]: MiniGamePrizeTypeName.MANUAL,\n\t\t\t[SAWPrizeType.SPIN]: MiniGamePrizeTypeName.SPIN,\n\t\t\t[SAWPrizeType.JACKPOT]: MiniGamePrizeTypeName.JACKPOT,\n\t\t\t[SAWPrizeType.CHANGE_LEVEL]: MiniGamePrizeTypeName.CHANGE_LEVEL,\n\t\t\t[SAWPrizeType.MISSION]: MiniGamePrizeTypeName.MISSION,\n\t\t\t[SAWPrizeType.RAFFLE_TICKET]: MiniGamePrizeTypeName.RAFFLE_TICKET,\n\t\t\t[SAWPrizeType.GEMS_AND_DIAMONDS]: MiniGamePrizeTypeName.GEMS_AND_DIAMONDS,\n\t\t}[type] || MiniGamePrizeTypeName.UNKNOWN\n\t);\n};\n","import { IntUtils } from '../IntUtils';\nimport { TMiniGamePrize, TMiniGameTemplate } from '../WSAPI/WSAPITypes';\nimport { ProtocolResponse } from './../Base/ProtocolResponse';\nimport { SAWAcknowledgeTypeNamed } from './SAWAcknowledgeType';\nimport { SAWBuyInType, SAWBuyInTypeNamed } from './SAWBuyInType';\nimport { SAWExposeUserSpinIdNamed } from './SAWExposeUserSpinId';\nimport { SAWGameLayoutNamed } from './SAWGameLayout';\nimport { SAWGameType, SAWGameTypeNamed } from './SAWGameType';\nimport { MiniGamePrizeTypeNamed } from './SAWPrizeType';\nimport { SAWTemplate } from './SAWTemplate';\n\nexport interface SAWGetTemplatesResponse extends ProtocolResponse {\n\ttemplates: SAWTemplate[];\n}\n\nexport const SAWTemplatesTransform = (items: SAWTemplate[]): TMiniGameTemplate[] => {\n\treturn items.map((r) => {\n\t\tconst x: TMiniGameTemplate = {\n\t\t\tid: r.saw_template_id,\n\t\t\tname: r.saw_template_ui_definition.name,\n\t\t\tdescription: r.saw_template_ui_definition.description,\n\t\t\tthumbnail: r.saw_template_ui_definition.thumbnail\n\t\t\t? r.saw_template_ui_definition.thumbnail\n\t\t\t: r.saw_skin_ui_definition?.skin_folder\n\t\t\t\t? `${r.saw_skin_ui_definition.skin_folder}/ico.png`\n\t\t\t\t: `https://d312ucx3huj7iy.cloudfront.net/gf/images/saw/${r.saw_skin_key}/ico.png`,\n\t\t\tvisibile_when_can_spin: r.visibile_when_can_spin,\n\t\t\tover_limit_message: r.saw_template_ui_definition.over_limit_message,\n\t\t\tno_attempts_message: r.saw_template_ui_definition.no_attempts_message,\n\t\t\tjackpot_symbol: r.saw_template_ui_definition.jackpot_symbol,\n\t\t\tsaw_game_type: SAWGameTypeNamed(r.saw_game_type_id),\n\t\t\tsaw_buyin_type: SAWBuyInTypeNamed(r.saw_buyin_type_id),\n\t\t\t...(r.saw_buyin_type_id === SAWBuyInType.Points ? { buyin_cost_points: r.buyin_cost_points } : {}),\n\t\t\t...(r.saw_buyin_type_id === SAWBuyInType.Gems ? { buyin_cost_gems: r.buyin_cost_points } : {}),\n\t\t\t...(r.saw_buyin_type_id === SAWBuyInType.Diamonds ? { buyin_cost_diamonds: r.buyin_cost_points } : {}),\n\t\t\tjackpot_add_on_attempt: r.jackpot_add_on_attempt,\n\t\t\tjackpot_current: r.jackpot_current,\n\t\t\tspin_count: r.spin_count,\n\t\t\tpromo_image: r.saw_template_ui_definition.promo_image,\n\t\t\tpromo_text: r.saw_template_ui_definition.promo_text,\n\t\t\tcustom_data: IntUtils.JsonOrText(r.saw_template_ui_definition.custom_data),\n\t\t\texpose_game_stat_on_api: r.expose_game_stat_on_api,\n\t\t\trelative_period_timezone: r.relative_period_timezone,\n\t\t\tactiveFromDate: r.activeFromDate,\n\t\t\tactiveTillDate: r.activeTillDate,\n\t\t\tnext_available_spin_ts: r.next_available_spin_ts,\n\t\t\tsteps_to_finish_game: r.saw_template_ui_definition.steps_to_finish_game,\n\t\t\tcustom_section_id: r.saw_template_ui_definition.custom_section_id,\n\t\t\tsaw_template_ui_definition: r.saw_template_ui_definition,\n\t\t\t...(r.saw_game_type_id === SAWGameType.LootboxCalendarDays || r.saw_game_type_id === SAWGameType.LootboxWeekdays\n\t\t\t\t? { game_layout: SAWGameLayoutNamed(r.saw_template_ui_definition.game_layout) }\n\t\t\t\t: {}\n\t\t\t),\n\t\t\tshow_prize_history: r.show_prize_history,\n\t\t\tmax_number_of_attempts: r.maxSpinsCount,\n\t\t\tmax_spins_period_ms: r.maxSpinsPediodMs,\n\t\t\t...(r.saw_template_ui_definition.expose_user_spin_id\n\t\t\t\t? { expose_user_spin_id: SAWExposeUserSpinIdNamed(r.saw_template_ui_definition.expose_user_spin_id) } \n\t\t\t\t: {}),\n\n\t\t\tprizes: r.prizes.map((p) => {\n\t\t\t\tconst y: TMiniGamePrize = {\n\t\t\t\t\tid: p.saw_prize_id,\n\t\t\t\t\tname: p.saw_prize_ui_definition.name,\n\t\t\t\t\tprize_type: MiniGamePrizeTypeNamed(p.prize_type_id),\n\t\t\t\t\tprize_value: p.prize_value,\n\t\t\t\t\tfont_size: p.saw_prize_ui_definition.font_size,\n\t\t\t\t\tfont_size_mobile: p.saw_prize_ui_definition.font_size_mobile,\n\t\t\t\t\ticon: p.saw_prize_ui_definition.icon,\n\t\t\t\t\tposition: p.saw_prize_ui_definition.position,\n\t\t\t\t\tsectors: p.saw_prize_ui_definition.sectors,\n\t\t\t\t\tacknowledge_type: SAWAcknowledgeTypeNamed(p.saw_prize_ui_definition.acknowledge_type),\n\t\t\t\t\taknowledge_message: p.saw_prize_ui_definition.aknowledge_message,\n\t\t\t\t\tacknowledge_dp: p.saw_prize_ui_definition.acknowledge_dp,\n\t\t\t\t\tacknowledge_action_title: p.saw_prize_ui_definition.acknowledge_action_title,\n\t\t\t\t\tacknowledge_dp_additional: p.saw_prize_ui_definition.acknowledge_dp_additional,\n\t\t\t\t\tacknowledge_action_title_additional: p.saw_prize_ui_definition.acknowledge_action_title_additional,\n\t\t\t\t\tout_of_stock_message: p.saw_prize_ui_definition.out_of_stock_message,\n\t\t\t\t\tpool: p.pool,\n\t\t\t\t\tpool_initial: p.pool_initial,\n\t\t\t\t\twins_count: p.wins_count,\n\t\t\t\t\tweekdays: p.weekdays,\n\t\t\t\t\tactive_from_ts: p.active_from_ts,\n\t\t\t\t\tactive_till_ts: p.active_till_ts,\n\t\t\t\t\trelative_period_timezone: p.relative_period_timezone,\n\t\t\t\t\tis_surcharge: p.is_surcharge,\n\t\t\t\t\tis_deleted: p.is_deleted,\n\t\t\t\t\tcustom_data: IntUtils.JsonOrText(p.saw_prize_ui_definition?.custom_data),\n\t\t\t\t\tprize_modifiers: p.saw_prize_ui_definition.prize_modifiers,\n\t\t\t\t\tallow_split_decimal: p.saw_prize_ui_definition.allow_split_decimal,\n\t\t\t\t\thide_prize_from_history: p.saw_prize_ui_definition.hide_prize_from_history,\n\t\t\t\t\trequirements_to_get_prize: p.saw_prize_ui_definition.requirements_to_get_prize,\n\t\t\t\t\tmax_give_period_type_id: p.max_give_period_type_id,\n\t\t\t\t};\n\t\t\t\treturn y;\n\t\t\t}),\n\t\t};\n\t\treturn x;\n\t});\n};\n","/*\n * Possible error codes for the mini-games attempts\n */\nexport enum SAWSpinErrorCode {\n\t/** No error */\n\tSAW_OK = 0,\n\t/** User doesn't have 'spin attempts' to play. In case buy in type for the game is 'spins' based */\n\tSAW_NO_SPINS = 40001,\n\t/** The are no prizes left to play the game */\n\tSAW_PRIZE_POOL_EMPTY = 40002,\n\t/** User doesn't have enough points to play. In case buy in type for the game is 'points' based */\n\tSAW_NOT_ENOUGH_POINTS = 40003,\n\t/** User reached max number of game attempts defined in the BackOffice */\n\tSAW_FAILED_MAX_SPINS_REACHED = 40004,\n\t/** User tries to play a template that is restricted by date */\n\tSAW_TEMPLATE_NOT_ACTIVE = 40007,\n\t/** Special code for the 'visitor' mode */\n\tSAW_VISITOR_STOP_SPIN_REQUEST = -40001,\n\t/** User is not in the segment */\n\tSAW_NOT_IN_SEGMENT = 40009,\n\t/** User doesn't have enough gems to play. In case buy in type for the game is 'gems' based */\n\tSAW_NO_BALANCE_GEMS = 40011,\n\t/** User doesn't have enough diamonds to play. In case buy in type for the game is 'diamonds' based */\n\tSAW_NO_BALANCE_DIAMONDS = 40012,\n}\n","export enum SAWWinSoundType {\n\tDisappointing = 1,\n\tPositive = 2,\n\tHighlyPositive = 3,\n\tNoSound = 4,\n\tCustom = 5,\n}\n\nexport const SAWWinSoundFiles = {\n\t[SAWWinSoundType.NoSound]: null,\n\t[SAWWinSoundType.Disappointing]: 'saw-disappointed.m4a',\n\t[SAWWinSoundType.Positive]: 'saw-positive.m4a',\n\t[SAWWinSoundType.HighlyPositive]: 'saw-highly-positive.m4a',\n};\n","import { ProtocolResponse } from \"../SmarticoLib\";\nimport { TSawHistory } from \"../WSAPI/WSAPITypes\";\nimport { SAWTemplate } from \"./SAWTemplate\";\n\nexport interface SAWWinningHistoryResponse extends ProtocolResponse {\n\tprizes: SAWPrizesHistory[];\n\thasMore: boolean;\n}\n\nexport interface SAWPrizesHistory {\n\ttemplate: SAWTemplate,\n\tsaw_template_id: number,\n\tsaw_prize_id: number,\n\tprize_amount: number,\n\tclient_request_id: string,\n\tis_claimed: boolean,\n\tcreate_date_ts: number;\n\tacknowledge_date_ts: number;\n}\n\nexport const SAWHistoryTransform = (items: SAWPrizesHistory[]): TSawHistory[] => {\n\treturn items.map((r) => {\n\t\tconst x: TSawHistory = {\n\t\t\ttemplate: r.template,\n\t\t\tsaw_template_id: r.saw_template_id,\n\t\t\tsaw_prize_id: r.saw_prize_id,\n\t\t\tprize_amount: r.prize_amount,\n\t\t\tclient_request_id: r.client_request_id,\n\t\t\tis_claimed: r.is_claimed,\n\t\t\tcreate_date_ts: r.create_date_ts,\n\t\t\tacknowledge_date_ts: r.acknowledge_date_ts,\n\t\t}\n\t\treturn x;\n\t})\n}\n\n","export enum PrizeModifiers {\n '2x' = 1,\n '5x' = 2,\n '10x' = 3,\n '/2' = 4,\n '/5' = 5,\n '/10' = 6,\n '0x' = 7,\n \"reset\" = 8,\n}\n\nexport const PrizeModifiersKeysNames = {\n [PrizeModifiers['2x']]: '2x',\n [PrizeModifiers['5x']]: '5x',\n [PrizeModifiers['10x']]: '10x',\n [PrizeModifiers['/2']]: '/2',\n [PrizeModifiers['/5']]: '/5',\n [PrizeModifiers['/10']]: '/10',\n [PrizeModifiers['0x']]: '0',\n [PrizeModifiers['reset']]: 'Reset to 0',\n};","export enum SAWWheelLayout {\n Centered = 1,\n LeftAligned = 2,\n RightAligned = 3,\n BottomAligned = 4,\n}","export enum SAWGameDifficultyType {\n\tEASY = 1,\n\tMEDIUM = 2,\n\tHARD = 3,\n}\n\nexport enum SAWGameDifficultyTypeName {\n\tEASY = 'easy',\n\tMEDIUM = 'medium',\n\tHARD = 'hard',\n}\n\n/** @hidden */\nexport const SawGameDifficultyTypeNamed = (type: SAWGameDifficultyType): SAWGameDifficultyTypeName => {\n\treturn (\n\t\t{\n\t\t\t[SAWGameDifficultyType.EASY]: SAWGameDifficultyTypeName.EASY,\n\t\t\t[SAWGameDifficultyType.MEDIUM]: SAWGameDifficultyTypeName.MEDIUM,\n\t\t\t[SAWGameDifficultyType.HARD]: SAWGameDifficultyTypeName.HARD,\n\t\t}[type]\n\t);\n};\n","export enum AttemptPeriodType {\n\tFromLastAttempt = 1,\n\tCalendarDaysUTC = 2,\n\tCalendarDaysUserTimeZone = 3,\n\tLifetime = 4,\n}","class NodeCache {\n\tprivate ttlChecker: NodeJS.Timeout;\n\n\tprivate cache: { [key: string]: any } = {};\n\n\tconstructor() {\t\t\n\t\tif (this.ttlChecker === undefined) {\n\t\t\tthis.ttlChecker = setInterval(() => {\n\t\t\t\tconst now = new Date().getTime();\n\t\t\t\tfor (const key in this.cache) {\n\t\t\t\t\tif (this.cache.hasOwnProperty(key)) {\n\t\t\t\t\t\tconst o = this.cache[key];\n\t\t\t\t\t\tif (o.ttl < now) {\n\t\t\t\t\t\t\tdelete this.cache[key];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, 1000);\n\t\t}\n\t}\n\n\tpublic get(key: string): any {\n\t\tconst o = this.cache[key];\n\t\tif (o !== undefined && o.ttl > new Date().getTime()) {\n\t\t\treturn o.value;\n\t\t}\n\t}\n\n\tpublic set(key: string, value: any, ttlSeconds: number = 60) {\n\t\tthis.cache[key] = {\n\t\t\tvalue,\n\t\t\tttl: new Date().getTime() + ttlSeconds * 1000,\n\t\t};\n\t}\n\n\tpublic remove(key: string) {\n\t\tif (this.cache.hasOwnProperty(key)) {\n\t\t\tdelete this.cache[key];\n\t\t}\n\t}\n\n\tpublic flushAll() {\n\t\tthis.cache = {};\n\t\tif (this.ttlChecker) {\n\t\t\tclearInterval(this.ttlChecker);\n\t\t\tthis.ttlChecker = undefined\n\t\t}\n\t}\n}\n\nexport { NodeCache };\n","import { NodeCache } from './NodeCache';\n\nexport enum ECacheContext {\n\tTranslations,\n\tLabelInfo,\n\tWSAPI,\n}\n\nconst WITH_REF_CACHE = [ECacheContext.Translations];\n\nexport class OCache {\n\tprivate static cache: { [key: string]: NodeCache } = {};\n\n\tprivate static init(cacheContext: ECacheContext) {\n\t\tif (this.cache[cacheContext] === undefined) {\n\t\t\tthis.cache[cacheContext] = new NodeCache();\n\t\t}\n\t}\n\n\tpublic static get<T>(oKey: any, cacheContext: ECacheContext): T | undefined {\n\t\tconst key = cacheContext.toString() + '_' + JSON.stringify(oKey);\n\n\t\tthis.init(cacheContext);\n\n\t\treturn deepClone(this.cache[cacheContext].get(key));\n\t}\n\n\tpublic static set(oKey: any, o: any, cacheContext: ECacheContext, ttlSeconds: number = 60) {\n\t\tconst key = cacheContext.toString() + '_' + JSON.stringify(oKey);\n\n\t\tthis.init(cacheContext);\n\n\t\tthis.cache[cacheContext].set(key, deepClone(o), ttlSeconds);\n\t}\n\n\tpublic static async use<T>(oKey: any, cacheContext: ECacheContext, f: () => Promise<T>, ttlSeconds: number = 60) {\n\t\tif (ttlSeconds <= 0) {\n\t\t\treturn await f();\n\t\t} else {\n\t\t\tlet o: T = OCache.get(oKey, cacheContext);\n\n\t\t\tif (o === undefined) {\n\t\t\t\to = await f();\n\t\t\t\tOCache.set(oKey, o, cacheContext, ttlSeconds);\n\t\t\t}\n\n\t\t\treturn o;\n\t\t}\n\t}\n\n\tpublic static async clear(cacheContext: ECacheContext, oKey: any) {\n\t\tconst key = cacheContext.toString() + '_' + JSON.stringify(oKey);\n\n\t\tif (this.cache[cacheContext]) {\n\t\t\tthis.cache[cacheContext].remove(key);\n\t\t}\n\t}\n\n\tpublic static async clearContext(cacheContext: ECacheContext) {\n\t\tif (this.cache[cacheContext]) {\n\t\t\tthis.cache[cacheContext].flushAll();\n\t\t}\n\t}\n\n\tpublic static async clearAll() {\n\t\tfor (const cacheContext in this.cache) {\n\t\t\tif (this.cache.hasOwnProperty(cacheContext)) {\n\t\t\t\tthis.cache[cacheContext].flushAll();\n\t\t\t}\n\t\t}\n\t\tthis.cache = {};\n\t}\n}\n\nconst deepClone = (o: any) => {\n\tif (o) {\n\t\treturn JSON.parse(JSON.stringify(o));\n\t}\n\n\treturn o;\n};\n","export enum ActivityTypeLimited {\n\tDoNothing = 8,\n\tPoints = 12,\n\tGiveMission = 14,\n\tStartAnotherCampaign = 15,\n\tMiniGameAttempt = 16,\n\tDeductPoints = 21,\n\tResetPoints = 22,\n\tAddGemsAndDiamonds = 25,\n\tDeductGemsAndDiamonds = 26,\n\tResetGemsAndDiamonds = 27,\n\tPopup = 30,\n\tInbox = 31,\n\tSlack = 70,\n\tEmail_To_Customer_Support = 80,\n\tEmail_To_Risk_Operator = 90,\n\tBonus = 100,\n\tWebHook = 200,\n\tTagCustomer = 504,\n\tUnTagCustomer = 505,\n}\n","class CoreUtils {\n\tpublic static avatarUrl = (avatar_id: string, avatarDomain: string): string => {\n\t\tif (\n\t\t\tavatarDomain &&\n\t\t\tavatar_id !== null &&\n\t\t\tavatar_id !== undefined &&\n\t\t\t!(avatar_id.startsWith && avatar_id.startsWith('http'))\n\t\t) {\n\t\t\tif (avatarDomain.endsWith('/')) {\n\t\t\t\treturn avatarDomain.slice(0, -1) + '/avatar/' + avatar_id;\n\t\t\t} else {\n\t\t\t\treturn avatarDomain + '/avatar/' + avatar_id;\n\t\t\t}\n\t\t} else {\n\t\t\treturn avatar_id;\n\t\t}\n\t};\n\n\tpublic static currencySymbol(currency: string) {\n\t\treturn {\n\t\t\t[currency?.toUpperCase()]: currency?.toUpperCase(),\n\t\t\tUSD: '$', // United States Dollar\n\t\t\tEUR: '\\u20AC', // Euro\n\t\t\tJPY: '\\u00A5', // Japanese Yen\n\t\t\tGBP: '\\u00A3', // British Pound Sterling\n\t\t\tAUD: 'A$', // Australian Dollar\n\t\t\tCAD: 'C$', // Canadian Dollar\n\t\t\tCHF: 'CHF', // Swiss Franc\n\t\t\tCNY: '\\u00A5', // Chinese Yuan\n\t\t\tSEK: 'kr', // Swedish Krona\n\t\t\tNZD: 'NZ$', // New Zealand Dollar\n\t\t\tMXN: 'MX$', // Mexican Peso\n\t\t\tSGD: 'S$', // Singapore Dollar\n\t\t\tHKD: 'HK$', // Hong Kong Dollar\n\t\t\tNOK: 'kr', // Norwegian Krone\n\t\t\tKRW: '\\u20A9', // South Korean Won\n\t\t\tTRY: '\\u20BA', // Turkish Lira\n\t\t\tINR: '\\u20B9', // Indian Rupee\n\t\t\tRUB: '\\u20BD', // Russian Ruble\n\t\t\tBRL: 'R$', // Brazilian Real\n\t\t\tZAR: 'R', // South African Rand\n\t\t}[currency?.toUpperCase()];\n\t}\n}\n\nexport { CoreUtils };\n","export enum PublicLabelSettings {\n\tPUBLIC_API_URL = 'PUBLIC_API_URL',\n\tRECORDING_ENABLED_FOR_ALL_USERS = 'RECORDING_ENABLED_FOR_ALL_USERS',\n\tJS_INJECTION = 'JS_INJECTION',\n\tGAMIFICATION_UI_MAIN = 'GAMIFICATION_UI_MAIN',\n\tGAMIFICATION_UI_WIDGET = 'GAMIFICATION_UI_WIDGET',\n\tGAMIFICATION_UI_MINI_GAME = 'GAMIFICATION_UI_MINI_GAME',\n\tGAMIFICATION_UI_SETTINGS = 'GAMIFICATION_UI_SETTINGS',\n\tGAMIFICATION_UI_MAIN_TEST = 'GAMIFICATION_UI_MAIN_TEST',\n\tGAMIFICATION_UI_WIDGET_TEST = 'GAMIFICATION_UI_WIDGET_TEST',\n\tGAMIFICATION_UI_SETTINGS_TEST = 'GAMIFICATION_UI_SETTINGS_TEST',\n\tFRONT_END_ALLOWED_LANGUAGES = 'FRONT_END_ALLOWED_LANGUAGES',\n\tFRONT_END_ALLOW_DOMAINS = 'FRONT_END_ALLOW_DOMAINS',\n\tDELAY_ENGAGEMENT_EXECUTION_ON_LOGIN_MS = 'DELAY_ENGAGEMENT_EXECUTION_ON_LOGIN_MS',\n\tSHADOW_LABEL_PUBLIC_KEY = 'SHADOW_LABEL_PUBLIC_KEY',\n\tDYNAMIC_IMAGE_DOMAIN = 'DYNAMIC_IMAGE_DOMAIN',\n\n\tGAMIFICATION_LEVELS_LOGIC2 = 'GAMIFICATION_LEVELS_LOGIC2',\n\tGAMIFICATION_LEVELS_LOGIC3 = 'GAMIFICATION_LEVELS_LOGIC2',\n\n\tAVATAR_CUSTOM_IMAGE_MAX_ID = 'AVATAR_CUSTOM_IMAGE_MAX_ID',\n\tAVATAR_CUSTOM_IMAGE_FOLDER = 'AVATAR_CUSTOM_IMAGE_FOLDER',\n\n\tGAMIFICATION_SHOW_POWERED_BY = 'GAMIFICATION_SHOW_POWERED_BY',\n\t_system_leader_board_mask_username = '_system_leader_board_mask_username',\n\t_system_gamification_mask_username = '_system_gamification_mask_username',\n\n\tINBOX_PUBLIC_CDN = 'INBOX_PUBLIC_CDN',\n}\n","enum TranslationArea {\n\tCasino = 1,\n\tGamification = 2,\n\tTrading = 3,\n\tArchived = 4,\n\tAffiliation = 5,\n\tRetentionGames = 6,\n\tAffIliateAdminNew = 7,\n\tAcademy = 8,\n}\n\nexport { TranslationArea };\n","import { TInboxMessage } from '../WSAPI/WSAPITypes';\nimport { ProtocolResponse } from '../Base/ProtocolResponse';\nimport { InboxMessage } from './InboxMessage';\n\nexport interface GetInboxMessagesResponse extends ProtocolResponse {\n\tlog: InboxMessage[];\n\tunread_count: number;\n}\n\nexport const InboxMessagesTransform = (items: InboxMessage[]): TInboxMessage[] => {\n\treturn items.map((item) => {\n\t\tconst x: TInboxMessage = {\n\t\t\tsent_date: item.createDate,\n\t\t\tmessage_guid: item.engagement_uid,\n\t\t\tread: item.is_read,\n\t\t\tfavorite: item.is_starred,\n\t\t\tcategory_id: item.category_id,\n\t\t\texpire_on_dt: item.expire_on_dt,\n\t\t};\n\t\treturn x;\n\t});\n};\n","import { IntUtils } from '../IntUtils';\nimport { TInboxMessageBody } from '../WSAPI/WSAPITypes';\nimport { InboxCategories } from './InboxCategories';\nimport { InboxMessageType } from './InboxMessageType';\nimport { OpenLinksType } from './OpenLinksType';\n\nexport interface InboxMessageBody {\n\t// URL or deep-link that neeed to be executed when user clicks on the message\n\taction: string;\n\t// the body of the message in case it's 'simple' inbox message\n\tbody: string;\n\t// type of message, deprecated\n\ttype: InboxMessageType;\n\t// image of the icon\n\timage: string;\n\t// title of the message\n\ttitle: string;\n\t// HTML body of the message in case it's 'rich' inbox message\n\thtml_body: string;\n\t// set of the buttons with text on the button and action that could be URL or deep-link\n\tadditional_buttons?: { inbox_cta_text: string; action: string }[];\n\t// indicator if the message need to be shown when sent and overlay or it should be shown only in the inbox, when user open 'inbox' interface explicitly\n\t// default is 'true'\n\tshow_preview?: boolean;\n\t// duration in seconds for how long to show preview, default is 7 seconds\n\tshow_duration_sec?: number;\n\t// indicator if the image in html_body can be zoomed out\n\t// default is 'false'\n\tenable_zoom_mode?: boolean;\n\t// options that allows to open links in buttons either in new window or in the current one\n\topen_links?: OpenLinksType;\n\t// The custom data of the inbox message defined by operator. Can be a JSON object, string or number\n\tcustom_data?: string;\n}\n\nexport interface InboxMessage {\n\t// date when the message was created\n\tcreateDate: string;\n\t// body of the message according to the interface\n\tbody: InboxMessageBody;\n\t// unique identifier of the message that connects it to the campaign from which it was sent\n\tengagement_uid: string;\n\t// flag that indicates if the message was read by the user\n\tis_read: boolean;\n\t// flag that indicates if the message was marked as favorite by the user\n\tis_starred: boolean;\n\t// flag that indicates if the message was deleted by the user. Such messages are not returned in the response and property is used only internaly in Smartico\n\tis_deleted?: boolean;\n\t// category id of the inbox message, could be categorized as System/Personal/General messages in mentioned tabs\n\tcategory_id?: InboxCategories;\n\t// The epoch timestamp, with milliseconds, when the message is going to be expired \n\texpire_on_dt?: number;\n}\n\nexport const InboxMessageBodyTransform = (item: InboxMessageBody): TInboxMessageBody => {\n\tconst x: TInboxMessageBody = {\n\t\taction: item.action,\n\t\ticon: item.image,\n\t\ttitle: item.title,\n\t\tpreview_body: item.body,\n\t\tcustom_data: IntUtils.JsonOrText(item?.custom_data),\n\t};\n\n\tif (item.action === 'dp:inbox') {\n\t\tif (item.additional_buttons && item.additional_buttons.length) {\n\t\t\tx.buttons = item.additional_buttons.map((b) => ({\n\t\t\t\taction: b.action,\n\t\t\t\ttext: b.inbox_cta_text,\n\t\t\t}));\n\t\t}\n\n\t\tx.html_body = item?.html_body || null;\n\t}\n\n\treturn x;\n};\n","export enum InboxMessageType {\n\tCustom = 0,\n\tMissionCompleted = 1,\n\tMissionUnlocked = 2,\n\tLeaderboardWon = 3,\n\tLevelChanged = 4,\n\tBonusGiven = 5,\n\tPointsAdded = 6,\n\tPointsUsed = 7,\n\tPersonalMessage = 8,\n}\n\n// keep in sync with BO enum\n","export enum OpenLinksType {\n\tNewWindow = 1,\n\tCurrentWindow = 2\n}","export enum InboxCategories {\n General = 0,\n\tPlatform = 1,\n\tPersonal = 2,\n}","export enum InboxReadStatus {\n\tUnreadOnly = 1,\n\tReadOnly = 2,\n}","export enum BuyStoreItemErrorCode {\n\t/** User don't have enough points on balance */\n\tSHOP_NO_BALANCE = 11000,\n\t/** Wrong shop item id */\n\tSHOP_WRONG_LABEL = 11001,\n\t/** Failed to buy bonus item, probably something wrong with the bonus configuration. */\n\tSHOP_FAILED_TO_BUY_BONUS = 11002, // remote product restriction\n\t/** Failed to buy store item because segment conditions are set by operator for specific CRM item */\n\tSHOP_FAILED_TO_BUY_SHOP_ITEM_CONDITION = 11003, // when not visible but trying to buy. shouldn't happen\n\t/** Segment conditions are set by operator for specific CRM item and user not matching to this conditions */\n\tSHOP_FAILED_TO_BUY_SHOP_ITEM_CONDITION_PURSHASE = 11004, // when visible but not matching to purchase segment\n\t/** Failed to buy matching bonus item */\n\tSHOP_FAILED_TO_BUY_MATCHING_BONUS = 11005,\n\t/** Failed to buy item because of limit of max items is reached */\n\tSHOP_FAILED_MAX_BOUGHT_ITEMS_REACHED = 11006,\n\t/** Failed to buy item because no more items are available */\n\tSHOP_FAILED_POOL_EMPTY = 11009,\n\t/** User doesn't have enough gems on balance */\n\tSHOP_NO_BALANCE_GEMS = 11011,\n\t/** User doesn't have enough diamonds on balance */\n\tSHOP_NO_BALANCE_DIAMONDS = 11012,\n\t/** Failed to buy item because of purchase limitation */\n\tSHOP_FAILED_PURCHASE_LIMITATION = 11014,\n}\n","import { TStoreCategory } from '../WSAPI/WSAPITypes';\nimport { StoreCategoryPublicMeta } from './StoreCategoryPublicMeta';\n\nexport interface StoreCategory {\n\tid?: number;\n\tpublicMeta?: StoreCategoryPublicMeta;\n}\n\nexport const StoreCategoryTransform = (items: StoreCategory[]): TStoreCategory[] => {\n\treturn items.map((r) => {\n\t\tconst x: TStoreCategory = {\n\t\t\tid: r.id,\n\t\t\tname: r.publicMeta?.name,\n\t\t\torder: r.publicMeta?.order,\n\t\t};\n\t\treturn x;\n\t});\n};\n","export enum StoreItemPurchaseType {\n Points = 0,\n Gems = 1,\n Diamonds = 2,\n}","export enum StoreItemType {\n\tBonus = 1,\n\tTangible = 2,\n\tMiniGameSpin = 3,\n\tChangeLevel = 4,\n\tPrizeDrop = 5,\n\tRaffleTicket = 6,\n}\n\nexport enum StoreItemTypeName {\n\tBonus = 'bonus',\n\tTangible = 'tangible',\n\tMiniGameSpin = 'minigamespin',\n\tChangeLevel = 'changelevel',\n\tPrizeDrop = 'prizedrop',\n\tRaffleTicket = 'raffleticket',\n\tUnknown = 'unknown',\n}\n\nexport const StoreItemTypeNamed = (type: StoreItemType): StoreItemTypeName => {\n\treturn (\n\t\t{\n\t\t\t[StoreItemType.Bonus]: StoreItemTypeName.Bonus,\n\t\t\t[StoreItemType.Tangible]: StoreItemTypeName.Bonus,\n\t\t\t[StoreItemType.MiniGameSpin]: StoreItemTypeName.MiniGameSpin,\n\t\t\t[StoreItemType.ChangeLevel]: StoreItemTypeName.ChangeLevel,\n\t\t\t[StoreItemType.PrizeDrop]: StoreItemTypeName.PrizeDrop,\n\t\t\t[StoreItemType.RaffleTicket]: StoreItemTypeName.RaffleTicket,\n\t\t}[type] || StoreItemTypeName.Unknown\n\t);\n};\n","import { AchRelatedGame } from '../Base/AchRelatedGame';\nimport { IntUtils } from '../IntUtils';\nimport { TStoreItem } from '../WSAPI/WSAPITypes';\nimport { StoreItemPublicMeta } from './StoreItemPublicMeta';\nimport { StoreItemPurchaseType } from './StoreItemPurchaseType';\nimport { StoreItemType, StoreItemTypeNamed } from './StoreItemType';\n\nexport interface StoreItem {\n\tid: number;\n\titemTypeId: StoreItemType;\n\titemPublicMeta: StoreItemPublicMeta;\n\tcategoryIds?: number[];\n\tcanBuy?: boolean;\n\tshopPool: number;\n\tactiveTillDate?: number;\n\trelatedGames?: AchRelatedGame[];\n}\n\nconst mapPurchaseType = (purchaseType: StoreItemPurchaseType) => {\n\tif (purchaseType === StoreItemPurchaseType.Points) {\n\t\treturn 'points';\n\t} else if (purchaseType === StoreItemPurchaseType.Gems) {\n\t\treturn 'gems';\n\t} else if (purchaseType === StoreItemPurchaseType.Diamonds) {\n\t\treturn 'diamonds';\n\t}\n\n\treturn 'points';\n};\n\nexport const StoreItemTransform = (items: StoreItem[]): TStoreItem[] => {\n\t\n\treturn items\n\t\t.filter((r) => r.id >= 1)\n\t\t.map((r) => {\n\t\t\tconst x: TStoreItem = {\n\t\t\t\tid: r.id,\n\t\t\t\tname: r.itemPublicMeta.name,\n\t\t\t\tpurchase_type: mapPurchaseType(r.itemPublicMeta.purchase_type),\n\t\t\t\tprice: r.itemPublicMeta.price as any as number, // AA: strange why it's string\n\t\t\t\timage: r.itemPublicMeta.image_url,\n\t\t\t\tdescription: r.itemPublicMeta.description,\n\t\t\t\tribbon: r.itemPublicMeta.label_tag === 'custom' ? r.itemPublicMeta.custom_label_tag : r.itemPublicMeta.label_tag,\n\t\t\t\tlimit_message: r.itemPublicMeta.limit_message,\n\t\t\t\tpurchase_limit_message: r.itemPublicMeta.purchase_limit_message,\n\t\t\t\tpriority: r.itemPublicMeta.priority ?? 0,\n\t\t\t\trelated_item_ids: r.itemPublicMeta.related_items,\n\t\t\t\thint_text: r.itemPublicMeta.hint_text,\n\t\t\t\ttype: StoreItemTypeNamed(r.itemTypeId),\n\t\t\t\tcan_buy: r.canBuy,\n\t\t\t\tcategory_ids: r.categoryIds ?? [],\n\t\t\t\tpool: r.shopPool,\n\t\t\t\tcustom_data: IntUtils.JsonOrText(r.itemPublicMeta.custom_data),\n\t\t\t\tactive_till_date: r.activeTillDate,\n\t\t\t\tdiscounted_price: r.itemPublicMeta.discount_prize,\n\t\t\t\tdiscount_price_ribbon: r.itemPublicMeta.discount_prize_ribbon,\n\t\t\t\tcustom_ribbon_image: r.itemPublicMeta.custom_ribbon_image,\n\t\t\t\tcustom_section_id: r.itemPublicMeta.custom_section_id,\n\t\t\t\tonly_in_custom_section: r.itemPublicMeta.only_in_custom_section,\n\t\t\t\tcustom_section_type_id: r.itemPublicMeta.custom_section_type_id,\n\t\t\t\t...(r.itemPublicMeta.cant_buy_message ? { cant_buy_message: r.itemPublicMeta.cant_buy_message } : {}),\n\t\t\t\trelated_games: (r.relatedGames?.filter((g) => g.game_public_meta.enabled) || []).map((g, i) => ({\n\t\t\t\t\text_game_id: g.ext_game_id,\n\t\t\t\t\tgame_public_meta: {\n\t\t\t\t\t\tname: g.game_public_meta.name,\n\t\t\t\t\t\tlink: g.game_public_meta.link,\n\t\t\t\t\t\timage: g.game_public_meta.image,\n\t\t\t\t\t\tenabled: g.game_public_meta.enabled,\n\t\t\t\t\t\tgame_categories: g.game_public_meta.game_categories,\n\t\t\t\t\t\tgame_provider: g.game_public_meta.game_provider,\n\t\t\t\t\t\tmobile_spec_link: g.game_public_meta.mobile_spec_link,\n\t\t\t\t\t\tpriority: i + 1,\n\t\t\t\t\t},\n\t\t\t\t})),\n\t\t\t};\n\t\t\treturn x;\n\t\t});\n};\n","import { IntUtils } from '../IntUtils';\nimport { TStoreItem } from '../WSAPI/WSAPITypes';\nimport { StoreItem } from './StoreItem';\nimport { StoreItemPurchaseType } from './StoreItemPurchaseType';\nimport { StoreItemTypeNamed } from './StoreItemType';\n\ninterface StoreItemPurchased extends StoreItem {\n\tpurchase_ts: number;\n\tpurchase_points_amount: number;\n\tpurchased_today?: boolean;\n\tpurchased_this_week?: boolean;\n\tpurchased_this_month?: boolean;\n}\n\nconst mapPurchaseType = (purchaseType: StoreItemPurchaseType) => {\n\tif (purchaseType === StoreItemPurchaseType.Points) {\n\t\treturn 'points';\n\t} else if (purchaseType === StoreItemPurchaseType.Gems) {\n\t\treturn 'gems';\n\t} else if (purchaseType === StoreItemPurchaseType.Diamonds) {\n\t\treturn 'diamonds';\n\t}\n\n\treturn 'points';\n};\n\nexport const StoreItemPurchasedTransform = (items: StoreItemPurchased[]): TStoreItem[] => {\n\treturn items\n\t\t.filter((r) => r.id >= 1)\n\t\t.map((r) => {\n\t\t\tconst purchasedToday = r.purchase_ts ? IntUtils.isWithinPeriod(r.purchase_ts, 'today') : false;\n\t\t\tconst purchasedThisWeek = r.purchase_ts ? IntUtils.isWithinPeriod(r.purchase_ts, 'thisWeek') : false;\n\t\t\tconst purchasedThisMonth = r.purchase_ts ? IntUtils.isWithinPeriod(r.purchase_ts, 'thisMonth') : false;\n\n\t\t\tconst x: TStoreItem = {\n\t\t\t\tid: r.id,\n\t\t\t\tname: r.itemPublicMeta.name,\n\t\t\t\tprice: r.itemPublicMeta.price as any as number, // AA: strange why it's string\n\t\t\t\tpurchase_type: mapPurchaseType(r.itemPublicMeta.purchase_type),\n\t\t\t\timage: r.itemPublicMeta.image_url,\n\t\t\t\tdescription: r.itemPublicMeta.description,\n\t\t\t\tribbon: r.itemPublicMeta.label_tag === 'custom' ? r.itemPublicMeta.custom_label_tag : r.itemPublicMeta.label_tag,\n\t\t\t\tlimit_message: r.itemPublicMeta.limit_message,\n\t\t\t\tpurchase_limit_message: r.itemPublicMeta.purchase_limit_message,\n\t\t\t\tpriority: r.itemPublicMeta.priority ?? 0,\n\t\t\t\trelated_item_ids: r.itemPublicMeta.related_items,\n\t\t\t\thint_text: r.itemPublicMeta.hint_text,\n\t\t\t\ttype: StoreItemTypeNamed(r.itemTypeId),\n\t\t\t\tcan_buy: r.canBuy,\n\t\t\t\tcategory_ids: r.categoryIds ?? [],\n\t\t\t\tpool: r.shopPool,\n\t\t\t\tpurchase_ts: r.purchase_ts,\n\t\t\t\tpurchase_points_amount: r.purchase_points_amount,\n\t\t\t\tpurchased_today: purchasedToday,\n\t\t\t\tpurchased_this_week: purchasedThisWeek,\n\t\t\t\tpurchased_this_month: purchasedThisMonth,\n\t\t\t\tcustom_data: r.itemPublicMeta.custom_data,\n\t\t\t\trelated_games: (r.relatedGames?.filter((g) => g.game_public_meta.enabled) || []).map((g, i) => ({\n\t\t\t\t\text_game_id: g.ext_game_id,\n\t\t\t\t\tgame_public_meta: {\n\t\t\t\t\t\tname: g.game_public_meta.name,\n\t\t\t\t\t\tlink: g.game_public_meta.link,\n\t\t\t\t\t\timage: g.game_public_meta.image,\n\t\t\t\t\t\tenabled: g.game_public_meta.enabled,\n\t\t\t\t\t\tgame_categories: g.game_public_meta.game_categories,\n\t\t\t\t\t\tgame_provider: g.game_public_meta.game_provider,\n\t\t\t\t\t\tmobile_spec_link: g.game_public_meta.mobile_spec_link,\n\t\t\t\t\t\tpriority: i + 1,\n\t\t\t\t\t},\n\t\t\t\t})),\n\t\t\t};\n\n\t\t\treturn x;\n\t\t});\n};\n\nexport { StoreItemPurchased };\n","export enum AchievementStatus {\n\tDraft = 1,\n\tAvailableUnlocked = 2,\n\tAvailableLocked = 3,\n\tArchived = 4,\n\tFeaturedManually = 5,\n\tFeaturedAI = 6,\n\tRecurring = 7,\n\tRecurringUponCompletion = 8\n}\n","export enum AchievementTaskType {\n\tCompleteAchievement = 1,\n\tUnlockAchievement = 2,\n}\n","export enum AchievementType {\n\tMission = 1,\n\tBadge = 2,\n}\n","/** Possible statuses of the mission availability. \n * Notes:\n * - Recurring missions have a special field next_recurrence_date_ts, but it's only relevant if the mission has no active till date or the next recurrence date is before the active till date.\n * - For a locked mission or mission that requires opt-in, the time limit should be calculated as dt_start + time_limit_ms. For a mission that does not require opt-in or type is not Locked, it should be the highest value of dt_start and active_from_ts (if defined) + time_limit_ms.\n * */\n\nexport enum AchievementAvailabilityStatus {\n /** Mission without date/time restrictions or with passed active from date and no opt-in required and mission is unlocked */\n Available = 0,\n\n /** Mission without date/time restrictions or with passed active from date, opt-in is required, user is not opted-in or mission is locked */\n AvailableInactive = 1,\n\n /** Mission without date/time restrictions or with passed active from date, opt-in is required, user is opted-in or mission is unlocked*/\n AvailableActive = 2,\n\n /** Mission with active from date defined, date is in future.\n * Field: active_from_ts\n */\n UnavailableWithActiveFrom = 3,\n\n /** Mission with active till date defined, date is in future, and no opt-in required and mission is unlocked.\n * Field: active_till_ts\n */\n AvailableWithActiveTill = 4,\n\n /** Mission with active till date defined, date is in future, and opt-in is required, user is not opted in or mission is locked.\n * Fields: active_till_ts, is_requires_optin, is_opted_in, is_locked.\n */\n AvailableWithActiveTillInactive = 5,\n\n /** Mission with active till date defined, date is in future, and opt-in is required, user is opted in or mission is unlocked.\n * Fields: active_till_ts, is_requires_optin, is_opted_in, is_locked.\n */\n AvailableWithActiveTillActive = 6,\n\n /** Available mission with time limit, and opt-in is required or mission is unlocked.\n * The time limit is calculated as the sum of two properties: (highest value from dt_start and active_from_ts) + time_limit_ms.\n * \n */\n AvailableLimited = 7,\n\n /** Available mission with time limit, opt-in is required, user is not opted-in or mission is locked.\n * Time limit at this stage is not relevant, user should be opted-in or mission should be unlocked.\n */\n AvailableLimitedInactive = 8,\n\n /** Available mission with time limit, opt-in is required, user is opted-in or mission unlocked.\n * The time limit is calculated as the sum of two properties: dt_start + time_limit_ms.\n */\n AvailableLimitedActive = 9,\n\n /** Available mission with time limit and active till date, opt-in is not required and mission is unlocked.\n * Fields: active_till_ts, time_limit_ms, dt_start, active_from_ts;\n * The time limit is calculated as the sum of two properties: (highest value from dt_start and active_from_ts) + time_limit_ms.\n */\n AvailableFullyLimited = 10,\n\n /** Available mission with time limit and active till date, opt-in is required, user is not opted in or mission is locked.\n * Fields: active_till_ts, time_limit_ms, dt_start, active_from_ts, is_requires_optin, is_opted_in, is_locked.\n * On this stage only active_till_ts is relevant. time_limit_ms is ignored because user should be opted in.\n */\n AvailableFullyLimitedInactive = 11,\n\n /** Available mission with time limit and active till date, opt-in is required, user is opted in or mission is unlocked.\n * Fields: active_till_ts, time_limit_ms, dt_start, is_requires_optin, is_opted_in, is_locked.\n * The time limit is calculated as the sum of two properties: dt_start + time_limit_ms.\n */\n AvailableFullyLimitedActive = 12,\n\n /** Missed mission when active till date is already passed. is_completed field indicating if mission is completed or just missed */\n MissedByActiveTill = 13,\n\n /** Missed mission when start_date + time_limit_ms is already passed. is_completed field indicating if mission is completed or just missed */\n MissedByLimitInTime = 14,\n}","export enum BadgesTimeLimitStates {\n\t/** Before Start Date */\n\tBeforeStartDate = 0,\n\t/** After Start Date but before earned */\n\tAfterStartDateNoProgress = 1,\n\t/** After Start Date but before started (no progress) + End date */\n\tAfterStartDateNoProgressAndEndDate = 2,\n\t/** After Start Date, but with some progress + End date */\n\tAfterStartDateWithProgressAndEndDate = 3,\n\t/** After End Date (not started) */\n\tAfterEndDateNotStarted = 4,\n\t/** After End Date (player has some progress, but not completed) */\n\tAfterEndDateWithProgress = 5,\n}\n\n","import { IntUtils } from \"src/IntUtils\";\nimport { AchievementAvailabilityStatus } from \"./AchievementAvailabilityStatus\";\nimport { AchievementStatus } from \"./AchievementStatus\";\nimport { UserAchievement } from \"./UserAchievement\";\nimport { UserAchievementTask } from \"./UserAchievementTask\";\nimport { BadgesTimeLimitStates } from \"./BadgesTimeLimitStates\";\n\ntype UserStateParamsKeys = 'core_fav_game_top3' | 'core_fav_game_type_top3' | 'core_fav_game_provider_top3' | 'core_recommended_deposit_amount' | 'core_recommended_casino_bet_amount' | 'casino_last_bet_amount' | 'casino_last_bet_amount_real' | 'casino_last_bet_amount_bonus' | 'acc_last_deposit_amount';\nconst USER_STATE_PARAMS_KEYS_GAMES: UserStateParamsKeys[] = ['core_fav_game_top3', 'core_fav_game_type_top3', 'core_fav_game_provider_top3'];\nconst USER_STATE_PARAMS_KEYS_BET_AMOUNT: UserStateParamsKeys[] = ['core_recommended_deposit_amount', 'core_recommended_casino_bet_amount', 'casino_last_bet_amount', 'casino_last_bet_amount_real', 'casino_last_bet_amount_bonus', 'acc_last_deposit_amount'];\n\nconst MINOR_WORDS = new Set([\n 'of', 'at', 'in', 'on', 'to', 'up', 'as', 'by', 'for',\n 'from', 'into', 'onto', 'with', 'upon', 'via',\n 'and', 'but', 'or', 'nor', 'so', 'yet',\n 'vs', 'v',\n 'a', 'an', 'the',\n]);\n\nfunction toGameTitleCase(raw: string): string {\n if (!raw) return raw;\n const tokens = raw.toLowerCase().split(/(\\b\\w+\\b)/);\n const wordTokens = tokens.filter((t) => /^\\w+$/.test(t));\n const lastWordIdx = wordTokens.length - 1;\n let wordIndex = 0;\n return tokens\n .map((token) => {\n if (!/^\\w+$/.test(token)) return token;\n const isFirst = wordIndex === 0;\n const isLast = wordIndex === lastWordIdx;\n wordIndex++;\n if (isFirst || isLast || !MINOR_WORDS.has(token)) {\n return token.charAt(0).toUpperCase() + token.slice(1);\n }\n return token;\n })\n .join('');\n}\n\nexport class MissionUtils {\n\n public static getAvailabilityStatus = (mission: UserAchievement) => {\n\n if (!mission) {\n return null;\n }\n\n const activeFrom = mission.active_from_ts ? MissionUtils.getMs(mission.active_from_ts) : null\n const activeTill = mission.active_till_ts ? MissionUtils.getMs(mission.active_till_ts) : null;\n const startDate = mission.start_date_ts ? MissionUtils.getMs(mission.start_date_ts) : null;\n const timeLimit = mission.time_limit_ms;\n const requiresOptIn = mission.requiresOptin;\n const optedIn = mission.isOptedIn;\n const isLockedMission = mission.ach_status_id === AchievementStatus.AvailableLocked;\n const isLocked = mission.isLocked;\n\n if (!activeFrom && !activeTill && !timeLimit) {\n if (requiresOptIn) {\n if (optedIn) {\n return AchievementAvailabilityStatus.AvailableActive;\n } else {\n return AchievementAvailabilityStatus.AvailableInactive;\n }\n } else if (isLockedMission) {\n if (!isLocked) {\n return AchievementAvailabilityStatus.AvailableActive;\n } else {\n return AchievementAvailabilityStatus.AvailableInactive;\n }\n } else {\n return AchievementAvailabilityStatus.Available;\n }\n }\n\n if (activeFrom && activeFrom > Date.now()) {\n return AchievementAvailabilityStatus.UnavailableWithActiveFrom;\n }\n\n if ((activeFrom && activeFrom < Date.now()) || !activeFrom) {\n if (!activeTill && !timeLimit) {\n if (requiresOptIn) {\n if (optedIn) {\n return AchievementAvailabilityStatus.AvailableActive;\n } else {\n return AchievementAvailabilityStatus.AvailableInactive;\n }\n } else if (isLockedMission) {\n if (!isLocked) {\n return AchievementAvailabilityStatus.AvailableActive;\n } else {\n return AchievementAvailabilityStatus.AvailableInactive;\n }\n } else {\n return AchievementAvailabilityStatus.Available;\n }\n }\n\n if (activeTill && !timeLimit) {\n if (activeTill > Date.now()) {\n if (requiresOptIn) {\n if (optedIn) {\n return AchievementAvailabilityStatus.AvailableWithActiveTillActive;\n } else {\n return AchievementAvailabilityStatus.AvailableWithActiveTillInactive;\n }\n } else if (isLockedMission) {\n if (!isLocked) {\n return AchievementAvailabilityStatus.AvailableWithActiveTillActive;\n } else {\n return AchievementAvailabilityStatus.AvailableWithActiveTillInactive;\n }\n } else {\n return AchievementAvailabilityStatus.AvailableWithActiveTill;\n }\n } else {\n return AchievementAvailabilityStatus.MissedByActiveTill;\n }\n }\n\n if (timeLimit && !activeTill) {\n if (requiresOptIn) {\n const endDate = startDate + timeLimit;\n\n if (optedIn) {\n if (endDate > Date.now()) {\n return AchievementAvailabilityStatus.AvailableLimitedActive;\n } else {\n return AchievementAvailabilityStatus.MissedByLimitInTime;\n }\n } else {\n return AchievementAvailabilityStatus.AvailableLimitedInactive;\n }\n } else if (isLockedMission) {\n const endDate = startDate + timeLimit;\n\n if (!isLocked) {\n if (endDate > Date.now()) {\n return AchievementAvailabilityStatus.AvailableLimitedActive;\n } else {\n return AchievementAvailabilityStatus.MissedByLimitInTime;\n }\n } else {\n return AchievementAvailabilityStatus.AvailableLimitedInactive;\n }\n } else {\n const endDate = activeFrom && activeFrom > startDate ? activeFrom + timeLimit : startDate + timeLimit;\n\n if (endDate > Date.now()) {\n return AchievementAvailabilityStatus.AvailableLimited;\n } else {\n return AchievementAvailabilityStatus.MissedByLimitInTime;\n }\n }\n }\n\n if (timeLimit && activeTill) {\n if (activeTill > Date.now()) {\n if (requiresOptIn) {\n if (optedIn) {\n const endDate = startDate + timeLimit;\n\n if (endDate > Date.now()) {\n return AchievementAvailabilityStatus.AvailableFullyLimitedActive;\n } else {\n return AchievementAvailabilityStatus.MissedByLimitInTime;\n }\n } else {\n return AchievementAvailabilityStatus.AvailableFullyLimitedInactive;\n }\n } else if (isLockedMission) {\n if (!isLocked) {\n const endDate = startDate + timeLimit;\n\n if (endDate > Date.now()) {\n return AchievementAvailabilityStatus.AvailableFullyLimitedActive;\n } else {\n return AchievementAvailabilityStatus.MissedByLimitInTime;\n }\n } else {\n return AchievementAvailabilityStatus.AvailableFullyLimitedInactive;\n }\n } else {\n const endDate = activeFrom && activeFrom > startDate ? activeFrom + timeLimit : startDate + timeLimit;\n\n if (endDate > Date.now()) {\n return AchievementAvailabilityStatus.AvailableFullyLimited;\n } else {\n return AchievementAvailabilityStatus.MissedByLimitInTime;\n }\n }\n } else {\n return AchievementAvailabilityStatus.MissedByActiveTill;\n }\n }\n }\n }\n\n public static getMs = (ts: number): number => {\n return new Date(ts).getTime();\n }\n\n public static replaceTagsFavMissionTask = ({ task, valueToReplace, currencySymbol }: { task: UserAchievementTask, valueToReplace: string, currencySymbol?: string }): string => {\n let result = valueToReplace || '';\n\n if (!task) {\n return result;\n }\n\n const userStateParams = (task.user_state_params || {});\n const userStateOperator = task.task_public_meta?.user_state_operations;\n const userStateParamsKeys = Object.keys(userStateParams);\n\n if (userStateParamsKeys.length === 0 || !userStateOperator) {\n return result;\n }\n\n const operatorsMulti = ['has', '!has'];\n const operatorsPos = ['pos1', 'pos2', 'pos3'];\n\n let suggestedGames: string = '';\n let suggestedValue: string = '';\n\n userStateParamsKeys.forEach((k: UserStateParamsKeys) => {\n const operator = userStateOperator[k]?.op;\n\n if (USER_STATE_PARAMS_KEYS_GAMES.includes(k)) {\n if (operatorsMulti.includes(operator)) {\n const value = userStateParams[k]?.filter(v => Boolean(v));\n if (value && value.length > 0) {\n suggestedGames = value.map((v: string) => {\n const cleaned = v.replace(/_/g, ' ');\n return toGameTitleCase(cleaned);\n }).join(', ');\n }\n }\n\n if (operatorsPos.includes(operator)) {\n const value = userStateParams[k];\n const pos = Number(operator.replace('pos', '')) - 1;\n\n if (IntUtils.isNotNull(pos) && value && value[pos]) {\n suggestedGames = value[pos];\n\n if (suggestedGames) {\n suggestedGames = toGameTitleCase(suggestedGames.replace(/_/g, ' '));\n }\n\n }\n }\n }\n\n if (USER_STATE_PARAMS_KEYS_BET_AMOUNT.includes(k)) { \n suggestedValue = userStateParams[k];\n\n if (suggestedValue) {\n const currencyFromTheTask = userStateParams?.core_wallet_currency;\n\n suggestedValue = `${suggestedValue} ${currencySymbol || currencyFromTheTask || ''}`;\n }\n }\n });\n\n if (suggestedGames && result) {\n result = result.replace('{{suggested_games}}', suggestedGames);\n }\n\n if (suggestedValue && result) {\n result = result.replace('{{suggested_value}}', suggestedValue);\n }\n\n return result;\n }\n\n public static replaceFavGameNameTag = ({ task, currencySymbol }: { task: UserAchievementTask, currencySymbol?: string }): UserAchievementTask => {\n if (task && task.task_public_meta && task.task_public_meta.name) {\n task.task_public_meta.name = MissionUtils.replaceTagsFavMissionTask({ task, valueToReplace: task.task_public_meta.name, currencySymbol });\n }\n\n return task;\n }\n\n public static determineBadgeState = (badge: UserAchievement): BadgesTimeLimitStates | null => {\n const now = Date.now();\n const { active_from_ts, active_till_ts, progress, isCompleted, complete_date_ts } = badge;\n\n // If badge is completed before active till date, return null\n if (isCompleted && (!active_till_ts || complete_date_ts < active_till_ts)) {\n return null;\n }\n \n // 1. BEFORE START\n if (active_from_ts > now) {\n return BadgesTimeLimitStates.BeforeStartDate;\n }\n \n // 2. AFTER START, NO END DATE (infinite badge)\n // → grey, no locked, no date chip\n if (!active_till_ts) {\n if (progress === 0) {\n return BadgesTimeLimitStates.AfterStartDateNoProgress;\n }\n // If infinite and with progress → this state does not exist in enum\n // (but if needed we can add one)\n }\n \n // 3. AFTER START, BEFORE END DATE\n if (now < active_till_ts) {\n if (progress === 0) {\n // now < end + has end date → must show chip\n return BadgesTimeLimitStates.AfterStartDateNoProgressAndEndDate;\n }\n \n return BadgesTimeLimitStates.AfterStartDateWithProgressAndEndDate;\n }\n \n // 4. AFTER END DATE\n if (progress === 0) {\n return BadgesTimeLimitStates.AfterEndDateNotStarted;\n }\n \n return BadgesTimeLimitStates.AfterEndDateWithProgress;\n }\n}\n","import { AchRelatedGame } from '../Base/AchRelatedGame';\nimport { IntUtils } from '../IntUtils';\nimport { TMissionOrBadge } from '../WSAPI/WSAPITypes';\nimport { AchievementPublicMeta } from './AchievementPublicMeta';\nimport { AchievementStatus } from './AchievementStatus';\nimport { AchievementTaskType } from './AchievementTaskType';\nimport { AchievementType } from './AchievementType';\nimport { MissionUtils } from './MissionsUtils';\nimport { ScheduledMissionType } from './ScheduledMissionType';\nimport { UserAchievementTask } from './UserAchievementTask';\nimport { BadgesTimeLimitStates } from './BadgesTimeLimitStates';\nimport { AchievementClaimPeriodTypeId } from './AchievementClaimTypeId';\n\nexport interface UserAchievement {\n\tach_id?: number;\n\tach_type_id?: AchievementType;\n\tach_public_meta?: AchievementPublicMeta;\n\tisCompleted?: boolean;\n\tisLocked?: boolean;\n\trequiresOptin?: boolean;\n\tisOptedIn?: boolean;\n\tstart_date?: string; // time when mission unlocked or opted-in. Needed to calculated \"remaining time\" in case time_limit_ms is set\n\tstart_date_ts?: number;\n\ttime_limit_ms?: number;\n\tprogress?: number;\n\tcomplete_date?: string;\n\tcomplete_date_ts?: number;\n\tunlock_date?: string;\n\tmilliseconds_till_available?: number;\n\tcompleted_tasks?: number;\n\tachievementTasks?: UserAchievementTask[];\n\tnext_recurrence_date_ts?: number;\n\tach_status_id?: AchievementStatus;\n\tscheduledMissionType?: ScheduledMissionType;\n\trelated_games?: AchRelatedGame[];\n\tactive_from_ts?: number; // indicates when 'scheduled' mission is active from,\n\tactive_till_ts?: number; // indicates when 'scheduled' mission is active till,\n\tach_categories?: number[];\n\trecurring_quantity?: number; // max completion count for Recurring upon completion\n\tcompleted_count?: number; // completion count for Recurring upon completion\n\n\tach_completed_id?: number; // ID of the completion fact from ach_completed or ach_completed_recurring tables\n\trequires_prize_claim?: boolean; // flag from achievement if the mission prize will be given only after user claims it\n\tprize_claimed_date_ts?: number; // the date/timestamp indicating when the prize was claimed by the user\n\n\tcompleted_today?: boolean;\n\tcompleted_this_week?: boolean;\n\tcompleted_this_month?: boolean;\n\tcustom_section_type_id?: number;\n\tbadgeTimeLimitState?: BadgesTimeLimitStates;\n\tprize_claim_expiration_date?: number;\n\tprize_claim_period_type_id?: AchievementClaimPeriodTypeId;\n}\n\nexport const enrichUserAchievementsWithBadgeState = (items: UserAchievement[]): UserAchievement[] => {\n\treturn items.map((item) => {\n\t\tif (item.ach_type_id === AchievementType.Badge && (item.active_from_ts || item.active_till_ts)) {\n\t\t\titem.badgeTimeLimitState = MissionUtils.determineBadgeState(item);\n\t\t}\n\t\treturn item;\n\t});\n};\n\nexport const UserAchievementTransform = (items: UserAchievement[]): TMissionOrBadge[] => {\n\treturn items\n\t\t.filter((r) => r.ach_id >= 1)\n\t\t.map((r) => {\n\t\t\tconst completedToday = r.complete_date_ts ? IntUtils.isWithinPeriod(r.complete_date_ts, 'today') : false;\n\t\t\tconst completedThisWeek = r.complete_date_ts ? IntUtils.isWithinPeriod(r.complete_date_ts, 'thisWeek') : false;\n\t\t\tconst completedThisMonth = r.complete_date_ts ? IntUtils.isWithinPeriod(r.complete_date_ts, 'thisMonth') : false;\n\n\t\t\tlet missionName = r.ach_public_meta.name;\n\t\t\tlet missionSubHeader = r.ach_public_meta.sub_header;\n\t\t\tlet missionDescription = r.ach_public_meta.description;\n\n\t\t\tif (missionName?.includes('{{suggested_') || missionSubHeader?.includes('{{suggested_') || missionDescription?.includes('{{suggested_')) {\n\t\t\t\tr.achievementTasks.forEach(t => {\n\t\t\t\t\tif (r.ach_public_meta.name?.includes('{{suggested_')) {\n\t\t\t\t\t\tmissionName = MissionUtils.replaceTagsFavMissionTask({ task: t, valueToReplace: r.ach_public_meta.name });\n\t\t\t\t\t}\n\t\t\t\t\tif (r.ach_public_meta.sub_header?.includes('{{suggested_')) {\n\t\t\t\t\t\tmissionSubHeader = MissionUtils.replaceTagsFavMissionTask({ task: t, valueToReplace: r.ach_public_meta.sub_header });\n\t\t\t\t\t}\n\t\t\t\t\tif (r.ach_public_meta.description?.includes('{{suggested_')) {\n\t\t\t\t\t\tmissionDescription = MissionUtils.replaceTagsFavMissionTask({ task: t, valueToReplace: r.ach_public_meta.description });\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst x: TMissionOrBadge = {\n\t\t\t\tid: r.ach_id,\n\t\t\t\tname: missionName,\n\t\t\t\tsub_header: missionSubHeader,\n\t\t\t\tdescription: missionDescription,\n\t\t\t\thint_text: r.ach_public_meta.hint_text,\n\t\t\t\tunlock_mission_description: r.ach_public_meta.unlock_mission_description,\n\t\t\t\timage: r.ach_public_meta.image_url,\n\t\t\t\tis_completed: r.isCompleted,\n\t\t\t\tis_locked: r.isLocked,\n\t\t\t\tis_requires_optin: r.requiresOptin,\n\t\t\t\tis_opted_in: r.isOptedIn,\n\t\t\t\ttime_limit_ms: r.time_limit_ms,\n\t\t\t\tactive_from_ts: r.active_from_ts,\n\t\t\t\tactive_till_ts: r.active_till_ts,\n\t\t\t\tdt_start: r.start_date_ts,\n\t\t\t\treward: r.ach_public_meta.reward,\n\t\t\t\tprogress: r.progress,\n\t\t\t\ttype: r.ach_type_id === AchievementType.Mission ? 'mission' : 'badge',\n\t\t\t\tcta_action: r.ach_public_meta.cta_action,\n\t\t\t\tcta_text: r.ach_public_meta.cta_text,\n\t\t\t\tcustom_section_id: r.ach_public_meta.custom_section_id,\n\t\t\t\tonly_in_custom_section: r.ach_public_meta.only_in_custom_section,\n\t\t\t\tcustom_data: IntUtils.JsonOrText(r.ach_public_meta.custom_data),\n\t\t\t\tposition: r.ach_public_meta.position,\n\t\t\t\tribbon:\n\t\t\t\t\tr.ach_public_meta.label_tag === 'custom' ? r.ach_public_meta.custom_label_tag : r.ach_public_meta.label_tag,\n\t\t\t\ttasks: (r.achievementTasks || [])\n\t\t\t\t\t.filter((t) => t.task_type_id === AchievementTaskType.CompleteAchievement)\n\t\t\t\t\t.map((t) => {\n\t\t\t\t\t\tMissionUtils.replaceFavGameNameTag({ task: t });\n\n\t\t\t\t\t\treturn ({\n\t\t\t\t\t\t\tid: t.task_id,\n\t\t\t\t\t\t\tname: t.task_public_meta?.name,\n\t\t\t\t\t\t\tpoints_reward: t.points_reward,\n\t\t\t\t\t\t\tis_completed: t.isCompleted,\n\t\t\t\t\t\t\tprogress: t.userProgress,\n\t\t\t\t\t\t\texecution_count_expected: t.executionCount,\n\t\t\t\t\t\t\texecution_count_actual: t.userExecutedCount,\n\t\t\t\t\t\t\tdisplay_progress_as_count: t.task_public_meta.display_progress_as_count,\n\t\t\t\t\t\t\tstage_image: t.task_public_meta.stage_image,\n\t\t\t\t\t\t})\n\t\t\t\t\t}),\n\t\t\t\trelated_games: (r.related_games || []).map((g, i) => ({\n\t\t\t\t\text_game_id: g.ext_game_id,\n\t\t\t\t\tgame_public_meta: {\n\t\t\t\t\t\tname: g.game_public_meta.name,\n\t\t\t\t\t\tlink: g.game_public_meta.link,\n\t\t\t\t\t\timage: g.game_public_meta.image,\n\t\t\t\t\t\tenabled: g.game_public_meta.enabled,\n\t\t\t\t\t\tgame_categories: g.game_public_meta.game_categories,\n\t\t\t\t\t\tgame_provider: g.game_public_meta.game_provider,\n\t\t\t\t\t\tmobile_spec_link: g.game_public_meta.mobile_spec_link,\n\t\t\t\t\t\tpriority: i + 1,\n\t\t\t\t\t},\n\t\t\t\t})),\n\t\t\t\tcategory_ids: r.ach_categories ?? [],\n\t\t\t\tach_completed_id: r.ach_completed_id,\n\t\t\t\trequires_prize_claim: r.requires_prize_claim,\n\t\t\t\tprize_claimed_date_ts: r.prize_claimed_date_ts,\n\t\t\t\tcomplete_date: r.complete_date,\n\t\t\t\tcomplete_date_ts: r.complete_date_ts,\n\t\t\t\tcompleted_today: completedToday,\n\t\t\t\tcompleted_this_week: completedThisWeek,\n\t\t\t\tcompleted_this_month: completedThisMonth,\n\t\t\t\tcustom_section_type_id: r.ach_public_meta.custom_section_type_id,\n\t\t\t\tavailability_status: MissionUtils.getAvailabilityStatus(r),\n\t\t\t\tclaim_button_title: r.ach_public_meta.claim_button_title,\n\t\t\t\tclaim_button_action: r.ach_public_meta.claim_button_action,\n\t\t\t\tbadgeTimeLimitState: r.badgeTimeLimitState,\n\t\t\t\thide_locked_mission: r.ach_public_meta.hide_locked_mission,\n\t\t\t\tprize_claim_expiration_date: r.prize_claim_expiration_date,\n\t\t\t\tprize_claim_period_type_id: r.prize_claim_period_type_id,\n\t\t\t};\n\n\t\t\tif (r.ach_status_id === AchievementStatus.Recurring) {\n\t\t\t\tx.next_recurrence_date_ts = Date.now() + r?.milliseconds_till_available;\n\t\t\t}\n\n\t\t\tif (r.ach_status_id === AchievementStatus.RecurringUponCompletion) {\n\t\t\t\tx.completion_count = r.completed_count;\n\t\t\t\tx.max_completion_count = r.recurring_quantity;\n\t\t\t}\n\t\t\treturn x;\n\t\t});\n};\n","export enum ScheduledMissionType {\n\tFuture = 1,\n\tPast = 2,\n\tPresent = 3,\n}\n","import { TAchCategory } from '../WSAPI/WSAPITypes';\nimport { AchCategoryPublicMeta } from './AchCategoryPublicMeta';\n\nexport interface AchCategory {\n\tid?: number;\n\tpublicMeta?: AchCategoryPublicMeta;\n}\n\nexport const AchCategoryTransform = (items: AchCategory[]): TAchCategory[] => {\n\treturn items.map((r) => {\n\t\tconst x: TAchCategory = {\n\t\t\tid: r.id,\n\t\t\tname: r.publicMeta?.name,\n\t\t\torder: r.publicMeta?.order,\n\t\t};\n\t\treturn x;\n\t});\n};\n","export enum MissionCategory {\n\tOverview,\n\t// fake category for custom section overview missions, using in TSMap.to get correct missions\n\tCustomSectionOverview,\n\tAvailable,\n\tLocked,\n\tCompleted,\n\tMissed,\n}","export enum AchievementClaimPeriodTypeId {\n\tRelativePeriod = 0,\n\tExactPeriod = 1,\n}","import { ProtocolResponse } from '../Base/ProtocolResponse';\n\nexport interface ClanTournamentPlayerRaw {\n\tuserId: number;\n\tcleanExtUserId: string;\n\tuserAltName: string;\n\tavatar_id: string;\n\tavatar_real_id: number;\n\tposition: number;\n\tscores: number;\n\tisMe: boolean;\n\tregistration_status?: number;\n\tcrmBrandId?: number;\n\tavatar_url?: string;\n}\n\nexport interface GetClanTournamentPlayersResponse extends ProtocolResponse {\n\tclan_id: number;\n\tclan_public_meta: { name: string; image_url: string };\n\tplayers: ClanTournamentPlayerRaw[];\n}\n\nexport interface TClanTournamentPlayer {\n\tuser_id: number;\n\tclean_ext_user_id: string;\n\tpublic_username: string;\n\tavatar_id: string;\n\tavatar_real_id: number;\n\tavatar_url?: string;\n\tposition: number;\n\tscores: number;\n\tis_me: boolean;\n}\n\nexport interface TClanTournamentPlayersResult {\n\tclan_id: number;\n\tclan_public_meta: { name: string; image_url: string };\n\tplayers: TClanTournamentPlayer[];\n}\n\nexport const clanTournamentPlayersTransform = (response: GetClanTournamentPlayersResponse): TClanTournamentPlayersResult => {\n\treturn {\n\t\tclan_id: response.clan_id,\n\t\tclan_public_meta: {\n\t\t\tname: response.clan_public_meta.name,\n\t\t\timage_url: response.clan_public_meta.image_url,\n\t\t},\n\t\tplayers: (response.players || []).map((p) => ({\n\t\t\tuser_id: p.userId,\n\t\t\tclean_ext_user_id: p.cleanExtUserId,\n\t\t\tpublic_username: p.userAltName,\n\t\t\tavatar_id: p.avatar_id,\n\t\t\tavatar_real_id: p.avatar_real_id,\n\t\t\tavatar_url: p.avatar_url,\n\t\t\tposition: p.position,\n\t\t\tscores: p.scores,\n\t\t\tis_me: p.isMe,\n\t\t})),\n\t};\n};\n","export enum TournamentRegistrationType {\n\tAUTO = 1,\n\tOPT_IN = 2,\n\tBUY_IN_POINTS = 3,\n\tMANUAL_APPROVAL = 4,\n\tREQUIRES_QUALIFICATION = 5,\n\tBUY_IN_GEMS = 6,\n\tBUY_IN_DIAMONDS = 7,\n\t// BUY_IN_CASH = 5???,\n}\n\nexport type TournamentRegistrationTypeName =\n\t| 'AUTO'\n\t| 'OPT_IN'\n\t| 'BUY_IN_POINTS'\n\t| 'MANUAL_APPROVAL'\n\t| 'REQUIRES_QUALIFICATION'\n\t| 'BUY_IN_GEMS'\n\t| 'BUY_IN_DIAMONDS'\n\t| 'UNKNOWN';\n\n/** @hidden */\nexport const TournamentRegistrationTypeGetName = (type: TournamentRegistrationType): TournamentRegistrationTypeName => {\n\treturn ({\n\t\t[TournamentRegistrationType.AUTO]: 'AUTO',\n\t\t[TournamentRegistrationType.BUY_IN_POINTS]: 'BUY_IN_POINTS',\n\t\t[TournamentRegistrationType.MANUAL_APPROVAL]: 'MANUAL_APPROVAL',\n\t\t[TournamentRegistrationType.OPT_IN]: 'OPT_IN',\n\t\t[TournamentRegistrationType.REQUIRES_QUALIFICATION]: 'REQUIRES_QUALIFICATION',\n\t\t[TournamentRegistrationType.BUY_IN_GEMS]: 'BUY_IN_GEMS',\n\t\t[TournamentRegistrationType.BUY_IN_DIAMONDS]: 'BUY_IN_DIAMONDS',\n\t}[type] || 'UNKNOWN') as any as TournamentRegistrationTypeName;\n};\n","export enum TournamentRegistrationStatus {\n\tNOT_REGISTERED = 0,\n\tREGISTERED = 1,\n\tFINISHED = 2,\n\tPENDING = 3,\n\tCANCELLED = 4,\n\tREGISTERED_PENDING_QUALIFICATION = 5,\n\tQUALIFIED_PENDING_REGISTRATION = 6,\n}\n\nexport enum TournamentRegistrationStatusName {\n\tNOT_REGISTERED = 'NOT_REGISTERED',\n\tREGISTERED = 'REGISTERED',\n\tFINISHED = 'FINISHED',\n\tPENDING = 'PENDING',\n\tCANCELLED = 'CANCELLED',\n\tREGISTERED_PENDING_QUALIFICATION = 'REGISTERED_PENDING_QUALIFICATION',\n\tQUALIFIED_PENDING_REGISTRATION = 'QUALIFIED_PENDING_REGISTRATION',\n\tUNKNOWN = 'UNKNOWN',\n}\n\n/** @hidden */\nexport const TournamentRegistrationStatusNamed = (type: TournamentRegistrationStatus): TournamentRegistrationStatusName => {\n\treturn ({\n\t\t[TournamentRegistrationStatus.CANCELLED]: TournamentRegistrationStatusName.CANCELLED,\n\t\t[TournamentRegistrationStatus.FINISHED]: TournamentRegistrationStatusName.FINISHED,\n\t\t[TournamentRegistrationStatus.NOT_REGISTERED]: TournamentRegistrationStatusName.NOT_REGISTERED,\n\t\t[TournamentRegistrationStatus.PENDING]: TournamentRegistrationStatusName.PENDING,\n\t\t[TournamentRegistrationStatus.QUALIFIED_PENDING_REGISTRATION]:\n\t\t\tTournamentRegistrationStatusName.QUALIFIED_PENDING_REGISTRATION,\n\t\t[TournamentRegistrationStatus.REGISTERED]: TournamentRegistrationStatusName.REGISTERED,\n\t\t[TournamentRegistrationStatus.REGISTERED_PENDING_QUALIFICATION]:\n\t\t\tTournamentRegistrationStatusName.REGISTERED_PENDING_QUALIFICATION,\n\t}[type] || TournamentRegistrationStatusName.UNKNOWN) as TournamentRegistrationStatusName;\n};\n","export enum TournamentInstanceStatus {\n\tPUBLISHED = 1,\n\tREGISTER = 2,\n\tSTARTED = 3,\n\tFINISHED = 4,\n\tCANCELLED = 5,\n\tFAILED = 6,\n\tFINALIZING = 7,\n}\n\nexport const TournamentInstanceStatusName = (s: TournamentInstanceStatus): string => {\n\treturn {\n\t\t[TournamentInstanceStatus.PUBLISHED]: 'PUBLISHED',\n\t\t[TournamentInstanceStatus.REGISTER]: 'REGISTER',\n\t\t[TournamentInstanceStatus.STARTED]: 'STARTED',\n\t\t[TournamentInstanceStatus.FINISHED]: 'FINISHED',\n\t\t[TournamentInstanceStatus.CANCELLED]: 'CANCELLED',\n\t\t[TournamentInstanceStatus.FAILED]: 'FAILED',\n\t\t[TournamentInstanceStatus.FINALIZING]: 'FINALIZING',\n\t}[s];\n};\n","import { ActivityTypeLimited } from '../Core';\nimport { Tournament } from './Tournament';\nimport { TournamentInstanceStatus } from './TournamentInstanceStatus';\nimport { TournamentPlayer } from './TournamentPlayer';\nimport { TournamentPrize } from './TournamentPrize';\nimport { TournamentRegistrationStatus } from './TournamentRegistrationStatus';\nimport { TournamentRegistrationType } from './TournamentRegistrationType';\n\nconst tournamentPrizeTypeToPrizeName = (type: ActivityTypeLimited) => {\n\treturn {\n\t\t[ActivityTypeLimited.DoNothing]: 'TANGIBLE',\n\t\t[ActivityTypeLimited.Points]: 'POINTS_ADD',\n\t\t[ActivityTypeLimited.DeductPoints]: 'POINTS_DEDUCT',\n\t\t[ActivityTypeLimited.ResetPoints]: 'POINTS_RESET',\n\t\t[ActivityTypeLimited.MiniGameAttempt]: 'MINI_GAME_ATTEMPT',\n\t\t[ActivityTypeLimited.Bonus]: 'BONUS',\n\t\t[ActivityTypeLimited.AddGemsAndDiamonds]: 'GEMS_AND_DIAMONDS_ADD',\n\t\t[ActivityTypeLimited.DeductGemsAndDiamonds]: 'GEMS_AND_DIAMONDS_DEDUCT',\n\t\t[ActivityTypeLimited.ResetGemsAndDiamonds]: 'GEMS_AND_DIAMONDS_RESET',\n\t}[type];\n};\n\nexport class TournamentUtils {\n\tpublic static isCanRegister = (tournament: Tournament): boolean => {\n\t\tif (tournament) {\n\t\t\tif (tournament.tournamentRegistrationStatus === TournamentRegistrationStatus.QUALIFIED_PENDING_REGISTRATION) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t!tournament.isUserRegistered && (\n\t\t\t\t\ttournament.playersMaxCount !== tournament.registrationCount ||\n\t\t\t\t\ttournament.playersMaxCount === null ||\n\t\t\t\t\ttournament.playersMaxCount === 0\n\t\t\t\t) &&\n\t\t\t\ttournament.registrationType !== TournamentRegistrationType.AUTO && (\n\t\t\t\t\ttournament.tournamentInstanceStatus === TournamentInstanceStatus.REGISTER || (\n\t\t\t\t\t\ttournament.tournamentInstanceStatus === TournamentInstanceStatus.STARTED && tournament.allowLateRegistration\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\treturn false;\n\t};\n\n\tpublic static isInProgress = (tournament: Tournament): boolean => {\n\t\tif (tournament) {\n\t\t\treturn tournament.tournamentInstanceStatus === TournamentInstanceStatus.STARTED;\n\t\t}\n\t\treturn false;\n\t};\n\n\tpublic static isActive = (tournament: Tournament): boolean => {\n\t\tif (tournament) {\n\t\t\treturn (\n\t\t\t\ttournament.tournamentInstanceStatus === TournamentInstanceStatus.PUBLISHED ||\n\t\t\t\ttournament.tournamentInstanceStatus === TournamentInstanceStatus.REGISTER ||\n\t\t\t\ttournament.tournamentInstanceStatus === TournamentInstanceStatus.STARTED\n\t\t\t);\n\t\t}\n\t\treturn false;\n\t};\n\n\tpublic static isFinished = (tournament: Tournament): boolean => {\n\t\tif (tournament) {\n\t\t\treturn (\n\t\t\t\ttournament.tournamentInstanceStatus === TournamentInstanceStatus.FINISHED ||\n\t\t\t\ttournament.tournamentInstanceStatus === TournamentInstanceStatus.CANCELLED ||\n\t\t\t\ttournament.tournamentInstanceStatus === TournamentInstanceStatus.FINALIZING\n\t\t\t);\n\t\t}\n\t\treturn false;\n\t};\n\n\tpublic static isCancelled = (tournament: Tournament): boolean => {\n\t\tif (tournament) {\n\t\t\treturn tournament.tournamentInstanceStatus === TournamentInstanceStatus.CANCELLED;\n\t\t}\n\t\treturn false;\n\t};\n\n\tpublic static isUpcoming = (tournament: Tournament): boolean => {\n\t\tif (tournament) {\n\t\t\treturn (\n\t\t\t\ttournament.tournamentInstanceStatus === TournamentInstanceStatus.PUBLISHED ||\n\t\t\t\ttournament.tournamentInstanceStatus === TournamentInstanceStatus.REGISTER\n\t\t\t);\n\t\t}\n\t\treturn false;\n\t};\n\n\tpublic static getPlayerTransformed = (player: TournamentPlayer, isMe?: boolean) => {\n\t\tif (player) {\n\t\t\tconst playerTransformed = {\n\t\t\t\tpublic_username: player.userAltName,\n\t\t\t\tavatar_url: player.avatar_url,\n\t\t\t\tposition: player.position,\n\t\t\t\tscores: player.scores,\n\t\t\t\tis_me: player.isMe,\n\t\t\t\tuser_ext_id: player.cleanExtUserId,\n\t\t\t\tcrm_brand_id: player.crmBrandId,\n\t\t\t\tuser_id: player.userId,\n\t\t\t};\n\n\t\t\tif (isMe) {\n\t\t\t\tdelete playerTransformed.is_me;\n\t\t\t}\n\n\t\t\treturn playerTransformed;\n\t\t}\n\n\t\treturn null;\n\t};\n\n\tpublic static getPrizeTransformed = (prize: TournamentPrize) => {\n\t\tif (prize) {\n\t\t\treturn { ...prize, type: tournamentPrizeTypeToPrizeName(prize.type) };\n\t\t}\n\n\t\treturn null;\n\t};\n}\n","import { TournamentRegistrationType, TournamentRegistrationTypeGetName } from './TournamentRegistrationType';\nimport { TournamentInstanceStatus } from './TournamentInstanceStatus';\nimport {\n\tTournamentRegistrationStatus,\n\tTournamentRegistrationStatusName,\n\tTournamentRegistrationStatusNamed,\n} from './TournamentRegistrationStatus';\nimport { TournamentType } from './TournamentType';\nimport { TournamentPublicMeta } from './TournamentPublicMeta';\nimport { TTournament } from '../WSAPI/WSAPITypes';\nimport { TournamentPlayer } from './TournamentPlayer';\nimport { TournamentPrize } from './TournamentPrize';\nimport { TournamentUtils } from './TournamentUtils';\nimport { IntUtils } from '../IntUtils';\nimport { AchRelatedGame } from '../Base/AchRelatedGame';\n\nexport interface Tournament {\n\t/** ID of tournament template */\n\ttournamentId?: number;\n\t/** ID of tournament instance. Generated every time when tournament based on specific template is scheduled for run */\n\ttournamentInstanceId?: number;\n\t/** Type of the tournament. For now only SCHEDULED is support */\n\ttournamentType?: TournamentType;\n\t/** Meta information about tournament that should be used to build UI */\n\tpublicMeta?: TournamentPublicMeta;\n\t/** Cost of registration in the tournament in gamification points */\n\tbuyInAmount?: number;\n\t/** Not in use */\n\tprizePool?: number;\n\t/** The time when tournament is going to start */\n\tstartTime?: string;\n\t/** The time when tournament is going to finish */\n\tendTime?: string;\n\t/** The time when tournament is going to start, epoch */\n\tstartTimeTs?: number;\n\t/** The time when tournament is going to finish, epoch */\n\tendTimeTs?: number;\n\t/** Number of users registered in the tournament */\n\tregistrationCount?: number;\n\t/** Not in use */\n\ttotalCount?: number;\n\t/** Type of registration in the tournament */\n\tregistrationType?: TournamentRegistrationType;\n\t/** Status of registration in the tournament for current user */\n\ttournamentRegistrationStatus?: TournamentRegistrationStatus;\n\t/** Status of tournament instance */\n\ttournamentInstanceStatus?: TournamentInstanceStatus;\n\t/** flag indicating if current user is registered in the tournament */\n\tisUserRegistered?: boolean;\n\t/** Indicator if tournament allows later registration, when tournament is already started */\n\tallowLateRegistration?: boolean;\n\t/** Minimum number of participant for this tournament. If tournament doesnt have enough registrations, it will not start */\n\tplayersMinCount?: number;\n\t/** Maximum number of participant for this tournament. When reached, new users won't be able to register */\n\tplayersMaxCount?: number;\n\t/** Tournament duration in millisecnnds */\n\tdurationMs?: number;\n\t/** prizes structure */\n\tprizeStructure?: {\n\t\tprizes: TournamentPrize[];\n\t};\n\t/** Information about current user */\n\ttournamentPlayer?: TournamentPlayer;\n\n\t/** List of casino games (or other types of entities) related to the tournament */\n\trelated_games?: AchRelatedGame[];\n\t/** The minimum amount of score points that the user should get in order to be qualified for the prize */\n\tminScoreToWin?: number;\n\t/** When enabled, users who don't meet the minimum qualifying score will be hidden from the Leaderboard. */\n\thideLeaderboardsMinScores?: boolean;\n\t/** Total scores across all participants in the tournament */\n\ttotalScores?: number;\n\t/** Indicates if the tournament is clan-based */\n\tisClanBased?: boolean;\n}\n\nexport const TournamentItemsTransform = (items: Tournament[]): TTournament[] => {\n\treturn items\n\t\t.filter((r) => r.tournamentId >= 1)\n\t\t.map((r) => {\n\t\t\tconst x: TTournament = {\n\t\t\t\tinstance_id: r.tournamentInstanceId,\n\t\t\t\ttournament_id: r.tournamentId,\n\t\t\t\tname: r.publicMeta.name,\n\t\t\t\tdescription: r.publicMeta.description,\n\t\t\t\tsegment_dont_match_message: r.publicMeta.segment_dont_match_message,\n\t\t\t\timage1: r.publicMeta.image_url,\n\t\t\t\timage2: r.publicMeta.image_url2,\n\t\t\t\timage2_mobile: r.publicMeta.image_url2_mobile,\n\t\t\t\tprize_pool_short: r.publicMeta.prize_pool_short,\n\t\t\t\tcustom_price_text: r.publicMeta.custom_price_text,\n\t\t\t\tcustom_section_id: r.publicMeta.custom_section_id,\n\t\t\t\tcustom_data: IntUtils.JsonOrText(r.publicMeta.custom_data),\n\t\t\t\tis_featured: r.publicMeta.featured,\n\t\t\t\tribbon: r.publicMeta.label_tag === 'custom' ? r.publicMeta.custom_label_tag : r.publicMeta.label_tag,\n\t\t\t\tpriority: r.publicMeta.position,\n\n\t\t\t\tstart_time: r.startTimeTs,\n\t\t\t\tend_time: r.endTimeTs,\n\t\t\t\tregistration_count: r.registrationCount,\n\t\t\t\tis_user_registered: r.isUserRegistered,\n\t\t\t\tplayers_min_count: r.playersMinCount,\n\t\t\t\tplayers_max_count: r.playersMaxCount,\n\t\t\t\tregistration_status: TournamentRegistrationStatusNamed(r.tournamentRegistrationStatus),\n\n\t\t\t\tregistration_type: TournamentRegistrationTypeGetName(r.registrationType),\n\t\t\t\t...(r.registrationType === TournamentRegistrationType.BUY_IN_POINTS ? { registration_cost_points: r.buyInAmount } : {}),\n\t\t\t\t...(r.registrationType === TournamentRegistrationType.BUY_IN_GEMS ? { registration_cost_gems: r.buyInAmount } : {}),\n\t\t\t\t...(r.registrationType === TournamentRegistrationType.BUY_IN_DIAMONDS ? { registration_cost_diamonds: r.buyInAmount } : {}),\n\t\t\t\tduration_ms: r.durationMs,\n\n\t\t\t\tis_active: TournamentUtils.isActive(r),\n\t\t\t\tis_can_register: TournamentUtils.isCanRegister(r),\n\t\t\t\tis_cancelled: TournamentUtils.isCancelled(r),\n\t\t\t\tis_finished: TournamentUtils.isFinished(r),\n\t\t\t\tis_in_progress: TournamentUtils.isInProgress(r),\n\t\t\t\tis_upcoming: TournamentUtils.isUpcoming(r),\n\n\t\t\t\tmin_scores_win: r.minScoreToWin,\n\t\t\t\thide_leaderboard_min_scores: r.hideLeaderboardsMinScores,\n\t\t\t\ttotal_scores: r.totalScores,\n\t\t\t\tis_clan_based: r.isClanBased,\n\t\t\t};\n\n\t\t\tif (r.prizeStructure) {\n\t\t\t\tx.prizes = r.prizeStructure.prizes.map((p) => TournamentUtils.getPrizeTransformed(p));\n\t\t\t}\n\n\t\t\tif (r.tournamentPlayer) {\n\t\t\t\tx.me = TournamentUtils.getPlayerTransformed(r.tournamentPlayer, true);\n\t\t\t}\n\n\t\t\treturn x;\n\t\t});\n};\n","import { Tournament, TournamentItemsTransform } from './Tournament';\nimport { TournamentPlayer } from './TournamentPlayer';\nimport { ProtocolResponse } from '../Base/ProtocolResponse';\nimport { TournamentPrize } from './TournamentPrize';\nimport { TTournamentDetailed } from '../WSAPI/WSAPITypes';\nimport { TournamentUtils } from './TournamentUtils';\nimport { ClanLeaderboardEntry, ClanPrizeStructureEntry } from './TournamentClan';\n\nexport interface GetTournamentInfoResponse extends ProtocolResponse {\n\t/** tournament info */\n\ttournamentInfo: {\n\t\t/** id of label, not in use */\n\t\tlabelId: number;\n\t\ttournamentLobbyInfo: Tournament;\n\t\t/** list of registered users */\n\t\tplayers: TournamentPlayer[];\n\t};\n\t/** information about current user position */\n\tuserPosition: TournamentPlayer;\n\t/** prizes structure */\n\tprizeStructure?: {\n\t\tprizes: TournamentPrize[];\n\t};\n\t/** Ranked list of clans in this tournament. Empty/null for non-clan tournaments. */\n\tclanLeaderboard?: ClanLeaderboardEntry[] | null;\n\t/**\n\t * The clan ID the current user belongs to.\n\t * null when the user has no clan or the tournament is not clan-based.\n\t * Match against clanLeaderboard[i].clan_id to highlight the user's clan row.\n\t */\n\tuserClanId?: number | null;\n\t/** Per-clan prize structure. Empty/null for non-clan tournaments. */\n\tclanPrizes?: ClanPrizeStructureEntry[] | null;\n}\n\nexport const tournamentInfoItemTransform = (t: GetTournamentInfoResponse): TTournamentDetailed => {\n\tconst response: TTournamentDetailed = {\n\t\t...TournamentItemsTransform([t.tournamentInfo?.tournamentLobbyInfo ?? null])?.[0],\n\t\trelated_games: (t.tournamentInfo.tournamentLobbyInfo.related_games || []).map((g, i) => ({\n\t\t\text_game_id: g.ext_game_id,\n\t\t\tgame_public_meta: {\n\t\t\t\tname: g.game_public_meta.name,\n\t\t\t\tlink: g.game_public_meta.link,\n\t\t\t\timage: g.game_public_meta.image,\n\t\t\t\tenabled: g.game_public_meta.enabled,\n\t\t\t\tgame_categories: g.game_public_meta.game_categories,\n\t\t\t\tgame_provider: g.game_public_meta.game_provider,\n\t\t\t\tmobile_spec_link: g.game_public_meta.mobile_spec_link,\n\t\t\t\tpriority: i + 1,\n\t\t\t},\n\t\t})),\n\t\tplayers: t.tournamentInfo.players.map((p) => TournamentUtils.getPlayerTransformed(p)),\n\t};\n\n\tif (t.prizeStructure) {\n\t\tresponse.prizes = t.prizeStructure.prizes.map((p) => TournamentUtils.getPrizeTransformed(p));\n\t}\n\n\tif (t.userPosition) {\n\t\tresponse.me = TournamentUtils.getPlayerTransformed(t.userPosition, true);\n\t}\n\n\tif (t.tournamentInfo?.tournamentLobbyInfo?.isClanBased) {\n\t\tresponse.is_clan_based = true;\n\t\tresponse.user_clan_id = t.userClanId ?? null;\n\t\tresponse.clan_leaderboard = t.clanLeaderboard\n\t\t\t? t.clanLeaderboard.map((entry) => ({\n\t\t\t\t\tclan_id: entry.clanId,\n\t\t\t\t\tpublic_meta: {\n\t\t\t\t\t\tname: entry.publicMeta.name,\n\t\t\t\t\t\tdescription: entry.publicMeta.description,\n\t\t\t\t\t\timage_url: entry.publicMeta.image_url,\n\t\t\t\t\t},\n\t\t\t\t\tposition: entry.rank,\n\t\t\t\t\ttotal_score: entry.totalScore,\n\t\t\t\t\tcontributing_members: entry.memberCount,\n\t\t\t }))\n\t\t\t: null;\n\t\tresponse.clan_prize_structure = t.clanPrizes\n\t\t\t? t.clanPrizes.map((entry) => ({\n\t\t\t\t\tclan_place: entry.clan_place,\n\t\t\t\t\tprize_type_id: entry.prize_type_id,\n\t\t\t\t\tprize_pool_amount: entry.prize_pool_amount,\n\t\t\t\t\tprize_pool_currency_code: entry.prize_pool_currency_code,\n\t\t\t\t\tactivity_type_id: entry.activity_type_id,\n\t\t\t\t\tdetails_json: entry.details_json,\n\t\t\t\t\tpublic_meta: entry.public_meta\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tname: entry.public_meta.name,\n\t\t\t\t\t\t\t\tdescription: entry.public_meta.description,\n\t\t\t\t\t\t\t\timage_url: entry.public_meta.image_url,\n\t\t\t\t\t\t\t\tprize_name: entry.public_meta.prize_name,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: null,\n\t\t\t\t\ttiers: (entry.player_tiers || []).map((tier) => ({\n\t\t\t\t\t\tplayer_place_from: tier.player_place_from,\n\t\t\t\t\t\tplayer_place_to: tier.player_place_to,\n\t\t\t\t\t\tpool_amount: tier.pool_amount,\n\t\t\t\t\t\tdistribution_type: tier.distribution_type,\n\t\t\t\t\t\tactivity_type_id: tier.activity_type_id,\n\t\t\t\t\t\tdetails_json: tier.details_json,\n\t\t\t\t\t\tpublic_meta: tier.public_meta\n\t\t\t\t\t\t\t? { name: tier.public_meta.name, description: tier.public_meta.description, image_url: tier.public_meta.image_url }\n\t\t\t\t\t\t\t: null,\n\t\t\t\t\t})),\n\t\t\t }))\n\t\t\t: null;\n\t}\n\n\treturn response;\n};\n","export enum TournamentRegistrationError {\n\tNO_ERROR = 0,\n\tTOURNAMENT_USER_CANNOT_JOIN_WITHOUT_CLAN = 1010,\n\tTOURNAMENT_INSTANCE_NOT_FOUND = 30001,\n\tTOURNAMENT_REGISTRATION_NOT_ENOUGH_POINTS = 30002,\n\tTOURNAMENT_INSTANCE_NOT_IN_STATE = 30003,\n\tTOURNAMENT_ALREADY_REGISTERED = 30004,\n\tTOURNAMENT_USER_DONT_MATCH_CONDITIONS = 30005,\n\tTOURNAMENT_USER_NOT_REGISTERED = 30006,\n\tTOURNAMENT_CANT_CHANGE_REGISTRATION_STATUS = 30007,\n\tTOURNAMENT_MAX_REGISTRATIONS_REACHED = 30008,\n}\n","export enum TournamentType {\n\tSCHEDULED = 1,\n\tSNG = 2,\n\tTEST = 3,\n}\n","export enum LeaderBoardPeriodType {\n\tDAILY = 1,\n\tWEEKLY = 2,\n\tMONTHLY = 3,\n}\n","import { LeaderBoardDetailsT, LeaderBoardUserT, LeaderBoardsRewardsT } from '../WSAPI/WSAPITypes';\nimport { LeaderBoardDetails } from './LeaderBoardDetails';\nimport { LeaderBoardPeriodType } from './LeaderBoardPeriodType';\nimport { LeaderBoardPosition } from './LeaderBoardPosition';\n\nconst pointsRewardTransform = (reward_points: number[]): LeaderBoardsRewardsT[] => {\n\tif (reward_points && reward_points.length) {\n\t\treturn reward_points.map((r, i) => ({ place: i + 1, points: r }));\n\t}\n\n\treturn null;\n};\n\nconst getLeaderBoardPlayerTransformed = (user: LeaderBoardPosition, isMe?: boolean): LeaderBoardUserT => {\n\tif (user) {\n\t\tconst x: LeaderBoardUserT = {\n\t\t\tpublic_username: user?.public_username || user.user_alt_name,\n\t\t\tavatar_url: user.avatar_url,\n\t\t\tposition: user.position_in_board,\n\t\t\tpoints: user.points_accumulated,\n\t\t\tis_me: user.is_me,\n\t\t};\n\n\t\tif (isMe) {\n\t\t\tdelete x.is_me;\n\t\t}\n\n\t\treturn x;\n\t}\n\n\treturn null;\n};\n\nexport const getLeaderBoardTransform = (board: LeaderBoardDetails): LeaderBoardDetailsT => {\n\tif (board) {\n\t\tconst x: LeaderBoardDetailsT = {\n\t\t\tboard_id: board.board_id,\n\t\t\tname: board.board_public_meta.name,\n\t\t\tdescription: board.board_public_meta.description,\n\t\t\trules: board.board_public_meta.rules,\n\t\t\tperiod_type_id: board.period_type_id,\n\t\t\trewards: pointsRewardTransform(board.reward_points),\n\t\t\tusers: board.positions.map((p) => getLeaderBoardPlayerTransformed(p)),\n\t\t\tme: getLeaderBoardPlayerTransformed(board.userPosition, true),\n\t\t};\n\n\t\treturn x;\n\t}\n\n\treturn null;\n};\n","import { IntUtils } from '../IntUtils';\nimport { ProtocolResponse } from '../Base/ProtocolResponse';\nimport { TLevel } from '../WSAPI/WSAPITypes';\nimport { Level } from './Level';\n\nexport interface GetLevelMapResponse extends ProtocolResponse {\n\tlevels: Level[];\n}\n\nexport const GetLevelMapResponseTransform = (levels: GetLevelMapResponse): TLevel[] => {\n\tif (!levels?.levels) return [];\n\n\tconst mapped = levels.levels.map((l) => ({\n\t\tid: l.level_id,\n\t\tname: l.level_public_meta.name,\n\t\tdescription: l.level_public_meta.description,\n\t\timage: l.level_public_meta.image_url,\n\t\trequired_points: l.required_points,\n\t\tvisibility_points: l.level_public_meta.visibility_points ? parseInt(l.level_public_meta.visibility_points as any) : null,\n\t\trequired_level_counter_1: l.required_level_counter_1,\n\t\trequired_level_counter_2: l.required_level_counter_2,\n\t\tcustom_data: IntUtils.JsonOrText(l.level_public_meta?.custom_data),\n\t\tordinal_position: 0,\n\t}));\n\n\tconst ordinalById = new Map<number, number>();\n\t[...mapped]\n\t\t.sort((a, b) => a.required_points - b.required_points)\n\t\t.forEach((l, index) => ordinalById.set(l.id, index + 1));\n\n\treturn mapped.map((l) => ({ ...l, ordinal_position: ordinalById.get(l.id) }));\n};\n","import { TRaffle, TRaffleDraw, TRafflePrize, TRafflePrizeWinner, TRaffleTicket } from '../WSAPI/WSAPITypes';\nimport { ProtocolResponse } from '../Base/ProtocolResponse';\nimport { Raffle } from './Raffle';\nimport { RaffleDraw } from './RaffleDraw';\nimport { RafflePrize } from './RafflePrize';\nimport { RafflePrizeWinner } from './RafflePrizeWinner';\nimport { RaffleTicket } from './RaffleTicket';\n\nexport interface GetRafflesResponse extends ProtocolResponse {\n\titems: Raffle[];\n}\n\n/** @hidden */\nexport const ticketsTransform = (items: RaffleTicket[]): TRaffleTicket[] => {\n\treturn items.map((item) => {\n\t\treturn {\n\t\t\tticekt_id: item.id,\n\t\t\tticket_id_string: item.s,\n\t\t};\n\t});\n};\n\n/** @hidden */\nexport const winnersTransform = (items: RafflePrizeWinner[]): TRafflePrizeWinner[] => {\n\treturn items.map((item) => {\n\t\treturn {\n\t\t\tid: item.user_id,\n\t\t\tusername: item.public_username,\n\t\t\tavatar_url: item.avatar_url || item.avatar_id,\n\t\t\tticket: { ticekt_id: item.ticket.id, ticket_id_string: item.ticket.s },\n\t\t\traf_won_id: item.raf_won_id,\n\t\t\tclaimed_date: item.claimed_date,\n\t\t};\n\t});\n};\n\n/** @hidden */\nexport const prizeTransform = (items: RafflePrize[]): TRafflePrize[] => {\n\treturn items.map((item) => {\n\t\treturn {\n\t\t\tid: item.prize_id,\n\t\t\tname: item.public_meta.name,\n\t\t\tdescription: item.public_meta.description,\n\t\t\timage_url: item.public_meta.image_url,\n\t\t\tprizes_per_run: item.prizes_per_run,\n\t\t\tprizes_per_run_actual: item.prizes_per_run_actual,\n\t\t\tchances_to_win_perc: item.chances_to_win_perc,\n\t\t\tmin_required_total_tickets: item.min_required_total_tickets,\n\t\t\tcap_prizes_per_run: item.cap_prizes_per_run,\n\t\t\tpriority: item.priority,\n\t\t\tstock_items_per_draw: item.stock_items_per_draw,\n\t\t\tshould_claim: item.should_claim,\n\t\t\twinners: winnersTransform(item.winners),\n\t\t\trequires_claim: item.requires_claim,\n\t\t\tmin_required_tickets_for_user: item.min_required_tickets_for_user,\n\t\t};\n\t});\n};\n\n/** @hidden */\nexport const drawTransform = (items: RaffleDraw[]): TRaffleDraw[] => {\n\treturn items.map((item) => {\n\t\treturn {\n\t\t\tid: item.draw_id,\n\t\t\tname: item.public_meta.name,\n\t\t\tdescription: item.public_meta.description,\n\t\t\timage_url: item.public_meta.image_url,\n\t\t\timage_url_mobile: item.public_meta.image_url_mobile,\n\t\t\ticon_url: item.public_meta.icon_url,\n\t\t\tbackground_image_url: item.public_meta.background_image_url,\n\t\t\tbackground_image_url_mobile: item.public_meta.background_image_url_mobile,\n\t\t\tis_grand: item.public_meta.is_grand,\n\t\t\tprizes: prizeTransform(item.prizes),\n\t\t\tcurrent_state: item.current_state,\n\t\t\trun_id: item.run_id,\n\t\t\texecution_type: item.execution_type,\n\t\t\texecution_ts: item.execution_ts,\n\t\t\tprevious_run_ts: item.previous_run_ts,\n\t\t\tprevious_run_id: item.previous_run_id,\n\t\t\tticket_start_ts: item.ticket_start_ts,\n\t\t\tallow_multi_prize_per_ticket: item.allow_multi_prize_per_ticket,\n\t\t\ttotal_tickets_count: item.total_tickets_count,\n\t\t\tmy_tickets_count: item.my_tickets_count,\n\t\t\tmy_last_tickets: ticketsTransform(item.my_last_tickets),\n\t\t\tuser_opted_in: Boolean(item.user_opted_in),\n\t\t\trequires_optin: Boolean(item.requires_optin),\n\t\t\tis_active: Boolean(item.is_active),\n\t\t\twinners_limit: item.winners_limit,\n\t\t\twinners_offset: item.winners_offset,\n\t\t\twinners_total: item.winners_total,\n\t\t};\n\t});\n};\n\n/** @hidden */\nexport const raffleTransform = (items: Raffle[]): TRaffle[] => {\n\treturn items.map((item) => {\n\t\treturn {\n\t\t\tid: item.raffle_id,\n\t\t\tname: item.public_meta.name,\n\t\t\tdescription: item.public_meta.description,\n\t\t\tcustom_section_id: item.public_meta.custom_section_id,\n\t\t\timage_url: item.public_meta.image_url,\n\t\t\timage_url_mobile: item.public_meta.image_url_mobile,\n\t\t\tcustom_data: item.public_meta.custom_data,\n\t\t\tstart_date: item.start_date_ts,\n\t\t\tend_date: item.end_date_ts,\n\t\t\tmax_tickets_count: item.max_tickets_count,\n\t\t\tcurrent_tickets_count: item.current_tickets_count,\n\t\t\tdraws: drawTransform(item.draws),\n\t\t\tticket_cap_visualization: item.public_meta.ticket_cap_visualization,\n\t\t};\n\t});\n};\n","import { TRaffleDraw } from '../WSAPI/WSAPITypes';\nimport { ProtocolResponse } from '../Base/ProtocolResponse';\nimport { RaffleDraw } from './RaffleDraw';\nimport { prizeTransform, ticketsTransform } from './GetRafflesResponse';\n\nexport interface GetDrawRunResponse extends ProtocolResponse {\n\tdraw: RaffleDraw;\n}\n\n/** @hidden */\nexport const drawRunTransform = (res: GetDrawRunResponse): TRaffleDraw => {\n\treturn {\n\t\tid: res.draw.draw_id,\n\t\tname: res.draw.public_meta.name,\n\t\tdescription: res.draw.public_meta.description,\n\t\timage_url:res.draw.public_meta.image_url,\n\t\timage_url_mobile:res.draw.public_meta.image_url_mobile,\n\t\ticon_url: res.draw.public_meta.icon_url,\n\t\tbackground_image_url: res.draw.public_meta.background_image_url,\n\t\tbackground_image_url_mobile: res.draw.public_meta.background_image_url_mobile,\n\t\tis_grand: res.draw.public_meta.is_grand,\n\t\tprizes: prizeTransform(res.draw.prizes),\n\t\tcurrent_state: res.draw.current_state,\n\t\trun_id: res.draw.run_id,\n\t\texecution_type: res.draw.execution_type,\n\t\texecution_ts: res.draw.execution_ts,\n\t\tprevious_run_ts: res.draw.previous_run_ts,\n\t\tprevious_run_id: res.draw.previous_run_id,\n\t\tticket_start_ts: res.draw.ticket_start_ts ?? res.draw['ticket_start_date'],\n\t\tallow_multi_prize_per_ticket: res.draw.allow_multi_prize_per_ticket,\n\t\ttotal_tickets_count: res.draw.total_tickets_count,\n\t\tmy_tickets_count: res.draw.my_tickets_count,\n\t\tmy_last_tickets: ticketsTransform(res.draw.my_last_tickets),\n\t\tuser_opted_in: Boolean(res.draw.user_opted_in),\n\t\trequires_optin: Boolean(res.draw.requires_optin),\n\t\tis_active: Boolean(res.draw.is_active),\n\t\twinners_limit: res.draw.winners_limit,\n\t\twinners_offset: res.draw.winners_offset,\n\t\twinners_total: res.draw.winners_total,\n\t} \t\n};","import { RaffleDraw } from \"./RaffleDraw\";\n\nexport enum RaffleTicketCapVisualization {\n\t/** Show nothing */\n\tEmpty = 0,\n\t/** Show ticket counter */\n\tCounter = 1,\n\t/** Show message when ticket cap is reached */\n\tMessage = 2,\n}\n\ninterface RafflePublicMeta {\n /** Name of the raffle */\n name: string;\n /** Description of the raffle */\n description: string;\n /** ID of the custom section that is linked to the raffle in the Gamification widget */\n custom_section_id: number;\n /** URL of the image that represents the raffle */\n image_url: string;\n /** URL of the mobile image that represents the raffle */\n image_url_mobile: string;\n /** Text for Terms and Conditions */\n hint_text:string;\n /** \n\t * Custom data as string or JSON string that can be used in API to build custom UI\n\t * You can request from Smartico to define fields for your specific case that will be managed from Smartico BackOffice\n\t * Read more here - <https://help.smartico.ai/welcome/products/general-concepts/custom-fields-attributes>\n */\n\tcustom_data: string;\n\n /**\n * - Value 1 (Counter): Shows a real-time \"Tickets Remaining\" display available during the whole Raffle activity.\n * - Value 2 (Message): Will show a specific message that triggers only when the cap is reached and inform users that tickets will be no longer be issued.\n */\n ticket_cap_visualization?: RaffleTicketCapVisualization;\n}\n\n\ninterface Raffle {\n /** ID of the Raffle template */\n raffle_id: number;\n /** Meta information about raffle for the presentation on UI */\n public_meta: RafflePublicMeta;\n /** Date of start */\n start_date_ts: number;\n /** Date of end */\n end_date_ts: number; \n /** Maximum numer of tickets that can be given to all users for the whole period of raffle */\n max_tickets_count: number;\n /** \n * Number of tickets that are already given to all users for this raffle\n */\n current_tickets_count: number;\n\n /** \n * List of draws that are available for this raffle.\n * For example, if the raffle is containg one hourly draw, one daily draw and one draw on fixed date like 01/01/2022,\n * Then the list will always return 3 draws, no matter if the draws are already executed or they are in the future.\n */\n draws: RaffleDraw[]\n\n}\n\nexport { Raffle, RafflePublicMeta };\n","import { RaffleDrawPublicMeta } from \"./RaffleDrawPublicMeta\";\nimport { RafflePrize } from \"./RafflePrize\";\nimport { RaffleTicket } from \"./RaffleTicket\";\n\nexport enum RaffleDrawInstanceState {\n /** Draw is open for the tickets collection */\n Open = 1,\n /** Winner selection is in progress */\n WinnerSelection = 2,\n /** Draw is executed and the winners are selected */\n Executed = 3,\n}\n\nexport enum RaffleDrawTypeExecution {\n /** Draw is executed only once */\n ExecDate = 0,\n /** Draw is executed on a recurring basis */\n Recurring = 1,\n /** \n * Draw is executed once and is marked as grand.\n * This means it is a special or significant draw,\n * often with larger prizes or more importance.\n */\n Grand = 2,\n}\n\n\ninterface RaffleDraw {\n /** \n * Id of the Draw definition, for the repetative draws (e.g. daily), this number will be the same for all draws that are repeating daily\n * (internal name: schedule_id)\n */\n draw_id: number;\n\n /** Meta information of the Draw for the presentaiton in UI */\n public_meta: RaffleDrawPublicMeta;\n\n /** Information about prizes in the draw */\n prizes: RafflePrize[];\n\n /** \n * State of current instance of Draw\n */\n current_state: RaffleDrawInstanceState;\n\n /** \n * Field indicates the ID of the latest instance/run of draw\n */\n run_id: number;\n\n /** \n * Type of the draw execution, indicating how and when the draw is executed.\n * \n * - ExecDate: Draw is executed only once at a specific date and time.\n * - Recurring: Draw is executed on a recurring basis (e.g., daily, weekly).\n * - Grand: Draw is executed once and is marked as grand, often with larger prizes or more importance.\n */\n execution_type: RaffleDrawTypeExecution;\n\n /** Date/time of the draw execution */\n execution_ts: number;\n \n /** Date of the previously executed draw (if there is such) */\n previous_run_ts?: number;\n\n /** Unique ID of the previusly executed draw (if there is such) */\n previous_run_id?: number; \n\n /** \n * Date/time starting from which the tickets will participate in the upcoming draw\n * This value need to be taken into account with next_execute_ts field value, for example\n * Next draw is at 10:00, ticket_start_date is 9:00, so all tickets that are collected after 9:00 will participate in the draw at 10:00\n * (internally this value is calculated as next_execute_ts - ticket_start_date)\n */\n ticket_start_ts: number;\n\n /** \n * Field is indicating if same ticket can win multiple prizes in the same draw\n * For example there are 3 types of prizes in the draw - iPhone, iPad, MacBook\n * If this field is true, then one ticket can win all 3 prizes (depending on the chances of course),\n * if false, then one ticket can win only one prize.\n * The distribution of the prizes is start from top (assuming on top are the most valuable prizes) to bottom (less valuable prizes)\n * If specific prize has multiple values, e.g. we have 3 iPhones,\n * then the same ticket can win only one prize of a kind, but can win multiple prizes of different kind (if allow_multi_prize_per_ticket is true)\n */\n allow_multi_prize_per_ticket: boolean;\n\n\n /** \n * The number of tickets that are already given to all users for this instance of draw.\n * In other words tickets that are collected between ticket_start_date and current time (or till current_execution_ts is the instance is executed).\n */\n total_tickets_count: number;\n\n /** \n * The number of tickets collected by current user for this instance of draw.\n */\n my_tickets_count: number;\n\n /**\n * List of last 5 tickets are collected by current user for this instance of draw.\n */\n my_last_tickets: RaffleTicket[];\n\t/**\n\t * If true, the user has opted-in to the raffle.\n\t */\n\tuser_opted_in: boolean;\n\t/**\n\t * If true, the user needs to opt-in to the raffle before they can participate.\n\t */\n\trequires_optin: boolean;\n\n /**\n * If true, the draw is active and can be participated in.\n */\n is_active: boolean;\n /**\n * The number of winners to return\n */\n\twinners_limit?: number;\n\n /**\n * The offset of the winners to return\n */\n\twinners_offset?: number;\n\n /**\n * The total number of winners\n */\n\twinners_total?: number;\n}\n\nexport { RaffleDraw };\n","import { TRaffleDrawRun } from '../WSAPI/WSAPITypes';\nimport { ProtocolResponse } from '../Base/ProtocolResponse';\nimport { RaffleDrawRun } from './RaffleDrawRun';\n\nexport interface GetRaffleDrawRunsHistoryResponse extends ProtocolResponse {\n\tdraw_runs: RaffleDrawRun[];\n}\n\n/** @hidden */\nexport const drawRunHistoryTransform = (res: GetRaffleDrawRunsHistoryResponse): TRaffleDrawRun[] => {\n\treturn res.draw_runs.map((item) => {\n\t\treturn {\n\t\t\tid: item.draw_id,\n\t\t\trun_id: item.run_id,\n\t\t\tname: item.public_meta.name,\n\t\t\tdescription: item.public_meta.description,\n\t\t\timage_url: item.public_meta.image_url,\n\t\t\timage_url_mobile: item.public_meta.image_url_mobile,\n\t\t\ticon_url: item.public_meta.icon_url,\n\t\t\tbackground_image_url: item.public_meta.background_image_url,\n\t\t\tbackground_image_url_mobile: item.public_meta.background_image_url_mobile,\n\t\t\tis_grand: item.public_meta.is_grand,\n\t\t\texecution_ts: item.execution_ts,\n\t\t\tactual_execution_ts:item.actual_execution_ts,\n\t\t\tticket_start_ts:item.ticket_start_ts,\n\t\t\tis_winner:item.is_winner,\n\t\t\thas_unclaimed_prize:item.has_unclaimed_prize\n\t\t};\n\t});\n};\n","import { TransformedRaffleClaimPrizeResponse } from \"../WSAPI/WSAPITypes\";\nimport { ProtocolResponse } from \"../Base/ProtocolResponse\";\n\nexport interface RaffleClaimPrizeResponse extends ProtocolResponse {\n errCode: number\n errMsg?: string\n}\n\n/** @hidden */\nexport const raffleClaimPrizeResponseTransform = (info: RaffleClaimPrizeResponse): TransformedRaffleClaimPrizeResponse => {\n return {\n errorCode: info.errCode,\n errorMessage: info.errMsg\n }\n}\n","import { ClassId } from '../Base/ClassId';\nimport { ActivityTypeLimited, CoreUtils } from '../Core';\nimport {\n\tSAWSpinsCountPush,\n} from '../MiniGames';\nimport { ECacheContext, OCache } from '../OCache';\nimport { SmarticoAPI } from '../SmarticoAPI';\nimport {\n\tInboxMarkMessageAction,\n\tLeaderBoardDetailsT,\n\tTAchCategory,\n\tTBuyStoreItemResult,\n\tTGetTranslations,\n\tTInboxMessage,\n\tTInboxMessageBody,\n\tTLevel,\n\tTMiniGamePlayResult,\n\tTMiniGameTemplate,\n\tTMissionClaimRewardResult,\n\tTMissionOptInResult,\n\tTMissionOrBadge,\n\tTSegmentCheckResult,\n\tTStoreCategory,\n\tTStoreItem,\n\tTTournament,\n\tTTournamentDetailed,\n\tTTournamentRegistrationResult,\n\tTUICustomSection,\n\tTUserProfile,\n\tUserLevelExtraCountersT,\n\tTBonus,\n\tTClaimBonusResult,\n\tTMiniGamePlayBatchResult,\n\tTSawHistory,\n\tTRaffle,\n\tTRaffleDraw,\n\tTRaffleDrawRun,\n\tTransformedRaffleClaimPrizeResponse,\n\tTLevelCurrent,\n\tTActivityLog,\n\tTRaffleOptinResponse,\n\tTClans,\n\tTClanInfo,\n\tTClanJoinResult,\n\tTClanTournamentPlayers,\n\tGamesApiResponse,\n\tGamePickRound,\n\tGamePickRoundBoard,\n\tGamePickUserInfo,\n\tGamePickGameInfo,\n\tGamePickRequestParams,\n\tGamePickRoundRequestParams,\n\tTAvatarDefinition,\n\tTAvatarCustomized,\n\tTAvatarPrompt,\n\tTSetAvatarResult,\n} from './WSAPITypes';\nimport { LeaderBoardPeriodType } from '../Leaderboard';\nimport {\n\tJackpotDetails,\n\tJackpotPot,\n\tJackpotWinPush,\n\tJackpotWinnerHistory,\n\tJackpotsOptinResponse,\n\tJackpotsOptoutRequest,\n\tJackpotsOptoutResponse,\n} from '../Jackpots';\nimport { GetRelatedAchTourResponse } from '../Missions/GetRelatedAchTourResponse';\nimport { InboxCategories } from '../Inbox/InboxCategories';\nimport {\n\tdrawRunHistoryTransform,\n\traffleClaimPrizeResponseTransform,\n} from '../Raffle';\nimport { IntUtils } from '../IntUtils';\nimport { TGetJackpotEligibleGamesResponse } from '../Jackpots/GetJackpotEligibleGamesResponse';\nimport { InboxReadStatus } from '../Inbox/InboxReadStatus';\n\n/** @hidden */\nconst CACHE_DATA_SEC = 30;\n\nconst JACKPOT_TEMPLATE_CACHE_SEC = 30;\nconst JACKPOT_POT_CACHE_SEC = 1;\nconst JACKPOT_WINNERS_CACHE_SEC = 30;\nconst JACKPOT_ELIGIBLE_GAMES_CACHE_SEC = 30;\n\n/** @hidden */\nenum onUpdateContextKey {\n\tSaw = 'saw',\n\tMissions = 'missions',\n\tTournamentList = 'tournamentList',\n\tInboxMessages = 'inboxMessages',\n\tBadges = 'badges',\n\tLevels = 'levels',\n\tStoreItems = 'storeItems',\n\tStoreCategories = 'storeCategories',\n\tAchCategories = 'achCategories',\n\tLeaderBoards = 'leaderBoards',\n\tLevelExtraCounters = 'levelExtraCounters',\n\tSegments = 'segments',\n\tStoreHistory = 'storeHistory',\n\tJackpots = 'jackpots',\n\tPots = 'Pots',\n\tCustomSections = 'customSections',\n\tBonuses = 'bonuses',\n\tClans = 'clans',\n\tSAWHistory = 'sawHistory',\n\tJackpotWinners = 'jackpotWinners',\n\tRaffles = 'raffles',\n\tJackpotEligibleGames = 'jackpotEligibleGames',\n\tCurrentLevel = 'currentLevel',\n\tInboxUnreadCount = 'inboxUnreadCount',\n\tActivityLog = 'activityLog',\n\tAvatarsList = 'avatarsList',\n\tAvatarsCustomized = 'avatarsCustomized',\n\tAvatarPrompts = 'avatarPrompts',\n}\n\n/** @group General API */\nexport class WSAPI {\n\tprivate onUpdateCallback: Map<onUpdateContextKey, (data: any) => void> = new Map();\n\tprivate jackpotGetSignature: string = '';\n\tprivate userExtId: string = null;\n\n\t/** @private */\n\tconstructor(private api: SmarticoAPI, userExtId: string = null) {\n\t\tthis.userExtId = userExtId;\n\t\tOCache.clearAll();\n\t\tif (this.api.tracker) {\n\t\t\tconst on = this.api.tracker.on;\n\n\t\t\ton(ClassId.SAW_SPINS_COUNT_PUSH, (data: SAWSpinsCountPush) => this.updateOnSpin(data));\n\t\t\ton(ClassId.SAW_SHOW_SPIN_PUSH, () => this.reloadMiniGameTemplate());\n\t\t\ton(ClassId.SAW_AKNOWLEDGE_RESPONSE, () => {\n\t\t\t\tthis.reloadMiniGameTemplate();\n\t\t\t\tOCache.clear(ECacheContext.WSAPI, onUpdateContextKey.SAWHistory);\n\t\t\t});\n\t\t\ton(ClassId.SAW_DO_SPIN_RESPONSE, () => {\n\t\t\t\tthis.reloadMiniGameTemplate();\n\t\t\t\tOCache.clear(ECacheContext.WSAPI, onUpdateContextKey.SAWHistory);\n\t\t\t});\n\t\t\ton(ClassId.MISSION_OPTIN_RESPONSE, () => this.updateMissions());\n\t\t\ton(ClassId.ACHIEVEMENT_CLAIM_PRIZE_RESPONSE, () => this.updateMissions());\n\t\t\ton(ClassId.RELOAD_ACHIEVEMENTS_EVENT, () => this.updateMissions());\n\t\t\ton(ClassId.TOURNAMENT_REGISTER_RESPONSE, () => this.updateTournaments());\n\t\t\ton(ClassId.BUY_SHOP_ITEM_RESPONSE, () => {\n\t\t\t\tthis.updateStorePurchasedItems();\n\t\t\t\tthis.updateStoreItems();\n\t\t\t});\n\t\t\ton(ClassId.CLIENT_ENGAGEMENT_EVENT_NEW, () => this.updateInboxMessages());\n\t\t\ton(ClassId.LOGOUT_RESPONSE, () => OCache.clearContext(ECacheContext.WSAPI));\n\t\t\ton(ClassId.IDENTIFY_RESPONSE, () => OCache.clearContext(ECacheContext.WSAPI));\n\t\t\ton(ClassId.JP_WIN_PUSH, (data: JackpotWinPush) => this.jackpotClearCache());\n\t\t\ton(ClassId.JP_OPTOUT_RESPONSE, (data: JackpotsOptoutRequest) => this.jackpotClearCache());\n\t\t\ton(ClassId.JP_OPTIN_RESPONSE, (data: JackpotsOptinResponse) => this.jackpotClearCache());\n\t\t\ton(ClassId.CLAIM_BONUS_RESPONSE, () => this.updateBonuses());\n\t\t\ton(ClassId.SAW_DO_SPIN_BATCH_RESPONSE, () => {\n\t\t\t\tthis.reloadMiniGameTemplate();\n\t\t\t\tOCache.clear(ECacheContext.WSAPI, onUpdateContextKey.SAWHistory);\n\t\t\t});\n\t\t\ton(ClassId.RAF_CLAIM_PRIZE_RESPONSE, () => this.updateRaffles());\n\t\t\ton(ClassId.GET_INBOX_MESSAGES_RESPONSE, (res) => {\n\t\t\t\tif (res.unread_count !== undefined && res.unread_count !== null) {\n\t\t\t\t\tthis.updateInboxUnreadCount(res.unread_count);\n\t\t\t\t}\n\t\t\t});\n\t\t\ton(ClassId.CLIENT_PUBLIC_PROPERTIES_CHANGED_EVENT, (data: { props: { core_inbox_unread_count?: number; ach_points_balance?: number; ach_gems_balance?: number; ach_diamonds_balance?: number } }) => {\n\t\t\t\tif (data?.props?.core_inbox_unread_count !== undefined && data?.props?.core_inbox_unread_count !== null) {\n\t\t\t\t\tthis.updateInboxUnreadCount(data.props.core_inbox_unread_count);\n\t\t\t\t}\n\t\t\t\tif (data?.props?.ach_points_balance !== undefined || data?.props?.ach_gems_balance !== undefined || data?.props?.ach_diamonds_balance !== undefined) {\n\t\t\t\t\tthis.notifyActivityLogUpdate();\n\t\t\t\t}\n\t\t\t});\n\t\t\ton(ClassId.RAF_OPTIN_RESPONSE, () => this.updateRaffles());\n\t\t}\n\t}\n\n\t/** @private */\n\t// AA: this method is used from the _smartico script to clear cache when the context is changed,\n\t// e.g. when user is changed or language is changed\n\tpublic clearCaches() {\n\t\tOCache.clearAll();\n\t}\n\n\t/** Returns information about current user\n\t * Pay attention that this method is synchronous and returns the user profile object immediately, not a promise.\n\t * **Example**:\n\t * ```\n\t * var p = _smartico.api.getUserProfile();\n\t * console.log(p);\n\t * ```\n\t * **Visitor mode: not supported**\n\t * */\n\tpublic getUserProfile(): TUserProfile {\n\t\tif (this.api.tracker) {\n\t\t\tconst o: TUserProfile = Object.assign({}, this.api.tracker.userPublicProps);\n\t\t\to.avatar_url = CoreUtils.avatarUrl(this.api.tracker.userPublicProps.avatar_id, this.api.avatarDomain);\n\t\t\treturn o;\n\t\t} else {\n\t\t\tthrow new Error('Tracker is not initialized, cannot getUserProfile');\n\t\t}\n\t}\n\n\t/** Check if user belongs to specific segments\n\t * **Example**:\n\t * ```\n\t * _smartico.api.checkSegmentMatch(1).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async checkSegmentMatch(segment_id: number): Promise<boolean> {\n\t\tconst r = await this.api.coreCheckSegments(this.userExtId, [segment_id]);\n\t\tif (r && r.find((s) => s.segment_id === segment_id && s.is_matching)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/** Check if user belongs to specific list of segments\n\t * **Example**:\n\t * ```\n\t * _smartico.api.checkSegmentListMatch([1, 2, 3]).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async checkSegmentListMatch(segment_ids: number[]): Promise<TSegmentCheckResult[]> {\n\t\treturn await this.api.coreCheckSegments(this.userExtId, Array.isArray(segment_ids) ? segment_ids : [segment_ids]);\n\t}\n\n\t/** Returns all the levels available to the current user\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getLevels().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * ```\n\t * _smartico.vapi('EN').getLevels().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t */\n\tpublic async getLevels(): Promise<TLevel[]> {\n\t\treturn OCache.use(onUpdateContextKey.Levels, ECacheContext.WSAPI, () => this.api.levelsGetT(this.userExtId), CACHE_DATA_SEC);\n\t}\n\n\t/**\n\t * Returns the current level of the user with extended information including ordinal position and progress.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getCurrentLevel().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async getCurrentLevel(): Promise<TLevelCurrent> {\n\t\treturn OCache.use(onUpdateContextKey.CurrentLevel, ECacheContext.WSAPI, () => this.api.getLevelCurrent(this.userExtId), CACHE_DATA_SEC);\n\t}\n\n\t/** Returns all the missions configured for the current user (server-side scoped, not filtered by Widget visibility).\n\t * The returned missions are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.\n\t * Note that each time you call getMissions with a new onUpdate callback, the old one will be overwritten by the new one.\n\t * The onUpdate callback will be called on mission OptIn and the updated missions will be passed to it.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getMissions().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * ```\n\t * _smartico.vapi('EN').getMissions().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t */\n\tpublic async getMissions({ onUpdate }: { onUpdate?: (data: TMissionOrBadge[]) => void } = {}): Promise<TMissionOrBadge[]> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.Missions, onUpdate);\n\t\t}\n\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.Missions,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.missionsGetItemsT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Returns all the badges available to the current user\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async getBadges(): Promise<TMissionOrBadge[]> {\n\t\treturn OCache.use(onUpdateContextKey.Badges, ECacheContext.WSAPI, () => this.api.badgetsGetItemsT(this.userExtId), CACHE_DATA_SEC);\n\t}\n\n\t/**\n\t * Returns all the bonuses for the current user\n\t * The returned bonuses are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.\n\t * Note that each time you call getBonuses with a new onUpdate callback, the old one will be overwritten by the new one.\n\t * The onUpdate callback will be called on bonus claimed and the updated bonuses will be passed to it.\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async getBonuses({ onUpdate }: { onUpdate?: (data: TBonus[]) => void } = {}): Promise<TBonus[]> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.Bonuses, onUpdate);\n\t\t}\n\n\t\treturn OCache.use(onUpdateContextKey.Bonuses, ECacheContext.WSAPI, () => this.api.bonusesGetItemsT(this.userExtId), CACHE_DATA_SEC);\n\t}\n\n\t/**\n\t * Claim the bonus by bonus_id. Returns the err_code in case of success or error.\n\t * Note that this method can be used only on integrations where originally failed bonus can be claimed again.\n\t * For example, user won a bonus in the mini-game, but Operator rejected this bonus.\n\t * This bonus will be available for the user to claim again.\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async claimBonus(bonus_id: number): Promise<TClaimBonusResult> {\n\t\tconst r = await this.api.bonusClaimItem(this.userExtId, bonus_id);\n\n\t\tconst o: TClaimBonusResult = {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t\tsuccess: r.success,\n\t\t};\n\n\t\treturn o;\n\t}\n\n\t/**\n\t * Returns the extra counters for the current user level.\n\t * These are counters that are configured for each Smartico client separately by request.\n\t * For example 1st counter could be total wagering amount, 2nd counter could be total deposit amount, etc.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getUserLevelExtraCounters().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async getUserLevelExtraCounters(): Promise<UserLevelExtraCountersT> {\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.LevelExtraCounters,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.getUserGamificationInfoT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t *\n\t * Returns all the store items available to the current user\n\t * The returned store items are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.\n\t * Note that each time you call getStoreItems with a new onUpdate callback, the old one will be overwritten by the new one.\n\t * The onUpdate callback will be called on purchase of the store item.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getStoreItems().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * ```\n\t * _smartico.vapi('EN').getStoreItems().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t * @param params\n\t * @param params.onUpdate - callback function that will be called when the store items are updated\n\t */\n\n\tpublic async getStoreItems({ onUpdate }: { onUpdate?: (data: TStoreItem[]) => void } = {}): Promise<TStoreItem[]> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.StoreItems, onUpdate);\n\t\t}\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.StoreItems,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.storeGetItemsT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/** Buy the specific shop item by item_id. Returns the err_code in case of success or error.\n\t * **Example**:\n\t * ```\n\t * _smartico.api.buyStoreItem(1).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async buyStoreItem(item_id: number): Promise<TBuyStoreItemResult> {\n\t\tconst r = await this.api.buyStoreItem(this.userExtId, item_id);\n\n\t\tconst o: TBuyStoreItemResult = {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t};\n\n\t\treturn o;\n\t}\n\n\t/**\n\t *\n\t * Returns store categories\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getStoreCategories().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * ```\n\t * _smartico.vapi('EN').getStoreCategories().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t */\n\tpublic async getStoreCategories(): Promise<TStoreCategory[]> {\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.StoreCategories,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.storeGetCategoriesT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Returns purchased items based on the provided parameters. \"Limit\" and \"offset\" indicate the range of items to be fetched.\n\t * The maximum number of items per request is limited to 20.\n\t * You can leave this params empty and by default it will return list of purchased items ranging from 0 to 20.\n\t * The returned store items are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.\n\t * Note that each time you call getStorePurchasedItems with a new onUpdate callback, the old one will be overwritten by the new one.\n\t * The onUpdate callback will be called on purchase of the store item and the last 20 items will be passed to it.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getStorePurchasedItems().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\n\tpublic async getStorePurchasedItems({\n\t\tlimit,\n\t\toffset,\n\t\tonUpdate,\n\t}: { limit?: number; offset?: number; onUpdate?: (data: TStoreItem[]) => void } = {}): Promise<TStoreItem[]> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.StoreHistory, onUpdate);\n\t\t}\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.StoreHistory,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.storeGetPurchasedItemsT(this.userExtId, limit, offset),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Returns missions & badges categories\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getAchCategories().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * ```\n\t * _smartico.vapi('EN').getAchCategories().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * */\n\tpublic async getAchCategories(): Promise<TAchCategory[]> {\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.AchCategories,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.achGetCategoriesT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Returns list of custom sections\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getCustomSections().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * ```\n\t * _smartico.vapi('EN').getCustomSections().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * */\n\tpublic async getCustomSections(): Promise<TUICustomSection[]> {\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.CustomSections,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.customSectionsGetT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Returns the list of mini-games configured for the current user (not filtered by spin availability or Widget visibility).\n\t * The returned list of mini-games is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getMiniGames with a new onUpdate callback, the old one will be overwritten by the new one.\n\t * The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or won prize is spin/jackpot and if max count of the available user spins equals one, also if the spins were issued to the user manually in the BO. Updated templates will be passed to onUpdate callback.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getMiniGames().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * ```\n\t * _smartico.vapi('EN').getMiniGames().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t */\n\tpublic async getMiniGames({ onUpdate }: { onUpdate?: (data: TMiniGameTemplate[]) => void } = {}): Promise<\n\t\tTMiniGameTemplate[]\n\t> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.Saw, onUpdate);\n\t\t}\n\n\t\treturn OCache.use(onUpdateContextKey.Saw, ECacheContext.WSAPI, () => this.api.sawGetTemplatesT(this.userExtId), CACHE_DATA_SEC);\n\t}\n\n\t/**\n\t * Returns the list of mini-games based on the provided parameters. \"Limit\" and \"offset\" indicate the range of items to be fetched.\n\t * The maximum number of items per request is limited to 20.\n\t * You can leave this params empty and by default it will return list of mini-games ranging from 0 to 20.\n\t * The returned list of mini-games history is cached for 30 seconds.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getMiniGamesHistory().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\n\tpublic async getMiniGamesHistory({\n\t\tlimit,\n\t\toffset,\n\t\tsaw_template_id,\n\t}: {\n\t\tlimit?: number;\n\t\toffset?: number;\n\t\tsaw_template_id?: number;\n\t}): Promise<TSawHistory[]> {\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.SAWHistory,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.getSawWinningHistoryT(this.userExtId, limit, offset, saw_template_id),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Plays the specified by template_id mini-game on behalf of user and returns prize_id or err_code\n\t * After playMiniGame is called, you can call getMiniGames to get the list of mini-games.The returned list of mini-games is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call playMiniGame with a new onUpdate callback, the old one will be overwritten by the new one.\n\t * The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or won prize is spin/jackpot and if max count of the available user spins equals one, also if the spins were issued to the user manually in the BO. Updated templates will be passed to onUpdate callback.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.playMiniGame(55).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async playMiniGame(\n\t\ttemplate_id: number,\n\t\t{ onUpdate }: { onUpdate?: (data: TMiniGameTemplate[]) => void } = {},\n\t): Promise<TMiniGamePlayResult> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.Saw, onUpdate);\n\t\t}\n\n\t\tconst r = await this.api.sawSpinRequest(this.userExtId, template_id);\n\t\tthis.api.doAcknowledgeRequest(this.userExtId, r.request_id);\n\n\t\tconst o: TMiniGamePlayResult = {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t\tprize_id: r.saw_prize_id,\n\t\t};\n\n\t\treturn o;\n\t}\n\n\t/**\n\t * Sends the acknowledge request with specific client_request_id from minigame history in order to claim prize\n\t * **Example**:\n\t * ```\n\t * _smartico.api.miniGameWinAcknowledgeRequest('2a189322-31bb-4119-b943-bx7868ff8dc3').then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t */\n\tpublic async miniGameWinAcknowledgeRequest(request_id: string) {\n\t\treturn this.api.doAcknowledgeRequest(this.userExtId, request_id);\n\t}\n\n\t/**\n\t * Plays the specified by template_id mini-game on behalf of user spin_count times and returns array of the prizes\n\t * After playMiniGameBatch is called, you can call getMiniGames to get the list of mini-games. The returned list of mini-games is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call playMiniGameBatch with a new onUpdate callback, the old one will be overwritten by the new one.\n\t * The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or won prize is spin/jackpot and if max count of the available user spins equals one, also if the spins were issued to the user manually in the BO. Updated templates will be passed to onUpdate callback.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.playMiniGameBatch(55, 10).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async playMiniGameBatch(\n\t\ttemplate_id: number,\n\t\tspin_count: number,\n\t\t{ onUpdate }: { onUpdate?: (data: TMiniGameTemplate[]) => void } = {},\n\t): Promise<TMiniGamePlayBatchResult[]> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.Saw, onUpdate);\n\t\t}\n\n\t\tconst response = await this.api.sawSpinBatchRequest(this.userExtId, template_id, spin_count);\n\n\t\tconst request_ids = response.results.map((result) => result.request_id);\n\t\tthis.api.doAcknowledgeBatchRequest(this.userExtId, request_ids);\n\n\t\tconst o: TMiniGamePlayBatchResult[] = response.results.map((result) => ({\n\t\t\terrCode: result.errCode,\n\t\t\terrMessage: result.errMsg,\n\t\t\tsaw_prize_id: result.saw_prize_id,\n\t\t\tjackpot_amount: result.jackpot_amount,\n\t\t\tfirst_spin_in_period: result.first_spin_in_period,\n\t\t}));\n\n\t\treturn o;\n\t}\n\n\t/**\n\t * Requests an opt-in for the specified mission_id. Returns the err_code.\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async requestMissionOptIn(mission_id: number): Promise<TMissionOptInResult> {\n\t\tconst r = await this.api.missionOptIn(this.userExtId, mission_id);\n\n\t\tconst o: TMissionOptInResult = {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t};\n\n\t\treturn o;\n\t}\n\n\t/**\n\t * Request for claim reward for the specified mission id. Returns the err_code.\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async requestMissionClaimReward(mission_id: number, ach_completed_id: number): Promise<TMissionClaimRewardResult> {\n\t\tconst r = await this.api.missionClaimPrize(this.userExtId, mission_id, ach_completed_id);\n\n\t\tconst o: TMissionClaimRewardResult = {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t};\n\n\t\treturn o;\n\t}\n\n\t/** Returns all the active instances of tournaments\n\t * The returned list is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getTournamentsList with a new onUpdate callback, the old one will be overwritten by the new one.\n\t * The onUpdate callback will be called when the user has registered in a tournament. Updated list will be passed to onUpdate callback.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getTournamentsList().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * ```\n\t * _smartico.vapi('EN').getTournamentsList().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t * */\n\tpublic async getTournamentsList({ onUpdate }: { onUpdate?: (data: TTournament[]) => void } = {}): Promise<TTournament[]> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.TournamentList, onUpdate);\n\t\t}\n\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.TournamentList,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.tournamentsGetLobbyT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Returns clans list payload for the current user.\n\t * The returned payload is cached for 30 seconds.\n\t * If onUpdate is passed, it will be called when clans response is received.\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async getClans({ onUpdate }: { onUpdate?: (data: TClans) => void } = {}): Promise<TClans> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.Clans, onUpdate);\n\t\t}\n\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.Clans,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.clansGetListT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Returns detailed information for a specific clan including its members.\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async getClanInfo(clanId: number): Promise<TClanInfo> {\n\t\treturn this.api.clansGetInfoT(this.userExtId, clanId);\n\t}\n\n\t/**\n\t * Joins a clan on behalf of the current user.\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async joinClan(clanId: number): Promise<TClanJoinResult> {\n\t\treturn this.api.clanJoin(this.userExtId, clanId);\n\t}\n\n\t/**\n\t * Returns detailed information for a specific tournament instance; the response includes tournament info and the leaderboard of players\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getTournamentsList().then((result) => {\n\t * if (result.length > 0) {\n\t * _smartico.api.getTournamentInstanceInfo(result[0].instance_id).then((result) => {\n\t * console.log(result);\n\t * });\n\t * }\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * ```\n\t * _smartico.vapi('EN').getTournamentsList().then((result) => {\n\t * if (result.length > 0) {\n\t * _smartico.vapi('EN').getTournamentInstanceInfo(result[0].instance_id).then((result) => {\n\t * console.log(result);\n\t * });\n\t * }\n\t * });\n\t * ```\n\t */\n\tpublic async getTournamentInstanceInfo(tournamentInstanceId: number): Promise<TTournamentDetailed> {\n\t\treturn this.api.tournamentsGetInfoT(this.userExtId, tournamentInstanceId);\n\t}\n\n\t/**\n\t * Returns the players of a specific clan in a clan-based tournament.\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async getClanTournamentPlayers(tournamentInstanceId: number, clanId: number): Promise<TClanTournamentPlayers> {\n\t\treturn this.api.clanTournamentGetPlayers(this.userExtId, tournamentInstanceId, clanId);\n\t}\n\n\t/**\n\t * Requests registration for the specified tournament instance. Returns the err_code.\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async registerInTournament(tournamentInstanceId: number): Promise<TTournamentRegistrationResult> {\n\t\tconst r = await this.api.registerInTournament(this.userExtId, tournamentInstanceId);\n\n\t\tconst o: TTournamentRegistrationResult = {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t};\n\n\t\treturn o;\n\t}\n\n\t/**\n\t * Returns the leaderboard for the current type (default is Daily). If getPreviousPeriod is passed as true, a leaderboard for the previous period for the current type will be returned.\n\t * For example, if the type is Weekly and getPreviousPeriod is true, a leaderboard for the previous week will be returned.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getLeaderBoard(1).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * ```\n\t * _smartico.vapi('EN').getLeaderBoard(1).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t */\n\tpublic async getLeaderBoard(periodType: LeaderBoardPeriodType, getPreviousPeriod?: boolean): Promise<LeaderBoardDetailsT> {\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.LeaderBoards,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.leaderboardsGetT(this.userExtId, periodType, getPreviousPeriod),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/** Returns inbox messages based on the provided parameters. \"From\" and \"to\" indicate the range of messages to be fetched.\n\t * The maximum number of messages per request is limited to 20. \n\t * An indicator \"onlyFavorite\" can be passed to get only messages marked as favorites.\n\t * An indicator \"read_status\" can be passed to get only messages marked as read or unread.\n\t * You can leave this params empty and by default it will return list of messages ranging from 0 to 20.\n\t * This function returns a list of messages without the body of each message.\n\t * To get the body of the message you need to call getInboxMessageBody function and pass the message guid contained in each message of this request.\n\t * All other action like mark as read, favorite, delete, etc. can be done using this message GUID.\n\t * The \"onUpdate\" callback will be triggered when the user receives a new message. It will provide an updated list of messages, ranging from 0 to 20, to the onUpdate callback function.\n\t *\n\t * **Visitor mode: not supported**\n\t *\n\t * @param params\n\t */\n\tpublic async getInboxMessages({\n\t\tfrom,\n\t\tto,\n\t\tonlyFavorite,\n\t\tcategoryId,\n\t\tread_status,\n\t\tonUpdate,\n\t}: {\n\t\tfrom?: number;\n\t\tto?: number;\n\t\tonlyFavorite?: boolean;\n\t\tcategoryId?: InboxCategories;\n\t\tread_status?: InboxReadStatus;\n\t\tonUpdate?: (data: TInboxMessage[]) => void;\n\t} = {}): Promise<TInboxMessage[]> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.InboxMessages, onUpdate);\n\t\t}\n\t\treturn await this.api.getInboxMessagesT(this.userExtId, from, to, onlyFavorite, categoryId, read_status);\n\t}\n\n\t/**\n\t * Returns inbox unread count.\n\t *\n\t * **Visitor mode: not supported**\n\t * @param params\n\t */\n\tpublic async getInboxUnreadCount({ onUpdate }: { onUpdate?: (unread_count: number) => void } = {}): Promise<number> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.InboxUnreadCount, onUpdate);\n\t\t}\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.InboxUnreadCount,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.getInboxUnreadCountT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Returns the message body of the specified message guid.\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async getInboxMessageBody(messageGuid: string): Promise<TInboxMessageBody> {\n\t\treturn await this.api.getInboxMessageBodyT(messageGuid);\n\t}\n\n\t/**\n\t * Requests to mark inbox message with specified guid as read\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async markInboxMessageAsRead(messageGuid: string): Promise<InboxMarkMessageAction> {\n\t\tconst r = await this.api.markInboxMessageRead(this.userExtId, messageGuid);\n\n\t\treturn {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t};\n\t}\n\n\t/**\n\t * Requests to mark all inbox messages as read\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async markAllInboxMessagesAsRead(): Promise<InboxMarkMessageAction> {\n\t\tconst r = await this.api.markAllInboxMessageRead(this.userExtId);\n\n\t\treturn {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t};\n\t}\n\n\t/**\n\t * Requests to mark inbox message with specified guid as favorite. Pass mark true to add message to favorite and false to remove.\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async markUnmarkInboxMessageAsFavorite(messageGuid: string, mark: boolean): Promise<InboxMarkMessageAction> {\n\t\tconst r = await this.api.markUnmarkInboxMessageAsFavorite(this.userExtId, messageGuid, mark);\n\n\t\treturn {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t};\n\t}\n\n\t/**\n\t * Requests to delete inbox message\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\n\tpublic async deleteInboxMessage(messageGuid: string): Promise<InboxMarkMessageAction> {\n\t\tconst r = await this.api.deleteInboxMessage(this.userExtId, messageGuid);\n\n\t\treturn {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t};\n\t}\n\n\t/**\n\t * Requests to delete all inbox messages\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\n\tpublic async deleteAllInboxMessages(): Promise<InboxMarkMessageAction> {\n\t\tconst r = await this.api.deleteAllInboxMessages(this.userExtId);\n\n\t\treturn {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t};\n\t}\n\n\t/**\n\t * Requests translations for the given language. Returns the object including translation key/translation value pairs. All possible translation keys defined in the back office.\n\t */\n\tpublic async getTranslations(lang_code: string): Promise<TGetTranslations> {\n\t\tconst r = await this.api.getTranslationsT(this.userExtId, lang_code, []);\n\n\t\treturn {\n\t\t\ttranslations: r.translations,\n\t\t};\n\t}\n\n\t/**\n\t * Reports an impression event for an engagement (when engagement content is displayed to the user).\n\t * Use this method to track when users view engagement content such as inbox messages, popups.\n\t * When using for Inbox cases, you need to use message guid as engagement_uid, and pass 31 as activityType.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.reportImpressionEvent({\n\t * engagement_uid: 'abc123-def456',\n\t * activityType: 31 // Inbox\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t *\n\t * @param params - Event parameters\n\t * @param params.engagement_uid - Unique identifier for the engagement\n\t * @param params.activityType - Type of engagement activity (Popup=30, Inbox=31)\n\t */\n\tpublic reportImpressionEvent({\n\t\tengagement_uid,\n\t\tactivityType,\n\t}: {\n\t\tengagement_uid: string;\n\t\tactivityType: ActivityTypeLimited | number;\n\t}): void {\n\t\tthis.api.reportEngagementImpression(this.userExtId, engagement_uid, activityType);\n\t}\n\n\t/**\n\t * Reports a click/action event for an engagement (when user interacts with engagement content).\n\t * Use this method to track when users click on or interact with engagement content such as inbox messages, popups.\n\t * When using for Inbox cases, you need to use message guid as engagement_uid, and pass 31 as activityType, and pass the action/deeplink that was triggered by the user interaction as action.\n\t * \n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.reportClickEvent({\n\t * engagement_uid: 'abc123-def456',\n\t * activityType: 31 // Inbox\n\t * action: 'dp:gf_missions'\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t *\n\t * @param params - Event parameters\n\t * @param params.engagement_uid - Unique identifier for the engagement\n\t * @param params.activityType - Type of engagement activity (Popup=30, Inbox=31)\n\t * @param params.action - Optional action/deeplink that was triggered by the user interaction\n\t */\n\tpublic reportClickEvent({\n\t\tengagement_uid,\n\t\tactivityType,\n\t\taction,\n\t}: {\n\t\tengagement_uid: string;\n\t\tactivityType: ActivityTypeLimited | number;\n\t\taction?: string;\n\t}): void {\n\t\tthis.api.reportEngagementAction(this.userExtId, engagement_uid, activityType, action);\n\t}\n\n\t/**\n\t * Returns the activity log for a user within a specified time range.\n\t * The response includes both points changes and gems/diamonds changes.\n\t * Each log entry contains information about the change amount, balance, and source.\n\t * The returned list is cached for 30 seconds. \n\t * You can pass the onUpdate callback as a parameter, it will be called every time the activity log is updated and will provide the updated list of activity logs for the last 10 minutes.\n\t *\n\t * **Example**:\n\t * ```\n\t * const startTime = Math.floor(Date.now() / 1000) - 86400 * 30; // 30 days ago\n\t * const endTime = Math.floor(Date.now() / 1000); // now\n\t *\n\t * _smartico.api.getActivityLog({\n\t * startTimeSeconds: startTime,\n\t * endTimeSeconds: endTime,\n\t * from: 0,\n\t * to: 50,\n\t * onUpdate: (data) => console.log('Updated:', data)\n\t * }).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t *\n\t * @param params - Activity log parameters\n\t * @param params.startTimeSeconds - Start time in seconds (epoch timestamp)\n\t * @param params.endTimeSeconds - End time in seconds (epoch timestamp)\n\t * @param params.from - Start index of records to return\n\t * @param params.to - End index of records to return\n\t * @param params.onUpdate - Optional callback function that will be called when the activity log is updated\n\t */\n\tpublic async getActivityLog({\n\t\tstartTimeSeconds,\n\t\tendTimeSeconds,\n\t\tfrom,\n\t\tto,\n\t\tonUpdate,\n\t}: {\n\t\tstartTimeSeconds: number;\n\t\tendTimeSeconds: number;\n\t\tfrom: number;\n\t\tto: number;\n\t\tonUpdate?: (data: TActivityLog[]) => void;\n\t}): Promise<TActivityLog[]> {\n\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.ActivityLog, onUpdate);\n\t\t}\n\n\t\treturn await OCache.use(\n\t\t\tonUpdateContextKey.ActivityLog,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.getActivityLogT(this.userExtId, startTimeSeconds, endTimeSeconds, from, to),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Returns the active rounds for the specified MatchX or Quiz game.\n\t * Each round includes its events (matches/questions) along with the current user's selections and scores.\n\t *\n\t * @param props.saw_template_id - The ID of the MatchX or Quiz game template\n\t *\n\t * **Response** `GamesApiResponse<GamePickRound[]>`:\n\t * - `errCode` - 0 on success\n\t * - `data` - Array of rounds, each containing:\n\t * - `round_id`, `round_name` - Round identifier and display name\n\t * - `open_date`, `last_bet_date` - Timestamps (ms) for round open and betting deadline\n\t * - `is_active_now`, `is_resolved` - Round state flags\n\t * - `round_status_id` - Round status: -1 (active), 2 (no more bets), 3 (all events resolved), 4 (round resolved)\n\t * - `score_full_win`, `score_part_win`, `score_lost` - Scoring rules per prediction outcome\n\t * - `user_score` - Current user's total score in this round\n\t * - `user_placed_bet` - Whether the user has submitted predictions\n\t * - `has_open_for_bet_events` - Whether there are events still open for betting\n\t * - `events[]` - Array of events with `gp_event_id`, `market_type_id`, `event_meta` (team names, images, sport), `match_date`, `is_open_for_bets`, `odds_details`, and user selection fields\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.gamePickGetActiveRounds({\n\t * saw_template_id: 1083,\n\t * }).then((result) => {\n\t * console.log(result.data); // GamePickRound[]\n\t * result.data.forEach(round => {\n\t * console.log(round.round_name, round.events.length);\n\t * });\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async gamePickGetActiveRounds(props: GamePickRequestParams): Promise<GamesApiResponse<GamePickRound[]>> {\n\t\tif (!props.saw_template_id) {\n\t\t\tthrow new Error('saw_template_id is required');\n\t\t}\n\t\treturn this.api.gpGetActiveRounds(props.saw_template_id);\n\t}\n\n\t/**\n\t * Returns a single active round for the specified MatchX or Quiz game.\n\t * The round includes full event details with the current user's selections.\n\t *\n\t * @param props.saw_template_id - The ID of the MatchX or Quiz game template\n\t * @param props.round_id - The specific round to retrieve\n\t *\n\t * **Response** `GamesApiResponse<GamePickRound>`:\n\t * - `errCode` - 0 on success\n\t * - `data` - Single round object with the same structure as in `gamePickGetActiveRounds`,\n\t * including `events[]` with full event details, user selections, and resolution info\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.gamePickGetActiveRound({\n\t * saw_template_id: 1083,\n\t * round_id: 31652,\n\t * }).then((result) => {\n\t * console.log(result.data.round_name, result.data.events.length);\n\t * console.log(result.data.user_score, result.data.user_placed_bet);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async gamePickGetActiveRound(props: GamePickRoundRequestParams): Promise<GamesApiResponse<GamePickRound>> {\n\t\tif (!props.saw_template_id) {\n\t\t\tthrow new Error('saw_template_id is required');\n\t\t}\n\t\tif (!props.round_id) {\n\t\t\tthrow new Error('round_id is required');\n\t\t}\n\t\treturn this.api.gpGetActiveRound(props.saw_template_id, props.round_id);\n\t}\n\n\t/**\n\t * Returns the history of all rounds (including resolved ones) for the specified MatchX or Quiz game.\n\t * Each round contains full event details with results and the current user's predictions.\n\t *\n\t * @param props.saw_template_id - The ID of the MatchX or Quiz game template\n\t *\n\t * **Response** `GamesApiResponse<GamePickRound[]>`:\n\t * - `errCode` - 0 on success\n\t * - `data` - Array of rounds ordered by `round_row_id` descending (newest first).\n\t * Each round has the same structure as in `gamePickGetActiveRounds`, including resolved events\n\t * with `resolution_type_id` (0=None, 2=Lost, 3=PartialWin, 4=FullWin) and `resolution_score`\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.gamePickGetHistory({\n\t * saw_template_id: 1083,\n\t * }).then((result) => {\n\t * result.data.forEach(round => {\n\t * console.log(round.round_name, 'Score:', round.user_score, 'Resolved:', round.is_resolved);\n\t * });\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async gamePickGetHistory(props: GamePickRequestParams): Promise<GamesApiResponse<GamePickRound[]>> {\n\t\tif (!props.saw_template_id) {\n\t\t\tthrow new Error('saw_template_id is required');\n\t\t}\n\t\treturn this.api.gpGetGamesHistory(props.saw_template_id);\n\t}\n\n\t/**\n\t * Returns the leaderboard for a specific round within a MatchX or Quiz game.\n\t * Use `round_id = -1` (AllRoundsGameBoardID) to get the season/overall leaderboard across all rounds.\n\t *\n\t * @param props.saw_template_id - The ID of the MatchX or Quiz game template\n\t * @param props.round_id - The round to get the leaderboard for. Use -1 for overall/seasonal leaderboard\n\t *\n\t * **Response** `GamesApiResponse<GamePickRoundBoard>`:\n\t * - `errCode` - 0 on success\n\t * - `data` - Leaderboard object containing:\n\t * - Round base fields (`round_id`, `round_name`, `open_date`, `last_bet_date`, etc.)\n\t * - `users[]` - Ranked list of players, each with:\n\t * - `ext_user_id`, `int_user_id` - User identifiers\n\t * - `public_username`, `avatar_url` - Display info (usernames may be masked based on label settings)\n\t * - `gp_position` - Leaderboard rank (null if not yet ranked)\n\t * - `resolution_score` - Total score in this round\n\t * - `full_wins_count`, `part_wins_count`, `lost_count` - Prediction outcome counts\n\t * - `my_user` - Current user's entry (same fields as above), or null if user hasn't participated\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.gamePickGetBoard({\n\t * saw_template_id: 1083,\n\t * round_id: 31652,\n\t * }).then((result) => {\n\t * console.log('Top players:', result.data.users);\n\t * console.log('My position:', result.data.my_user?.gp_position);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async gamePickGetBoard(props: GamePickRoundRequestParams): Promise<GamesApiResponse<GamePickRoundBoard>> {\n\t\tif (!props.saw_template_id) {\n\t\t\tthrow new Error('saw_template_id is required');\n\t\t}\n\t\tif (!props.round_id) {\n\t\t\tthrow new Error('round_id is required');\n\t\t}\n\t\treturn this.api.gpGetGameBoard(props.saw_template_id, props.round_id);\n\t}\n\n\t/**\n\t * Submits score predictions for a round in a MatchX game.\n\t * Sends the round object with user selections for all events at once.\n\t * Each event must include `team1_user_selection` and `team2_user_selection` representing predicted scores.\n\t * If the user hasn't placed bets before, one game attempt (spin) will be consumed.\n\t * Predictions can be edited until each match starts (if `allow_edit_answers` is enabled on the round).\n\t *\n\t * @param props.saw_template_id - The ID of the MatchX game template\n\t * @param props.round - Round object containing `round_id` and `events[]`. Typically obtained from `gamePickGetActiveRound`\n\t * and modified with user predictions. Each event needs: `gp_event_id`, `team1_user_selection`, `team2_user_selection`\n\t *\n\t * **Response** `GamesApiResponse<GamePickRound>`:\n\t * - `errCode` - 0 on success. Non-zero codes indicate errors (e.g. not enough points/attempts)\n\t * - `data` - Updated round with all events reflecting the submitted selections.\n\t * `user_placed_bet` will be `true`, `has_not_submitted_changes` will be `false`\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.gamePickGetActiveRound({\n\t * saw_template_id: 1190,\n\t * round_id: 38665,\n\t * }).then((roundData) => {\n\t * const round = roundData.data;\n\t * round.events = round.events.map(e => ({\n\t * gp_event_id: e.gp_event_id,\n\t * team1_user_selection: 1,\n\t * team2_user_selection: 0,\n\t * }));\n\t * _smartico.api.gamePickSubmitSelection({\n\t * saw_template_id: 1190,\n\t * round: round,\n\t * }).then((result) => {\n\t * console.log(result.data.user_placed_bet); // true\n\t * });\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async gamePickSubmitSelection(props: GamePickRequestParams & { round: Partial<GamePickRound> }): Promise<GamesApiResponse<GamePickRound>> {\n\t\tif (!props.saw_template_id) {\n\t\t\tthrow new Error('saw_template_id is required');\n\t\t}\n\t\tif (!props.round?.round_id) {\n\t\t\tthrow new Error('round is required');\n\t\t}\n\t\treturn this.api.gpSubmitSelection(props.saw_template_id, props.round, false);\n\t}\n\n\t/**\n\t * Submits answers for a round in a Quiz game.\n\t * Sends the round object with user answers for all events at once.\n\t * Each event must include `user_selection` with the answer value (e.g. '1', '2', 'x', 'yes', 'no' — depending on the market type).\n\t * If the user hasn't placed bets before, one game attempt (spin) will be consumed.\n\t * Answers can be edited until each match starts (if `allow_edit_answers` is enabled on the round).\n\t *\n\t * @param props.saw_template_id - The ID of the Quiz game template\n\t * @param props.round - Round object containing `round_id` and `events[]`. Typically obtained from `gamePickGetActiveRound`\n\t * and modified with user answers. Each event needs: `gp_event_id`, `user_selection`\n\t *\n\t * **Response** `GamesApiResponse<GamePickRound>`:\n\t * - `errCode` - 0 on success. Non-zero codes indicate errors (e.g. not enough points/attempts)\n\t * - `data` - Updated round with all events reflecting the submitted answers.\n\t * `user_placed_bet` will be `true`, `has_not_submitted_changes` will be `false`\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.gamePickGetActiveRound({\n\t * saw_template_id: 1183,\n\t * round_id: 37974,\n\t * }).then((roundData) => {\n\t * const round = roundData.data;\n\t * round.events = round.events.map(e => ({\n\t * gp_event_id: e.gp_event_id,\n\t * user_selection: 'x',\n\t * }));\n\t * _smartico.api.gamePickSubmitSelectionQuiz({\n\t * saw_template_id: 1183,\n\t * round: round,\n\t * }).then((result) => {\n\t * console.log(result.data.user_placed_bet); // true\n\t * });\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async gamePickSubmitSelectionQuiz(props: GamePickRequestParams & { round: Partial<GamePickRound> }): Promise<GamesApiResponse<GamePickRound>> {\n\t\tif (!props.saw_template_id) {\n\t\t\tthrow new Error('saw_template_id is required');\n\t\t}\n\t\tif (!props.round?.round_id) {\n\t\t\tthrow new Error('round is required');\n\t\t}\n\t\treturn this.api.gpSubmitSelection(props.saw_template_id, props.round, true);\n\t}\n\n\t/**\n\t * Returns the current user's profile information within the specified MatchX or Quiz game.\n\t * The user record is synced from the Smartico platform into the games DB (synced every 1 minute).\n\t * If the user doesn't exist in the games DB yet, it will be created automatically on first call.\n\t *\n\t * @param props.saw_template_id - The ID of the MatchX or Quiz game template\n\t *\n\t * **Response** `GamesApiResponse<GamePickUserInfo>`:\n\t * - `errCode` - 0 on success\n\t * - `data`:\n\t * - `ext_user_id` - External user ID (Smartico internal numeric ID)\n\t * - `int_user_id` - Internal user ID within the games system\n\t * - `public_username` - Display name\n\t * - `avatar_url` - User's avatar image URL\n\t * - `last_wallet_sync_time` - Last time the user's balance was synced from Smartico\n\t * - `ach_points_balance` - User's current points balance\n\t * - `ach_gems_balance` - User's current gems balance\n\t * - `ach_diamonds_balance` - User's current diamonds balance\n\t * - `pubic_username_set` - Whether the user has set a custom username\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.gamePickGetUserInfo({\n\t * saw_template_id: 1083,\n\t * }).then((result) => {\n\t * console.log(result.data.public_username, result.data.ach_points_balance);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async gamePickGetUserInfo(props: GamePickRequestParams): Promise<GamesApiResponse<GamePickUserInfo>> {\n\t\tif (!props.saw_template_id) {\n\t\t\tthrow new Error('saw_template_id is required');\n\t\t}\n\t\treturn this.api.gpGetUserInfo(props.saw_template_id);\n\t}\n\n\t/**\n\t * Returns the game configuration and the list of all rounds for the specified MatchX or Quiz game.\n\t * Includes the SAW template definition, label settings, and round metadata (without events).\n\t *\n\t * @param props.saw_template_id - The ID of the MatchX or Quiz game template\n\t *\n\t * **Response** `GamesApiResponse<GamePickGameInfo>`:\n\t * - `errCode` - 0 on success\n\t * - `data`:\n\t * - `sawTemplate` - Game template configuration including:\n\t * - `saw_template_id`, `saw_game_type_id` (6 = MatchX/Quiz)\n\t * - `saw_template_ui_definition` - UI settings (name, ranking options, ask_for_username, etc.)\n\t * - `saw_buyin_type_id` - Cost type (1=Free, 2=Points, 3=Gems, 4=Diamonds, 5=Spins)\n\t * - `buyin_cost_points` - Cost per attempt\n\t * - `spin_count` - Available attempts for the current user\n\t * - `allRounds[]` - List of all rounds (metadata only, no events), each with:\n\t * - `round_id`, `round_name`, `round_description`\n\t * - `open_date`, `last_bet_date` - Timestamps (ms)\n\t * - `is_active_now`, `is_resolved`, `round_status_id`\n\t * - `labelInfo` - Label/brand configuration and settings\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.gamePickGetGameInfo({\n\t * saw_template_id: 1189,\n\t * }).then((result) => {\n\t * console.log(result.data.sawTemplate.saw_template_ui_definition.name);\n\t * console.log('Rounds:', result.data.allRounds.length);\n\t * console.log('Buy-in type:', result.data.sawTemplate.saw_buyin_type_id);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async gamePickGetGameInfo(props: GamePickRequestParams): Promise<GamesApiResponse<GamePickGameInfo>> {\n\t\tif (!props.saw_template_id) {\n\t\t\tthrow new Error('saw_template_id is required');\n\t\t}\n\t\treturn this.api.gpGetGameInfo(props.saw_template_id);\n\t}\n\n\t/**\n\t * Returns round data with events and picks for a specific user (identified by their internal user ID).\n\t * Useful for viewing another user's predictions from the leaderboard.\n\t * The `int_user_id` can be obtained from the `gamePickGetBoard` response (`users[].int_user_id`).\n\t *\n\t * @param props.saw_template_id - The ID of the MatchX or Quiz game template\n\t * @param props.round_id - The round to get info for\n\t * @param props.int_user_id - Internal user ID of the player whose predictions to view (from leaderboard data)\n\t *\n\t * **Response** `GamesApiResponse<GamePickRound>`:\n\t * - `errCode` - 0 on success\n\t * - `data` - Round object with the target user's selections.\n\t * Same structure as `gamePickGetActiveRound`, but `user_selection`/`team1_user_selection`/`team2_user_selection`\n\t * fields on events reflect the specified user's picks instead of the current user's.\n\t * Events also include `resolution_type_id` (0=None, 2=Lost, 3=PartialWin, 4=FullWin) showing how each prediction was scored\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.gamePickGetRoundInfoForUser({\n\t * saw_template_id: 1083,\n\t * round_id: 31652,\n\t * int_user_id: 65653810,\n\t * }).then((result) => {\n\t * result.data.events.forEach(e => {\n\t * console.log(e.event_meta.team1_name, 'vs', e.event_meta.team2_name, '→', e.user_selection);\n\t * });\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async gamePickGetRoundInfoForUser(props: GamePickRoundRequestParams & { int_user_id: number }): Promise<GamesApiResponse<GamePickRound>> {\n\t\tif (!props.saw_template_id) {\n\t\t\tthrow new Error('saw_template_id is required');\n\t\t}\n\t\tif (!props.round_id) {\n\t\t\tthrow new Error('round_id is required');\n\t\t}\n\t\tif (!props.int_user_id) {\n\t\t\tthrow new Error('int_user_id is required');\n\t\t}\n\t\treturn this.api.gpGetRoundInfoForUser(props.saw_template_id, props.round_id, props.int_user_id);\n\t}\n\n\t/**\n\t * Returns the list of avatars available in the catalog for the current user.\n\t * The response includes both free avatars and earned/purchased ones.\n\t * Avatars with `hide_until_achieved = true` and `is_given = false` should be hidden from the user.\n\t * The result is cached for 30 seconds.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getAvatarsList().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async getAvatarsList(): Promise<TAvatarDefinition[]> {\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.AvatarsList,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.avatarsGetListT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Returns the list of AI-customized avatars for the current user.\n\t * Each entry represents a previously generated AI customization for a specific base avatar.\n\t * The result is cached for 30 seconds.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getAvatarsCustomized().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async getAvatarsCustomized(): Promise<TAvatarCustomized[]> {\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.AvatarsCustomized,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.avatarsGetCustomizedT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Returns the list of AI customization prompts (styles) available for avatar customization.\n\t * Each prompt represents a visual style that can be applied to a base avatar.\n\t * The result is cached for 30 seconds.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getAvatarPrompts().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async getAvatarPrompts(): Promise<TAvatarPrompt[]> {\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.AvatarPrompts,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.avatarsGetPromptsT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Sets the specified avatar as the active avatar for the current user.\n\t * Pass `avatar_url` (the `TAvatarDefinition.url` path or a CDN URL for AI-customized avatars)\n\t * and `avatar_real_id` from the avatar catalog.\n\t * After a successful call, the avatar list cache is cleared so the next `getAvatarsList()` call reflects `is_in_use`.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getAvatarsList().then((avatars) => {\n\t * const avatar = avatars.find((a) => !a.hide_until_achieved || a.is_given);\n\t * if (avatar) {\n\t * _smartico.api.setAvatar({\n\t * avatar_url: avatar.url,\n\t * avatar_real_id: avatar.avatar_real_id,\n\t * }).then((result) => {\n\t * console.log(result);\n\t * });\n\t * }\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async setAvatar(props: { avatar_url: string; avatar_real_id: number }): Promise<TSetAvatarResult> {\n\t\tif (!props.avatar_url) {\n\t\t\tthrow new Error('avatar_url is required');\n\t\t}\n\t\tif (!props.avatar_real_id) {\n\t\t\tthrow new Error('avatar_real_id is required');\n\t\t}\n\n\t\tconst r = await this.api.avatarSetAvatar(this.userExtId, props.avatar_url, props.avatar_real_id);\n\n\t\tOCache.clear(ECacheContext.WSAPI, onUpdateContextKey.AvatarsList);\n\t\tOCache.clear(ECacheContext.WSAPI, onUpdateContextKey.AvatarsCustomized);\n\n\t\treturn {\n\t\t\terr_code: r.errCode ?? 0,\n\t\t\terr_message: r.errMsg,\n\t\t};\n\t}\n\n\tprivate async updateOnSpin(data: SAWSpinsCountPush) {\n\t\tconst templates: TMiniGameTemplate[] = await OCache.use(\n\t\t\tonUpdateContextKey.Saw,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.sawGetTemplatesT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t\tconst index = templates.findIndex((t) => t.id === data.saw_template_id);\n\t\ttemplates[index].spin_count = data.spin_count;\n\t\tthis.updateEntity(onUpdateContextKey.Saw, templates);\n\t}\n\n\tprivate async reloadMiniGameTemplate() {\n\t\tconst updatedTemplates = await this.api.sawGetTemplatesT(this.userExtId);\n\t\tthis.updateEntity(onUpdateContextKey.Saw, updatedTemplates);\n\t}\n\n\tprivate async updateMissions() {\n\t\tconst payload = await this.api.missionsGetItemsT(this.userExtId);\n\t\tthis.updateEntity(onUpdateContextKey.Missions, payload);\n\t}\n\n\tprivate async updateBonuses() {\n\t\tconst payload = await this.api.bonusesGetItemsT(this.userExtId);\n\t\tthis.updateEntity(onUpdateContextKey.Bonuses, payload);\n\t}\n\n\tprivate async updateTournaments() {\n\t\tconst payload = await this.api.tournamentsGetLobbyT(this.userExtId);\n\t\tthis.updateEntity(onUpdateContextKey.TournamentList, payload);\n\t}\n\n\tprivate async updateClans() {\n\t\tconst payload = await this.api.clansGetListT(this.userExtId);\n\t\tthis.updateEntity(onUpdateContextKey.Clans, payload);\n\t}\n\n\tprivate async updateStorePurchasedItems() {\n\t\tconst payload = await this.api.storeGetPurchasedItemsT(this.userExtId, 20, 0);\n\t\tthis.updateEntity(onUpdateContextKey.StoreHistory, payload);\n\t}\n\n\tprivate async updateStoreItems() {\n\t\tconst payload = await this.api.storeGetItemsT(this.userExtId);\n\t\tthis.updateEntity(onUpdateContextKey.StoreItems, payload);\n\t}\n\n\tprivate async updateInboxUnreadCount(count: number) {\n\t\tthis.updateEntity(onUpdateContextKey.InboxUnreadCount, count);\n\t}\n\n\tprivate async updateInboxMessages() {\n\t\tconst payload = await this.api.getInboxMessagesT(this.userExtId);\n\t\tthis.updateEntity(onUpdateContextKey.InboxMessages, payload);\n\t}\n\n\tprivate async updateRaffles() {\n\t\tconst payload = await this.api.getRafflesT(this.userExtId);\n\t\tthis.updateEntity(onUpdateContextKey.Raffles, payload);\n\t}\n\n\tprivate async notifyActivityLogUpdate() {\n\t\tconst startSeconds = Date.now() / 1000 - 600;\n\t\tconst endSeconds = Date.now() / 1000;\n\t\tconst payload = await this.api.getActivityLogT(this.userExtId, startSeconds, endSeconds, 0, 50);\n\n\t\tthis.updateEntity(onUpdateContextKey.ActivityLog, payload);\n\t}\n\n\tprivate async updateEntity(contextKey: onUpdateContextKey, payload: any) {\n\t\tOCache.set(contextKey, payload, ECacheContext.WSAPI);\n\n\t\tconst onUpdate = this.onUpdateCallback.get(contextKey);\n\t\tif (onUpdate) {\n\t\t\tonUpdate(payload);\n\t\t}\n\t}\n\n\tprivate async jackpotClearCache() {\n\t\tOCache.clear(ECacheContext.WSAPI, onUpdateContextKey.Jackpots);\n\t\tOCache.clear(ECacheContext.WSAPI, onUpdateContextKey.Pots);\n\t\tOCache.clear(ECacheContext.WSAPI, onUpdateContextKey.JackpotWinners);\n\t}\n\n\t/** Returns list of Jackpots that are active in the system and matching to the filter definition.\n\t * If filter is not provided, all active jackpots will be returned.\n\t * Filter can be used to get jackpots related to specific game or specific jackpot template.\n\t * You can call this method every second in order to get up to date information about current value of the jackpot(s) and present them to the end-users\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * ```\n\t * _smartico.vapi('EN').jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t */\n\tpublic async jackpotGet(filter?: { related_game_id?: string; jp_template_id?: number }): Promise<JackpotDetails[]> {\n\t\tconst signature: string = `${filter?.jp_template_id}:${filter?.related_game_id}`;\n\n\t\tif (signature !== this.jackpotGetSignature) {\n\t\t\tthis.jackpotGetSignature = signature;\n\t\t\tthis.jackpotClearCache();\n\t\t}\n\n\t\tlet jackpots: JackpotDetails[] = [];\n\t\tlet pots: JackpotPot[] = [];\n\n\t\tjackpots = await OCache.use<JackpotDetails[]>(\n\t\t\tonUpdateContextKey.Jackpots,\n\t\t\tECacheContext.WSAPI,\n\t\t\tasync () => {\n\t\t\t\tconst _jackpots = await this.api.jackpotGet(this.userExtId, filter);\n\t\t\t\tconst _pots = _jackpots.items.map((jp) => jp.pot);\n\n\t\t\t\t_jackpots.items.forEach((jp) => {\n\t\t\t\t\tjp.jp_public_meta.custom_data = IntUtils.JsonOrText(jp.jp_public_meta.custom_data);\n\t\t\t\t});\n\n\t\t\t\tOCache.set(onUpdateContextKey.Pots, _pots, ECacheContext.WSAPI, JACKPOT_POT_CACHE_SEC);\n\t\t\t\treturn _jackpots.items;\n\t\t\t},\n\t\t\tJACKPOT_TEMPLATE_CACHE_SEC,\n\t\t);\n\n\t\tif (jackpots.length > 0) {\n\t\t\tpots = await OCache.use<JackpotPot[]>(\n\t\t\t\tonUpdateContextKey.Pots,\n\t\t\t\tECacheContext.WSAPI,\n\t\t\t\tasync () => {\n\t\t\t\t\tconst jp_template_ids = jackpots.map((jp) => jp.jp_template_id);\n\t\t\t\t\treturn (await this.api.potGet(this.userExtId, { jp_template_ids })).items;\n\t\t\t\t},\n\t\t\t\tJACKPOT_POT_CACHE_SEC,\n\t\t\t);\n\t\t}\n\n\t\treturn jackpots.map((jp) => {\n\t\t\tlet _jp: JackpotDetails = {\n\t\t\t\t...jp,\n\t\t\t\tpot: pots.find((p) => p.jp_template_id === jp.jp_template_id),\n\t\t\t};\n\t\t\treturn _jp;\n\t\t});\n\t}\n\n\t/**\n\t * Opt-in currently logged in user to the jackpot with the specified jp_template_id.\n\t * You may call jackpotGet method after doing optin to see that user is opted in to the jackpot.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.jackpotOptIn({ jp_template_id: 123 }).then((result) => {\n\t * console.log('Opted in to the jackpot');\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t *\n\t */\n\tpublic async jackpotOptIn(filter: { jp_template_id: number }): Promise<JackpotsOptinResponse> {\n\t\tif (!filter.jp_template_id) {\n\t\t\tthrow new Error('jp_template_id is required in jackpotOptIn');\n\t\t}\n\n\t\tconst result = await this.api.jackpotOptIn(this.userExtId, filter);\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Opt-out currently logged in user from the jackpot with the specified jp_template_id.\n\t * You may call jackpotGet method after doing optout to see that user is not opted in to the jackpot.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.jackpotOptOut({ jp_template_id: 123 }).then((result) => {\n\t * console.log('Opted out from the jackpot');\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t *\n\t */\n\tpublic async jackpotOptOut(filter: { jp_template_id: number }): Promise<JackpotsOptoutResponse> {\n\t\tif (!filter.jp_template_id) {\n\t\t\tthrow new Error('jp_template_id is required in jackpotOptOut');\n\t\t}\n\n\t\tconst result = await this.api.jackpotOptOut(this.userExtId, filter);\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Returns jackpot winners for the given `jp_template_id` (paginated on the server).\n\t * Default page size on the wire is 20; use `limit`, `offset`, and repeated calls to load more.\n\t * The full protocol response also includes `has_more`; this method returns only the `winners` array.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getJackpotWinners({\n\t * jp_template_id: 123,\n\t * }).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t *\n\t * @param params - Jackpot winners parameters\n\t * @param params.jp_template_id - Jackpot template id (required; throws if missing)\n\t * @param params.limit - Page size (server default 20 when omitted)\n\t * @param params.offset - Offset into the winner list\n\t */\n\n\tpublic async getJackpotWinners({\n\t\tlimit,\n\t\toffset,\n\t\tjp_template_id,\n\t}: {\n\t\tlimit?: number;\n\t\toffset?: number;\n\t\tjp_template_id?: number;\n\t}): Promise<JackpotWinnerHistory[]> {\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.JackpotWinners + jp_template_id,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.getJackpotWinnersT(this.userExtId, limit, offset, jp_template_id),\n\t\t\tJACKPOT_WINNERS_CACHE_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Returns the eligible games for the jackpot with the specified jp_template_id.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getJackpotEligibleGames({ jp_template_id: 123 }).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t * \n\t * **Visitor mode: not supported**\n\t * \n\t */\n\n\tpublic async getJackpotEligibleGames({ jp_template_id, onUpdate } : { jp_template_id: number, onUpdate?: () => void }): Promise<TGetJackpotEligibleGamesResponse> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.JackpotEligibleGames, onUpdate);\n\t\t}\n\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.JackpotEligibleGames + jp_template_id,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.getJackpotEligibleGamesT(this.userExtId, { jp_template_id }),\n\t\t\tJACKPOT_ELIGIBLE_GAMES_CACHE_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Returns all the related tournaments and missions for the provided game id for the current user\n\t * The provided Game ID should correspond to the ID from the Games Catalog - https://help.smartico.ai/welcome/technical-guides/games-catalog-api\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getRelatedItemsForGame('gold-slot2').then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * ```\n\t * _smartico.vapi('EN').getRelatedItemsForGame('gold-slot2').then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t */\n\tpublic async getRelatedItemsForGame(related_game_id: string): Promise<GetRelatedAchTourResponse> {\n\t\tconst result = await this.api.getRelatedItemsForGame(this.userExtId, related_game_id);\n\t\treturn result;\n\t}\n\n\t/**\n\t * Returns the list of Raffles available for user\n\t * The returned list of Raffles is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getRaffles with a new onUpdate callback, the old one will be overwritten by the new one.\n\t * The onUpdate callback will be called on claiming prize. Updated Raffles will be passed to onUpdate callback.\n\t *\n\t * **Example**:\n\t * \n\t * ```\n\t * _smartico.api.getRaffles().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * \n\t * ```\n\t * _smartico.vapi('EN').getRaffles().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t */\n\n\tpublic async getRaffles({ onUpdate }: { onUpdate?: (data: TRaffle[]) => void } = {}): Promise<TRaffle[]> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.Raffles, onUpdate);\n\t\t}\n\n\t\treturn OCache.use(onUpdateContextKey.Raffles, ECacheContext.WSAPI, () => this.api.getRafflesT(this.userExtId), CACHE_DATA_SEC);\n\t}\n\n\t/**\n\t * Returns draw run for provided raffle_id and run_id.\n\t * You can pass winners_from and winners_to parameters to get a specific range of winners. Default is 0-20.\n\t *\n\t *\n\t * **Example**:\n\t * \n\t * ```javascript\n\t * _smartico.api.getRaffleDrawRun({raffle_id: 156, run_id: 145}).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * \n\t * \n\t * ```javascript\n\t * _smartico.vapi('EN').getRaffleDrawRun({ raffle_id: 156, run_id: 145 }).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t */\n\n\tpublic async getRaffleDrawRun(props: { raffle_id: number; run_id: number; winners_from?: number; winners_to?: number }): Promise<TRaffleDraw> {\n\t\tif (!props.raffle_id || !props.run_id) {\n\t\t\tthrow new Error('both raffle_id and run_id are required');\n\t\t}\n\n\t\treturn await this.api.getRaffleDrawRunT(this.userExtId, props.raffle_id, props.run_id, props.winners_from, props.winners_to);\n\t}\n\n\t/**\n\t * Returns history of draw runs for the provided raffle_id and draw_id, if the draw_id is not provided will return history of all the draws for the provided raffle_id\n\t *\n\t *\n\t * **Example**:\n\t * \n\t * ```javascript\n\t * _smartico.api.getRaffleDrawRunsHistory({ raffle_id: 156, draw_id: 432 }).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * \n\t * ```javascript\n\t * _smartico.vapi('EN').getRaffleDrawRunsHistory({ raffle_id: 156, draw_id: 432 }).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t */\n\n\tpublic async getRaffleDrawRunsHistory(props: { raffle_id: number; draw_id?: number }): Promise<TRaffleDrawRun[]> {\n\t\t\n\t\tconst res = await this.api.getRaffleDrawRunsHistory(this.userExtId, props);\n\n\t\tif (!props.raffle_id) {\n\t\t\tthrow new Error('raffle_id is required');\n\t\t}\n\n\t\treturn drawRunHistoryTransform(res);\n\t}\n\n\t/**\n\t * Returns `err_code` and `err_message` after the call; `err_code` 0 means the request succeeded.\n\t *\n\t *\n\t * **Example**:\n\t * \n\t * ```javascript\n\t * _smartico.api.claimRafflePrize({won_id:251}).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * \n\t * ```javascript\n\t * _smartico.vapi('EN').claimRafflePrize({ won_id: 251 }).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t */\n\tpublic async claimRafflePrize(props: { won_id: number }): Promise<TransformedRaffleClaimPrizeResponse> {\n\t\tif (!props.won_id) {\n\t\t\tthrow new Error('won_id is required');\n\t\t}\n\n\t\tconst res = await this.api.claimRafflePrize(this.userExtId, { won_id: props.won_id });\n\t\treturn raffleClaimPrizeResponseTransform(res);\n\t}\n\n\t/**\n\t * Requests an opt-in for the specified raffle. Returns the err_code.\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async requestRaffleOptin(props: { raffle_id: number; draw_id: number; raffle_run_id: number }): Promise<TRaffleOptinResponse> {\n\t\tif (!props.raffle_id) {\n\t\t\tthrow new Error('raffle_id is required');\n\t\t}\n\t\tif (!props.draw_id) {\n\t\t\tthrow new Error('draw_id is required');\n\t\t}\n\t\tif (!props.raffle_run_id) {\n\t\t\tthrow new Error('raffle_run_id is required');\n\t\t}\n\n\t\tconst r = await this.api.raffleOptin(this.userExtId, props);\n\n\t\treturn {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t};\n\t}\n}\n","export enum AchCustomSectionType {\n\tHTML_PAGE = 1,\n\tMISSIONS_CATEGORY = 2,\n\tTOURNAMENTS_CATEGORY = 3,\n\tLEVELS = 4,\n\tMINI_GAMES = 5,\n\tMISSION_CUSTOM_LAYOUT = 6,\n\tMATCH_X_AND_QUIZ = 7,\n\tREDIRECT_LINK = 9,\n\tLOOTBOX_WEEKLY = 10,\n\tLOOTBOX_CALENDAR_DAYS = 11,\n\tSTORE = 12,\n\tRAFFLE = 13,\n\tBADGES = 14,\n}\n\nexport enum AchCustomLayoutTheme {\n\tVALENTINES_LIGHT = 'valentines-light',\n\tVALENTINES_DARK = 'valentines-dark',\n\tEURO_2024 = 'euro-2024',\n\tGENERIC = 'generic',\n}\n\nexport enum AchMissionsTabsOptions {\n\tONLY_OVERVIEW = 1,\n\tNO_OVERVIEW = 2,\n\tALL = 3,\n}\n\nexport enum AchOverviewMissionsFilter {\n\tANY = 1,\n\tALL_MISSIONS = 2,\n\tALL_EXCEPT_COMPLETED = 3,\n\tALL_EXCEPT_LOCKED = 4,\n\tALL_EXCEPT_COMPLETED_AND_LOCKED = 5,\n}\n\nexport enum LiquidEntityData {\n\tMissions = 1,\n\tStore = 2,\n\tTournaments = 3,\n\tMiniGames = 4,\n\tLevels = 5,\n\tJackpots = 6,\n\tBonus = 7,\n\tLeaderboard = 8,\n\tBadges = 9,\n\tTournament = 10,\n\tRaffles = 11,\n\tSingleRaffle = 12,\n}","import { TUICustomSection } from '../WSAPI/WSAPITypes';\nimport {\n\tAchCustomLayoutTheme,\n\tAchCustomSectionType,\n\tAchMissionsTabsOptions,\n\tAchOverviewMissionsFilter,\n\tLiquidEntityData,\n} from './AchCustomSection';\nimport { GetCustomSectionsResponse } from './GetCustomSectionsResponse';\n\nexport interface UICustomSection {\n\tbody?: string;\n\tmenu_img?: string;\n\tmenu_name?: string;\n\tcustom_skin_images?: string;\n\tsection_type_id?: AchCustomSectionType;\n\ttheme?: AchCustomLayoutTheme;\n\tgeneric_custom_css?: string;\n\tmission_tabs_options?: AchMissionsTabsOptions;\n\toverview_missions_filter?: AchOverviewMissionsFilter;\n\toverview_missions_count?: number;\n\turl_or_dp?: string;\n\tliquid_entity_data?: LiquidEntityData[];\n\tach_tournament_id?: number;\n\traffle_id?: number;\n\tshow_raw_data?: boolean;\n\tliquid_template?: number;\n\tach_category_ids?: number[];\n\tshop_category_ids?: number[];\n}\n\nexport const UICustomSectionTransform = (response: GetCustomSectionsResponse): TUICustomSection[] => {\n\n\tconst items: TUICustomSection[] = [];\n\n\tObject.keys(response.customSections || []).forEach((key: string) => {\n\t\tconst r = response.customSections[key];\n\t\tconst id = parseInt(key);\n\t\tif (r.section_type_id !== undefined && r.section_type_id >= 1) {\n\t\t\tconst x: TUICustomSection = {\n\t\t\t\tid: id,\n\t\t\t\tbody: r.body,\n\t\t\t\tmenu_img: r.menu_img,\n\t\t\t\tmenu_name: r.menu_name,\n\t\t\t\tsection_type_id: r.section_type_id,\n\t\t\t\tcustom_skin_images: r.custom_skin_images,\n\t\t\t\tgeneric_custom_css: r.generic_custom_css,\n\t\t\t\tmission_tabs_options: r.mission_tabs_options,\n\t\t\t\toverview_missions_count: r.overview_missions_count,\n\t\t\t\toverview_missions_filter: r.overview_missions_filter,\n\t\t\t\turl_or_dp: r.url_or_dp,\n\t\t\t\ttheme: r.theme,\n\t\t\t\t...(r.section_type_id === AchCustomSectionType.LEVELS\n\t\t\t\t\t? {\n\t\t\t\t\t\tliquid_entity_data: r.liquid_entity_data,\n\t\t\t\t\t\tach_tournament_id: r.ach_tournament_id,\n\t\t\t\t\t\traffle_id: r.raffle_id,\n\t\t\t\t\t\tshow_raw_data: r.show_raw_data,\n\t\t\t\t\t\tliquid_template: r.liquid_template,\n\t\t\t\t\t}\n\t\t\t\t\t: {}\n\t\t\t\t),\n\t\t\t\t...(r.section_type_id === AchCustomSectionType.BADGES\n\t\t\t\t\t? {\n\t\t\t\t\t\tach_category_ids: r.ach_category_ids,\n\t\t\t\t\t}\n\t\t\t\t\t: {}\n\t\t\t\t),\n\t\t\t\t...(r.section_type_id === AchCustomSectionType.STORE\n\t\t\t\t\t? {\n\t\t\t\t\t\tshop_category_ids: r.shop_category_ids,\n\t\t\t\t\t}\n\t\t\t\t\t: {}\n\t\t\t\t),\n\t\t\t};\n\n\t\t\titems.push(x);\n\t\t}\n\t});\n\n\treturn items;\n};\n","import { BonusStatus } from './BonusStatus';\nimport { BonusTemplateMetaMap } from './BonusTemplateMetaMap';\nimport { BonusMetaMap } from './BonusMetaMap';\nimport { TBonus } from '../WSAPI/WSAPITypes';\n\nexport interface Bonus {\n\tid: number;\n\tredeemable?: boolean;\n\tcreateDate?: string;\n\tupdateDate?: string;\n\tredeemDate?: string;\n\tengagementUid?: string;\n\tlabelBonusTemplateId?: number;\n\tsourceProductRefId?: number;\n\tsourceProductId?: number;\n\tuserId?: number;\n\tbonusStatusId?: BonusStatus;\n\tlabelBonusTemplateMetaMap?: BonusTemplateMetaMap;\n\tbonusMetaMap?: BonusMetaMap;\n}\n\nexport const BonusItemsTransform = (items: Bonus[]): TBonus[] => {\n\treturn items\n\t\t.filter((r) => r.id >= 1)\n\t\t.map((r) => {\n\t\t\tconst x: TBonus = {\n\n bonus_id: r.id,\n is_redeemable: r.redeemable,\n create_date: r.createDate,\n redeem_date: r.redeemDate,\n label_bonus_template_id: r.labelBonusTemplateId,\n bonus_status_id: r.bonusStatusId,\n label_bonus_template_meta_map: r.labelBonusTemplateMetaMap,\n bonus_meta_map: r.bonusMetaMap\n\t\t\t};\n\n\t\t\treturn x;\n\t\t});\n};","export enum BonusStatus {\n\tNew = 1,\n\tCOUPON_ISSUED = 2,\n\tREDEEMED = 3,\n\tREDEEM_FAILED = 4, \n\tCOUPON_ISSUE_FAILED = 5, \n\tEXPIRED = 6, \n}","export enum UserBalanceType {\n Points = 0,\n Gems = 1,\n Diamonds = 2\n}\n\n\n","import { ProtocolResponse } from '../Base/ProtocolResponse';\nimport { ActivityLogEntry } from './ActivityLogEntry';\nimport { TActivityLog } from '../WSAPI/WSAPITypes';\nimport { UserBalanceType } from './UserBalanceType';\n\nexport interface GetActivityLogResponse extends ProtocolResponse {\n\tlogHistory: ActivityLogEntry[];\n}\n\nexport const ActivityLogTransform = (items: ActivityLogEntry[]): TActivityLog[] => {\n\tif (!items) {\n\t\treturn [];\n\t}\n\n\treturn items.map((item: any): TActivityLog => {\n\t\tconst itemTransformed: Partial<TActivityLog> = {\n\t\t\tcreate_date: item.create_date,\n\t\t\tuser_ext_id: item.user_ext_id,\n\t\t\tcrm_brand_id: item.crm_brand_id,\n\t\t\tsource_type_id: item.source_type_id,\n\t\t}\n\n\t\titem.type = item.type ?? UserBalanceType.Points;\n\n\t\tif (item.type === UserBalanceType.Diamonds || item.type === UserBalanceType.Gems) {\n\t\t\titemTransformed.type = item.type;\n\t\t\titemTransformed.amount = item.amount;\n\t\t\titemTransformed.balance = item.balance;\n\t\t}\n\n\t\tif (item.type === UserBalanceType.Points) {\n\t\t\titemTransformed.type = UserBalanceType.Points;\n\t\t\titemTransformed.amount = item.points_collected;\n\t\t\titemTransformed.balance = item.user_points_balance;\n\t\t\titemTransformed.total_ever = item.user_points_ever;\n\t\t}\n\n\t\treturn itemTransformed as TActivityLog;\n\t});\n};\n\n\n","export enum PointChangeSourceType {\n\tJourney = 1,\n\tAchievementTaskCompletion = 2,\n\tAchievementCompletion = 3,\n\tLevelsStructureChange = 4,\n\tStorePurchase = 5,\n\tManualAdjustment = 6,\n\tLeaderboard = 7,\n\tTournament = 11,\n\tAutomationRule = 12,\n\tTournamentRegistration = 13,\n\tTournamentRegistrationCancellation = 14,\n\tRefundPoints = 15,\n\tPlayMiniGame = 16,\n\tWinMiniGame = 17,\n\tAPI = 18,\n\tDynamicFormula = 19,\n\tRaffle = 21,\n\tAvatars = 22,\n}\n\n\n","import { TAvatarDefinition } from '../WSAPI/WSAPITypes';\nimport { ProtocolResponse } from '../Base/ProtocolResponse';\nimport { AvatarDefinition } from './AvatarDefinition';\n\nexport interface GetAvatarsListResponse extends ProtocolResponse {\n\tavatars: AvatarDefinition[];\n}\n\nexport const avatarDefinitionTransform = (items: AvatarDefinition[], avatarDomain: string): TAvatarDefinition[] => {\n\treturn items.map((item) => ({\n\t\tavatar_real_id: item.avatar_real_id,\n\t\tis_default: item.is_default,\n\t\thide_until_achieved: item.hide_until_achieved,\n\t\tpriority: item.priority,\n\t\tdescription: item.public_meta.description,\n\t\turl: item.public_meta.url,\n\t\tavatar_url: item.public_meta.url && !item.public_meta.url.startsWith('http') ? `${avatarDomain}${item.public_meta.url}` : item.public_meta.url,\n\t\tavatar_source_type_id: item.avatar_source_type_id,\n\t\tactive_from_date: item.active_from_date,\n\t\tactive_till_date: item.active_till_date,\n\t\tis_given: item.is_given,\n\t\tis_in_use: item.is_in_use,\n\t}));\n};\n","import { TAvatarCustomized } from '../WSAPI/WSAPITypes';\nimport { ProtocolResponse } from '../Base/ProtocolResponse';\nimport { AvatarCustomized } from './AvatarCustomized';\n\nexport interface GetAvatarsCustomizedResponse extends ProtocolResponse {\n\tavatars: AvatarCustomized[];\n}\n\nexport const avatarCustomizedTransform = (items: AvatarCustomized[], avatarDomain: string): TAvatarCustomized[] => {\n\treturn items.map((item) => ({\n\t\tavatar_real_id: item.avatar_real_id,\n\t\turl: item.url && !item.url.startsWith('http') ? `${avatarDomain}${item.url}` : item.url,\n\t\tdt_created: item.dt_created,\n\t}));\n};\n","import { TAvatarPrompt } from '../WSAPI/WSAPITypes';\nimport { ProtocolResponse } from '../Base/ProtocolResponse';\nimport { AvatarPrompt } from './AvatarPrompt';\n\nexport interface GetAvatarPromptsResponse extends ProtocolResponse {\n\tprompts: AvatarPrompt[];\n}\n\nexport const avatarPromptTransform = (items: AvatarPrompt[], avatarDomain: string): TAvatarPrompt[] => {\n\treturn items.map((item) => ({\n\t\tprompt_id: item.prompt_id,\n\t\tname: item.public_meta.name,\n\t\ticon_url: item.public_meta.icon_url && !item.public_meta.icon_url.startsWith('http') ? `${avatarDomain}${item.public_meta.icon_url}` : item.public_meta.icon_url,\n\t\tcost_currency_type_id: item.cost_currency_type_id,\n\t\tcost_value: item.cost_value,\n\t}));\n};\n","import { ProtocolResponse } from \"../Base/ProtocolResponse\";\nimport { JackPotWinner } from \"./JackPotWinner\";\n\nexport interface GetJackpotWinnersResponse extends ProtocolResponse {\n\t/** The list of jackpot winners */\n\twinners: JackpotWinnerHistory[];\n\t/** Whether there are more winners to fetch */\n\thas_more: boolean;\n}\n\nexport interface JackpotWinnerHistory {\n\t/** Id of the jackpot pot */\n\tjp_pot_id: number;\n\t/** Date of winning in milliseconds */\n\twin_date_ts: number;\n\t/** Info about jackpot winner */\n\twinner: JackPotWinner;\n}\n\n/**\n * @ignore\n */\nexport const GetJackpotWinnersResponseTransform = (items: JackpotWinnerHistory[]): JackpotWinnerHistory[] => {\n\treturn items.map((item) => {\n\t\tconst winnerInfo: JackpotWinnerHistory = {\n\t\t\twinner: item.winner,\n\t\t\twin_date_ts: item.win_date_ts,\n\t\t\tjp_pot_id: item.jp_pot_id,\n\t\t};\n\n\t\treturn winnerInfo;\n\t});\n};\n","import { ProtocolResponse } from '../Base/ProtocolResponse';\nimport { AchRelatedGame } from '../Base/AchRelatedGame';\n\nexport interface GetJackpotEligibleGamesResponse extends ProtocolResponse {\n\teligible_games: AchRelatedGame[];\n}\n\nexport interface TGetJackpotEligibleGamesResponse {\n\teligible_games: JackpotEligibleGame[];\n}\n\nexport interface JackpotEligibleGame {\n /** ID of the game on Smartico side */\n\tgame_id: number;\n /** ID of the game on operator side */\n ext_game_id: string;\n /** Name of the game */\n name: string;\n /** Link to the game */\n link: string;\n /** Image of the game */\n image: string;\n /** Whether the game is enabled */\n enabled: boolean;\n /** Categories of the game */\n game_categories: string[];\n /** Provider of the game */\n game_provider: string;\n /** The link to the mobile game */\n mobile_spec_link: string;\n /** The priority of the game */\n priority: number;\n}\n\n/**\n * @ignore\n */\nexport const GetJackpotEligibleGamesResponseTransform = ({ eligible_games } : { eligible_games: AchRelatedGame[]}): TGetJackpotEligibleGamesResponse => {\n\tconst games = eligible_games.map((game: AchRelatedGame, i: number) => ({\n\t\tgame_id: game.ach_game_id,\n\t\text_game_id: game.ext_game_id,\n\t\tname: game.game_public_meta.name,\n\t\tlink: game.game_public_meta.link,\n\t\timage: game.game_public_meta.image,\n\t\tenabled: game.game_public_meta.enabled,\n\t\tgame_categories: game.game_public_meta.game_categories,\n\t\tgame_provider: game.game_public_meta.game_provider,\n\t\tmobile_spec_link: game.game_public_meta.mobile_spec_link,\n\t\tpriority: i + 1,\n\t}));\n\n\treturn { eligible_games: games };\n};\n","import { ClassId } from './Base/ClassId';\nimport { ProtocolRequest } from './Base/ProtocolRequest';\nimport { ProtocolResponse } from './Base/ProtocolResponse';\nimport { SAWGetTemplatesResponse } from './MiniGames/SAWGetTemplatesResponse';\nimport { SAWGetTemplatesRequest } from './MiniGames/SAWGetTemplatesRequest';\nimport { IntUtils } from './IntUtils';\nimport { ILogger } from './ILogger';\nimport {\n\tSAWDoAknowledgeRequest,\n\tSAWDoAknowledgeResponse,\n\tSAWDoSpinRequest,\n\tSAWDoSpinResponse,\n\tSAWHistoryTransform,\n\tSAWPrizesHistory,\n\tSAWSpinErrorCode,\n\tSAWTemplatesTransform,\n\tSAWWinningHistoryRequest,\n\tSAWWinningHistoryResponse,\n} from './MiniGames';\nimport { ECacheContext, OCache } from './OCache';\nimport {\n\tActivityTypeLimited,\n\tCoreUtils,\n\tGetTranslationsRequest,\n\tGetTranslationsResponse,\n\tPublicLabelSettings,\n\tResponseIdentify,\n\tTranslationArea,\n} from './Core';\nimport { GetLabelInfoResponse } from './Core/GetLabelInfoResponse';\nimport { GetLabelInfoRequest } from './Core/GetLabelInfoRequest';\nimport {\n\tGetInboxMessagesRequest,\n\tGetInboxMessagesResponse,\n\tInboxMessageBody,\n\tInboxMessageBodyTransform,\n\tInboxMessagesTransform,\n\tInboxReadStatus,\n\tMarkInboxMessageDeletedRequest,\n\tMarkInboxMessageDeletedResponse,\n\tMarkInboxMessageReadRequest,\n\tMarkInboxMessageReadResponse,\n\tMarkInboxMessageStarredRequest,\n\tMarkInboxMessageStarredResponse,\n} from './Inbox';\nimport {\n\tBuyStoreItemRequest,\n\tBuyStoreItemResponse,\n\tGetCategoriesStoreResponse,\n\tGetStoreHistoryRequest,\n\tGetStoreHistoryResponse,\n\tGetStoreItemsResponse,\n\tStoreCategoryTransform,\n\tStoreItemPurchasedTransform,\n\tStoreItemTransform,\n} from './Store';\nimport {\n\tAchCategoryTransform,\n\tAchClaimPrizeRequest,\n\tAchClaimPrizeResponse,\n\tAchievementOptinRequest,\n\tAchievementOptinResponse,\n\tAchievementType,\n\tGetAchCategoriesResponse,\n\tGetAchievementMapRequest,\n\tGetAchievementMapResponse,\n\tUserAchievementTransform,\n\tenrichUserAchievementsWithBadgeState,\n} from './Missions';\nimport {\n\tGetClanTournamentPlayersRequest,\n\tGetClanTournamentPlayersResponse,\n\tGetTournamentInfoRequest,\n\tGetTournamentInfoResponse,\n\tGetTournamentsRequest,\n\tGetTournamentsResponse,\n\tTournamentItemsTransform,\n\tTournamentRegisterRequest,\n\tTournamentRegisterResponse,\n\tclanTournamentPlayersTransform,\n\ttournamentInfoItemTransform,\n} from './Tournaments';\nimport { GetLeaderBoardsRequest, GetLeaderBoardsResponse, LeaderBoardDetails, LeaderBoardPeriodType } from './Leaderboard';\nimport { GetLevelMapResponse, GetLevelMapResponseTransform } from './Level';\nimport { WSAPI } from './WSAPI/WSAPI';\nimport {\n\tTInboxMessage,\n\tTInboxMessageBody,\n\tTLevel,\n\tTMiniGameTemplate,\n\tTMissionOrBadge,\n\tTStoreCategory,\n\tTAchCategory,\n\tTStoreItem,\n\tTTournament,\n\tTTournamentDetailed,\n\tLeaderBoardDetailsT,\n\tUserLevelExtraCountersT,\n\tTSegmentCheckResult,\n\tTUICustomSection,\n\tTBonus,\n\tTRaffle,\n\tTLevelCurrent,\n\tTActivityLog,\n\tTRaffleDraw,\n\tTAvatarDefinition,\n\tTAvatarCustomized,\n\tTAvatarPrompt,\n\tTClans,\n\tTClanInfo,\n\tTClanJoinResult,\n\tTClanTournamentPlayers,\n} from './WSAPI/WSAPITypes';\nimport { getLeaderBoardTransform } from './Leaderboard/LeaderBoards';\nimport { GetAchievementsUserInfoResponse } from './Core/GetAchievementsUserInfoResponse';\nimport { CheckSegmentMatchResponse } from './Core/CheckSegmentMatchResponse';\nimport { CheckSegmentMatchRequest } from './Core/CheckSegmentMatchRequest';\nimport {\n\tGetJackpotsPotsRequest,\n\tGetJackpotsPotsResponse,\n\tGetJackpotsRequest,\n\tGetJackpotsResponse,\n\tJackpotsOptinRequest,\n\tJackpotsOptinResponse,\n\tJackpotsOptoutRequest,\n\tJackpotsOptoutResponse,\n} from './Jackpots';\nimport { GetCustomSectionsRequest, GetCustomSectionsResponse, UICustomSectionTransform } from './CustomSections';\nimport { BonusItemsTransform, ClaimBonusRequest, ClaimBonusResponse, GetBonusesResponse } from './Bonuses';\nimport { GetBonusesRequest } from './Bonuses/GetBonusesRequest';\nimport { SAWDoSpinBatchResponse } from './MiniGames/SAWDoSpinBatchResponse';\nimport { SAWDoSpinBatchRequest } from './MiniGames/SAWDoSpinBatchRequest';\nimport { SAWDoAcknowledgeBatchRequest } from './MiniGames/SAWDoAcknowledgeBatchRequest';\nimport { SAWDoAcknowledgeBatchResponse } from './MiniGames/SAWDoAcknowledgeBatchResponse';\nimport { GetRelatedAchTourRequest } from './Missions/GetRelatedAchTourRequest';\nimport { GetRelatedAchTourResponse } from './Missions/GetRelatedAchTourResponse';\nimport { GetRafflesResponse, raffleTransform } from './Raffle/GetRafflesResponse';\nimport { GetRafflesRequest } from './Raffle/GetRafflesRequest';\nimport { GetActivityLogRequest, GetActivityLogResponse, ActivityLogTransform } from './ActivityLog';\nimport { GetClanListRequest, GetClanListResponse, GetClanInfoRequest, GetClanInfoResponse, JoinClanRequest, JoinClanResponse } from './Clans';\nimport { InboxCategories } from './Inbox/InboxCategories';\nimport { GetDrawRunRequest, GetDrawRunResponse, GetRaffleDrawRunsHistoryRequest, GetRaffleDrawRunsHistoryResponse, RaffleClaimPrizeRequest, RaffleClaimPrizeResponse, RaffleOptinRequest, RaffleOptinResponse, drawRunTransform } from './Raffle';\nimport { GetAvatarsListResponse, avatarDefinitionTransform } from './Avatars/GetAvatarsListResponse';\nimport { GetAvatarsCustomizedResponse, avatarCustomizedTransform } from './Avatars/GetAvatarsCustomizedResponse';\nimport { GetAvatarPromptsResponse, avatarPromptTransform } from './Avatars/GetAvatarPromptsResponse';\nimport { SetAvatarRequest, SetAvatarResponse } from './Avatars';\nimport { GetJackpotWinnersResponse, GetJackpotWinnersResponseTransform, JackpotWinnerHistory } from './Jackpots/GetJackpotWinnersResponse';\nimport { GetJackpotWinnersRequest } from './Jackpots/GetJackpotWinnersRequest';\nimport { GetJackpotEligibleGamesRequest } from './Jackpots/GetJackpotEligibleGamesRequest';\nimport { GetJackpotEligibleGamesResponse, GetJackpotEligibleGamesResponseTransform, JackpotEligibleGame, TGetJackpotEligibleGamesResponse } from './Jackpots/GetJackpotEligibleGamesResponse';\nimport {\n\tGamesApiResponse,\n\tGamePickRound,\n\tGamePickRoundBoard,\n\tGamePickUserInfo,\n\tGamePickGameInfo,\n} from './WSAPI/WSAPITypes';\n\nconst PUBLIC_API_URL = 'https://papi{ENV_ID}.smartico.ai/services/public';\nconst C_SOCKET_PROD = 'wss://api{ENV_ID}.smartico.ai/websocket/services';\nconst GAMES_API_URL = 'https://r-games-api.smr.vc';\nconst AVATAR_DOMAIN = 'https://img{ENV_ID}.smr.vc';\nconst DEFAULT_LANG_EN = 'EN';\n\ninterface Tracker {\n\tlabel_api_key: string;\n\tuserPublicProps: any;\n\tparams?: { brand_key?: string };\n\ton: (callBackKey: ClassId, func: (data: any) => void) => void;\n\tgetLabelSetting: (key: PublicLabelSettings) => any;\n\ttriggerExternalCallBack: (callBackKey: string, payload: any) => void;\n\tgetExtUserId: () => string;\n}\ninterface IOptions {\n\tlogger?: ILogger;\n\tlogCIDs?: ClassId[];\n\tlogHTTPTiming?: boolean;\n\ttracker?: Tracker;\n\tbrand_api_key?: string;\n}\n\ntype MessageSender = (message: any, publicApuUrl?: string, expectCID?: ClassId) => Promise<any>;\n\nclass SmarticoAPI {\n\tprivate publicUrl: string;\n\tprivate wsUrl: string;\n\tprivate inboxCdnUrl: string;\n\tprivate partnerUrl: string;\n\tprivate gamesApiUrl: string;\n\tprivate baseRgApiParams: Record<string, string>;\n\tpublic avatarDomain: string;\n\tprivate envId: number;\n\n\tprivate logger: ILogger;\n\tprivate logCIDs: ClassId[];\n\tprivate logHTTPTiming: boolean;\n\tpublic tracker?: Tracker;\n\n\tpublic constructor(\n\t\tprivate label_api_key: string,\n\t\tprivate brand_api_key: string,\n\t\tprivate messageSender: MessageSender,\n\t\toptions: IOptions = {},\n\t) {\n\t\tthis.logger = options.logger || (console as any);\n\n\t\tif (this.logger.always === undefined) {\n\t\t\tthis.logger.always = this.logger.info;\n\t\t}\n\n\t\tthis.logCIDs = options.logCIDs || [];\n\t\tthis.logHTTPTiming = options.logHTTPTiming || false;\n\t\tthis.tracker = options.tracker;\n\n\t\tthis.publicUrl = SmarticoAPI.getPublicUrl(label_api_key);\n\t\tthis.wsUrl = SmarticoAPI.getPublicWsUrl(label_api_key);\n\n\t\tif (this.tracker) {\n\t\t\t// available only for real users\n\t\t\tthis.baseRgApiParams = {\n\t\t\t\tenv_id: String(SmarticoAPI.getEnvId(label_api_key)),\n\t\t\t\tlabel_api_key: label_api_key,\n\t\t\t\tbrand_key: options.brand_api_key || this.tracker.params.brand_key,\n\t\t\t\thash: IntUtils.uuid(),\n\t\t\t}\n\t\t}\n\n\t\tthis.avatarDomain = SmarticoAPI.getAvatarUrl(label_api_key || options.tracker?.label_api_key);\n\n\t\tthis.label_api_key = SmarticoAPI.getCleanLabelApiKey(label_api_key);\n\t}\n\n\tpublic static getEnvDnsSuffix(label_api_key: string): string {\n\t\tlet ENV_ID = label_api_key.length === 38 ? label_api_key.substring(37, 38) : '';\n\n\t\tif (ENV_ID === '1' || ENV_ID === '2') {\n\t\t\tENV_ID = '';\n\t\t}\n\t\treturn ENV_ID;\n\t}\n\n\tpublic static replaceSmrDomainsWithCloudfront<T>(value: string | { [key: string]: any }): T {\n\t\tif (!value) {\n\t\t\treturn value as T;\n\t\t}\n\n\t\tconst domains = {\n\t\t\t'img.smr.vc': 'd1am61onjxtys8.cloudfront.net',\n\t\t\t'img3.smr.vc': 'd3dubbodzd2q05.cloudfront.net',\n\t\t\t'img4.smr.vc': 'dvm0p9vsezqr2.cloudfront.net',\n\t\t\t'img5.smr.vc': 'd3gen1ksvxhac8.cloudfront.net',\n\t\t\t'img6.smr.vc': 'db1kmyg7iufeo.cloudfront.net',\n\t\t\t'img7.smr.vc': 'd36om2g86xefo6.cloudfront.net',\n\t\t\t'img8.smr.vc': 'd2zme31v54n5pb.cloudfront.net',\n\n\t\t\t'static.smr.vc': 'dtt380pweilws.cloudfront.net',\n\t\t\t'static3.smr.vc': 'd1qt8ake8g4imn.cloudfront.net',\n\t\t\t'static4.smr.vc': 'd146b4m7rkvjkw.cloudfront.net',\n\t\t\t'static5.smr.vc': 'd3l7suk1kl9rwh.cloudfront.net',\n\t\t\t'static6.smr.vc': 'd121pfj16xdfcq.cloudfront.net',\n\t\t\t'static7.smr.vc': 'd21deilz814qgl.cloudfront.net',\n\t\t\t'static8.smr.vc': 'd1uffsroxjy2ku.cloudfront.net',\n\t\t}\n\n\t\tconst escapeRegExp = (str: string) => str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n\n\t\tlet replacedValue = typeof value === 'string' ? value : JSON.stringify(value);\n\n\t\tfor (const [oldDomain, newDomain] of Object.entries(domains)) {\n\t\t\treplacedValue = replacedValue.replace(new RegExp(escapeRegExp(oldDomain), 'g'), newDomain);\n\t\t}\n\n\t\ttry {\n\t\t\treturn typeof value === 'string' ? replacedValue as T : JSON.parse(replacedValue)\n\t\t} catch (err) {\n\t\t\treturn value as T;\n\t\t}\n\t}\n\n\tpublic static getEnvId(label_api_key: string): number {\n\t\treturn label_api_key.length === 38 ? parseInt(label_api_key.substring(37, 38), 10) : 2;\n\t}\n\n\tpublic static getCleanLabelApiKey(label_api_key: string): string {\n\t\treturn label_api_key.substring(0, 36);\n\t}\n\n\tpublic static getPublicUrl(label_api_key: string): string {\n\t\treturn PUBLIC_API_URL.replace('{ENV_ID}', SmarticoAPI.getEnvDnsSuffix(label_api_key));\n\t}\n\n\tpublic static getPublicWsUrl(label_api_key: string): string {\n\t\treturn C_SOCKET_PROD.replace('{ENV_ID}', SmarticoAPI.getEnvDnsSuffix(label_api_key));\n\t}\n\n\tpublic static getAvatarUrl(label_api_key: string): string {\n\t\tconst avatarUrl = AVATAR_DOMAIN.replace('{ENV_ID}', SmarticoAPI.getEnvDnsSuffix(label_api_key));\n\t\treturn SmarticoAPI.replaceSmrDomainsWithCloudfront(avatarUrl);\n\t}\n\n\tprivate async send<T>(message: any, expectCID?: ClassId, force_language?: string): Promise<T> {\n\t\tif (this.logCIDs.includes(message.cid)) {\n\t\t\tthis.logger.info('REQ', message);\n\t\t}\n\n\t\tif (force_language) {\n\t\t\tmessage.force_language = force_language;\n\t\t}\n\n\t\tlet result: any;\n\n\t\ttry {\n\t\t\tconst timeStart = new Date().getTime();\n\t\t\tresult = await this.messageSender(message, this.publicUrl, expectCID);\n\n\t\t\tif (result.errCode && result.errSetup) {\n\t\t\t\tthrow new Error(result.errMessage);\n\t\t\t}\n\n\t\t\tresult = SmarticoAPI.replaceSmrDomainsWithCloudfront(result);\n\t\t\tconst timeEnd = new Date().getTime();\n\n\t\t\tif (this.logHTTPTiming) {\n\t\t\t\tthis.logger.always('HTTP time, ms:' + (timeEnd - timeStart));\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tthis.logger.warn(`Failed to make request to smartico channel, L2. ${e.message}`, {\n\t\t\t\turl: this.publicUrl,\n\t\t\t\trequest: message,\n\t\t\t\terror: e.message,\n\t\t\t});\n\t\t\tthrow new Error(`Failed to make request to smartico channel, L2 L1. ${e.message}`);\n\t\t}\n\n\t\tif (this.logCIDs.includes(message.cid)) {\n\t\t\tthis.logger.info('RES', result);\n\t\t}\n\n\t\tif (expectCID) {\n\t\t\tif (Array.isArray(result)) {\n\t\t\t\tfor (const str of result as string[]) {\n\t\t\t\t\tconst obj: ProtocolResponse = JSON.parse(str);\n\t\t\t\t\tif (this.logCIDs.includes(obj.cid)) {\n\t\t\t\t\t\tthis.logger.info('RES', result);\n\t\t\t\t\t}\n\t\t\t\t\tif (obj.cid === expectCID) {\n\t\t\t\t\t\treturn obj as any;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.logger.error(`Cant find proper response in array, expected CID ${expectCID}`, {\n\t\t\t\t\trequest: message,\n\t\t\t\t\tresponse: result,\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t} else {\n\t\t\tif (Array.isArray(result)) {\n\t\t\t\tif (result.length === 1) {\n\t\t\t\t\tconst obj = JSON.parse(result[0]);\n\t\t\t\t\tif (this.logCIDs.includes(obj.cid)) {\n\t\t\t\t\t\tthis.logger.info('RES', result);\n\t\t\t\t\t}\n\t\t\t\t\treturn obj;\n\t\t\t\t} else {\n\t\t\t\t\tthis.logger.error('Expected one response, but got array', { request: message, response: result });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tprivate buildMessage<TRequest, TResponse>(user_ext_id: string, cid: ClassId, payload: Partial<TRequest> = {}): TResponse {\n\t\tconst message: ProtocolRequest = {\n\t\t\t// AA: in fact we need api and brand keys and ext_user_id only in the context of HTTP\n\t\t\t// its not needed in WebSocket and can be deleted\n\t\t\tapi_key: this.label_api_key,\n\t\t\tbrand_key: this.brand_api_key,\n\t\t\text_user_id: user_ext_id,\n\t\t\tcid,\n\t\t\tuuid: IntUtils.uuid(),\n\t\t\tts: new Date().getTime(),\n\t\t\t...payload,\n\t\t};\n\n\t\tif (message.ext_user_id === undefined || message.ext_user_id === null) {\n\t\t\tdelete message.ext_user_id;\n\t\t}\n\n\t\tif (message.brand_key === undefined || message.brand_key === null) {\n\t\t\tdelete message.brand_key;\n\t\t}\n\n\t\treturn message as any;\n\t}\n\n\tpublic async coreReportCustomEvent(user_ext_id: string, eventType: string, payload: any = {}): Promise<any> {\n\t\tconst eventMessage = this.buildMessage<any, any>(user_ext_id, ClassId.EVENT, {\n\t\t\teventType,\n\t\t\tpayload,\n\t\t});\n\n\t\tconst eventResponse = await this.send<any>(eventMessage, ClassId.EVENT_RESPONSE);\n\t\treturn eventResponse;\n\t}\n\n\tpublic async coreGetTranslations(\n\t\tuser_ext_id: string,\n\t\tlang_code: string,\n\t\tareas: TranslationArea[],\n\t\tcacheSec: number = 60,\n\t): Promise<GetTranslationsResponse> {\n\t\tif (lang_code === undefined || lang_code === null || (lang_code.trim && lang_code.trim() === '')) {\n\t\t\tlang_code = DEFAULT_LANG_EN;\n\t\t}\n\n\t\tconst response = await OCache.use<GetTranslationsResponse>(\n\t\t\t`${lang_code}-${this.label_api_key}-${this.brand_api_key}`,\n\t\t\tECacheContext.Translations,\n\t\t\tasync () => {\n\t\t\t\tconst tsBaseRQ = this.buildMessage<GetTranslationsRequest, GetTranslationsResponse>(\n\t\t\t\t\tuser_ext_id,\n\t\t\t\t\tClassId.GET_TRANSLATIONS_REQUEST,\n\t\t\t\t\t{\n\t\t\t\t\t\tlang_code: DEFAULT_LANG_EN,\n\t\t\t\t\t\thash_code: null,\n\t\t\t\t\t\tareas,\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\tconst trBase = await this.send<GetTranslationsResponse>(tsBaseRQ, ClassId.GET_TRANSLATIONS_RESPONSE);\n\n\t\t\t\tif (lang_code !== DEFAULT_LANG_EN) {\n\t\t\t\t\tconst trUserRQ = this.buildMessage<GetTranslationsRequest, GetTranslationsResponse>(\n\t\t\t\t\t\tuser_ext_id,\n\t\t\t\t\t\tClassId.GET_TRANSLATIONS_REQUEST,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlang_code,\n\t\t\t\t\t\t\thash_code: null,\n\t\t\t\t\t\t\tareas,\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\n\t\t\t\t\tconst trUser = await this.send<GetTranslationsResponse>(trUserRQ, ClassId.GET_TRANSLATIONS_RESPONSE);\n\n\t\t\t\t\tObject.keys(trUser?.translations ?? {}).forEach((k) => {\n\t\t\t\t\t\ttrBase.translations[k] = trUser.translations[k];\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\treturn trBase;\n\t\t\t},\n\t\t\tcacheSec,\n\t\t);\n\n\t\treturn response;\n\t}\n\n\tpublic async coreIdentifyLabel(user_ext_id: string, cacheSec: number = 60): Promise<GetLabelInfoResponse> {\n\t\treturn OCache.use<GetLabelInfoResponse>(\n\t\t\t`${this.label_api_key} - ${this.brand_api_key}`,\n\t\t\tECacheContext.LabelInfo,\n\t\t\tasync () => {\n\t\t\t\tconst message = this.buildMessage<GetLabelInfoRequest, GetLabelInfoResponse>(user_ext_id, ClassId.INIT);\n\n\t\t\t\treturn this.send<GetLabelInfoResponse>(message, ClassId.INIT_RESPONSE);\n\t\t\t},\n\t\t\tcacheSec,\n\t\t);\n\t}\n\n\tpublic async coreIdentifyUser(user_ext_id: string): Promise<ResponseIdentify> {\n\t\tconst message = this.buildMessage<any, ResponseIdentify>(user_ext_id, ClassId.IDENTIFY, {\n\t\t\trequest_id: IntUtils.uuid(), // AA: do we need request_id?\n\t\t});\n\n\t\tconst r = await this.send<ResponseIdentify>(message, ClassId.IDENTIFY_RESPONSE);\n\n\t\tr.avatar_id = CoreUtils.avatarUrl(r.avatar_id, this.avatarDomain);\n\n\t\treturn r;\n\t}\n\n\tpublic async coreChangeUsername(\n\t\tuser_ext_id: string,\n\t\tpublic_username_custom: string,\n\t): Promise<{ public_username_custom: string }> {\n\t\tconst message = this.buildMessage<any, any>(user_ext_id, ClassId.CLIENT_SET_CUSTOM_USERNAME_REQUEST, {\n\t\t\tpublic_username_custom,\n\t\t});\n\n\t\treturn await this.send(message, ClassId.CLIENT_SET_CUSTOM_USERNAME_RESPONSE);\n\t}\n\n\tpublic async coreCheckSegments(user_ext_id: string, segment_id: number[]): Promise<TSegmentCheckResult[]> {\n\t\tconst message = this.buildMessage<CheckSegmentMatchRequest, any>(user_ext_id, ClassId.CHECK_SEGMENT_MATCH_REQUEST, {\n\t\t\tsegment_id,\n\t\t});\n\n\t\tconst results = await this.send<CheckSegmentMatchResponse>(message, ClassId.CHECK_SEGMENT_MATCH_RESPONSE);\n\n\t\treturn results.segments || [];\n\t}\n\n\t/**\n\t * Reports an engagement impression event (when engagement content is displayed to the user).\n\t */\n\tpublic reportEngagementImpression(\n\t\tuser_ext_id: string,\n\t\tengagement_uid: string,\n\t\tactivityType: ActivityTypeLimited | number,\n\t): void {\n\t\tconst message = this.buildMessage<any, any>(user_ext_id, ClassId.CLIENT_ENGAGEMENT_IMPRESSION_REQUEST, {\n\t\t\tengagement_uid,\n\t\t\tactivityType,\n\t\t});\n\n\t\tthis.send(message).catch(() => { });\n\t}\n\n\t/**\n\t * Reports an engagement action event (when user clicks/interacts with engagement content).\n\t */\n\tpublic reportEngagementAction(\n\t\tuser_ext_id: string,\n\t\tengagement_uid: string,\n\t\tactivityType: ActivityTypeLimited | number,\n\t\taction?: string,\n\t): void {\n\t\tconst message = this.buildMessage<any, any>(user_ext_id, ClassId.CLIENT_ENGAGEMENT_ACTION_REQUEST, {\n\t\t\tengagement_uid,\n\t\t\tactivityType,\n\t\t\t...(action && { action }),\n\t\t});\n\n\t\tthis.send(message).catch(() => { });\n\t}\n\n\tpublic async jackpotGet(\n\t\tuser_ext_id: string,\n\t\tfilter?: { related_game_id?: string; jp_template_id?: number },\n\t\tforce_language?: string,\n\t): Promise<GetJackpotsResponse> {\n\t\tconst message = this.buildMessage<GetJackpotsRequest, GetJackpotsResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.JP_GET_JACKPOTS_REQUEST,\n\t\t\tfilter,\n\t\t);\n\t\treturn await this.send<GetJackpotsResponse>(message, ClassId.JP_GET_JACKPOTS_RESPONSE, force_language);\n\t}\n\n\tpublic async potGet(user_ext_id: string, filter: { jp_template_ids: number[] }): Promise<GetJackpotsPotsResponse> {\n\t\tconst message = this.buildMessage<GetJackpotsPotsRequest, GetJackpotsPotsResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.JP_GET_LATEST_POTS_REQUEST,\n\t\t\tfilter,\n\t\t);\n\t\treturn await this.send<GetJackpotsPotsResponse>(message, ClassId.JP_GET_LATEST_POTS_RESPONSE);\n\t}\n\n\tpublic async jackpotOptIn(user_ext_id: string, payload: { jp_template_id: number }): Promise<JackpotsOptinResponse> {\n\t\tconst message = this.buildMessage<JackpotsOptinRequest, JackpotsOptinResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.JP_OPTIN_REQUEST,\n\t\t\tpayload,\n\t\t);\n\t\treturn await this.send<JackpotsOptinResponse>(message, ClassId.JP_OPTIN_RESPONSE);\n\t}\n\n\tpublic async jackpotOptOut(user_ext_id: string, payload: { jp_template_id: number }): Promise<JackpotsOptoutResponse> {\n\t\tconst message = this.buildMessage<JackpotsOptoutRequest, JackpotsOptoutResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.JP_OPTOUT_REQUEST,\n\t\t\tpayload,\n\t\t);\n\t\treturn await this.send<JackpotsOptoutResponse>(message, ClassId.JP_OPTOUT_RESPONSE);\n\t}\n\n\tpublic async getJackpotWinners(user_ext_id: string, limit: number = 20, offset: number = 0, jp_template_id: number): Promise<GetJackpotWinnersResponse> {\n\t\tconst message = this.buildMessage<GetJackpotWinnersRequest, GetJackpotWinnersResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.JP_GET_WINNERS_REQUEST,\n\t\t\t{\n\t\t\t\tlimit,\n\t\t\t\toffset,\n\t\t\t\tjp_template_id,\n\t\t\t},\n\t\t);\n\t\treturn await this.send<GetJackpotWinnersResponse>(message, ClassId.JP_GET_WINNERS_RESPONSE);\n\t}\n\n\tpublic async getJackpotWinnersT(user_ext_id: string, limit: number = 20, offset: number = 0, jp_template_id: number): Promise<JackpotWinnerHistory[]> {\n\t\treturn GetJackpotWinnersResponseTransform((await this.getJackpotWinners(user_ext_id, limit, offset, jp_template_id)).winners);\n\t}\n\n\tpublic async getJackpotEligibleGames(user_ext_id: string, { jp_template_id }: { jp_template_id: number }): Promise<GetJackpotEligibleGamesResponse> {\n\t\tconst message = this.buildMessage<GetJackpotEligibleGamesRequest, GetJackpotEligibleGamesResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.JP_GET_ELIGIBLE_GAMES_REQUEST,\n\t\t\t{ jp_template_id },\n\t\t);\n\n\t\treturn await this.send<GetJackpotEligibleGamesResponse>(message, ClassId.JP_GET_ELIGIBLE_GAMES_RESPONSE);\n\t}\n\n\tpublic async getJackpotEligibleGamesT(user_ext_id: string, { jp_template_id }: { jp_template_id: number }): Promise<TGetJackpotEligibleGamesResponse> {\n\t\treturn GetJackpotEligibleGamesResponseTransform(await this.getJackpotEligibleGames(user_ext_id, { jp_template_id }));\n\t}\n\n\tpublic async sawGetTemplates(\n\t\tuser_ext_id: string,\n\t\tforce_language?: string,\n\t\tis_visitor_mode: boolean = false,\n\t): Promise<SAWGetTemplatesResponse> {\n\t\tconst message = this.buildMessage<SAWGetTemplatesRequest, SAWGetTemplatesResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.SAW_GET_SPINS_REQUEST,\n\t\t\t{ is_visitor_mode },\n\t\t);\n\n\t\tconst response = await this.send<SAWGetTemplatesResponse>(message, ClassId.SAW_GET_SPINS_RESPONSE, force_language);\n\n\t\tif (response && response.templates) {\n\t\t\tresponse.templates.forEach((t) => {\n\t\t\t\tif (t.jackpot_current !== undefined && t.jackpot_current !== null) {\n\t\t\t\t\tconst jackpotValue =\n\t\t\t\t\t\tt.jackpot_current +\n\t\t\t\t\t\t(t.saw_template_ui_definition?.jackpot_symbol ? ' ' + t.saw_template_ui_definition?.jackpot_symbol : '');\n\t\t\t\t\tt.saw_template_ui_definition.name = IntUtils.replaceAll(\n\t\t\t\t\t\tt.saw_template_ui_definition.name,\n\t\t\t\t\t\t'{{jackpot}}',\n\t\t\t\t\t\tjackpotValue,\n\t\t\t\t\t);\n\t\t\t\t\tt.saw_template_ui_definition.description = IntUtils.replaceAll(\n\t\t\t\t\t\tt.saw_template_ui_definition.description,\n\t\t\t\t\t\t'{{jackpot}}',\n\t\t\t\t\t\tjackpotValue,\n\t\t\t\t\t);\n\t\t\t\t\tt.saw_template_ui_definition.promo_text = IntUtils.replaceAll(\n\t\t\t\t\t\tt.saw_template_ui_definition.promo_text,\n\t\t\t\t\t\t'{{jackpot}}',\n\t\t\t\t\t\tjackpotValue,\n\t\t\t\t\t);\n\t\t\t\t\tt.prizes.forEach((p) => {\n\t\t\t\t\t\tp.saw_prize_ui_definition.name = IntUtils.replaceAll(\n\t\t\t\t\t\t\tp.saw_prize_ui_definition.name,\n\t\t\t\t\t\t\t'{{jackpot}}',\n\t\t\t\t\t\t\tjackpotValue,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tp.saw_prize_ui_definition.aknowledge_message = IntUtils.replaceAll(\n\t\t\t\t\t\t\tp.saw_prize_ui_definition.aknowledge_message,\n\t\t\t\t\t\t\t'{{jackpot}}',\n\t\t\t\t\t\t\tjackpotValue,\n\t\t\t\t\t\t);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn response;\n\t}\n\n\tpublic async sawGetTemplatesT(user_ext_id: string): Promise<TMiniGameTemplate[]> {\n\t\treturn SAWTemplatesTransform((await this.sawGetTemplates(user_ext_id)).templates);\n\t}\n\n\tpublic async doAcknowledgeRequest(user_ext_id: string, request_id: string): Promise<SAWDoAknowledgeResponse> {\n\t\tconst message = this.buildMessage<SAWDoAknowledgeRequest, SAWDoAknowledgeResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.SAW_AKNOWLEDGE_REQUEST,\n\t\t\t{\n\t\t\t\trequest_id,\n\t\t\t},\n\t\t);\n\n\t\treturn await this.send<SAWDoAknowledgeResponse>(message, ClassId.SAW_AKNOWLEDGE_RESPONSE);\n\t}\n\n\tpublic async sawSpinRequest(user_ext_id: string, saw_template_id: number, round_id?: number): Promise<SAWDoSpinResponse> {\n\t\tif (!saw_template_id) {\n\t\t\tthrow new Error('Missing template id');\n\t\t}\n\n\t\tconst request_id = IntUtils.uuid();\n\n\t\tconst message = this.buildMessage<SAWDoSpinRequest, SAWDoSpinResponse>(user_ext_id, ClassId.SAW_DO_SPIN_REQUEST, {\n\t\t\tsaw_template_id,\n\t\t\trequest_id,\n\t\t});\n\n\t\tconst spinAttemptResponse = await this.send<SAWDoSpinResponse>(message, ClassId.SAW_DO_SPIN_RESPONSE);\n\n\t\t// to simulate fail\n\t\t// response.errCode = SAWSpinErrorCode.SAW_NO_SPINS;\n\n\t\tconst status: string =\n\t\t\t{\n\t\t\t\t[SAWSpinErrorCode.SAW_OK]: 'OK',\n\t\t\t\t[SAWSpinErrorCode.SAW_NO_SPINS]: 'NO SPINS AVAILABLE',\n\t\t\t\t[SAWSpinErrorCode.SAW_PRIZE_POOL_EMPTY]: 'PRIZE POOL IS EMPTY',\n\t\t\t\t[SAWSpinErrorCode.SAW_NOT_ENOUGH_POINTS]: 'NOT ENOUGH POINTS',\n\t\t\t\t[SAWSpinErrorCode.SAW_FAILED_MAX_SPINS_REACHED]: 'MAX SPIN ATTEMPTS REACHED',\n\t\t\t\t[SAWSpinErrorCode.SAW_TEMPLATE_NOT_ACTIVE]: \"MINIGAME IS NOT IN ACTIVE PERIOD\",\n\t\t\t\t[SAWSpinErrorCode.SAW_NOT_IN_SEGMENT]: \"USER IS NOT IN SEGMENT\",\n\t\t\t\t[SAWSpinErrorCode.SAW_NO_BALANCE_GEMS]: \"NOT ENOUGH GEMS\",\n\t\t\t\t[SAWSpinErrorCode.SAW_NO_BALANCE_DIAMONDS]: \"NOT ENOUGH DIAMONDS\",\n\t\t\t}[spinAttemptResponse.errCode] || 'OTHER';\n\n\t\tawait this.coreReportCustomEvent(user_ext_id, 'minigame_attempt', {\n\t\t\tsaw_template_id,\n\t\t\tstatus,\n\t\t\tround_id,\n\t\t});\n\n\t\treturn { ...spinAttemptResponse, request_id };\n\t}\n\n\n\tpublic async doAcknowledgeBatchRequest(user_ext_id: string, request_ids: string[]): Promise<SAWDoAcknowledgeBatchResponse> {\n\t\tconst message = this.buildMessage<SAWDoAcknowledgeBatchRequest, SAWDoAcknowledgeBatchResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.SAW_AKNOWLEDGE_REQUEST,\n\t\t\t{\n\t\t\t\trequest_ids,\n\t\t\t},\n\t\t);\n\n\t\treturn await this.send<SAWDoAcknowledgeBatchResponse>(message, ClassId.SAW_AKNOWLEDGE_BATCH_RESPONSE);\n\t}\n\n\tpublic async sawSpinBatchRequest(user_ext_id: string, saw_template_id: number, spins_count: number): Promise<SAWDoSpinBatchResponse> {\n\n\t\tconst spins = [];\n\t\tfor (let i = 0; i < spins_count; i++) {\n\t\t\tconst request_id = IntUtils.uuid();\n\t\t\tspins.push({ request_id, saw_template_id })\n\t\t}\n\n\t\tconst message = this.buildMessage<SAWDoSpinBatchRequest, SAWDoSpinBatchResponse>(user_ext_id, ClassId.SAW_DO_SPIN_BATCH_REQUEST, { spins });\n\t\tconst spinAttemptResponse = await this.send<SAWDoSpinBatchResponse>(message, ClassId.SAW_DO_SPIN_BATCH_RESPONSE);\n\n\t\t// If one response is 'OK' we consider that whole result is 'OK'\n\t\tconst result = spinAttemptResponse.results.find((res) => res.errCode === 0);\n\n\t\tlet status = 'OK';\n\t\tif (!result) {\n\t\t\tstatus = 'BATCH FAIL';\n\t\t}\n\n\t\tawait this.coreReportCustomEvent(user_ext_id, 'minigame_attempt', {\n\t\t\tsaw_template_id,\n\t\t\tstatus,\n\t\t\tspins_count,\n\t\t});\n\n\t\treturn { ...spinAttemptResponse };\n\t}\n\n\tpublic async getSawWinningHistory(user_ext_id: string, limit: number = 20, offset: number = 0, saw_template_id: number): Promise<SAWWinningHistoryResponse> {\n\t\tconst message = this.buildMessage<SAWWinningHistoryRequest, SAWWinningHistoryResponse>(user_ext_id, ClassId.GET_SAW_HISTORY_REQUEST, {\n\t\t\tlimit, offset, saw_template_id\n\t\t})\n\n\t\treturn await this.send<SAWWinningHistoryResponse>(message, ClassId.GET_SAW_HISTORY_RESPONSE);\n\t}\n\n\tpublic async getSawWinningHistoryT(user_ext_id: string, limit?: number, offset?: number, saw_template_id?: number): Promise<SAWPrizesHistory[]> {\n\t\treturn SAWHistoryTransform((await this.getSawWinningHistory(user_ext_id, limit, offset, saw_template_id)).prizes);\n\t}\n\n\tpublic async missionOptIn(user_ext_id: string, mission_id: number) {\n\t\tif (!mission_id) {\n\t\t\tthrow new Error('Missing mission id');\n\t\t}\n\t\tconst message = this.buildMessage<AchievementOptinRequest, AchievementOptinResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.MISSION_OPTIN_REQUEST,\n\t\t\t{\n\t\t\t\tachievementId: mission_id,\n\t\t\t},\n\t\t);\n\n\t\tconst res = await this.send<AchievementOptinResponse>(message, ClassId.MISSION_OPTIN_RESPONSE);\n\n\t\treturn res;\n\t}\n\n\tpublic async missionClaimPrize(user_ext_id: string, mission_id: number, ach_completed_id: number) {\n\t\tif (!mission_id) {\n\t\t\tthrow new Error('Missing mission id');\n\t\t}\n\n\t\tconst message = this.buildMessage<AchClaimPrizeRequest, AchClaimPrizeResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.ACHIEVEMENT_CLAIM_PRIZE_REQUEST,\n\t\t\t{\n\t\t\t\tach_id: mission_id,\n\t\t\t\tach_completed_id: ach_completed_id,\n\t\t\t},\n\t\t);\n\n\t\tconst res = await this.send<AchClaimPrizeResponse>(message, ClassId.ACHIEVEMENT_CLAIM_PRIZE_RESPONSE);\n\n\t\treturn res;\n\t}\n\n\tpublic async registerInTournament(user_ext_id: string, tournamentInstanceId: number) {\n\t\tif (!tournamentInstanceId) {\n\t\t\tthrow new Error('Missing tournament instance id');\n\t\t}\n\t\tconst message = this.buildMessage<TournamentRegisterRequest, TournamentRegisterResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.TOURNAMENT_REGISTER_REQUEST,\n\t\t\t{\n\t\t\t\ttournamentInstanceId,\n\t\t\t},\n\t\t);\n\n\t\tconst res = await this.send<TournamentRegisterResponse>(message, ClassId.TOURNAMENT_REGISTER_RESPONSE);\n\n\t\treturn res;\n\t}\n\n\tpublic async buyStoreItem(user_ext_id: string, itemId: number) {\n\t\tif (!itemId) {\n\t\t\tthrow new Error('Missing store item id');\n\t\t}\n\t\tconst message = this.buildMessage<BuyStoreItemRequest, BuyStoreItemResponse>(user_ext_id, ClassId.BUY_SHOP_ITEM_REQUEST, {\n\t\t\titemId,\n\t\t});\n\n\t\tconst res = await this.send<BuyStoreItemResponse>(message, ClassId.BUY_SHOP_ITEM_RESPONSE);\n\n\t\treturn res;\n\t}\n\n\tpublic async inboxGetMessages(\n\t\tuser_ext_id: string,\n\t\tlimit: number = 10,\n\t\toffset: number = 0,\n\t): Promise<GetInboxMessagesResponse> {\n\t\tconst message = this.buildMessage<GetInboxMessagesRequest, GetInboxMessagesResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_INBOX_MESSAGES_REQUEST,\n\t\t\t{\n\t\t\t\tlimit,\n\t\t\t\toffset,\n\t\t\t},\n\t\t);\n\n\t\treturn await this.send<GetInboxMessagesResponse>(message, ClassId.GET_INBOX_MESSAGES_RESPONSE);\n\t}\n\n\tpublic async storeGetItems(user_ext_id: string, force_language?: string): Promise<GetStoreItemsResponse> {\n\t\tconst message = this.buildMessage<any, GetStoreItemsResponse>(user_ext_id, ClassId.GET_SHOP_ITEMS_REQUEST);\n\t\treturn await this.send<GetStoreItemsResponse>(message, ClassId.GET_SHOP_ITEMS_RESPONSE, force_language);\n\t}\n\n\tpublic async storeGetItemsT(user_ext_id: string): Promise<TStoreItem[]> {\n\t\treturn StoreItemTransform((await this.storeGetItems(user_ext_id)).items);\n\t}\n\n\tpublic async storeGetCategories(user_ext_id: string, force_language?: string): Promise<GetCategoriesStoreResponse> {\n\t\tconst message = this.buildMessage<any, GetCategoriesStoreResponse>(user_ext_id, ClassId.GET_SHOP_CATEGORIES_REQUEST);\n\t\treturn await this.send<GetCategoriesStoreResponse>(message, ClassId.GET_SHOP_CATEGORIES_RESPONSE, force_language);\n\t}\n\n\tpublic async storeGetCategoriesT(user_ext_id: string): Promise<TStoreCategory[]> {\n\t\treturn StoreCategoryTransform((await this.storeGetCategories(user_ext_id)).categories);\n\t}\n\n\tpublic async storeGetPurchasedItems(\n\t\tuser_ext_id: string,\n\t\tlimit: number = 20,\n\t\toffset: number = 0,\n\t): Promise<GetStoreHistoryResponse> {\n\t\tconst message = this.buildMessage<GetStoreHistoryRequest, GetStoreHistoryResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.ACH_SHOP_ITEM_HISTORY_REQUEST,\n\t\t\t{\n\t\t\t\tlimit,\n\t\t\t\toffset,\n\t\t\t},\n\t\t);\n\n\t\treturn await this.send<GetStoreHistoryResponse>(message, ClassId.ACH_SHOP_ITEM_HISTORY_RESPONSE);\n\t}\n\n\tpublic async storeGetPurchasedItemsT(user_ext_id: string, limit?: number, offset?: number): Promise<TStoreItem[]> {\n\t\treturn StoreItemPurchasedTransform((await this.storeGetPurchasedItems(user_ext_id, limit, offset)).items);\n\t}\n\n\tpublic async missionsGetItems(user_ext_id: string, force_language?: string): Promise<GetAchievementMapResponse> {\n\t\tconst message = this.buildMessage<GetAchievementMapRequest, GetAchievementMapResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_ACHIEVEMENT_MAP_REQUEST,\n\t\t);\n\t\tconst response = await this.send<GetAchievementMapResponse>(\n\t\t\tmessage,\n\t\t\tClassId.GET_ACHIEVEMENT_MAP_RESPONSE,\n\t\t\tforce_language,\n\t\t);\n\t\t// we need to clone response to avoid changing original object,for cases when its called together with badgesGetItems (e.g. in Promise.all)\n\t\tconst responseClone = { ...response };\n\n\t\tif (responseClone.achievements) {\n\t\t\tresponseClone.achievements = responseClone.achievements.filter((a) => a.ach_type_id === AchievementType.Mission);\n\t\t}\n\t\treturn responseClone;\n\t}\n\n\tpublic async missionsGetItemsT(user_ext_id: string): Promise<TMissionOrBadge[]> {\n\t\treturn UserAchievementTransform((await this.missionsGetItems(user_ext_id)).achievements);\n\t}\n\n\tpublic async getUserGamificationInfo(user_ext_id: string): Promise<GetAchievementsUserInfoResponse> {\n\t\tconst message = this.buildMessage<GetAchievementMapRequest, GetAchievementsUserInfoResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_ACHIEVEMENT_USER_REQUEST,\n\t\t);\n\n\t\treturn await this.send<GetAchievementsUserInfoResponse>(message, ClassId.GET_ACHIEVEMENT_USER_RESPONSE);\n\t}\n\n\tpublic async getUserGamificationInfoT(user_ext_id: string): Promise<UserLevelExtraCountersT> {\n\t\tconst response = await this.getUserGamificationInfo(user_ext_id);\n\n\t\treturn {\n\t\t\tlevel_counter_1: response.level_counter_1,\n\t\t\tlevel_counter_2: response.level_counter_2,\n\t\t};\n\t}\n\n\tpublic async achGetCategories(user_ext_id: string, force_language?: string): Promise<GetAchCategoriesResponse> {\n\t\tconst message = this.buildMessage<any, GetAchCategoriesResponse>(user_ext_id, ClassId.GET_ACH_CATEGORIES_REQUEST);\n\t\treturn await this.send<GetAchCategoriesResponse>(message, ClassId.GET_ACH_CATEGORIES_RESPONSE, force_language);\n\t}\n\n\tpublic async achGetCategoriesT(user_ext_id: string): Promise<TAchCategory[]> {\n\t\treturn AchCategoryTransform((await this.achGetCategories(user_ext_id)).categories);\n\t}\n\n\tpublic async badgetsGetItems(user_ext_id: string, force_language?: string): Promise<GetAchievementMapResponse> {\n\t\tconst message = this.buildMessage<GetAchievementMapRequest, GetAchievementMapResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_ACHIEVEMENT_MAP_REQUEST,\n\t\t);\n\t\tconst response = await this.send<GetAchievementMapResponse>(\n\t\t\tmessage,\n\t\t\tClassId.GET_ACHIEVEMENT_MAP_RESPONSE,\n\t\t\tforce_language,\n\t\t);\n\t\t// we need to clone response to avoid changing original object,for cases when its called together with missionsGetItems (e.g. in Promise.all)\n\t\tconst responseClone = { ...response };\n\n\t\tif (responseClone.achievements) {\n\t\t\tresponseClone.achievements = responseClone.achievements.filter((a) => a.ach_type_id === AchievementType.Badge);\n\t\t\tresponseClone.achievements = enrichUserAchievementsWithBadgeState(responseClone.achievements);\n\t\t}\n\t\treturn responseClone;\n\t}\n\n\tpublic async bonusesGetItems(user_ext_id: string, force_language?: string): Promise<GetBonusesResponse> {\n\t\tconst message = this.buildMessage<GetBonusesRequest, GetBonusesResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_BONUSES_REQUEST,\n\t\t);\n\t\tconst response = await this.send<GetBonusesResponse>(\n\t\t\tmessage,\n\t\t\tClassId.GET_BONUSES_RESPONSE,\n\t\t\tforce_language,\n\t\t);\n\n\t\tconst responseClone = { ...response };\n\n\t\treturn responseClone;\n\t}\n\tpublic async bonusClaimItem(user_ext_id: string, bonus_id: number): Promise<ClaimBonusResponse> {\n\t\tconst message = this.buildMessage<ClaimBonusRequest, ClaimBonusResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.CLAIM_BONUS_REQUEST,\n\t\t\t{ bonusId: bonus_id }\n\n\t\t);\n\t\tconst response = await this.send<ClaimBonusResponse>(\n\t\t\tmessage,\n\t\t\tClassId.CLAIM_BONUS_RESPONSE,\n\n\t\t);\n\n\t\tconst responseClone = { ...response };\n\n\t\treturn responseClone;\n\t}\n\n\tpublic async bonusesGetItemsT(user_ext_id: string): Promise<TBonus[]> {\n\t\treturn BonusItemsTransform((await this.bonusesGetItems(user_ext_id)).bonuses);\n\t}\n\n\tpublic async badgetsGetItemsT(user_ext_id: string): Promise<TMissionOrBadge[]> {\n\t\treturn UserAchievementTransform((await this.badgetsGetItems(user_ext_id)).achievements);\n\t}\n\n\tpublic async tournamentsGetLobby(user_ext_id: string, force_language?: string): Promise<GetTournamentsResponse> {\n\t\tconst message = this.buildMessage<GetTournamentsRequest, GetTournamentsResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_TOURNAMENT_LOBBY_REQUEST,\n\t\t);\n\t\treturn await this.send<GetTournamentsResponse>(message, ClassId.GET_TOURNAMENT_LOBBY_RESPONSE, force_language);\n\t}\n\n\tpublic async tournamentsGetLobbyT(user_ext_id: string): Promise<TTournament[]> {\n\t\treturn TournamentItemsTransform((await this.tournamentsGetLobby(user_ext_id)).tournaments);\n\t}\n\n\tpublic async clansGetList(user_ext_id: string, force_language?: string): Promise<GetClanListResponse> {\n\t\tconst message = this.buildMessage<GetClanListRequest, GetClanListResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_CLAN_LIST_REQUEST,\n\t\t);\n\t\treturn await this.send<GetClanListResponse>(message, ClassId.GET_CLAN_LIST_RESPONSE, force_language);\n\t}\n\n\tpublic async clansGetListT(user_ext_id: string): Promise<TClans> {\n\t\tconst response = await this.clansGetList(user_ext_id);\n\t\treturn {\n\t\t\tclans: response.clans,\n\t\t\tuser_clan_id: response.user_clan_id,\n\t\t\tcooldown_until: response.cooldown_until,\n\t\t\tjoin_date: response.join_date ?? null,\n\t\t};\n\t}\n\n\tpublic async clansGetInfo(user_ext_id: string, clanId: number, force_language?: string): Promise<GetClanInfoResponse> {\n\t\tconst message = this.buildMessage<GetClanInfoRequest, GetClanInfoResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_CLAN_INFO_REQUEST,\n\t\t\t{ clan_id: clanId },\n\t\t);\n\t\treturn await this.send<GetClanInfoResponse>(message, ClassId.GET_CLAN_INFO_RESPONSE, force_language);\n\t}\n\n\tpublic async clansGetInfoT(user_ext_id: string, clanId: number, force_language?: string): Promise<TClanInfo> {\n\t\tconst response = await this.clansGetInfo(user_ext_id, clanId, force_language);\n\t\tconst c = response.clanInfo;\n\t\treturn {\n\t\t\tclan_id: c.clan_id,\n\t\t\tpublic_meta: c.public_meta,\n\t\t\tmember_count: c.member_count,\n\t\t\tcapacity_limit: c.capacity_limit,\n\t\t\tentry_fee_currency_type_id: c.entry_fee_currency_type_id,\n\t\t\tentry_fee_amount: c.entry_fee_amount,\n\t\t\trating_position: c.rating_position,\n\t\t\trating_score: c.rating_score,\n\t\t\tcooldown_until: c.cooldown_until ?? null,\n\t\t\tmembers: (c.members || []).map((m) => ({\n\t\t\t\tuser_id: m.user_id,\n\t\t\t\tpublic_username: m.public_username,\n\t\t\t\tavatar_id: m.avatar_id,\n\t\t\t\tavatar_real_id: m.avatar_real_id,\n\t\t\t\tavatar_url: CoreUtils.avatarUrl(m.avatar_id, this.avatarDomain),\n\t\t\t\tposition: m.position,\n\t\t\t\tcontribution_score: m.contribution_score,\n\t\t\t\tis_me: m.is_me,\n\t\t\t\tclean_ext_user_id: m.clean_ext_user_id,\n\t\t\t})),\n\t\t};\n\t}\n\n\tpublic async clanJoin(user_ext_id: string, clanId: number, joinSourceId: number = 0): Promise<TClanJoinResult> {\n\t\tconst message = this.buildMessage<JoinClanRequest, JoinClanResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.JOIN_CLAN_REQUEST,\n\t\t\t{ clan_id: clanId, join_source_id: joinSourceId },\n\t\t);\n\t\tconst response = await this.send<JoinClanResponse>(message, ClassId.JOIN_CLAN_RESPONSE);\n\t\treturn { errCode: response.errCode ?? 0, errMsg: response.errMsg ?? '' };\n\t}\n\n\tpublic async tournamentsGetInfo(\n\t\tuser_ext_id: string,\n\t\ttournamentInstanceId: number,\n\t\tforce_language?: string,\n\t): Promise<GetTournamentInfoResponse> {\n\t\tconst message = this.buildMessage<GetTournamentInfoRequest, GetTournamentInfoResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_TOURNAMENT_INFO_REQUEST,\n\t\t\t{\n\t\t\t\ttournamentInstanceId,\n\t\t\t},\n\t\t);\n\t\tconst response = await this.send<GetTournamentInfoResponse>(\n\t\t\tmessage,\n\t\t\tClassId.GET_TOURNAMENT_INFO_RESPONSE,\n\t\t\tforce_language,\n\t\t);\n\n\t\tif (response.userPosition?.avatar_id) {\n\t\t\tresponse.userPosition.avatar_url = CoreUtils.avatarUrl(response.userPosition.avatar_id, this.avatarDomain);\n\t\t}\n\n\t\tif (response.tournamentInfo?.players?.length) {\n\t\t\tresponse.tournamentInfo.players.forEach((p) => {\n\t\t\t\tp.avatar_url = CoreUtils.avatarUrl(p.avatar_id, this.avatarDomain);\n\t\t\t});\n\t\t}\n\n\t\treturn response;\n\t}\n\n\tpublic async tournamentsGetInfoT(user_ext_id: string, tournamentInstanceId: number): Promise<TTournamentDetailed> {\n\t\tif (!tournamentInstanceId) {\n\t\t\tthrow new Error('Missing tournament instance id');\n\t\t}\n\t\tconst response = await this.tournamentsGetInfo(user_ext_id, tournamentInstanceId);\n\t\treturn tournamentInfoItemTransform(response);\n\t}\n\n\tpublic async clanTournamentGetPlayers(\n\t\tuser_ext_id: string,\n\t\ttournament_instance_id: number,\n\t\tclan_id: number,\n\t\tforce_language?: string,\n\t): Promise<TClanTournamentPlayers> {\n\t\tconst message = this.buildMessage<GetClanTournamentPlayersRequest, GetClanTournamentPlayersResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_CLAN_TOURNAMENT_PLAYERS_REQUEST,\n\t\t\t{ tournament_instance_id, clan_id, force_language },\n\t\t);\n\t\tconst response = await this.send<GetClanTournamentPlayersResponse>(\n\t\t\tmessage,\n\t\t\tClassId.GET_CLAN_TOURNAMENT_PLAYERS_RESPONSE,\n\t\t\tforce_language,\n\t\t);\n\t\tif (response.players?.length) {\n\t\t\tresponse.players.forEach((p) => {\n\t\t\t\tp.avatar_url = CoreUtils.avatarUrl(p.avatar_id, this.avatarDomain);\n\t\t\t});\n\t\t}\n\t\treturn clanTournamentPlayersTransform(response);\n\t}\n\n\tpublic async leaderboardGet(\n\t\tuser_ext_id: string,\n\t\tperiod_type_id?: LeaderBoardPeriodType,\n\t\tprevPeriod: boolean = false,\n\t\tforce_language?: string,\n\t): Promise<LeaderBoardDetails> {\n\t\tconst message = this.buildMessage<GetLeaderBoardsRequest, GetLeaderBoardsResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_LEADERS_BOARD_REQUEST,\n\t\t\t{\n\t\t\t\tperiod_type_id,\n\t\t\t\tsnapshot_offset: prevPeriod ? 1 : 0,\n\t\t\t\tinclude_users: true,\n\t\t\t},\n\t\t);\n\n\t\tconst response = await this.send<GetLeaderBoardsResponse>(message, ClassId.GET_LEADERS_BOARD_RESPONSE, force_language);\n\n\t\tconst boardKey = Object.keys(response.map || {}).find((k) => period_type_id === undefined || k === period_type_id?.toString());\n\n\t\tif (boardKey === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (response.map[boardKey]?.userPosition?.avatar_id) {\n\t\t\tresponse.map[boardKey].userPosition.avatar_url = CoreUtils.avatarUrl(\n\t\t\t\tresponse.map[boardKey].userPosition.avatar_id,\n\t\t\t\tthis.avatarDomain,\n\t\t\t);\n\t\t}\n\n\t\tif (response.map[boardKey]?.positions?.length) {\n\t\t\tresponse.map[boardKey].positions.forEach((p) => {\n\t\t\t\tp.avatar_url = CoreUtils.avatarUrl(p.avatar_id, this.avatarDomain);\n\t\t\t});\n\t\t}\n\n\t\treturn response.map[boardKey];\n\t}\n\n\tpublic async leaderboardsGetT(\n\t\tuser_ext_id: string,\n\t\tperiod_type_id: LeaderBoardPeriodType = LeaderBoardPeriodType.DAILY,\n\t\tprevPeriod: boolean = false,\n\t): Promise<LeaderBoardDetailsT> {\n\t\treturn getLeaderBoardTransform(await this.leaderboardGet(user_ext_id, period_type_id, prevPeriod));\n\t}\n\n\tpublic async levelsGet(user_ext_id: string, force_language?: string): Promise<GetLevelMapResponse> {\n\t\tconst message = this.buildMessage<any, GetLevelMapResponse>(user_ext_id, ClassId.GET_LEVEL_MAP_REQUEST);\n\t\treturn await this.send<GetLevelMapResponse>(message, ClassId.GET_LEVEL_MAP_RESPONSE, force_language);\n\t}\n\n\tpublic async levelsGetT(user_ext_id: string): Promise<TLevel[]> {\n\t\treturn GetLevelMapResponseTransform(await this.levelsGet(user_ext_id));\n\t}\n\n\tpublic async getLevelCurrent(user_ext_id: string): Promise<TLevelCurrent> {\n\t\tconst levels = await this.levelsGetT(user_ext_id);\n\t\tconst userInfo = await this.getUserGamificationInfo(user_ext_id);\n\t\tif (!levels || levels.length === 0) return null;\n\n\t\tconst sortedLevels = [...levels].sort((a, b) => a.required_points - b.required_points);\n\n\t\tlet currentLevelIndex = sortedLevels.findIndex((level) => level.id === userInfo.current_level);\n\n\t\tif (currentLevelIndex === -1) {\n\t\t\tconst userPointsEver = userInfo.points_ever ?? 0;\n\t\t\tcurrentLevelIndex = sortedLevels.findIndex((level, index) => {\n\t\t\t\tconst nextLevel = sortedLevels[index + 1];\n\t\t\t\treturn userPointsEver >= level.required_points && (!nextLevel || userPointsEver < nextLevel.required_points);\n\t\t\t});\n\t\t\tif (currentLevelIndex === -1) {\n\t\t\t\tcurrentLevelIndex = sortedLevels.length - 1;\n\t\t\t}\n\t\t}\n\n\t\tconst currentLevel = sortedLevels[currentLevelIndex];\n\t\tconst nextLevel = sortedLevels[currentLevelIndex + 1];\n\t\tconst userPointsEver = userInfo.points_ever ?? 0;\n\t\tconst progress = nextLevel\n\t\t\t? ((userPointsEver - currentLevel.required_points) / (nextLevel.required_points - currentLevel.required_points)) * 100\n\t\t\t: 100;\n\n\t\treturn {\n\t\t\t...currentLevel,\n\t\t\tprogress: Math.min(Math.max(progress, 0), 100),\n\t\t};\n\t}\n\n\tpublic async customSectionsGet(user_ext_id: string, force_language?: string): Promise<GetCustomSectionsResponse> {\n\t\tconst message = this.buildMessage<GetCustomSectionsRequest, GetCustomSectionsResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_CUSTOM_SECTIONS_REQUEST,\n\t\t);\n\t\treturn await this.send<GetCustomSectionsResponse>(message, ClassId.GET_CUSTOM_SECTIONS_RESPONSE, force_language);\n\t}\n\n\tpublic async customSectionsGetT(user_ext_id: string): Promise<TUICustomSection[]> {\n\t\treturn UICustomSectionTransform(await this.customSectionsGet(user_ext_id));\n\t}\n\n\tpublic async getTranslationsT(\n\t\tuser_ext_id: string,\n\t\tlang_code: string,\n\t\tareas: TranslationArea[],\n\t\tcacheSec: number = 60,\n\t): Promise<GetTranslationsResponse> {\n\t\treturn await this.coreGetTranslations(user_ext_id, lang_code, areas, 30);\n\t}\n\n\tpublic async getInboxMessages(\n\t\tuser_ext_id: string,\n\t\tlimit: number = 20,\n\t\toffset: number = 0,\n\t\tstarred_only: boolean,\n\t\tcategory_id?: InboxCategories,\n\t\tread_status?: InboxReadStatus,\n\t): Promise<GetInboxMessagesResponse> {\n\t\tconst message = this.buildMessage<GetInboxMessagesRequest, GetInboxMessagesResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_INBOX_MESSAGES_REQUEST,\n\t\t\t{\n\t\t\t\tlimit,\n\t\t\t\toffset,\n\t\t\t\tstarred_only,\n\t\t\t\tcategory_id,\n\t\t\t\tread_status,\n\t\t\t},\n\t\t);\n\t\treturn await this.send<GetInboxMessagesResponse>(message, ClassId.GET_INBOX_MESSAGES_RESPONSE);\n\t}\n\n\tpublic async getInboxMessagesT(\n\t\tuser_ext_id: string,\n\t\tfrom: number = 0,\n\t\tto: number = 20,\n\t\tfavoriteOnly: boolean = false,\n\t\tcategoryId?: InboxCategories,\n\t\tread_status?: InboxReadStatus,\n\t): Promise<TInboxMessage[]> {\n\t\tconst limit = to - from > 20 ? 20 : to - from;\n\t\tconst offset = from;\n\n\t\treturn InboxMessagesTransform((await this.getInboxMessages(user_ext_id, limit, offset, favoriteOnly, categoryId, read_status)).log);\n\t}\n\n\tpublic async getInboxUnreadCountT(\n\t\tuser_ext_id: string,\n\t): Promise<number> {\n\t\tconst limit = 1;\n\t\tconst offset = 0;\n\n\t\treturn (await this.getInboxMessages(user_ext_id, limit, offset, false, null)).unread_count;\n\t}\n\n\tpublic async getInboxMessageBody(messageGuid: string): Promise<InboxMessageBody> {\n\t\tconst getMessageBody = async (messageGuid: string): Promise<InboxMessageBody> => {\n\t\t\tconst inboxCdnUrl = this.tracker.getLabelSetting(PublicLabelSettings.INBOX_PUBLIC_CDN);\n\n\t\t\ttry {\n\t\t\t\tconst url = `${inboxCdnUrl}${messageGuid}.json`;\n\n\t\t\t\tconst response = await fetch(url, {\n\t\t\t\t\tmethod: 'GET',\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t'Accept': 'application/json',\n\t\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\t\t'Access-Control-Allow-Origin': '*',\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t\tconst data = await response.json();\n\t\t\t\treturn data || {};\n\t\t\t} catch (error) {\n\t\t\t\tthis.logger.error('Error fetching inbox message body:', error);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\n\t\treturn await getMessageBody(messageGuid);\n\t}\n\n\tpublic async getInboxMessageBodyT(messageGuid: string): Promise<TInboxMessageBody> {\n\t\tconst message = await this.getInboxMessageBody(messageGuid);\n\t\treturn InboxMessageBodyTransform(message);\n\t}\n\n\tpublic async markInboxMessageRead(user_ext_id: string, messageGuid: string): Promise<MarkInboxMessageReadResponse> {\n\t\tconst message = this.buildMessage<MarkInboxMessageReadRequest, MarkInboxMessageReadResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.MARK_INBOX_READ_REQUEST,\n\t\t\t{\n\t\t\t\tengagement_uid: messageGuid,\n\t\t\t},\n\t\t);\n\n\t\treturn await this.send<MarkInboxMessageReadResponse>(message, ClassId.MARK_INBOX_READ_RESPONSE);\n\t}\n\n\tpublic async markAllInboxMessageRead(user_ext_id: string): Promise<MarkInboxMessageReadResponse> {\n\t\tconst message = this.buildMessage<MarkInboxMessageReadRequest, MarkInboxMessageReadResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.MARK_INBOX_READ_REQUEST,\n\t\t\t{\n\t\t\t\tall_read: true,\n\t\t\t},\n\t\t);\n\n\t\treturn await this.send<MarkInboxMessageReadResponse>(message, ClassId.MARK_INBOX_READ_RESPONSE);\n\t}\n\n\tpublic async markUnmarkInboxMessageAsFavorite(\n\t\tuser_ext_id: string,\n\t\tmessageGuid: string,\n\t\tmark: boolean,\n\t): Promise<MarkInboxMessageStarredResponse> {\n\t\tconst message = this.buildMessage<MarkInboxMessageStarredRequest, MarkInboxMessageStarredResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.MARK_INBOX_STARRED_REQUEST,\n\t\t\t{\n\t\t\t\tengagement_uid: messageGuid,\n\t\t\t\tis_starred: mark,\n\t\t\t},\n\t\t);\n\n\t\treturn await this.send<MarkInboxMessageStarredResponse>(message, ClassId.MARK_INBOX_STARRED_RESPONSE);\n\t}\n\n\tpublic async deleteInboxMessage(user_ext_id: string, messageGuid: string): Promise<MarkInboxMessageDeletedResponse> {\n\t\tconst message = this.buildMessage<MarkInboxMessageDeletedRequest, MarkInboxMessageDeletedResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.MARK_INBOX_DELETED_REQUEST,\n\t\t\t{\n\t\t\t\tengagement_uid: messageGuid,\n\t\t\t},\n\t\t);\n\n\t\treturn await this.send<MarkInboxMessageDeletedResponse>(message, ClassId.MARK_INBOX_DELETED_RESPONSE);\n\t}\n\n\tpublic async deleteAllInboxMessages(user_ext_id: string): Promise<MarkInboxMessageDeletedResponse> {\n\t\tconst message = this.buildMessage<MarkInboxMessageDeletedRequest, MarkInboxMessageDeletedResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.MARK_INBOX_DELETED_REQUEST,\n\t\t\t{\n\t\t\t\tall_deleted: true,\n\t\t\t},\n\t\t);\n\n\t\treturn await this.send<MarkInboxMessageDeletedResponse>(message, ClassId.MARK_INBOX_DELETED_RESPONSE);\n\t}\n\n\tprivate buildGamesApiParams(): Record<string, string> {\n\t\tconst params: Record<string, string> = Object.assign({}, this.baseRgApiParams, {\n\t\t\text_user_id: this.tracker.userPublicProps?.user_id,\n\t\t\tsmartico_ext_user_id: this.tracker.getExtUserId(),\n\t\t\tlang: this.tracker.userPublicProps?.core_user_language,\n\t\t});\n\n\t\treturn params;\n\t}\n\n\tprivate async sendGamesApi<T>({ method, params, usePost = false }: { method: string, params: Record<string, any>, usePost?: boolean }): Promise<GamesApiResponse<T>> {\n\n\t\tif (!this.tracker) {\n\t\t\tthrow new Error(`MatchX and Quiz APIs are not available in the visitor mode`);\n\t\t}\n\n\t\tconst baseParams = this.buildGamesApiParams();\n\t\tconst queryString = Object.entries(baseParams).map(([k, v]) => `${k}=${encodeURIComponent(v)}`).join('&');\n\t\tlet url = `${GAMES_API_URL}/${method}?${queryString}`;\n\n\t\tlet fetchOptions: RequestInit = {\n\t\t\tmethod: 'GET',\n\t\t\theaders: { 'Accept': 'application/json' },\n\t\t};\n\n\t\tif (usePost && params) {\n\t\t\tfetchOptions = {\n\t\t\t\tmethod: 'POST',\n\t\t\t\theaders: {\n\t\t\t\t\t'Accept': 'application/json',\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t},\n\t\t\t\tbody: JSON.stringify(params),\n\t\t\t};\n\t\t} else if (params) {\n\t\t\tconst extraQuery = Object.entries(params)\n\t\t\t\t.map(([k, v]) => `${k}=${encodeURIComponent(JSON.stringify(v))}`)\n\t\t\t\t.join('&');\n\t\t\turl += `&${extraQuery}`;\n\t\t}\n\n\t\ttry {\n\t\t\tconst response = await fetch(url, fetchOptions);\n\n\t\t\tconst data = await response.json();\n\t\t\treturn SmarticoAPI.replaceSmrDomainsWithCloudfront<GamesApiResponse<T>>(data);\n\t\t} catch (e) {\n\t\t\tthis.logger.error(`Failed to call games API: ${method}`, { url, error: e.message });\n\t\t\tthrow new Error(`Failed to call games API: ${method}. ${e.message}`);\n\t\t}\n\t}\n\n\tpublic async gpGetActiveRounds(saw_template_id: number): Promise<GamesApiResponse<GamePickRound[]>> {\n\t\tconst params = {\n\t\t\text_game_id: saw_template_id,\n\t\t};\n\n\t\treturn this.sendGamesApi<GamePickRound[]>({ method: 'active-rounds', params });\n\t}\n\n\tpublic async gpGetActiveRound(saw_template_id: number, round_id?: number): Promise<GamesApiResponse<GamePickRound>> {\n\t\tconst params = {\n\t\t\text_game_id: saw_template_id,\n\t\t\tround_id: round_id,\n\t\t};\t\n\t\t\n\t\treturn this.sendGamesApi<GamePickRound>({ method: 'active-round', params });\n\t}\n\n\tpublic async gpGetGamesHistory(saw_template_id: number): Promise<GamesApiResponse<GamePickRound[]>> {\n\t\tconst params = {\n\t\t\text_game_id: saw_template_id,\n\t\t};\n\n\t\treturn this.sendGamesApi<GamePickRound[]>({ method: 'games-history', params });\n\t}\n\n\tpublic async gpGetGameBoard(saw_template_id: number, round_id: number): Promise<GamesApiResponse<GamePickRoundBoard>> {\n\t\tconst params = {\n\t\t\text_game_id: saw_template_id,\n\t\t\tround_id: round_id,\n\t\t};\n\n\t\treturn this.sendGamesApi<GamePickRoundBoard>({ method: 'game-board', params });\n\t}\n\n\tpublic async gpSubmitSelection(saw_template_id: number, round: any, isQuiz: boolean): Promise<GamesApiResponse<GamePickRound>> {\n\t\tconst method = isQuiz ? 'submit-selection-quiz' : 'submit-selection';\n\t\tconst params = {\n\t\t\text_game_id: saw_template_id,\n\t\t\tround: round,\n\t\t};\n\n\t\treturn this.sendGamesApi<GamePickRound>({ method, params, usePost: true });\n\t}\n\n\tpublic async gpGetUserInfo(saw_template_id: number): Promise<GamesApiResponse<GamePickUserInfo>> {\n\t\tconst params = {\n\t\t\text_game_id: saw_template_id,\n\t\t};\n\n\t\treturn this.sendGamesApi<GamePickUserInfo>({ method: 'user-info', params });\n\t}\n\n\tpublic async gpGetGameInfo(saw_template_id: number): Promise<GamesApiResponse<GamePickGameInfo>> {\n\t\tconst params = {\n\t\t\text_game_id: saw_template_id,\n\t\t};\n\n\t\treturn this.sendGamesApi<GamePickGameInfo>({ method: 'game-info', params });\n\t}\n\n\tpublic async gpGetTranslations(saw_template_id: number): Promise<GamesApiResponse<any>> {\n\t\tconst params = {\n\t\t\text_game_id: saw_template_id,\n\t\t};\n\n\t\treturn this.sendGamesApi<any>({ method: 'translations', params });\n\t}\n\n\tpublic async gpGetRoundInfoForUser(saw_template_id: number, round_id: number, int_user_id: number): Promise<GamesApiResponse<GamePickRound>> {\n\t\tconst params = {\n\t\t\text_game_id: saw_template_id,\n\t\t\tround_id: round_id,\n\t\t\tint_user_id: int_user_id,\n\t\t};\n\n\t\treturn this.sendGamesApi<GamePickRound>({ method: 'game-round-info-for-user', params });\n\t}\n\n\tpublic async avatarsGetList(user_ext_id: string): Promise<GetAvatarsListResponse> {\n\t\tconst message = this.buildMessage<any, GetAvatarsListResponse>(user_ext_id, ClassId.GET_AVATARS_LIST_REQUEST);\n\t\treturn await this.send<GetAvatarsListResponse>(message, ClassId.GET_AVATARS_LIST_RESPONSE);\n\t}\n\n\tpublic async avatarsGetCustomized(user_ext_id: string): Promise<GetAvatarsCustomizedResponse> {\n\t\tconst message = this.buildMessage<any, GetAvatarsCustomizedResponse>(user_ext_id, ClassId.GET_AVATARS_CUSTOMIZED_REQUEST);\n\t\treturn await this.send<GetAvatarsCustomizedResponse>(message, ClassId.GET_AVATARS_CUSTOMIZED_RESPONSE);\n\t}\n\n\tpublic async avatarsGetPrompts(user_ext_id: string): Promise<GetAvatarPromptsResponse> {\n\t\tconst message = this.buildMessage<any, GetAvatarPromptsResponse>(user_ext_id, ClassId.GET_AVATAR_PROMPTS_REQUEST);\n\t\treturn await this.send<GetAvatarPromptsResponse>(message, ClassId.GET_AVATAR_PROMPTS_RESPONSE);\n\t}\n\n\tpublic async avatarSetAvatar(user_ext_id: string, avatar_id: string, avatar_real_id: number): Promise<SetAvatarResponse> {\n\t\tconst message = this.buildMessage<SetAvatarRequest, SetAvatarResponse>(user_ext_id, ClassId.CLIENT_SET_AVATAR_REQUEST, {\n\t\t\tavatar_id,\n\t\t\tavatar_real_id,\n\t\t});\n\t\treturn await this.send<SetAvatarResponse>(message, ClassId.CLIENT_SET_AVATAR_RESPONSE);\n\t}\n\n\tpublic async avatarsGetListT(user_ext_id: string): Promise<TAvatarDefinition[]> {\n\t\treturn avatarDefinitionTransform((await this.avatarsGetList(user_ext_id)).avatars ?? [], this.avatarDomain);\n\t}\n\n\tpublic async avatarsGetCustomizedT(user_ext_id: string): Promise<TAvatarCustomized[]> {\n\t\treturn avatarCustomizedTransform((await this.avatarsGetCustomized(user_ext_id)).avatars ?? [], this.avatarDomain);\n\t}\n\n\tpublic async avatarsGetPromptsT(user_ext_id: string): Promise<TAvatarPrompt[]> {\n\t\treturn avatarPromptTransform((await this.avatarsGetPrompts(user_ext_id)).prompts ?? [], this.avatarDomain);\n\t}\n\n\tpublic getWSCalls(): WSAPI {\n\t\treturn new WSAPI(this);\n\t}\n\n\tpublic async getRelatedItemsForGame(user_ext_id: string, related_game_id: string,): Promise<GetRelatedAchTourResponse> {\n\t\tconst message = this.buildMessage<GetRelatedAchTourRequest, GetRelatedAchTourResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_RELATED_ACH_N_TOURNAMENTS_REQUEST,\n\t\t\t{\n\t\t\t\trelated_game_id: related_game_id\n\t\t\t}\n\t\t);\n\n\t\treturn await this.send<GetRelatedAchTourResponse>(message, ClassId.GET_RELATED_ACH_N_TOURNAMENTS_RESPONSE);\n\t}\n\n\tpublic async getRafflesT(user_ext_id: string): Promise<TRaffle[]> {\n\t\treturn raffleTransform((await this.getRaffles(user_ext_id)).items);\n\t}\n\n\tpublic async getRaffles(user_ext_id: string): Promise<GetRafflesResponse> {\n\t\tconst message = this.buildMessage<GetRafflesRequest, GetRafflesResponse>(user_ext_id, ClassId.RAF_GET_RAFFLES_REQUEST);\n\n\t\treturn await this.send<GetRafflesResponse>(message, ClassId.RAF_GET_RAFFLES_RESPONSE);\n\t}\n\n\tpublic async getRaffleDrawRun(user_ext_id: string, payload: { raffle_id: number; run_id: number; winners_limit?: number; winners_offset?: number }): Promise<GetDrawRunResponse> {\n\t\tconst message = this.buildMessage<GetDrawRunRequest, GetDrawRunResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.RAF_GET_DRAW_RUN_REQUEST,\n\t\t\tpayload,\n\t\t);\n\n\t\treturn await this.send<GetDrawRunResponse>(message, ClassId.RAF_GET_DRAW_RUN_RESPONSE);\n\t}\n\n\tpublic async getRaffleDrawRunT(\n\t\tuser_ext_id: string,\n\t\traffle_id: number,\n\t\trun_id: number,\n\t\twinners_from: number = 0,\n\t\twinners_to: number = 20,\n\t): Promise<TRaffleDraw> {\n\t\tconst winners_limit = winners_to - winners_from > 50 ? 50 : winners_to - winners_from;\n\t\tconst winners_offset = winners_from;\n\n\t\treturn drawRunTransform(await this.getRaffleDrawRun(user_ext_id, { raffle_id, run_id, winners_limit, winners_offset }),);\n\t}\n\n\tpublic async getRaffleDrawRunsHistory(\n\t\tuser_ext_id: string,\n\t\tprops: { raffle_id: number; draw_id?: number },\n\t): Promise<GetRaffleDrawRunsHistoryResponse> {\n\t\tconst message = this.buildMessage<GetRaffleDrawRunsHistoryRequest, GetRaffleDrawRunsHistoryResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.RAF_GET_DRAW_HISTORY_REQUEST,\n\t\t\tprops,\n\t\t);\n\n\t\treturn await this.send<GetRaffleDrawRunsHistoryResponse>(message, ClassId.RAF_GET_DRAW_HISTORY_RESPONSE);\n\t}\n\n\tpublic async claimRafflePrize(user_ext_id: string, props: { won_id: number }): Promise<RaffleClaimPrizeResponse> {\n\t\tconst message = this.buildMessage<RaffleClaimPrizeRequest, RaffleClaimPrizeResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.RAF_CLAIM_PRIZE_REQUEST,\n\t\t\tprops,\n\t\t);\n\n\t\treturn await this.send<RaffleClaimPrizeResponse>(message, ClassId.RAF_CLAIM_PRIZE_RESPONSE);\n\n\t}\n\n\tpublic async raffleOptin(user_ext_id: string, props: { raffle_id: number; draw_id: number; raffle_run_id: number }): Promise<RaffleOptinResponse> {\n\t\tconst message = this.buildMessage<RaffleOptinRequest, RaffleOptinResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.RAF_OPTIN_REQUEST,\n\t\t\tprops,\n\t\t);\n\n\t\treturn await this.send<RaffleOptinResponse>(message, ClassId.RAF_OPTIN_RESPONSE);\n\n\t}\n\n\tpublic async getActivityLog(\n\t\tuser_ext_id: string,\n\t\tstartTimeSeconds: number,\n\t\tendTimeSeconds: number,\n\t\tlimit: number,\n\t\toffset: number,\n\t): Promise<GetActivityLogResponse> {\n\t\tconst message = this.buildMessage<GetActivityLogRequest, GetActivityLogResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_POINT_HISTORY_REQUEST,\n\t\t\t{\n\t\t\t\tstartTimeSeconds: Math.floor(startTimeSeconds),\n\t\t\t\tendTimeSeconds: Math.floor(endTimeSeconds),\n\t\t\t\tlimit,\n\t\t\t\toffset,\n\t\t\t},\n\t\t);\n\n\t\treturn await this.send<GetActivityLogResponse>(message, ClassId.GET_POINT_HISTORY_RESPONSE);\n\t}\n\n\tpublic async getActivityLogT(\n\t\tuser_ext_id: string,\n\t\tstartTimeSeconds: number,\n\t\tendTimeSeconds: number,\n\t\tfrom: number = 0,\n\t\tto: number = 50,\n\t): Promise<TActivityLog[]> {\n\t\tconst limit = to - from > 50 ? 50 : to - from;\n\t\tconst offset = from;\n\n\t\treturn ActivityLogTransform(\n\t\t\t(await this.getActivityLog(user_ext_id, startTimeSeconds, endTimeSeconds, limit, offset)).logHistory,\n\t\t);\n\t}\n}\n\nexport { SmarticoAPI, MessageSender };\n","import { TSMap } from 'typescript-map';\n\nclass CookieStore {\n\tprivate static cookieStore = new TSMap<string, string[]>();\n\n\tpublic static get(key: string): string[] | undefined {\n\t\treturn CookieStore.cookieStore.get(key);\n\t}\n\n\tpublic static set(key: string, value: string[]) {\n\t\tconst v = value.map((v) => v.split(';')[0]);\n\t\tCookieStore.cookieStore.set(key, v);\n\t}\n}\n\nexport { CookieStore };\n","\nexport enum AnalyticsInterfaceType {\n\tMobile = 0,\n\tDesktop = 1,\n}\n\nexport enum AnalyticsScreenNameId {\n\tOverview = 1,\n\tMissions = 2,\n\tLeaderboards = 3,\n\tTournaments = 4,\n\tTournamentLobby = 5,\n\tLevels = 6,\n\tLevelsMap = 7,\n\tBadges = 8,\n\tBonuses = 9,\n\tSpinAWheel = 10,\n\tStore = 11,\n\tStoreHistory = 12,\n\tInbox = 13,\n\tMatchX = 14,\n\tQuiz = 15,\n\tJackpots = 16,\n\tLootbox = 17,\n\tCustomSection = 18,\n\tShortInbox = 19,\n\tLootboxWeekdays = 20,\n\tLootboxCalendarDays = 21,\n\tTreasureHunt = 22,\n\tLiquidSection = 23,\n\tActivityLog = 24,\n\n\tModalMission = 31,\n\tModalLevel = 32,\n\tModalBadge = 33,\n\tModalStore = 34,\n\tModalBonus = 35,\n\tModalJackpot = 36,\n\tModalUsername = 37,\n\tModalAvatar = 38,\n\tModalQR = 39,\n}\n\nexport enum AnalyticsTournamentsLobbySubScreenNameId {\n\tGeneral = 1,\n\tPrizes = 2,\n\tPlayers = 3,\n\tRelatedGames = 4,\n}\n\nexport enum AnalyticsInboxSubScreenNameId {\n\tAll = 1,\n\tFavorite = 2,\n}\n","export enum QuizSportType {\n\tSoccer = 1,\n\tBasketball = 2,\n\tTennis = 5,\n}\n\nexport const quizSupportedSports = [QuizSportType.Basketball, QuizSportType.Soccer, QuizSportType.Tennis];\n","export enum SAWGPMarketType {\n\tTwoTeamsWithScore = 1,\n\tRedCard = 2,\n\tOneXTwo = 3,\n\tOneXTwoHalftime = 4,\n\t// HalftimeFulltime = 5,\n\tFirstGoal = 6,\n\tDoubleChance = 7,\n\tOverUnder2_5 = 8,\n\tOverUnder1_5Halftime = 9,\n\tOverUnder1_5__2ndHalf = 10,\n\tTotalCorners8_5 = 11,\n\tTotalCorners9_5 = 12,\n\tCorners1x2 = 13,\n\tOne_Two = 14,\n\tOvertime = 15,\n\tOddEven = 16,\n\tOddEvenHomeAway = 17,\n\tFirstSet = 18,\n\tSecondSet = 19,\n\tThirdSet = 20,\n\tFourthSet = 21,\n\tFifthSet = 22,\n\tPlayerOneWinsOneSet = 23,\n\tPlayerTwoWinsOneSet = 24,\n\tLastGoal = 25,\n\n\tCustomSport = 26,\n\tCustomNonSport = 27,\n}\n","export enum QuizAnswersValueType {\n\tHomeTeam = '1',\n\tAwayTeam = '2',\n\tDraw = 'x',\n\tHomeTeamHomeTeam = '1/1',\n\tHomeTeamDraw = '1/x',\n\tHomeTeamAwayTeam = '1/2',\n\tDrawHomeTeam = 'x/1',\n\tDrawDraw = 'x/x',\n\tDrawAwayTeam = 'x/2',\n\tAwayTeamHomeTeam = '2/1',\n\tAwayTeamDraw = '2/x',\n\tAwayTeamAwayTeam = '2/2',\n\tYes = 'yes',\n\tNo = 'no',\n\tOdd = 'odd',\n\tEven = 'even',\n\tHomeOdd = '1/odd',\n\tHomeEven = '1/even',\n\tAwayOdd = '2/odd',\n\tAwayEven = '2/even',\n}\n\nexport const quizAnswerHomeTeamReplacementText = '{quiz_home_team}';\nexport const quizAnswerAwayTeamReplacementText = '{quiz_away_team}';\nexport const quizDrawReplacementText = '{quiz_draw}';\nexport const quizYesReplacementText = '{yes}';\nexport const quizNoReplacementText = '{no}';\nexport const quizOddReplacementText = '{odd}';\nexport const quizEvenReplacementText = '{even}';\nexport const quizOrReplacementText = '{or}';\nexport const quizNoGoalsReplacementText = '{quiz_no_goals}';\n\nexport const quizAnswersTrKeys = {\n\t[quizDrawReplacementText]: 'quizAnswer_draw',\n\t[quizYesReplacementText]: 'quizAnswer_yes',\n\t[quizNoReplacementText]: 'quizAnswer_no',\n\t[quizOddReplacementText]: 'quizAnswer_odd',\n\t[quizEvenReplacementText]: 'quizAnswer_even',\n\t[quizOrReplacementText]: 'quizAnswer_or',\n\t[quizNoGoalsReplacementText]: 'quizAnswer_no_goals',\n};\n","import {\n\tQuizAnswersValueType,\n\tquizAnswerAwayTeamReplacementText,\n\tquizAnswerHomeTeamReplacementText,\n\tquizDrawReplacementText,\n\tquizEvenReplacementText,\n\tquizNoGoalsReplacementText,\n\tquizNoReplacementText,\n\tquizOddReplacementText,\n\tquizOrReplacementText,\n\tquizYesReplacementText,\n} from './MarketsAnswers';\nimport { SAWGPMarketType } from './MarketsType';\n\nconst yesNoAnswers = [\n\t{ text: quizYesReplacementText, value: QuizAnswersValueType.Yes },\n\t{ text: quizNoReplacementText, value: QuizAnswersValueType.No },\n];\n\nconst homeAwayAnswers = [\n\t{ text: quizAnswerHomeTeamReplacementText, value: QuizAnswersValueType.HomeTeam },\n\t{ text: quizAnswerAwayTeamReplacementText, value: QuizAnswersValueType.AwayTeam },\n];\n\nconst homeAwayDrawAnswers = [...homeAwayAnswers, { text: quizDrawReplacementText, value: QuizAnswersValueType.Draw }];\nconst homeAwayNoGoalsAnswers = [...homeAwayAnswers, { text: quizNoGoalsReplacementText, value: QuizAnswersValueType.Draw }];\n\nexport const marketsInfo = [\n\t{\n\t\ttype: SAWGPMarketType.OneXTwo,\n\t\tname: '1x2',\n\t\tquestion: { text: 'Who will win the match ?', trKey: 'quizQuestion_1x2' },\n\t\tanswers: homeAwayDrawAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.OneXTwoHalftime,\n\t\tname: '1x2 Halftime',\n\t\tquestion: { text: 'Who will lead the first half of the match ?', trKey: 'quizQuestion_x2half' },\n\t\tanswers: homeAwayDrawAnswers,\n\t},\n\t// {\n\t// \ttype: SAWGPMarketType.HalftimeFulltime,\n\t// \tname: 'Halftime / Fulltime',\n\t// \tquestion: { text: 'Who will lead the first half and who will win the match ?', trKey: 'quizQuestion__HalftimeFulltime' },\n\t// \tanswers: [\n\t// \t\t{\n\t// \t\t\ttext: `${quizAnswerHomeTeamReplacementText} / ${quizAnswerHomeTeamReplacementText}`,\n\t// \t\t\tvalue: QuizAnswersValueType.HomeTeamHomeTeam,\n\t// \t\t},\n\t// \t\t{\n\t// \t\t\ttext: `${quizAnswerHomeTeamReplacementText} / ${quizDrawReplacementText}`,\n\t// \t\t\tvalue: QuizAnswersValueType.HomeTeamDraw,\n\t// \t\t},\n\t// \t\t{\n\t// \t\t\ttext: `${quizAnswerHomeTeamReplacementText} / ${quizAnswerAwayTeamReplacementText}`,\n\t// \t\t\tvalue: QuizAnswersValueType.HomeTeamAwayTeam,\n\t// \t\t},\n\t// \t\t{\n\t// \t\t\ttext: `${quizDrawReplacementText} / ${quizAnswerHomeTeamReplacementText}`,\n\t// \t\t\tvalue: QuizAnswersValueType.DrawHomeTeam,\n\t// \t\t},\n\t// \t\t{ text: `${quizDrawReplacementText} / ${quizDrawReplacementText}`, value: QuizAnswersValueType.DrawDraw },\n\t// \t\t{\n\t// \t\t\ttext: `${quizDrawReplacementText} / ${quizAnswerAwayTeamReplacementText}`,\n\t// \t\t\tvalue: QuizAnswersValueType.DrawAwayTeam,\n\t// \t\t},\n\t// \t\t{\n\t// \t\t\ttext: `${quizAnswerAwayTeamReplacementText} / ${quizAnswerHomeTeamReplacementText}`,\n\t// \t\t\tvalue: QuizAnswersValueType.AwayTeamHomeTeam,\n\t// \t\t},\n\t// \t\t{\n\t// \t\t\ttext: `${quizAnswerAwayTeamReplacementText} / ${quizDrawReplacementText}`,\n\t// \t\t\tvalue: QuizAnswersValueType.AwayTeamDraw,\n\t// \t\t},\n\t// \t\t{\n\t// \t\t\ttext: `${quizAnswerAwayTeamReplacementText} / ${quizAnswerAwayTeamReplacementText}`,\n\t// \t\t\tvalue: QuizAnswersValueType.AwayTeamAwayTeam,\n\t// \t\t},\n\t// \t],\n\t// },\n\t{\n\t\ttype: SAWGPMarketType.FirstGoal,\n\t\tname: 'First Goal',\n\t\tquestion: { text: 'Who will score the first goal ?', trKey: 'quizQuestion_firstGoal' },\n\t\tanswers: homeAwayNoGoalsAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.LastGoal,\n\t\tname: 'Last Goal',\n\t\tquestion: { text: 'Who will score the last goal ?', trKey: 'quizQuestion_lastGoal' },\n\t\tanswers: homeAwayNoGoalsAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.DoubleChance,\n\t\tname: 'Double Chance',\n\t\tquestion: { text: 'Who will win the match? Choose a combination:', trKey: 'quizQuestion_doubleChance' },\n\t\tanswers: [\n\t\t\t{\n\t\t\t\ttext: `${quizDrawReplacementText} ${quizOrReplacementText} ${quizAnswerHomeTeamReplacementText}`,\n\t\t\t\tvalue: QuizAnswersValueType.HomeTeamDraw,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttext: `${quizAnswerHomeTeamReplacementText} ${quizOrReplacementText} ${quizAnswerAwayTeamReplacementText}`,\n\t\t\t\tvalue: QuizAnswersValueType.HomeTeamAwayTeam,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttext: `${quizDrawReplacementText} ${quizOrReplacementText} ${quizAnswerAwayTeamReplacementText}`,\n\t\t\t\tvalue: QuizAnswersValueType.AwayTeamDraw,\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\ttype: SAWGPMarketType.OverUnder2_5,\n\t\tname: 'Over/Under 2.5',\n\t\tquestion: { text: 'Will there be 3 or more goals in the match?', trKey: 'quizQuestion_overUnder2_5' },\n\t\tanswers: yesNoAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.OverUnder1_5Halftime,\n\t\tname: 'Over/Under 1.5 Halftime',\n\t\tquestion: { text: 'Will there be 2 or more goals in the first half?', trKey: 'quizQuestion_overUnder1_5Halftime' },\n\t\tanswers: yesNoAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.OverUnder1_5__2ndHalf,\n\t\tname: 'Over/Under 1.5 2nd Half',\n\t\tquestion: { text: 'Will there be 2 or more goals in the second half?', trKey: 'quizQuestion_overUnder1_5__2ndHalf' },\n\t\tanswers: yesNoAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.RedCard,\n\t\tname: 'Red Card',\n\t\tquestion: { text: 'Will there be a red card in the match?', trKey: 'quizQuestion_redCard' },\n\t\tanswers: yesNoAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.TotalCorners8_5,\n\t\tname: 'Total Corners 8.5',\n\t\tquestion: { text: 'Will there be 9 or more corners in the match?', trKey: 'quizQuestion_totalCorners8_5' },\n\t\tanswers: yesNoAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.TotalCorners9_5,\n\t\tname: 'Total Corners 9.5',\n\t\tquestion: { text: 'Will there be 10 or more corners in the match?', trKey: 'quizQuestion_totalCorners9_5' },\n\t\tanswers: yesNoAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.Corners1x2,\n\t\tname: 'Corners 1x2',\n\t\tquestion: { text: 'Which team will have more corners in the match?', trKey: 'quizQuestion_corners1x2' },\n\t\tanswers: homeAwayDrawAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.One_Two,\n\t\tname: '1-2',\n\t\tquestion: { text: 'Who will win the match ?', trKey: 'quizQuestion_1-2' },\n\t\tanswers: homeAwayAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.Overtime,\n\t\tname: 'Overtime',\n\t\tquestion: { text: 'Will there be overtime in the match?', trKey: 'quizQuestion_overtime' },\n\t\tanswers: yesNoAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.OddEven,\n\t\tname: 'Odd/Even',\n\t\tquestion: {\n\t\t\ttext: 'Is the sum of all points scored in the game going to be an odd number or even?',\n\t\t\ttrKey: 'quizQuestion_oddEven',\n\t\t},\n\t\tanswers: [\n\t\t\t{ text: quizOddReplacementText, value: QuizAnswersValueType.Odd },\n\t\t\t{ text: quizEvenReplacementText, value: QuizAnswersValueType.Even },\n\t\t],\n\t},\n\t{\n\t\ttype: SAWGPMarketType.OddEvenHomeAway,\n\t\tname: 'Odd/Even Home/Away',\n\t\tquestion: {\n\t\t\ttext: 'Which team will win and what will be the sum of the points (Odd or Even)?',\n\t\t\ttrKey: 'quizQuestion_oddEvenHomeAway',\n\t\t},\n\t\tanswers: [\n\t\t\t{ text: `${quizAnswerHomeTeamReplacementText} - ${quizOddReplacementText}`, value: QuizAnswersValueType.HomeOdd },\n\t\t\t{ text: `${quizAnswerHomeTeamReplacementText} - ${quizEvenReplacementText}`, value: QuizAnswersValueType.HomeEven },\n\t\t\t{ text: `${quizAnswerAwayTeamReplacementText} - ${quizOddReplacementText}`, value: QuizAnswersValueType.AwayOdd },\n\t\t\t{ text: `${quizAnswerAwayTeamReplacementText} - ${quizEvenReplacementText}`, value: QuizAnswersValueType.AwayEven },\n\t\t],\n\t},\n\t{\n\t\ttype: SAWGPMarketType.FirstSet,\n\t\tname: 'First Set',\n\t\tquestion: { text: 'Who will win the first set ?', trKey: 'quizQuestion_firstSet' },\n\t\tanswers: homeAwayAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.SecondSet,\n\t\tname: 'Second Set',\n\t\tquestion: { text: 'Who will win the second set ?', trKey: 'quizQuestion_secondSet' },\n\t\tanswers: homeAwayAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.ThirdSet,\n\t\tname: 'Third Set',\n\t\tquestion: { text: 'Who will win the third set ?', trKey: 'quizQuestion_thirdSet' },\n\t\tanswers: homeAwayAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.FourthSet,\n\t\tname: 'Fourth Set',\n\t\tquestion: { text: 'Who will win the fourth set ?', trKey: 'quizQuestion_fourthSet' },\n\t\tanswers: homeAwayAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.FifthSet,\n\t\tname: 'Fifth Set',\n\t\tquestion: { text: 'Who will win the fifth set ?', trKey: 'quizQuestion_fifthSet' },\n\t\tanswers: homeAwayAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.PlayerOneWinsOneSet,\n\t\tname: 'Player One Wins One Set',\n\t\tquestion: { text: 'Will Player One win at least one set?', trKey: 'quizQuestion_playerOneWinsOneSet' },\n\t\tanswers: yesNoAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.PlayerTwoWinsOneSet,\n\t\tname: 'Player Two Wins One Set',\n\t\tquestion: { text: 'Will Player Two win at least one set?', trKey: 'quizQuestion_playerTwoWinsOneSet' },\n\t\tanswers: yesNoAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.CustomNonSport,\n\t\tname: 'Custom question (non sport)',\n\t\tquestion: null,\n\t\tanswers: null,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.CustomSport,\n\t\tname: 'Custom question (sport)',\n\t\tquestion: null,\n\t\tanswers: null,\n\t},\n];\n","import { SAWGPMarketType } from './MarketsType';\nimport { QuizSportType } from './SportTypes';\n\nexport const QuizMarketPerSport = {\n\t[QuizSportType.Basketball]: [\n\t\tSAWGPMarketType.One_Two,\n\t\tSAWGPMarketType.Overtime,\n\t\tSAWGPMarketType.OneXTwo,\n\t\tSAWGPMarketType.OddEven,\n\t\tSAWGPMarketType.OddEvenHomeAway,\n\t\tSAWGPMarketType.DoubleChance,\n\t],\n\t[QuizSportType.Soccer]: [\n\t\tSAWGPMarketType.OneXTwo,\n\t\tSAWGPMarketType.OneXTwoHalftime,\n\t\t// SAWGPMarketType.HalftimeFulltime,\n\t\tSAWGPMarketType.FirstGoal,\n\t\tSAWGPMarketType.LastGoal,\n\t\tSAWGPMarketType.DoubleChance,\n\t\tSAWGPMarketType.OverUnder2_5,\n\t\tSAWGPMarketType.OverUnder1_5Halftime,\n\t\tSAWGPMarketType.OverUnder1_5__2ndHalf,\n\t\tSAWGPMarketType.RedCard,\n\t\tSAWGPMarketType.TotalCorners8_5,\n\t\tSAWGPMarketType.TotalCorners9_5,\n\t\tSAWGPMarketType.Corners1x2,\n\t],\n\t[QuizSportType.Tennis]: [\n\t\tSAWGPMarketType.One_Two,\n\t\tSAWGPMarketType.FirstSet,\n\t\tSAWGPMarketType.SecondSet,\n\t\tSAWGPMarketType.ThirdSet,\n\t\tSAWGPMarketType.FourthSet,\n\t\tSAWGPMarketType.FifthSet,\n\t\tSAWGPMarketType.PlayerOneWinsOneSet,\n\t\tSAWGPMarketType.PlayerTwoWinsOneSet,\n\t\tSAWGPMarketType.OddEven,\n\t],\n};\n","enum JackpotContributionType {\n\tFixed = 1,\n\tPercentage = 2,\n}\n\nexport { JackpotContributionType };\n","enum JackPotTemparature {\n\t/** cold, seed amount < current pot < (min amount - seed amount)/2 */\n\tCOLD = 0,\n\t/** warm, (min amount - seed amount)/2 < current pot < min amount */\n\tWARM = 1,\n\t/** hot, current pot > min amount, entered explosion range */\n\tHOT = 2,\n\t/** burning, current pot > min amount + 0.5 * (max amount - min amount). E.g. mid of allowed explosion range */\n\tBURNING = 3,\n}\n\ninterface JackpotPot {\n\t/** ID of the jackpot template */\n\tjp_template_id: number;\n\t/** ID of the jackpot pot */\n\tjp_pot_id: number;\n\t/** currency of the jackpot pot in the Jackput base currency */\n\tcurrent_pot_amount: number;\n\t/** currency of the jackpot pot in the user wallet currency */\n\tcurrent_pot_amount_user_currency: number;\n\t/** the date/time when this pot exploded */\n\texplode_date_ts: number;\n\t/** current pot temperature */\n\tcurrent_pot_temperature: JackPotTemparature;\n}\n\nexport { JackpotPot, JackPotTemparature };\n","enum JackpotType {\n\tMultiUser = 1,\n\tPersonal = 2,\n}\n\nexport { JackpotType };\n","export enum AvatarCustomizeErrorCode {\n\tAVATAR_USER_LIMIT = 12001,\n\tAVATAR_LABEL_LIMIT = 12002,\n}\n\nexport const AvatarCustomizeErrorMessage: Record<AvatarCustomizeErrorCode, string> = {\n\t[AvatarCustomizeErrorCode.AVATAR_USER_LIMIT]: 'You have exceeded number of custom avatars creation, please try later',\n\t[AvatarCustomizeErrorCode.AVATAR_LABEL_LIMIT]: 'The custom avatars are not available, please try again later',\n};\n","/*\n * Possible error codes returned in JOIN_CLAN_RESPONSE.errCode (cid: 575).\n * Clan-protocol-specific numeric codes defined in the handler spec.\n */\nexport enum JoinClanErrorCode {\n\t/** No error, join completed */\n\tJOIN_CLAN_OK = 0,\n\t/** Invalid parameters */\n\tJOIN_CLAN_INVALID_PARAMETERS = 1000,\n\t/** clan_id doesn't exist for this label */\n\tJOIN_CLAN_NOT_FOUND = 1001,\n\t/** members_count >= capacity_limit */\n\tJOIN_CLAN_FULL = 1002,\n\t/** Not enough Points / Gems / Diamonds for entry fee */\n\tJOIN_CLAN_INSUFFICIENT_FUNDS = 1003,\n\t/** User doesn't satisfy entry_conditions / entry_segment_id */\n\tJOIN_CLAN_SEGMENT_MISMATCH = 1004,\n\t/** User is not in a clan */\n\tJOIN_CLAN_USER_IS_NOT_IN_CLAN = 1005,\n\t/** User is within the CLAN_COOLDOWN_DAYS window */\n\tJOIN_CLAN_COOLDOWN_ACTIVE = 1006,\n\t/** clan_status_id != 1 (clan is archived) */\n\tJOIN_CLAN_ARCHIVED = 1007,\n\t/** Clan joined after tournament start */\n\tJOIN_CLAN_JOINED_AFTER_TOURNAMENT_START = 1011,\n}\n"],"names":["ClassId","IntUtils","uuid","a","b","Math","random","toString","isNotNull","val","isNotEmpty","length","replaceAll","value","regex","replacement","replace","RegExp","escapeRegExp","v","JsonOrText","str","includes","JSON","parse","e","isWithinPeriod","timestamp","period","now","Date","completedDate","getFullYear","getMonth","getDate","startOfWeek","setDate","getDay","setHours","endOfWeek","SAWBuyInType","SAWBuyInTypeName","SAWBuyInTypeNamed","type","Free","Points","Spins","Gems","Diamonds","Unknown","SAWUtils","canPlay","t","user_balances","undefined","saw_buyin_type_id","spin_count","balance","ach_points_balance","ach_gems_balance","ach_diamonds_balance","buyin_cost_points","console","error","SAWAcknowledgeType","SAWAcknowledgeTypeName","SAWAcknowledgeTypeNamed","Silent","QuickMessage","FullMessage","ExplicityAcknowledge","SAWAskForUsername","SAWGameType","SAWGameTypeName","SAWGameTypeNamed","SpinAWheel","ScratchCard","MatchX","GiftBox","PrizeDrop","Quiz","LootboxWeekdays","LootboxCalendarDays","TreasureHunt","Voyager","Plinko","CoinFlip","SAWExposeUserSpinId","SAWExposeUserSpinIdName","SAWExposeUserSpinIdNamed","id","UserId","SpinId","SAWGameLayout","SAWGameLayoutName","SAWGameLayoutNamed","layout","Horizontal","VerticalMap","SAWPrizeType","MiniGamePrizeTypeName","MiniGamePrizeTypeNamed","NO_PRIZE","POINTS","BONUS","MANUAL","SPIN","JACKPOT","CHANGE_LEVEL","MISSION","RAFFLE_TICKET","GEMS_AND_DIAMONDS","UNKNOWN","SAWTemplatesTransform","items","map","r","_r$saw_skin_ui_defini","x","_extends","saw_template_id","name","saw_template_ui_definition","description","thumbnail","saw_skin_ui_definition","skin_folder","saw_skin_key","visibile_when_can_spin","over_limit_message","no_attempts_message","jackpot_symbol","saw_game_type","saw_game_type_id","saw_buyin_type","buyin_cost_gems","buyin_cost_diamonds","jackpot_add_on_attempt","jackpot_current","promo_image","promo_text","custom_data","expose_game_stat_on_api","relative_period_timezone","activeFromDate","activeTillDate","next_available_spin_ts","steps_to_finish_game","custom_section_id","game_layout","show_prize_history","max_number_of_attempts","maxSpinsCount","max_spins_period_ms","maxSpinsPediodMs","expose_user_spin_id","prizes","p","_p$saw_prize_ui_defin","y","saw_prize_id","saw_prize_ui_definition","prize_type","prize_type_id","prize_value","font_size","font_size_mobile","icon","position","sectors","acknowledge_type","aknowledge_message","acknowledge_dp","acknowledge_action_title","acknowledge_dp_additional","acknowledge_action_title_additional","out_of_stock_message","pool","pool_initial","wins_count","weekdays","active_from_ts","active_till_ts","is_surcharge","is_deleted","prize_modifiers","allow_split_decimal","hide_prize_from_history","requirements_to_get_prize","max_give_period_type_id","SAWSpinErrorCode","SAWWinSoundType","SAWWinSoundFiles","NoSound","Disappointing","Positive","HighlyPositive","SAWHistoryTransform","template","prize_amount","client_request_id","is_claimed","create_date_ts","acknowledge_date_ts","PrizeModifiers","PrizeModifiersKeysNames","SAWWheelLayout","SAWGameDifficultyType","SAWGameDifficultyTypeName","SawGameDifficultyTypeNamed","EASY","MEDIUM","HARD","AttemptPeriodType","NodeCache","constructor","ttlChecker","cache","setInterval","getTime","key","hasOwnProperty","o","ttl","get","set","ttlSeconds","remove","flushAll","clearInterval","ECacheContext","OCache","init","cacheContext","oKey","stringify","deepClone","use","f","clear","clearContext","clearAll","ActivityTypeLimited","CoreUtils","currencySymbol","currency","toUpperCase","USD","EUR","JPY","GBP","AUD","CAD","CHF","CNY","SEK","NZD","MXN","SGD","HKD","NOK","KRW","TRY","INR","RUB","BRL","ZAR","avatarUrl","avatar_id","avatarDomain","startsWith","endsWith","slice","PublicLabelSettings","TranslationArea","InboxMessagesTransform","item","sent_date","createDate","message_guid","engagement_uid","read","is_read","favorite","is_starred","category_id","expire_on_dt","InboxMessageBodyTransform","action","image","title","preview_body","body","additional_buttons","buttons","text","inbox_cta_text","html_body","InboxMessageType","OpenLinksType","InboxCategories","InboxReadStatus","BuyStoreItemErrorCode","StoreCategoryTransform","_r$publicMeta","_r$publicMeta2","publicMeta","order","StoreItemPurchaseType","StoreItemType","StoreItemTypeName","StoreItemTypeNamed","Bonus","Tangible","MiniGameSpin","ChangeLevel","RaffleTicket","mapPurchaseType","purchaseType","StoreItemTransform","filter","_r$itemPublicMeta$pri","_r$categoryIds","_r$relatedGames","itemPublicMeta","purchase_type","price","image_url","ribbon","label_tag","custom_label_tag","limit_message","purchase_limit_message","priority","related_item_ids","related_items","hint_text","itemTypeId","can_buy","canBuy","category_ids","categoryIds","shopPool","active_till_date","discounted_price","discount_prize","discount_price_ribbon","discount_prize_ribbon","custom_ribbon_image","only_in_custom_section","custom_section_type_id","cant_buy_message","related_games","relatedGames","g","game_public_meta","enabled","i","ext_game_id","link","game_categories","game_provider","mobile_spec_link","StoreItemPurchasedTransform","purchasedToday","purchase_ts","purchasedThisWeek","purchasedThisMonth","purchase_points_amount","purchased_today","purchased_this_week","purchased_this_month","AchievementStatus","AchievementTaskType","AchievementType","AchievementAvailabilityStatus","BadgesTimeLimitStates","USER_STATE_PARAMS_KEYS_GAMES","USER_STATE_PARAMS_KEYS_BET_AMOUNT","MINOR_WORDS","Set","toGameTitleCase","raw","tokens","toLowerCase","split","wordTokens","test","lastWordIdx","wordIndex","token","isFirst","isLast","has","charAt","join","MissionUtils","getAvailabilityStatus","mission","activeFrom","getMs","activeTill","startDate","start_date_ts","timeLimit","time_limit_ms","requiresOptIn","requiresOptin","optedIn","isOptedIn","isLockedMission","ach_status_id","AvailableLocked","isLocked","AvailableActive","AvailableInactive","Available","UnavailableWithActiveFrom","AvailableWithActiveTillActive","AvailableWithActiveTillInactive","AvailableWithActiveTill","MissedByActiveTill","endDate","AvailableLimitedActive","MissedByLimitInTime","AvailableLimitedInactive","AvailableLimited","AvailableFullyLimitedActive","AvailableFullyLimitedInactive","AvailableFullyLimited","ts","replaceTagsFavMissionTask","task","valueToReplace","_task$task_public_met","result","userStateParams","user_state_params","userStateOperator","task_public_meta","user_state_operations","userStateParamsKeys","Object","keys","operatorsMulti","operatorsPos","suggestedGames","suggestedValue","forEach","k","_userStateOperator$k","operator","op","_userStateParams$k","Boolean","cleaned","pos","Number","currencyFromTheTask","core_wallet_currency","replaceFavGameNameTag","determineBadgeState","badge","progress","isCompleted","complete_date_ts","BeforeStartDate","AfterStartDateNoProgress","AfterStartDateNoProgressAndEndDate","AfterStartDateWithProgressAndEndDate","AfterEndDateNotStarted","AfterEndDateWithProgress","enrichUserAchievementsWithBadgeState","ach_type_id","Badge","badgeTimeLimitState","UserAchievementTransform","ach_id","_missionName","_missionSubHeader","_missionDescription","_r$ach_categories","completedToday","completedThisWeek","completedThisMonth","missionName","ach_public_meta","missionSubHeader","sub_header","missionDescription","achievementTasks","_r$ach_public_meta$na","_r$ach_public_meta$su","_r$ach_public_meta$de","unlock_mission_description","is_completed","is_locked","is_requires_optin","is_opted_in","dt_start","reward","Mission","cta_action","cta_text","tasks","task_type_id","CompleteAchievement","_t$task_public_meta","task_id","points_reward","userProgress","execution_count_expected","executionCount","execution_count_actual","userExecutedCount","display_progress_as_count","stage_image","ach_categories","ach_completed_id","requires_prize_claim","prize_claimed_date_ts","complete_date","completed_today","completed_this_week","completed_this_month","availability_status","claim_button_title","claim_button_action","hide_locked_mission","prize_claim_expiration_date","prize_claim_period_type_id","Recurring","next_recurrence_date_ts","milliseconds_till_available","RecurringUponCompletion","completion_count","completed_count","max_completion_count","recurring_quantity","ScheduledMissionType","AchCategoryTransform","MissionCategory","AchievementClaimPeriodTypeId","clanTournamentPlayersTransform","response","clan_id","clan_public_meta","players","user_id","userId","clean_ext_user_id","cleanExtUserId","public_username","userAltName","avatar_real_id","avatar_url","scores","is_me","isMe","TournamentRegistrationType","TournamentRegistrationTypeGetName","AUTO","BUY_IN_POINTS","MANUAL_APPROVAL","OPT_IN","REQUIRES_QUALIFICATION","BUY_IN_GEMS","BUY_IN_DIAMONDS","TournamentRegistrationStatus","TournamentRegistrationStatusName","TournamentRegistrationStatusNamed","CANCELLED","FINISHED","NOT_REGISTERED","PENDING","QUALIFIED_PENDING_REGISTRATION","REGISTERED","REGISTERED_PENDING_QUALIFICATION","TournamentInstanceStatus","TournamentInstanceStatusName","s","PUBLISHED","REGISTER","STARTED","FAILED","FINALIZING","tournamentPrizeTypeToPrizeName","DoNothing","DeductPoints","ResetPoints","MiniGameAttempt","AddGemsAndDiamonds","DeductGemsAndDiamonds","ResetGemsAndDiamonds","TournamentUtils","isCanRegister","tournament","tournamentRegistrationStatus","isUserRegistered","playersMaxCount","registrationCount","registrationType","tournamentInstanceStatus","allowLateRegistration","isInProgress","isActive","isFinished","isCancelled","isUpcoming","getPlayerTransformed","player","playerTransformed","user_ext_id","crm_brand_id","crmBrandId","getPrizeTransformed","prize","TournamentItemsTransform","tournamentId","instance_id","tournamentInstanceId","tournament_id","segment_dont_match_message","image1","image2","image_url2","image2_mobile","image_url2_mobile","prize_pool_short","custom_price_text","is_featured","featured","start_time","startTimeTs","end_time","endTimeTs","registration_count","is_user_registered","players_min_count","playersMinCount","players_max_count","registration_status","registration_type","registration_cost_points","buyInAmount","registration_cost_gems","registration_cost_diamonds","duration_ms","durationMs","is_active","is_can_register","is_cancelled","is_finished","is_in_progress","is_upcoming","min_scores_win","minScoreToWin","hide_leaderboard_min_scores","hideLeaderboardsMinScores","total_scores","totalScores","is_clan_based","isClanBased","prizeStructure","tournamentPlayer","me","tournamentInfoItemTransform","_TournamentItemsTrans","_t$tournamentInfo$tou","_t$tournamentInfo","_t$tournamentInfo2","tournamentInfo","tournamentLobbyInfo","userPosition","_t$userClanId","user_clan_id","userClanId","clan_leaderboard","clanLeaderboard","entry","clanId","public_meta","rank","total_score","totalScore","contributing_members","memberCount","clan_prize_structure","clanPrizes","clan_place","prize_pool_amount","prize_pool_currency_code","activity_type_id","details_json","prize_name","tiers","player_tiers","tier","player_place_from","player_place_to","pool_amount","distribution_type","TournamentRegistrationError","TournamentType","LeaderBoardPeriodType","pointsRewardTransform","reward_points","place","points","getLeaderBoardPlayerTransformed","user","user_alt_name","position_in_board","points_accumulated","getLeaderBoardTransform","board","board_id","board_public_meta","rules","period_type_id","rewards","users","positions","GetLevelMapResponseTransform","levels","mapped","l","_l$level_public_meta","level_id","level_public_meta","required_points","visibility_points","parseInt","required_level_counter_1","required_level_counter_2","ordinal_position","ordinalById","Map","sort","index","ticketsTransform","ticekt_id","ticket_id_string","winnersTransform","username","ticket","raf_won_id","claimed_date","prizeTransform","prize_id","prizes_per_run","prizes_per_run_actual","chances_to_win_perc","min_required_total_tickets","cap_prizes_per_run","stock_items_per_draw","should_claim","winners","requires_claim","min_required_tickets_for_user","drawTransform","draw_id","image_url_mobile","icon_url","background_image_url","background_image_url_mobile","is_grand","current_state","run_id","execution_type","execution_ts","previous_run_ts","previous_run_id","ticket_start_ts","allow_multi_prize_per_ticket","total_tickets_count","my_tickets_count","my_last_tickets","user_opted_in","requires_optin","winners_limit","winners_offset","winners_total","raffleTransform","raffle_id","start_date","end_date","end_date_ts","max_tickets_count","current_tickets_count","draws","ticket_cap_visualization","drawRunTransform","res","_res$draw$ticket_star","draw","RaffleTicketCapVisualization","RaffleDrawInstanceState","RaffleDrawTypeExecution","drawRunHistoryTransform","draw_runs","actual_execution_ts","is_winner","has_unclaimed_prize","raffleClaimPrizeResponseTransform","info","errorCode","errCode","errorMessage","errMsg","CACHE_DATA_SEC","JACKPOT_TEMPLATE_CACHE_SEC","JACKPOT_POT_CACHE_SEC","JACKPOT_WINNERS_CACHE_SEC","JACKPOT_ELIGIBLE_GAMES_CACHE_SEC","onUpdateContextKey","WSAPI","api","userExtId","onUpdateCallback","jackpotGetSignature","tracker","on","SAW_SPINS_COUNT_PUSH","data","updateOnSpin","SAW_SHOW_SPIN_PUSH","reloadMiniGameTemplate","SAW_AKNOWLEDGE_RESPONSE","SAWHistory","SAW_DO_SPIN_RESPONSE","MISSION_OPTIN_RESPONSE","updateMissions","ACHIEVEMENT_CLAIM_PRIZE_RESPONSE","RELOAD_ACHIEVEMENTS_EVENT","TOURNAMENT_REGISTER_RESPONSE","updateTournaments","BUY_SHOP_ITEM_RESPONSE","updateStorePurchasedItems","updateStoreItems","CLIENT_ENGAGEMENT_EVENT_NEW","updateInboxMessages","LOGOUT_RESPONSE","IDENTIFY_RESPONSE","JP_WIN_PUSH","jackpotClearCache","JP_OPTOUT_RESPONSE","JP_OPTIN_RESPONSE","CLAIM_BONUS_RESPONSE","updateBonuses","SAW_DO_SPIN_BATCH_RESPONSE","RAF_CLAIM_PRIZE_RESPONSE","updateRaffles","GET_INBOX_MESSAGES_RESPONSE","unread_count","updateInboxUnreadCount","CLIENT_PUBLIC_PROPERTIES_CHANGED_EVENT","_data$props","_data$props2","_data$props3","_data$props4","_data$props5","props","core_inbox_unread_count","notifyActivityLogUpdate","RAF_OPTIN_RESPONSE","clearCaches","getUserProfile","assign","userPublicProps","Error","checkSegmentMatch","segment_id","coreCheckSegments","find","is_matching","checkSegmentListMatch","segment_ids","Array","isArray","getLevels","Levels","levelsGetT","getCurrentLevel","CurrentLevel","getLevelCurrent","getMissions","onUpdate","Missions","missionsGetItemsT","getBadges","Badges","badgetsGetItemsT","getBonuses","Bonuses","bonusesGetItemsT","claimBonus","bonus_id","bonusClaimItem","err_code","err_message","success","getUserLevelExtraCounters","LevelExtraCounters","getUserGamificationInfoT","getStoreItems","StoreItems","storeGetItemsT","buyStoreItem","item_id","getStoreCategories","StoreCategories","storeGetCategoriesT","getStorePurchasedItems","limit","offset","StoreHistory","storeGetPurchasedItemsT","getAchCategories","AchCategories","achGetCategoriesT","getCustomSections","CustomSections","customSectionsGetT","getMiniGames","Saw","sawGetTemplatesT","getMiniGamesHistory","getSawWinningHistoryT","playMiniGame","template_id","sawSpinRequest","doAcknowledgeRequest","request_id","miniGameWinAcknowledgeRequest","playMiniGameBatch","sawSpinBatchRequest","request_ids","results","doAcknowledgeBatchRequest","errMessage","jackpot_amount","first_spin_in_period","requestMissionOptIn","mission_id","missionOptIn","requestMissionClaimReward","missionClaimPrize","getTournamentsList","TournamentList","tournamentsGetLobbyT","getClans","Clans","clansGetListT","getClanInfo","clansGetInfoT","joinClan","clanJoin","getTournamentInstanceInfo","tournamentsGetInfoT","getClanTournamentPlayers","clanTournamentGetPlayers","registerInTournament","getLeaderBoard","periodType","getPreviousPeriod","LeaderBoards","leaderboardsGetT","getInboxMessages","from","to","onlyFavorite","categoryId","read_status","InboxMessages","getInboxMessagesT","getInboxUnreadCount","InboxUnreadCount","getInboxUnreadCountT","getInboxMessageBody","messageGuid","getInboxMessageBodyT","markInboxMessageAsRead","markInboxMessageRead","markAllInboxMessagesAsRead","markAllInboxMessageRead","markUnmarkInboxMessageAsFavorite","mark","deleteInboxMessage","deleteAllInboxMessages","getTranslations","lang_code","getTranslationsT","translations","reportImpressionEvent","activityType","reportEngagementImpression","reportClickEvent","reportEngagementAction","getActivityLog","startTimeSeconds","endTimeSeconds","ActivityLog","getActivityLogT","gamePickGetActiveRounds","gpGetActiveRounds","gamePickGetActiveRound","round_id","gpGetActiveRound","gamePickGetHistory","gpGetGamesHistory","gamePickGetBoard","gpGetGameBoard","gamePickSubmitSelection","_props$round","round","gpSubmitSelection","gamePickSubmitSelectionQuiz","_props$round2","gamePickGetUserInfo","gpGetUserInfo","gamePickGetGameInfo","gpGetGameInfo","gamePickGetRoundInfoForUser","int_user_id","gpGetRoundInfoForUser","getAvatarsList","AvatarsList","avatarsGetListT","getAvatarsCustomized","AvatarsCustomized","avatarsGetCustomizedT","getAvatarPrompts","AvatarPrompts","avatarsGetPromptsT","setAvatar","_r$errCode","avatarSetAvatar","templates","findIndex","updateEntity","updatedTemplates","payload","updateClans","count","getRafflesT","Raffles","startSeconds","endSeconds","contextKey","Jackpots","Pots","JackpotWinners","jackpotGet","_this","signature","jp_template_id","related_game_id","jackpots","pots","_jackpots","_pots","jp","pot","jp_public_meta","jp_template_ids","potGet","_jp","jackpotOptIn","jackpotOptOut","getJackpotWinners","getJackpotWinnersT","getJackpotEligibleGames","JackpotEligibleGames","getJackpotEligibleGamesT","getRelatedItemsForGame","getRaffles","getRaffleDrawRun","getRaffleDrawRunT","winners_from","winners_to","getRaffleDrawRunsHistory","claimRafflePrize","won_id","requestRaffleOptin","raffle_run_id","raffleOptin","AchCustomSectionType","AchCustomLayoutTheme","AchMissionsTabsOptions","AchOverviewMissionsFilter","LiquidEntityData","UICustomSectionTransform","customSections","section_type_id","menu_img","menu_name","custom_skin_images","generic_custom_css","mission_tabs_options","overview_missions_count","overview_missions_filter","url_or_dp","theme","LEVELS","liquid_entity_data","ach_tournament_id","show_raw_data","liquid_template","BADGES","ach_category_ids","STORE","shop_category_ids","push","BonusItemsTransform","is_redeemable","redeemable","create_date","redeem_date","redeemDate","label_bonus_template_id","labelBonusTemplateId","bonus_status_id","bonusStatusId","label_bonus_template_meta_map","labelBonusTemplateMetaMap","bonus_meta_map","bonusMetaMap","BonusStatus","UserBalanceType","ActivityLogTransform","_item$type","itemTransformed","source_type_id","amount","points_collected","user_points_balance","total_ever","user_points_ever","PointChangeSourceType","avatarDefinitionTransform","is_default","hide_until_achieved","url","avatar_source_type_id","active_from_date","is_given","is_in_use","avatarCustomizedTransform","dt_created","avatarPromptTransform","prompt_id","cost_currency_type_id","cost_value","GetJackpotWinnersResponseTransform","winnerInfo","winner","win_date_ts","jp_pot_id","GetJackpotEligibleGamesResponseTransform","eligible_games","games","game","game_id","ach_game_id","PUBLIC_API_URL","C_SOCKET_PROD","GAMES_API_URL","AVATAR_DOMAIN","DEFAULT_LANG_EN","SmarticoAPI","label_api_key","brand_api_key","messageSender","options","_options$tracker","publicUrl","wsUrl","inboxCdnUrl","partnerUrl","gamesApiUrl","baseRgApiParams","envId","logger","logCIDs","logHTTPTiming","always","getPublicUrl","getPublicWsUrl","env_id","String","getEnvId","brand_key","params","hash","getAvatarUrl","getCleanLabelApiKey","getEnvDnsSuffix","ENV_ID","substring","replaceSmrDomainsWithCloudfront","domains","replacedValue","oldDomain","newDomain","entries","err","send","message","expectCID","force_language","cid","timeStart","errSetup","timeEnd","warn","request","obj","buildMessage","api_key","ext_user_id","coreReportCustomEvent","eventType","eventMessage","EVENT","eventResponse","EVENT_RESPONSE","coreGetTranslations","areas","cacheSec","trim","Translations","tsBaseRQ","GET_TRANSLATIONS_REQUEST","hash_code","trBase","GET_TRANSLATIONS_RESPONSE","_trUser$translations","trUserRQ","trUser","coreIdentifyLabel","_this2","LabelInfo","INIT","INIT_RESPONSE","coreIdentifyUser","IDENTIFY","coreChangeUsername","public_username_custom","CLIENT_SET_CUSTOM_USERNAME_REQUEST","CLIENT_SET_CUSTOM_USERNAME_RESPONSE","CHECK_SEGMENT_MATCH_REQUEST","CHECK_SEGMENT_MATCH_RESPONSE","segments","CLIENT_ENGAGEMENT_IMPRESSION_REQUEST","catch","CLIENT_ENGAGEMENT_ACTION_REQUEST","JP_GET_JACKPOTS_REQUEST","JP_GET_JACKPOTS_RESPONSE","JP_GET_LATEST_POTS_REQUEST","JP_GET_LATEST_POTS_RESPONSE","JP_OPTIN_REQUEST","JP_OPTOUT_REQUEST","JP_GET_WINNERS_REQUEST","JP_GET_WINNERS_RESPONSE","JP_GET_ELIGIBLE_GAMES_REQUEST","JP_GET_ELIGIBLE_GAMES_RESPONSE","sawGetTemplates","is_visitor_mode","SAW_GET_SPINS_REQUEST","SAW_GET_SPINS_RESPONSE","_t$saw_template_ui_de","_t$saw_template_ui_de2","jackpotValue","SAW_AKNOWLEDGE_REQUEST","SAW_DO_SPIN_REQUEST","spinAttemptResponse","status","SAW_OK","SAW_NO_SPINS","SAW_PRIZE_POOL_EMPTY","SAW_NOT_ENOUGH_POINTS","SAW_FAILED_MAX_SPINS_REACHED","SAW_TEMPLATE_NOT_ACTIVE","SAW_NOT_IN_SEGMENT","SAW_NO_BALANCE_GEMS","SAW_NO_BALANCE_DIAMONDS","SAW_AKNOWLEDGE_BATCH_RESPONSE","spins_count","spins","SAW_DO_SPIN_BATCH_REQUEST","getSawWinningHistory","GET_SAW_HISTORY_REQUEST","GET_SAW_HISTORY_RESPONSE","MISSION_OPTIN_REQUEST","achievementId","ACHIEVEMENT_CLAIM_PRIZE_REQUEST","TOURNAMENT_REGISTER_REQUEST","itemId","BUY_SHOP_ITEM_REQUEST","inboxGetMessages","GET_INBOX_MESSAGES_REQUEST","storeGetItems","GET_SHOP_ITEMS_REQUEST","GET_SHOP_ITEMS_RESPONSE","storeGetCategories","GET_SHOP_CATEGORIES_REQUEST","GET_SHOP_CATEGORIES_RESPONSE","categories","storeGetPurchasedItems","ACH_SHOP_ITEM_HISTORY_REQUEST","ACH_SHOP_ITEM_HISTORY_RESPONSE","missionsGetItems","GET_ACHIEVEMENT_MAP_REQUEST","GET_ACHIEVEMENT_MAP_RESPONSE","responseClone","achievements","getUserGamificationInfo","GET_ACHIEVEMENT_USER_REQUEST","GET_ACHIEVEMENT_USER_RESPONSE","level_counter_1","level_counter_2","achGetCategories","GET_ACH_CATEGORIES_REQUEST","GET_ACH_CATEGORIES_RESPONSE","badgetsGetItems","bonusesGetItems","GET_BONUSES_REQUEST","GET_BONUSES_RESPONSE","CLAIM_BONUS_REQUEST","bonusId","bonuses","tournamentsGetLobby","GET_TOURNAMENT_LOBBY_REQUEST","GET_TOURNAMENT_LOBBY_RESPONSE","tournaments","clansGetList","GET_CLAN_LIST_REQUEST","GET_CLAN_LIST_RESPONSE","_response$join_date","clans","cooldown_until","join_date","clansGetInfo","GET_CLAN_INFO_REQUEST","GET_CLAN_INFO_RESPONSE","_c$cooldown_until","c","clanInfo","member_count","capacity_limit","entry_fee_currency_type_id","entry_fee_amount","rating_position","rating_score","members","m","contribution_score","joinSourceId","_response$errCode","_response$errMsg","JOIN_CLAN_REQUEST","join_source_id","JOIN_CLAN_RESPONSE","tournamentsGetInfo","_response$userPositio","_response$tournamentI","GET_TOURNAMENT_INFO_REQUEST","GET_TOURNAMENT_INFO_RESPONSE","tournament_instance_id","_response$players","GET_CLAN_TOURNAMENT_PLAYERS_REQUEST","GET_CLAN_TOURNAMENT_PLAYERS_RESPONSE","leaderboardGet","prevPeriod","_response$map$boardKe","_response$map$boardKe2","GET_LEADERS_BOARD_REQUEST","snapshot_offset","include_users","GET_LEADERS_BOARD_RESPONSE","boardKey","DAILY","levelsGet","GET_LEVEL_MAP_REQUEST","GET_LEVEL_MAP_RESPONSE","_userInfo$points_ever2","userInfo","sortedLevels","currentLevelIndex","level","current_level","_userInfo$points_ever","userPointsEver","points_ever","nextLevel","currentLevel","min","max","customSectionsGet","GET_CUSTOM_SECTIONS_REQUEST","GET_CUSTOM_SECTIONS_RESPONSE","starred_only","favoriteOnly","log","_this3","getMessageBody","getLabelSetting","INBOX_PUBLIC_CDN","fetch","method","headers","json","MARK_INBOX_READ_REQUEST","MARK_INBOX_READ_RESPONSE","all_read","MARK_INBOX_STARRED_REQUEST","MARK_INBOX_STARRED_RESPONSE","MARK_INBOX_DELETED_REQUEST","MARK_INBOX_DELETED_RESPONSE","all_deleted","buildGamesApiParams","_this$tracker$userPub","_this$tracker$userPub2","smartico_ext_user_id","getExtUserId","lang","core_user_language","sendGamesApi","usePost","baseParams","queryString","encodeURIComponent","fetchOptions","extraQuery","isQuiz","gpGetTranslations","avatarsGetList","GET_AVATARS_LIST_REQUEST","GET_AVATARS_LIST_RESPONSE","avatarsGetCustomized","GET_AVATARS_CUSTOMIZED_REQUEST","GET_AVATARS_CUSTOMIZED_RESPONSE","avatarsGetPrompts","GET_AVATAR_PROMPTS_REQUEST","GET_AVATAR_PROMPTS_RESPONSE","CLIENT_SET_AVATAR_REQUEST","CLIENT_SET_AVATAR_RESPONSE","_await$this$avatarsGe","avatars","_await$this$avatarsGe2","_await$this$avatarsGe3","prompts","getWSCalls","GET_RELATED_ACH_N_TOURNAMENTS_REQUEST","GET_RELATED_ACH_N_TOURNAMENTS_RESPONSE","RAF_GET_RAFFLES_REQUEST","RAF_GET_RAFFLES_RESPONSE","RAF_GET_DRAW_RUN_REQUEST","RAF_GET_DRAW_RUN_RESPONSE","RAF_GET_DRAW_HISTORY_REQUEST","RAF_GET_DRAW_HISTORY_RESPONSE","RAF_CLAIM_PRIZE_REQUEST","RAF_OPTIN_REQUEST","GET_POINT_HISTORY_REQUEST","floor","GET_POINT_HISTORY_RESPONSE","logHistory","CookieStore","cookieStore","TSMap","AnalyticsInterfaceType","AnalyticsScreenNameId","AnalyticsTournamentsLobbySubScreenNameId","AnalyticsInboxSubScreenNameId","QuizSportType","quizSupportedSports","Basketball","Soccer","Tennis","SAWGPMarketType","QuizAnswersValueType","quizAnswerHomeTeamReplacementText","quizAnswerAwayTeamReplacementText","quizDrawReplacementText","quizYesReplacementText","quizNoReplacementText","quizOddReplacementText","quizEvenReplacementText","quizOrReplacementText","quizNoGoalsReplacementText","quizAnswersTrKeys","yesNoAnswers","Yes","No","homeAwayAnswers","HomeTeam","AwayTeam","homeAwayDrawAnswers","Draw","homeAwayNoGoalsAnswers","marketsInfo","OneXTwo","question","trKey","answers","OneXTwoHalftime","FirstGoal","LastGoal","DoubleChance","HomeTeamDraw","HomeTeamAwayTeam","AwayTeamDraw","OverUnder2_5","OverUnder1_5Halftime","OverUnder1_5__2ndHalf","RedCard","TotalCorners8_5","TotalCorners9_5","Corners1x2","One_Two","Overtime","OddEven","Odd","Even","OddEvenHomeAway","HomeOdd","HomeEven","AwayOdd","AwayEven","FirstSet","SecondSet","ThirdSet","FourthSet","FifthSet","PlayerOneWinsOneSet","PlayerTwoWinsOneSet","CustomNonSport","CustomSport","QuizMarketPerSport","JackpotContributionType","JackPotTemparature","JackpotType","AvatarCustomizeErrorCode","AvatarCustomizeErrorMessage","AVATAR_USER_LIMIT","AVATAR_LABEL_LIMIT","JoinClanErrorCode"],"mappings":";;IAAYA,QAuNX;AAvND,CAAA,UAAYA,OAAO,EAAA;EAClBA,OAAA,CAAAA,OAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ,CAAA;EACRA,OAAA,CAAAA,OAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ,CAAA;EAERA,OAAA,CAAAA,OAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ,CAAA;EACRA,OAAA,CAAAA,OAAA,CAAA,eAAA,CAAA,GAAA,CAAA,CAAA,GAAA,eAAiB,CAAA;EACjBA,OAAA,CAAAA,OAAA,CAAA,UAAA,C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ACG,kBAAkB,GAAG,8DAAA;;;ACPhD;;;AAGG;IACSC,kBAqBX;AArBD,CAAA,UAAYA,iBAAiB,EAAA;AAC5B;EACAA,iBAAA,CAAAA,iBAAA,CAAA,cAAA,CAAA,GAAA,CAAA,CAAA,GAAA,cAAgB,CAAA;AAChB;EACAA,iBAAA,CAAAA,iBAAA,CAAA,8BAAA,CAAA,GAAA,IAAA,CAAA,GAAA,8BAAmC,CAAA;AACnC;EACAA,iBAAA,CAAAA,iBAAA,CAAA,qBAAA,CAAA,GAAA,IAAA,CAAA,GAAA,qBAA0B,CAAA;AAC1B;EACAA,iBAAA,CAAAA,iBAAA,CAAA,gBAAA,CAAA,GAAA,IAAA,CAAA,GAAA,gBAAqB,CAAA;AACrB;EACAA,iBAAA,CAAAA,iBAAA,CAAA,8BAAA,CAAA,GAAA,IAAA,CAAA,GAAA,8BAAmC,CAAA;AACnC;EACAA,iBAAA,CAAAA,iBAAA,CAAA,4BAAA,CAAA,GAAA,IAAA,CAAA,GAAA,4BAAiC,CAAA;AACjC;EACAA,iBAAA,CAAAA,iBAAA,CAAA,+BAAA,CAAA,GAAA,IAAA,CAAA,GAAA,+BAAoC,CAAA;AACpC;EACAA,iBAAA,CAAAA,iBAAA,CAAA,2BAAA,CAAA,GAAA,IAAA,CAAA,GAAA,2BAAgC,CAAA;AAChC;EACAA,iBAAA,CAAAA,iBAAA,CAAA,oBAAA,CAAA,GAAA,IAAA,CAAA,GAAA,oBAAyB,CAAA;AACzB;EACAA,iBAAA,CAAAA,iBAAA,CAAA,yCAAA,CAAA,GAAA,IAAA,CAAA,GAAA,yCAA8C,CAAA;AAC/C,CAAC,EArBWA,iBAAiB,KAAjBA,iBAAiB,GAqB5B,EAAA,CAAA,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"index.modern.mjs","sources":["../src/Base/ClassId.ts","../src/IntUtils.ts","../src/MiniGames/SAWBuyInType.ts","../src/MiniGames/SAWUtils.ts","../src/MiniGames/SAWAcknowledgeType.ts","../src/MiniGames/SAWAskForUsername.ts","../src/MiniGames/SAWGameType.ts","../src/MiniGames/SAWExposeUserSpinId.ts","../src/MiniGames/SAWGameLayout.ts","../src/MiniGames/SAWPrizeType.ts","../src/MiniGames/SAWGetTemplatesResponse.ts","../src/MiniGames/SAWSpinErrorCode.ts","../src/MiniGames/SAWWinSoundType.ts","../src/MiniGames/SAWWinningHistoryResponse.ts","../src/MiniGames/PrizeModifiers.ts","../src/MiniGames/SAWWheelLayout.ts","../src/MiniGames/SAWGameDifficulty.ts","../src/MiniGames/AttemptPeriodType.ts","../src/NodeCache.ts","../src/OCache.ts","../src/Core/ActivityTypeLimited.ts","../src/Core/CoreUtils.ts","../src/Core/PublicLabelSettings.ts","../src/Core/TranslationArea.ts","../src/Inbox/GetInboxMessagesResponse.ts","../src/Inbox/InboxMessage.ts","../src/Inbox/InboxMessageType.ts","../src/Inbox/OpenLinksType.ts","../src/Inbox/InboxCategories.ts","../src/Inbox/InboxReadStatus.ts","../src/Store/BuyStoreItemErrorCode.ts","../src/Store/StoreCategory.ts","../src/Store/StoreItemPurchaseType.ts","../src/Store/StoreItemType.ts","../src/Store/StoreItem.ts","../src/Store/StoreItemPurchased.ts","../src/Missions/AchievementStatus.ts","../src/Missions/AchievementTaskType.ts","../src/Missions/AchievementType.ts","../src/Missions/AchievementAvailabilityStatus.ts","../src/Missions/BadgesTimeLimitStates.ts","../src/Missions/MissionsUtils.ts","../src/Missions/UserAchievement.ts","../src/Missions/ScheduledMissionType.ts","../src/Missions/AchievementCategory.ts","../src/Missions/MissionCategory.ts","../src/Missions/AchievementClaimTypeId.ts","../src/Tournaments/GetClanTournamentPlayersResponse.ts","../src/Tournaments/TournamentRegistrationType.ts","../src/Tournaments/TournamentRegistrationStatus.ts","../src/Tournaments/TournamentInstanceStatus.ts","../src/Tournaments/TournamentUtils.ts","../src/Tournaments/Tournament.ts","../src/Tournaments/GetTournamentInfoResponse.ts","../src/Tournaments/TournamentRegistrationError.ts","../src/Tournaments/TournamentType.ts","../src/Leaderboard/LeaderBoardPeriodType.ts","../src/Leaderboard/LeaderBoards.ts","../src/Level/GetLevelMapResponse.ts","../src/WSAPI/WSAPIBase.ts","../src/Raffle/GetRafflesResponse.ts","../src/Raffle/GetDrawRunResponse.ts","../src/Raffle/Raffle.ts","../src/Raffle/RaffleDraw.ts","../src/Raffle/GetRaffleDrawRunsHistoryResponse.ts","../src/Raffle/RaffleClaimPrizeResponse.ts","../src/WSAPI/WSAPIUser.ts","../src/WSAPI/WSAPIGeneral.ts","../src/WSAPI/WSAPIMissions.ts","../src/WSAPI/WSAPIBonuses.ts","../src/WSAPI/WSAPIStore.ts","../src/WSAPI/WSAPITournaments.ts","../src/WSAPI/WSAPIClans.ts","../src/WSAPI/WSAPIJackpots.ts","../src/WSAPI/WSAPIRaffles.ts","../src/WSAPI/WSAPIMiniGames.ts","../src/WSAPI/WSAPIAvatars.ts","../src/WSAPI/WSAPIGamePick.ts","../src/WSAPI/WSAPILeaderBoard.ts","../src/WSAPI/WSAPIInbox.ts","../src/WSAPI/WSAPI.ts","../src/CustomSections/AchCustomSection.ts","../src/CustomSections/UICustomSection.ts","../src/Bonuses/Bonus.ts","../src/Bonuses/BonusStatus.ts","../src/ActivityLog/UserBalanceType.ts","../src/ActivityLog/GetActivityLogResponse.ts","../src/ActivityLog/PointChangeSourceType.ts","../src/Avatars/GetAvatarsListResponse.ts","../src/Avatars/GetAvatarsCustomizedResponse.ts","../src/Avatars/GetAvatarPromptsResponse.ts","../src/Jackpots/GetJackpotWinnersResponse.ts","../src/Jackpots/GetJackpotEligibleGamesResponse.ts","../src/SmarticoAPI.ts","../src/CookieStore.ts","../src/Analytics/AnalyticStoreData.ts","../src/Quiz/SportTypes.ts","../src/Quiz/MarketsType.ts","../src/Quiz/MarketsAnswers.ts","../src/Quiz/MarketsInfo.ts","../src/Quiz/MarketsPerSport.ts","../src/Jackpots/JackpotContributionType.ts","../src/Jackpots/JackpotPot.ts","../src/Jackpots/JackpotType.ts","../src/Avatars/AvatarCustomizeErrorCode.ts","../src/Clans/JoinClanErrorCode.ts"],"sourcesContent":["export enum ClassId {\n\tPING = 1,\n\tPONG = 2,\n\n\tINIT = 3,\n\tINIT_RESPONSE = 4,\n\tIDENTIFY = 5,\n\tIDENTIFY_RESPONSE = 6,\n\tLOGIN = 7,\n\tLOGOUT = 8,\n\tEVENT = 9,\n\tEVENT_RESPONSE = 10,\n\n\tLOGIN_RESPONSE = 11,\n\tLOGOUT_RESPONSE = 12,\n\n\tGET_TRANSLATIONS_REQUEST = 13,\n\tGET_TRANSLATIONS_RESPONSE = 14,\n\n\t/*\n !Important, if adding new messages that are 'acting' on behalf of the client,\n you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION\n */\n\n\tCLIENT_ENGAGEMENT_IMPRESSION_REQUEST = 103,\n\tCLIENT_ENGAGEMENT_ACTION_REQUEST = 104,\n\tCLIENT_EXECUTE_DEEPLINK_EVENT = 105,\n\tCLIENT_ENGAGEMENT_FAILED_REQUEST = 106,\n\tCLIENT_EXECUTE_JS_EVENT = 107,\n\tCLIENT_PUBLIC_PROPERTIES_CHANGED_EVENT = 108,\n\tCLIENT_ENGAGEMENT_EVENT_NEW = 110,\n\n\tCLIENT_TRACK_ACTIVITY_REQUEST = 155,\n\tCLIENT_SET_AVATAR_REQUEST = 157,\n\tCLIENT_SET_AVATAR_RESPONSE = 158,\n\n\tCLIENT_SET_CUSTOM_USERNAME_REQUEST = 159,\n\tCLIENT_SET_CUSTOM_USERNAME_RESPONSE = 160,\n\n\tCHECK_SEGMENT_MATCH_REQUEST = 161,\n\tCHECK_SEGMENT_MATCH_RESPONSE = 162,\n\n\t/*\n !Important, if adding new messages that are 'acting' on behalf of the client,\n you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION\n */\n\n\t// 500-1000 - Achievements\n\tGET_LEVEL_MAP_REQUEST = 500,\n\tGET_LEVEL_MAP_RESPONSE = 501,\n\tGET_ACHIEVEMENT_MAP_REQUEST = 502,\n\tGET_ACHIEVEMENT_MAP_RESPONSE = 503,\n\tRELOAD_ACHIEVEMENTS_EVENT = 504,\n\tGET_LEADERS_BOARD_REQUEST = 505,\n\tGET_LEADERS_BOARD_RESPONSE = 506,\n\tGET_SHOP_ITEMS_REQUEST = 509,\n\tGET_SHOP_ITEMS_RESPONSE = 510,\n\tBUY_SHOP_ITEM_REQUEST = 511,\n\tBUY_SHOP_ITEM_RESPONSE = 512,\n\tGET_INBOX_MESSAGES_REQUEST = 513,\n\tGET_INBOX_MESSAGES_RESPONSE = 514,\n\tGET_SHOP_CATEGORIES_REQUEST = 515,\n\tGET_SHOP_CATEGORIES_RESPONSE = 516,\n\tGET_TOURNAMENT_LOBBY_REQUEST = 517,\n\tGET_TOURNAMENT_LOBBY_RESPONSE = 518,\n\tGET_TOURNAMENT_INFO_REQUEST = 519,\n\tGET_TOURNAMENT_INFO_RESPONSE = 520,\n\tTOURNAMENT_REGISTER_REQUEST = 521,\n\tTOURNAMENT_REGISTER_RESPONSE = 522,\n\tGET_CUSTOM_SECTIONS_REQUEST = 523,\n\tGET_CUSTOM_SECTIONS_RESPONSE = 524,\n\tMISSION_OPTIN_REQUEST = 525,\n\tMISSION_OPTIN_RESPONSE = 526,\n\n\t/*\n !Important, if adding new messages that are 'acting' on behalf of the client,\n you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION\n */\n\n\tGET_ACHIEVEMENT_USER_REQUEST = 527,\n\tGET_ACHIEVEMENT_USER_RESPONSE = 528,\n\n\tMARK_INBOX_READ_REQUEST = 529,\n\tMARK_INBOX_READ_RESPONSE = 530,\n\tMARK_INBOX_STARRED_REQUEST = 531,\n\tMARK_INBOX_STARRED_RESPONSE = 532,\n\tMARK_INBOX_DELETED_REQUEST = 535,\n\tMARK_INBOX_DELETED_RESPONSE = 536,\n\n\tGET_ACH_CATEGORIES_REQUEST = 537,\n\tGET_ACH_CATEGORIES_RESPONSE = 538,\n\n\tACHIEVEMENT_CLAIM_PRIZE_REQUEST = 539,\n\tACHIEVEMENT_CLAIM_PRIZE_RESPONSE = 540,\n\n\tACH_SHOP_ITEM_HISTORY_REQUEST = 541,\n\tACH_SHOP_ITEM_HISTORY_RESPONSE = 542,\n\n\tGET_RELATED_ACH_N_TOURNAMENTS_REQUEST = 543,\n\tGET_RELATED_ACH_N_TOURNAMENTS_RESPONSE = 544,\n\n\tGET_POINT_HISTORY_REQUEST = 545,\n\tGET_POINT_HISTORY_RESPONSE = 546,\n\n\tGET_AVATARS_LIST_REQUEST = 560,\n\tGET_AVATARS_LIST_RESPONSE = 561,\n\tGET_AVATARS_CUSTOMIZED_REQUEST = 562,\n\tGET_AVATARS_CUSTOMIZED_RESPONSE = 563,\n\tGET_AVATAR_PROMPTS_REQUEST = 564,\n\tGET_AVATAR_PROMPTS_RESPONSE = 565,\n\n\tGET_CLAN_LIST_REQUEST = 570,\n\tGET_CLAN_LIST_RESPONSE = 571,\n\n\tGET_CLAN_INFO_REQUEST = 572,\n\tGET_CLAN_INFO_RESPONSE = 573,\n\n\tJOIN_CLAN_REQUEST = 574,\n\tJOIN_CLAN_RESPONSE = 575,\n\n\tGET_CLAN_TOURNAMENT_PLAYERS_REQUEST = 576,\n\tGET_CLAN_TOURNAMENT_PLAYERS_RESPONSE = 577,\n\n\t/*\n !Important, if adding new messages that are 'acting' on behalf of the client,\n you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION\n */\n\n\tGET_BONUSES_REQUEST = 600,\n\tGET_BONUSES_RESPONSE = 601,\n\tCLAIM_BONUS_REQUEST = 602,\n\tCLAIM_BONUS_RESPONSE = 603,\n\n\tSAW_GET_SPINS_REQUEST = 700,\n\tSAW_GET_SPINS_RESPONSE = 701,\n\tSAW_DO_SPIN_REQUEST = 702,\n\tSAW_DO_SPIN_RESPONSE = 703,\n\tSAW_AKNOWLEDGE_REQUEST = 704,\n\tSAW_AKNOWLEDGE_RESPONSE = 705,\n\tSAW_SPINS_COUNT_PUSH = 706,\n\tSAW_SHOW_SPIN_PUSH = 707,\n\tSAW_PRIZE_DROP_WIN_PUSH = 708,\n\tSAW_PRIZE_DROP_WIN_AKNOWLEDGE_REQUEST = 709,\n\tSAW_PRIZE_DROP_WIN_AKNOWLEDGE_RESPONSE = 710,\n\tSAW_AKNOWLEDGE_SPIN_PUSH = 711,\n\tSAW_DO_SPIN_BATCH_REQUEST = 712,\n\tSAW_DO_SPIN_BATCH_RESPONSE = 713,\n\tSAW_AKNOWLEDGE_BATCH_REQUEST = 714,\n\tSAW_AKNOWLEDGE_BATCH_RESPONSE = 715,\n\n\tGET_SAW_HISTORY_REQUEST = 716,\n\tGET_SAW_HISTORY_RESPONSE = 717,\n\n\t/*\n !Important, if adding new messages that are 'acting' on behalf of the client,\n you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION\n */\n\n\tJP_GET_JACKPOTS_REQUEST = 800,\n\tJP_GET_JACKPOTS_RESPONSE = 801,\n\n\tJP_GET_LATEST_POTS_REQUEST = 802,\n\tJP_GET_LATEST_POTS_RESPONSE = 803,\n\n\tJP_OPTIN_REQUEST = 804,\n\tJP_OPTIN_RESPONSE = 805,\n\n\tJP_OPTOUT_REQUEST = 806,\n\tJP_OPTOUT_RESPONSE = 807,\n\n\tJP_WIN_PUSH = 808,\n\tJP_GET_WINNERS_REQUEST = 809,\n\tJP_GET_WINNERS_RESPONSE = 810,\n\n\tJP_GET_ELIGIBLE_GAMES_REQUEST = 811,\n\tJP_GET_ELIGIBLE_GAMES_RESPONSE = 812,\n\n\tRAF_GET_RAFFLES_REQUEST = 902,\n\tRAF_GET_RAFFLES_RESPONSE = 903,\n\tRAF_GET_DRAW_RUN_REQUEST = 904,\n\tRAF_GET_DRAW_RUN_RESPONSE = 905,\n\tRAF_GET_DRAW_HISTORY_REQUEST = 906,\n\tRAF_GET_DRAW_HISTORY_RESPONSE = 907,\n\tRAF_CLAIM_PRIZE_REQUEST = 908,\n\tRAF_CLAIM_PRIZE_RESPONSE = 909,\n\tRAF_OPTIN_REQUEST = 916,\n\tRAF_OPTIN_RESPONSE = 917,\n\t/*\n\tRAF_GET_TICKETS_REQUEST = 902,\n\tRAF_GET_TICKETS_RESPONSE = 903,\n\n\tRAF_CLAIM_PRIZE_REQUEST = 906,\n\t*/\n\n\tBNR_GET_BANNER_PLACEMENTS_REQUEST = 950,\n\tBNR_GET_BANNER_PLACEMENTS_RESPONSE = 951,\n\tBNR_GET_BANNER_CONTENT_REQUEST = 952,\n\tBNR_GET_BANNER_CONTENT_RESPONSE = 953,\n\n\t/*\n !Important, if adding new messages that are 'acting' on behalf of the client,\n you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION\n */\n\n\tREGISTER_PUSH_NOTIFICATIONS_TOKEN_REQ = 1003,\n\tREGISTER_PUSH_NOTIFICATIONS_TOKEN_RESP = 2003,\n\n\tCLIENT_DEBUG_REQUEST = 77777,\n\n\t/*\n !Important, if adding new messages that are 'acting' on behalf of the client,\n you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION\n */\n\n\tUNSUPPORTED_COMMAND = 99999,\n}\n","class IntUtils {\n\tpublic static uuid(): string {\n\t\tlet a: any;\n\t\tlet b: any;\n\t\tfor (\n\t\t\tb = a = '';\n\t\t\ta++ < 36;\n\t\t\tb += (a * 51) & 52 ? (a ^ 15 ? 8 ^ (Math.random() * (a ^ 20 ? 16 : 4)) : 4).toString(16) : '-'\n\t\t) {}\n\t\treturn b;\n\t}\n\n\tpublic static isNotNull(val: any): boolean {\n\t\treturn typeof val !== 'undefined' && val !== null;\n\t}\n\n\tpublic static isNotEmpty(val: string): boolean {\n\t\treturn typeof val !== 'undefined' && val !== null && val.length > 0;\n\t}\n\n\tpublic static replaceAll(value: string, regex: string, replacement: string | number): string {\n\t\tif (IntUtils.isNotNull(value)) {\n\t\t\treturn value.replace(new RegExp(IntUtils.escapeRegExp(regex), 'g'), replacement?.toString());\n\t\t}\n\t\treturn value;\n\t}\n\n\tpublic static escapeRegExp(v: string): string {\n\t\tif (IntUtils.isNotEmpty(v)) {\n\t\t\treturn v.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n\t\t}\n\t\treturn v;\n\t}\n\n\tpublic static JsonOrText = (str: string): any => {\n\t\tif (str && str.includes && (str.includes('{') || str.includes('['))) {\n\t\t\ttry {\n\t\t\t\treturn JSON.parse(str);\n\t\t\t} catch (e) {\n\t\t\t\treturn str;\n\t\t\t}\n\t\t}\n\t\treturn str || {};\n\t};\n\n\t// public static wsTimeToEpoch = (time: string): number => {\n\t// if (time) {\n\t// return moment.utc(time, \"DD/MM/YYYY HH:mm:ss\").valueOf()\n\t// } else {\n\t// return null\n\t// }\n\t// }\n\n\tpublic static isWithinPeriod = (timestamp: number, period: 'today' | 'thisWeek' | 'thisMonth'): boolean => {\n\t\tconst now = new Date();\n\t\tconst completedDate = new Date(timestamp);\n\n\t\tswitch (period) {\n\t\t\tcase 'today':\n\t\t\t\treturn (\n\t\t\t\t\tnow.getFullYear() === completedDate.getFullYear() &&\n\t\t\t\t\tnow.getMonth() === completedDate.getMonth() &&\n\t\t\t\t\tnow.getDate() === completedDate.getDate()\n\t\t\t\t);\n\t\t\tcase 'thisWeek':\n\t\t\t\tconst startOfWeek = new Date(now);\n\t\t\t\tstartOfWeek.setDate(now.getDate() - now.getDay());\n\t\t\t\tstartOfWeek.setHours(0, 0, 0, 0);\n\n\t\t\t\tconst endOfWeek = new Date(startOfWeek);\n\t\t\t\tendOfWeek.setDate(startOfWeek.getDate() + 6);\n\t\t\t\tendOfWeek.setHours(23, 59, 59, 999);\n\n\t\t\t\treturn completedDate >= startOfWeek && completedDate <= endOfWeek;\n\t\t\tcase 'thisMonth':\n\t\t\t\treturn now.getFullYear() === completedDate.getFullYear() && now.getMonth() === completedDate.getMonth();\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t};\n}\n\nexport { IntUtils };\n","export enum SAWBuyInType {\n\tFree = 1,\n\tPoints = 2,\n\tSpins = 3,\n\tGems = 4,\n\tDiamonds = 5,\n}\n\nexport enum SAWBuyInTypeName {\n\tFree = 'free',\n\tPoints = 'points',\n\tSpins = 'spins',\n\tUnknown = 'unknown',\n\tGems = 'gems',\n\tDiamonds = 'diamonds',\n}\n\n/** @hidden */\nexport const SAWBuyInTypeNamed = (type: SAWBuyInType): SAWBuyInTypeName => {\n\treturn (\n\t\t{\n\t\t\t[SAWBuyInType.Free]: SAWBuyInTypeName.Free,\n\t\t\t[SAWBuyInType.Points]: SAWBuyInTypeName.Points,\n\t\t\t[SAWBuyInType.Spins]: SAWBuyInTypeName.Spins,\n\t\t\t[SAWBuyInType.Gems]: SAWBuyInTypeName.Gems,\n\t\t\t[SAWBuyInType.Diamonds]: SAWBuyInTypeName.Diamonds,\n\t\t}[type] || SAWBuyInTypeName.Unknown\n\t);\n};\n","import { SAWBuyInType } from './SAWBuyInType';\nimport { SAWTemplate } from './SAWTemplate';\n\nclass SAWUtils {\n\tpublic static canPlay = (t: SAWTemplate, user_balances: {ach_points_balance: number, ach_gems_balance: number, ach_diamonds_balance: number}): boolean => {\n\t\tif (t === null || t === undefined) {\n\t\t\treturn false;\n\t\t}\n\n\t\tswitch (t.saw_buyin_type_id) {\n\t\t\tcase SAWBuyInType.Free: {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcase SAWBuyInType.Spins: {\n\t\t\t\treturn t.spin_count !== null && t.spin_count > 0;\n\t\t\t}\n\t\t\tcase SAWBuyInType.Points:\n\t\t\tcase SAWBuyInType.Gems:\n\t\t\tcase SAWBuyInType.Diamonds: {\n\t\t\t\tlet balance = user_balances.ach_points_balance;\n\t\t\t\tif (t.saw_buyin_type_id === SAWBuyInType.Gems) {\n\t\t\t\t\tbalance = user_balances.ach_gems_balance;\n\t\t\t\t} else if (t.saw_buyin_type_id === SAWBuyInType.Diamonds) {\n\t\t\t\t\tbalance = user_balances.ach_diamonds_balance;\n\t\t\t\t}\n\t\t\t\treturn t.buyin_cost_points <= balance;\n\t\t\t}\n\t\t\t\n\t\t\tdefault: {\n\t\t\t\tconsole.error('MiniGamesUtils.canPlay: Unknwon SAW buyin type ' + t.saw_buyin_type_id);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t};\n}\n\nexport { SAWUtils };\n","export enum SAWAcknowledgeType {\n\tSilent = 1,\n\tQuickMessage = 2,\n\tFullMessage = 3,\n\tExplicityAcknowledge = 4\n}\n\nexport enum SAWAcknowledgeTypeName {\n\tSilent = 'silent',\n\tQuickMessage = 'quick-message',\n\tFullMessage = 'full-message',\n\tExplicityAcknowledge = 'explicity-acknowledge'\n}\n\n/** @hidden */\nexport const SAWAcknowledgeTypeNamed = (type: SAWAcknowledgeType): SAWAcknowledgeTypeName => {\n\treturn (\n\t\t{\n\t\t\t[SAWAcknowledgeType.Silent]: SAWAcknowledgeTypeName.Silent,\n\t\t\t[SAWAcknowledgeType.QuickMessage]: SAWAcknowledgeTypeName.QuickMessage,\n\t\t\t[SAWAcknowledgeType.FullMessage]: SAWAcknowledgeTypeName.FullMessage,\n\t\t\t[SAWAcknowledgeType.ExplicityAcknowledge]: SAWAcknowledgeTypeName.ExplicityAcknowledge\n\t\t}[type]\n\t);\n};\n","export enum SAWAskForUsername {\n\tNOASK = 'no-ask',\n\tONSUMBIT = 'on-submit',\n}\n","export enum SAWGameType {\n\tSpinAWheel = 1,\n\tScratchCard = 2,\n\tMatchX = 3,\n\tGiftBox = 4,\n\tPrizeDrop = 5,\n\tQuiz = 6,\n\tLootboxWeekdays = 7,\n\tLootboxCalendarDays = 8,\n\tTreasureHunt = 9,\n\tVoyager = 10,\n\tPlinko = 11,\n\tCoinFlip = 12,\n}\n\nexport enum SAWGameTypeName {\n\tSpinAWheel = 'wheel',\n\tScratchCard = 'scratch',\n\tMatchX = 'matchx',\n\tGiftBox = 'giftbox',\n\tPrizeDrop = 'prizedrop',\n\tQuiz = 'quiz',\n\tLootboxWeekdays = 'lootbox_weekdays',\n\tLootboxCalendarDays = 'lootbox_calendar_days',\n\tTreasureHunt = 'treasure_hunt',\n\tVoyager = 'voyager',\n\tPlinko = 'plinko',\n\tCoinFlip = 'coin_flip',\n\tUnknown = 'unknown',\n}\n\n/** @hidden */\nexport const SAWGameTypeNamed = (type: SAWGameType): SAWGameTypeName => {\n\treturn (\n\t\t{\n\t\t\t[SAWGameType.SpinAWheel]: SAWGameTypeName.SpinAWheel,\n\t\t\t[SAWGameType.ScratchCard]: SAWGameTypeName.ScratchCard,\n\t\t\t[SAWGameType.MatchX]: SAWGameTypeName.MatchX,\n\t\t\t[SAWGameType.GiftBox]: SAWGameTypeName.GiftBox,\n\t\t\t[SAWGameType.PrizeDrop]: SAWGameTypeName.PrizeDrop,\n\t\t\t[SAWGameType.Quiz]: SAWGameTypeName.Quiz,\n\t\t\t[SAWGameType.LootboxWeekdays]: SAWGameTypeName.LootboxWeekdays,\n\t\t\t[SAWGameType.LootboxCalendarDays]: SAWGameTypeName.LootboxCalendarDays,\n\t\t\t[SAWGameType.TreasureHunt]: SAWGameTypeName.TreasureHunt,\n\t\t\t[SAWGameType.Voyager]: SAWGameTypeName.Voyager,\n\t\t\t[SAWGameType.Plinko]: SAWGameTypeName.Plinko,\n\t\t\t[SAWGameType.CoinFlip]: SAWGameTypeName.CoinFlip,\n\t\t}[type] || SAWGameTypeName.Unknown\n\t);\n};\n","export enum SAWExposeUserSpinId {\n UserId = 1,\n SpinId = 2,\n}\n\nexport enum SAWExposeUserSpinIdName {\n UserId = 'userId',\n SpinId = 'spinId',\n}\n\n/** @hidden */\nexport const SAWExposeUserSpinIdNamed = (id: SAWExposeUserSpinId): SAWExposeUserSpinIdName => {\n return (\n {\n [SAWExposeUserSpinId.UserId]: SAWExposeUserSpinIdName.UserId,\n [SAWExposeUserSpinId.SpinId]: SAWExposeUserSpinIdName.SpinId,\n }[id]\n );\n};","export enum SAWGameLayout {\n Horizontal = 1,\n VerticalMap = 2,\n}\n\nexport enum SAWGameLayoutName {\n Horizontal = 'horizontal',\n VerticalMap = 'vertical-map',\n}\n\n/** @hidden */\nexport const SAWGameLayoutNamed = (layout: SAWGameLayout): SAWGameLayoutName => {\n return (\n {\n [SAWGameLayout.Horizontal]: SAWGameLayoutName.Horizontal,\n [SAWGameLayout.VerticalMap]: SAWGameLayoutName.VerticalMap,\n }[layout]\n );\n};","export enum SAWPrizeType {\n\tNO_PRIZE = 1,\n\tPOINTS = 2,\n\tBONUS = 3,\n\tMANUAL = 4,\n\tSPIN = 5,\n\tJACKPOT = 6,\n\tCHANGE_LEVEL = 7,\n\tMISSION = 8,\n\tRAFFLE_TICKET = 9,\n\tGEMS_AND_DIAMONDS = 10,\n}\n\nexport enum MiniGamePrizeTypeName {\n\tNO_PRIZE = 'no-prize',\n\tPOINTS = 'points',\n\tBONUS = 'bonus',\n\tMANUAL = 'manual',\n\tSPIN = 'spin',\n\tJACKPOT = 'jackpot',\n\tCHANGE_LEVEL = 'change-level',\n\tMISSION = 'mission',\n\tRAFFLE_TICKET = 'raffle-ticket',\n\tGEMS_AND_DIAMONDS = 'gems-and-diamonds',\n\tUNKNOWN = 'unknown',\n}\n\n/** @hidden */\nexport const MiniGamePrizeTypeNamed = (type: SAWPrizeType): MiniGamePrizeTypeName => {\n\treturn (\n\t\t{\n\t\t\t[SAWPrizeType.NO_PRIZE]: MiniGamePrizeTypeName.NO_PRIZE,\n\t\t\t[SAWPrizeType.POINTS]: MiniGamePrizeTypeName.POINTS,\n\t\t\t[SAWPrizeType.BONUS]: MiniGamePrizeTypeName.BONUS,\n\t\t\t[SAWPrizeType.MANUAL]: MiniGamePrizeTypeName.MANUAL,\n\t\t\t[SAWPrizeType.SPIN]: MiniGamePrizeTypeName.SPIN,\n\t\t\t[SAWPrizeType.JACKPOT]: MiniGamePrizeTypeName.JACKPOT,\n\t\t\t[SAWPrizeType.CHANGE_LEVEL]: MiniGamePrizeTypeName.CHANGE_LEVEL,\n\t\t\t[SAWPrizeType.MISSION]: MiniGamePrizeTypeName.MISSION,\n\t\t\t[SAWPrizeType.RAFFLE_TICKET]: MiniGamePrizeTypeName.RAFFLE_TICKET,\n\t\t\t[SAWPrizeType.GEMS_AND_DIAMONDS]: MiniGamePrizeTypeName.GEMS_AND_DIAMONDS,\n\t\t}[type] || MiniGamePrizeTypeName.UNKNOWN\n\t);\n};\n","import { IntUtils } from '../IntUtils';\nimport { TMiniGamePrize, TMiniGameTemplate } from '../WSAPI/WSAPITypes';\nimport { ProtocolResponse } from './../Base/ProtocolResponse';\nimport { SAWAcknowledgeTypeNamed } from './SAWAcknowledgeType';\nimport { SAWBuyInType, SAWBuyInTypeNamed } from './SAWBuyInType';\nimport { SAWExposeUserSpinIdNamed } from './SAWExposeUserSpinId';\nimport { SAWGameLayoutNamed } from './SAWGameLayout';\nimport { SAWGameType, SAWGameTypeNamed } from './SAWGameType';\nimport { MiniGamePrizeTypeNamed } from './SAWPrizeType';\nimport { SAWTemplate } from './SAWTemplate';\n\nexport interface SAWGetTemplatesResponse extends ProtocolResponse {\n\ttemplates: SAWTemplate[];\n}\n\nexport const SAWTemplatesTransform = (items: SAWTemplate[]): TMiniGameTemplate[] => {\n\treturn items.map((r) => {\n\t\tconst x: TMiniGameTemplate = {\n\t\t\tid: r.saw_template_id,\n\t\t\tname: r.saw_template_ui_definition.name,\n\t\t\tdescription: r.saw_template_ui_definition.description,\n\t\t\tthumbnail: r.saw_template_ui_definition.thumbnail\n\t\t\t? r.saw_template_ui_definition.thumbnail\n\t\t\t: r.saw_skin_ui_definition?.skin_folder\n\t\t\t\t? `${r.saw_skin_ui_definition.skin_folder}/ico.png`\n\t\t\t\t: `https://d312ucx3huj7iy.cloudfront.net/gf/images/saw/${r.saw_skin_key}/ico.png`,\n\t\t\tvisibile_when_can_spin: r.visibile_when_can_spin,\n\t\t\tover_limit_message: r.saw_template_ui_definition.over_limit_message,\n\t\t\tno_attempts_message: r.saw_template_ui_definition.no_attempts_message,\n\t\t\tjackpot_symbol: r.saw_template_ui_definition.jackpot_symbol,\n\t\t\tsaw_game_type: SAWGameTypeNamed(r.saw_game_type_id),\n\t\t\tsaw_buyin_type: SAWBuyInTypeNamed(r.saw_buyin_type_id),\n\t\t\t...(r.saw_buyin_type_id === SAWBuyInType.Points ? { buyin_cost_points: r.buyin_cost_points } : {}),\n\t\t\t...(r.saw_buyin_type_id === SAWBuyInType.Gems ? { buyin_cost_gems: r.buyin_cost_points } : {}),\n\t\t\t...(r.saw_buyin_type_id === SAWBuyInType.Diamonds ? { buyin_cost_diamonds: r.buyin_cost_points } : {}),\n\t\t\tjackpot_add_on_attempt: r.jackpot_add_on_attempt,\n\t\t\tjackpot_current: r.jackpot_current,\n\t\t\tspin_count: r.spin_count,\n\t\t\tpromo_image: r.saw_template_ui_definition.promo_image,\n\t\t\tpromo_text: r.saw_template_ui_definition.promo_text,\n\t\t\tcustom_data: IntUtils.JsonOrText(r.saw_template_ui_definition.custom_data),\n\t\t\texpose_game_stat_on_api: r.expose_game_stat_on_api,\n\t\t\trelative_period_timezone: r.relative_period_timezone,\n\t\t\tactiveFromDate: r.activeFromDate,\n\t\t\tactiveTillDate: r.activeTillDate,\n\t\t\tnext_available_spin_ts: r.next_available_spin_ts,\n\t\t\tsteps_to_finish_game: r.saw_template_ui_definition.steps_to_finish_game,\n\t\t\tcustom_section_id: r.saw_template_ui_definition.custom_section_id,\n\t\t\tsaw_template_ui_definition: r.saw_template_ui_definition,\n\t\t\t...(r.saw_game_type_id === SAWGameType.LootboxCalendarDays || r.saw_game_type_id === SAWGameType.LootboxWeekdays\n\t\t\t\t? { game_layout: SAWGameLayoutNamed(r.saw_template_ui_definition.game_layout) }\n\t\t\t\t: {}\n\t\t\t),\n\t\t\tshow_prize_history: r.show_prize_history,\n\t\t\tmax_number_of_attempts: r.maxSpinsCount,\n\t\t\tmax_spins_period_ms: r.maxSpinsPediodMs,\n\t\t\t...(r.saw_template_ui_definition.expose_user_spin_id\n\t\t\t\t? { expose_user_spin_id: SAWExposeUserSpinIdNamed(r.saw_template_ui_definition.expose_user_spin_id) } \n\t\t\t\t: {}),\n\n\t\t\tprizes: r.prizes.map((p) => {\n\t\t\t\tconst y: TMiniGamePrize = {\n\t\t\t\t\tid: p.saw_prize_id,\n\t\t\t\t\tname: p.saw_prize_ui_definition.name,\n\t\t\t\t\tprize_type: MiniGamePrizeTypeNamed(p.prize_type_id),\n\t\t\t\t\tprize_value: p.prize_value,\n\t\t\t\t\tfont_size: p.saw_prize_ui_definition.font_size,\n\t\t\t\t\tfont_size_mobile: p.saw_prize_ui_definition.font_size_mobile,\n\t\t\t\t\ticon: p.saw_prize_ui_definition.icon,\n\t\t\t\t\tposition: p.saw_prize_ui_definition.position,\n\t\t\t\t\tsectors: p.saw_prize_ui_definition.sectors,\n\t\t\t\t\tacknowledge_type: SAWAcknowledgeTypeNamed(p.saw_prize_ui_definition.acknowledge_type),\n\t\t\t\t\taknowledge_message: p.saw_prize_ui_definition.aknowledge_message,\n\t\t\t\t\tacknowledge_dp: p.saw_prize_ui_definition.acknowledge_dp,\n\t\t\t\t\tacknowledge_action_title: p.saw_prize_ui_definition.acknowledge_action_title,\n\t\t\t\t\tacknowledge_dp_additional: p.saw_prize_ui_definition.acknowledge_dp_additional,\n\t\t\t\t\tacknowledge_action_title_additional: p.saw_prize_ui_definition.acknowledge_action_title_additional,\n\t\t\t\t\tout_of_stock_message: p.saw_prize_ui_definition.out_of_stock_message,\n\t\t\t\t\tpool: p.pool,\n\t\t\t\t\tpool_initial: p.pool_initial,\n\t\t\t\t\twins_count: p.wins_count,\n\t\t\t\t\tweekdays: p.weekdays,\n\t\t\t\t\tactive_from_ts: p.active_from_ts,\n\t\t\t\t\tactive_till_ts: p.active_till_ts,\n\t\t\t\t\trelative_period_timezone: p.relative_period_timezone,\n\t\t\t\t\tis_surcharge: p.is_surcharge,\n\t\t\t\t\tis_deleted: p.is_deleted,\n\t\t\t\t\tcustom_data: IntUtils.JsonOrText(p.saw_prize_ui_definition?.custom_data),\n\t\t\t\t\tprize_modifiers: p.saw_prize_ui_definition.prize_modifiers,\n\t\t\t\t\tallow_split_decimal: p.saw_prize_ui_definition.allow_split_decimal,\n\t\t\t\t\thide_prize_from_history: p.saw_prize_ui_definition.hide_prize_from_history,\n\t\t\t\t\trequirements_to_get_prize: p.saw_prize_ui_definition.requirements_to_get_prize,\n\t\t\t\t\tmax_give_period_type_id: p.max_give_period_type_id,\n\t\t\t\t};\n\t\t\t\treturn y;\n\t\t\t}),\n\t\t};\n\t\treturn x;\n\t});\n};\n","/*\n * Possible error codes for the mini-games attempts\n */\nexport enum SAWSpinErrorCode {\n\t/** No error */\n\tSAW_OK = 0,\n\t/** User doesn't have 'spin attempts' to play. In case buy in type for the game is 'spins' based */\n\tSAW_NO_SPINS = 40001,\n\t/** The are no prizes left to play the game */\n\tSAW_PRIZE_POOL_EMPTY = 40002,\n\t/** User doesn't have enough points to play. In case buy in type for the game is 'points' based */\n\tSAW_NOT_ENOUGH_POINTS = 40003,\n\t/** User reached max number of game attempts defined in the BackOffice */\n\tSAW_FAILED_MAX_SPINS_REACHED = 40004,\n\t/** User tries to play a template that is restricted by date */\n\tSAW_TEMPLATE_NOT_ACTIVE = 40007,\n\t/** Special code for the 'visitor' mode */\n\tSAW_VISITOR_STOP_SPIN_REQUEST = -40001,\n\t/** User is not in the segment */\n\tSAW_NOT_IN_SEGMENT = 40009,\n\t/** User doesn't have enough gems to play. In case buy in type for the game is 'gems' based */\n\tSAW_NO_BALANCE_GEMS = 40011,\n\t/** User doesn't have enough diamonds to play. In case buy in type for the game is 'diamonds' based */\n\tSAW_NO_BALANCE_DIAMONDS = 40012,\n}\n","export enum SAWWinSoundType {\n\tDisappointing = 1,\n\tPositive = 2,\n\tHighlyPositive = 3,\n\tNoSound = 4,\n\tCustom = 5,\n}\n\nexport const SAWWinSoundFiles = {\n\t[SAWWinSoundType.NoSound]: null,\n\t[SAWWinSoundType.Disappointing]: 'saw-disappointed.m4a',\n\t[SAWWinSoundType.Positive]: 'saw-positive.m4a',\n\t[SAWWinSoundType.HighlyPositive]: 'saw-highly-positive.m4a',\n};\n","import { ProtocolResponse } from \"../SmarticoLib\";\nimport { TSawHistory } from \"../WSAPI/WSAPITypes\";\nimport { SAWTemplate } from \"./SAWTemplate\";\n\nexport interface SAWWinningHistoryResponse extends ProtocolResponse {\n\tprizes: SAWPrizesHistory[];\n\thasMore: boolean;\n}\n\nexport interface SAWPrizesHistory {\n\ttemplate: SAWTemplate,\n\tsaw_template_id: number,\n\tsaw_prize_id: number,\n\tprize_amount: number,\n\tclient_request_id: string,\n\tis_claimed: boolean,\n\tcreate_date_ts: number;\n\tacknowledge_date_ts: number;\n}\n\nexport const SAWHistoryTransform = (items: SAWPrizesHistory[]): TSawHistory[] => {\n\treturn items.map((r) => {\n\t\tconst x: TSawHistory = {\n\t\t\ttemplate: r.template,\n\t\t\tsaw_template_id: r.saw_template_id,\n\t\t\tsaw_prize_id: r.saw_prize_id,\n\t\t\tprize_amount: r.prize_amount,\n\t\t\tclient_request_id: r.client_request_id,\n\t\t\tis_claimed: r.is_claimed,\n\t\t\tcreate_date_ts: r.create_date_ts,\n\t\t\tacknowledge_date_ts: r.acknowledge_date_ts,\n\t\t}\n\t\treturn x;\n\t})\n}\n\n","export enum PrizeModifiers {\n '2x' = 1,\n '5x' = 2,\n '10x' = 3,\n '/2' = 4,\n '/5' = 5,\n '/10' = 6,\n '0x' = 7,\n \"reset\" = 8,\n}\n\nexport const PrizeModifiersKeysNames = {\n [PrizeModifiers['2x']]: '2x',\n [PrizeModifiers['5x']]: '5x',\n [PrizeModifiers['10x']]: '10x',\n [PrizeModifiers['/2']]: '/2',\n [PrizeModifiers['/5']]: '/5',\n [PrizeModifiers['/10']]: '/10',\n [PrizeModifiers['0x']]: '0',\n [PrizeModifiers['reset']]: 'Reset to 0',\n};","export enum SAWWheelLayout {\n Centered = 1,\n LeftAligned = 2,\n RightAligned = 3,\n BottomAligned = 4,\n}","export enum SAWGameDifficultyType {\n\tEASY = 1,\n\tMEDIUM = 2,\n\tHARD = 3,\n}\n\nexport enum SAWGameDifficultyTypeName {\n\tEASY = 'easy',\n\tMEDIUM = 'medium',\n\tHARD = 'hard',\n}\n\n/** @hidden */\nexport const SawGameDifficultyTypeNamed = (type: SAWGameDifficultyType): SAWGameDifficultyTypeName => {\n\treturn (\n\t\t{\n\t\t\t[SAWGameDifficultyType.EASY]: SAWGameDifficultyTypeName.EASY,\n\t\t\t[SAWGameDifficultyType.MEDIUM]: SAWGameDifficultyTypeName.MEDIUM,\n\t\t\t[SAWGameDifficultyType.HARD]: SAWGameDifficultyTypeName.HARD,\n\t\t}[type]\n\t);\n};\n","export enum AttemptPeriodType {\n\tFromLastAttempt = 1,\n\tCalendarDaysUTC = 2,\n\tCalendarDaysUserTimeZone = 3,\n\tLifetime = 4,\n}","class NodeCache {\n\tprivate ttlChecker: NodeJS.Timeout;\n\n\tprivate cache: { [key: string]: any } = {};\n\n\tconstructor() {\t\t\n\t\tif (this.ttlChecker === undefined) {\n\t\t\tthis.ttlChecker = setInterval(() => {\n\t\t\t\tconst now = new Date().getTime();\n\t\t\t\tfor (const key in this.cache) {\n\t\t\t\t\tif (this.cache.hasOwnProperty(key)) {\n\t\t\t\t\t\tconst o = this.cache[key];\n\t\t\t\t\t\tif (o.ttl < now) {\n\t\t\t\t\t\t\tdelete this.cache[key];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, 1000);\n\t\t}\n\t}\n\n\tpublic get(key: string): any {\n\t\tconst o = this.cache[key];\n\t\tif (o !== undefined && o.ttl > new Date().getTime()) {\n\t\t\treturn o.value;\n\t\t}\n\t}\n\n\tpublic set(key: string, value: any, ttlSeconds: number = 60) {\n\t\tthis.cache[key] = {\n\t\t\tvalue,\n\t\t\tttl: new Date().getTime() + ttlSeconds * 1000,\n\t\t};\n\t}\n\n\tpublic remove(key: string) {\n\t\tif (this.cache.hasOwnProperty(key)) {\n\t\t\tdelete this.cache[key];\n\t\t}\n\t}\n\n\tpublic flushAll() {\n\t\tthis.cache = {};\n\t\tif (this.ttlChecker) {\n\t\t\tclearInterval(this.ttlChecker);\n\t\t\tthis.ttlChecker = undefined\n\t\t}\n\t}\n}\n\nexport { NodeCache };\n","import { NodeCache } from './NodeCache';\n\nexport enum ECacheContext {\n\tTranslations,\n\tLabelInfo,\n\tWSAPI,\n}\n\nconst WITH_REF_CACHE = [ECacheContext.Translations];\n\nexport class OCache {\n\tprivate static cache: { [key: string]: NodeCache } = {};\n\n\tprivate static init(cacheContext: ECacheContext) {\n\t\tif (this.cache[cacheContext] === undefined) {\n\t\t\tthis.cache[cacheContext] = new NodeCache();\n\t\t}\n\t}\n\n\tpublic static get<T>(oKey: any, cacheContext: ECacheContext): T | undefined {\n\t\tconst key = cacheContext.toString() + '_' + JSON.stringify(oKey);\n\n\t\tthis.init(cacheContext);\n\n\t\treturn deepClone(this.cache[cacheContext].get(key));\n\t}\n\n\tpublic static set(oKey: any, o: any, cacheContext: ECacheContext, ttlSeconds: number = 60) {\n\t\tconst key = cacheContext.toString() + '_' + JSON.stringify(oKey);\n\n\t\tthis.init(cacheContext);\n\n\t\tthis.cache[cacheContext].set(key, deepClone(o), ttlSeconds);\n\t}\n\n\tpublic static async use<T>(oKey: any, cacheContext: ECacheContext, f: () => Promise<T>, ttlSeconds: number = 60) {\n\t\tif (ttlSeconds <= 0) {\n\t\t\treturn await f();\n\t\t} else {\n\t\t\tlet o: T = OCache.get(oKey, cacheContext);\n\n\t\t\tif (o === undefined) {\n\t\t\t\to = await f();\n\t\t\t\tOCache.set(oKey, o, cacheContext, ttlSeconds);\n\t\t\t}\n\n\t\t\treturn o;\n\t\t}\n\t}\n\n\tpublic static async clear(cacheContext: ECacheContext, oKey: any) {\n\t\tconst key = cacheContext.toString() + '_' + JSON.stringify(oKey);\n\n\t\tif (this.cache[cacheContext]) {\n\t\t\tthis.cache[cacheContext].remove(key);\n\t\t}\n\t}\n\n\tpublic static async clearContext(cacheContext: ECacheContext) {\n\t\tif (this.cache[cacheContext]) {\n\t\t\tthis.cache[cacheContext].flushAll();\n\t\t}\n\t}\n\n\tpublic static async clearAll() {\n\t\tfor (const cacheContext in this.cache) {\n\t\t\tif (this.cache.hasOwnProperty(cacheContext)) {\n\t\t\t\tthis.cache[cacheContext].flushAll();\n\t\t\t}\n\t\t}\n\t\tthis.cache = {};\n\t}\n}\n\nconst deepClone = (o: any) => {\n\tif (o) {\n\t\treturn JSON.parse(JSON.stringify(o));\n\t}\n\n\treturn o;\n};\n","export enum ActivityTypeLimited {\n\tDoNothing = 8,\n\tPoints = 12,\n\tGiveMission = 14,\n\tStartAnotherCampaign = 15,\n\tMiniGameAttempt = 16,\n\tDeductPoints = 21,\n\tResetPoints = 22,\n\tAddGemsAndDiamonds = 25,\n\tDeductGemsAndDiamonds = 26,\n\tResetGemsAndDiamonds = 27,\n\tPopup = 30,\n\tInbox = 31,\n\tSlack = 70,\n\tEmail_To_Customer_Support = 80,\n\tEmail_To_Risk_Operator = 90,\n\tBonus = 100,\n\tWebHook = 200,\n\tTagCustomer = 504,\n\tUnTagCustomer = 505,\n}\n","class CoreUtils {\n\tpublic static avatarUrl = (avatar_id: string, avatarDomain: string): string => {\n\t\tif (\n\t\t\tavatarDomain &&\n\t\t\tavatar_id !== null &&\n\t\t\tavatar_id !== undefined &&\n\t\t\t!(avatar_id.startsWith && avatar_id.startsWith('http'))\n\t\t) {\n\t\t\tif (avatarDomain.endsWith('/')) {\n\t\t\t\treturn avatarDomain.slice(0, -1) + '/avatar/' + avatar_id;\n\t\t\t} else {\n\t\t\t\treturn avatarDomain + '/avatar/' + avatar_id;\n\t\t\t}\n\t\t} else {\n\t\t\treturn avatar_id;\n\t\t}\n\t};\n\n\tpublic static currencySymbol(currency: string) {\n\t\treturn {\n\t\t\t[currency?.toUpperCase()]: currency?.toUpperCase(),\n\t\t\tUSD: '$', // United States Dollar\n\t\t\tEUR: '\\u20AC', // Euro\n\t\t\tJPY: '\\u00A5', // Japanese Yen\n\t\t\tGBP: '\\u00A3', // British Pound Sterling\n\t\t\tAUD: 'A$', // Australian Dollar\n\t\t\tCAD: 'C$', // Canadian Dollar\n\t\t\tCHF: 'CHF', // Swiss Franc\n\t\t\tCNY: '\\u00A5', // Chinese Yuan\n\t\t\tSEK: 'kr', // Swedish Krona\n\t\t\tNZD: 'NZ$', // New Zealand Dollar\n\t\t\tMXN: 'MX$', // Mexican Peso\n\t\t\tSGD: 'S$', // Singapore Dollar\n\t\t\tHKD: 'HK$', // Hong Kong Dollar\n\t\t\tNOK: 'kr', // Norwegian Krone\n\t\t\tKRW: '\\u20A9', // South Korean Won\n\t\t\tTRY: '\\u20BA', // Turkish Lira\n\t\t\tINR: '\\u20B9', // Indian Rupee\n\t\t\tRUB: '\\u20BD', // Russian Ruble\n\t\t\tBRL: 'R$', // Brazilian Real\n\t\t\tZAR: 'R', // South African Rand\n\t\t}[currency?.toUpperCase()];\n\t}\n}\n\nexport { CoreUtils };\n","export enum PublicLabelSettings {\n\tPUBLIC_API_URL = 'PUBLIC_API_URL',\n\tRECORDING_ENABLED_FOR_ALL_USERS = 'RECORDING_ENABLED_FOR_ALL_USERS',\n\tJS_INJECTION = 'JS_INJECTION',\n\tGAMIFICATION_UI_MAIN = 'GAMIFICATION_UI_MAIN',\n\tGAMIFICATION_UI_WIDGET = 'GAMIFICATION_UI_WIDGET',\n\tGAMIFICATION_UI_MINI_GAME = 'GAMIFICATION_UI_MINI_GAME',\n\tGAMIFICATION_UI_SETTINGS = 'GAMIFICATION_UI_SETTINGS',\n\tGAMIFICATION_UI_MAIN_TEST = 'GAMIFICATION_UI_MAIN_TEST',\n\tGAMIFICATION_UI_WIDGET_TEST = 'GAMIFICATION_UI_WIDGET_TEST',\n\tGAMIFICATION_UI_SETTINGS_TEST = 'GAMIFICATION_UI_SETTINGS_TEST',\n\tFRONT_END_ALLOWED_LANGUAGES = 'FRONT_END_ALLOWED_LANGUAGES',\n\tFRONT_END_ALLOW_DOMAINS = 'FRONT_END_ALLOW_DOMAINS',\n\tDELAY_ENGAGEMENT_EXECUTION_ON_LOGIN_MS = 'DELAY_ENGAGEMENT_EXECUTION_ON_LOGIN_MS',\n\tSHADOW_LABEL_PUBLIC_KEY = 'SHADOW_LABEL_PUBLIC_KEY',\n\tDYNAMIC_IMAGE_DOMAIN = 'DYNAMIC_IMAGE_DOMAIN',\n\n\tGAMIFICATION_LEVELS_LOGIC2 = 'GAMIFICATION_LEVELS_LOGIC2',\n\tGAMIFICATION_LEVELS_LOGIC3 = 'GAMIFICATION_LEVELS_LOGIC2',\n\n\tAVATAR_CUSTOM_IMAGE_MAX_ID = 'AVATAR_CUSTOM_IMAGE_MAX_ID',\n\tAVATAR_CUSTOM_IMAGE_FOLDER = 'AVATAR_CUSTOM_IMAGE_FOLDER',\n\n\tGAMIFICATION_SHOW_POWERED_BY = 'GAMIFICATION_SHOW_POWERED_BY',\n\t_system_leader_board_mask_username = '_system_leader_board_mask_username',\n\t_system_gamification_mask_username = '_system_gamification_mask_username',\n\n\tINBOX_PUBLIC_CDN = 'INBOX_PUBLIC_CDN',\n}\n","enum TranslationArea {\n\tCasino = 1,\n\tGamification = 2,\n\tTrading = 3,\n\tArchived = 4,\n\tAffiliation = 5,\n\tRetentionGames = 6,\n\tAffIliateAdminNew = 7,\n\tAcademy = 8,\n}\n\nexport { TranslationArea };\n","import { TInboxMessage } from '../WSAPI/WSAPITypes';\nimport { ProtocolResponse } from '../Base/ProtocolResponse';\nimport { InboxMessage } from './InboxMessage';\n\nexport interface GetInboxMessagesResponse extends ProtocolResponse {\n\tlog: InboxMessage[];\n\tunread_count: number;\n}\n\nexport const InboxMessagesTransform = (items: InboxMessage[]): TInboxMessage[] => {\n\treturn items.map((item) => {\n\t\tconst x: TInboxMessage = {\n\t\t\tsent_date: item.createDate,\n\t\t\tmessage_guid: item.engagement_uid,\n\t\t\tread: item.is_read,\n\t\t\tfavorite: item.is_starred,\n\t\t\tcategory_id: item.category_id,\n\t\t\texpire_on_dt: item.expire_on_dt,\n\t\t};\n\t\treturn x;\n\t});\n};\n","import { IntUtils } from '../IntUtils';\nimport { TInboxMessageBody } from '../WSAPI/WSAPITypes';\nimport { InboxCategories } from './InboxCategories';\nimport { InboxMessageType } from './InboxMessageType';\nimport { OpenLinksType } from './OpenLinksType';\n\nexport interface InboxMessageBody {\n\t// URL or deep-link that neeed to be executed when user clicks on the message\n\taction: string;\n\t// the body of the message in case it's 'simple' inbox message\n\tbody: string;\n\t// type of message, deprecated\n\ttype: InboxMessageType;\n\t// image of the icon\n\timage: string;\n\t// title of the message\n\ttitle: string;\n\t// HTML body of the message in case it's 'rich' inbox message\n\thtml_body: string;\n\t// set of the buttons with text on the button and action that could be URL or deep-link\n\tadditional_buttons?: { inbox_cta_text: string; action: string }[];\n\t// indicator if the message need to be shown when sent and overlay or it should be shown only in the inbox, when user open 'inbox' interface explicitly\n\t// default is 'true'\n\tshow_preview?: boolean;\n\t// duration in seconds for how long to show preview, default is 7 seconds\n\tshow_duration_sec?: number;\n\t// indicator if the image in html_body can be zoomed out\n\t// default is 'false'\n\tenable_zoom_mode?: boolean;\n\t// options that allows to open links in buttons either in new window or in the current one\n\topen_links?: OpenLinksType;\n\t// The custom data of the inbox message defined by operator. Can be a JSON object, string or number\n\tcustom_data?: string;\n}\n\nexport interface InboxMessage {\n\t// date when the message was created\n\tcreateDate: string;\n\t// body of the message according to the interface\n\tbody: InboxMessageBody;\n\t// unique identifier of the message that connects it to the campaign from which it was sent\n\tengagement_uid: string;\n\t// flag that indicates if the message was read by the user\n\tis_read: boolean;\n\t// flag that indicates if the message was marked as favorite by the user\n\tis_starred: boolean;\n\t// flag that indicates if the message was deleted by the user. Such messages are not returned in the response and property is used only internaly in Smartico\n\tis_deleted?: boolean;\n\t// category id of the inbox message, could be categorized as System/Personal/General messages in mentioned tabs\n\tcategory_id?: InboxCategories;\n\t// The epoch timestamp, with milliseconds, when the message is going to be expired \n\texpire_on_dt?: number;\n}\n\nexport const InboxMessageBodyTransform = (item: InboxMessageBody): TInboxMessageBody => {\n\tconst x: TInboxMessageBody = {\n\t\taction: item.action,\n\t\ticon: item.image,\n\t\ttitle: item.title,\n\t\tpreview_body: item.body,\n\t\tcustom_data: IntUtils.JsonOrText(item?.custom_data),\n\t};\n\n\tif (item.action === 'dp:inbox') {\n\t\tif (item.additional_buttons && item.additional_buttons.length) {\n\t\t\tx.buttons = item.additional_buttons.map((b) => ({\n\t\t\t\taction: b.action,\n\t\t\t\ttext: b.inbox_cta_text,\n\t\t\t}));\n\t\t}\n\n\t\tx.html_body = item?.html_body || null;\n\t}\n\n\treturn x;\n};\n","export enum InboxMessageType {\n\tCustom = 0,\n\tMissionCompleted = 1,\n\tMissionUnlocked = 2,\n\tLeaderboardWon = 3,\n\tLevelChanged = 4,\n\tBonusGiven = 5,\n\tPointsAdded = 6,\n\tPointsUsed = 7,\n\tPersonalMessage = 8,\n}\n\n// keep in sync with BO enum\n","export enum OpenLinksType {\n\tNewWindow = 1,\n\tCurrentWindow = 2\n}","export enum InboxCategories {\n General = 0,\n\tPlatform = 1,\n\tPersonal = 2,\n}","export enum InboxReadStatus {\n\tUnreadOnly = 1,\n\tReadOnly = 2,\n}","export enum BuyStoreItemErrorCode {\n\t/** Generic server error / control-group rejection */\n\tSHOP_FAILED_GENERIC = 1,\n\t/** Label mismatch detected before purchase transaction */\n\tSHOP_WRONG_LABEL_PRECHECK = 106,\n\t/** User don't have enough points on balance */\n\tSHOP_NO_BALANCE = 11000,\n\t/** Wrong shop item id */\n\tSHOP_WRONG_LABEL = 11001,\n\t/** Failed to buy bonus item, probably something wrong with the bonus configuration. */\n\tSHOP_FAILED_TO_BUY_BONUS = 11002, // remote product restriction\n\t/** Failed to buy store item because segment conditions are set by operator for specific CRM item */\n\tSHOP_FAILED_TO_BUY_SHOP_ITEM_CONDITION = 11003, // when not visible but trying to buy. shouldn't happen\n\t/** Segment conditions are set by operator for specific CRM item and user not matching to this conditions */\n\tSHOP_FAILED_TO_BUY_SHOP_ITEM_CONDITION_PURSHASE = 11004, // when visible but not matching to purchase segment\n\t/** Failed to buy matching bonus item */\n\tSHOP_FAILED_TO_BUY_MATCHING_BONUS = 11005,\n\t/** Failed to buy item because of limit of max items is reached */\n\tSHOP_FAILED_MAX_BOUGHT_ITEMS_REACHED = 11006,\n\t/** Bonus was issued but a follow-up redemption step failed */\n\tSHOP_FAILED_BONUS_REDEMPTION = 11007,\n\t/** Failed to buy item because no more items are available */\n\tSHOP_FAILED_POOL_EMPTY = 11009,\n\t/** User doesn't have enough gems on balance */\n\tSHOP_NO_BALANCE_GEMS = 11011,\n\t/** User doesn't have enough diamonds on balance */\n\tSHOP_NO_BALANCE_DIAMONDS = 11012,\n\t/** Failed to buy item because of purchase limitation */\n\tSHOP_FAILED_PURCHASE_LIMITATION = 11014,\n\t/** Uncaught server exception */\n\tSHOP_UNEXPECTED_EXCEPTION = 9999,\n}\n","import { TStoreCategory } from '../WSAPI/WSAPITypes';\nimport { StoreCategoryPublicMeta } from './StoreCategoryPublicMeta';\n\nexport interface StoreCategory {\n\tid?: number;\n\tpublicMeta?: StoreCategoryPublicMeta;\n}\n\nexport const StoreCategoryTransform = (items: StoreCategory[]): TStoreCategory[] => {\n\treturn items.map((r) => {\n\t\tconst x: TStoreCategory = {\n\t\t\tid: r.id,\n\t\t\tname: r.publicMeta?.name,\n\t\t\torder: r.publicMeta?.order,\n\t\t};\n\t\treturn x;\n\t});\n};\n","export enum StoreItemPurchaseType {\n Points = 0,\n Gems = 1,\n Diamonds = 2,\n}","export enum StoreItemType {\n\tBonus = 1,\n\tTangible = 2,\n\tMiniGameSpin = 3,\n\tChangeLevel = 4,\n\tPrizeDrop = 5,\n\tRaffleTicket = 6,\n}\n\nexport enum StoreItemTypeName {\n\tBonus = 'bonus',\n\tTangible = 'tangible',\n\tMiniGameSpin = 'minigamespin',\n\tChangeLevel = 'changelevel',\n\tPrizeDrop = 'prizedrop',\n\tRaffleTicket = 'raffleticket',\n\tUnknown = 'unknown',\n}\n\nexport const StoreItemTypeNamed = (type: StoreItemType): StoreItemTypeName => {\n\treturn (\n\t\t{\n\t\t\t[StoreItemType.Bonus]: StoreItemTypeName.Bonus,\n\t\t\t[StoreItemType.Tangible]: StoreItemTypeName.Tangible,\n\t\t\t[StoreItemType.MiniGameSpin]: StoreItemTypeName.MiniGameSpin,\n\t\t\t[StoreItemType.ChangeLevel]: StoreItemTypeName.ChangeLevel,\n\t\t\t[StoreItemType.PrizeDrop]: StoreItemTypeName.PrizeDrop,\n\t\t\t[StoreItemType.RaffleTicket]: StoreItemTypeName.RaffleTicket,\n\t\t}[type] || StoreItemTypeName.Unknown\n\t);\n};\n","import { AchRelatedGame } from '../Base/AchRelatedGame';\nimport { IntUtils } from '../IntUtils';\nimport { TStoreItem } from '../WSAPI/WSAPITypes';\nimport { StoreItemPublicMeta } from './StoreItemPublicMeta';\nimport { StoreItemPurchaseType } from './StoreItemPurchaseType';\nimport { StoreItemType, StoreItemTypeNamed } from './StoreItemType';\n\nexport interface StoreItem {\n\tid: number;\n\titemTypeId: StoreItemType;\n\titemPublicMeta: StoreItemPublicMeta;\n\tcategoryIds?: number[];\n\tcanBuy?: boolean;\n\tshopPool: number;\n\tactiveTillDate?: number;\n\trelatedGames?: AchRelatedGame[];\n}\n\nconst mapPurchaseType = (purchaseType: StoreItemPurchaseType) => {\n\tif (purchaseType === StoreItemPurchaseType.Points) {\n\t\treturn 'points';\n\t} else if (purchaseType === StoreItemPurchaseType.Gems) {\n\t\treturn 'gems';\n\t} else if (purchaseType === StoreItemPurchaseType.Diamonds) {\n\t\treturn 'diamonds';\n\t}\n\n\treturn 'points';\n};\n\nexport const StoreItemTransform = (items: StoreItem[]): TStoreItem[] => {\n\t\n\treturn items\n\t\t.filter((r) => r.id >= 1)\n\t\t.map((r) => {\n\t\t\tconst x: TStoreItem = {\n\t\t\t\tid: r.id,\n\t\t\t\tname: r.itemPublicMeta.name,\n\t\t\t\tpurchase_type: mapPurchaseType(r.itemPublicMeta.purchase_type),\n\t\t\t\tprice: r.itemPublicMeta.price as any as number, // AA: strange why it's string\n\t\t\t\timage: r.itemPublicMeta.image_url,\n\t\t\t\tdescription: r.itemPublicMeta.description,\n\t\t\t\tribbon: r.itemPublicMeta.label_tag === 'custom' ? r.itemPublicMeta.custom_label_tag : r.itemPublicMeta.label_tag,\n\t\t\t\tlimit_message: r.itemPublicMeta.limit_message,\n\t\t\t\tpurchase_limit_message: r.itemPublicMeta.purchase_limit_message,\n\t\t\t\tpriority: r.itemPublicMeta.priority ?? 0,\n\t\t\t\trelated_item_ids: r.itemPublicMeta.related_items,\n\t\t\t\thint_text: r.itemPublicMeta.hint_text,\n\t\t\t\ttype: StoreItemTypeNamed(r.itemTypeId),\n\t\t\t\tcan_buy: r.canBuy,\n\t\t\t\tcategory_ids: r.categoryIds ?? [],\n\t\t\t\tpool: r.shopPool,\n\t\t\t\tcustom_data: IntUtils.JsonOrText(r.itemPublicMeta.custom_data),\n\t\t\t\tactive_till_date: r.activeTillDate,\n\t\t\t\tshow_timer: r.itemPublicMeta.show_timer,\n\t\t\t\tdiscounted_price: r.itemPublicMeta.discount_prize,\n\t\t\t\tdiscount_price_ribbon: r.itemPublicMeta.discount_prize_ribbon,\n\t\t\t\tcustom_ribbon_image: r.itemPublicMeta.custom_ribbon_image,\n\t\t\t\tcustom_section_id: r.itemPublicMeta.custom_section_id,\n\t\t\t\tonly_in_custom_section: r.itemPublicMeta.only_in_custom_section,\n\t\t\t\tcustom_section_type_id: r.itemPublicMeta.custom_section_type_id,\n\t\t\t\t...(r.itemPublicMeta.cant_buy_message ? { cant_buy_message: r.itemPublicMeta.cant_buy_message } : {}),\n\t\t\t\trelated_games: (r.relatedGames?.filter((g) => g.game_public_meta.enabled) || []).map((g, i) => ({\n\t\t\t\t\text_game_id: g.ext_game_id,\n\t\t\t\t\tgame_public_meta: {\n\t\t\t\t\t\tname: g.game_public_meta.name,\n\t\t\t\t\t\tlink: g.game_public_meta.link,\n\t\t\t\t\t\timage: g.game_public_meta.image,\n\t\t\t\t\t\tenabled: g.game_public_meta.enabled,\n\t\t\t\t\t\tgame_categories: g.game_public_meta.game_categories,\n\t\t\t\t\t\tgame_provider: g.game_public_meta.game_provider,\n\t\t\t\t\t\tmobile_spec_link: g.game_public_meta.mobile_spec_link,\n\t\t\t\t\t\tpriority: i + 1,\n\t\t\t\t\t},\n\t\t\t\t})),\n\t\t\t};\n\t\t\treturn x;\n\t\t});\n};\n","import { IntUtils } from '../IntUtils';\nimport { TStoreItem } from '../WSAPI/WSAPITypes';\nimport { StoreItem } from './StoreItem';\nimport { StoreItemPurchaseType } from './StoreItemPurchaseType';\nimport { StoreItemTypeNamed } from './StoreItemType';\n\ninterface StoreItemPurchased extends StoreItem {\n\tpurchase_ts: number;\n\tpurchase_points_amount: number;\n\tpurchased_today?: boolean;\n\tpurchased_this_week?: boolean;\n\tpurchased_this_month?: boolean;\n}\n\nconst mapPurchaseType = (purchaseType: StoreItemPurchaseType) => {\n\tif (purchaseType === StoreItemPurchaseType.Points) {\n\t\treturn 'points';\n\t} else if (purchaseType === StoreItemPurchaseType.Gems) {\n\t\treturn 'gems';\n\t} else if (purchaseType === StoreItemPurchaseType.Diamonds) {\n\t\treturn 'diamonds';\n\t}\n\n\treturn 'points';\n};\n\nexport const StoreItemPurchasedTransform = (items: StoreItemPurchased[]): TStoreItem[] => {\n\treturn items\n\t\t.filter((r) => r.id >= 1)\n\t\t.map((r) => {\n\t\t\tconst purchasedToday = r.purchase_ts ? IntUtils.isWithinPeriod(r.purchase_ts, 'today') : false;\n\t\t\tconst purchasedThisWeek = r.purchase_ts ? IntUtils.isWithinPeriod(r.purchase_ts, 'thisWeek') : false;\n\t\t\tconst purchasedThisMonth = r.purchase_ts ? IntUtils.isWithinPeriod(r.purchase_ts, 'thisMonth') : false;\n\n\t\t\tconst x: TStoreItem = {\n\t\t\t\tid: r.id,\n\t\t\t\tname: r.itemPublicMeta.name,\n\t\t\t\tprice: r.itemPublicMeta.price as any as number, // AA: strange why it's string\n\t\t\t\tpurchase_type: mapPurchaseType(r.itemPublicMeta.purchase_type),\n\t\t\t\timage: r.itemPublicMeta.image_url,\n\t\t\t\tdescription: r.itemPublicMeta.description,\n\t\t\t\tribbon: r.itemPublicMeta.label_tag === 'custom' ? r.itemPublicMeta.custom_label_tag : r.itemPublicMeta.label_tag,\n\t\t\t\tlimit_message: r.itemPublicMeta.limit_message,\n\t\t\t\tpurchase_limit_message: r.itemPublicMeta.purchase_limit_message,\n\t\t\t\tpriority: r.itemPublicMeta.priority ?? 0,\n\t\t\t\trelated_item_ids: r.itemPublicMeta.related_items,\n\t\t\t\thint_text: r.itemPublicMeta.hint_text,\n\t\t\t\ttype: StoreItemTypeNamed(r.itemTypeId),\n\t\t\t\tcan_buy: r.canBuy,\n\t\t\t\tcategory_ids: r.categoryIds ?? [],\n\t\t\t\tpool: r.shopPool,\n\t\t\t\tpurchase_ts: r.purchase_ts,\n\t\t\t\tpurchase_points_amount: r.purchase_points_amount,\n\t\t\t\tpurchased_today: purchasedToday,\n\t\t\t\tpurchased_this_week: purchasedThisWeek,\n\t\t\t\tpurchased_this_month: purchasedThisMonth,\n\t\t\t\tcustom_data: r.itemPublicMeta.custom_data,\n\t\t\t\tshow_timer: r.itemPublicMeta.show_timer,\n\t\t\t\trelated_games: (r.relatedGames?.filter((g) => g.game_public_meta.enabled) || []).map((g, i) => ({\n\t\t\t\t\text_game_id: g.ext_game_id,\n\t\t\t\t\tgame_public_meta: {\n\t\t\t\t\t\tname: g.game_public_meta.name,\n\t\t\t\t\t\tlink: g.game_public_meta.link,\n\t\t\t\t\t\timage: g.game_public_meta.image,\n\t\t\t\t\t\tenabled: g.game_public_meta.enabled,\n\t\t\t\t\t\tgame_categories: g.game_public_meta.game_categories,\n\t\t\t\t\t\tgame_provider: g.game_public_meta.game_provider,\n\t\t\t\t\t\tmobile_spec_link: g.game_public_meta.mobile_spec_link,\n\t\t\t\t\t\tpriority: i + 1,\n\t\t\t\t\t},\n\t\t\t\t})),\n\t\t\t};\n\n\t\t\treturn x;\n\t\t});\n};\n\nexport { StoreItemPurchased };\n","export enum AchievementStatus {\n\tDraft = 1,\n\tAvailableUnlocked = 2,\n\tAvailableLocked = 3,\n\tArchived = 4,\n\tFeaturedManually = 5,\n\tFeaturedAI = 6,\n\tRecurring = 7,\n\tRecurringUponCompletion = 8\n}\n","export enum AchievementTaskType {\n\tCompleteAchievement = 1,\n\tUnlockAchievement = 2,\n}\n","export enum AchievementType {\n\tMission = 1,\n\tBadge = 2,\n}\n","/** Possible statuses of the mission availability. \n * Notes:\n * - Recurring missions have a special field next_recurrence_date_ts, but it's only relevant if the mission has no active till date or the next recurrence date is before the active till date.\n * - For a locked mission or mission that requires opt-in, the time limit should be calculated as dt_start + time_limit_ms. For a mission that does not require opt-in or type is not Locked, it should be the highest value of dt_start and active_from_ts (if defined) + time_limit_ms.\n * */\n\nexport enum AchievementAvailabilityStatus {\n /** Mission without date/time restrictions or with passed active from date and no opt-in required and mission is unlocked */\n Available = 0,\n\n /** Mission without date/time restrictions or with passed active from date, opt-in is required, user is not opted-in or mission is locked */\n AvailableInactive = 1,\n\n /** Mission without date/time restrictions or with passed active from date, opt-in is required, user is opted-in or mission is unlocked*/\n AvailableActive = 2,\n\n /** Mission with active from date defined, date is in future.\n * Field: active_from_ts\n */\n UnavailableWithActiveFrom = 3,\n\n /** Mission with active till date defined, date is in future, and no opt-in required and mission is unlocked.\n * Field: active_till_ts\n */\n AvailableWithActiveTill = 4,\n\n /** Mission with active till date defined, date is in future, and opt-in is required, user is not opted in or mission is locked.\n * Fields: active_till_ts, is_requires_optin, is_opted_in, is_locked.\n */\n AvailableWithActiveTillInactive = 5,\n\n /** Mission with active till date defined, date is in future, and opt-in is required, user is opted in or mission is unlocked.\n * Fields: active_till_ts, is_requires_optin, is_opted_in, is_locked.\n */\n AvailableWithActiveTillActive = 6,\n\n /** Available mission with time limit, and opt-in is required or mission is unlocked.\n * The time limit is calculated as the sum of two properties: (highest value from dt_start and active_from_ts) + time_limit_ms.\n * \n */\n AvailableLimited = 7,\n\n /** Available mission with time limit, opt-in is required, user is not opted-in or mission is locked.\n * Time limit at this stage is not relevant, user should be opted-in or mission should be unlocked.\n */\n AvailableLimitedInactive = 8,\n\n /** Available mission with time limit, opt-in is required, user is opted-in or mission unlocked.\n * The time limit is calculated as the sum of two properties: dt_start + time_limit_ms.\n */\n AvailableLimitedActive = 9,\n\n /** Available mission with time limit and active till date, opt-in is not required and mission is unlocked.\n * Fields: active_till_ts, time_limit_ms, dt_start, active_from_ts;\n * The time limit is calculated as the sum of two properties: (highest value from dt_start and active_from_ts) + time_limit_ms.\n */\n AvailableFullyLimited = 10,\n\n /** Available mission with time limit and active till date, opt-in is required, user is not opted in or mission is locked.\n * Fields: active_till_ts, time_limit_ms, dt_start, active_from_ts, is_requires_optin, is_opted_in, is_locked.\n * On this stage only active_till_ts is relevant. time_limit_ms is ignored because user should be opted in.\n */\n AvailableFullyLimitedInactive = 11,\n\n /** Available mission with time limit and active till date, opt-in is required, user is opted in or mission is unlocked.\n * Fields: active_till_ts, time_limit_ms, dt_start, is_requires_optin, is_opted_in, is_locked.\n * The time limit is calculated as the sum of two properties: dt_start + time_limit_ms.\n */\n AvailableFullyLimitedActive = 12,\n\n /** Missed mission when active till date is already passed. is_completed field indicating if mission is completed or just missed */\n MissedByActiveTill = 13,\n\n /** Missed mission when start_date + time_limit_ms is already passed. is_completed field indicating if mission is completed or just missed */\n MissedByLimitInTime = 14,\n}","export enum BadgesTimeLimitStates {\n\t/** Before Start Date */\n\tBeforeStartDate = 0,\n\t/** After Start Date but before earned */\n\tAfterStartDateNoProgress = 1,\n\t/** After Start Date but before started (no progress) + End date */\n\tAfterStartDateNoProgressAndEndDate = 2,\n\t/** After Start Date, but with some progress + End date */\n\tAfterStartDateWithProgressAndEndDate = 3,\n\t/** After End Date (not started) */\n\tAfterEndDateNotStarted = 4,\n\t/** After End Date (player has some progress, but not completed) */\n\tAfterEndDateWithProgress = 5,\n}\n\n","import { IntUtils } from \"src/IntUtils\";\nimport { AchievementAvailabilityStatus } from \"./AchievementAvailabilityStatus\";\nimport { AchievementStatus } from \"./AchievementStatus\";\nimport { UserAchievement } from \"./UserAchievement\";\nimport { UserAchievementTask } from \"./UserAchievementTask\";\nimport { BadgesTimeLimitStates } from \"./BadgesTimeLimitStates\";\n\ntype UserStateParamsKeys = 'core_fav_game_top3' | 'core_fav_game_type_top3' | 'core_fav_game_provider_top3' | 'core_recommended_deposit_amount' | 'core_recommended_casino_bet_amount';\nconst USER_STATE_PARAMS_KEYS_GAMES: UserStateParamsKeys[] = ['core_fav_game_top3', 'core_fav_game_type_top3', 'core_fav_game_provider_top3'];\nconst USER_STATE_PARAMS_KEYS_BET_AMOUNT: UserStateParamsKeys[] = [\n 'core_recommended_deposit_amount',\n 'core_recommended_casino_bet_amount',\n];\n\nconst MINOR_WORDS = new Set([\n 'of', 'at', 'in', 'on', 'to', 'up', 'as', 'by', 'for',\n 'from', 'into', 'onto', 'with', 'upon', 'via',\n 'and', 'but', 'or', 'nor', 'so', 'yet',\n 'vs', 'v',\n 'a', 'an', 'the',\n]);\n\nfunction toGameTitleCase(raw: string): string {\n if (!raw) return raw;\n const tokens = raw.toLowerCase().split(/(\\b\\w+\\b)/);\n const wordTokens = tokens.filter((t) => /^\\w+$/.test(t));\n const lastWordIdx = wordTokens.length - 1;\n let wordIndex = 0;\n return tokens\n .map((token) => {\n if (!/^\\w+$/.test(token)) return token;\n const isFirst = wordIndex === 0;\n const isLast = wordIndex === lastWordIdx;\n wordIndex++;\n if (isFirst || isLast || !MINOR_WORDS.has(token)) {\n return token.charAt(0).toUpperCase() + token.slice(1);\n }\n return token;\n })\n .join('');\n}\n\nexport class MissionUtils {\n\n public static getAvailabilityStatus = (mission: UserAchievement) => {\n\n if (!mission) {\n return null;\n }\n\n const activeFrom = mission.active_from_ts ? MissionUtils.getMs(mission.active_from_ts) : null\n const activeTill = mission.active_till_ts ? MissionUtils.getMs(mission.active_till_ts) : null;\n const startDate = mission.start_date_ts ? MissionUtils.getMs(mission.start_date_ts) : null;\n const timeLimit = mission.time_limit_ms;\n const requiresOptIn = mission.requiresOptin;\n const optedIn = mission.isOptedIn;\n const isLockedMission = mission.ach_status_id === AchievementStatus.AvailableLocked;\n const isLocked = mission.isLocked;\n\n if (!activeFrom && !activeTill && !timeLimit) {\n if (requiresOptIn) {\n if (optedIn) {\n return AchievementAvailabilityStatus.AvailableActive;\n } else {\n return AchievementAvailabilityStatus.AvailableInactive;\n }\n } else if (isLockedMission) {\n if (!isLocked) {\n return AchievementAvailabilityStatus.AvailableActive;\n } else {\n return AchievementAvailabilityStatus.AvailableInactive;\n }\n } else {\n return AchievementAvailabilityStatus.Available;\n }\n }\n\n if (activeFrom && activeFrom > Date.now()) {\n return AchievementAvailabilityStatus.UnavailableWithActiveFrom;\n }\n\n if ((activeFrom && activeFrom < Date.now()) || !activeFrom) {\n if (!activeTill && !timeLimit) {\n if (requiresOptIn) {\n if (optedIn) {\n return AchievementAvailabilityStatus.AvailableActive;\n } else {\n return AchievementAvailabilityStatus.AvailableInactive;\n }\n } else if (isLockedMission) {\n if (!isLocked) {\n return AchievementAvailabilityStatus.AvailableActive;\n } else {\n return AchievementAvailabilityStatus.AvailableInactive;\n }\n } else {\n return AchievementAvailabilityStatus.Available;\n }\n }\n\n if (activeTill && !timeLimit) {\n if (activeTill > Date.now()) {\n if (requiresOptIn) {\n if (optedIn) {\n return AchievementAvailabilityStatus.AvailableWithActiveTillActive;\n } else {\n return AchievementAvailabilityStatus.AvailableWithActiveTillInactive;\n }\n } else if (isLockedMission) {\n if (!isLocked) {\n return AchievementAvailabilityStatus.AvailableWithActiveTillActive;\n } else {\n return AchievementAvailabilityStatus.AvailableWithActiveTillInactive;\n }\n } else {\n return AchievementAvailabilityStatus.AvailableWithActiveTill;\n }\n } else {\n return AchievementAvailabilityStatus.MissedByActiveTill;\n }\n }\n\n if (timeLimit && !activeTill) {\n if (requiresOptIn) {\n const endDate = startDate + timeLimit;\n\n if (optedIn) {\n if (endDate > Date.now()) {\n return AchievementAvailabilityStatus.AvailableLimitedActive;\n } else {\n return AchievementAvailabilityStatus.MissedByLimitInTime;\n }\n } else {\n return AchievementAvailabilityStatus.AvailableLimitedInactive;\n }\n } else if (isLockedMission) {\n const endDate = startDate + timeLimit;\n\n if (!isLocked) {\n if (endDate > Date.now()) {\n return AchievementAvailabilityStatus.AvailableLimitedActive;\n } else {\n return AchievementAvailabilityStatus.MissedByLimitInTime;\n }\n } else {\n return AchievementAvailabilityStatus.AvailableLimitedInactive;\n }\n } else {\n const endDate = activeFrom && activeFrom > startDate ? activeFrom + timeLimit : startDate + timeLimit;\n\n if (endDate > Date.now()) {\n return AchievementAvailabilityStatus.AvailableLimited;\n } else {\n return AchievementAvailabilityStatus.MissedByLimitInTime;\n }\n }\n }\n\n if (timeLimit && activeTill) {\n if (activeTill > Date.now()) {\n if (requiresOptIn) {\n if (optedIn) {\n const endDate = startDate + timeLimit;\n\n if (endDate > Date.now()) {\n return AchievementAvailabilityStatus.AvailableFullyLimitedActive;\n } else {\n return AchievementAvailabilityStatus.MissedByLimitInTime;\n }\n } else {\n return AchievementAvailabilityStatus.AvailableFullyLimitedInactive;\n }\n } else if (isLockedMission) {\n if (!isLocked) {\n const endDate = startDate + timeLimit;\n\n if (endDate > Date.now()) {\n return AchievementAvailabilityStatus.AvailableFullyLimitedActive;\n } else {\n return AchievementAvailabilityStatus.MissedByLimitInTime;\n }\n } else {\n return AchievementAvailabilityStatus.AvailableFullyLimitedInactive;\n }\n } else {\n const endDate = activeFrom && activeFrom > startDate ? activeFrom + timeLimit : startDate + timeLimit;\n\n if (endDate > Date.now()) {\n return AchievementAvailabilityStatus.AvailableFullyLimited;\n } else {\n return AchievementAvailabilityStatus.MissedByLimitInTime;\n }\n }\n } else {\n return AchievementAvailabilityStatus.MissedByActiveTill;\n }\n }\n }\n }\n\n public static getMs = (ts: number): number => {\n return new Date(ts).getTime();\n }\n\n public static replaceTagsFavMissionTask = ({ task, valueToReplace, currencySymbol }: { task: UserAchievementTask, valueToReplace: string, currencySymbol?: string }): string => {\n let result = valueToReplace || '';\n\n if (!task) {\n return result;\n }\n\n const userStateParams = (task.user_state_params || {});\n const userStateOperator = task.task_public_meta?.user_state_operations;\n const userStateParamsKeys = Object.keys(userStateParams);\n\n if (userStateParamsKeys.length === 0 || !userStateOperator) {\n return result;\n }\n\n const operatorsMulti = ['has', '!has'];\n const operatorsPos = ['pos1', 'pos2', 'pos3'];\n\n let suggestedGames: string = '';\n let suggestedValue: string = '';\n\n userStateParamsKeys.forEach((k: UserStateParamsKeys) => {\n const operator = userStateOperator[k]?.op;\n\n if (USER_STATE_PARAMS_KEYS_GAMES.includes(k)) {\n if (operatorsMulti.includes(operator)) {\n const value = userStateParams[k]?.filter(v => Boolean(v));\n if (value && value.length > 0) {\n suggestedGames = value.map((v: string) => {\n const cleaned = v.replace(/_/g, ' ');\n return toGameTitleCase(cleaned);\n }).join(', ');\n }\n }\n\n if (operatorsPos.includes(operator)) {\n const value = userStateParams[k];\n const pos = Number(operator.replace('pos', '')) - 1;\n\n if (IntUtils.isNotNull(pos) && value && value[pos]) {\n suggestedGames = value[pos];\n\n if (suggestedGames) {\n suggestedGames = toGameTitleCase(suggestedGames.replace(/_/g, ' '));\n }\n\n }\n }\n }\n\n if (USER_STATE_PARAMS_KEYS_BET_AMOUNT.includes(k)) { \n suggestedValue = userStateParams[k];\n\n if (suggestedValue) {\n const currencyFromTheTask = userStateParams?.core_wallet_currency;\n\n suggestedValue = `${suggestedValue} ${currencySymbol || currencyFromTheTask || ''}`;\n }\n }\n });\n\n if (suggestedGames && result) {\n result = result.replace('{{suggested_games}}', suggestedGames);\n }\n\n if (suggestedValue && result) {\n result = result.replace('{{suggested_value}}', suggestedValue);\n }\n\n return result;\n }\n\n public static replaceFavGameNameTag = ({ task, currencySymbol }: { task: UserAchievementTask, currencySymbol?: string }): UserAchievementTask => {\n if (task && task.task_public_meta && task.task_public_meta.name) {\n task.task_public_meta.name = MissionUtils.replaceTagsFavMissionTask({ task, valueToReplace: task.task_public_meta.name, currencySymbol });\n }\n\n return task;\n }\n\n public static determineBadgeState = (badge: UserAchievement): BadgesTimeLimitStates | null => {\n const now = Date.now();\n const { active_from_ts, active_till_ts, progress, isCompleted, complete_date_ts } = badge;\n\n // If badge is completed before active till date, return null\n if (isCompleted && (!active_till_ts || complete_date_ts < active_till_ts)) {\n return null;\n }\n \n // 1. BEFORE START\n if (active_from_ts > now) {\n return BadgesTimeLimitStates.BeforeStartDate;\n }\n \n // 2. AFTER START, NO END DATE (infinite badge)\n // → grey, no locked, no date chip\n if (!active_till_ts) {\n if (progress === 0) {\n return BadgesTimeLimitStates.AfterStartDateNoProgress;\n }\n // If infinite and with progress → this state does not exist in enum\n // (but if needed we can add one)\n }\n \n // 3. AFTER START, BEFORE END DATE\n if (now < active_till_ts) {\n if (progress === 0) {\n // now < end + has end date → must show chip\n return BadgesTimeLimitStates.AfterStartDateNoProgressAndEndDate;\n }\n \n return BadgesTimeLimitStates.AfterStartDateWithProgressAndEndDate;\n }\n \n // 4. AFTER END DATE\n if (progress === 0) {\n return BadgesTimeLimitStates.AfterEndDateNotStarted;\n }\n \n return BadgesTimeLimitStates.AfterEndDateWithProgress;\n }\n}\n","import { AchRelatedGame } from '../Base/AchRelatedGame';\nimport { IntUtils } from '../IntUtils';\nimport { TMissionOrBadge } from '../WSAPI/WSAPITypes';\nimport { AchievementPublicMeta } from './AchievementPublicMeta';\nimport { AchievementStatus } from './AchievementStatus';\nimport { AchievementTaskType } from './AchievementTaskType';\nimport { AchievementType } from './AchievementType';\nimport { MissionUtils } from './MissionsUtils';\nimport { ScheduledMissionType } from './ScheduledMissionType';\nimport { UserAchievementTask } from './UserAchievementTask';\nimport { BadgesTimeLimitStates } from './BadgesTimeLimitStates';\nimport { AchievementClaimPeriodTypeId } from './AchievementClaimTypeId';\n\nexport interface UserAchievement {\n\tach_id?: number;\n\tach_type_id?: AchievementType;\n\tach_public_meta?: AchievementPublicMeta;\n\tisCompleted?: boolean;\n\tisLocked?: boolean;\n\trequiresOptin?: boolean;\n\tisOptedIn?: boolean;\n\tstart_date?: string; // time when mission unlocked or opted-in. Needed to calculated \"remaining time\" in case time_limit_ms is set\n\tstart_date_ts?: number;\n\ttime_limit_ms?: number;\n\tprogress?: number;\n\tcomplete_date?: string;\n\tcomplete_date_ts?: number;\n\tunlock_date?: string;\n\tmilliseconds_till_available?: number;\n\tcompleted_tasks?: number;\n\tachievementTasks?: UserAchievementTask[];\n\tnext_recurrence_date_ts?: number;\n\tach_status_id?: AchievementStatus;\n\tscheduledMissionType?: ScheduledMissionType;\n\trelated_games?: AchRelatedGame[];\n\tactive_from_ts?: number; // indicates when 'scheduled' mission is active from,\n\tactive_till_ts?: number; // indicates when 'scheduled' mission is active till,\n\tach_categories?: number[];\n\trecurring_quantity?: number; // max completion count for Recurring upon completion\n\tcompleted_count?: number; // completion count for Recurring upon completion\n\n\tach_completed_id?: number; // ID of the completion fact from ach_completed or ach_completed_recurring tables\n\trequires_prize_claim?: boolean; // flag from achievement if the mission prize will be given only after user claims it\n\tprize_claimed_date_ts?: number; // the date/timestamp indicating when the prize was claimed by the user\n\n\tcompleted_today?: boolean;\n\tcompleted_this_week?: boolean;\n\tcompleted_this_month?: boolean;\n\tcustom_section_type_id?: number;\n\tbadgeTimeLimitState?: BadgesTimeLimitStates;\n\tprize_claim_expiration_date?: number;\n\tprize_claim_period_type_id?: AchievementClaimPeriodTypeId;\n}\n\nexport const enrichUserAchievementsWithBadgeState = (items: UserAchievement[]): UserAchievement[] => {\n\treturn items.map((item) => {\n\t\tif (item.ach_type_id === AchievementType.Badge && (item.active_from_ts || item.active_till_ts)) {\n\t\t\titem.badgeTimeLimitState = MissionUtils.determineBadgeState(item);\n\t\t}\n\t\treturn item;\n\t});\n};\n\nexport const UserAchievementTransform = (items: UserAchievement[]): TMissionOrBadge[] => {\n\treturn items\n\t\t.filter((r) => r.ach_id >= 1)\n\t\t.map((r) => {\n\t\t\tconst completedToday = r.complete_date_ts ? IntUtils.isWithinPeriod(r.complete_date_ts, 'today') : false;\n\t\t\tconst completedThisWeek = r.complete_date_ts ? IntUtils.isWithinPeriod(r.complete_date_ts, 'thisWeek') : false;\n\t\t\tconst completedThisMonth = r.complete_date_ts ? IntUtils.isWithinPeriod(r.complete_date_ts, 'thisMonth') : false;\n\n\t\t\tlet missionName = r.ach_public_meta.name;\n\t\t\tlet missionSubHeader = r.ach_public_meta.sub_header;\n\t\t\tlet missionDescription = r.ach_public_meta.description;\n\n\t\t\tif (missionName?.includes('{{suggested_') || missionSubHeader?.includes('{{suggested_') || missionDescription?.includes('{{suggested_')) {\n\t\t\t\tr.achievementTasks.forEach(t => {\n\t\t\t\t\tif (r.ach_public_meta.name?.includes('{{suggested_')) {\n\t\t\t\t\t\tmissionName = MissionUtils.replaceTagsFavMissionTask({ task: t, valueToReplace: r.ach_public_meta.name });\n\t\t\t\t\t}\n\t\t\t\t\tif (r.ach_public_meta.sub_header?.includes('{{suggested_')) {\n\t\t\t\t\t\tmissionSubHeader = MissionUtils.replaceTagsFavMissionTask({ task: t, valueToReplace: r.ach_public_meta.sub_header });\n\t\t\t\t\t}\n\t\t\t\t\tif (r.ach_public_meta.description?.includes('{{suggested_')) {\n\t\t\t\t\t\tmissionDescription = MissionUtils.replaceTagsFavMissionTask({ task: t, valueToReplace: r.ach_public_meta.description });\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst x: TMissionOrBadge = {\n\t\t\t\tid: r.ach_id,\n\t\t\t\tname: missionName,\n\t\t\t\tsub_header: missionSubHeader,\n\t\t\t\tdescription: missionDescription,\n\t\t\t\thint_text: r.ach_public_meta.hint_text,\n\t\t\t\tunlock_mission_description: r.ach_public_meta.unlock_mission_description,\n\t\t\t\timage: r.ach_public_meta.image_url,\n\t\t\t\tis_completed: r.isCompleted,\n\t\t\t\tis_locked: r.isLocked,\n\t\t\t\tis_requires_optin: r.requiresOptin,\n\t\t\t\tis_opted_in: r.isOptedIn,\n\t\t\t\ttime_limit_ms: r.time_limit_ms,\n\t\t\t\tactive_from_ts: r.active_from_ts,\n\t\t\t\tactive_till_ts: r.active_till_ts,\n\t\t\t\tdt_start: r.start_date_ts,\n\t\t\t\treward: r.ach_public_meta.reward,\n\t\t\t\tprogress: r.progress,\n\t\t\t\ttype: r.ach_type_id === AchievementType.Mission ? 'mission' : 'badge',\n\t\t\t\tcta_action: r.ach_public_meta.cta_action,\n\t\t\t\tcta_text: r.ach_public_meta.cta_text,\n\t\t\t\tcustom_section_id: r.ach_public_meta.custom_section_id,\n\t\t\t\tonly_in_custom_section: r.ach_public_meta.only_in_custom_section,\n\t\t\t\tcustom_data: IntUtils.JsonOrText(r.ach_public_meta.custom_data),\n\t\t\t\tposition: r.ach_public_meta.position,\n\t\t\t\tribbon:\n\t\t\t\t\tr.ach_public_meta.label_tag === 'custom' ? r.ach_public_meta.custom_label_tag : r.ach_public_meta.label_tag,\n\t\t\t\ttasks: (r.achievementTasks || [])\n\t\t\t\t\t.filter((t) => t.task_type_id === AchievementTaskType.CompleteAchievement)\n\t\t\t\t\t.map((t) => {\n\t\t\t\t\t\tMissionUtils.replaceFavGameNameTag({ task: t });\n\n\t\t\t\t\t\treturn ({\n\t\t\t\t\t\t\tid: t.task_id,\n\t\t\t\t\t\t\tname: t.task_public_meta?.name,\n\t\t\t\t\t\t\tpoints_reward: t.points_reward,\n\t\t\t\t\t\t\tis_completed: t.isCompleted,\n\t\t\t\t\t\t\tprogress: t.userProgress,\n\t\t\t\t\t\t\texecution_count_expected: t.executionCount,\n\t\t\t\t\t\t\texecution_count_actual: t.userExecutedCount,\n\t\t\t\t\t\t\tdisplay_progress_as_count: t.task_public_meta.display_progress_as_count,\n\t\t\t\t\t\t\tstage_image: t.task_public_meta.stage_image,\n\t\t\t\t\t\t})\n\t\t\t\t\t}),\n\t\t\t\trelated_games: (r.related_games || []).map((g, i) => ({\n\t\t\t\t\text_game_id: g.ext_game_id,\n\t\t\t\t\tgame_public_meta: {\n\t\t\t\t\t\tname: g.game_public_meta.name,\n\t\t\t\t\t\tlink: g.game_public_meta.link,\n\t\t\t\t\t\timage: g.game_public_meta.image,\n\t\t\t\t\t\tenabled: g.game_public_meta.enabled,\n\t\t\t\t\t\tgame_categories: g.game_public_meta.game_categories,\n\t\t\t\t\t\tgame_provider: g.game_public_meta.game_provider,\n\t\t\t\t\t\tmobile_spec_link: g.game_public_meta.mobile_spec_link,\n\t\t\t\t\t\tpriority: i + 1,\n\t\t\t\t\t},\n\t\t\t\t})),\n\t\t\t\tcategory_ids: r.ach_categories ?? [],\n\t\t\t\tach_completed_id: r.ach_completed_id,\n\t\t\t\trequires_prize_claim: r.requires_prize_claim,\n\t\t\t\tprize_claimed_date_ts: r.prize_claimed_date_ts,\n\t\t\t\tcomplete_date: r.complete_date,\n\t\t\t\tcomplete_date_ts: r.complete_date_ts,\n\t\t\t\tcompleted_today: completedToday,\n\t\t\t\tcompleted_this_week: completedThisWeek,\n\t\t\t\tcompleted_this_month: completedThisMonth,\n\t\t\t\tcustom_section_type_id: r.ach_public_meta.custom_section_type_id,\n\t\t\t\tavailability_status: MissionUtils.getAvailabilityStatus(r),\n\t\t\t\tclaim_button_title: r.ach_public_meta.claim_button_title,\n\t\t\t\tclaim_button_action: r.ach_public_meta.claim_button_action,\n\t\t\t\tbadgeTimeLimitState: r.badgeTimeLimitState,\n\t\t\t\thide_locked_mission: r.ach_public_meta.hide_locked_mission,\n\t\t\t\tprize_claim_expiration_date: r.prize_claim_expiration_date,\n\t\t\t\tprize_claim_period_type_id: r.prize_claim_period_type_id,\n\t\t\t};\n\n\t\t\tif (r.ach_status_id === AchievementStatus.Recurring) {\n\t\t\t\tx.next_recurrence_date_ts = Date.now() + r?.milliseconds_till_available;\n\t\t\t}\n\n\t\t\tif (r.ach_status_id === AchievementStatus.RecurringUponCompletion) {\n\t\t\t\tx.completion_count = r.completed_count;\n\t\t\t\tx.max_completion_count = r.recurring_quantity;\n\t\t\t}\n\t\t\treturn x;\n\t\t});\n};\n","export enum ScheduledMissionType {\n\tFuture = 1,\n\tPast = 2,\n\tPresent = 3,\n}\n","import { TAchCategory } from '../WSAPI/WSAPITypes';\nimport { AchCategoryPublicMeta } from './AchCategoryPublicMeta';\n\nexport interface AchCategory {\n\tid?: number;\n\tpublicMeta?: AchCategoryPublicMeta;\n}\n\nexport const AchCategoryTransform = (items: AchCategory[]): TAchCategory[] => {\n\treturn items.map((r) => {\n\t\tconst x: TAchCategory = {\n\t\t\tid: r.id,\n\t\t\tname: r.publicMeta?.name,\n\t\t\torder: r.publicMeta?.order,\n\t\t};\n\t\treturn x;\n\t});\n};\n","export enum MissionCategory {\n\tOverview,\n\t// fake category for custom section overview missions, using in TSMap.to get correct missions\n\tCustomSectionOverview,\n\tAvailable,\n\tLocked,\n\tCompleted,\n\tMissed,\n}","export enum AchievementClaimPeriodTypeId {\n\tRelativePeriod = 0,\n\tExactPeriod = 1,\n}","import { ProtocolResponse } from '../Base/ProtocolResponse';\n\nexport interface ClanTournamentPlayerRaw {\n\tuserId: number;\n\tcleanExtUserId: string;\n\tuserAltName: string;\n\tavatar_id: string;\n\tavatar_real_id: number;\n\tposition: number;\n\tscores: number;\n\tisMe: boolean;\n\tregistration_status?: number;\n\tcrmBrandId?: number;\n\tavatar_url?: string;\n}\n\nexport interface GetClanTournamentPlayersResponse extends ProtocolResponse {\n\tclan_id: number;\n\tclan_public_meta: { name: string; image_url: string };\n\tplayers: ClanTournamentPlayerRaw[];\n}\n\nexport interface TClanTournamentPlayer {\n\tuser_id: number;\n\tclean_ext_user_id: string;\n\tpublic_username: string;\n\tavatar_id: string;\n\tavatar_real_id: number;\n\tavatar_url?: string;\n\tposition: number;\n\tscores: number;\n\tis_me: boolean;\n}\n\nexport interface TClanTournamentPlayersResult {\n\tclan_id: number;\n\tclan_public_meta: { name: string; image_url: string };\n\tplayers: TClanTournamentPlayer[];\n}\n\nexport const clanTournamentPlayersTransform = (response: GetClanTournamentPlayersResponse): TClanTournamentPlayersResult => {\n\treturn {\n\t\tclan_id: response.clan_id,\n\t\tclan_public_meta: {\n\t\t\tname: response.clan_public_meta.name,\n\t\t\timage_url: response.clan_public_meta.image_url,\n\t\t},\n\t\tplayers: (response.players || []).map((p) => ({\n\t\t\tuser_id: p.userId,\n\t\t\tclean_ext_user_id: p.cleanExtUserId,\n\t\t\tpublic_username: p.userAltName,\n\t\t\tavatar_id: p.avatar_id,\n\t\t\tavatar_real_id: p.avatar_real_id,\n\t\t\tavatar_url: p.avatar_url,\n\t\t\tposition: p.position,\n\t\t\tscores: p.scores,\n\t\t\tis_me: p.isMe,\n\t\t})),\n\t};\n};\n","export enum TournamentRegistrationType {\n\tAUTO = 1,\n\tOPT_IN = 2,\n\tBUY_IN_POINTS = 3,\n\tMANUAL_APPROVAL = 4,\n\tREQUIRES_QUALIFICATION = 5,\n\tBUY_IN_GEMS = 6,\n\tBUY_IN_DIAMONDS = 7,\n\t// BUY_IN_CASH = 5???,\n}\n\nexport type TournamentRegistrationTypeName =\n\t| 'AUTO'\n\t| 'OPT_IN'\n\t| 'BUY_IN_POINTS'\n\t| 'MANUAL_APPROVAL'\n\t| 'REQUIRES_QUALIFICATION'\n\t| 'BUY_IN_GEMS'\n\t| 'BUY_IN_DIAMONDS'\n\t| 'UNKNOWN';\n\n/** @hidden */\nexport const TournamentRegistrationTypeGetName = (type: TournamentRegistrationType): TournamentRegistrationTypeName => {\n\treturn ({\n\t\t[TournamentRegistrationType.AUTO]: 'AUTO',\n\t\t[TournamentRegistrationType.BUY_IN_POINTS]: 'BUY_IN_POINTS',\n\t\t[TournamentRegistrationType.MANUAL_APPROVAL]: 'MANUAL_APPROVAL',\n\t\t[TournamentRegistrationType.OPT_IN]: 'OPT_IN',\n\t\t[TournamentRegistrationType.REQUIRES_QUALIFICATION]: 'REQUIRES_QUALIFICATION',\n\t\t[TournamentRegistrationType.BUY_IN_GEMS]: 'BUY_IN_GEMS',\n\t\t[TournamentRegistrationType.BUY_IN_DIAMONDS]: 'BUY_IN_DIAMONDS',\n\t}[type] || 'UNKNOWN') as any as TournamentRegistrationTypeName;\n};\n","export enum TournamentRegistrationStatus {\n\tNOT_REGISTERED = 0,\n\tREGISTERED = 1,\n\tFINISHED = 2,\n\tPENDING = 3,\n\tCANCELLED = 4,\n\tREGISTERED_PENDING_QUALIFICATION = 5,\n\tQUALIFIED_PENDING_REGISTRATION = 6,\n}\n\nexport enum TournamentRegistrationStatusName {\n\tNOT_REGISTERED = 'NOT_REGISTERED',\n\tREGISTERED = 'REGISTERED',\n\tFINISHED = 'FINISHED',\n\tPENDING = 'PENDING',\n\tCANCELLED = 'CANCELLED',\n\tREGISTERED_PENDING_QUALIFICATION = 'REGISTERED_PENDING_QUALIFICATION',\n\tQUALIFIED_PENDING_REGISTRATION = 'QUALIFIED_PENDING_REGISTRATION',\n\tUNKNOWN = 'UNKNOWN',\n}\n\n/** @hidden */\nexport const TournamentRegistrationStatusNamed = (type: TournamentRegistrationStatus): TournamentRegistrationStatusName => {\n\treturn ({\n\t\t[TournamentRegistrationStatus.CANCELLED]: TournamentRegistrationStatusName.CANCELLED,\n\t\t[TournamentRegistrationStatus.FINISHED]: TournamentRegistrationStatusName.FINISHED,\n\t\t[TournamentRegistrationStatus.NOT_REGISTERED]: TournamentRegistrationStatusName.NOT_REGISTERED,\n\t\t[TournamentRegistrationStatus.PENDING]: TournamentRegistrationStatusName.PENDING,\n\t\t[TournamentRegistrationStatus.QUALIFIED_PENDING_REGISTRATION]:\n\t\t\tTournamentRegistrationStatusName.QUALIFIED_PENDING_REGISTRATION,\n\t\t[TournamentRegistrationStatus.REGISTERED]: TournamentRegistrationStatusName.REGISTERED,\n\t\t[TournamentRegistrationStatus.REGISTERED_PENDING_QUALIFICATION]:\n\t\t\tTournamentRegistrationStatusName.REGISTERED_PENDING_QUALIFICATION,\n\t}[type] || TournamentRegistrationStatusName.UNKNOWN) as TournamentRegistrationStatusName;\n};\n","export enum TournamentInstanceStatus {\n\tPUBLISHED = 1,\n\tREGISTER = 2,\n\tSTARTED = 3,\n\tFINISHED = 4,\n\tCANCELLED = 5,\n\tFAILED = 6,\n\tFINALIZING = 7,\n}\n\nexport const TournamentInstanceStatusName = (s: TournamentInstanceStatus): string => {\n\treturn {\n\t\t[TournamentInstanceStatus.PUBLISHED]: 'PUBLISHED',\n\t\t[TournamentInstanceStatus.REGISTER]: 'REGISTER',\n\t\t[TournamentInstanceStatus.STARTED]: 'STARTED',\n\t\t[TournamentInstanceStatus.FINISHED]: 'FINISHED',\n\t\t[TournamentInstanceStatus.CANCELLED]: 'CANCELLED',\n\t\t[TournamentInstanceStatus.FAILED]: 'FAILED',\n\t\t[TournamentInstanceStatus.FINALIZING]: 'FINALIZING',\n\t}[s];\n};\n","import { ActivityTypeLimited } from '../Core';\nimport { Tournament } from './Tournament';\nimport { TournamentInstanceStatus } from './TournamentInstanceStatus';\nimport { TournamentPlayer } from './TournamentPlayer';\nimport { TournamentPrize } from './TournamentPrize';\nimport { TournamentRegistrationStatus } from './TournamentRegistrationStatus';\nimport { TournamentRegistrationType } from './TournamentRegistrationType';\n\nconst tournamentPrizeTypeToPrizeName = (type: ActivityTypeLimited) => {\n\treturn {\n\t\t[ActivityTypeLimited.DoNothing]: 'TANGIBLE',\n\t\t[ActivityTypeLimited.Points]: 'POINTS_ADD',\n\t\t[ActivityTypeLimited.DeductPoints]: 'POINTS_DEDUCT',\n\t\t[ActivityTypeLimited.ResetPoints]: 'POINTS_RESET',\n\t\t[ActivityTypeLimited.MiniGameAttempt]: 'MINI_GAME_ATTEMPT',\n\t\t[ActivityTypeLimited.Bonus]: 'BONUS',\n\t\t[ActivityTypeLimited.AddGemsAndDiamonds]: 'GEMS_AND_DIAMONDS_ADD',\n\t\t[ActivityTypeLimited.DeductGemsAndDiamonds]: 'GEMS_AND_DIAMONDS_DEDUCT',\n\t\t[ActivityTypeLimited.ResetGemsAndDiamonds]: 'GEMS_AND_DIAMONDS_RESET',\n\t}[type];\n};\n\nexport class TournamentUtils {\n\tpublic static isCanRegister = (tournament: Tournament): boolean => {\n\t\tif (tournament) {\n\t\t\tif (tournament.tournamentRegistrationStatus === TournamentRegistrationStatus.QUALIFIED_PENDING_REGISTRATION) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t!tournament.isUserRegistered && (\n\t\t\t\t\ttournament.playersMaxCount !== tournament.registrationCount ||\n\t\t\t\t\ttournament.playersMaxCount === null ||\n\t\t\t\t\ttournament.playersMaxCount === 0\n\t\t\t\t) &&\n\t\t\t\ttournament.registrationType !== TournamentRegistrationType.AUTO && (\n\t\t\t\t\ttournament.tournamentInstanceStatus === TournamentInstanceStatus.REGISTER || (\n\t\t\t\t\t\ttournament.tournamentInstanceStatus === TournamentInstanceStatus.STARTED && tournament.allowLateRegistration\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\treturn false;\n\t};\n\n\tpublic static isInProgress = (tournament: Tournament): boolean => {\n\t\tif (tournament) {\n\t\t\treturn tournament.tournamentInstanceStatus === TournamentInstanceStatus.STARTED;\n\t\t}\n\t\treturn false;\n\t};\n\n\tpublic static isActive = (tournament: Tournament): boolean => {\n\t\tif (tournament) {\n\t\t\treturn (\n\t\t\t\ttournament.tournamentInstanceStatus === TournamentInstanceStatus.PUBLISHED ||\n\t\t\t\ttournament.tournamentInstanceStatus === TournamentInstanceStatus.REGISTER ||\n\t\t\t\ttournament.tournamentInstanceStatus === TournamentInstanceStatus.STARTED\n\t\t\t);\n\t\t}\n\t\treturn false;\n\t};\n\n\tpublic static isFinished = (tournament: Tournament): boolean => {\n\t\tif (tournament) {\n\t\t\treturn (\n\t\t\t\ttournament.tournamentInstanceStatus === TournamentInstanceStatus.FINISHED ||\n\t\t\t\ttournament.tournamentInstanceStatus === TournamentInstanceStatus.CANCELLED ||\n\t\t\t\ttournament.tournamentInstanceStatus === TournamentInstanceStatus.FINALIZING\n\t\t\t);\n\t\t}\n\t\treturn false;\n\t};\n\n\tpublic static isCancelled = (tournament: Tournament): boolean => {\n\t\tif (tournament) {\n\t\t\treturn tournament.tournamentInstanceStatus === TournamentInstanceStatus.CANCELLED;\n\t\t}\n\t\treturn false;\n\t};\n\n\tpublic static isUpcoming = (tournament: Tournament): boolean => {\n\t\tif (tournament) {\n\t\t\treturn (\n\t\t\t\ttournament.tournamentInstanceStatus === TournamentInstanceStatus.PUBLISHED ||\n\t\t\t\ttournament.tournamentInstanceStatus === TournamentInstanceStatus.REGISTER\n\t\t\t);\n\t\t}\n\t\treturn false;\n\t};\n\n\tpublic static getPlayerTransformed = (player: TournamentPlayer, isMe?: boolean) => {\n\t\tif (player) {\n\t\t\tconst playerTransformed = {\n\t\t\t\tpublic_username: player.userAltName,\n\t\t\t\tavatar_url: player.avatar_url,\n\t\t\t\tposition: player.position,\n\t\t\t\tscores: player.scores,\n\t\t\t\tis_me: player.isMe,\n\t\t\t\tuser_ext_id: player.cleanExtUserId,\n\t\t\t\tcrm_brand_id: player.crmBrandId,\n\t\t\t\tuser_id: player.userId,\n\t\t\t};\n\n\t\t\tif (isMe) {\n\t\t\t\tdelete playerTransformed.is_me;\n\t\t\t}\n\n\t\t\treturn playerTransformed;\n\t\t}\n\n\t\treturn null;\n\t};\n\n\tpublic static getPrizeTransformed = (prize: TournamentPrize) => {\n\t\tif (prize) {\n\t\t\treturn { ...prize, type: tournamentPrizeTypeToPrizeName(prize.type) };\n\t\t}\n\n\t\treturn null;\n\t};\n}\n","import { TournamentRegistrationType, TournamentRegistrationTypeGetName } from './TournamentRegistrationType';\nimport { TournamentInstanceStatus } from './TournamentInstanceStatus';\nimport {\n\tTournamentRegistrationStatus,\n\tTournamentRegistrationStatusName,\n\tTournamentRegistrationStatusNamed,\n} from './TournamentRegistrationStatus';\nimport { TournamentType } from './TournamentType';\nimport { TournamentPublicMeta } from './TournamentPublicMeta';\nimport { TTournament } from '../WSAPI/WSAPITypes';\nimport { TournamentPlayer } from './TournamentPlayer';\nimport { TournamentPrize } from './TournamentPrize';\nimport { TournamentUtils } from './TournamentUtils';\nimport { IntUtils } from '../IntUtils';\nimport { AchRelatedGame } from '../Base/AchRelatedGame';\n\nexport interface Tournament {\n\t/** ID of tournament template */\n\ttournamentId?: number;\n\t/** ID of tournament instance. Generated every time when tournament based on specific template is scheduled for run */\n\ttournamentInstanceId?: number;\n\t/** Type of the tournament. For now only SCHEDULED is support */\n\ttournamentType?: TournamentType;\n\t/** Meta information about tournament that should be used to build UI */\n\tpublicMeta?: TournamentPublicMeta;\n\t/** Cost of registration in the tournament in gamification points */\n\tbuyInAmount?: number;\n\t/** Not in use */\n\tprizePool?: number;\n\t/** The time when tournament is going to start */\n\tstartTime?: string;\n\t/** The time when tournament is going to finish */\n\tendTime?: string;\n\t/** The time when tournament is going to start, epoch */\n\tstartTimeTs?: number;\n\t/** The time when tournament is going to finish, epoch */\n\tendTimeTs?: number;\n\t/** Number of users registered in the tournament */\n\tregistrationCount?: number;\n\t/** Not in use */\n\ttotalCount?: number;\n\t/** Type of registration in the tournament */\n\tregistrationType?: TournamentRegistrationType;\n\t/** Status of registration in the tournament for current user */\n\ttournamentRegistrationStatus?: TournamentRegistrationStatus;\n\t/** Status of tournament instance */\n\ttournamentInstanceStatus?: TournamentInstanceStatus;\n\t/** flag indicating if current user is registered in the tournament */\n\tisUserRegistered?: boolean;\n\t/** Indicator if tournament allows later registration, when tournament is already started */\n\tallowLateRegistration?: boolean;\n\t/** Minimum number of participant for this tournament. If tournament doesnt have enough registrations, it will not start */\n\tplayersMinCount?: number;\n\t/** Maximum number of participant for this tournament. When reached, new users won't be able to register */\n\tplayersMaxCount?: number;\n\t/** Tournament duration in millisecnnds */\n\tdurationMs?: number;\n\t/** prizes structure */\n\tprizeStructure?: {\n\t\tprizes: TournamentPrize[];\n\t};\n\t/** Information about current user */\n\ttournamentPlayer?: TournamentPlayer;\n\n\t/** List of casino games (or other types of entities) related to the tournament */\n\trelated_games?: AchRelatedGame[];\n\t/** The minimum amount of score points that the user should get in order to be qualified for the prize */\n\tminScoreToWin?: number;\n\t/** When enabled, users who don't meet the minimum qualifying score will be hidden from the Leaderboard. */\n\thideLeaderboardsMinScores?: boolean;\n\t/** Total scores across all participants in the tournament */\n\ttotalScores?: number;\n\t/** Indicates if the tournament is clan-based */\n\tisClanBased?: boolean;\n}\n\nexport const TournamentItemsTransform = (items: Tournament[]): TTournament[] => {\n\treturn items\n\t\t.filter((r) => r.tournamentId >= 1)\n\t\t.map((r) => {\n\t\t\tconst x: TTournament = {\n\t\t\t\tinstance_id: r.tournamentInstanceId,\n\t\t\t\ttournament_id: r.tournamentId,\n\t\t\t\tname: r.publicMeta.name,\n\t\t\t\tdescription: r.publicMeta.description,\n\t\t\t\tsegment_dont_match_message: r.publicMeta.segment_dont_match_message,\n\t\t\t\timage1: r.publicMeta.image_url,\n\t\t\t\timage2: r.publicMeta.image_url2,\n\t\t\t\timage2_mobile: r.publicMeta.image_url2_mobile,\n\t\t\t\tprize_pool_short: r.publicMeta.prize_pool_short,\n\t\t\t\tcustom_price_text: r.publicMeta.custom_price_text,\n\t\t\t\tcustom_section_id: r.publicMeta.custom_section_id,\n\t\t\t\tcustom_data: IntUtils.JsonOrText(r.publicMeta.custom_data),\n\t\t\t\tis_featured: r.publicMeta.featured,\n\t\t\t\tribbon: r.publicMeta.label_tag === 'custom' ? r.publicMeta.custom_label_tag : r.publicMeta.label_tag,\n\t\t\t\tpriority: r.publicMeta.position,\n\n\t\t\t\tstart_time: r.startTimeTs,\n\t\t\t\tend_time: r.endTimeTs,\n\t\t\t\tregistration_count: r.registrationCount,\n\t\t\t\tis_user_registered: r.isUserRegistered,\n\t\t\t\tplayers_min_count: r.playersMinCount,\n\t\t\t\tplayers_max_count: r.playersMaxCount,\n\t\t\t\tregistration_status: TournamentRegistrationStatusNamed(r.tournamentRegistrationStatus),\n\n\t\t\t\tregistration_type: TournamentRegistrationTypeGetName(r.registrationType),\n\t\t\t\t...(r.registrationType === TournamentRegistrationType.BUY_IN_POINTS ? { registration_cost_points: r.buyInAmount } : {}),\n\t\t\t\t...(r.registrationType === TournamentRegistrationType.BUY_IN_GEMS ? { registration_cost_gems: r.buyInAmount } : {}),\n\t\t\t\t...(r.registrationType === TournamentRegistrationType.BUY_IN_DIAMONDS ? { registration_cost_diamonds: r.buyInAmount } : {}),\n\t\t\t\tduration_ms: r.durationMs,\n\n\t\t\t\tis_active: TournamentUtils.isActive(r),\n\t\t\t\tis_can_register: TournamentUtils.isCanRegister(r),\n\t\t\t\tis_cancelled: TournamentUtils.isCancelled(r),\n\t\t\t\tis_finished: TournamentUtils.isFinished(r),\n\t\t\t\tis_in_progress: TournamentUtils.isInProgress(r),\n\t\t\t\tis_upcoming: TournamentUtils.isUpcoming(r),\n\n\t\t\t\tmin_scores_win: r.minScoreToWin,\n\t\t\t\thide_leaderboard_min_scores: r.hideLeaderboardsMinScores,\n\t\t\t\ttotal_scores: r.totalScores,\n\t\t\t\tis_clan_based: r.isClanBased,\n\t\t\t};\n\n\t\t\tif (r.prizeStructure) {\n\t\t\t\tx.prizes = r.prizeStructure.prizes.map((p) => TournamentUtils.getPrizeTransformed(p));\n\t\t\t}\n\n\t\t\tif (r.tournamentPlayer) {\n\t\t\t\tx.me = TournamentUtils.getPlayerTransformed(r.tournamentPlayer, true);\n\t\t\t}\n\n\t\t\treturn x;\n\t\t});\n};\n","import { Tournament, TournamentItemsTransform } from './Tournament';\nimport { TournamentPlayer } from './TournamentPlayer';\nimport { ProtocolResponse } from '../Base/ProtocolResponse';\nimport { TournamentPrize } from './TournamentPrize';\nimport { TTournamentDetailed } from '../WSAPI/WSAPITypes';\nimport { TournamentUtils } from './TournamentUtils';\nimport { ClanLeaderboardEntry, ClanPrizeStructureEntry } from './TournamentClan';\n\nexport interface GetTournamentInfoResponse extends ProtocolResponse {\n\t/** tournament info */\n\ttournamentInfo: {\n\t\t/** id of label, not in use */\n\t\tlabelId: number;\n\t\ttournamentLobbyInfo: Tournament;\n\t\t/** list of registered users */\n\t\tplayers: TournamentPlayer[];\n\t};\n\t/** information about current user position */\n\tuserPosition: TournamentPlayer;\n\t/** prizes structure */\n\tprizeStructure?: {\n\t\tprizes: TournamentPrize[];\n\t};\n\t/** Ranked list of clans in this tournament. Empty/null for non-clan tournaments. */\n\tclanLeaderboard?: ClanLeaderboardEntry[] | null;\n\t/**\n\t * The clan ID the current user belongs to.\n\t * null when the user has no clan or the tournament is not clan-based.\n\t * Match against clanLeaderboard[i].clan_id to highlight the user's clan row.\n\t */\n\tuserClanId?: number | null;\n\t/** Per-clan prize structure. Empty/null for non-clan tournaments. */\n\tclanPrizes?: ClanPrizeStructureEntry[] | null;\n}\n\nexport const tournamentInfoItemTransform = (t: GetTournamentInfoResponse): TTournamentDetailed => {\n\tconst response: TTournamentDetailed = {\n\t\t...TournamentItemsTransform([t.tournamentInfo?.tournamentLobbyInfo ?? null])?.[0],\n\t\trelated_games: (t.tournamentInfo.tournamentLobbyInfo.related_games || []).map((g, i) => ({\n\t\t\text_game_id: g.ext_game_id,\n\t\t\tgame_public_meta: {\n\t\t\t\tname: g.game_public_meta.name,\n\t\t\t\tlink: g.game_public_meta.link,\n\t\t\t\timage: g.game_public_meta.image,\n\t\t\t\tenabled: g.game_public_meta.enabled,\n\t\t\t\tgame_categories: g.game_public_meta.game_categories,\n\t\t\t\tgame_provider: g.game_public_meta.game_provider,\n\t\t\t\tmobile_spec_link: g.game_public_meta.mobile_spec_link,\n\t\t\t\tpriority: i + 1,\n\t\t\t},\n\t\t})),\n\t\tplayers: t.tournamentInfo.players.map((p) => TournamentUtils.getPlayerTransformed(p)),\n\t};\n\n\tif (t.prizeStructure) {\n\t\tresponse.prizes = t.prizeStructure.prizes.map((p) => TournamentUtils.getPrizeTransformed(p));\n\t}\n\n\tif (t.userPosition) {\n\t\tresponse.me = TournamentUtils.getPlayerTransformed(t.userPosition, true);\n\t}\n\n\tif (t.tournamentInfo?.tournamentLobbyInfo?.isClanBased) {\n\t\tresponse.is_clan_based = true;\n\t\tresponse.user_clan_id = t.userClanId ?? null;\n\t\tresponse.clan_leaderboard = t.clanLeaderboard\n\t\t\t? t.clanLeaderboard.map((entry) => ({\n\t\t\t\t\tclan_id: entry.clanId,\n\t\t\t\t\tpublic_meta: {\n\t\t\t\t\t\tname: entry.publicMeta.name,\n\t\t\t\t\t\tdescription: entry.publicMeta.description,\n\t\t\t\t\t\timage_url: entry.publicMeta.image_url,\n\t\t\t\t\t},\n\t\t\t\t\tposition: entry.rank,\n\t\t\t\t\ttotal_score: entry.totalScore,\n\t\t\t\t\tcontributing_members: entry.memberCount,\n\t\t\t }))\n\t\t\t: null;\n\t\tresponse.clan_prize_structure = t.clanPrizes\n\t\t\t? t.clanPrizes.map((entry) => ({\n\t\t\t\t\tclan_place: entry.clan_place,\n\t\t\t\t\tprize_type_id: entry.prize_type_id,\n\t\t\t\t\tprize_pool_amount: entry.prize_pool_amount,\n\t\t\t\t\tprize_pool_currency_code: entry.prize_pool_currency_code,\n\t\t\t\t\tactivity_type_id: entry.activity_type_id,\n\t\t\t\t\tdetails_json: entry.details_json,\n\t\t\t\t\tpublic_meta: entry.public_meta\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tname: entry.public_meta.name,\n\t\t\t\t\t\t\t\tdescription: entry.public_meta.description,\n\t\t\t\t\t\t\t\timage_url: entry.public_meta.image_url,\n\t\t\t\t\t\t\t\tprize_name: entry.public_meta.prize_name,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: null,\n\t\t\t\t\ttiers: (entry.player_tiers || []).map((tier) => ({\n\t\t\t\t\t\tplayer_place_from: tier.player_place_from,\n\t\t\t\t\t\tplayer_place_to: tier.player_place_to,\n\t\t\t\t\t\tpool_amount: tier.pool_amount,\n\t\t\t\t\t\tdistribution_type: tier.distribution_type,\n\t\t\t\t\t\tactivity_type_id: tier.activity_type_id,\n\t\t\t\t\t\tdetails_json: tier.details_json,\n\t\t\t\t\t\tpublic_meta: tier.public_meta\n\t\t\t\t\t\t\t? { name: tier.public_meta.name, description: tier.public_meta.description, image_url: tier.public_meta.image_url }\n\t\t\t\t\t\t\t: null,\n\t\t\t\t\t})),\n\t\t\t }))\n\t\t\t: null;\n\t}\n\n\treturn response;\n};\n","export enum TournamentRegistrationError {\n\tNO_ERROR = 0,\n\tTOURNAMENT_USER_CANNOT_JOIN_WITHOUT_CLAN = 1010,\n\tTOURNAMENT_INSTANCE_NOT_FOUND = 30001,\n\tTOURNAMENT_REGISTRATION_NOT_ENOUGH_POINTS = 30002,\n\tTOURNAMENT_INSTANCE_NOT_IN_STATE = 30003,\n\tTOURNAMENT_ALREADY_REGISTERED = 30004,\n\tTOURNAMENT_USER_DONT_MATCH_CONDITIONS = 30005,\n\tTOURNAMENT_USER_NOT_REGISTERED = 30006,\n\tTOURNAMENT_CANT_CHANGE_REGISTRATION_STATUS = 30007,\n\tTOURNAMENT_MAX_REGISTRATIONS_REACHED = 30008,\n TOURNAMENT_REGISTRATION_NOT_ENOUGH_GEMS = 30010,\n TOURNAMENT_REGISTRATION_NOT_ENOUGH_DIAMONDS = 30011,\n\n\n}\n","export enum TournamentType {\n\tSCHEDULED = 1,\n\tSNG = 2,\n\tTEST = 3,\n}\n","export enum LeaderBoardPeriodType {\n\tDAILY = 1,\n\tWEEKLY = 2,\n\tMONTHLY = 3,\n}\n","import { LeaderBoardDetailsT, LeaderBoardUserT, LeaderBoardsRewardsT } from '../WSAPI/WSAPITypes';\nimport { LeaderBoardDetails } from './LeaderBoardDetails';\nimport { LeaderBoardPeriodType } from './LeaderBoardPeriodType';\nimport { LeaderBoardPosition } from './LeaderBoardPosition';\n\nconst pointsRewardTransform = (reward_points: number[]): LeaderBoardsRewardsT[] => {\n\tif (reward_points && reward_points.length) {\n\t\treturn reward_points.map((r, i) => ({ place: i + 1, points: r }));\n\t}\n\n\treturn null;\n};\n\nconst getLeaderBoardPlayerTransformed = (user: LeaderBoardPosition, isMe?: boolean): LeaderBoardUserT => {\n\tif (user) {\n\t\tconst x: LeaderBoardUserT = {\n\t\t\tpublic_username: user?.public_username || user.user_alt_name,\n\t\t\tavatar_url: user.avatar_url,\n\t\t\tposition: user.position_in_board,\n\t\t\tpoints: user.points_accumulated,\n\t\t\tis_me: user.is_me,\n\t\t};\n\n\t\tif (isMe) {\n\t\t\tdelete x.is_me;\n\t\t}\n\n\t\treturn x;\n\t}\n\n\treturn null;\n};\n\nexport const getLeaderBoardTransform = (board: LeaderBoardDetails): LeaderBoardDetailsT => {\n\tif (board) {\n\t\tconst x: LeaderBoardDetailsT = {\n\t\t\tboard_id: board.board_id,\n\t\t\tname: board.board_public_meta.name,\n\t\t\tdescription: board.board_public_meta.description,\n\t\t\trules: board.board_public_meta.rules,\n\t\t\tperiod_type_id: board.period_type_id,\n\t\t\trewards: pointsRewardTransform(board.reward_points),\n\t\t\tusers: board.positions.map((p) => getLeaderBoardPlayerTransformed(p)),\n\t\t\tme: getLeaderBoardPlayerTransformed(board.userPosition, true),\n\t\t};\n\n\t\treturn x;\n\t}\n\n\treturn null;\n};\n","import { IntUtils } from '../IntUtils';\nimport { ProtocolResponse } from '../Base/ProtocolResponse';\nimport { TLevel } from '../WSAPI/WSAPITypes';\nimport { Level } from './Level';\n\nexport interface GetLevelMapResponse extends ProtocolResponse {\n\tlevels: Level[];\n}\n\nexport const GetLevelMapResponseTransform = (levels: GetLevelMapResponse): TLevel[] => {\n\tif (!levels?.levels) return [];\n\n\tconst mapped = levels.levels.map((l) => ({\n\t\tid: l.level_id,\n\t\tname: l.level_public_meta.name,\n\t\tdescription: l.level_public_meta.description,\n\t\timage: l.level_public_meta.image_url,\n\t\trequired_points: l.required_points,\n\t\tvisibility_points: l.level_public_meta.visibility_points ? parseInt(l.level_public_meta.visibility_points as any) : null,\n\t\trequired_level_counter_1: l.required_level_counter_1,\n\t\trequired_level_counter_2: l.required_level_counter_2,\n\t\tcustom_data: IntUtils.JsonOrText(l.level_public_meta?.custom_data),\n\t\tordinal_position: 0,\n\t}));\n\n\tconst ordinalById = new Map<number, number>();\n\t[...mapped]\n\t\t.sort((a, b) => a.required_points - b.required_points)\n\t\t.forEach((l, index) => ordinalById.set(l.id, index + 1));\n\n\treturn mapped.map((l) => ({ ...l, ordinal_position: ordinalById.get(l.id) }));\n};\n","import { ECacheContext, OCache } from '../OCache';\nimport { SmarticoAPI } from '../SmarticoAPI';\n\n/** @hidden */\nexport const CACHE_DATA_SEC = 30;\n\n/** @hidden */\nexport const JACKPOT_TEMPLATE_CACHE_SEC = 30;\n/** @hidden */\nexport const JACKPOT_POT_CACHE_SEC = 1;\n/** @hidden */\nexport const JACKPOT_WINNERS_CACHE_SEC = 30;\n/** @hidden */\nexport const JACKPOT_ELIGIBLE_GAMES_CACHE_SEC = 30;\n\n/** @hidden */\nexport enum onUpdateContextKey {\n\tSaw = 'saw',\n\tMissions = 'missions',\n\tTournamentList = 'tournamentList',\n\tInboxMessages = 'inboxMessages',\n\tBadges = 'badges',\n\tLevels = 'levels',\n\tStoreItems = 'storeItems',\n\tStoreCategories = 'storeCategories',\n\tAchCategories = 'achCategories',\n\tLeaderBoards = 'leaderBoards',\n\tLevelExtraCounters = 'levelExtraCounters',\n\tSegments = 'segments',\n\tStoreHistory = 'storeHistory',\n\tJackpots = 'jackpots',\n\tPots = 'Pots',\n\tCustomSections = 'customSections',\n\tBonuses = 'bonuses',\n\tClans = 'clans',\n\tSAWHistory = 'sawHistory',\n\tJackpotWinners = 'jackpotWinners',\n\tRaffles = 'raffles',\n\tJackpotEligibleGames = 'jackpotEligibleGames',\n\tCurrentLevel = 'currentLevel',\n\tInboxUnreadCount = 'inboxUnreadCount',\n\tActivityLog = 'activityLog',\n\tAvatarsList = 'avatarsList',\n\tAvatarsCustomized = 'avatarsCustomized',\n\tAvatarPrompts = 'avatarPrompts',\n}\n\n/**\n * Abstract base of the SDK's public surface. Holds the shared state\n * (`api`, `userExtId`, `onUpdateCallback` map) and the generic cache /\n * subscription helper (`updateEntity`). Domain-specific methods live on\n * subclasses; the terminator `WSAPI` class composes the whole chain.\n *\n * **Consumers should not instantiate this directly** — the SDK constructs\n * the concrete `WSAPI` via `_smartico.api`.\n *\n * @hidden\n */\nexport abstract class WSAPIBase {\n\t/** @hidden */\n\tprotected onUpdateCallback: Map<onUpdateContextKey, (data: any) => void> = new Map();\n\n\t/** @hidden */\n\tprotected userExtId: string = null;\n\n\t/** @private */\n\tconstructor(protected api: SmarticoAPI, userExtId: string = null) {\n\t\tthis.userExtId = userExtId;\n\t\tOCache.clearAll();\n\t}\n\n\t/** @private */\n\t// AA: this method is used from the _smartico script to clear cache when the context is changed,\n\t// e.g. when user is changed or language is changed\n\tpublic clearCaches() {\n\t\tOCache.clearAll();\n\t}\n\n\t/**\n\t * Generic cache-update + subscription-notify helper. Used by domain\n\t * classes' `update*` methods to refresh a context and fire any\n\t * registered `onUpdate` callback.\n\t * @hidden\n\t */\n\tprotected async updateEntity(contextKey: onUpdateContextKey, payload: any) {\n\t\tOCache.set(contextKey, payload, ECacheContext.WSAPI);\n\n\t\tconst onUpdate = this.onUpdateCallback.get(contextKey);\n\t\tif (onUpdate) {\n\t\t\tonUpdate(payload);\n\t\t}\n\t}\n}\n","import { TRaffle, TRaffleDraw, TRafflePrize, TRafflePrizeWinner, TRaffleTicket } from '../WSAPI/WSAPITypes';\nimport { ProtocolResponse } from '../Base/ProtocolResponse';\nimport { Raffle } from './Raffle';\nimport { RaffleDraw } from './RaffleDraw';\nimport { RafflePrize } from './RafflePrize';\nimport { RafflePrizeWinner } from './RafflePrizeWinner';\nimport { RaffleTicket } from './RaffleTicket';\n\nexport interface GetRafflesResponse extends ProtocolResponse {\n\titems: Raffle[];\n}\n\n/** @hidden */\nexport const ticketsTransform = (items: RaffleTicket[]): TRaffleTicket[] => {\n\treturn items.map((item) => {\n\t\treturn {\n\t\t\tticekt_id: item.id,\n\t\t\tticket_id_string: item.s,\n\t\t};\n\t});\n};\n\n/** @hidden */\nexport const winnersTransform = (items: RafflePrizeWinner[]): TRafflePrizeWinner[] => {\n\treturn items.map((item) => {\n\t\treturn {\n\t\t\tid: item.user_id,\n\t\t\tusername: item.public_username,\n\t\t\tavatar_url: item.avatar_url || item.avatar_id,\n\t\t\tticket: { ticekt_id: item.ticket.id, ticket_id_string: item.ticket.s },\n\t\t\traf_won_id: item.raf_won_id,\n\t\t\tclaimed_date: item.claimed_date,\n\t\t};\n\t});\n};\n\n/** @hidden */\nexport const prizeTransform = (items: RafflePrize[]): TRafflePrize[] => {\n\treturn items.map((item) => {\n\t\treturn {\n\t\t\tid: item.prize_id,\n\t\t\tname: item.public_meta.name,\n\t\t\tdescription: item.public_meta.description,\n\t\t\timage_url: item.public_meta.image_url,\n\t\t\tprizes_per_run: item.prizes_per_run,\n\t\t\tprizes_per_run_actual: item.prizes_per_run_actual,\n\t\t\tchances_to_win_perc: item.chances_to_win_perc,\n\t\t\tmin_required_total_tickets: item.min_required_total_tickets,\n\t\t\tcap_prizes_per_run: item.cap_prizes_per_run,\n\t\t\tpriority: item.priority,\n\t\t\tstock_items_per_draw: item.stock_items_per_draw,\n\t\t\tshould_claim: item.should_claim,\n\t\t\twinners: winnersTransform(item.winners),\n\t\t\trequires_claim: item.requires_claim,\n\t\t\tmin_required_tickets_for_user: item.min_required_tickets_for_user,\n\t\t};\n\t});\n};\n\n/** @hidden */\nexport const drawTransform = (items: RaffleDraw[]): TRaffleDraw[] => {\n\treturn items.map((item) => {\n\t\treturn {\n\t\t\tid: item.draw_id,\n\t\t\tname: item.public_meta.name,\n\t\t\tdescription: item.public_meta.description,\n\t\t\timage_url: item.public_meta.image_url,\n\t\t\timage_url_mobile: item.public_meta.image_url_mobile,\n\t\t\ticon_url: item.public_meta.icon_url,\n\t\t\tbackground_image_url: item.public_meta.background_image_url,\n\t\t\tbackground_image_url_mobile: item.public_meta.background_image_url_mobile,\n\t\t\tis_grand: item.public_meta.is_grand,\n\t\t\tprizes: prizeTransform(item.prizes),\n\t\t\tcurrent_state: item.current_state,\n\t\t\trun_id: item.run_id,\n\t\t\texecution_type: item.execution_type,\n\t\t\texecution_ts: item.execution_ts,\n\t\t\tprevious_run_ts: item.previous_run_ts,\n\t\t\tprevious_run_id: item.previous_run_id,\n\t\t\tticket_start_ts: item.ticket_start_ts,\n\t\t\tallow_multi_prize_per_ticket: item.allow_multi_prize_per_ticket,\n\t\t\ttotal_tickets_count: item.total_tickets_count,\n\t\t\tmy_tickets_count: item.my_tickets_count,\n\t\t\tmy_last_tickets: ticketsTransform(item.my_last_tickets),\n\t\t\tuser_opted_in: Boolean(item.user_opted_in),\n\t\t\trequires_optin: Boolean(item.requires_optin),\n\t\t\tis_active: Boolean(item.is_active),\n\t\t\twinners_limit: item.winners_limit,\n\t\t\twinners_offset: item.winners_offset,\n\t\t\twinners_total: item.winners_total,\n\t\t};\n\t});\n};\n\n/** @hidden */\nexport const raffleTransform = (items: Raffle[]): TRaffle[] => {\n\treturn items.map((item) => {\n\t\treturn {\n\t\t\tid: item.raffle_id,\n\t\t\tname: item.public_meta.name,\n\t\t\tdescription: item.public_meta.description,\n\t\t\tcustom_section_id: item.public_meta.custom_section_id,\n\t\t\timage_url: item.public_meta.image_url,\n\t\t\timage_url_mobile: item.public_meta.image_url_mobile,\n\t\t\tcustom_data: item.public_meta.custom_data,\n\t\t\tstart_date: item.start_date_ts,\n\t\t\tend_date: item.end_date_ts,\n\t\t\tmax_tickets_count: item.max_tickets_count,\n\t\t\tcurrent_tickets_count: item.current_tickets_count,\n\t\t\tdraws: drawTransform(item.draws),\n\t\t\tticket_cap_visualization: item.public_meta.ticket_cap_visualization,\n\t\t};\n\t});\n};\n","import { TRaffleDraw } from '../WSAPI/WSAPITypes';\nimport { ProtocolResponse } from '../Base/ProtocolResponse';\nimport { RaffleDraw } from './RaffleDraw';\nimport { prizeTransform, ticketsTransform } from './GetRafflesResponse';\n\nexport interface GetDrawRunResponse extends ProtocolResponse {\n\tdraw: RaffleDraw;\n}\n\n/** @hidden */\nexport const drawRunTransform = (res: GetDrawRunResponse): TRaffleDraw => {\n\treturn {\n\t\tid: res.draw.draw_id,\n\t\tname: res.draw.public_meta.name,\n\t\tdescription: res.draw.public_meta.description,\n\t\timage_url:res.draw.public_meta.image_url,\n\t\timage_url_mobile:res.draw.public_meta.image_url_mobile,\n\t\ticon_url: res.draw.public_meta.icon_url,\n\t\tbackground_image_url: res.draw.public_meta.background_image_url,\n\t\tbackground_image_url_mobile: res.draw.public_meta.background_image_url_mobile,\n\t\tis_grand: res.draw.public_meta.is_grand,\n\t\tprizes: prizeTransform(res.draw.prizes),\n\t\tcurrent_state: res.draw.current_state,\n\t\trun_id: res.draw.run_id,\n\t\texecution_type: res.draw.execution_type,\n\t\texecution_ts: res.draw.execution_ts,\n\t\tprevious_run_ts: res.draw.previous_run_ts,\n\t\tprevious_run_id: res.draw.previous_run_id,\n\t\tticket_start_ts: res.draw.ticket_start_ts ?? res.draw['ticket_start_date'],\n\t\tallow_multi_prize_per_ticket: res.draw.allow_multi_prize_per_ticket,\n\t\ttotal_tickets_count: res.draw.total_tickets_count,\n\t\tmy_tickets_count: res.draw.my_tickets_count,\n\t\tmy_last_tickets: ticketsTransform(res.draw.my_last_tickets),\n\t\tuser_opted_in: Boolean(res.draw.user_opted_in),\n\t\trequires_optin: Boolean(res.draw.requires_optin),\n\t\tis_active: Boolean(res.draw.is_active),\n\t\twinners_limit: res.draw.winners_limit,\n\t\twinners_offset: res.draw.winners_offset,\n\t\twinners_total: res.draw.winners_total,\n\t} \t\n};","import { RaffleDraw } from \"./RaffleDraw\";\n\nexport enum RaffleTicketCapVisualization {\n\t/** Show nothing */\n\tEmpty = 0,\n\t/** Show ticket counter */\n\tCounter = 1,\n\t/** Show message when ticket cap is reached */\n\tMessage = 2,\n}\n\ninterface RafflePublicMeta {\n /** Name of the raffle */\n name: string;\n /** Description of the raffle */\n description: string;\n /** ID of the custom section that is linked to the raffle in the Gamification widget */\n custom_section_id: number;\n /** URL of the image that represents the raffle */\n image_url: string;\n /** URL of the mobile image that represents the raffle */\n image_url_mobile: string;\n /** Text for Terms and Conditions */\n hint_text:string;\n /** \n\t * Custom data as string or JSON string that can be used in API to build custom UI\n\t * You can request from Smartico to define fields for your specific case that will be managed from Smartico BackOffice\n\t * Read more here - <https://help.smartico.ai/welcome/products/general-concepts/custom-fields-attributes>\n */\n\tcustom_data: string;\n\n /**\n * - Value 1 (Counter): Shows a real-time \"Tickets Remaining\" display available during the whole Raffle activity.\n * - Value 2 (Message): Will show a specific message that triggers only when the cap is reached and inform users that tickets will be no longer be issued.\n */\n ticket_cap_visualization?: RaffleTicketCapVisualization;\n}\n\n\ninterface Raffle {\n /** ID of the Raffle template */\n raffle_id: number;\n /** Meta information about raffle for the presentation on UI */\n public_meta: RafflePublicMeta;\n /** Date of start */\n start_date_ts: number;\n /** Date of end */\n end_date_ts: number; \n /** Maximum numer of tickets that can be given to all users for the whole period of raffle */\n max_tickets_count: number;\n /** \n * Number of tickets that are already given to all users for this raffle\n */\n current_tickets_count: number;\n\n /** \n * List of draws that are available for this raffle.\n * For example, if the raffle is containg one hourly draw, one daily draw and one draw on fixed date like 01/01/2022,\n * Then the list will always return 3 draws, no matter if the draws are already executed or they are in the future.\n */\n draws: RaffleDraw[]\n\n}\n\nexport { Raffle, RafflePublicMeta };\n","import { RaffleDrawPublicMeta } from \"./RaffleDrawPublicMeta\";\nimport { RafflePrize } from \"./RafflePrize\";\nimport { RaffleTicket } from \"./RaffleTicket\";\n\nexport enum RaffleDrawInstanceState {\n /** Draw is open for the tickets collection */\n Open = 1,\n /** Winner selection is in progress */\n WinnerSelection = 2,\n /** Draw is executed and the winners are selected */\n Executed = 3,\n}\n\nexport enum RaffleDrawTypeExecution {\n /** Draw is executed only once */\n ExecDate = 0,\n /** Draw is executed on a recurring basis */\n Recurring = 1,\n /** \n * Draw is executed once and is marked as grand.\n * This means it is a special or significant draw,\n * often with larger prizes or more importance.\n */\n Grand = 2,\n}\n\n\ninterface RaffleDraw {\n /** \n * Id of the Draw definition, for the repetative draws (e.g. daily), this number will be the same for all draws that are repeating daily\n * (internal name: schedule_id)\n */\n draw_id: number;\n\n /** Meta information of the Draw for the presentaiton in UI */\n public_meta: RaffleDrawPublicMeta;\n\n /** Information about prizes in the draw */\n prizes: RafflePrize[];\n\n /** \n * State of current instance of Draw\n */\n current_state: RaffleDrawInstanceState;\n\n /** \n * Field indicates the ID of the latest instance/run of draw\n */\n run_id: number;\n\n /** \n * Type of the draw execution, indicating how and when the draw is executed.\n * \n * - ExecDate: Draw is executed only once at a specific date and time.\n * - Recurring: Draw is executed on a recurring basis (e.g., daily, weekly).\n * - Grand: Draw is executed once and is marked as grand, often with larger prizes or more importance.\n */\n execution_type: RaffleDrawTypeExecution;\n\n /** Date/time of the draw execution */\n execution_ts: number;\n \n /** Date of the previously executed draw (if there is such) */\n previous_run_ts?: number;\n\n /** Unique ID of the previusly executed draw (if there is such) */\n previous_run_id?: number; \n\n /** \n * Date/time starting from which the tickets will participate in the upcoming draw\n * This value need to be taken into account with next_execute_ts field value, for example\n * Next draw is at 10:00, ticket_start_date is 9:00, so all tickets that are collected after 9:00 will participate in the draw at 10:00\n * (internally this value is calculated as next_execute_ts - ticket_start_date)\n */\n ticket_start_ts: number;\n\n /** \n * Field is indicating if same ticket can win multiple prizes in the same draw\n * For example there are 3 types of prizes in the draw - iPhone, iPad, MacBook\n * If this field is true, then one ticket can win all 3 prizes (depending on the chances of course),\n * if false, then one ticket can win only one prize.\n * The distribution of the prizes is start from top (assuming on top are the most valuable prizes) to bottom (less valuable prizes)\n * If specific prize has multiple values, e.g. we have 3 iPhones,\n * then the same ticket can win only one prize of a kind, but can win multiple prizes of different kind (if allow_multi_prize_per_ticket is true)\n */\n allow_multi_prize_per_ticket: boolean;\n\n\n /** \n * The number of tickets that are already given to all users for this instance of draw.\n * In other words tickets that are collected between ticket_start_date and current time (or till current_execution_ts is the instance is executed).\n */\n total_tickets_count: number;\n\n /** \n * The number of tickets collected by current user for this instance of draw.\n */\n my_tickets_count: number;\n\n /**\n * List of last 5 tickets are collected by current user for this instance of draw.\n */\n my_last_tickets: RaffleTicket[];\n\t/**\n\t * If true, the user has opted-in to the raffle.\n\t */\n\tuser_opted_in: boolean;\n\t/**\n\t * If true, the user needs to opt-in to the raffle before they can participate.\n\t */\n\trequires_optin: boolean;\n\n /**\n * If true, the draw is active and can be participated in.\n */\n is_active: boolean;\n /**\n * The number of winners to return\n */\n\twinners_limit?: number;\n\n /**\n * The offset of the winners to return\n */\n\twinners_offset?: number;\n\n /**\n * The total number of winners\n */\n\twinners_total?: number;\n}\n\nexport { RaffleDraw };\n","import { TRaffleDrawRun } from '../WSAPI/WSAPITypes';\nimport { ProtocolResponse } from '../Base/ProtocolResponse';\nimport { RaffleDrawRun } from './RaffleDrawRun';\n\nexport interface GetRaffleDrawRunsHistoryResponse extends ProtocolResponse {\n\tdraw_runs: RaffleDrawRun[];\n}\n\n/** @hidden */\nexport const drawRunHistoryTransform = (res: GetRaffleDrawRunsHistoryResponse): TRaffleDrawRun[] => {\n\treturn res.draw_runs.map((item) => {\n\t\treturn {\n\t\t\tid: item.draw_id,\n\t\t\trun_id: item.run_id,\n\t\t\tname: item.public_meta.name,\n\t\t\tdescription: item.public_meta.description,\n\t\t\timage_url: item.public_meta.image_url,\n\t\t\timage_url_mobile: item.public_meta.image_url_mobile,\n\t\t\ticon_url: item.public_meta.icon_url,\n\t\t\tbackground_image_url: item.public_meta.background_image_url,\n\t\t\tbackground_image_url_mobile: item.public_meta.background_image_url_mobile,\n\t\t\tis_grand: item.public_meta.is_grand,\n\t\t\texecution_ts: item.execution_ts,\n\t\t\tactual_execution_ts:item.actual_execution_ts,\n\t\t\tticket_start_ts:item.ticket_start_ts,\n\t\t\tis_winner:item.is_winner,\n\t\t\thas_unclaimed_prize:item.has_unclaimed_prize\n\t\t};\n\t});\n};\n","import { TransformedRaffleClaimPrizeResponse } from \"../WSAPI/WSAPITypes\";\nimport { ProtocolResponse } from \"../Base/ProtocolResponse\";\n\nexport interface RaffleClaimPrizeResponse extends ProtocolResponse {\n errCode: number\n errMsg?: string\n}\n\n/** @hidden */\nexport const raffleClaimPrizeResponseTransform = (info: RaffleClaimPrizeResponse): TransformedRaffleClaimPrizeResponse => {\n return {\n errorCode: info.errCode,\n errorMessage: info.errMsg\n }\n}\n","import { CoreUtils } from '../Core';\nimport { ECacheContext, OCache } from '../OCache';\nimport {\n\tTActivityLog,\n\tTLevel,\n\tTLevelCurrent,\n\tTSegmentCheckResult,\n\tTUserProfile,\n\tUserLevelExtraCountersT,\n} from './WSAPITypes';\nimport {\n\tCACHE_DATA_SEC,\n\tonUpdateContextKey,\n} from './WSAPIBase';\nimport { WSAPIBase } from './WSAPIBase';\n\n/** @group User */\nexport class WSAPIUser extends WSAPIBase {\n\t/**\n\t * Returns the current user's public profile — the source of truth for\n\t * balances (points / gems / diamonds), the current level ID, the\n\t * display username + avatar, language, public tags, and the inbox\n\t * unread count. **This method is synchronous** (returns `TUserProfile`,\n\t * not a Promise): the SDK keeps a local snapshot of the user's public\n\t * properties that is initialised at identify time and kept live by a\n\t * server-driven update channel — every call returns the latest cached\n\t * values without a network round-trip.\n\t *\n\t * Subscribe to changes by registering a callback on `_smartico.on('props_change', ...)`\n\t * — the callback fires with the full snapshot at identify and with\n\t * partial-key updates on every subsequent server push (typically\n\t * under 1 second after the underlying state change).\n\t *\n\t * @remarks\n\t * **Preconditions**\n\t * The tracker must be initialised — calling this before the identify\n\t * round-trip completes throws (`\"Tracker is not initialized, cannot\n\t * getUserProfile\"`). Safe ways to wait for readiness:\n\t * - register `_smartico.on('identify', (errCode, props) => ...)` —\n\t * fires once after a successful identify with the full props\n\t * - register `_smartico.on('props_change', () => ...)` — fires first\n\t * at identify with the full snapshot, then on every push update\n\t *\n\t * **What's kept live (push-updated)**\n\t * Balance fields (`ach_points_balance`, `ach_gems_balance`,\n\t * `ach_diamonds_balance`, `ach_points_ever`), `ach_level_current_id`,\n\t * `core_public_tags`, `core_inbox_unread_count`, `core_user_language`,\n\t * `avatar_url`, `public_username`, and the AI-driven recommended-amount\n\t * fields all flow over the SDK's user-properties update channel as\n\t * partial updates — the snapshot is patched in place when any of them\n\t * change server-side. Re-call `getUserProfile()` (or watch\n\t * `props_change`) to observe new values.\n\t *\n\t * **Reading state from the returned profile**\n\t * Balances (`ach_points_balance`, `ach_gems_balance`,\n\t * `ach_diamonds_balance`) are the canonical source for affordability\n\t * checks across the SDK — compare against `entry_fee_amount` (clans),\n\t * `registration_cost_points` / `_gems` / `_diamonds` (tournaments), and\n\t * `price` / `discounted_price` + `purchase_type` (store items).\n\t * `ach_points_ever` is monotonic — store purchases deduct from\n\t * `ach_points_balance` but NEVER from `ach_points_ever`, so it remains\n\t * useful for level-progress math (`required_points` on the next\n\t * {@link getLevels} entry minus `ach_points_ever`). `ach_level_current_id`\n\t * is the FK into the level ladder — resolve metadata via\n\t * {@link getCurrentLevel} (richer, includes progress %) or\n\t * {@link getLevels} (full ladder lookup table).\n\t *\n\t * **Inbox unread count** — `core_inbox_unread_count` on this profile\n\t * is push-updated in real time (under 1 second). For an inbox badge,\n\t * prefer this field over {@link getInboxUnreadCount} (which is cached\n\t * for 30 s) — same value, fresher signal.\n\t *\n\t * **Language**: `core_user_language` reflects the server's stored\n\t * language. If the consumer just called `_smartico.changeLanguage(...)`,\n\t * the field may briefly lag the local intent until the server push\n\t * arrives. Use `_smartico.getPublicProps()` for the\n\t * client-fallback-applied version if instant accuracy matters.\n\t *\n\t * **Idempotency / Side effects**: trivially safe — no network call,\n\t * no state mutation.\n\t *\n\t * **UI guidance**: see [UI Guide — `getUserProfile`](../../docs/ui/user/UIGuide_getUserProfile.md).\n\t *\n\t * **Visitor mode**: not supported — throws. Visitor sessions do not\n\t * have a public-profile snapshot.\n\t *\n\t * @returns The current cached `TUserProfile` snapshot. A shallow copy —\n\t * mutating it does not affect the SDK's internal state.\n\t * @throws `Error(\"Tracker is not initialized, cannot getUserProfile\")`\n\t * if called before identify completes or from a visitor session.\n\t *\n\t * @example\n\t * ```ts\n\t * // Wait for identify before calling.\n\t * window._smartico.on('identify', (errCode) => {\n\t * if (errCode !== 0) return;\n\t * const profile = window._smartico.api.getUserProfile();\n\t * console.log('[smartico] initial profile loaded — render the user widget:', profile);\n\t * });\n\t *\n\t * // Stay in sync with live updates.\n\t * window._smartico.on('props_change', (changed) => {\n\t * // `changed` is the partial keys for this push (full snapshot at identify).\n\t * const profile = window._smartico.api.getUserProfile();\n\t * console.log('[smartico] profile updated — re-render any widgets bound to:', Object.keys(changed),\n\t * '— balances now:', profile.ach_points_balance, profile.ach_gems_balance, profile.ach_diamonds_balance);\n\t *\n\t * // React to specific fields.\n\t * if ('ach_level_current_id' in changed) {\n\t * console.log('[smartico] level changed — call getCurrentLevel() for richer detail, animate the level badge');\n\t * }\n\t * if ('core_inbox_unread_count' in changed) {\n\t * console.log('[smartico] inbox unread count changed — update the badge to:', profile.core_inbox_unread_count);\n\t * }\n\t * });\n\t *\n\t * // Affordability gating example — used inside a clan / tournament / store CTA handler.\n\t * const profile = window._smartico.api.getUserProfile();\n\t * const item = await window._smartico.api.getStoreItems().then(items => items[0]);\n\t * const price = item.discounted_price ?? item.price;\n\t * const balance = {\n\t * points: profile.ach_points_balance,\n\t * gems: profile.ach_gems_balance,\n\t * diamonds: profile.ach_diamonds_balance,\n\t * }[item.purchase_type];\n\t * if (balance < price) {\n\t * console.log('[smartico] insufficient', item.purchase_type, '— disable Buy and show deficit', price - balance);\n\t * }\n\t * ```\n\t */\n\tpublic getUserProfile(): TUserProfile {\n\t\tif (this.api.tracker) {\n\t\t\tconst o: TUserProfile = Object.assign({}, this.api.tracker.userPublicProps);\n\t\t\to.avatar_url = CoreUtils.avatarUrl(this.api.tracker.userPublicProps.avatar_id, this.api.avatarDomain);\n\t\t\treturn o;\n\t\t} else {\n\t\t\tthrow new Error('Tracker is not initialized, cannot getUserProfile');\n\t\t}\n\t}\n\n\t/** Check if user belongs to specific segments\n\t * **Example**:\n\t * ```\n\t * _smartico.api.checkSegmentMatch(1).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async checkSegmentMatch(segment_id: number): Promise<boolean> {\n\t\tconst r = await this.api.coreCheckSegments(this.userExtId, [segment_id]);\n\t\tif (r && r.find((s) => s.segment_id === segment_id && s.is_matching)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/** Check if user belongs to specific list of segments\n\t * **Example**:\n\t * ```\n\t * _smartico.api.checkSegmentListMatch([1, 2, 3]).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async checkSegmentListMatch(segment_ids: number[]): Promise<TSegmentCheckResult[]> {\n\t\treturn await this.api.coreCheckSegments(this.userExtId, Array.isArray(segment_ids) ? segment_ids : [segment_ids]);\n\t}\n\n\t/**\n\t * Returns the full level ladder configured for the current label —\n\t * one `TLevel` per active level, server-sorted by `required_points`\n\t * ASC (lowest first; `ordinal_position` is a 1-based index into the\n\t * returned array). Use this to render a level map / progression\n\t * screen, or as a lookup table to resolve `ach_level_current_id` from\n\t * {@link getUserProfile} into a richer level object.\n\t *\n\t * @remarks\n\t * **Server-side filtering**\n\t * The server returns ALL active levels for the label. There is NO\n\t * per-user filtering on visibility, level-status, or anything else —\n\t * the response is identical across users of the same label. Apply\n\t * `visibility_points` filtering client-side if you want to hide\n\t * not-yet-reached levels (compare against\n\t * `getUserProfile().ach_points_ever` and exclude levels where\n\t * `visibility_points > ach_points_ever`).\n\t *\n\t * **Sort order**\n\t * The returned array is already sorted by `required_points` ASC, and\n\t * `ordinal_position` is a 1-based index into that same sort order —\n\t * client-side re-sorting is not required for the default rendering.\n\t * If your label uses sliding-window leveling logic\n\t * (see {@link getUserLevelExtraCounters}) and you want to sort by\n\t * a multi-criteria key (`required_points`, then\n\t * `required_level_counter_1`, then `required_level_counter_2`), do\n\t * that client-side.\n\t *\n\t * **Cache TTL**: the SDK caches the response for 30 seconds. Cache\n\t * is fully cleared on login / logout. Operator-driven level edits\n\t * surface on the next cache miss.\n\t *\n\t * **Idempotency / Side effects**: safe. Read-only metadata. Calls\n\t * within the cache window de-duplicate to the same cached array.\n\t *\n\t * **UI guidance**: see [UI Guide — `getLevels`](../../docs/ui/user/UIGuide_getLevels.md).\n\t *\n\t * **Visitor mode**: supported. Use `_smartico.vapi(lang).getLevels()`\n\t * to fetch the ladder for anonymous viewers; the level configuration\n\t * is label-scoped static data so the response is meaningful even\n\t * without an authenticated user. Per-user fields (the implicit\n\t * \"current level\" via {@link getCurrentLevel}, or the user's progress)\n\t * are not available in visitor mode.\n\t *\n\t * @returns Promise resolving to the ordered `TLevel[]` ladder. Empty\n\t * if no levels are configured for the label.\n\t *\n\t * @example\n\t * ```ts\n\t * const [levels, profile] = await Promise.all([\n\t * window._smartico.api.getLevels(),\n\t * Promise.resolve(window._smartico.api.getUserProfile()),\n\t * ]);\n\t *\n\t * // Resolve the user's current level by ID.\n\t * const current = levels.find(l => l.id === profile.ach_level_current_id);\n\t * console.log('[smartico] render header badge — current level:', current?.name,\n\t * '(position', current?.ordinal_position, 'of', levels.length, ')');\n\t *\n\t * // Filter to levels the user has unlocked enough to see.\n\t * const visible = levels.filter(l =>\n\t * l.visibility_points == null || l.visibility_points <= profile.ach_points_ever\n\t * );\n\t * console.log('[smartico] render the level map with', visible.length, 'visible tiles');\n\t *\n\t * // Visitor-mode equivalent: returns the same ladder; no per-user state.\n\t * // const visitorLevels = await window._smartico.vapi('EN').getLevels();\n\t * ```\n\t */\n\tpublic async getLevels(): Promise<TLevel[]> {\n\t\treturn OCache.use(onUpdateContextKey.Levels, ECacheContext.WSAPI, () => this.api.levelsGetT(this.userExtId), CACHE_DATA_SEC);\n\t}\n\n\t/**\n\t * Returns the user's current level — every `TLevel` field plus a\n\t * computed `progress` percentage toward the next level. Use this to\n\t * power a level badge with a progress bar.\n\t *\n\t * @remarks\n\t * **How `progress` is computed**\n\t * The SDK derives `progress` as the *delta-from-current-level-floor*:\n\t * `(ach_points_ever − current.required_points) / (next.required_points\n\t * − current.required_points) × 100`, clamped to `[0, 100]`. At the\n\t * highest level (no next level), `progress` is `100`. Reading the\n\t * source values directly from {@link getUserProfile}'s\n\t * `ach_points_ever` and {@link getLevels} would also work, but\n\t * `progress` saves the math.\n\t *\n\t * **Cache TTL**: the SDK caches the response for 30 seconds. There is\n\t * no push event that refreshes this cache; a server-side level change\n\t * (visible immediately on {@link getUserProfile}'s `ach_level_current_id`\n\t * via the user-properties update channel) becomes visible on this\n\t * method only after the cache TTL expires, or after\n\t * `_smartico.api.clearCaches()` is called.\n\t *\n\t * **Leveling logic**\n\t * The semantics of how a user advances depends on the label's\n\t * leveling logic (configured per brand): points-only (the default),\n\t * sliding-window with extra counters (uses\n\t * {@link getUserLevelExtraCounters}), or fully-manual operator\n\t * assignment. The `progress` percentage on this method assumes the\n\t * points-only model — it's not meaningful for manual-only labels\n\t * where level changes are operator-driven rather than points-driven.\n\t *\n\t * **Idempotency**: safe. Read-only. Repeated calls within the cache\n\t * window return a deep-cloned cached value without a network\n\t * round-trip.\n\t *\n\t * **Side effects**: none — pure read.\n\t *\n\t * **Visitor mode**: not supported.\n\t *\n\t * @returns Promise resolving to `TLevelCurrent` — the current level\n\t * plus `progress: number` (0–100).\n\t *\n\t * @example\n\t * ```ts\n\t * const level = await window._smartico.api.getCurrentLevel();\n\t * console.log('[smartico] render level badge — name:', level.name,\n\t * 'progress:', Math.round(level.progress), '%');\n\t *\n\t * // Detect level-up via getUserProfile's push channel.\n\t * window._smartico.on('props_change', async (changed) => {\n\t * if ('ach_level_current_id' in changed) {\n\t * await window._smartico.api.clearCaches(); // bust the 30 s cache\n\t * const fresh = await window._smartico.api.getCurrentLevel();\n\t * console.log('[smartico] user levelled up — animate badge to new level:', fresh.name);\n\t * }\n\t * });\n\t * ```\n\t */\n\tpublic async getCurrentLevel(): Promise<TLevelCurrent> {\n\t\treturn OCache.use(onUpdateContextKey.CurrentLevel, ECacheContext.WSAPI, () => this.api.getLevelCurrent(this.userExtId), CACHE_DATA_SEC);\n\t}\n\n\t/**\n\t * Returns the user's current values for the two label-defined \"extra\n\t * counters\" used by sliding-window leveling logic. Operators\n\t * configure what each counter means per label (e.g. `level_counter_1`\n\t * = total deposits in the last 30 days, `level_counter_2` = total\n\t * wagering in the last 30 days). Compare against\n\t * `required_level_counter_1` / `_2` on the next level from\n\t * {@link getLevels} to know how close the user is to advancing.\n\t *\n\t * @remarks\n\t * **When this matters**\n\t * Only labels configured for sliding-window leveling populate the\n\t * counter fields. On the default points-only leveling model, both\n\t * `level_counter_1` and `level_counter_2` are `undefined`. Detect\n\t * a points-only label by either counter being `undefined`.\n\t *\n\t * **Counter semantics — operator-defined**\n\t * The SDK exposes raw numeric values; the meaning of each counter\n\t * (deposit amount, wager amount, lifetime spend, etc.) is fully\n\t * operator-defined per label. Resolve labels for display via\n\t * {@link getTranslations} — the operator's display strings are\n\t * stored under the translation keys `levelsCounter1Name` and\n\t * `levelsCounter2Name`.\n\t *\n\t * **Refresh cadence**\n\t * Sliding-window counters are recomputed by a server-side job that\n\t * runs roughly every 60 seconds against the operator's BigQuery\n\t * dataset; level transitions driven by counter changes have a\n\t * latency of up to several minutes after the underlying activity\n\t * (e.g. a deposit). The SDK caches the response for 30 seconds; no\n\t * push event refreshes this cache. After a level change visible on\n\t * {@link getUserProfile}'s `ach_level_current_id`, call\n\t * `_smartico.api.clearCaches()` to force a fresh fetch.\n\t *\n\t * **Idempotency**: safe. Read-only. Repeated calls within the cache\n\t * window return a deep-cloned cached value without a network\n\t * round-trip.\n\t *\n\t * **Side effects**: none — pure read.\n\t *\n\t * **Visitor mode**: not supported.\n\t *\n\t * @returns Promise resolving to `UserLevelExtraCountersT`. Both\n\t * fields are `undefined` on labels not using sliding-window\n\t * leveling.\n\t *\n\t * @example\n\t * ```ts\n\t * const [counters, levels, profile] = await Promise.all([\n\t * window._smartico.api.getUserLevelExtraCounters(),\n\t * window._smartico.api.getLevels(),\n\t * Promise.resolve(window._smartico.api.getUserProfile()),\n\t * ]);\n\t *\n\t * // Quick detection: undefined means this label doesn't use sliding-window leveling.\n\t * if (counters.level_counter_1 === undefined) {\n\t * console.log('[smartico] points-only label — skip counter UI; show points progress only');\n\t * return;\n\t * }\n\t *\n\t * // Find the next level and render a 3-bar progress block.\n\t * const currentIdx = levels.findIndex(l => l.id === profile.ach_level_current_id);\n\t * const next = levels[currentIdx + 1];\n\t * if (next) {\n\t * console.log('[smartico] render points bar:', profile.ach_points_ever, '/', next.required_points);\n\t * if (next.required_level_counter_1) {\n\t * console.log('[smartico] render counter 1 bar:', counters.level_counter_1, '/', next.required_level_counter_1);\n\t * }\n\t * if (next.required_level_counter_2) {\n\t * console.log('[smartico] render counter 2 bar:', counters.level_counter_2, '/', next.required_level_counter_2);\n\t * }\n\t * }\n\t * ```\n\t */\n\tpublic async getUserLevelExtraCounters(): Promise<UserLevelExtraCountersT> {\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.LevelExtraCounters,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.getUserGamificationInfoT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Returns the activity log for a user within a specified time range.\n\t * The response includes both points changes and gems/diamonds changes.\n\t * Each log entry contains information about the change amount, balance, and source.\n\t * The returned list is cached for 30 seconds.\n\t * You can pass the onUpdate callback as a parameter, it will be called every time the activity log is updated and will provide the updated list of activity logs for the last 10 minutes.\n\t *\n\t * **Example**:\n\t * ```\n\t * const startTime = Math.floor(Date.now() / 1000) - 86400 * 30; // 30 days ago\n\t * const endTime = Math.floor(Date.now() / 1000); // now\n\t *\n\t * _smartico.api.getActivityLog({\n\t * startTimeSeconds: startTime,\n\t * endTimeSeconds: endTime,\n\t * from: 0,\n\t * to: 50,\n\t * onUpdate: (data) => console.log('Updated:', data)\n\t * }).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t *\n\t * @param params - Activity log parameters\n\t * @param params.startTimeSeconds - Start time in seconds (epoch timestamp)\n\t * @param params.endTimeSeconds - End time in seconds (epoch timestamp)\n\t * @param params.from - Start index of records to return\n\t * @param params.to - End index of records to return\n\t * @param params.onUpdate - Optional callback function that will be called when the activity log is updated\n\t */\n\tpublic async getActivityLog({\n\t\tstartTimeSeconds,\n\t\tendTimeSeconds,\n\t\tfrom,\n\t\tto,\n\t\tonUpdate,\n\t}: {\n\t\tstartTimeSeconds: number;\n\t\tendTimeSeconds: number;\n\t\tfrom: number;\n\t\tto: number;\n\t\tonUpdate?: (data: TActivityLog[]) => void;\n\t}): Promise<TActivityLog[]> {\n\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.ActivityLog, onUpdate);\n\t\t}\n\n\t\treturn await OCache.use(\n\t\t\tonUpdateContextKey.ActivityLog,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.getActivityLogT(this.userExtId, startTimeSeconds, endTimeSeconds, from, to),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\tprotected async notifyActivityLogUpdate() {\n\t\tconst startSeconds = Date.now() / 1000 - 600;\n\t\tconst endSeconds = Date.now() / 1000;\n\t\tconst payload = await this.api.getActivityLogT(this.userExtId, startSeconds, endSeconds, 0, 50);\n\n\t\tthis.updateEntity(onUpdateContextKey.ActivityLog, payload);\n\t}\n}\n","import { ECacheContext, OCache } from '../OCache';\nimport {\n\tTGetTranslations,\n\tTUICustomSection,\n} from './WSAPITypes';\nimport { GetRelatedAchTourResponse } from '../Missions/GetRelatedAchTourResponse';\nimport {\n\tCACHE_DATA_SEC,\n\tonUpdateContextKey,\n} from './WSAPIBase';\nimport { WSAPIUser } from './WSAPIUser';\n\n/** @group General */\nexport class WSAPIGeneral extends WSAPIUser {\n\tpublic async getCustomSections(): Promise<TUICustomSection[]> {\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.CustomSections,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.customSectionsGetT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Requests translations for the given language. Returns the object including translation key/translation value pairs. All possible translation keys defined in the back office.\n\t */\n\tpublic async getTranslations(lang_code: string): Promise<TGetTranslations> {\n\t\tconst r = await this.api.getTranslationsT(this.userExtId, lang_code, []);\n\n\t\treturn {\n\t\t\ttranslations: r.translations,\n\t\t};\n\t}\n\n\t/**\n\t * Returns all the related tournaments and missions for the provided game id for the current user\n\t * The provided Game ID should correspond to the ID from the Games Catalog - https://help.smartico.ai/welcome/technical-guides/games-catalog-api\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getRelatedItemsForGame('gold-slot2').then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * ```\n\t * _smartico.vapi('EN').getRelatedItemsForGame('gold-slot2').then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t */\n\tpublic async getRelatedItemsForGame(related_game_id: string): Promise<GetRelatedAchTourResponse> {\n\t\tconst result = await this.api.getRelatedItemsForGame(this.userExtId, related_game_id);\n\t\treturn result;\n\t}\n}\n","import { ECacheContext, OCache } from '../OCache';\nimport {\n\tTAchCategory,\n\tTMissionClaimRewardResult,\n\tTMissionOptInResult,\n\tTMissionOrBadge,\n} from './WSAPITypes';\nimport {\n\tCACHE_DATA_SEC,\n\tonUpdateContextKey,\n} from './WSAPIBase';\nimport { WSAPIGeneral } from './WSAPIGeneral';\n\n/** @group Missions */\nexport class WSAPIMissions extends WSAPIGeneral {\n\t/**\n\t * Returns all missions visible to the current user, scoped server-side\n\t * to what the user is qualified to see. Optionally subscribes to live\n\t * updates via `onUpdate`: the callback is invoked with the full, refreshed\n\t * mission array whenever the server pushes a mission-state-changing event.\n\t *\n\t * The returned list is the canonical source of truth for mission state\n\t * (`is_opted_in`, `progress`, `is_completed`, `completion_count`, etc.).\n\t * Consumers should NEVER mutate it optimistically — always wait for the\n\t * `onUpdate` callback (or a fresh `getMissions()` call after the 30s cache\n\t * window expires) to observe the new state.\n\t *\n\t * @remarks\n\t * **Subscription model (`onUpdate`)**\n\t * The callback receives the FULL refreshed mission array (never a\n\t * diff/patch). Each subsequent call to `getMissions({ onUpdate })`\n\t * REPLACES the prior callback — only one active subscriber at a time.\n\t * Pass `onUpdate: undefined` (or omit it) to keep the prior callback in\n\t * place; the callback is never auto-cleared.\n\t *\n\t * **Update triggers** — the callback fires when:\n\t * 1. **Mutation responses**: `requestMissionOptIn(...)` or\n\t * `requestMissionClaimReward(...)` resolves (any `err_code`).\n\t * 2. **Asynchronous server pushes**: a user activity (deposit, bet,\n\t * login, etc.) advances task progress on a task configured to push\n\t * updates, or completes a mission.\n\t * 3. **Visibility changes**: the user's level changes, or other\n\t * gamification visibility tags change.\n\t *\n\t * Operator-side BO mission-config edits do NOT push to connected\n\t * clients — those changes surface only on the next cache miss (after\n\t * the 30 s TTL) or alongside the next trigger from (1)–(3).\n\t *\n\t * **What's in the returned list / what's filtered server-side**\n\t * The response is pre-filtered by the server. Missions EXCLUDED before\n\t * reaching the SDK:\n\t * - Missions in `DRAFT` or `ARCHIVED` status (see {@link AchievementStatus}).\n\t * - Missions where the user fails visibility conditions. Exception:\n\t * completed missions may remain visible after the user no longer\n\t * qualifies (configurable per-brand).\n\t * - `FEATURED_MANUALLY` missions that are still locked — they appear\n\t * only after the user unlocks them.\n\t * - Locked missions configured to hide while locked — UNLESS the\n\t * mission is configured to expose immediately on unlock (then the\n\t * locked mission is included as a teaser).\n\t * - `RECURRING` missions between cycles, until the next cycle starts.\n\t * - `RECURRING_QUANTITY` missions outside their `active_from_ts` /\n\t * `active_till_ts` window.\n\t *\n\t * Client-side filtering you may still want: missions with\n\t * `only_in_custom_section: true` are intended for their custom-section\n\t * view only and should be hidden from the main mission list.\n\t *\n\t * **Reading state from the returned mission**\n\t * Drive availability chips (\"missed\", \"coming soon\", \"needs opt-in\",\n\t * \"in progress\", \"expired\") from `availability_status` (enum\n\t * {@link AchievementAvailabilityStatus}) — it's the canonical derived\n\t * state and reflects all server-side timing/visibility rules in one\n\t * field. For time-limited and recurring missions, `dt_start` doubles\n\t * as the opt-in timestamp (for opt-in missions) or unlock timestamp\n\t * (for previously-locked missions); the expiration of a time-limited\n\t * mission is `dt_start + time_limit_ms`. `next_recurrence_date_ts`\n\t * is populated for `RECURRING` / `RECURRING_QUANTITY` missions but\n\t * is no longer meaningful once the mission's `active_till_ts` has\n\t * passed.\n\t *\n\t * **Refresh after a mutation**\n\t * After `requestMissionOptIn(...)` or `requestMissionClaimReward(...)`\n\t * resolves, the SDK auto-refreshes the mission cache; the `onUpdate`\n\t * callback fires with the new array shortly after. `is_opted_in`,\n\t * `progress`, and `is_completed` flip on the refreshed mission — do\n\t * NOT mutate them optimistically while the round-trip is pending.\n\t * Render any pending state from your own loading flag.\n\t *\n\t * **UI guidance**: see [UI Guide — `getMissions`](../../docs/ui/missions/UIGuide_getMissions.md).\n\t *\n\t * @param params Optional. Omit to fetch without subscribing.\n\t * @param params.onUpdate Callback invoked with the full refreshed\n\t * mission array on every server-pushed update\n\t * (after opt-in / claim-reward calls, or when\n\t * the server pushes an asynchronous\n\t * mission-state change). Each call to\n\t * `getMissions` overwrites the prior callback.\n\t * Never fires in visitor mode.\n\t * @returns Promise resolving to the current list of\n\t * missions visible to the user. Empty array if\n\t * the user has no missions (or if the visitor\n\t * proxy user has none configured).\n\t *\n\t * @example\n\t * ```ts\n\t * // 1. Initial fetch + subscribe to live updates\n\t * const missions = await window._smartico.api.getMissions({\n\t * onUpdate: (refreshed) => {\n\t * console.log('[smartico] mission list refreshed — re-render the entire mission list UI from this array, do not merge with prior state:', refreshed);\n\t *\n\t * // 2. onUpdate fires for: opt-in/claim responses, task-progress\n\t * // pushes that complete a mission or move a \"pushToClient\" task,\n\t * // and user-level changes. Treat each call as authoritative.\n\t * const claimable = refreshed.filter(m =>\n\t * m.is_completed && m.requires_prize_claim && !m.prize_claimed_date_ts,\n\t * );\n\t * if (claimable.length > 0) {\n\t * console.log('[smartico] there are unclaimed mission prizes — surface a \"Claim\" CTA on each of these missions:', claimable.map(m => m.id));\n\t * }\n\t * },\n\t * });\n\t *\n\t * // 3. Filter/render from the returned list. The server already excludes\n\t * // DRAFT/ARCHIVED missions and ones the user can't see. You may need\n\t * // client-side filters for view-specific concerns (custom sections,\n\t * // completed/missed tabs).\n\t * const generalView = missions\n\t * .filter(m => !m.only_in_custom_section)\n\t * .sort((a, b) => (a.position ?? 0) - (b.position ?? 0));\n\t *\n\t * console.log('[smartico] initial mission list ready — render', generalView.length, 'missions sorted by position');\n\t *\n\t * // 4. Visitor-mode equivalent: onUpdate is accepted but never fires.\n\t * // Re-poll if you need fresh data.\n\t * // const visitorMissions = await window._smartico.vapi('EN').getMissions();\n\t * // console.log('[smartico] visitor missions are the brand proxy user\\'s — per-user fields are not meaningful');\n\t * ```\n\t */\n\tpublic async getMissions({ onUpdate }: { onUpdate?: (data: TMissionOrBadge[]) => void } = {}): Promise<TMissionOrBadge[]> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.Missions, onUpdate);\n\t\t}\n\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.Missions,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.missionsGetItemsT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Returns all the badges available to the current user.\n\t *\n\t * Badges are completion-tracked achievements that auto-unlock once the user\n\t * meets their criteria — there is no opt-in step, no claim step, and no\n\t * task-description reveal. Contrast with {@link getMissions}, which returns\n\t * the same `TMissionOrBadge[]` shape but represents explicit opt-in flows.\n\t *\n\t * @remarks\n\t * **Why no `onUpdate` callback?**\n\t * Unlike `getMissions({ onUpdate })`, this method does NOT accept an\n\t * `onUpdate` subscription. Internally the SDK never refreshes the `Badges`\n\t * cache from server pushes: the achievement-related push events\n\t * (mission opt-in / claim / reload) refresh the missions cache, NOT\n\t * the badges cache. The badges cache is flushed only by:\n\t * - its 30-second TTL\n\t * - a full SDK cache wipe at login / logout\n\t *\n\t * **How to refresh the badge list**\n\t * If you need near-live badge state, poll manually after the TTL expires.\n\t * The first call inside the 30 s window returns the cached payload; the\n\t * first call after the TTL triggers a fresh server round-trip. Example:\n\t * ```ts\n\t * setInterval(async () => {\n\t * const badges = await window._smartico.api.getBadges();\n\t * console.log('[smartico] badge list polled — re-render badge grid from this array', badges);\n\t * }, 30_000);\n\t * ```\n\t * Alternatively, re-fetch on a domain event your app already handles\n\t * (e.g. after the user finishes a game round or claims a bonus).\n\t *\n\t * **Differences from missions** (same `TMissionOrBadge` shape, different\n\t * feature)\n\t * The opt-in, claim, recurring-cycle, and unlock-description fields on\n\t * the returned objects are not populated for badges; treat their values\n\t * as undefined / default. Time windows are absolute calendar timestamps\n\t * (`active_from_ts` / `active_till_ts`), not opt-in-relative durations —\n\t * drive availability chips from the SDK-computed `badgeTimeLimitState`\n\t * (enum {@link BadgesTimeLimitStates}), not `time_limit_ms`. Locking for\n\t * badges is purely time-based: `is_locked` is `true` only when\n\t * `badgeTimeLimitState === BadgesTimeLimitStates.BeforeStartDate` (the\n\t * time window hasn't started yet). The primary navigation field is\n\t * `category_ids` — call {@link getAchCategories} to resolve category\n\t * metadata and group badges by category.\n\t *\n\t * **Idempotency / Side effects**: fetch-only; safe to call repeatedly.\n\t * The cache layer deduplicates concurrent calls within the TTL window.\n\t *\n\t * **UI guidance**: see [UI Guide — `getBadges`](../../docs/ui/missions/UIGuide_getBadges.md).\n\t *\n\t * @returns Promise resolving to `TMissionOrBadge[]`. Every item has\n\t * `type === 'badge'`. Cached for 30 s under the `Badges` key.\n\t *\n\t * @example\n\t * ```ts\n\t * const [badges, categories] = await Promise.all([\n\t * window._smartico.api.getBadges(),\n\t * window._smartico.api.getAchCategories(),\n\t * ]);\n\t *\n\t * console.log('[smartico] badges fetched — render grouped grid with', badges.length, 'badges across', categories.length, 'categories');\n\t *\n\t * for (const category of categories) {\n\t * const inCategory = badges.filter(b => b.category_ids?.includes(category.id));\n\t * const completed = inCategory.filter(b => b.is_completed).length;\n\t * console.log(`[smartico] render category section \"${category.name}\" header showing ${completed}/${inCategory.length}`);\n\t *\n\t * for (const badge of inCategory) {\n\t * // Use badgeTimeLimitState (not time_limit_ms) for availability chip\n\t * if (badge.badgeTimeLimitState === 0) { // BadgesTimeLimitStates.BeforeStartDate\n\t * console.log('[smartico] badge not yet started — render grayscaled card with \"Starts on\" chip for badge', badge.id);\n\t * } else if (badge.is_completed) {\n\t * console.log('[smartico] badge completed — render with completed styling and check-mark for badge', badge.id);\n\t * } else {\n\t * console.log('[smartico] badge in progress — render with stage counter (completed_tasks / total) for badge', badge.id);\n\t * }\n\t * }\n\t * }\n\t *\n\t * // No onUpdate available — poll if live state matters\n\t * setInterval(async () => {\n\t * try {\n\t * const fresh = await window._smartico.api.getBadges();\n\t * console.log('[smartico] badge poll tick — diff against previous list and re-render any changed badge cards', fresh);\n\t * } catch (e) {\n\t * console.error('[smartico] badge poll failed — keep showing last known state, retry on next tick:', e);\n\t * }\n\t * }, 30_000);\n\t * ```\n\t */\n\tpublic async getBadges(): Promise<TMissionOrBadge[]> {\n\t\treturn OCache.use(onUpdateContextKey.Badges, ECacheContext.WSAPI, () => this.api.badgetsGetItemsT(this.userExtId), CACHE_DATA_SEC);\n\t}\n\n\t/**\n\t * Returns the list of active mission/badge categories configured for the current label.\n\t * Categories are operator-defined groupings used to organize missions and badges into\n\t * sections, tabs, or filter chips in the gamification UI. The same category list serves\n\t * BOTH missions and badges — there is no separate \"mission categories\" vs \"badge\n\t * categories\" split on the server.\n\t *\n\t * @remarks\n\t * **What categories are**\n\t * - Operator-defined groupings, configured per-label by the brand operator.\n\t * Only active categories are returned; inactive/deleted ones are filtered out.\n\t * - Each `TAchCategory` exposes `{ id, name, order }`. `name` is the display label;\n\t * `order` is the relative position (lower = appears first).\n\t * - The same array covers BOTH missions and badges — categories are not filtered by\n\t * entity type on the server.\n\t *\n\t * **Localization / translation**\n\t * - `name` is **pre-translated server-side** to the authenticated user's stored language.\n\t * In visitor mode, the language passed to `_smartico.vapi(lang)` drives the\n\t * translation. Consumers never need to translate `name` themselves.\n\t * - Fallback if no translation exists for the user's language: the brand's EN value\n\t * is returned. The field is never null.\n\t *\n\t * **Sort order**\n\t * The server does NOT pre-sort. Sort client-side before rendering:\n\t * `categories.sort((a, b) => a.order - b.order)`.\n\t *\n\t * **How missions/badges join to categories**\n\t * Each `TMissionOrBadge` exposes `category_ids: number[]` (zero-or-more,\n\t * many-to-many). A single mission/badge can belong to multiple categories\n\t * simultaneously, or to none. To render a \"category → items\" view:\n\t * `missions.filter(m => m.category_ids.includes(cat.id))`.\n\t *\n\t * **Uncategorized items**\n\t * Items with `category_ids: []` are NOT represented by a synthetic \"Other\" entry.\n\t * If your UI needs one, generate it client-side by checking\n\t * `item.category_ids.length === 0`.\n\t *\n\t * **Empty categories**\n\t * A category may be returned even if zero missions/badges reference it. Filter\n\t * out empty categories on the consumer side if you don't want to render section\n\t * headers for them.\n\t *\n\t * **Refresh cadence / cache**\n\t * - The SDK caches the response for 30 seconds. Subsequent calls within that\n\t * window return the cached array without a network round-trip.\n\t * - The cache is NOT invalidated by mission/badge push events — operator-driven\n\t * category changes propagate at the next 30 s cache miss.\n\t * - Cache is fully cleared on login / logout.\n\t * - In **visitor mode** additional server-side caching applies on top of the\n\t * SDK cache; worst-case staleness for an edited/added category is on the order\n\t * of a few minutes for anonymous viewers.\n\t *\n\t * **Idempotency**: safe. Read-only metadata fetch. Cache de-duplicates concurrent calls.\n\t *\n\t * **Side effects**: none — pure metadata read.\n\t *\n\t * **UI guidance**: see [UI Guide — `getAchCategories`](../../docs/ui/missions/UIGuide_getAchCategories.md).\n\t *\n\t * @returns Array of `{ id, name, order }`. Empty array if no active categories are\n\t * configured for the label. `name` is pre-translated. Order is NOT applied — caller\n\t * must sort.\n\t *\n\t * @example\n\t * ```ts\n\t * const categories = await window._smartico.api.getAchCategories();\n\t *\n\t * if (categories.length === 0) {\n\t * console.log('[smartico] no categories configured — render missions/badges as a flat list without section headers');\n\t * } else {\n\t * const sorted = [...categories].sort((a, b) => a.order - b.order);\n\t * console.log('[smartico] categories loaded — render one tab/section per entry in this order:', sorted.map(c => c.name));\n\t *\n\t * // Join to missions: render each category as a section\n\t * const missions = await window._smartico.api.getMissions();\n\t * for (const cat of sorted) {\n\t * const items = missions.filter(m => m.category_ids.includes(cat.id));\n\t * if (items.length === 0) {\n\t * console.log('[smartico] category has no missions — skip rendering its section header:', cat.name);\n\t * continue;\n\t * }\n\t * console.log(`[smartico] render section \"${cat.name}\" with ${items.length} mission(s)`);\n\t * }\n\t *\n\t * // Uncategorized items: surface in a caller-provided \"Other\" bucket if needed\n\t * const uncategorized = missions.filter(m => m.category_ids.length === 0);\n\t * if (uncategorized.length > 0) {\n\t * console.log('[smartico] uncategorized missions exist — render a caller-provided \"Other\" section; server does NOT return id:-1:', uncategorized.length);\n\t * }\n\t * }\n\t *\n\t * // Visitor mode — same shape, language driven by vapi(lang) argument\n\t * const visitorCats = await window._smartico.vapi('DE').getAchCategories();\n\t * console.log('[smartico] visitor-mode categories (names translated to DE):', visitorCats);\n\t * ```\n\t */\n\tpublic async getAchCategories(): Promise<TAchCategory[]> {\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.AchCategories,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.achGetCategoriesT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Opt the current user in to a mission. The mission must have\n\t * `is_requires_optin: true` (from `getMissions()`) and must not already\n\t * be opted-in or locked. After a successful opt-in, the user's task\n\t * progress starts counting toward this mission — events fired BEFORE\n\t * opt-in do not count retroactively (except `UNLOCK_ACHIEVEMENT` tasks,\n\t * which are exempt and can fire pre-opt-in).\n\t *\n\t * @remarks\n\t * **Preconditions**\n\t * Only call when the mission has `is_requires_optin === true`,\n\t * `is_opted_in === false`, and `is_locked === false`. Calling on a\n\t * mission that does not require opt-in is wasted; calling twice returns\n\t * `40010`.\n\t *\n\t * **Error codes** (in `err_code`)\n\t * - `0` — success; task progress counting begins\n\t * - `105` — wrong mission id (different label) OR visibility conditions\n\t * not met. Same code covers both; use `err_message` to disambiguate.\n\t * - `40010` — already opted-in. Safe to treat as \"no-op success\"; usually\n\t * means local mission state was stale (e.g. user opted in from another\n\t * session/tab).\n\t * - `40013` — mission not opt-in-able: missing `requires_optin`, in\n\t * DRAFT/ARCHIVED state, or outside its `active_from_ts` /\n\t * `active_till_ts` window.\n\t * - `40014` — mission is locked; user has unlock-tasks remaining.\n\t * Surface the mission's `unlock_mission_description` to guide them.\n\t * - other non-zero — generic server error. Surface `err_message` if any.\n\t *\n\t * **Time-limited missions**\n\t * For missions with `time_limit_ms > 0`, the countdown begins at opt-in\n\t * time, not at mission creation. Server records expiration as\n\t * `optin_date + time_limit_ms`.\n\t *\n\t * **Refresh after success**\n\t * The SDK refreshes its mission cache automatically on opt-in response;\n\t * any `onUpdate` callback passed to a prior `getMissions({ onUpdate })`\n\t * fires with the new state shortly after. No manual re-fetch needed.\n\t *\n\t * **Idempotency**: not idempotent. A second call returns `40010`. Guard\n\t * the call site against double-clicks.\n\t *\n\t * **Side effects**: does NOT award points / badges / levels directly.\n\t * Rewards come from task completion, which is itself gated on opt-in.\n\t * May affect visibility of other missions whose visibility conditions\n\t * depend on this opt-in.\n\t *\n\t * **UI guidance**: see [UI Guide — `requestMissionOptIn`](../../docs/ui/missions/UIGuide_requestMissionOptIn.md).\n\t *\n\t * **Visitor mode: not supported**\n\t *\n\t * @param mission_id The mission `id` (from `getMissions()`)\n\t * @returns `{ err_code, err_message }`; success when `err_code === 0`\n\t *\n\t * @example\n\t * ```ts\n\t * const missions = await window._smartico.api.getMissions({\n\t * onUpdate: (m) => console.log('[smartico] mission list updated — re-render mission UI from this new array', m),\n\t * });\n\t * const mission = missions.find(m => m.id === missionId);\n\t *\n\t * if (!mission || !mission.is_requires_optin || mission.is_opted_in || mission.is_locked) {\n\t * console.log('[smartico] opt-in not applicable — keep UI as-is');\n\t * return;\n\t * }\n\t *\n\t * console.log('[smartico] opt-in starting — show loading spinner on opt-in button and disable it to prevent double-clicks');\n\t * const r = await window._smartico.api.requestMissionOptIn(mission.id);\n\t * console.log('[smartico] opt-in response received — clear loading spinner');\n\t *\n\t * if (r.err_code === 0 || r.err_code === 40010) {\n\t * console.log('[smartico] opt-in succeeded (or was already done) — onUpdate above will fire with refreshed mission state; no manual re-fetch needed');\n\t * } else if (r.err_code === 40014) {\n\t * console.error('[smartico] mission is locked — surface the unlock description as guidance:', mission.unlock_mission_description);\n\t * } else {\n\t * console.error('[smartico] opt-in failed — show an error toast with this message to the user:', r.err_message);\n\t * }\n\t * ```\n\t */\n\tpublic async requestMissionOptIn(mission_id: number): Promise<TMissionOptInResult> {\n\t\tconst r = await this.api.missionOptIn(this.userExtId, mission_id);\n\n\t\tconst o: TMissionOptInResult = {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t};\n\n\t\treturn o;\n\t}\n\n\t/**\n\t * Claim the prize for a completed mission. This is the step that runs\n\t * AFTER `requestMissionOptIn()` (when applicable) and AFTER the user has\n\t * completed all of the mission's tasks. Only call when the mission has\n\t * `requires_prize_claim === true`, `is_completed === true`, and the prize\n\t * has not already been claimed.\n\t *\n\t * The points / bonuses / badge grants associated with the mission are\n\t * awarded server-side synchronously inside this call (before the response\n\t * is returned), so a successful response (`err_code === 0`) means the\n\t * reward has already landed in the user's account.\n\t *\n\t * @remarks\n\t * **Preconditions**\n\t * Only call when, on the mission object from `getMissions()`:\n\t * - `is_completed === true`\n\t * - `requires_prize_claim === true`\n\t * - `prize_claimed_date_ts == null` (i.e. not already claimed)\n\t * - `prize_claim_expiration_date` is `null` OR still in the future\n\t *\n\t * The `ach_completed_id` argument must be passed straight from the same\n\t * mission object (`mission.ach_completed_id`). It is a server-side primary\n\t * key identifying the specific completion row; the SDK consumer should\n\t * never synthesise or cache it across sessions — always re-read it from a\n\t * fresh `getMissions()` result.\n\t *\n\t * **Error codes** (in `err_code`)\n\t * - `0` — success; the prize was claimed and rewards have been credited.\n\t * - `1` — generic server error. Covers several distinct underlying\n\t * conditions, all collapsed into the same code: stale or wrong\n\t * `ach_completed_id` (does not match user / mission), the mission no\n\t * longer requiring a prize claim, the mission being archived/draft,\n\t * label mismatch, or the completion being too old (server enforces a\n\t * freshness window of several months). Recovery: re-fetch missions\n\t * with `getMissions()`; if the mission still appears claimable,\n\t * surface a generic error.\n\t * - `40015` — claim window expired (`prize_claim_expiration_date` has\n\t * passed). Show a \"claim period ended\" message; do not retry.\n\t * - `40016` — mission is not completed yet. Indicates a race or a stale\n\t * local cache. Re-fetch via `getMissions()`; if `is_completed` is still\n\t * false, the UI should hide the claim button.\n\t * - `40017` — prize already claimed. Treat as idempotent success: refresh\n\t * the mission list (auto-refresh will fire) and hide the claim button.\n\t * Usually means another tab/session already claimed it.\n\t * - other non-zero — generic server error. Surface `err_message` if any.\n\t *\n\t * **Recurring missions**\n\t * The server transparently handles both one-shot and recurring mission\n\t * completions. The SDK consumer passes a single `ach_completed_id`\n\t * regardless of mission type; the server resolves the correct completion.\n\t *\n\t * **Refresh after success**\n\t * On any claim response (success OR failure), the SDK automatically\n\t * re-fetches the mission list and fires any `onUpdate` callback\n\t * registered via `getMissions({ onUpdate })`. No manual re-fetch needed.\n\t * Note: points balance, badges, and level state arrive through their\n\t * own push channels — subscribe to them separately if your UI shows\n\t * those values.\n\t *\n\t * **Idempotency**: not idempotent at the row level. A second call on the\n\t * same `ach_completed_id` returns `40017` (already claimed). For a stale\n\t * `ach_completed_id` the second call returns `1`. Guard the call site\n\t * against double-clicks; the SDK does not enforce its own in-flight lock.\n\t *\n\t * **Side effects** (consumer-observable effects of a successful claim):\n\t * - Points credited to the user's balance.\n\t * - CRM-rule activities executed (may grant bonuses, badges; may unlock\n\t * follow-up missions, which arrive as a later mission auto-refresh).\n\t * - Analytics / automation events fired downstream; not directly observable\n\t * in the response, but visible via the mission auto-refresh and any\n\t * subsequent bonus / badge updates.\n\t *\n\t * **UI guidance**: see [UI Guide — `requestMissionClaimReward`](../../docs/ui/missions/UIGuide_requestMissionClaimReward.md).\n\t *\n\t * @param mission_id The mission `ach_id` (from `getMissions()`).\n\t * @param ach_completed_id The completion-row identifier, read from\n\t * `mission.ach_completed_id` on the same mission\n\t * object fetched via `getMissions()`. Never\n\t * fabricate or cache across sessions.\n\t * @returns `{ err_code, err_message }`; success when `err_code === 0`\n\t * (or `40017` when treated as idempotent no-op).\n\t *\n\t * @example\n\t * ```ts\n\t * const missions = await window._smartico.api.getMissions({\n\t * onUpdate: (m) => console.log('[smartico] mission list updated — re-render mission UI from this new array', m),\n\t * });\n\t * const mission = missions.find(m => m.ach_id === missionId);\n\t *\n\t * if (\n\t * !mission ||\n\t * !mission.is_completed ||\n\t * !mission.requires_prize_claim ||\n\t * mission.prize_claimed_date_ts ||\n\t * (mission.prize_claim_expiration_date && Date.now() >= mission.prize_claim_expiration_date)\n\t * ) {\n\t * console.log('[smartico] claim not applicable — keep claim button hidden');\n\t * return;\n\t * }\n\t *\n\t * console.log('[smartico] claim starting — show loading spinner on claim button and disable it to prevent double-clicks');\n\t * const r = await window._smartico.api.requestMissionClaimReward(mission.ach_id, mission.ach_completed_id);\n\t * console.log('[smartico] claim response received — clear loading spinner');\n\t *\n\t * if (r.err_code === 0 || r.err_code === 40017) {\n\t * console.log('[smartico] claim succeeded (or was already claimed) — points/bonuses are credited; mission list auto-refresh will fire via the onUpdate above; hide the claim button');\n\t * } else if (r.err_code === 40015) {\n\t * console.error('[smartico] claim window expired — show a \"claim period ended\" message and remove the claim button:', mission.prize_claim_expiration_date);\n\t * } else if (r.err_code === 40016) {\n\t * console.error('[smartico] mission reported as not completed by server — local state was stale; auto-refresh will reconcile, do not retry');\n\t * } else {\n\t * console.error('[smartico] claim failed — show an error toast with this message to the user (and re-fetch missions to recover from a stale ach_completed_id):', r.err_message);\n\t * }\n\t * ```\n\t */\n\tpublic async requestMissionClaimReward(mission_id: number, ach_completed_id: number): Promise<TMissionClaimRewardResult> {\n\t\tconst r = await this.api.missionClaimPrize(this.userExtId, mission_id, ach_completed_id);\n\n\t\tconst o: TMissionClaimRewardResult = {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t};\n\n\t\treturn o;\n\t}\n\n\tprotected async updateMissions() {\n\t\tconst payload = await this.api.missionsGetItemsT(this.userExtId);\n\t\tthis.updateEntity(onUpdateContextKey.Missions, payload);\n\t}\n}\n","import { ECacheContext, OCache } from '../OCache';\nimport {\n\tTBonus,\n\tTClaimBonusResult,\n} from './WSAPITypes';\nimport {\n\tCACHE_DATA_SEC,\n\tonUpdateContextKey,\n} from './WSAPIBase';\nimport { WSAPIMissions } from './WSAPIMissions';\n\n/** @group Bonuses */\nexport class WSAPIBonuses extends WSAPIMissions {\n\t/**\n\t * Returns all the bonuses for the current user\n\t * The returned bonuses are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.\n\t * Note that each time you call getBonuses with a new onUpdate callback, the old one will be overwritten by the new one.\n\t * The onUpdate callback will be called on bonus claimed and the updated bonuses will be passed to it.\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async getBonuses({ onUpdate }: { onUpdate?: (data: TBonus[]) => void } = {}): Promise<TBonus[]> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.Bonuses, onUpdate);\n\t\t}\n\n\t\treturn OCache.use(onUpdateContextKey.Bonuses, ECacheContext.WSAPI, () => this.api.bonusesGetItemsT(this.userExtId), CACHE_DATA_SEC);\n\t}\n\n\t/**\n\t * Claim the bonus by bonus_id. Returns the err_code in case of success or error.\n\t * Note that this method can be used only on integrations where originally failed bonus can be claimed again.\n\t * For example, user won a bonus in the mini-game, but Operator rejected this bonus.\n\t * This bonus will be available for the user to claim again.\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async claimBonus(bonus_id: number): Promise<TClaimBonusResult> {\n\t\tconst r = await this.api.bonusClaimItem(this.userExtId, bonus_id);\n\n\t\tconst o: TClaimBonusResult = {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t\tsuccess: r.success,\n\t\t};\n\n\t\treturn o;\n\t}\n\n\tprotected async updateBonuses() {\n\t\tconst payload = await this.api.bonusesGetItemsT(this.userExtId);\n\t\tthis.updateEntity(onUpdateContextKey.Bonuses, payload);\n\t}\n}\n","import { ECacheContext, OCache } from '../OCache';\nimport {\n\tTBuyStoreItemResult,\n\tTStoreCategory,\n\tTStoreItem,\n} from './WSAPITypes';\nimport {\n\tCACHE_DATA_SEC,\n\tonUpdateContextKey,\n} from './WSAPIBase';\nimport { WSAPIBonuses } from './WSAPIBonuses';\n\n/** @group Store */\nexport class WSAPIStore extends WSAPIBonuses {\n\tprivate storeHistoryOnUpdateParams: { limit: number; offset: number } = { limit: 20, offset: 0 };\n\n\tprivate storeHistoryCacheKey(limit: number, offset: number): string {\n\t\treturn `${onUpdateContextKey.StoreHistory}:${limit}:${offset}`;\n\t}\n\n\t/**\n\t * Returns the catalog of buyable store items visible to the current user,\n\t * scoped server-side to what the user is qualified to see. Optionally\n\t * subscribes to live updates via `onUpdate`: the callback is invoked with\n\t * the full refreshed catalog after every purchase the user makes from this\n\t * device.\n\t *\n\t * The returned list is the canonical source of truth for store state\n\t * (`can_buy`, `pool`, `discounted_price`, `active_till_date`, etc.).\n\t * Consumers should NEVER mutate it optimistically — always re-fetch (or\n\t * wait for the `onUpdate` callback) to observe the new state.\n\t *\n\t * @remarks\n\t * **Preconditions**\n\t * The catalog is per-user. Visitor mode is supported with caveats (see\n\t * \"Visitor mode\" below). For the authenticated path, the user's balances\n\t * (`ach_points_balance`, `ach_gems_balance`, `ach_diamonds_balance` from\n\t * {@link getUserProfile}) must be tracked client-side to drive the\n\t * affordability state of the Buy button — the SDK does not pre-compute\n\t * affordability into `can_buy`.\n\t *\n\t * **Subscription model (`onUpdate`)**\n\t * The callback receives the FULL refreshed catalog (never a diff/patch).\n\t * Each subsequent call to `getStoreItems({ onUpdate })` REPLACES the prior\n\t * callback — only one active subscriber at a time. Pass\n\t * `onUpdate: undefined` (or omit it) to keep the prior callback in place;\n\t * the callback is never auto-cleared.\n\t *\n\t * **Update triggers**\n\t *\n\t * Fires after: any `buyStoreItem(...)` call resolves on this connection\n\t * (success OR failure). This is the ONLY trigger. The refreshed array\n\t * reflects pool decrement on the just-bought item, per-period purchase\n\t * cap re-evaluation on `can_buy`, and any `purchased_today` /\n\t * `purchased_this_week` / `purchased_this_month` flips visible via\n\t * {@link getStorePurchasedItems}.\n\t *\n\t * Does NOT fire for:\n\t * - Operator-side BO catalog edits (price, ribbons, pool seed, segment\n\t * conditions, new/removed items) — surface only on the next cache miss.\n\t * - Concurrent purchases by OTHER users — the current user's view of\n\t * `pool` may be stale until they themselves refresh.\n\t * - User balance changes from gameplay — the catalog is independent of\n\t * balance; the consumer drives Buy-button affordability from a\n\t * separately-tracked balance source.\n\t * - Items going past their `active_till_date` while the page is open —\n\t * the item simply disappears on the next refresh.\n\t *\n\t * **Server-side filtering** (what's already excluded before the SDK sees it)\n\t * - Items outside the `[active_from_date, active_till_date]` window —\n\t * past the till-date, items are ALWAYS filtered out server-side.\n\t * - Items the user fails visibility-segment / visibility-condition\n\t * checks for.\n\t * - Items configured to hide-when-empty whose pool has reached 0\n\t * (per-item operator flag). Items without that flag are still returned\n\t * with `pool === 0` so a \"Sold out\" state can be rendered.\n\t * - Items where the per-period bought-count cap is reached (and the\n\t * operator chose to hide rather than just disable).\n\t *\n\t * **Reading state from the returned item**\n\t * The catalog row carries everything a Buy button needs except the user's\n\t * balance: `can_buy` already reflects segment / visibility / per-period\n\t * cap checks, but the SDK does NOT pre-compute balance affordability —\n\t * compare `discounted_price ?? price` against the user's balance for\n\t * `purchase_type` (`ach_points_balance` / `ach_gems_balance` /\n\t * `ach_diamonds_balance` from {@link getUserProfile}). `purchase_type` is\n\t * per-item (`'points'` / `'gems'` / `'diamonds'`); operators can mix\n\t * currencies within a single catalog. For sold-out display, `pool === 0`\n\t * means the operator chose to keep the item visible — render an \"Out of\n\t * stock\" overlay. When `discounted_price` is set, render `price` with a\n\t * strikethrough and `discounted_price` as the active price; the\n\t * accompanying `discount_price_ribbon` is either a percentage preset\n\t * (`'10'`, `'15'`, `'20'`, `'25'`, `'50'`) or the literal `'custom'`\n\t * (in which case `custom_ribbon_image` is the artwork at 250×300 px).\n\t * A live countdown for time-limited items is rendered only when the\n\t * operator has enabled the per-item `show_timer` flag.\n\t *\n\t * **Cross-references**\n\t * `category_ids` joins to `TStoreCategory.id` from\n\t * {@link getStoreCategories} (many-to-many — an item can belong to\n\t * multiple categories). Items with `only_in_custom_section: true` are\n\t * returned in the catalog but intended for their custom-section view\n\t * only — filter them client-side for the main store view. The\n\t * history-only fields (`purchase_ts`, `purchase_points_amount`, the\n\t * `purchased_*` booleans) are populated only by\n\t * {@link getStorePurchasedItems}, not by this method.\n\t *\n\t * **Idempotency**: yes. `getStoreItems` is a pure read. Calling it\n\t * repeatedly within the 30-second cache window resolves from the cache\n\t * without a network round-trip.\n\t *\n\t * **Side effects** (of a successful purchase that triggers `onUpdate`)\n\t * Documented here because the consumer's `onUpdate` handler will observe\n\t * the resulting state changes on the next refreshed array:\n\t * - Points / gems / diamonds balance deducted per `purchase_type`. The\n\t * new balance becomes visible on the user's gamification profile via\n\t * the SDK's user-properties update channel (`ach_points_balance` /\n\t * `ach_gems_balance` / `ach_diamonds_balance`).\n\t * - `pool` decremented for limited-stock items.\n\t * - `type = 'bonus'` → a CRM bonus is granted; surfaces via\n\t * {@link getBonuses}.\n\t * - `type = 'raffleticket'` → raffle tickets granted; surfaces via\n\t * `getRaffles`.\n\t * - `type = 'changelevel'` → user's level adjusted; surfaces via\n\t * {@link getCurrentLevel}.\n\t * - `type = 'minigamespin'` → SAW spin attempts granted; visible via the\n\t * mini-game APIs.\n\t * - `type = 'prizedrop'` → one prize-drop attempt granted.\n\t * - `type = 'tangible'` → no automatic gameplay effect; the purchase is\n\t * recorded for the operator's manual fulfillment (e.g. physical merch).\n\t *\n\t * **UI guidance**: see [UI Guide — `getStoreItems`](../../docs/ui/store/UIGuide_getStoreItems.md).\n\t *\n\t * @param params Optional. Omit to fetch without subscribing.\n\t * @param params.onUpdate Callback invoked with the full refreshed\n\t * catalog after every {@link buyStoreItem}\n\t * round-trip on this connection. Each call to\n\t * `getStoreItems` overwrites the prior\n\t * callback. Never fires in visitor mode.\n\t * @returns Promise resolving to the catalog of store\n\t * items visible to the user. Empty array if\n\t * the user has no items (or if the visitor\n\t * proxy user has none configured).\n\t *\n\t * @example\n\t * ```ts\n\t * // 1. Initial fetch + subscribe to live updates\n\t * const items = await window._smartico.api.getStoreItems({\n\t * onUpdate: (refreshed) => {\n\t * console.log('[smartico] store catalog refreshed after a purchase — re-render the entire store UI from this array, do not merge with prior state:', refreshed);\n\t *\n\t * // 2. onUpdate fires only after the current user's own purchase\n\t * // round-trip. Pool counts and can_buy flags are now current\n\t * // for this user.\n\t * const soldOut = refreshed.filter(i => i.pool === 0);\n\t * if (soldOut.length > 0) {\n\t * console.log('[smartico] these items are now sold out — render an \"Out of stock\" overlay on each:', soldOut.map(i => i.id));\n\t * }\n\t * },\n\t * });\n\t *\n\t * // 3. Live affordability per item. Compare each item's price against\n\t * // the user's balance for its purchase_type (read from\n\t * // getUserProfile(), kept live by the SDK's user-properties channel).\n\t * const profile = window._smartico.api.getUserProfile();\n\t * const balances = {\n\t * points: profile?.ach_points_balance ?? 0,\n\t * gems: profile?.ach_gems_balance ?? 0,\n\t * diamonds: profile?.ach_diamonds_balance ?? 0,\n\t * };\n\t *\n\t * // 4. Filter out items that are custom-section-only for the main view.\n\t * const mainViewItems = items.filter(i => !i.only_in_custom_section);\n\t *\n\t * // 5. Bucket each item's button state for rendering.\n\t * for (const i of mainViewItems) {\n\t * const activePrice = i.discounted_price ?? i.price;\n\t * const canAfford = balances[i.purchase_type] >= activePrice;\n\t * if (i.pool === 0) {\n\t * console.log('[smartico] item', i.id, 'is sold out — render disabled Buy with \"Out of stock\" overlay');\n\t * } else if (i.can_buy === false) {\n\t * console.log('[smartico] item', i.id, 'is not eligible — render disabled Buy and surface cant_buy_message on the popup:', i.cant_buy_message);\n\t * } else if (!canAfford) {\n\t * console.log('[smartico] item', i.id, 'is unaffordable — render disabled Buy and show \"short by\" line on popup; deficit =', activePrice - balances[i.purchase_type], i.purchase_type);\n\t * } else {\n\t * console.log('[smartico] item', i.id, 'is buyable — render enabled Buy at price', activePrice, i.purchase_type);\n\t * }\n\t * }\n\t *\n\t * // 6. Visitor-mode equivalent: onUpdate is accepted but never fires.\n\t * // Re-poll if you need fresh data; buyStoreItem is not supported.\n\t * // const visitorItems = await window._smartico.vapi('EN').getStoreItems();\n\t * // console.log('[smartico] visitor catalog is the brand proxy user\\'s — per-user fields are not meaningful');\n\t * ```\n\t */\n\tpublic async getStoreItems({ onUpdate }: { onUpdate?: (data: TStoreItem[]) => void } = {}): Promise<TStoreItem[]> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.StoreItems, onUpdate);\n\t\t}\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.StoreItems,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.storeGetItemsT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Purchase a specific store item on behalf of the current user. Spends\n\t * the user's points / gems / diamonds (depending on the item's\n\t * `purchase_type`) and triggers reward delivery (bonus issuance, mini-game\n\t * spin grant, level change, prize-drop, raffle ticket, or tangible item).\n\t *\n\t * A successful response (`err_code === 0`) means the funds have already\n\t * been debited and the reward has been queued / granted server-side. The\n\t * user's balance change arrives over a separate push channel, not in this\n\t * response — see \"Refresh after success\" below.\n\t *\n\t * @remarks\n\t * **Preconditions**\n\t * Read the candidate item from `getStoreItems()` first and gate the call\n\t * on these fields:\n\t * - `can_buy === true` — server-derived; combines segment / visibility\n\t * conditions and any operator-set restrictions.\n\t * - `pool == null || pool > 0` — `null` means unlimited stock; a positive\n\t * number means N units remain.\n\t * - User's balance for the item's `purchase_type`\n\t * (`'points'` / `'gems'` / `'diamonds'`) is `>= price` (or\n\t * `>= discounted_price` if set). Balances are not on `TStoreItem` —\n\t * read them from the user properties returned by `getUserState()`.\n\t * - If `active_till_date` is set, it is in the future.\n\t *\n\t * Calling without satisfying these will most likely return a non-zero\n\t * `err_code` (one of the codes below). The SDK does not pre-validate\n\t * — it forwards the request to the server unconditionally.\n\t *\n\t * **Error codes** (in `err_code`)\n\t * - `0` — success; funds debited and reward delivered.\n\t * - `1` — generic server error / control-group rejection. Treat as a\n\t * transient failure; show a \"try again later\" message.\n\t * - `106` — label mismatch detected before the purchase transaction\n\t * (e.g. cross-label item id). From a consumer perspective: the item is\n\t * not purchasable by this user.\n\t * - `11000` (`SHOP_NO_BALANCE`) — insufficient **points** balance.\n\t * Show an insufficient-balance message that names how many points are\n\t * missing (`price - current_points_balance`). The Buy button on the\n\t * item should already be disabled when this is the case; this code\n\t * normally fires only on a stale local balance.\n\t * - `11001` (`SHOP_WRONG_LABEL`) — user-vs-item label mismatch detected\n\t * inside the purchase transaction. Distinct from `106`; both mean\n\t * \"not purchasable by this user\" from the consumer's perspective.\n\t * Surface as a generic \"item not available\" message.\n\t * - `11002` (`SHOP_FAILED_TO_BUY_BONUS`) — the bonus configured on the\n\t * store item couldn't be issued (bad / disabled bonus config on the\n\t * operator side). Funds are NOT debited. Surface a generic error and\n\t * advise the user to contact support if it persists.\n\t * - `11003` (`SHOP_FAILED_TO_BUY_SHOP_ITEM_CONDITION`) — the item's\n\t * **visibility** segment condition is not satisfied. Shouldn't be\n\t * reachable through a correctly-rendered UI (the item shouldn't be\n\t * shown in the first place); usually indicates a stale local store\n\t * list. Re-fetch via `getStoreItems()`.\n\t * - `11004` (`SHOP_FAILED_TO_BUY_SHOP_ITEM_CONDITION_PURSHASE`) — the\n\t * item's **purchase** segment condition is not satisfied (the item is\n\t * visible but the user is not in the buyable segment). Surface a\n\t * localized \"try again later\" / \"you're not eligible\" message; do not\n\t * retry automatically.\n\t * - `11005` (`SHOP_FAILED_TO_BUY_MATCHING_BONUS`) — matching-bonus\n\t * coupon issuance failed (variant of `11002` for matching-deposit\n\t * bonuses). Funds are NOT debited. Surface a generic error.\n\t * - `11006` (`SHOP_FAILED_MAX_BOUGHT_ITEMS_REACHED`) — per-user purchase\n\t * cap reached (e.g. \"max 1 per day\"). Surface the item's\n\t * `limit_message` if set, otherwise `err_message`. Do not retry.\n\t * - `11007` — bonus was issued but a follow-up redemption step failed\n\t * server-side. Funds **are** debited and the purchase event is recorded;\n\t * the consumer's UI should refresh the store list (auto-refresh will\n\t * fire) and surface a soft warning rather than a hard error.\n\t * - `11009` (`SHOP_FAILED_POOL_EMPTY`) — stock pool is empty / sold out.\n\t * Show a \"sold out\" message; auto-refresh will mark the item as such\n\t * in subsequent `getStoreItems()` updates.\n\t * - `11011` (`SHOP_NO_BALANCE_GEMS`) — insufficient **gems** balance.\n\t * Same handling as `11000` but for the gems currency.\n\t * - `11012` (`SHOP_NO_BALANCE_DIAMONDS`) — insufficient **diamonds**\n\t * balance. Same handling as `11000` but for the diamonds currency.\n\t * - `11014` (`SHOP_FAILED_PURCHASE_LIMITATION`) — outside the configured\n\t * purchase window (purchase weekday / time-of-day / window). Surface\n\t * the item's `purchase_limit_message` if set, otherwise `err_message`.\n\t * - `9999` — uncaught server exception. Treat as a transient failure;\n\t * surface a generic error and allow retry.\n\t * - other non-zero — generic server error. Surface `err_message` if any.\n\t *\n\t * **Idempotency**: NOT idempotent. The server performs no de-duplication —\n\t * a second successful call deducts funds again and grants the reward\n\t * again (subject to per-user purchase caps). The SDK itself does **not**\n\t * enforce a single in-flight call. The consumer MUST guard the call site\n\t * against double-clicks (set a local \"buying\" flag on click, clear it on\n\t * response).\n\t *\n\t * **Refresh after success (and after failure)**\n\t * The SDK automatically re-fetches the store item list and the\n\t * purchased-items history on every response (success or error). Any\n\t * `onUpdate` callback registered via `getStoreItems({ onUpdate })` (or\n\t * the purchased-items equivalent) fires shortly after with the updated\n\t * arrays — reflecting the new `pool`, `can_buy`, and any `purchased_*`\n\t * flags. The user's balance (points / gems / diamonds) is exposed on the\n\t * user-properties channel and updates independently; if the UI displays\n\t * the balance, subscribe to user-property updates separately (it does\n\t * NOT flow through `getStoreItems`).\n\t *\n\t * **Side effects** (consumer-observable on success)\n\t * - User's points / gems / diamonds balance decreases by `price`\n\t * (or `discounted_price` if set).\n\t * - Item's `pool` decrements by 1 (when `pool != null`).\n\t * - Per-user purchase counters update — `purchased_today`,\n\t * `purchased_this_week`, `purchased_this_month` on the next\n\t * `getStoreItems()` refresh.\n\t * - The reward is delivered: bonus issuance, mini-game spin grant,\n\t * level change, prize drop, raffle ticket, or tangible-item record.\n\t * Each reward type pushes its own follow-up update (e.g. a new\n\t * bonus appears in `getBonuses()`, the spin shows up in\n\t * `getMiniGames()`). Subscribe to each relevant channel separately.\n\t * - A purchase row is appended to the user's purchase history,\n\t * surfaced via the purchased-items list.\n\t *\n\t * **UI guidance**: see [UI Guide — `buyStoreItem`](../../docs/ui/store/UIGuide_buyStoreItem.md).\n\t *\n\t * @param item_id The store item `id` (from `getStoreItems()`).\n\t * @returns `{ err_code, err_message }`; success when `err_code === 0`.\n\t *\n\t * @example\n\t * ```ts\n\t * const items = await window._smartico.api.getStoreItems({\n\t * onUpdate: (next) => console.log('[smartico] store items updated — re-render store grid with this fresh array', next),\n\t * });\n\t * const item = items.find(i => i.id === itemId);\n\t *\n\t * if (!item) {\n\t * console.log('[smartico] item not in current store list — keep UI as-is, possibly refresh getStoreItems');\n\t * return;\n\t * }\n\t *\n\t * // Local pre-checks: keep these aligned with the Buy-button decision matrix above.\n\t * const effectivePrice = item.discounted_price ?? item.price;\n\t * const inStock = item.pool == null || item.pool > 0;\n\t * const inWindow = !item.active_till_date || Date.now() < item.active_till_date;\n\t * if (!item.can_buy || !inStock || !inWindow) {\n\t * console.log('[smartico] buy not applicable — show disabled state with operator copy if any:', item.cant_buy_message);\n\t * return;\n\t * }\n\t *\n\t * console.log('[smartico] buy starting — set in-flight flag, show loading dots on Buy button, keep detail modal open');\n\t * const r = await window._smartico.api.buyStoreItem(item.id);\n\t * console.log('[smartico] buy response received — clear in-flight flag');\n\t *\n\t * if (r.err_code === 0) {\n\t * console.log('[smartico] purchase successful — close the detail modal, show a success toast; getStoreItems onUpdate above will fire with the refreshed list (do NOT manually re-fetch)');\n\t * } else if (r.err_code === 11000 || r.err_code === 11011 || r.err_code === 11012) {\n\t * console.error('[smartico] insufficient balance for this purchase_type — show insufficient-balance UI and how many units are missing:', item.purchase_type, effectivePrice);\n\t * } else if (r.err_code === 11009) {\n\t * console.error('[smartico] item sold out — show a dedicated \"Sold out\" message; the auto-refresh will mark the card as such shortly');\n\t * } else if (r.err_code === 11006) {\n\t * console.error('[smartico] per-user purchase cap reached — surface the operator-defined limit message:', item.limit_message || r.err_message);\n\t * } else if (r.err_code === 11014) {\n\t * console.error('[smartico] outside purchase window — surface the operator-defined purchase-limit message:', item.purchase_limit_message || r.err_message);\n\t * } else if (r.err_code === 11004 || r.err_code === 11003) {\n\t * console.error('[smartico] user not eligible / stale visibility — show a localized \"try again later\" message and let auto-refresh reconcile');\n\t * } else {\n\t * console.error('[smartico] buy failed — show a generic error toast/modal with this message:', r.err_message);\n\t * }\n\t * ```\n\t */\n\tpublic async buyStoreItem(item_id: number): Promise<TBuyStoreItemResult> {\n\t\tconst r = await this.api.buyStoreItem(this.userExtId, item_id);\n\n\t\tconst o: TBuyStoreItemResult = {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t};\n\n\t\treturn o;\n\t}\n\n\t/**\n\t * Returns the list of active store categories configured for the current label.\n\t * Categories are operator-defined groupings used to organize store items into tabs,\n\t * sections, or filter chips in the gamification store UI.\n\t *\n\t * @remarks\n\t * **What categories are**\n\t * - Operator-defined groupings, configured per-label by the brand operator.\n\t * Only active categories are returned; inactive / archived / deleted ones are\n\t * filtered out server-side.\n\t * - Each `TStoreCategory` exposes `{ id, name, order }`. `name` is the display label;\n\t * `order` is the relative position (lower = appears first).\n\t * - The same set of categories is returned to every user of the label — there is no\n\t * per-segment / per-currency / per-device filtering on the category list. Item-level\n\t * segment visibility happens on {@link getStoreItems}, not here.\n\t *\n\t * **Localization / translation**\n\t * - `name` is **pre-translated server-side** to the authenticated user's stored language.\n\t * In visitor mode, the language passed to `_smartico.vapi(lang)` drives the translation.\n\t * Consumers never need to translate `name` themselves.\n\t * - Fallback if no translation exists for the user's language: the operator-set default\n\t * (typically the brand's English) value is returned. The field is never null for an\n\t * active category.\n\t *\n\t * **Sort order**\n\t * The server does NOT pre-sort. Sort client-side before rendering:\n\t * `categories.sort((a, b) => a.order - b.order)`.\n\t *\n\t * **How store items join to categories**\n\t * Each `TStoreItem` exposes `category_ids: number[]` (zero-or-more, many-to-many).\n\t * A single store item can belong to multiple categories, or to none. To render a\n\t * \"category → items\" view:\n\t * `items.filter(i => i.category_ids.includes(cat.id))`.\n\t *\n\t * **Uncategorized items**\n\t * Items with `category_ids: []` are NOT represented by a synthetic \"Other\" entry\n\t * in the response. The convention used by the reference store UI is to synthesize\n\t * a client-side bucket (e.g. labelled \"General\") for items that have no category, OR\n\t * for items whose `category_ids` reference a category that is no longer returned by\n\t * this method (e.g. archived since the item was tagged). If you choose to render\n\t * such a synthetic bucket, place it first (the reference UI uses an `order: -1`\n\t * convention so it precedes all operator-defined categories).\n\t *\n\t * **Empty categories**\n\t * A category may be returned even if zero items currently reference it (since this\n\t * method does not join against items). The reference store UI hides such empty\n\t * categories from its tab strip — replicate that filter if you don't want to render\n\t * tabs that lead to empty content panels.\n\t *\n\t * **Refresh cadence / cache**\n\t * - The SDK caches the response for 30 seconds. Subsequent calls within that window\n\t * return the cached array without a network round-trip.\n\t * - The cache is NOT invalidated by store-item push events or purchases — operator-driven\n\t * category changes propagate at the next 30 s cache miss.\n\t * - Cache is fully cleared on login / logout.\n\t * - In **visitor mode**, additional server-side caching applies on top of the SDK cache;\n\t * worst-case staleness for an edited/added category is on the order of a few minutes\n\t * for anonymous viewers.\n\t *\n\t * **Idempotency**: safe. Read-only metadata fetch. Cache de-duplicates concurrent calls.\n\t *\n\t * **Side effects**: none — pure metadata read.\n\t *\n\t * **UI guidance**: see [UI Guide — `getStoreCategories`](../../docs/ui/store/UIGuide_getStoreCategories.md).\n\t *\n\t * @returns Array of `{ id, name, order }`. Empty array if no active categories are\n\t * configured for the label. `name` is pre-translated. Order is NOT applied — caller\n\t * must sort.\n\t *\n\t * @example\n\t * ```ts\n\t * const [categories, items] = await Promise.all([\n\t * window._smartico.api.getStoreCategories(),\n\t * window._smartico.api.getStoreItems(),\n\t * ]);\n\t *\n\t * if (categories.length === 0) {\n\t * console.log('[smartico] no store categories configured — render items as a flat grid without tabs:', items.length);\n\t * } else {\n\t * // Sort categories; build per-category item buckets; hide empty categories\n\t * const sorted = [...categories].sort((a, b) => a.order - b.order);\n\t * const tabs = sorted\n\t * .map(cat => ({ cat, items: items.filter(i => i.category_ids?.includes(cat.id)) }))\n\t * .filter(t => t.items.length > 0);\n\t *\n\t * // Optional: synthesize an \"Other\" bucket for items with no (or unknown) category\n\t * const knownIds = new Set(categories.map(c => c.id));\n\t * const orphans = items.filter(i => !i.category_ids?.length || !i.category_ids.some(id => knownIds.has(id)));\n\t * if (orphans.length > 0) {\n\t * console.log('[smartico] uncategorized store items — render a client-synthesized \"Other\" tab at the front of the tab strip:', orphans.length);\n\t * }\n\t *\n\t * console.log('[smartico] render store tabs in this order with these counts:', tabs.map(t => `${t.cat.name} (${t.items.length})`));\n\t * }\n\t *\n\t * // Visitor mode — same shape, language driven by vapi(lang) argument\n\t * const visitorCats = await window._smartico.vapi('DE').getStoreCategories();\n\t * console.log('[smartico] visitor-mode store categories (names translated to DE):', visitorCats);\n\t * ```\n\t */\n\tpublic async getStoreCategories(): Promise<TStoreCategory[]> {\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.StoreCategories,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.storeGetCategoriesT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Fetches the authenticated user's **store purchase history** — a paginated,\n\t * newest-first list of past store purchases (one row per redemption).\n\t *\n\t * Designed for a \"My Purchases\" / \"Order History\" screen. Each entry carries\n\t * the same descriptive fields as the catalog card plus three history-only\n\t * fields: `purchase_ts` (when the purchase happened), `purchase_points_amount`\n\t * (the amount actually paid at that time — a price snapshot, not the\n\t * current `price`), and `purchase_type` (`'points' | 'gems' | 'diamonds'`).\n\t *\n\t * @remarks\n\t * **Preconditions**\n\t * - User must be authenticated. Visitor mode is not supported (the SDK only\n\t * exposes this method on the authenticated `_smartico.api`, not on\n\t * `_smartico.vapi`).\n\t * - No prerequisite calls — calling without first fetching\n\t * {@link getStoreItems} or {@link getStoreCategories} is fine.\n\t *\n\t * **Pagination semantics**\n\t * - **Offset-based**, newest-first. The server orders rows by purchase\n\t * timestamp **descending** and the SDK does NOT re-sort — items arrive\n\t * ready to render in display order.\n\t * - `limit` — page size. **The SDK default is 20.** There is no server-side\n\t * hard cap, but 20 matches what the default Smartico UI uses end-to-end; the\n\t * protocol and storage layers were sized for this page size. Treat `20`\n\t * as the conventional/recommended value; passing a much larger limit will\n\t * return more rows but is not the supported integration pattern.\n\t * Avoid `limit <= 0` — the server peeks `limit + 1` rows internally, so\n\t * `limit = 0` returns 1 row with a misleading \"has more\" signal, and\n\t * negative values produce undefined results.\n\t * - `offset` — number of items to skip from the start. The SDK default is\n\t * `0` (first page). For load-more pagination, pass\n\t * `offset = (previously-loaded items).length` on each subsequent call.\n\t * - **No `hasMore` on the returned array.** `TStoreItem[]` is a flat list;\n\t * the underlying protocol response carries `hasMore` but it is not\n\t * surfaced through this method. Two ways for consumers to know they\n\t * reached the end:\n\t * 1. The returned array is shorter than `limit` (definitive end), or\n\t * 2. A subsequent call at `offset = previous.length` returns `[]`.\n\t * Either is reliable.\n\t * - No date-range / category / status filter parameters — pagination is the\n\t * only server-side slicing. Apply any further filtering client-side.\n\t *\n\t * **No per-item fulfillment status**\n\t * - History entries do NOT carry a `delivered` / `pending` / `cancelled` /\n\t * `refunded` field. The list contains rows for committed purchase\n\t * attempts; the server query does not filter by transaction-status, so in\n\t * practice the rows that appear are completed purchases (failed\n\t * transactions roll back and don't write a row). Treat every item as a\n\t * completed transaction unless a future SDK release adds an explicit\n\t * status field.\n\t *\n\t * **Bonus-type entries**\n\t * - When the user redeemed a bonus item, the entry's `type` field surfaces\n\t * as `'bonus'`. **Known limitation:** the SDK transform currently maps\n\t * both `Bonus` and `Tangible` server-side item types to the same string\n\t * `'bonus'` — so the `type` field on history rows cannot distinguish a\n\t * bonus redemption from a tangible-prize redemption. The actual bonus\n\t * payload (wallet credit, free spins, etc.) is dispatched by the server\n\t * asynchronously and is NOT embedded in the history entry — consumers\n\t * that need bonus details should subscribe to bonus push events\n\t * separately rather than reading them from this list.\n\t * - History rows render identically across types — there is no deep-link to\n\t * the bonus wallet or re-claim affordance on the row itself.\n\t *\n\t * **Per-row data**\n\t * Each row uses the `TStoreItem` shape but populates four history-only\n\t * fields not present on `getStoreItems` output. `purchase_ts` is the\n\t * Unix-ms timestamp of the purchase — format with\n\t * `new Date(purchase_ts).toLocaleString()` in the user's local timezone;\n\t * no relative labels (\"Today\" / \"Yesterday\") are produced by the SDK.\n\t * `purchase_points_amount` is the amount actually paid at the time of\n\t * purchase — a snapshot of the historical price, which may differ from\n\t * the item's current `price`. `purchase_type` is the currency actually\n\t * charged (`'points' | 'gems' | 'diamonds'`); render the matching\n\t * balance icon next to the amount. The convenience booleans\n\t * `purchased_today` / `purchased_this_week` / `purchased_this_month` are\n\t * computed client-side from the consumer's local clock — useful for\n\t * grouping rows under \"Today\" / \"This Week\" headers.\n\t *\n\t * **Catalog fields on a history row**\n\t * The promotional fields (`ribbon`, `discounted_price`,\n\t * `discount_price_ribbon`, `custom_ribbon_image`, `active_till_date`)\n\t * reflect the CURRENT catalog state of the item, NOT its state at\n\t * purchase time — the default Smartico UI hides them on history rows to\n\t * avoid implying that the historical purchase carried the current\n\t * promotional banner. Descriptive marketing fields (`description`,\n\t * `hint_text`, `related_games`) are typically suppressed on a compact\n\t * history row. The current-purchasability fields `can_buy` and `pool`\n\t * reflect now, not then — useful only if you render a \"Buy Again\"\n\t * affordance on the row. One implementation gotcha: unlike\n\t * `getStoreItems`, this method's transform does NOT auto-parse JSON\n\t * strings in `custom_data` — call `JSON.parse()` yourself if you store\n\t * JSON there.\n\t *\n\t * **Cache & refresh**\n\t * - The SDK caches each `(limit, offset)` page separately for 30 seconds.\n\t * Repeated calls within that window resolve from cache without a\n\t * network round-trip.\n\t * - The cache is invalidated and `onUpdate` (when registered) is invoked\n\t * automatically after a successful {@link buyStoreItem} call — the SDK\n\t * re-fetches the same page parameters that were registered together with\n\t * the current `onUpdate` callback and pushes the fresh array.\n\t * - Multi-tab caveat: if the user has the same brand open in multiple\n\t * tabs, **all open tabs** receive the `onUpdate` event on a purchase,\n\t * not only the tab that initiated the buy. The event is scoped to the\n\t * current authenticated user — a different user's purchase never fires\n\t * this callback.\n\t * - Only ONE `onUpdate` callback can be registered at a time. Each call to\n\t * `getStorePurchasedItems({ onUpdate })` overwrites the previous handler.\n\t *\n\t * **Idempotency**: safe. Pure read.\n\t *\n\t * **Side effects**: none — read-only.\n\t *\n\t * **UI guidance**: see [UI Guide — `getStorePurchasedItems`](../../docs/ui/store/UIGuide_getStorePurchasedItems.md).\n\t *\n\t * @param params - Optional pagination + callback bag.\n\t * @param params.limit - Page size. Defaults to `20`. Use `20` as the\n\t * conventional value (matches the default Smartico UI end-to-end). Avoid\n\t * non-positive values.\n\t * @param params.offset - Number of rows to skip from the newest end.\n\t * Defaults to `0`. For load-more pagination pass the current array\n\t * length.\n\t * @param params.onUpdate - Optional callback invoked after a successful\n\t * {@link buyStoreItem} elsewhere in the session. Receives the refreshed\n\t * page for the same `(limit, offset)` used on the call that registered\n\t * this callback. Only ONE callback can be registered; each new call\n\t * overwrites the previous one. Pass a stable handler or\n\t * re-register intentionally on screen entry.\n\t *\n\t * @returns Promise resolving to an array of `TStoreItem` history entries\n\t * in newest-first order. Empty array if the user has no purchases (or\n\t * the requested `offset` is beyond the end). Each entry carries\n\t * `purchase_ts`, `purchase_points_amount`, `purchase_type`, and the\n\t * `purchased_today/this_week/this_month` convenience flags in addition\n\t * to the standard item fields.\n\t *\n\t * @example\n\t * ```ts\n\t * // Initial load + subscribe to refresh-on-purchase.\n\t * const handleHistoryUpdate = (items: TStoreItem[]) => {\n\t * console.log(\n\t * '[smartico] purchase history refreshed — re-render the history list with these',\n\t * items.length,\n\t * 'items (newest first):',\n\t * items,\n\t * );\n\t * };\n\t *\n\t * try {\n\t * const firstPage = await _smartico.api.getStorePurchasedItems({\n\t * limit: 20,\n\t * offset: 0,\n\t * onUpdate: handleHistoryUpdate,\n\t * });\n\t *\n\t * if (firstPage.length === 0) {\n\t * console.log('[smartico] no purchase history — render the empty state (\"No purchases yet\")');\n\t * } else {\n\t * console.log(\n\t * '[smartico] render',\n\t * firstPage.length,\n\t * 'history rows (newest first). Show \"Load more\" button if length === 20:',\n\t * firstPage,\n\t * );\n\t *\n\t * // Inspect the first entry's history-only fields.\n\t * const first = firstPage[0];\n\t * console.log(\n\t * '[smartico] most-recent purchase: name=', first.name,\n\t * 'paid', first.purchase_points_amount, first.purchase_type,\n\t * 'at', new Date(first.purchase_ts ?? 0).toLocaleString(),\n\t * '— format with toLocaleString (user-local time) on the row.',\n\t * );\n\t * }\n\t *\n\t * // Load-more pattern: fetch page 2 once the user scrolls / clicks \"Load more\".\n\t * if (firstPage.length === 20) {\n\t * const nextPage = await _smartico.api.getStorePurchasedItems({\n\t * limit: 20,\n\t * offset: firstPage.length,\n\t * });\n\t * const isLastPage = nextPage.length < 20;\n\t * console.log(\n\t * '[smartico] appended page 2 —',\n\t * nextPage.length,\n\t * 'rows.',\n\t * isLastPage ? 'Hide \"Load more\" — end reached.' : 'Keep \"Load more\" visible.',\n\t * );\n\t * }\n\t * } catch (e) {\n\t * console.error(\n\t * '[smartico] failed to load purchase history — show a generic error placeholder or retry with backoff:',\n\t * e,\n\t * );\n\t * }\n\t * ```\n\t */\n\tpublic async getStorePurchasedItems({\n\t\tlimit,\n\t\toffset,\n\t\tonUpdate,\n\t}: { limit?: number; offset?: number; onUpdate?: (data: TStoreItem[]) => void } = {}): Promise<TStoreItem[]> {\n\t\tconst requestLimit = limit === undefined ? 20 : limit;\n\t\tconst requestOffset = offset === undefined ? 0 : offset;\n\t\tconst cacheKey = this.storeHistoryCacheKey(requestLimit, requestOffset);\n\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.StoreHistory, onUpdate);\n\t\t\tthis.storeHistoryOnUpdateParams = { limit: requestLimit, offset: requestOffset };\n\t\t}\n\n\t\treturn OCache.use(\n\t\t\tcacheKey,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.storeGetPurchasedItemsT(this.userExtId, requestLimit, requestOffset),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\tprotected async updateStorePurchasedItems() {\n\t\tconst payload = await this.api.storeGetPurchasedItemsT(\n\t\t\tthis.userExtId,\n\t\t\tthis.storeHistoryOnUpdateParams.limit,\n\t\t\tthis.storeHistoryOnUpdateParams.offset,\n\t\t);\n\t\tconst cacheKey = this.storeHistoryCacheKey(this.storeHistoryOnUpdateParams.limit, this.storeHistoryOnUpdateParams.offset);\n\n\t\tOCache.set(cacheKey, payload, ECacheContext.WSAPI);\n\n\t\tconst onUpdate = this.onUpdateCallback.get(onUpdateContextKey.StoreHistory);\n\t\tif (onUpdate) {\n\t\t\tonUpdate(payload);\n\t\t}\n\t}\n\n\tprotected async updateStoreItems() {\n\t\tconst payload = await this.api.storeGetItemsT(this.userExtId);\n\t\tthis.updateEntity(onUpdateContextKey.StoreItems, payload);\n\t}\n}\n","import { ECacheContext, OCache } from '../OCache';\nimport {\n\tTTournament,\n\tTTournamentDetailed,\n\tTTournamentRegistrationResult,\n\tTClanTournamentPlayers,\n} from './WSAPITypes';\nimport {\n\tCACHE_DATA_SEC,\n\tonUpdateContextKey,\n} from './WSAPIBase';\nimport { WSAPIStore } from './WSAPIStore';\n\n/** @group Tournaments */\nexport class WSAPITournaments extends WSAPIStore {\n\t/**\n\t * Returns the list of tournaments currently visible to the user, scoped\n\t * server-side to what the user's segments qualify them to see. Optionally\n\t * subscribes to live updates via `onUpdate`: the callback is invoked with\n\t * the full refreshed list whenever the user registers in a tournament.\n\t *\n\t * The returned list is the canonical source of truth for tournament\n\t * lobby state (`is_user_registered`, `registration_status`,\n\t * `is_in_progress`, `is_can_register`, etc.). Consumers should NOT\n\t * mutate it optimistically — always wait for the `onUpdate` callback\n\t * (or a fresh fetch after the 30 s cache window) to observe new state.\n\t *\n\t * @remarks\n\t * **Subscription model (`onUpdate`)**\n\t * The callback receives the FULL refreshed list (never a diff/patch).\n\t * Each subsequent call to `getTournamentsList({ onUpdate })` REPLACES\n\t * the prior callback — only one active subscriber at a time. Pass\n\t * `onUpdate: undefined` (or omit it) to keep the prior callback in\n\t * place; the callback is never auto-cleared.\n\t *\n\t * **Update triggers** — the callback fires when:\n\t *\n\t * 1. `registerInTournament(...)` resolves on this connection (any\n\t * `err_code`). The refreshed list reflects the new\n\t * `is_user_registered` / `registration_status` /\n\t * `registration_count` on the affected tournament.\n\t *\n\t * Does NOT fire for: tournament lifecycle transitions (start, finish,\n\t * cancellation), score updates, other users' registrations, or\n\t * operator-side BO edits. Those changes surface only on the next\n\t * cache miss (after the 30 s TTL) — poll manually if your UI needs\n\t * sub-30s lifecycle freshness.\n\t *\n\t * **Server-side filtering** (what's excluded before the SDK sees it)\n\t * The server filters by visibility segment and entry segment, removes\n\t * tournaments past their post-finish display window, and excludes\n\t * tournaments not yet published. SDK consumers receive only items\n\t * the user is eligible to see; no client-side gating is required.\n\t *\n\t * **Reading state from the returned item**\n\t * Drive list bucketing and CTA labels from the SDK-computed booleans\n\t * (`is_active`, `is_can_register`, `is_cancelled`, `is_finished`,\n\t * `is_in_progress`, `is_upcoming`), NOT from raw `start_time` /\n\t * `end_time` comparisons — the booleans encode the canonical\n\t * lifecycle states and already reflect server-side rules around\n\t * qualifying scores and late registration. `is_user_registered` is\n\t * independent of `is_can_register` — a registered user has\n\t * `is_user_registered: true` and `is_can_register: false`. The `me`\n\t * block (if present) carries the user's own leaderboard position and\n\t * score; it's undefined for unregistered users, users without any\n\t * recorded score, and visitor-mode sessions. The `prize_pool_short`\n\t * field carries the operator-supplied summary string (\"$10,000\",\n\t * \"Mixed prizes\") for compact card rendering; the full per-place\n\t * `prizes[]` breakdown is also populated here but is typically\n\t * rendered only in the detail view via\n\t * {@link getTournamentInstanceInfo}.\n\t *\n\t * **Cross-references**\n\t * Tournaments with `is_clan_based: true` group participants by clan —\n\t * see {@link getClanTournamentPlayers} for fetching the players list\n\t * of a specific clan within a clan tournament. The detailed lobby\n\t * view (with full player leaderboard and prize structure) comes from\n\t * {@link getTournamentInstanceInfo}. Tournaments with\n\t * `custom_section_id` belong to an operator-defined custom section\n\t * (resolve metadata via `getCustomSections()`).\n\t *\n\t * **Cache TTL**: the SDK caches the response for 30 seconds. Cache is\n\t * fully cleared on login / logout.\n\t *\n\t * **Idempotency**: safe. Read-only. Repeated calls within the cache\n\t * window return a deep-cloned cached array without a network\n\t * round-trip.\n\t *\n\t * **Side effects**: none — pure metadata read.\n\t *\n\t * **UI guidance**: see [UI Guide — `getTournamentsList`](../../docs/ui/tournaments/UIGuide_getTournamentsList.md).\n\t *\n\t * **Visitor mode**: supported. The same shape is returned, scoped to\n\t * the brand's public tournament list. Per-user fields (`me`,\n\t * `is_user_registered`, `registration_status`) are not meaningful.\n\t * The `onUpdate` callback is accepted but never fires (registration\n\t * mutations are not supported in visitor mode).\n\t *\n\t * @param params Optional. Omit to fetch without subscribing.\n\t * @param params.onUpdate Callback invoked with the full refreshed\n\t * tournament list after every\n\t * {@link registerInTournament} round-trip on\n\t * this connection. Each call overwrites the\n\t * prior callback. Never fires in visitor mode.\n\t * @returns Promise resolving to the array of\n\t * tournaments visible to the user. Empty\n\t * array if no tournaments are visible.\n\t *\n\t * @example\n\t * ```ts\n\t * const tournaments = await window._smartico.api.getTournamentsList({\n\t * onUpdate: (refreshed) => {\n\t * console.log('[smartico] tournament list refreshed — re-render the lobby UI from this array, do not merge with prior state:', refreshed);\n\t * const justRegistered = refreshed.filter(t => t.is_user_registered);\n\t * console.log('[smartico] user is now registered in these tournaments:', justRegistered.map(t => t.name));\n\t * },\n\t * });\n\t *\n\t * // Bucket items by lifecycle state for a tabbed UI.\n\t * const live = tournaments.filter(t => t.is_in_progress);\n\t * const upcoming = tournaments\n\t * .filter(t => t.is_upcoming && !t.is_user_registered)\n\t * .sort((a, b) => a.start_time - b.start_time);\n\t * const mine = tournaments.filter(t => t.is_user_registered);\n\t * const finished = tournaments.filter(t => t.is_finished);\n\t *\n\t * console.log('[smartico] render lobby tabs with these counts: live=', live.length,\n\t * 'upcoming=', upcoming.length, 'mine=', mine.length, 'finished=', finished.length);\n\t *\n\t * // Featured tournament: pin to position 0 of the Overview/Top tabs.\n\t * const featured = tournaments.find(t => t.is_featured && !t.is_cancelled);\n\t * if (featured) {\n\t * console.log('[smartico] featured tournament — pin to position 0 of the Overview tab:', featured.name);\n\t * }\n\t *\n\t * // Visitor mode: onUpdate accepted but never fires; re-poll if needed.\n\t * // const visitorList = await window._smartico.vapi('EN').getTournamentsList();\n\t * ```\n\t */\n\tpublic async getTournamentsList({ onUpdate }: { onUpdate?: (data: TTournament[]) => void } = {}): Promise<TTournament[]> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.TournamentList, onUpdate);\n\t\t}\n\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.TournamentList,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.tournamentsGetLobbyT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Returns the full detail of a single tournament instance — adds the\n\t * player leaderboard, the full prize structure, and (for clan\n\t * tournaments) the clan leaderboard and per-clan prize structure on\n\t * top of everything already in `TTournament`. Use this to power a\n\t * tournament detail / lobby screen after the user picks an item from\n\t * {@link getTournamentsList}.\n\t *\n\t * Live leaderboard updates require manual re-fetching — there is no\n\t * subscription model, no push event, and no client-side cache (each\n\t * call hits the server). The default Smartico UI polls every 3 seconds\n\t * while the detail view is open.\n\t *\n\t * @remarks\n\t * **Preconditions**\n\t * Pass a valid `tournamentInstanceId` read from `TTournament.instance_id`\n\t * on an item returned by {@link getTournamentsList}. The method works\n\t * standalone — calling `getTournamentsList()` first is not required by\n\t * the SDK, but is the only stable source of valid IDs.\n\t *\n\t * **Refresh model**\n\t * - **No subscription.** This is a one-shot promise; call again to\n\t * refresh.\n\t * - **No client cache.** Every call sends a network request and\n\t * returns the latest server snapshot. Safe to poll on an interval —\n\t * the default Smartico UI uses 3 s while the detail view is visible.\n\t * - **No push event** invalidates or refreshes detail state. Score\n\t * changes, registration count changes, lifecycle transitions — all\n\t * require a fresh `getTournamentInstanceInfo` call.\n\t *\n\t * **Returned shape — beyond `TTournament`**\n\t * `TTournamentDetailed` extends `TTournament` with the following\n\t * additional data: a `players[]` leaderboard sorted server-side by\n\t * score (only members with at least one recorded score); the user's\n\t * own `me` block carrying their rank and score (undefined when not\n\t * registered or when the user has no score yet); a full per-place\n\t * `prizes[]` array (place range, type, points / gems / diamonds\n\t * amounts, image, name); and `related_games[]` if the operator has\n\t * associated games with this tournament. For clan tournaments\n\t * (`is_clan_based === true`), the response also carries\n\t * `clan_leaderboard[]` (ranked clans with `total_score` and\n\t * `contributing_members`), `clan_prize_structure[]` (per-clan-place\n\t * prize tiers — Fixed vs Dynamic, with ScoreWeighted /\n\t * EqualSplit distribution for Dynamic prizes), `user_clan_id` (the\n\t * user's own clan), and the advisory `user_position_in_clan` /\n\t * `user_score_in_clan` fields.\n\t *\n\t * **Idempotency**: safe. Read-only. Each call returns the latest\n\t * server snapshot.\n\t *\n\t * **Side effects**: none — pure metadata read.\n\t *\n\t * **UI guidance**: see [UI Guide — `getTournamentInstanceInfo`](../../docs/ui/tournaments/UIGuide_getTournamentInstanceInfo.md).\n\t *\n\t * **Visitor mode**: not supported. Use {@link getTournamentsList} for\n\t * the public lobby list in visitor mode; the detail endpoint requires\n\t * an authenticated session.\n\t *\n\t * @param tournamentInstanceId The `instance_id` from a `TTournament`\n\t * returned by {@link getTournamentsList}.\n\t * @returns Promise resolving to `TTournamentDetailed`.\n\t * Rejects if the instance ID is invalid\n\t * or the user lacks visibility for it.\n\t *\n\t * @example\n\t * ```ts\n\t * const tournaments = await window._smartico.api.getTournamentsList();\n\t * const tournament = tournaments[0];\n\t *\n\t * console.log('[smartico] loading detail view for tournament', tournament.instance_id);\n\t * const detail = await window._smartico.api.getTournamentInstanceInfo(tournament.instance_id);\n\t *\n\t * console.log('[smartico] render detail with', detail.players?.length ?? 0,\n\t * 'players,', detail.prizes?.length ?? 0, 'prize tiers');\n\t *\n\t * if (detail.is_clan_based && detail.clan_leaderboard) {\n\t * console.log('[smartico] clan tournament — render clan leaderboard tab with',\n\t * detail.clan_leaderboard.length, 'clans');\n\t * if (detail.user_clan_id != null) {\n\t * console.log('[smartico] user belongs to clan', detail.user_clan_id,\n\t * '— highlight that row in the clan leaderboard');\n\t * }\n\t * }\n\t *\n\t * // Live leaderboard updates — poll every 3 seconds while the detail view is open.\n\t * const pollId = setInterval(async () => {\n\t * try {\n\t * const fresh = await window._smartico.api.getTournamentInstanceInfo(tournament.instance_id);\n\t * console.log('[smartico] detail refreshed — re-render player + clan leaderboards from this new snapshot:', fresh);\n\t * } catch (e) {\n\t * console.error('[smartico] tournament detail poll failed — keep showing last snapshot, retry on next tick:', e);\n\t * }\n\t * }, 3_000);\n\t * // clearInterval(pollId) when the detail view closes.\n\t *\n\t * if (detail.me) {\n\t * console.log('[smartico] current user is rank', detail.me.position,\n\t * 'with', detail.me.scores, 'points — render the sticky \"me\" panel below the leaderboard');\n\t * }\n\t * ```\n\t */\n\tpublic async getTournamentInstanceInfo(tournamentInstanceId: number): Promise<TTournamentDetailed> {\n\t\treturn this.api.tournamentsGetInfoT(this.userExtId, tournamentInstanceId);\n\t}\n\n\t/**\n\t * Returns the ranked players of a specific clan within a clan-based\n\t * tournament instance. Used to drill down from the clan-leaderboard\n\t * tab on the tournament detail view into a single clan's member\n\t * roster.\n\t *\n\t * The server returns up to roughly 20 players (top-N by score\n\t * descending). Server-side ordering is already by `scores` DESC\n\t * (equivalent to `position` ASC) — no client-side re-sort is\n\t * required.\n\t *\n\t * @remarks\n\t * **Preconditions**\n\t * Pass a valid `tournamentInstanceId` (read from `TTournament.instance_id`\n\t * returned by {@link getTournamentsList}) and a `clanId` (read from\n\t * `TTournamentDetailed.clan_leaderboard[].clan_id` returned by\n\t * {@link getTournamentInstanceInfo}). The tournament should be\n\t * clan-based (`is_clan_based === true`); calling this against a\n\t * non-clan tournament typically returns an empty `players` array.\n\t *\n\t * **Refresh model**\n\t * - **No subscription.** This is a one-shot promise.\n\t * - **No client cache.** Every call hits the server.\n\t * - **No push event** refreshes the response. Live updates to clan\n\t * member rankings require a fresh call.\n\t * - The default Smartico UI fetches this once when the user opens the\n\t * clan-drill-down modal and does NOT refresh while the modal is\n\t * open. If your UI needs live updates, re-call on an interval; the\n\t * clan leaderboard at the parent level (via\n\t * {@link getTournamentInstanceInfo}) does refresh via its own\n\t * polling cadence.\n\t *\n\t * **Returned shape**\n\t * `TClanTournamentPlayers` carries the requested clan's identity\n\t * (`clan_id`, `clan_public_meta.name`, `clan_public_meta.image_url`)\n\t * alongside the `players[]` array — each entry has `position`,\n\t * `scores`, `public_username`, `clean_ext_user_id`, `avatar_id`,\n\t * `avatar_real_id`, the resolved `avatar_url`, `user_id`, and the\n\t * `is_me` flag identifying the current user's row. The `clan_id` and\n\t * `clan_public_meta` on the response echo the input clan — the\n\t * default Smartico UI ignores them and renders the header from the\n\t * caller-side `ClanLeaderboardEntry` object, but they're available\n\t * for consumers that don't already have that context.\n\t *\n\t * **Username display**: prefer `clean_ext_user_id` when set, falling\n\t * back to `public_username`. The default Smartico UI uses\n\t * `clean_ext_user_id || public_username || ''`.\n\t *\n\t * **Idempotency**: safe. Read-only. Each call returns the latest\n\t * server snapshot.\n\t *\n\t * **Side effects**: none — pure metadata read.\n\t *\n\t * **UI guidance**: see [UI Guide — `getClanTournamentPlayers`](../../docs/ui/tournaments/UIGuide_getClanTournamentPlayers.md).\n\t *\n\t * **Visitor mode**: not supported.\n\t *\n\t * @param tournamentInstanceId The tournament `instance_id` from a\n\t * clan-based `TTournament`.\n\t * @param clanId The clan ID from\n\t * `TTournamentDetailed.clan_leaderboard[].clan_id`.\n\t * @returns Promise resolving to\n\t * `TClanTournamentPlayers`. An invalid\n\t * ID combination typically yields an\n\t * empty `players` array; the SDK does\n\t * not distinguish \"no scores yet\" from\n\t * \"invalid IDs\" — both manifest as an\n\t * empty list.\n\t *\n\t * @example\n\t * ```ts\n\t * const detail = await window._smartico.api.getTournamentInstanceInfo(tournamentInstanceId);\n\t * if (!detail.is_clan_based || !detail.clan_leaderboard) {\n\t * console.log('[smartico] not a clan tournament — skip clan drill-down');\n\t * return;\n\t * }\n\t *\n\t * // User clicked a clan row in the leaderboard.\n\t * const clickedClan = detail.clan_leaderboard[0];\n\t *\n\t * console.log('[smartico] opening clan drill-down — show modal skeleton while loading');\n\t * const result = await window._smartico.api.getClanTournamentPlayers(\n\t * tournamentInstanceId,\n\t * clickedClan.clan_id,\n\t * );\n\t *\n\t * if (result.players.length === 0) {\n\t * console.log('[smartico] clan has no ranked players yet — render empty state (\"No leaders yet\")');\n\t * } else {\n\t * console.log('[smartico] render clan member rows with .is-me highlight on the current user;',\n\t * result.players.length, 'players ranked');\n\t * const me = result.players.find(p => p.is_me);\n\t * if (me) {\n\t * console.log('[smartico] current user rank in this clan:', me.position, 'score:', me.scores);\n\t * }\n\t * }\n\t * ```\n\t */\n\tpublic async getClanTournamentPlayers(tournamentInstanceId: number, clanId: number): Promise<TClanTournamentPlayers> {\n\t\treturn this.api.clanTournamentGetPlayers(this.userExtId, tournamentInstanceId, clanId);\n\t}\n\n\t/**\n\t * Registers the authenticated user in the specified tournament instance.\n\t * For tournaments with a buy-in cost, the user's balance is debited\n\t * synchronously before the response is returned; for free tournaments\n\t * the call is a simple membership add.\n\t *\n\t * A successful response (`err_code === 0`) means the registration row\n\t * exists server-side, the buy-in (if any) has been deducted, and the\n\t * SDK has already triggered a refresh of the tournament lobby cache.\n\t *\n\t * @remarks\n\t * **Preconditions**\n\t * Read the candidate from {@link getTournamentsList} and gate the call\n\t * on `is_can_register === true`. This composite flag already encodes:\n\t * not already registered, slot available\n\t * (`registration_count < players_max_count`), tournament status is\n\t * REGISTER (or STARTED with late-registration enabled), and the\n\t * registration type is not AUTO. The SDK forwards the call\n\t * unconditionally — calling without satisfying these will return one\n\t * of the error codes below.\n\t *\n\t * For clan tournaments (`is_clan_based === true`), the user must\n\t * already belong to a clan before calling. If they don't, prompt them\n\t * to pick a clan first via {@link joinClan}, then call\n\t * `registerInTournament` after the clan-join resolves. See \"Error\n\t * codes\" `1010` below for the server-side safety net.\n\t *\n\t * **Error codes** (in `err_code`, typed as {@link TournamentRegistrationError})\n\t * - `0` — success; the registration is persisted, buy-in deducted,\n\t * tournament lobby refresh fires.\n\t * - `1010` — `TOURNAMENT_USER_CANNOT_JOIN_WITHOUT_CLAN`: clan-based\n\t * tournament and the user has no clan. Surface the clan-pick flow\n\t * (e.g. open a clan-pick modal driven by {@link getClans} +\n\t * {@link joinClan}), then retry registration.\n\t * - `30001` — `TOURNAMENT_INSTANCE_NOT_FOUND`: instance ID is invalid\n\t * or the tournament was deleted. Refresh the lobby via\n\t * `getTournamentsList()` and hide the entry from the UI.\n\t * - `30002` — `TOURNAMENT_REGISTRATION_NOT_ENOUGH_POINTS`: insufficient\n\t * points balance for a points-cost tournament. Show an\n\t * insufficient-balance UI naming the deficit.\n\t * - `30003` — `TOURNAMENT_INSTANCE_NOT_IN_STATE`: tournament is no\n\t * longer in a registerable state (finished, cancelled, finalizing,\n\t * or not yet published with late registration disabled). Refresh\n\t * the lobby; the button should hide.\n\t * - `30004` — `TOURNAMENT_ALREADY_REGISTERED`: user is already\n\t * registered. Treat as idempotent success — hide the Register button\n\t * and refresh the lobby. Usually indicates a stale local state\n\t * (e.g. registered from another tab).\n\t * - `30005` — `TOURNAMENT_USER_DONT_MATCH_CONDITIONS`: user fails the\n\t * tournament's segment / entry conditions. Prefer\n\t * `tournament.segment_dont_match_message` (operator-supplied) over\n\t * `err_message` when both are available.\n\t * - `30006` — `TOURNAMENT_USER_NOT_REGISTERED`: anomalous on a fresh\n\t * register call; usually indicates a server-side race. Treat as a\n\t * generic transient error.\n\t * - `30007` — `TOURNAMENT_CANT_CHANGE_REGISTRATION_STATUS`: status\n\t * transition not allowed (e.g. re-registering after a finished /\n\t * cancelled tournament). Show a generic error; do not retry.\n\t * - `30008` — `TOURNAMENT_MAX_REGISTRATIONS_REACHED`: the tournament\n\t * filled up between the lobby fetch and the registration click.\n\t * Refresh the lobby — the button will hide on the refreshed item.\n\t * - `300010` — insufficient **gems** balance (gems-cost tournament).\n\t * Same UI handling as `30002` but for the gems currency.\n\t * - `300011` — insufficient **diamonds** balance (diamonds-cost\n\t * tournament). Same as `300010` but for diamonds. \n\t * - other non-zero — generic server error. Surface `err_message` if any.\n\t *\n\t * Note: clan-tournament registration can occasionally surface error\n\t * codes from the clan-join domain (e.g. `1011` — joined-after-start)\n\t * via the same response path. These are members of `JoinClanErrorCode`,\n\t * not `TournamentRegistrationError`. Branch on the numeric value.\n\t *\n\t * **Idempotency**: NOT idempotent. A second call on the same instance\n\t * returns `30004` once the first call has succeeded. The SDK does NOT\n\t * enforce an in-flight lock. The consumer MUST guard the call site\n\t * against double-clicks (set a local \"registering\" flag on click, clear\n\t * it on response).\n\t *\n\t * **Refresh after success (and after failure)**\n\t * The SDK automatically refreshes the tournament lobby cache on every\n\t * response (success OR error) and fires any `onUpdate` callback\n\t * registered via `getTournamentsList({ onUpdate })`. After\n\t * `err_code === 0`, the affected item's `is_user_registered` /\n\t * `registration_status` / `registration_count` reflect the new\n\t * registered state on the refreshed array. Note that\n\t * {@link getTournamentInstanceInfo} is NOT auto-refreshed — if the\n\t * detail screen is open, call it again manually.\n\t *\n\t * The user's balance (points / gems / diamonds) is exposed on the\n\t * user-properties channel and updates independently of this call's\n\t * response — subscribe to user-property updates separately if your UI\n\t * shows the balance.\n\t *\n\t * **Side effects** (consumer-observable on success)\n\t * - Balance debited synchronously by the buy-in amount in the\n\t * tournament's currency (`registration_cost_points`,\n\t * `registration_cost_gems`, or `registration_cost_diamonds`). For\n\t * free tournaments no deduction occurs.\n\t * - Server-side analytics events fire downstream\n\t * (`tournament_user_registered` for immediate-registration types;\n\t * `tournament_user_registration_pending` or\n\t * `tournament_registered_pending_qualification` for\n\t * manual-approval / qualification-based types).\n\t * - Any operator-configured on-join prizes are distributed (e.g.\n\t * welcome bonus). These surface via the relevant follow-up channels\n\t * (e.g. {@link getBonuses}).\n\t *\n\t * **UI guidance**: see [UI Guide — `registerInTournament`](../../docs/ui/tournaments/UIGuide_registerInTournament.md).\n\t *\n\t * **Visitor mode**: not supported. Calling from a visitor session\n\t * returns a generic error, not a typed `TournamentRegistrationError`.\n\t *\n\t * @param tournamentInstanceId The `instance_id` from `TTournament`\n\t * (NOT the template `tournament_id`).\n\t * @returns `{ err_code, err_message }`; success when `err_code === 0`\n\t * (or `30004` when treated as idempotent no-op).\n\t *\n\t * @example\n\t * ```ts\n\t * const tournaments = await window._smartico.api.getTournamentsList({\n\t * onUpdate: (refreshed) => console.log('[smartico] tournament list updated — re-render lobby from this array', refreshed),\n\t * });\n\t * const tournament = tournaments.find(t => t.instance_id === instanceId);\n\t *\n\t * if (!tournament) {\n\t * console.log('[smartico] tournament not in current lobby — refresh getTournamentsList and retry');\n\t * return;\n\t * }\n\t * if (!tournament.is_can_register) {\n\t * console.log('[smartico] tournament not currently registerable — keep CTA disabled');\n\t * return;\n\t * }\n\t *\n\t * // Clan tournament + user has no clan → resolve clan first.\n\t * if (tournament.is_clan_based) {\n\t * const userProfile = window._smartico.api.getUserProfile();\n\t * const userClanId = userProfile?.clan_id;\n\t * if (userClanId == null) {\n\t * console.log('[smartico] clan tournament — open the clan-pick modal first; after joinClan resolves, call registerInTournament again');\n\t * return;\n\t * }\n\t * }\n\t *\n\t * console.log('[smartico] registration starting — set in-flight flag, show loading dots on the Join button, keep modal open');\n\t * const r = await window._smartico.api.registerInTournament(tournament.instance_id);\n\t * console.log('[smartico] registration response received — clear in-flight flag');\n\t *\n\t * if (r.err_code === 0 || r.err_code === 30004) {\n\t * console.log('[smartico] registered (or was already) — close any modal, show a success toast; getTournamentsList onUpdate above will fire with the refreshed array');\n\t * } else if (r.err_code === 1010) {\n\t * console.log('[smartico] clan required — open the clan-pick modal again (this is the server-side safety net for a clan-leave race)');\n\t * } else if (r.err_code === 30002) {\n\t * console.error('[smartico] insufficient points — show insufficient-balance UI; deficit:', tournament.registration_cost_points);\n\t * } else if (r.err_code === 300010) {\n\t * console.error('[smartico] insufficient gems — show insufficient-balance UI; deficit:', tournament.registration_cost_gems);\n\t * } else if (r.err_code === 300011) {\n\t * console.error('[smartico] insufficient diamonds — show insufficient-balance UI; deficit:', tournament.registration_cost_diamonds);\n\t * } else if (r.err_code === 30005) {\n\t * console.error('[smartico] segment mismatch — prefer the operator-supplied message:', tournament.segment_dont_match_message || r.err_message);\n\t * } else if (r.err_code === 30008) {\n\t * console.error('[smartico] tournament full — auto-refresh will hide the button on the refreshed lobby item');\n\t * } else {\n\t * console.error('[smartico] registration failed — show a generic error toast with this message:', r.err_message);\n\t * }\n\t * ```\n\t */\n\tpublic async registerInTournament(tournamentInstanceId: number): Promise<TTournamentRegistrationResult> {\n\t\tconst r = await this.api.registerInTournament(this.userExtId, tournamentInstanceId);\n\n\t\tconst o: TTournamentRegistrationResult = {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t};\n\n\t\treturn o;\n\t}\n\n\tprotected async updateTournaments() {\n\t\tconst payload = await this.api.tournamentsGetLobbyT(this.userExtId);\n\t\tthis.updateEntity(onUpdateContextKey.TournamentList, payload);\n\t}\n}\n","import { ECacheContext, OCache } from '../OCache';\nimport {\n\tTClans,\n\tTClanInfo,\n\tTClanJoinResult,\n} from './WSAPITypes';\nimport {\n\tCACHE_DATA_SEC,\n\tonUpdateContextKey,\n} from './WSAPIBase';\nimport { WSAPITournaments } from './WSAPITournaments';\n\n/** @group Clans */\nexport class WSAPIClans extends WSAPITournaments {\n\t/**\n\t * Returns the active clans visible to the current user along with the\n\t * user's own membership state (`user_clan_id`, `cooldown_until`,\n\t * `join_date`). Use this to power a clan-picker / clan-browser screen.\n\t *\n\t * The returned `clans[]` is server-sorted by `rating_position` ASC\n\t * (1 = highest-ranked). The server has already filtered out archived\n\t * clans, clans the user fails segment conditions for, and (when any\n\t * clan has a non-zero score) clans with a zero rating score.\n\t *\n\t * @remarks\n\t * **Subscription model (`onUpdate`)**\n\t * The callback receives the FULL refreshed `TClans` payload (never a\n\t * diff/patch). Each subsequent call to `getClans({ onUpdate })`\n\t * REPLACES the prior callback. Pass `onUpdate: undefined` (or omit\n\t * it) to keep the prior callback in place; the callback is never\n\t * auto-cleared.\n\t *\n\t * **Update triggers** — note that, unlike most other subscription\n\t * methods in the SDK, this callback is **poll-driven only**. There\n\t * is NO server push that refreshes the clans list. The callback\n\t * fires when:\n\t *\n\t * 1. The 30-second cache TTL expires and a subsequent `getClans()`\n\t * call (from the consumer) triggers a fresh fetch.\n\t *\n\t * Consequence: clan-membership changes (other users joining your\n\t * clan, an operator-driven kick, a clan being archived) surface\n\t * only on the next consumer-driven fetch. If your UI needs\n\t * near-live state, poll `getClans()` on an interval; or re-call\n\t * after a {@link joinClan} resolves to pick up the new\n\t * `user_clan_id` immediately.\n\t *\n\t * **Reading state from the returned payload**\n\t * Drive list rendering from `clans[]` (already sorted). Identify\n\t * the user's own clan via `clan.clan_id === user_clan_id`\n\t * (`null` for clanless users). Detect an active switch-cooldown\n\t * with `cooldown_until !== null` — when set, the user cannot join\n\t * any clan until the cooldown expires, even clans they could\n\t * normally join. The cooldown is **user-level**, not per-clan.\n\t *\n\t * `cooldown_until` is an ISO 8601 UTC datetime string with no\n\t * timezone suffix (`\"YYYY-MM-DDTHH:MM:SS\"`). Parse as UTC:\n\t * `new Date(cooldown_until + 'Z')` or `moment.utc(cooldown_until)`.\n\t * Display in the user's local time. The default cooldown period\n\t * is configured per label by the operator (typically 7 days).\n\t *\n\t * `rating_position` is a global rank computed server-side across\n\t * all active clans in the label (1 = highest-rated). Because some\n\t * clans may be hidden by per-user segment visibility, positions\n\t * the user sees may skip (e.g. 1, 3, 7) — don't assume the array\n\t * spans a contiguous range.\n\t *\n\t * The `entry_fee_currency_type_id` enum on each clan uses values\n\t * `0` = points, `1` = gems, `2` = diamonds, `3` = free. Compare\n\t * `entry_fee_amount` against the user's matching balance (from\n\t * {@link getUserProfile}) to drive Join button affordability.\n\t *\n\t * **Cache TTL**: the SDK caches the response for 30 seconds. Cache\n\t * is fully cleared on login / logout.\n\t *\n\t * **Idempotency**: safe. Read-only. Repeated calls within the\n\t * cache window return a deep-cloned cached payload without a\n\t * network round-trip.\n\t *\n\t * **Side effects**: none — pure metadata read.\n\t *\n\t * **UI guidance**: see [UI Guide — `getClans`](../../docs/ui/clans/UIGuide_getClans.md).\n\t *\n\t * **Visitor mode**: not supported.\n\t *\n\t * @param params Optional. Omit to fetch without subscribing.\n\t * @param params.onUpdate Callback invoked with the full refreshed\n\t * `TClans` payload whenever the 30 s cache\n\t * expires and a subsequent fetch lands.\n\t * Each call to `getClans` overwrites the\n\t * prior callback.\n\t * @returns Promise resolving to `TClans`. Empty\n\t * `clans` array if no clans are visible.\n\t *\n\t * @example\n\t * ```ts\n\t * const result = await window._smartico.api.getClans({\n\t * onUpdate: (refreshed) => {\n\t * console.log('[smartico] clans payload refreshed (poll-driven; ~30 s cadence) — re-render the clan list from this payload:', refreshed);\n\t * },\n\t * });\n\t *\n\t * console.log('[smartico] user is', result.user_clan_id == null ? 'clanless' : 'in clan ' + result.user_clan_id);\n\t *\n\t * // Cooldown handling — affects ALL clans, not a specific one.\n\t * if (result.cooldown_until) {\n\t * const cooldownEndsUtc = new Date(result.cooldown_until + 'Z');\n\t * console.log('[smartico] switch-cooldown active — disable all Join buttons until', cooldownEndsUtc.toLocaleString(),\n\t * '(local). Render the cooldown end on the disabled button label.');\n\t * }\n\t *\n\t * // Render clans — already sorted by rating_position ASC.\n\t * for (const clan of result.clans) {\n\t * const isMine = clan.clan_id === result.user_clan_id;\n\t * const isFull = clan.member_count >= clan.capacity_limit;\n\t *\n\t * if (isMine) {\n\t * console.log('[smartico] highlight clan', clan.clan_id, 'as \"Your clan\"; CTA label \"Your clan\", no-op');\n\t * } else if (result.cooldown_until) {\n\t * console.log('[smartico] clan', clan.clan_id, '— Join blocked by user cooldown; show disabled button with cooldown end date');\n\t * } else if (isFull) {\n\t * console.log('[smartico] clan', clan.clan_id, '— Clan full; show disabled \"Clan is full\" button');\n\t * } else {\n\t * const label = clan.entry_fee_amount === 0 || clan.entry_fee_currency_type_id === 3\n\t * ? 'Join free'\n\t * : `Join (${clan.entry_fee_amount} ${['Points','Gems','Diamonds'][clan.entry_fee_currency_type_id]})`;\n\t * console.log('[smartico] clan', clan.clan_id, '— render enabled Join button labelled', label);\n\t * }\n\t * }\n\t *\n\t * // After a successful joinClan(), re-call getClans manually — no push refresh.\n\t * // const r = await window._smartico.api.joinClan(targetClanId);\n\t * // if (r.errCode === 0) await window._smartico.api.getClans();\n\t * ```\n\t */\n\tpublic async getClans({ onUpdate }: { onUpdate?: (data: TClans) => void } = {}): Promise<TClans> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.Clans, onUpdate);\n\t\t}\n\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.Clans,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.clansGetListT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Returns the full detail of a single clan — adds the ranked\n\t * `members[]` roster and a fresh `cooldown_until` on top of the same\n\t * fields exposed on a `TClan` list entry. Use this to power a clan\n\t * detail screen / popup after the user picks an item from\n\t * {@link getClans}.\n\t *\n\t * Each call is a fresh server round-trip — there is no client cache\n\t * and no push event refreshes detail state. Re-call to refresh.\n\t *\n\t * @remarks\n\t * **Preconditions**\n\t * Pass a valid `clanId` (typically read from\n\t * `TClans.clans[i].clan_id` returned by {@link getClans}). The\n\t * method works standalone — `getClans()` is not required first —\n\t * but is the only stable source of valid IDs.\n\t *\n\t * **Refresh model**\n\t * - **No subscription.** One-shot promise.\n\t * - **No client cache.** Every call sends a network request.\n\t * - **No push event** refreshes the detail. Member-join, kick, or\n\t * contribution-score changes require a fresh `getClanInfo` call.\n\t *\n\t * **Returned shape — beyond `TClan`**\n\t * `TClanInfo` adds two things on top of the same identity / capacity\n\t * / fee / rating fields you'd see on a `TClan` list entry:\n\t * 1. A ranked `members[]` array — each entry carries `user_id`,\n\t * `public_username`, `avatar_id` / `avatar_real_id`, the resolved\n\t * `avatar_url`, the member's `position` (rank within this clan),\n\t * `contribution_score`, the `is_me` flag identifying the current\n\t * user's row, and the optional `clean_ext_user_id`. The server\n\t * orders members by score DESC (i.e. `position` ASC); no\n\t * client-side re-sort is required.\n\t * 2. A fresh `cooldown_until` on the clan info itself. This is the\n\t * SAME user-level cooldown as `TClans.cooldown_until` (the\n\t * cooldown is global to the user, not per clan) — but `getClans`\n\t * returns a value cached for up to 30 s while `getClanInfo`\n\t * always returns the current value. If the list-cached cooldown\n\t * has just expired, this detail call will reflect it first.\n\t *\n\t * **Username display**: in the default Smartico UI, member rows use\n\t * `public_username`. Some surfaces (e.g. the tournament clan\n\t * drill-down) prefer `clean_ext_user_id` as the primary display\n\t * with `public_username` as fallback — pick the convention that\n\t * matches your product's identity model.\n\t *\n\t * **Idempotency**: safe. Read-only.\n\t *\n\t * **Side effects**: none — pure metadata read.\n\t *\n\t * **UI guidance**: see [UI Guide — `getClanInfo`](../../docs/ui/clans/UIGuide_getClanInfo.md).\n\t *\n\t * **Visitor mode**: not supported.\n\t *\n\t * @param clanId The clan ID from `TClans.clans[i].clan_id`.\n\t * @returns Promise resolving to `TClanInfo`. Rejects if the\n\t * clan ID is invalid or the user lacks visibility\n\t * for it.\n\t *\n\t * @example\n\t * ```ts\n\t * const result = await window._smartico.api.getClans();\n\t * const clan = result.clans[0];\n\t *\n\t * console.log('[smartico] loading detail for clan', clan.clan_id);\n\t * const detail = await window._smartico.api.getClanInfo(clan.clan_id);\n\t *\n\t * console.log('[smartico] render detail with', detail.members.length, 'members');\n\t *\n\t * // Find current user's row to power a sticky \"me\" footer.\n\t * const meRow = detail.members.find(m => m.is_me);\n\t * if (meRow) {\n\t * console.log('[smartico] current user rank in this clan:', meRow.position,\n\t * 'contribution:', meRow.contribution_score, '— render sticky my-member footer');\n\t * }\n\t *\n\t * // Resolve Join CTA state using the detail's cooldown (always fresh).\n\t * const isMyClan = detail.clan_id === result.user_clan_id;\n\t * const inCooldown = detail.cooldown_until != null;\n\t * const isFull = detail.member_count >= detail.capacity_limit;\n\t * if (isMyClan) {\n\t * console.log('[smartico] this is the user\\'s clan — render disabled \"Your clan\" button');\n\t * } else if (inCooldown) {\n\t * const ends = new Date(detail.cooldown_until + 'Z');\n\t * console.log('[smartico] user is in clan-switch cooldown until', ends.toLocaleString(),\n\t * '— render disabled cooldown button');\n\t * } else if (isFull) {\n\t * console.log('[smartico] clan is full — render disabled \"Clan is full\" button');\n\t * } else {\n\t * console.log('[smartico] joinable — render enabled Join button');\n\t * }\n\t * ```\n\t */\n\tpublic async getClanInfo(clanId: number): Promise<TClanInfo> {\n\t\treturn this.api.clansGetInfoT(this.userExtId, clanId);\n\t}\n\n\t/**\n\t * Joins (or switches into) a clan on behalf of the current user. For\n\t * paid clans (`entry_fee_amount > 0`), the user's balance for the\n\t * matching currency is debited synchronously before the response\n\t * returns. If the user is already in a clan, this is treated as an\n\t * atomic clan-switch (deactivate old membership + insert new + debit\n\t * fee, all in one transaction — the user is never observably\n\t * clanless).\n\t *\n\t * A successful response (`errCode === 0`) means: membership is\n\t * persisted, the fee (if any) has been debited, the user's\n\t * switch-cooldown has restarted, and a clan-joined CRM event has\n\t * fired server-side.\n\t *\n\t * @remarks\n\t * **Result shape note**: `TClanJoinResult` uses `errCode` / `errMsg`\n\t * (camelCase) — different from most other SDK result types in this\n\t * library which use `err_code` / `err_message` (snake_case). Branch\n\t * on the camelCase keys when reading this method's result.\n\t *\n\t * **Preconditions**\n\t * Read the candidate from {@link getClans} and gate the call on\n\t * `clan.member_count < clan.capacity_limit`, `cooldown_until == null`\n\t * (on the `TClans` payload — the cooldown is user-level, not\n\t * per-clan), and the user's balance for `entry_fee_currency_type_id`\n\t * being at least `entry_fee_amount` (free clans bypass this check).\n\t * The SDK forwards the call unconditionally — calling without\n\t * satisfying these will most likely return one of the error codes\n\t * below.\n\t *\n\t * **Error codes** (in `errCode`, typed as {@link JoinClanErrorCode})\n\t * - `0` (`JOIN_CLAN_OK`) — success; membership persisted, fee\n\t * debited, cooldown restarted.\n\t * - `1000` (`JOIN_CLAN_INVALID_PARAMETERS`) — request body missing\n\t * `clan_id`. Should not occur via the SDK; treat as a programming\n\t * error.\n\t * - `1001` (`JOIN_CLAN_NOT_FOUND`) — clan doesn't exist for this\n\t * label, OR the clan is archived / in draft state. The server\n\t * merges \"missing\" and \"archived\" into this single code. Refresh\n\t * `getClans()` and remove the entry from the UI.\n\t * - `1002` (`JOIN_CLAN_FULL`) — capacity reached between the list\n\t * fetch and the join click (`member_count >= capacity_limit` at\n\t * the server's atomic check). Refresh the list — the button will\n\t * become \"Clan is full\".\n\t * - `1003` (`JOIN_CLAN_INSUFFICIENT_FUNDS`) — insufficient balance\n\t * for the clan's entry fee. A single code covers all three\n\t * currencies (points / gems / diamonds); read\n\t * `clan.entry_fee_currency_type_id` to identify which currency\n\t * the user is short on. Show an insufficient-balance UI naming\n\t * the deficit.\n\t * - `1004` (`JOIN_CLAN_SEGMENT_MISMATCH`) — user does not meet the\n\t * clan's entry segment or numeric conditions. There is no\n\t * client-side pre-guard for this — surface a gating message.\n\t * - `1005` (`JOIN_CLAN_USER_IS_NOT_IN_CLAN`) — this method NEVER\n\t * returns `1005`. The code is shared with the tournament\n\t * registration error space and fires only on\n\t * {@link registerInTournament} responses when a clan-based\n\t * tournament requires the user to be in a clan first.\n\t * - `1006` (`JOIN_CLAN_COOLDOWN_ACTIVE`) — user is inside the\n\t * switch-cooldown window from a previous clan join (default\n\t * 7 days, configurable per label). Surface the\n\t * `TClans.cooldown_until` expiry in the disabled CTA.\n\t * - `1007` (`JOIN_CLAN_ARCHIVED`) — defined on the public enum but\n\t * the server does NOT emit this code in practice (archived clans\n\t * are reported as `1001`). Handle it as a synonym for `1001`\n\t * defensively, but do not rely on it.\n\t * - `1011` (`JOIN_CLAN_JOINED_AFTER_TOURNAMENT_START`) — this\n\t * method does NOT return `1011` directly. The code fires on\n\t * {@link registerInTournament} responses when the user joined\n\t * their current clan after the tournament started AND already\n\t * has tournament scores.\n\t * - other non-zero — generic server error. Surface `errMsg` if any.\n\t *\n\t * **Idempotency**: NOT safe — and notably dangerous. Calling\n\t * `joinClan` with the user's CURRENT `clanId` does NOT short-circuit\n\t * server-side; the call is treated as a clan-switch to the same\n\t * clan. If the label's cooldown is non-zero (the default), the\n\t * second call returns `1006`. If the cooldown is configured to\n\t * zero, the second call will deduct the entry fee AGAIN, deactivate\n\t * the membership, and re-insert it. The SDK does NOT enforce an\n\t * in-flight lock. Consumers MUST guard the call site against\n\t * double-clicks (set a local \"joining\" flag on click, clear it on\n\t * response) AND short-circuit when the user is already in the\n\t * target clan.\n\t *\n\t * **Refresh after success (and after failure)**\n\t * The SDK does NOT automatically refresh the {@link getClans} cache\n\t * after a join. Manually re-call `getClans()` on success to pick up\n\t * the new `user_clan_id`, refreshed `member_count`, and the new\n\t * `cooldown_until` value. Until you do, the cached `TClans` payload\n\t * is stale.\n\t *\n\t * **Side effects** (consumer-observable on success)\n\t * - Entry-fee currency balance decreases by `entry_fee_amount`\n\t * (visible on the next {@link getUserProfile} refresh / via the\n\t * user-properties update channel).\n\t * - The user's clan membership row is created (or replaced, on a\n\t * switch). `member_count` on the new clan increments by 1; on a\n\t * switch, the old clan's `member_count` decrements by 1 in the\n\t * same transaction.\n\t * - The user's switch-cooldown restarts at the join time (the\n\t * `TClans.cooldown_until` field on the next list fetch reflects\n\t * the new expiry).\n\t * - Server-side CRM analytics fire (clan-joined event, currency-\n\t * deducted event for paid clans). These surface only as\n\t * server-side traces; the SDK consumer observes them indirectly\n\t * via balance / membership refresh.\n\t *\n\t * **UI guidance**: see [UI Guide — `joinClan`](../../docs/ui/clans/UIGuide_joinClan.md).\n\t *\n\t * **Visitor mode**: not supported. The server rejects the request\n\t * for unauthenticated sessions.\n\t *\n\t * @param clanId The clan ID from `TClans.clans[i].clan_id` (or\n\t * `TClanInfo.clan_id`).\n\t * @returns `{ errCode, errMsg }`; success when `errCode === 0`.\n\t * Note camelCase keys (see \"Result shape note\" above).\n\t *\n\t * @example\n\t * ```ts\n\t * const result = await window._smartico.api.getClans();\n\t * const target = result.clans.find(c => c.clan_id === clanId);\n\t *\n\t * if (!target) {\n\t * console.log('[smartico] clan not in current list — refresh getClans and retry');\n\t * return;\n\t * }\n\t * if (target.clan_id === result.user_clan_id) {\n\t * console.log('[smartico] user is already in this clan — short-circuit; do NOT call joinClan again, the server will treat it as a switch and may re-deduct the fee');\n\t * return;\n\t * }\n\t * if (result.cooldown_until) {\n\t * console.log('[smartico] user is in cooldown — disable Join until', new Date(result.cooldown_until + 'Z').toLocaleString());\n\t * return;\n\t * }\n\t * if (target.member_count >= target.capacity_limit) {\n\t * console.log('[smartico] clan is full — disable Join');\n\t * return;\n\t * }\n\t *\n\t * console.log('[smartico] join starting — set in-flight flag, show loading dots on Join button, keep modal open');\n\t * const r = await window._smartico.api.joinClan(target.clan_id);\n\t * console.log('[smartico] join response received — clear in-flight flag');\n\t *\n\t * if (r.errCode === 0) {\n\t * console.log('[smartico] joined successfully — refresh getClans to pick up the new user_clan_id, member_count, and cooldown_until');\n\t * await window._smartico.api.getClans();\n\t * } else if (r.errCode === 1002) {\n\t * console.error('[smartico] clan is full — refresh list, hide the Join CTA on the now-full clan');\n\t * } else if (r.errCode === 1003) {\n\t * const currencyLabel = ['points', 'gems', 'diamonds'][target.entry_fee_currency_type_id] ?? 'currency';\n\t * console.error('[smartico] insufficient', currencyLabel, '— need', target.entry_fee_amount);\n\t * } else if (r.errCode === 1004) {\n\t * console.error('[smartico] user does not meet segment / entry conditions — show a gating message');\n\t * } else if (r.errCode === 1006) {\n\t * console.error('[smartico] cooldown active — surface the cooldown_until from getClans:', result.cooldown_until);\n\t * } else if (r.errCode === 1001) {\n\t * console.error('[smartico] clan not found or archived — refresh list and remove from UI');\n\t * } else {\n\t * console.error('[smartico] join failed — show a generic error toast with this message:', r.errMsg);\n\t * }\n\t * ```\n\t */\n\tpublic async joinClan(clanId: number): Promise<TClanJoinResult> {\n\t\treturn this.api.clanJoin(this.userExtId, clanId);\n\t}\n\n\tprotected async updateClans() {\n\t\tconst payload = await this.api.clansGetListT(this.userExtId);\n\t\tthis.updateEntity(onUpdateContextKey.Clans, payload);\n\t}\n}\n","import { ECacheContext, OCache } from '../OCache';\nimport {\n\tJackpotDetails,\n\tJackpotPot,\n\tJackpotWinnerHistory,\n\tJackpotsOptinResponse,\n\tJackpotsOptoutResponse,\n} from '../Jackpots';\nimport { IntUtils } from '../IntUtils';\nimport { TGetJackpotEligibleGamesResponse } from '../Jackpots/GetJackpotEligibleGamesResponse';\nimport {\n\tJACKPOT_TEMPLATE_CACHE_SEC,\n\tJACKPOT_POT_CACHE_SEC,\n\tJACKPOT_WINNERS_CACHE_SEC,\n\tJACKPOT_ELIGIBLE_GAMES_CACHE_SEC,\n\tonUpdateContextKey,\n} from './WSAPIBase';\nimport { WSAPIClans } from './WSAPIClans';\n\n/** @group Jackpots */\nexport class WSAPIJackpots extends WSAPIClans {\n\n\t/** @hidden */\n\tprotected jackpotGetSignature: string = '';\n\tprotected async jackpotClearCache() {\n\t\tOCache.clear(ECacheContext.WSAPI, onUpdateContextKey.Jackpots);\n\t\tOCache.clear(ECacheContext.WSAPI, onUpdateContextKey.Pots);\n\t\tOCache.clear(ECacheContext.WSAPI, onUpdateContextKey.JackpotWinners);\n\t}\n\n\t/** Returns list of Jackpots that are active in the system and matching to the filter definition.\n\t * If filter is not provided, all active jackpots will be returned.\n\t * Filter can be used to get jackpots related to specific game or specific jackpot template.\n\t * You can call this method every second in order to get up to date information about current value of the jackpot(s) and present them to the end-users\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * ```\n\t * _smartico.vapi('EN').jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t */\n\tpublic async jackpotGet(filter?: { related_game_id?: string; jp_template_id?: number }): Promise<JackpotDetails[]> {\n\t\tconst signature: string = `${filter?.jp_template_id}:${filter?.related_game_id}`;\n\n\t\tif (signature !== this.jackpotGetSignature) {\n\t\t\tthis.jackpotGetSignature = signature;\n\t\t\tthis.jackpotClearCache();\n\t\t}\n\n\t\tlet jackpots: JackpotDetails[] = [];\n\t\tlet pots: JackpotPot[] = [];\n\n\t\tjackpots = await OCache.use<JackpotDetails[]>(\n\t\t\tonUpdateContextKey.Jackpots,\n\t\t\tECacheContext.WSAPI,\n\t\t\tasync () => {\n\t\t\t\tconst _jackpots = await this.api.jackpotGet(this.userExtId, filter);\n\t\t\t\tconst _pots = _jackpots.items.map((jp) => jp.pot);\n\n\t\t\t\t_jackpots.items.forEach((jp) => {\n\t\t\t\t\tjp.jp_public_meta.custom_data = IntUtils.JsonOrText(jp.jp_public_meta.custom_data);\n\t\t\t\t});\n\n\t\t\t\tOCache.set(onUpdateContextKey.Pots, _pots, ECacheContext.WSAPI, JACKPOT_POT_CACHE_SEC);\n\t\t\t\treturn _jackpots.items;\n\t\t\t},\n\t\t\tJACKPOT_TEMPLATE_CACHE_SEC,\n\t\t);\n\n\t\tif (jackpots.length > 0) {\n\t\t\tpots = await OCache.use<JackpotPot[]>(\n\t\t\t\tonUpdateContextKey.Pots,\n\t\t\t\tECacheContext.WSAPI,\n\t\t\t\tasync () => {\n\t\t\t\t\tconst jp_template_ids = jackpots.map((jp) => jp.jp_template_id);\n\t\t\t\t\treturn (await this.api.potGet(this.userExtId, { jp_template_ids })).items;\n\t\t\t\t},\n\t\t\t\tJACKPOT_POT_CACHE_SEC,\n\t\t\t);\n\t\t}\n\n\t\treturn jackpots.map((jp) => {\n\t\t\tlet _jp: JackpotDetails = {\n\t\t\t\t...jp,\n\t\t\t\tpot: pots.find((p) => p.jp_template_id === jp.jp_template_id),\n\t\t\t};\n\t\t\treturn _jp;\n\t\t});\n\t}\n\n\t/**\n\t * Opt-in currently logged in user to the jackpot with the specified jp_template_id.\n\t * You may call jackpotGet method after doing optin to see that user is opted in to the jackpot.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.jackpotOptIn({ jp_template_id: 123 }).then((result) => {\n\t * console.log('Opted in to the jackpot');\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t *\n\t */\n\tpublic async jackpotOptIn(filter: { jp_template_id: number }): Promise<JackpotsOptinResponse> {\n\t\tif (!filter.jp_template_id) {\n\t\t\tthrow new Error('jp_template_id is required in jackpotOptIn');\n\t\t}\n\n\t\tconst result = await this.api.jackpotOptIn(this.userExtId, filter);\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Opt-out currently logged in user from the jackpot with the specified jp_template_id.\n\t * You may call jackpotGet method after doing optout to see that user is not opted in to the jackpot.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.jackpotOptOut({ jp_template_id: 123 }).then((result) => {\n\t * console.log('Opted out from the jackpot');\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t *\n\t */\n\tpublic async jackpotOptOut(filter: { jp_template_id: number }): Promise<JackpotsOptoutResponse> {\n\t\tif (!filter.jp_template_id) {\n\t\t\tthrow new Error('jp_template_id is required in jackpotOptOut');\n\t\t}\n\n\t\tconst result = await this.api.jackpotOptOut(this.userExtId, filter);\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Returns jackpot winners for the given `jp_template_id` (paginated on the server).\n\t * Default page size on the wire is 20; use `limit`, `offset`, and repeated calls to load more.\n\t * The full protocol response also includes `has_more`; this method returns only the `winners` array.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getJackpotWinners({\n\t * jp_template_id: 123,\n\t * }).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t *\n\t * @param params - Jackpot winners parameters\n\t * @param params.jp_template_id - Jackpot template id (required; throws if missing)\n\t * @param params.limit - Page size (server default 20 when omitted)\n\t * @param params.offset - Offset into the winner list\n\t */\n\n\tpublic async getJackpotWinners({\n\t\tlimit,\n\t\toffset,\n\t\tjp_template_id,\n\t}: {\n\t\tlimit?: number;\n\t\toffset?: number;\n\t\tjp_template_id?: number;\n\t}): Promise<JackpotWinnerHistory[]> {\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.JackpotWinners + jp_template_id,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.getJackpotWinnersT(this.userExtId, limit, offset, jp_template_id),\n\t\t\tJACKPOT_WINNERS_CACHE_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Returns the eligible games for the jackpot with the specified jp_template_id.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getJackpotEligibleGames({ jp_template_id: 123 }).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t * \n\t * **Visitor mode: not supported**\n\t * \n\t */\n\n\tpublic async getJackpotEligibleGames({ jp_template_id, onUpdate } : { jp_template_id: number, onUpdate?: () => void }): Promise<TGetJackpotEligibleGamesResponse> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.JackpotEligibleGames, onUpdate);\n\t\t}\n\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.JackpotEligibleGames + jp_template_id,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.getJackpotEligibleGamesT(this.userExtId, { jp_template_id }),\n\t\t\tJACKPOT_ELIGIBLE_GAMES_CACHE_SEC,\n\t\t);\n\t}\n}\n","import { ECacheContext, OCache } from '../OCache';\nimport {\n\tTRaffle,\n\tTRaffleDraw,\n\tTRaffleDrawRun,\n\tTransformedRaffleClaimPrizeResponse,\n\tTRaffleOptinResponse,\n} from './WSAPITypes';\nimport {\n\tdrawRunHistoryTransform,\n\traffleClaimPrizeResponseTransform,\n} from '../Raffle';\nimport {\n\tCACHE_DATA_SEC,\n\tonUpdateContextKey,\n} from './WSAPIBase';\nimport { WSAPIJackpots } from './WSAPIJackpots';\n\n/** @group Raffles */\nexport class WSAPIRaffles extends WSAPIJackpots {\n\tprotected async updateRaffles() {\n\t\tconst payload = await this.api.getRafflesT(this.userExtId);\n\t\tthis.updateEntity(onUpdateContextKey.Raffles, payload);\n\t}\n\n\t/**\n\t * Returns the list of Raffles available for user\n\t * The returned list of Raffles is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getRaffles with a new onUpdate callback, the old one will be overwritten by the new one.\n\t * The onUpdate callback will be called on claiming prize. Updated Raffles will be passed to onUpdate callback.\n\t *\n\t * **Example**:\n\t * \n\t * ```\n\t * _smartico.api.getRaffles().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * \n\t * ```\n\t * _smartico.vapi('EN').getRaffles().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t */\n\n\tpublic async getRaffles({ onUpdate }: { onUpdate?: (data: TRaffle[]) => void } = {}): Promise<TRaffle[]> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.Raffles, onUpdate);\n\t\t}\n\n\t\treturn OCache.use(onUpdateContextKey.Raffles, ECacheContext.WSAPI, () => this.api.getRafflesT(this.userExtId), CACHE_DATA_SEC);\n\t}\n\n\t/**\n\t * Returns draw run for provided raffle_id and run_id.\n\t * You can pass winners_from and winners_to parameters to get a specific range of winners. Default is 0-20.\n\t *\n\t *\n\t * **Example**:\n\t * \n\t * ```javascript\n\t * _smartico.api.getRaffleDrawRun({raffle_id: 156, run_id: 145}).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * \n\t * \n\t * ```javascript\n\t * _smartico.vapi('EN').getRaffleDrawRun({ raffle_id: 156, run_id: 145 }).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t */\n\n\tpublic async getRaffleDrawRun(props: { raffle_id: number; run_id: number; winners_from?: number; winners_to?: number }): Promise<TRaffleDraw> {\n\t\tif (!props.raffle_id || !props.run_id) {\n\t\t\tthrow new Error('both raffle_id and run_id are required');\n\t\t}\n\n\t\treturn await this.api.getRaffleDrawRunT(this.userExtId, props.raffle_id, props.run_id, props.winners_from, props.winners_to);\n\t}\n\n\t/**\n\t * Returns history of draw runs for the provided raffle_id and draw_id, if the draw_id is not provided will return history of all the draws for the provided raffle_id\n\t *\n\t *\n\t * **Example**:\n\t * \n\t * ```javascript\n\t * _smartico.api.getRaffleDrawRunsHistory({ raffle_id: 156, draw_id: 432 }).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * \n\t * ```javascript\n\t * _smartico.vapi('EN').getRaffleDrawRunsHistory({ raffle_id: 156, draw_id: 432 }).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t */\n\n\tpublic async getRaffleDrawRunsHistory(props: { raffle_id: number; draw_id?: number }): Promise<TRaffleDrawRun[]> {\n\t\t\n\t\tconst res = await this.api.getRaffleDrawRunsHistory(this.userExtId, props);\n\n\t\tif (!props.raffle_id) {\n\t\t\tthrow new Error('raffle_id is required');\n\t\t}\n\n\t\treturn drawRunHistoryTransform(res);\n\t}\n\n\t/**\n\t * Returns `err_code` and `err_message` after the call; `err_code` 0 means the request succeeded.\n\t *\n\t *\n\t * **Example**:\n\t * \n\t * ```javascript\n\t * _smartico.api.claimRafflePrize({won_id:251}).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * \n\t * ```javascript\n\t * _smartico.vapi('EN').claimRafflePrize({ won_id: 251 }).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t */\n\tpublic async claimRafflePrize(props: { won_id: number }): Promise<TransformedRaffleClaimPrizeResponse> {\n\t\tif (!props.won_id) {\n\t\t\tthrow new Error('won_id is required');\n\t\t}\n\n\t\tconst res = await this.api.claimRafflePrize(this.userExtId, { won_id: props.won_id });\n\t\treturn raffleClaimPrizeResponseTransform(res);\n\t}\n\n\t/**\n\t * Requests an opt-in for the specified raffle. Returns the err_code.\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async requestRaffleOptin(props: { raffle_id: number; draw_id: number; raffle_run_id: number }): Promise<TRaffleOptinResponse> {\n\t\tif (!props.raffle_id) {\n\t\t\tthrow new Error('raffle_id is required');\n\t\t}\n\t\tif (!props.draw_id) {\n\t\t\tthrow new Error('draw_id is required');\n\t\t}\n\t\tif (!props.raffle_run_id) {\n\t\t\tthrow new Error('raffle_run_id is required');\n\t\t}\n\n\t\tconst r = await this.api.raffleOptin(this.userExtId, props);\n\n\t\treturn {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t};\n\t}\n}\n","import { SAWSpinsCountPush } from '../MiniGames';\nimport { ECacheContext, OCache } from '../OCache';\nimport {\n\tTMiniGamePlayResult,\n\tTMiniGameTemplate,\n\tTMiniGamePlayBatchResult,\n\tTSawHistory,\n} from './WSAPITypes';\nimport {\n\tCACHE_DATA_SEC,\n\tonUpdateContextKey,\n} from './WSAPIBase';\nimport { WSAPIRaffles } from './WSAPIRaffles';\n\n/** @group MiniGames */\nexport class WSAPIMiniGames extends WSAPIRaffles {\n\t/**\n\t * Returns the list of mini-games configured for the current user (not filtered by spin availability or Widget visibility).\n\t * The returned list of mini-games is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getMiniGames with a new onUpdate callback, the old one will be overwritten by the new one.\n\t * The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or won prize is spin/jackpot and if max count of the available user spins equals one, also if the spins were issued to the user manually in the BO. Updated templates will be passed to onUpdate callback.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getMiniGames().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * ```\n\t * _smartico.vapi('EN').getMiniGames().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t */\n\tpublic async getMiniGames({ onUpdate }: { onUpdate?: (data: TMiniGameTemplate[]) => void } = {}): Promise<\n\t\tTMiniGameTemplate[]\n\t> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.Saw, onUpdate);\n\t\t}\n\n\t\treturn OCache.use(onUpdateContextKey.Saw, ECacheContext.WSAPI, () => this.api.sawGetTemplatesT(this.userExtId), CACHE_DATA_SEC);\n\t}\n\n\t/**\n\t * Returns the list of mini-games based on the provided parameters. \"Limit\" and \"offset\" indicate the range of items to be fetched.\n\t * The maximum number of items per request is limited to 20.\n\t * You can leave this params empty and by default it will return list of mini-games ranging from 0 to 20.\n\t * The returned list of mini-games history is cached for 30 seconds.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getMiniGamesHistory().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\n\tpublic async getMiniGamesHistory({\n\t\tlimit,\n\t\toffset,\n\t\tsaw_template_id,\n\t}: {\n\t\tlimit?: number;\n\t\toffset?: number;\n\t\tsaw_template_id?: number;\n\t}): Promise<TSawHistory[]> {\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.SAWHistory,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.getSawWinningHistoryT(this.userExtId, limit, offset, saw_template_id),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Plays the specified by template_id mini-game on behalf of user and returns prize_id or err_code\n\t * After playMiniGame is called, you can call getMiniGames to get the list of mini-games.The returned list of mini-games is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call playMiniGame with a new onUpdate callback, the old one will be overwritten by the new one.\n\t * The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or won prize is spin/jackpot and if max count of the available user spins equals one, also if the spins were issued to the user manually in the BO. Updated templates will be passed to onUpdate callback.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.playMiniGame(55).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async playMiniGame(\n\t\ttemplate_id: number,\n\t\t{ onUpdate }: { onUpdate?: (data: TMiniGameTemplate[]) => void } = {},\n\t): Promise<TMiniGamePlayResult> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.Saw, onUpdate);\n\t\t}\n\n\t\tconst r = await this.api.sawSpinRequest(this.userExtId, template_id);\n\t\tthis.api.doAcknowledgeRequest(this.userExtId, r.request_id);\n\n\t\tconst o: TMiniGamePlayResult = {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t\tprize_id: r.saw_prize_id,\n\t\t};\n\n\t\treturn o;\n\t}\n\n\t/**\n\t * Sends the acknowledge request with specific client_request_id from minigame history in order to claim prize\n\t * **Example**:\n\t * ```\n\t * _smartico.api.miniGameWinAcknowledgeRequest('2a189322-31bb-4119-b943-bx7868ff8dc3').then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t */\n\tpublic async miniGameWinAcknowledgeRequest(request_id: string) {\n\t\treturn this.api.doAcknowledgeRequest(this.userExtId, request_id);\n\t}\n\n\t/**\n\t * Plays the specified by template_id mini-game on behalf of user spin_count times and returns array of the prizes\n\t * After playMiniGameBatch is called, you can call getMiniGames to get the list of mini-games. The returned list of mini-games is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call playMiniGameBatch with a new onUpdate callback, the old one will be overwritten by the new one.\n\t * The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or won prize is spin/jackpot and if max count of the available user spins equals one, also if the spins were issued to the user manually in the BO. Updated templates will be passed to onUpdate callback.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.playMiniGameBatch(55, 10).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async playMiniGameBatch(\n\t\ttemplate_id: number,\n\t\tspin_count: number,\n\t\t{ onUpdate }: { onUpdate?: (data: TMiniGameTemplate[]) => void } = {},\n\t): Promise<TMiniGamePlayBatchResult[]> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.Saw, onUpdate);\n\t\t}\n\n\t\tconst response = await this.api.sawSpinBatchRequest(this.userExtId, template_id, spin_count);\n\n\t\tconst request_ids = response.results.map((result) => result.request_id);\n\t\tthis.api.doAcknowledgeBatchRequest(this.userExtId, request_ids);\n\n\t\tconst o: TMiniGamePlayBatchResult[] = response.results.map((result) => ({\n\t\t\terrCode: result.errCode,\n\t\t\terrMessage: result.errMsg,\n\t\t\tsaw_prize_id: result.saw_prize_id,\n\t\t\tjackpot_amount: result.jackpot_amount,\n\t\t\tfirst_spin_in_period: result.first_spin_in_period,\n\t\t}));\n\n\t\treturn o;\n\t}\n\n\tprotected async updateOnSpin(data: SAWSpinsCountPush) {\n\t\tconst templates: TMiniGameTemplate[] = await OCache.use(\n\t\t\tonUpdateContextKey.Saw,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.sawGetTemplatesT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t\tconst index = templates.findIndex((t) => t.id === data.saw_template_id);\n\t\ttemplates[index].spin_count = data.spin_count;\n\t\tthis.updateEntity(onUpdateContextKey.Saw, templates);\n\t}\n\n\tprotected async reloadMiniGameTemplate() {\n\t\tconst updatedTemplates = await this.api.sawGetTemplatesT(this.userExtId);\n\t\tthis.updateEntity(onUpdateContextKey.Saw, updatedTemplates);\n\t}\n}\n","import { ECacheContext, OCache } from '../OCache';\nimport {\n\tTAvatarDefinition,\n\tTAvatarCustomized,\n\tTAvatarPrompt,\n\tTSetAvatarResult,\n} from './WSAPITypes';\nimport {\n\tCACHE_DATA_SEC,\n\tonUpdateContextKey,\n} from './WSAPIBase';\nimport { WSAPIMiniGames } from './WSAPIMiniGames';\n\n/** @group Avatars */\nexport class WSAPIAvatars extends WSAPIMiniGames {\n\t/**\n\t * Returns the list of avatars available in the catalog for the current user.\n\t * The response includes both free avatars and earned/purchased ones.\n\t * Avatars with `hide_until_achieved = true` and `is_given = false` should be hidden from the user.\n\t * The result is cached for 30 seconds.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getAvatarsList().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async getAvatarsList(): Promise<TAvatarDefinition[]> {\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.AvatarsList,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.avatarsGetListT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Returns the list of AI-customized avatars for the current user.\n\t * Each entry represents a previously generated AI customization for a specific base avatar.\n\t * The result is cached for 30 seconds.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getAvatarsCustomized().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async getAvatarsCustomized(): Promise<TAvatarCustomized[]> {\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.AvatarsCustomized,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.avatarsGetCustomizedT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Returns the list of AI customization prompts (styles) available for avatar customization.\n\t * Each prompt represents a visual style that can be applied to a base avatar.\n\t * The result is cached for 30 seconds.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getAvatarPrompts().then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async getAvatarPrompts(): Promise<TAvatarPrompt[]> {\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.AvatarPrompts,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.avatarsGetPromptsT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Sets the specified avatar as the active avatar for the current user.\n\t * Pass `avatar_url` (the `TAvatarDefinition.url` path or a CDN URL for AI-customized avatars)\n\t * and `avatar_real_id` from the avatar catalog.\n\t * After a successful call, the avatar list cache is cleared so the next `getAvatarsList()` call reflects `is_in_use`.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getAvatarsList().then((avatars) => {\n\t * const avatar = avatars.find((a) => !a.hide_until_achieved || a.is_given);\n\t * if (avatar) {\n\t * _smartico.api.setAvatar({\n\t * avatar_url: avatar.url,\n\t * avatar_real_id: avatar.avatar_real_id,\n\t * }).then((result) => {\n\t * console.log(result);\n\t * });\n\t * }\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async setAvatar(props: { avatar_url: string; avatar_real_id: number }): Promise<TSetAvatarResult> {\n\t\tif (!props.avatar_url) {\n\t\t\tthrow new Error('avatar_url is required');\n\t\t}\n\t\tif (!props.avatar_real_id) {\n\t\t\tthrow new Error('avatar_real_id is required');\n\t\t}\n\n\t\tconst r = await this.api.avatarSetAvatar(this.userExtId, props.avatar_url, props.avatar_real_id);\n\n\t\tOCache.clear(ECacheContext.WSAPI, onUpdateContextKey.AvatarsList);\n\t\tOCache.clear(ECacheContext.WSAPI, onUpdateContextKey.AvatarsCustomized);\n\n\t\treturn {\n\t\t\terr_code: r.errCode ?? 0,\n\t\t\terr_message: r.errMsg,\n\t\t};\n\t}\n}\n","import {\n\tGamesApiResponse,\n\tGamePickRound,\n\tGamePickRoundBoard,\n\tGamePickUserInfo,\n\tGamePickGameInfo,\n\tGamePickRequestParams,\n\tGamePickRoundRequestParams,\n} from './WSAPITypes';\nimport { WSAPIAvatars } from './WSAPIAvatars';\n\n/** @group GamePick */\nexport class WSAPIGamePick extends WSAPIAvatars {\n\t/**\n\t * Returns the active rounds for the specified MatchX or Quiz game.\n\t * Each round includes its events (matches/questions) along with the current user's selections and scores.\n\t *\n\t * @param props.saw_template_id - The ID of the MatchX or Quiz game template\n\t *\n\t * **Response** `GamesApiResponse<GamePickRound[]>`:\n\t * - `errCode` - 0 on success\n\t * - `data` - Array of rounds, each containing:\n\t * - `round_id`, `round_name` - Round identifier and display name\n\t * - `open_date`, `last_bet_date` - Timestamps (ms) for round open and betting deadline\n\t * - `is_active_now`, `is_resolved` - Round state flags\n\t * - `round_status_id` - Round status: -1 (active), 2 (no more bets), 3 (all events resolved), 4 (round resolved)\n\t * - `score_full_win`, `score_part_win`, `score_lost` - Scoring rules per prediction outcome\n\t * - `user_score` - Current user's total score in this round\n\t * - `user_placed_bet` - Whether the user has submitted predictions\n\t * - `has_open_for_bet_events` - Whether there are events still open for betting\n\t * - `events[]` - Array of events with `gp_event_id`, `market_type_id`, `event_meta` (team names, images, sport), `match_date`, `is_open_for_bets`, `odds_details`, and user selection fields\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.gamePickGetActiveRounds({\n\t * saw_template_id: 1083,\n\t * }).then((result) => {\n\t * console.log(result.data); // GamePickRound[]\n\t * result.data.forEach(round => {\n\t * console.log(round.round_name, round.events.length);\n\t * });\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async gamePickGetActiveRounds(props: GamePickRequestParams): Promise<GamesApiResponse<GamePickRound[]>> {\n\t\tif (!props.saw_template_id) {\n\t\t\tthrow new Error('saw_template_id is required');\n\t\t}\n\t\treturn this.api.gpGetActiveRounds(props.saw_template_id);\n\t}\n\n\t/**\n\t * Returns a single active round for the specified MatchX or Quiz game.\n\t * The round includes full event details with the current user's selections.\n\t *\n\t * @param props.saw_template_id - The ID of the MatchX or Quiz game template\n\t * @param props.round_id - The specific round to retrieve\n\t *\n\t * **Response** `GamesApiResponse<GamePickRound>`:\n\t * - `errCode` - 0 on success\n\t * - `data` - Single round object with the same structure as in `gamePickGetActiveRounds`,\n\t * including `events[]` with full event details, user selections, and resolution info\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.gamePickGetActiveRound({\n\t * saw_template_id: 1083,\n\t * round_id: 31652,\n\t * }).then((result) => {\n\t * console.log(result.data.round_name, result.data.events.length);\n\t * console.log(result.data.user_score, result.data.user_placed_bet);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async gamePickGetActiveRound(props: GamePickRoundRequestParams): Promise<GamesApiResponse<GamePickRound>> {\n\t\tif (!props.saw_template_id) {\n\t\t\tthrow new Error('saw_template_id is required');\n\t\t}\n\t\tif (!props.round_id) {\n\t\t\tthrow new Error('round_id is required');\n\t\t}\n\t\treturn this.api.gpGetActiveRound(props.saw_template_id, props.round_id);\n\t}\n\n\t/**\n\t * Returns the history of all rounds (including resolved ones) for the specified MatchX or Quiz game.\n\t * Each round contains full event details with results and the current user's predictions.\n\t *\n\t * @param props.saw_template_id - The ID of the MatchX or Quiz game template\n\t *\n\t * **Response** `GamesApiResponse<GamePickRound[]>`:\n\t * - `errCode` - 0 on success\n\t * - `data` - Array of rounds ordered by `round_row_id` descending (newest first).\n\t * Each round has the same structure as in `gamePickGetActiveRounds`, including resolved events\n\t * with `resolution_type_id` (0=None, 2=Lost, 3=PartialWin, 4=FullWin) and `resolution_score`\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.gamePickGetHistory({\n\t * saw_template_id: 1083,\n\t * }).then((result) => {\n\t * result.data.forEach(round => {\n\t * console.log(round.round_name, 'Score:', round.user_score, 'Resolved:', round.is_resolved);\n\t * });\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async gamePickGetHistory(props: GamePickRequestParams): Promise<GamesApiResponse<GamePickRound[]>> {\n\t\tif (!props.saw_template_id) {\n\t\t\tthrow new Error('saw_template_id is required');\n\t\t}\n\t\treturn this.api.gpGetGamesHistory(props.saw_template_id);\n\t}\n\n\t/**\n\t * Returns the leaderboard for a specific round within a MatchX or Quiz game.\n\t * Use `round_id = -1` (AllRoundsGameBoardID) to get the season/overall leaderboard across all rounds.\n\t *\n\t * @param props.saw_template_id - The ID of the MatchX or Quiz game template\n\t * @param props.round_id - The round to get the leaderboard for. Use -1 for overall/seasonal leaderboard\n\t *\n\t * **Response** `GamesApiResponse<GamePickRoundBoard>`:\n\t * - `errCode` - 0 on success\n\t * - `data` - Leaderboard object containing:\n\t * - Round base fields (`round_id`, `round_name`, `open_date`, `last_bet_date`, etc.)\n\t * - `users[]` - Ranked list of players, each with:\n\t * - `ext_user_id`, `int_user_id` - User identifiers\n\t * - `public_username`, `avatar_url` - Display info (usernames may be masked based on label settings)\n\t * - `gp_position` - Leaderboard rank (null if not yet ranked)\n\t * - `resolution_score` - Total score in this round\n\t * - `full_wins_count`, `part_wins_count`, `lost_count` - Prediction outcome counts\n\t * - `my_user` - Current user's entry (same fields as above), or null if user hasn't participated\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.gamePickGetBoard({\n\t * saw_template_id: 1083,\n\t * round_id: 31652,\n\t * }).then((result) => {\n\t * console.log('Top players:', result.data.users);\n\t * console.log('My position:', result.data.my_user?.gp_position);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async gamePickGetBoard(props: GamePickRoundRequestParams): Promise<GamesApiResponse<GamePickRoundBoard>> {\n\t\tif (!props.saw_template_id) {\n\t\t\tthrow new Error('saw_template_id is required');\n\t\t}\n\t\tif (!props.round_id) {\n\t\t\tthrow new Error('round_id is required');\n\t\t}\n\t\treturn this.api.gpGetGameBoard(props.saw_template_id, props.round_id);\n\t}\n\n\t/**\n\t * Submits score predictions for a round in a MatchX game.\n\t * Sends the round object with user selections for all events at once.\n\t * Each event must include `team1_user_selection` and `team2_user_selection` representing predicted scores.\n\t * If the user hasn't placed bets before, one game attempt (spin) will be consumed.\n\t * Predictions can be edited until each match starts (if `allow_edit_answers` is enabled on the round).\n\t *\n\t * @param props.saw_template_id - The ID of the MatchX game template\n\t * @param props.round - Round object containing `round_id` and `events[]`. Typically obtained from `gamePickGetActiveRound`\n\t * and modified with user predictions. Each event needs: `gp_event_id`, `team1_user_selection`, `team2_user_selection`\n\t *\n\t * **Response** `GamesApiResponse<GamePickRound>`:\n\t * - `errCode` - 0 on success. Non-zero codes indicate errors (e.g. not enough points/attempts)\n\t * - `data` - Updated round with all events reflecting the submitted selections.\n\t * `user_placed_bet` will be `true`, `has_not_submitted_changes` will be `false`\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.gamePickGetActiveRound({\n\t * saw_template_id: 1190,\n\t * round_id: 38665,\n\t * }).then((roundData) => {\n\t * const round = roundData.data;\n\t * round.events = round.events.map(e => ({\n\t * gp_event_id: e.gp_event_id,\n\t * team1_user_selection: 1,\n\t * team2_user_selection: 0,\n\t * }));\n\t * _smartico.api.gamePickSubmitSelection({\n\t * saw_template_id: 1190,\n\t * round: round,\n\t * }).then((result) => {\n\t * console.log(result.data.user_placed_bet); // true\n\t * });\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async gamePickSubmitSelection(props: GamePickRequestParams & { round: Partial<GamePickRound> }): Promise<GamesApiResponse<GamePickRound>> {\n\t\tif (!props.saw_template_id) {\n\t\t\tthrow new Error('saw_template_id is required');\n\t\t}\n\t\tif (!props.round?.round_id) {\n\t\t\tthrow new Error('round is required');\n\t\t}\n\t\treturn this.api.gpSubmitSelection(props.saw_template_id, props.round, false);\n\t}\n\n\t/**\n\t * Submits answers for a round in a Quiz game.\n\t * Sends the round object with user answers for all events at once.\n\t * Each event must include `user_selection` with the answer value (e.g. '1', '2', 'x', 'yes', 'no' — depending on the market type).\n\t * If the user hasn't placed bets before, one game attempt (spin) will be consumed.\n\t * Answers can be edited until each match starts (if `allow_edit_answers` is enabled on the round).\n\t *\n\t * @param props.saw_template_id - The ID of the Quiz game template\n\t * @param props.round - Round object containing `round_id` and `events[]`. Typically obtained from `gamePickGetActiveRound`\n\t * and modified with user answers. Each event needs: `gp_event_id`, `user_selection`\n\t *\n\t * **Response** `GamesApiResponse<GamePickRound>`:\n\t * - `errCode` - 0 on success. Non-zero codes indicate errors (e.g. not enough points/attempts)\n\t * - `data` - Updated round with all events reflecting the submitted answers.\n\t * `user_placed_bet` will be `true`, `has_not_submitted_changes` will be `false`\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.gamePickGetActiveRound({\n\t * saw_template_id: 1183,\n\t * round_id: 37974,\n\t * }).then((roundData) => {\n\t * const round = roundData.data;\n\t * round.events = round.events.map(e => ({\n\t * gp_event_id: e.gp_event_id,\n\t * user_selection: 'x',\n\t * }));\n\t * _smartico.api.gamePickSubmitSelectionQuiz({\n\t * saw_template_id: 1183,\n\t * round: round,\n\t * }).then((result) => {\n\t * console.log(result.data.user_placed_bet); // true\n\t * });\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async gamePickSubmitSelectionQuiz(props: GamePickRequestParams & { round: Partial<GamePickRound> }): Promise<GamesApiResponse<GamePickRound>> {\n\t\tif (!props.saw_template_id) {\n\t\t\tthrow new Error('saw_template_id is required');\n\t\t}\n\t\tif (!props.round?.round_id) {\n\t\t\tthrow new Error('round is required');\n\t\t}\n\t\treturn this.api.gpSubmitSelection(props.saw_template_id, props.round, true);\n\t}\n\n\t/**\n\t * Returns the current user's profile information within the specified MatchX or Quiz game.\n\t * The user record is synced from the Smartico platform into the games DB (synced every 1 minute).\n\t * If the user doesn't exist in the games DB yet, it will be created automatically on first call.\n\t *\n\t * @param props.saw_template_id - The ID of the MatchX or Quiz game template\n\t *\n\t * **Response** `GamesApiResponse<GamePickUserInfo>`:\n\t * - `errCode` - 0 on success\n\t * - `data`:\n\t * - `ext_user_id` - External user ID (Smartico internal numeric ID)\n\t * - `int_user_id` - Internal user ID within the games system\n\t * - `public_username` - Display name\n\t * - `avatar_url` - User's avatar image URL\n\t * - `last_wallet_sync_time` - Last time the user's balance was synced from Smartico\n\t * - `ach_points_balance` - User's current points balance\n\t * - `ach_gems_balance` - User's current gems balance\n\t * - `ach_diamonds_balance` - User's current diamonds balance\n\t * - `pubic_username_set` - Whether the user has set a custom username\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.gamePickGetUserInfo({\n\t * saw_template_id: 1083,\n\t * }).then((result) => {\n\t * console.log(result.data.public_username, result.data.ach_points_balance);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async gamePickGetUserInfo(props: GamePickRequestParams): Promise<GamesApiResponse<GamePickUserInfo>> {\n\t\tif (!props.saw_template_id) {\n\t\t\tthrow new Error('saw_template_id is required');\n\t\t}\n\t\treturn this.api.gpGetUserInfo(props.saw_template_id);\n\t}\n\n\t/**\n\t * Returns the game configuration and the list of all rounds for the specified MatchX or Quiz game.\n\t * Includes the SAW template definition, label settings, and round metadata (without events).\n\t *\n\t * @param props.saw_template_id - The ID of the MatchX or Quiz game template\n\t *\n\t * **Response** `GamesApiResponse<GamePickGameInfo>`:\n\t * - `errCode` - 0 on success\n\t * - `data`:\n\t * - `sawTemplate` - Game template configuration including:\n\t * - `saw_template_id`, `saw_game_type_id` (6 = MatchX/Quiz)\n\t * - `saw_template_ui_definition` - UI settings (name, ranking options, ask_for_username, etc.)\n\t * - `saw_buyin_type_id` - Cost type (1=Free, 2=Points, 3=Gems, 4=Diamonds, 5=Spins)\n\t * - `buyin_cost_points` - Cost per attempt\n\t * - `spin_count` - Available attempts for the current user\n\t * - `allRounds[]` - List of all rounds (metadata only, no events), each with:\n\t * - `round_id`, `round_name`, `round_description`\n\t * - `open_date`, `last_bet_date` - Timestamps (ms)\n\t * - `is_active_now`, `is_resolved`, `round_status_id`\n\t * - `labelInfo` - Label/brand configuration and settings\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.gamePickGetGameInfo({\n\t * saw_template_id: 1189,\n\t * }).then((result) => {\n\t * console.log(result.data.sawTemplate.saw_template_ui_definition.name);\n\t * console.log('Rounds:', result.data.allRounds.length);\n\t * console.log('Buy-in type:', result.data.sawTemplate.saw_buyin_type_id);\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async gamePickGetGameInfo(props: GamePickRequestParams): Promise<GamesApiResponse<GamePickGameInfo>> {\n\t\tif (!props.saw_template_id) {\n\t\t\tthrow new Error('saw_template_id is required');\n\t\t}\n\t\treturn this.api.gpGetGameInfo(props.saw_template_id);\n\t}\n\n\t/**\n\t * Returns round data with events and picks for a specific user (identified by their internal user ID).\n\t * Useful for viewing another user's predictions from the leaderboard.\n\t * The `int_user_id` can be obtained from the `gamePickGetBoard` response (`users[].int_user_id`).\n\t *\n\t * @param props.saw_template_id - The ID of the MatchX or Quiz game template\n\t * @param props.round_id - The round to get info for\n\t * @param props.int_user_id - Internal user ID of the player whose predictions to view (from leaderboard data)\n\t *\n\t * **Response** `GamesApiResponse<GamePickRound>`:\n\t * - `errCode` - 0 on success\n\t * - `data` - Round object with the target user's selections.\n\t * Same structure as `gamePickGetActiveRound`, but `user_selection`/`team1_user_selection`/`team2_user_selection`\n\t * fields on events reflect the specified user's picks instead of the current user's.\n\t * Events also include `resolution_type_id` (0=None, 2=Lost, 3=PartialWin, 4=FullWin) showing how each prediction was scored\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.gamePickGetRoundInfoForUser({\n\t * saw_template_id: 1083,\n\t * round_id: 31652,\n\t * int_user_id: 65653810,\n\t * }).then((result) => {\n\t * result.data.events.forEach(e => {\n\t * console.log(e.event_meta.team1_name, 'vs', e.event_meta.team2_name, '→', e.user_selection);\n\t * });\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async gamePickGetRoundInfoForUser(props: GamePickRoundRequestParams & { int_user_id: number }): Promise<GamesApiResponse<GamePickRound>> {\n\t\tif (!props.saw_template_id) {\n\t\t\tthrow new Error('saw_template_id is required');\n\t\t}\n\t\tif (!props.round_id) {\n\t\t\tthrow new Error('round_id is required');\n\t\t}\n\t\tif (!props.int_user_id) {\n\t\t\tthrow new Error('int_user_id is required');\n\t\t}\n\t\treturn this.api.gpGetRoundInfoForUser(props.saw_template_id, props.round_id, props.int_user_id);\n\t}\n}\n","import { ECacheContext, OCache } from '../OCache';\nimport {\n\tLeaderBoardDetailsT,\n} from './WSAPITypes';\nimport { LeaderBoardPeriodType } from '../Leaderboard';\nimport {\n\tCACHE_DATA_SEC,\n\tonUpdateContextKey,\n} from './WSAPIBase';\nimport { WSAPIGamePick } from './WSAPIGamePick';\n\n/** @group LeaderBoard */\nexport class WSAPILeaderBoard extends WSAPIGamePick {\n\t/**\n\t * Returns the leaderboard for the current type (default is Daily). If getPreviousPeriod is passed as true, a leaderboard for the previous period for the current type will be returned.\n\t * For example, if the type is Weekly and getPreviousPeriod is true, a leaderboard for the previous week will be returned.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.getLeaderBoard(1).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t *\n\t * **Example in the Visitor mode**:\n\t * ```\n\t * _smartico.vapi('EN').getLeaderBoard(1).then((result) => {\n\t * console.log(result);\n\t * });\n\t * ```\n\t */\n\tpublic async getLeaderBoard(periodType: LeaderBoardPeriodType, getPreviousPeriod?: boolean): Promise<LeaderBoardDetailsT> {\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.LeaderBoards,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.leaderboardsGetT(this.userExtId, periodType, getPreviousPeriod),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n}\n","import { ActivityTypeLimited } from '../Core';\nimport { ECacheContext, OCache } from '../OCache';\nimport {\n\tInboxMarkMessageAction,\n\tTInboxMessage,\n\tTInboxMessageBody,\n} from './WSAPITypes';\nimport { InboxCategories } from '../Inbox/InboxCategories';\nimport { InboxReadStatus } from '../Inbox/InboxReadStatus';\nimport {\n\tCACHE_DATA_SEC,\n\tonUpdateContextKey,\n} from './WSAPIBase';\nimport { WSAPILeaderBoard } from './WSAPILeaderBoard';\n\n/** @group Inbox */\nexport class WSAPIInbox extends WSAPILeaderBoard {\n\t/**\n\t * Reports an impression event for an engagement (when engagement content is displayed to the user).\n\t * Use this method to track when users view engagement content such as inbox messages, popups.\n\t * When using for Inbox cases, you need to use message guid as engagement_uid, and pass 31 as activityType.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.reportImpressionEvent({\n\t * engagement_uid: 'abc123-def456',\n\t * activityType: 31 // Inbox\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t *\n\t * @param params - Event parameters\n\t * @param params.engagement_uid - Unique identifier for the engagement\n\t * @param params.activityType - Type of engagement activity (Popup=30, Inbox=31)\n\t */\n\tpublic reportImpressionEvent({\n\t\tengagement_uid,\n\t\tactivityType,\n\t}: {\n\t\tengagement_uid: string;\n\t\tactivityType: ActivityTypeLimited | number;\n\t}): void {\n\t\tthis.api.reportEngagementImpression(this.userExtId, engagement_uid, activityType);\n\t}\n\n\t/**\n\t * Reports a click/action event for an engagement (when user interacts with engagement content).\n\t * Use this method to track when users click on or interact with engagement content such as inbox messages, popups.\n\t * When using for Inbox cases, you need to use message guid as engagement_uid, and pass 31 as activityType, and pass the action/deeplink that was triggered by the user interaction as action.\n\t *\n\t * **Example**:\n\t * ```\n\t * _smartico.api.reportClickEvent({\n\t * engagement_uid: 'abc123-def456',\n\t * activityType: 31 // Inbox\n\t * action: 'dp:gf_missions'\n\t * });\n\t * ```\n\t *\n\t * **Visitor mode: not supported**\n\t *\n\t * @param params - Event parameters\n\t * @param params.engagement_uid - Unique identifier for the engagement\n\t * @param params.activityType - Type of engagement activity (Popup=30, Inbox=31)\n\t * @param params.action - Optional action/deeplink that was triggered by the user interaction\n\t */\n\tpublic reportClickEvent({\n\t\tengagement_uid,\n\t\tactivityType,\n\t\taction,\n\t}: {\n\t\tengagement_uid: string;\n\t\tactivityType: ActivityTypeLimited | number;\n\t\taction?: string;\n\t}): void {\n\t\tthis.api.reportEngagementAction(this.userExtId, engagement_uid, activityType, action);\n\t}\n\n\t/** Returns inbox messages based on the provided parameters. \"From\" and \"to\" indicate the range of messages to be fetched.\n\t * The maximum number of messages per request is limited to 20. \n\t * An indicator \"onlyFavorite\" can be passed to get only messages marked as favorites.\n\t * An indicator \"read_status\" can be passed to get only messages marked as read or unread.\n\t * You can leave this params empty and by default it will return list of messages ranging from 0 to 20.\n\t * This function returns a list of messages without the body of each message.\n\t * To get the body of the message you need to call getInboxMessageBody function and pass the message guid contained in each message of this request.\n\t * All other action like mark as read, favorite, delete, etc. can be done using this message GUID.\n\t * The \"onUpdate\" callback will be triggered when the user receives a new message. It will provide an updated list of messages, ranging from 0 to 20, to the onUpdate callback function.\n\t *\n\t * **Visitor mode: not supported**\n\t *\n\t * @param params\n\t */\n\tpublic async getInboxMessages({\n\t\tfrom,\n\t\tto,\n\t\tonlyFavorite,\n\t\tcategoryId,\n\t\tread_status,\n\t\tonUpdate,\n\t}: {\n\t\tfrom?: number;\n\t\tto?: number;\n\t\tonlyFavorite?: boolean;\n\t\tcategoryId?: InboxCategories;\n\t\tread_status?: InboxReadStatus;\n\t\tonUpdate?: (data: TInboxMessage[]) => void;\n\t} = {}): Promise<TInboxMessage[]> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.InboxMessages, onUpdate);\n\t\t}\n\t\treturn await this.api.getInboxMessagesT(this.userExtId, from, to, onlyFavorite, categoryId, read_status);\n\t}\n\n\t/**\n\t * Returns inbox unread count.\n\t *\n\t * **Visitor mode: not supported**\n\t * @param params\n\t */\n\tpublic async getInboxUnreadCount({ onUpdate }: { onUpdate?: (unread_count: number) => void } = {}): Promise<number> {\n\t\tif (onUpdate) {\n\t\t\tthis.onUpdateCallback.set(onUpdateContextKey.InboxUnreadCount, onUpdate);\n\t\t}\n\t\treturn OCache.use(\n\t\t\tonUpdateContextKey.InboxUnreadCount,\n\t\t\tECacheContext.WSAPI,\n\t\t\t() => this.api.getInboxUnreadCountT(this.userExtId),\n\t\t\tCACHE_DATA_SEC,\n\t\t);\n\t}\n\n\t/**\n\t * Returns the message body of the specified message guid.\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async getInboxMessageBody(messageGuid: string): Promise<TInboxMessageBody> {\n\t\treturn await this.api.getInboxMessageBodyT(messageGuid);\n\t}\n\n\t/**\n\t * Requests to mark inbox message with specified guid as read\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async markInboxMessageAsRead(messageGuid: string): Promise<InboxMarkMessageAction> {\n\t\tconst r = await this.api.markInboxMessageRead(this.userExtId, messageGuid);\n\n\t\treturn {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t};\n\t}\n\n\t/**\n\t * Requests to mark all inbox messages as read\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async markAllInboxMessagesAsRead(): Promise<InboxMarkMessageAction> {\n\t\tconst r = await this.api.markAllInboxMessageRead(this.userExtId);\n\n\t\treturn {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t};\n\t}\n\n\t/**\n\t * Requests to mark inbox message with specified guid as favorite. Pass mark true to add message to favorite and false to remove.\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\tpublic async markUnmarkInboxMessageAsFavorite(messageGuid: string, mark: boolean): Promise<InboxMarkMessageAction> {\n\t\tconst r = await this.api.markUnmarkInboxMessageAsFavorite(this.userExtId, messageGuid, mark);\n\n\t\treturn {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t};\n\t}\n\n\t/**\n\t * Requests to delete inbox message\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\n\tpublic async deleteInboxMessage(messageGuid: string): Promise<InboxMarkMessageAction> {\n\t\tconst r = await this.api.deleteInboxMessage(this.userExtId, messageGuid);\n\n\t\treturn {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t};\n\t}\n\n\t/**\n\t * Requests to delete all inbox messages\n\t *\n\t * **Visitor mode: not supported**\n\t */\n\n\tpublic async deleteAllInboxMessages(): Promise<InboxMarkMessageAction> {\n\t\tconst r = await this.api.deleteAllInboxMessages(this.userExtId);\n\n\t\treturn {\n\t\t\terr_code: r.errCode,\n\t\t\terr_message: r.errMsg,\n\t\t};\n\t}\n\n\tprotected async updateInboxUnreadCount(count: number) {\n\t\tthis.updateEntity(onUpdateContextKey.InboxUnreadCount, count);\n\t}\n\n\tprotected async updateInboxMessages() {\n\t\tconst payload = await this.api.getInboxMessagesT(this.userExtId);\n\t\tthis.updateEntity(onUpdateContextKey.InboxMessages, payload);\n\t}\n}\n","import { ClassId } from '../Base/ClassId';\nimport { SAWSpinsCountPush } from '../MiniGames';\nimport { ECacheContext, OCache } from '../OCache';\nimport { SmarticoAPI } from '../SmarticoAPI';\nimport { JackpotWinPush, JackpotsOptinResponse, JackpotsOptoutRequest } from '../Jackpots';\nimport { onUpdateContextKey } from './WSAPIBase';\nimport { WSAPIInbox } from './WSAPIInbox';\n\n/**\n * Public surface of the Smartico WebSocket API. The consumer reaches every\n * method on this class via `_smartico.api.X(...)`. The class is the\n * terminator of an inheritance chain that splits the surface into focused\n * domain classes (see `WSAPIBase` → `WSAPIUser` → ... → `WSAPIInbox` →\n * `WSAPI`); each domain class hosts its own subset of methods. Consumers\n * don't need to know about the chain — every method is reachable directly\n * on the `WSAPI` instance via prototype-chain lookup.\n *\n * @group General API\n */\nexport class WSAPI extends WSAPIInbox {\n\t/** @private */\n\tconstructor(api: SmarticoAPI, userExtId: string = null) {\n\t\tsuper(api, userExtId);\n\n\t\t// Push-subscription wiring. This block must live in the terminator\n\t\t// because it references `update*` helpers defined across multiple\n\t\t// domain classes; only the terminator has visibility into all of\n\t\t// them via the prototype chain.\n\t\tif (this.api.tracker) {\n\t\t\tconst on = this.api.tracker.on;\n\n\t\t\ton(ClassId.SAW_SPINS_COUNT_PUSH, (data: SAWSpinsCountPush) => this.updateOnSpin(data));\n\t\t\ton(ClassId.SAW_SHOW_SPIN_PUSH, () => this.reloadMiniGameTemplate());\n\t\t\ton(ClassId.SAW_AKNOWLEDGE_RESPONSE, () => {\n\t\t\t\tthis.reloadMiniGameTemplate();\n\t\t\t\tOCache.clear(ECacheContext.WSAPI, onUpdateContextKey.SAWHistory);\n\t\t\t});\n\t\t\ton(ClassId.SAW_DO_SPIN_RESPONSE, () => {\n\t\t\t\tthis.reloadMiniGameTemplate();\n\t\t\t\tOCache.clear(ECacheContext.WSAPI, onUpdateContextKey.SAWHistory);\n\t\t\t});\n\t\t\ton(ClassId.MISSION_OPTIN_RESPONSE, () => this.updateMissions());\n\t\t\ton(ClassId.ACHIEVEMENT_CLAIM_PRIZE_RESPONSE, () => this.updateMissions());\n\t\t\ton(ClassId.RELOAD_ACHIEVEMENTS_EVENT, () => this.updateMissions());\n\t\t\ton(ClassId.TOURNAMENT_REGISTER_RESPONSE, () => this.updateTournaments());\n\t\t\ton(ClassId.BUY_SHOP_ITEM_RESPONSE, () => {\n\t\t\t\tthis.updateStorePurchasedItems();\n\t\t\t\tthis.updateStoreItems();\n\t\t\t});\n\t\t\ton(ClassId.CLIENT_ENGAGEMENT_EVENT_NEW, () => this.updateInboxMessages());\n\t\t\ton(ClassId.LOGOUT_RESPONSE, () => OCache.clearContext(ECacheContext.WSAPI));\n\t\t\ton(ClassId.IDENTIFY_RESPONSE, () => OCache.clearContext(ECacheContext.WSAPI));\n\t\t\ton(ClassId.JP_WIN_PUSH, (_data: JackpotWinPush) => this.jackpotClearCache());\n\t\t\ton(ClassId.JP_OPTOUT_RESPONSE, (_data: JackpotsOptoutRequest) => this.jackpotClearCache());\n\t\t\ton(ClassId.JP_OPTIN_RESPONSE, (_data: JackpotsOptinResponse) => this.jackpotClearCache());\n\t\t\ton(ClassId.CLAIM_BONUS_RESPONSE, () => this.updateBonuses());\n\t\t\ton(ClassId.SAW_DO_SPIN_BATCH_RESPONSE, () => {\n\t\t\t\tthis.reloadMiniGameTemplate();\n\t\t\t\tOCache.clear(ECacheContext.WSAPI, onUpdateContextKey.SAWHistory);\n\t\t\t});\n\t\t\ton(ClassId.RAF_CLAIM_PRIZE_RESPONSE, () => this.updateRaffles());\n\t\t\ton(ClassId.GET_INBOX_MESSAGES_RESPONSE, (res) => {\n\t\t\t\tif (res.unread_count !== undefined && res.unread_count !== null) {\n\t\t\t\t\tthis.updateInboxUnreadCount(res.unread_count);\n\t\t\t\t}\n\t\t\t});\n\t\t\ton(ClassId.CLIENT_PUBLIC_PROPERTIES_CHANGED_EVENT, (data: { props: { core_inbox_unread_count?: number; ach_points_balance?: number; ach_gems_balance?: number; ach_diamonds_balance?: number } }) => {\n\t\t\t\tif (data?.props?.core_inbox_unread_count !== undefined && data?.props?.core_inbox_unread_count !== null) {\n\t\t\t\t\tthis.updateInboxUnreadCount(data.props.core_inbox_unread_count);\n\t\t\t\t}\n\t\t\t\tif (data?.props?.ach_points_balance !== undefined || data?.props?.ach_gems_balance !== undefined || data?.props?.ach_diamonds_balance !== undefined) {\n\t\t\t\t\tthis.notifyActivityLogUpdate();\n\t\t\t\t}\n\t\t\t});\n\t\t\ton(ClassId.RAF_OPTIN_RESPONSE, () => this.updateRaffles());\n\t\t}\n\t}\n}\n","export enum AchCustomSectionType {\n\tHTML_PAGE = 1,\n\tMISSIONS_CATEGORY = 2,\n\tTOURNAMENTS_CATEGORY = 3,\n\tLEVELS = 4,\n\tMINI_GAMES = 5,\n\tMISSION_CUSTOM_LAYOUT = 6,\n\tMATCH_X_AND_QUIZ = 7,\n\tREDIRECT_LINK = 9,\n\tLOOTBOX_WEEKLY = 10,\n\tLOOTBOX_CALENDAR_DAYS = 11,\n\tSTORE = 12,\n\tRAFFLE = 13,\n\tBADGES = 14,\n}\n\nexport enum AchCustomLayoutTheme {\n\tVALENTINES_LIGHT = 'valentines-light',\n\tVALENTINES_DARK = 'valentines-dark',\n\tEURO_2024 = 'euro-2024',\n\tGENERIC = 'generic',\n}\n\nexport enum AchMissionsTabsOptions {\n\tONLY_OVERVIEW = 1,\n\tNO_OVERVIEW = 2,\n\tALL = 3,\n}\n\nexport enum AchOverviewMissionsFilter {\n\tANY = 1,\n\tALL_MISSIONS = 2,\n\tALL_EXCEPT_COMPLETED = 3,\n\tALL_EXCEPT_LOCKED = 4,\n\tALL_EXCEPT_COMPLETED_AND_LOCKED = 5,\n}\n\nexport enum LiquidEntityData {\n\tMissions = 1,\n\tStore = 2,\n\tTournaments = 3,\n\tMiniGames = 4,\n\tLevels = 5,\n\tJackpots = 6,\n\tBonus = 7,\n\tLeaderboard = 8,\n\tBadges = 9,\n\tTournament = 10,\n\tRaffles = 11,\n\tSingleRaffle = 12,\n}","import { TUICustomSection } from '../WSAPI/WSAPITypes';\nimport {\n\tAchCustomLayoutTheme,\n\tAchCustomSectionType,\n\tAchMissionsTabsOptions,\n\tAchOverviewMissionsFilter,\n\tLiquidEntityData,\n} from './AchCustomSection';\nimport { GetCustomSectionsResponse } from './GetCustomSectionsResponse';\n\nexport interface UICustomSection {\n\tbody?: string;\n\tmenu_img?: string;\n\tmenu_name?: string;\n\tcustom_skin_images?: string;\n\tsection_type_id?: AchCustomSectionType;\n\ttheme?: AchCustomLayoutTheme;\n\tgeneric_custom_css?: string;\n\tmission_tabs_options?: AchMissionsTabsOptions;\n\toverview_missions_filter?: AchOverviewMissionsFilter;\n\toverview_missions_count?: number;\n\turl_or_dp?: string;\n\tliquid_entity_data?: LiquidEntityData[];\n\tach_tournament_id?: number;\n\traffle_id?: number;\n\tshow_raw_data?: boolean;\n\tliquid_template?: number;\n\tach_category_ids?: number[];\n\tshop_category_ids?: number[];\n}\n\nexport const UICustomSectionTransform = (response: GetCustomSectionsResponse): TUICustomSection[] => {\n\n\tconst items: TUICustomSection[] = [];\n\n\tObject.keys(response.customSections || []).forEach((key: string) => {\n\t\tconst r = response.customSections[key];\n\t\tconst id = parseInt(key);\n\t\tif (r.section_type_id !== undefined && r.section_type_id >= 1) {\n\t\t\tconst x: TUICustomSection = {\n\t\t\t\tid: id,\n\t\t\t\tbody: r.body,\n\t\t\t\tmenu_img: r.menu_img,\n\t\t\t\tmenu_name: r.menu_name,\n\t\t\t\tsection_type_id: r.section_type_id,\n\t\t\t\tcustom_skin_images: r.custom_skin_images,\n\t\t\t\tgeneric_custom_css: r.generic_custom_css,\n\t\t\t\tmission_tabs_options: r.mission_tabs_options,\n\t\t\t\toverview_missions_count: r.overview_missions_count,\n\t\t\t\toverview_missions_filter: r.overview_missions_filter,\n\t\t\t\turl_or_dp: r.url_or_dp,\n\t\t\t\ttheme: r.theme,\n\t\t\t\t...(r.section_type_id === AchCustomSectionType.LEVELS\n\t\t\t\t\t? {\n\t\t\t\t\t\tliquid_entity_data: r.liquid_entity_data,\n\t\t\t\t\t\tach_tournament_id: r.ach_tournament_id,\n\t\t\t\t\t\traffle_id: r.raffle_id,\n\t\t\t\t\t\tshow_raw_data: r.show_raw_data,\n\t\t\t\t\t\tliquid_template: r.liquid_template,\n\t\t\t\t\t}\n\t\t\t\t\t: {}\n\t\t\t\t),\n\t\t\t\t...(r.section_type_id === AchCustomSectionType.BADGES\n\t\t\t\t\t? {\n\t\t\t\t\t\tach_category_ids: r.ach_category_ids,\n\t\t\t\t\t}\n\t\t\t\t\t: {}\n\t\t\t\t),\n\t\t\t\t...(r.section_type_id === AchCustomSectionType.STORE\n\t\t\t\t\t? {\n\t\t\t\t\t\tshop_category_ids: r.shop_category_ids,\n\t\t\t\t\t}\n\t\t\t\t\t: {}\n\t\t\t\t),\n\t\t\t};\n\n\t\t\titems.push(x);\n\t\t}\n\t});\n\n\treturn items;\n};\n","import { BonusStatus } from './BonusStatus';\nimport { BonusTemplateMetaMap } from './BonusTemplateMetaMap';\nimport { BonusMetaMap } from './BonusMetaMap';\nimport { TBonus } from '../WSAPI/WSAPITypes';\n\nexport interface Bonus {\n\tid: number;\n\tredeemable?: boolean;\n\tcreateDate?: string;\n\tupdateDate?: string;\n\tredeemDate?: string;\n\tengagementUid?: string;\n\tlabelBonusTemplateId?: number;\n\tsourceProductRefId?: number;\n\tsourceProductId?: number;\n\tuserId?: number;\n\tbonusStatusId?: BonusStatus;\n\tlabelBonusTemplateMetaMap?: BonusTemplateMetaMap;\n\tbonusMetaMap?: BonusMetaMap;\n}\n\nexport const BonusItemsTransform = (items: Bonus[]): TBonus[] => {\n\treturn items\n\t\t.filter((r) => r.id >= 1)\n\t\t.map((r) => {\n\t\t\tconst x: TBonus = {\n\n bonus_id: r.id,\n is_redeemable: r.redeemable,\n create_date: r.createDate,\n redeem_date: r.redeemDate,\n label_bonus_template_id: r.labelBonusTemplateId,\n bonus_status_id: r.bonusStatusId,\n label_bonus_template_meta_map: r.labelBonusTemplateMetaMap,\n bonus_meta_map: r.bonusMetaMap\n\t\t\t};\n\n\t\t\treturn x;\n\t\t});\n};","export enum BonusStatus {\n\tNew = 1,\n\tCOUPON_ISSUED = 2,\n\tREDEEMED = 3,\n\tREDEEM_FAILED = 4, \n\tCOUPON_ISSUE_FAILED = 5, \n\tEXPIRED = 6, \n}","export enum UserBalanceType {\n Points = 0,\n Gems = 1,\n Diamonds = 2\n}\n\n\n","import { ProtocolResponse } from '../Base/ProtocolResponse';\nimport { ActivityLogEntry } from './ActivityLogEntry';\nimport { TActivityLog } from '../WSAPI/WSAPITypes';\nimport { UserBalanceType } from './UserBalanceType';\n\nexport interface GetActivityLogResponse extends ProtocolResponse {\n\tlogHistory: ActivityLogEntry[];\n}\n\nexport const ActivityLogTransform = (items: ActivityLogEntry[]): TActivityLog[] => {\n\tif (!items) {\n\t\treturn [];\n\t}\n\n\treturn items.map((item: any): TActivityLog => {\n\t\tconst itemTransformed: Partial<TActivityLog> = {\n\t\t\tcreate_date: item.create_date,\n\t\t\tuser_ext_id: item.user_ext_id,\n\t\t\tcrm_brand_id: item.crm_brand_id,\n\t\t\tsource_type_id: item.source_type_id,\n\t\t}\n\n\t\titem.type = item.type ?? UserBalanceType.Points;\n\n\t\tif (item.type === UserBalanceType.Diamonds || item.type === UserBalanceType.Gems) {\n\t\t\titemTransformed.type = item.type;\n\t\t\titemTransformed.amount = item.amount;\n\t\t\titemTransformed.balance = item.balance;\n\t\t}\n\n\t\tif (item.type === UserBalanceType.Points) {\n\t\t\titemTransformed.type = UserBalanceType.Points;\n\t\t\titemTransformed.amount = item.points_collected;\n\t\t\titemTransformed.balance = item.user_points_balance;\n\t\t\titemTransformed.total_ever = item.user_points_ever;\n\t\t}\n\n\t\treturn itemTransformed as TActivityLog;\n\t});\n};\n\n\n","export enum PointChangeSourceType {\n\tJourney = 1,\n\tAchievementTaskCompletion = 2,\n\tAchievementCompletion = 3,\n\tLevelsStructureChange = 4,\n\tStorePurchase = 5,\n\tManualAdjustment = 6,\n\tLeaderboard = 7,\n\tTournament = 11,\n\tAutomationRule = 12,\n\tTournamentRegistration = 13,\n\tTournamentRegistrationCancellation = 14,\n\tRefundPoints = 15,\n\tPlayMiniGame = 16,\n\tWinMiniGame = 17,\n\tAPI = 18,\n\tDynamicFormula = 19,\n\tRaffle = 21,\n\tAvatars = 22,\n}\n\n\n","import { TAvatarDefinition } from '../WSAPI/WSAPITypes';\nimport { ProtocolResponse } from '../Base/ProtocolResponse';\nimport { AvatarDefinition } from './AvatarDefinition';\n\nexport interface GetAvatarsListResponse extends ProtocolResponse {\n\tavatars: AvatarDefinition[];\n}\n\nexport const avatarDefinitionTransform = (items: AvatarDefinition[], avatarDomain: string): TAvatarDefinition[] => {\n\treturn items.map((item) => ({\n\t\tavatar_real_id: item.avatar_real_id,\n\t\tis_default: item.is_default,\n\t\thide_until_achieved: item.hide_until_achieved,\n\t\tpriority: item.priority,\n\t\tdescription: item.public_meta.description,\n\t\turl: item.public_meta.url,\n\t\tavatar_url: item.public_meta.url && !item.public_meta.url.startsWith('http') ? `${avatarDomain}${item.public_meta.url}` : item.public_meta.url,\n\t\tavatar_source_type_id: item.avatar_source_type_id,\n\t\tactive_from_date: item.active_from_date,\n\t\tactive_till_date: item.active_till_date,\n\t\tis_given: item.is_given,\n\t\tis_in_use: item.is_in_use,\n\t}));\n};\n","import { TAvatarCustomized } from '../WSAPI/WSAPITypes';\nimport { ProtocolResponse } from '../Base/ProtocolResponse';\nimport { AvatarCustomized } from './AvatarCustomized';\n\nexport interface GetAvatarsCustomizedResponse extends ProtocolResponse {\n\tavatars: AvatarCustomized[];\n}\n\nexport const avatarCustomizedTransform = (items: AvatarCustomized[], avatarDomain: string): TAvatarCustomized[] => {\n\treturn items.map((item) => ({\n\t\tavatar_real_id: item.avatar_real_id,\n\t\turl: item.url && !item.url.startsWith('http') ? `${avatarDomain}${item.url}` : item.url,\n\t\tdt_created: item.dt_created,\n\t}));\n};\n","import { TAvatarPrompt } from '../WSAPI/WSAPITypes';\nimport { ProtocolResponse } from '../Base/ProtocolResponse';\nimport { AvatarPrompt } from './AvatarPrompt';\n\nexport interface GetAvatarPromptsResponse extends ProtocolResponse {\n\tprompts: AvatarPrompt[];\n}\n\nexport const avatarPromptTransform = (items: AvatarPrompt[], avatarDomain: string): TAvatarPrompt[] => {\n\treturn items.map((item) => ({\n\t\tprompt_id: item.prompt_id,\n\t\tname: item.public_meta.name,\n\t\ticon_url: item.public_meta.icon_url && !item.public_meta.icon_url.startsWith('http') ? `${avatarDomain}${item.public_meta.icon_url}` : item.public_meta.icon_url,\n\t\tcost_currency_type_id: item.cost_currency_type_id,\n\t\tcost_value: item.cost_value,\n\t}));\n};\n","import { ProtocolResponse } from \"../Base/ProtocolResponse\";\nimport { JackPotWinner } from \"./JackPotWinner\";\n\nexport interface GetJackpotWinnersResponse extends ProtocolResponse {\n\t/** The list of jackpot winners */\n\twinners: JackpotWinnerHistory[];\n\t/** Whether there are more winners to fetch */\n\thas_more: boolean;\n}\n\nexport interface JackpotWinnerHistory {\n\t/** Id of the jackpot pot */\n\tjp_pot_id: number;\n\t/** Date of winning in milliseconds */\n\twin_date_ts: number;\n\t/** Info about jackpot winner */\n\twinner: JackPotWinner;\n}\n\n/**\n * @ignore\n */\nexport const GetJackpotWinnersResponseTransform = (items: JackpotWinnerHistory[]): JackpotWinnerHistory[] => {\n\treturn items.map((item) => {\n\t\tconst winnerInfo: JackpotWinnerHistory = {\n\t\t\twinner: item.winner,\n\t\t\twin_date_ts: item.win_date_ts,\n\t\t\tjp_pot_id: item.jp_pot_id,\n\t\t};\n\n\t\treturn winnerInfo;\n\t});\n};\n","import { ProtocolResponse } from '../Base/ProtocolResponse';\nimport { AchRelatedGame } from '../Base/AchRelatedGame';\n\nexport interface GetJackpotEligibleGamesResponse extends ProtocolResponse {\n\teligible_games: AchRelatedGame[];\n}\n\nexport interface TGetJackpotEligibleGamesResponse {\n\teligible_games: JackpotEligibleGame[];\n}\n\nexport interface JackpotEligibleGame {\n /** ID of the game on Smartico side */\n\tgame_id: number;\n /** ID of the game on operator side */\n ext_game_id: string;\n /** Name of the game */\n name: string;\n /** Link to the game */\n link: string;\n /** Image of the game */\n image: string;\n /** Whether the game is enabled */\n enabled: boolean;\n /** Categories of the game */\n game_categories: string[];\n /** Provider of the game */\n game_provider: string;\n /** The link to the mobile game */\n mobile_spec_link: string;\n /** The priority of the game */\n priority: number;\n}\n\n/**\n * @ignore\n */\nexport const GetJackpotEligibleGamesResponseTransform = ({ eligible_games } : { eligible_games: AchRelatedGame[]}): TGetJackpotEligibleGamesResponse => {\n\tconst games = eligible_games.map((game: AchRelatedGame, i: number) => ({\n\t\tgame_id: game.ach_game_id,\n\t\text_game_id: game.ext_game_id,\n\t\tname: game.game_public_meta.name,\n\t\tlink: game.game_public_meta.link,\n\t\timage: game.game_public_meta.image,\n\t\tenabled: game.game_public_meta.enabled,\n\t\tgame_categories: game.game_public_meta.game_categories,\n\t\tgame_provider: game.game_public_meta.game_provider,\n\t\tmobile_spec_link: game.game_public_meta.mobile_spec_link,\n\t\tpriority: i + 1,\n\t}));\n\n\treturn { eligible_games: games };\n};\n","import { ClassId } from './Base/ClassId';\nimport { ProtocolRequest } from './Base/ProtocolRequest';\nimport { ProtocolResponse } from './Base/ProtocolResponse';\nimport { SAWGetTemplatesResponse } from './MiniGames/SAWGetTemplatesResponse';\nimport { SAWGetTemplatesRequest } from './MiniGames/SAWGetTemplatesRequest';\nimport { IntUtils } from './IntUtils';\nimport { ILogger } from './ILogger';\nimport {\n\tSAWDoAknowledgeRequest,\n\tSAWDoAknowledgeResponse,\n\tSAWDoSpinRequest,\n\tSAWDoSpinResponse,\n\tSAWHistoryTransform,\n\tSAWPrizesHistory,\n\tSAWSpinErrorCode,\n\tSAWTemplatesTransform,\n\tSAWWinningHistoryRequest,\n\tSAWWinningHistoryResponse,\n} from './MiniGames';\nimport { ECacheContext, OCache } from './OCache';\nimport {\n\tActivityTypeLimited,\n\tCoreUtils,\n\tGetTranslationsRequest,\n\tGetTranslationsResponse,\n\tPublicLabelSettings,\n\tResponseIdentify,\n\tTranslationArea,\n} from './Core';\nimport { GetLabelInfoResponse } from './Core/GetLabelInfoResponse';\nimport { GetLabelInfoRequest } from './Core/GetLabelInfoRequest';\nimport {\n\tGetInboxMessagesRequest,\n\tGetInboxMessagesResponse,\n\tInboxMessageBody,\n\tInboxMessageBodyTransform,\n\tInboxMessagesTransform,\n\tInboxReadStatus,\n\tMarkInboxMessageDeletedRequest,\n\tMarkInboxMessageDeletedResponse,\n\tMarkInboxMessageReadRequest,\n\tMarkInboxMessageReadResponse,\n\tMarkInboxMessageStarredRequest,\n\tMarkInboxMessageStarredResponse,\n} from './Inbox';\nimport {\n\tBuyStoreItemRequest,\n\tBuyStoreItemResponse,\n\tGetCategoriesStoreResponse,\n\tGetStoreHistoryRequest,\n\tGetStoreHistoryResponse,\n\tGetStoreItemsResponse,\n\tStoreCategoryTransform,\n\tStoreItemPurchasedTransform,\n\tStoreItemTransform,\n} from './Store';\nimport {\n\tAchCategoryTransform,\n\tAchClaimPrizeRequest,\n\tAchClaimPrizeResponse,\n\tAchievementOptinRequest,\n\tAchievementOptinResponse,\n\tAchievementType,\n\tGetAchCategoriesResponse,\n\tGetAchievementMapRequest,\n\tGetAchievementMapResponse,\n\tUserAchievementTransform,\n\tenrichUserAchievementsWithBadgeState,\n} from './Missions';\nimport {\n\tGetClanTournamentPlayersRequest,\n\tGetClanTournamentPlayersResponse,\n\tGetTournamentInfoRequest,\n\tGetTournamentInfoResponse,\n\tGetTournamentsRequest,\n\tGetTournamentsResponse,\n\tTournamentItemsTransform,\n\tTournamentRegisterRequest,\n\tTournamentRegisterResponse,\n\tclanTournamentPlayersTransform,\n\ttournamentInfoItemTransform,\n} from './Tournaments';\nimport { GetLeaderBoardsRequest, GetLeaderBoardsResponse, LeaderBoardDetails, LeaderBoardPeriodType } from './Leaderboard';\nimport { GetLevelMapResponse, GetLevelMapResponseTransform } from './Level';\nimport { WSAPI } from './WSAPI/WSAPI';\nimport {\n\tTInboxMessage,\n\tTInboxMessageBody,\n\tTLevel,\n\tTMiniGameTemplate,\n\tTMissionOrBadge,\n\tTStoreCategory,\n\tTAchCategory,\n\tTStoreItem,\n\tTTournament,\n\tTTournamentDetailed,\n\tLeaderBoardDetailsT,\n\tUserLevelExtraCountersT,\n\tTSegmentCheckResult,\n\tTUICustomSection,\n\tTBonus,\n\tTRaffle,\n\tTLevelCurrent,\n\tTActivityLog,\n\tTRaffleDraw,\n\tTAvatarDefinition,\n\tTAvatarCustomized,\n\tTAvatarPrompt,\n\tTClans,\n\tTClanInfo,\n\tTClanJoinResult,\n\tTClanTournamentPlayers,\n} from './WSAPI/WSAPITypes';\nimport { getLeaderBoardTransform } from './Leaderboard/LeaderBoards';\nimport { GetAchievementsUserInfoResponse } from './Core/GetAchievementsUserInfoResponse';\nimport { CheckSegmentMatchResponse } from './Core/CheckSegmentMatchResponse';\nimport { CheckSegmentMatchRequest } from './Core/CheckSegmentMatchRequest';\nimport {\n\tGetJackpotsPotsRequest,\n\tGetJackpotsPotsResponse,\n\tGetJackpotsRequest,\n\tGetJackpotsResponse,\n\tJackpotsOptinRequest,\n\tJackpotsOptinResponse,\n\tJackpotsOptoutRequest,\n\tJackpotsOptoutResponse,\n} from './Jackpots';\nimport { GetCustomSectionsRequest, GetCustomSectionsResponse, UICustomSectionTransform } from './CustomSections';\nimport { BonusItemsTransform, ClaimBonusRequest, ClaimBonusResponse, GetBonusesResponse } from './Bonuses';\nimport { GetBonusesRequest } from './Bonuses/GetBonusesRequest';\nimport { SAWDoSpinBatchResponse } from './MiniGames/SAWDoSpinBatchResponse';\nimport { SAWDoSpinBatchRequest } from './MiniGames/SAWDoSpinBatchRequest';\nimport { SAWDoAcknowledgeBatchRequest } from './MiniGames/SAWDoAcknowledgeBatchRequest';\nimport { SAWDoAcknowledgeBatchResponse } from './MiniGames/SAWDoAcknowledgeBatchResponse';\nimport { GetRelatedAchTourRequest } from './Missions/GetRelatedAchTourRequest';\nimport { GetRelatedAchTourResponse } from './Missions/GetRelatedAchTourResponse';\nimport { GetRafflesResponse, raffleTransform } from './Raffle/GetRafflesResponse';\nimport { GetRafflesRequest } from './Raffle/GetRafflesRequest';\nimport { GetActivityLogRequest, GetActivityLogResponse, ActivityLogTransform } from './ActivityLog';\nimport { GetClanListRequest, GetClanListResponse, GetClanInfoRequest, GetClanInfoResponse, JoinClanRequest, JoinClanResponse } from './Clans';\nimport { InboxCategories } from './Inbox/InboxCategories';\nimport { GetDrawRunRequest, GetDrawRunResponse, GetRaffleDrawRunsHistoryRequest, GetRaffleDrawRunsHistoryResponse, RaffleClaimPrizeRequest, RaffleClaimPrizeResponse, RaffleOptinRequest, RaffleOptinResponse, drawRunTransform } from './Raffle';\nimport { GetAvatarsListResponse, avatarDefinitionTransform } from './Avatars/GetAvatarsListResponse';\nimport { GetAvatarsCustomizedResponse, avatarCustomizedTransform } from './Avatars/GetAvatarsCustomizedResponse';\nimport { GetAvatarPromptsResponse, avatarPromptTransform } from './Avatars/GetAvatarPromptsResponse';\nimport { SetAvatarRequest, SetAvatarResponse } from './Avatars';\nimport { GetJackpotWinnersResponse, GetJackpotWinnersResponseTransform, JackpotWinnerHistory } from './Jackpots/GetJackpotWinnersResponse';\nimport { GetJackpotWinnersRequest } from './Jackpots/GetJackpotWinnersRequest';\nimport { GetJackpotEligibleGamesRequest } from './Jackpots/GetJackpotEligibleGamesRequest';\nimport { GetJackpotEligibleGamesResponse, GetJackpotEligibleGamesResponseTransform, JackpotEligibleGame, TGetJackpotEligibleGamesResponse } from './Jackpots/GetJackpotEligibleGamesResponse';\nimport {\n\tGamesApiResponse,\n\tGamePickRound,\n\tGamePickRoundBoard,\n\tGamePickUserInfo,\n\tGamePickGameInfo,\n} from './WSAPI/WSAPITypes';\n\nconst PUBLIC_API_URL = 'https://papi{ENV_ID}.smartico.ai/services/public';\nconst C_SOCKET_PROD = 'wss://api{ENV_ID}.smartico.ai/websocket/services';\nconst GAMES_API_URL = 'https://r-games-api.smr.vc';\nconst AVATAR_DOMAIN = 'https://img{ENV_ID}.smr.vc';\nconst DEFAULT_LANG_EN = 'EN';\n\ninterface Tracker {\n\tlabel_api_key: string;\n\tuserPublicProps: any;\n\tparams?: { brand_key?: string };\n\ton: (callBackKey: ClassId, func: (data: any) => void) => void;\n\tgetLabelSetting: (key: PublicLabelSettings) => any;\n\ttriggerExternalCallBack: (callBackKey: string, payload: any) => void;\n\tgetExtUserId: () => string;\n}\ninterface IOptions {\n\tlogger?: ILogger;\n\tlogCIDs?: ClassId[];\n\tlogHTTPTiming?: boolean;\n\ttracker?: Tracker;\n\tbrand_api_key?: string;\n}\n\ntype MessageSender = (message: any, publicApuUrl?: string, expectCID?: ClassId) => Promise<any>;\n\nclass SmarticoAPI {\n\tprivate publicUrl: string;\n\tprivate wsUrl: string;\n\tprivate inboxCdnUrl: string;\n\tprivate partnerUrl: string;\n\tprivate gamesApiUrl: string;\n\tprivate baseRgApiParams: Record<string, string>;\n\tpublic avatarDomain: string;\n\tprivate envId: number;\n\n\tprivate logger: ILogger;\n\tprivate logCIDs: ClassId[];\n\tprivate logHTTPTiming: boolean;\n\tpublic tracker?: Tracker;\n\n\tpublic constructor(\n\t\tprivate label_api_key: string,\n\t\tprivate brand_api_key: string,\n\t\tprivate messageSender: MessageSender,\n\t\toptions: IOptions = {},\n\t) {\n\t\tthis.logger = options.logger || (console as any);\n\n\t\tif (this.logger.always === undefined) {\n\t\t\tthis.logger.always = this.logger.info;\n\t\t}\n\n\t\tthis.logCIDs = options.logCIDs || [];\n\t\tthis.logHTTPTiming = options.logHTTPTiming || false;\n\t\tthis.tracker = options.tracker;\n\n\t\tthis.publicUrl = SmarticoAPI.getPublicUrl(label_api_key);\n\t\tthis.wsUrl = SmarticoAPI.getPublicWsUrl(label_api_key);\n\n\t\tif (this.tracker) {\n\t\t\t// available only for real users\n\t\t\tthis.baseRgApiParams = {\n\t\t\t\tenv_id: String(SmarticoAPI.getEnvId(label_api_key)),\n\t\t\t\tlabel_api_key: label_api_key,\n\t\t\t\tbrand_key: options.brand_api_key || this.tracker.params.brand_key,\n\t\t\t\thash: IntUtils.uuid(),\n\t\t\t}\n\t\t}\n\n\t\tthis.avatarDomain = SmarticoAPI.getAvatarUrl(label_api_key || options.tracker?.label_api_key);\n\n\t\tthis.label_api_key = SmarticoAPI.getCleanLabelApiKey(label_api_key);\n\t}\n\n\tpublic static getEnvDnsSuffix(label_api_key: string): string {\n\t\tlet ENV_ID = label_api_key.length === 38 ? label_api_key.substring(37, 38) : '';\n\n\t\tif (ENV_ID === '1' || ENV_ID === '2') {\n\t\t\tENV_ID = '';\n\t\t}\n\t\treturn ENV_ID;\n\t}\n\n\tpublic static replaceSmrDomainsWithCloudfront<T>(value: string | { [key: string]: any }): T {\n\t\tif (!value) {\n\t\t\treturn value as T;\n\t\t}\n\n\t\tconst domains = {\n\t\t\t'img.smr.vc': 'd1am61onjxtys8.cloudfront.net',\n\t\t\t'img3.smr.vc': 'd3dubbodzd2q05.cloudfront.net',\n\t\t\t'img4.smr.vc': 'dvm0p9vsezqr2.cloudfront.net',\n\t\t\t'img5.smr.vc': 'd3gen1ksvxhac8.cloudfront.net',\n\t\t\t'img6.smr.vc': 'db1kmyg7iufeo.cloudfront.net',\n\t\t\t'img7.smr.vc': 'd36om2g86xefo6.cloudfront.net',\n\t\t\t'img8.smr.vc': 'd2zme31v54n5pb.cloudfront.net',\n\n\t\t\t'static.smr.vc': 'dtt380pweilws.cloudfront.net',\n\t\t\t'static3.smr.vc': 'd1qt8ake8g4imn.cloudfront.net',\n\t\t\t'static4.smr.vc': 'd146b4m7rkvjkw.cloudfront.net',\n\t\t\t'static5.smr.vc': 'd3l7suk1kl9rwh.cloudfront.net',\n\t\t\t'static6.smr.vc': 'd121pfj16xdfcq.cloudfront.net',\n\t\t\t'static7.smr.vc': 'd21deilz814qgl.cloudfront.net',\n\t\t\t'static8.smr.vc': 'd1uffsroxjy2ku.cloudfront.net',\n\t\t}\n\n\t\tconst escapeRegExp = (str: string) => str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n\n\t\tlet replacedValue = typeof value === 'string' ? value : JSON.stringify(value);\n\n\t\tfor (const [oldDomain, newDomain] of Object.entries(domains)) {\n\t\t\treplacedValue = replacedValue.replace(new RegExp(escapeRegExp(oldDomain), 'g'), newDomain);\n\t\t}\n\n\t\ttry {\n\t\t\treturn typeof value === 'string' ? replacedValue as T : JSON.parse(replacedValue)\n\t\t} catch (err) {\n\t\t\treturn value as T;\n\t\t}\n\t}\n\n\tpublic static getEnvId(label_api_key: string): number {\n\t\treturn label_api_key.length === 38 ? parseInt(label_api_key.substring(37, 38), 10) : 2;\n\t}\n\n\tpublic static getCleanLabelApiKey(label_api_key: string): string {\n\t\treturn label_api_key.substring(0, 36);\n\t}\n\n\tpublic static getPublicUrl(label_api_key: string): string {\n\t\treturn PUBLIC_API_URL.replace('{ENV_ID}', SmarticoAPI.getEnvDnsSuffix(label_api_key));\n\t}\n\n\tpublic static getPublicWsUrl(label_api_key: string): string {\n\t\treturn C_SOCKET_PROD.replace('{ENV_ID}', SmarticoAPI.getEnvDnsSuffix(label_api_key));\n\t}\n\n\tpublic static getAvatarUrl(label_api_key: string): string {\n\t\tconst avatarUrl = AVATAR_DOMAIN.replace('{ENV_ID}', SmarticoAPI.getEnvDnsSuffix(label_api_key));\n\t\treturn SmarticoAPI.replaceSmrDomainsWithCloudfront(avatarUrl);\n\t}\n\n\tprivate async send<T>(message: any, expectCID?: ClassId, force_language?: string): Promise<T> {\n\t\tif (this.logCIDs.includes(message.cid)) {\n\t\t\tthis.logger.info('REQ', message);\n\t\t}\n\n\t\tif (force_language) {\n\t\t\tmessage.force_language = force_language;\n\t\t}\n\n\t\tlet result: any;\n\n\t\ttry {\n\t\t\tconst timeStart = new Date().getTime();\n\t\t\tresult = await this.messageSender(message, this.publicUrl, expectCID);\n\n\t\t\tif (result.errCode && result.errSetup) {\n\t\t\t\tthrow new Error(result.errMessage);\n\t\t\t}\n\n\t\t\tresult = SmarticoAPI.replaceSmrDomainsWithCloudfront(result);\n\t\t\tconst timeEnd = new Date().getTime();\n\n\t\t\tif (this.logHTTPTiming) {\n\t\t\t\tthis.logger.always('HTTP time, ms:' + (timeEnd - timeStart));\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tthis.logger.warn(`Failed to make request to smartico channel, L2. ${e.message}`, {\n\t\t\t\turl: this.publicUrl,\n\t\t\t\trequest: message,\n\t\t\t\terror: e.message,\n\t\t\t});\n\t\t\tthrow new Error(`Failed to make request to smartico channel, L2 L1. ${e.message}`);\n\t\t}\n\n\t\tif (this.logCIDs.includes(message.cid)) {\n\t\t\tthis.logger.info('RES', result);\n\t\t}\n\n\t\tif (expectCID) {\n\t\t\tif (Array.isArray(result)) {\n\t\t\t\tfor (const str of result as string[]) {\n\t\t\t\t\tconst obj: ProtocolResponse = JSON.parse(str);\n\t\t\t\t\tif (this.logCIDs.includes(obj.cid)) {\n\t\t\t\t\t\tthis.logger.info('RES', result);\n\t\t\t\t\t}\n\t\t\t\t\tif (obj.cid === expectCID) {\n\t\t\t\t\t\treturn obj as any;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.logger.error(`Cant find proper response in array, expected CID ${expectCID}`, {\n\t\t\t\t\trequest: message,\n\t\t\t\t\tresponse: result,\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t} else {\n\t\t\tif (Array.isArray(result)) {\n\t\t\t\tif (result.length === 1) {\n\t\t\t\t\tconst obj = JSON.parse(result[0]);\n\t\t\t\t\tif (this.logCIDs.includes(obj.cid)) {\n\t\t\t\t\t\tthis.logger.info('RES', result);\n\t\t\t\t\t}\n\t\t\t\t\treturn obj;\n\t\t\t\t} else {\n\t\t\t\t\tthis.logger.error('Expected one response, but got array', { request: message, response: result });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tprivate buildMessage<TRequest, TResponse>(user_ext_id: string, cid: ClassId, payload: Partial<TRequest> = {}): TResponse {\n\t\tconst message: ProtocolRequest = {\n\t\t\t// AA: in fact we need api and brand keys and ext_user_id only in the context of HTTP\n\t\t\t// its not needed in WebSocket and can be deleted\n\t\t\tapi_key: this.label_api_key,\n\t\t\tbrand_key: this.brand_api_key,\n\t\t\text_user_id: user_ext_id,\n\t\t\tcid,\n\t\t\tuuid: IntUtils.uuid(),\n\t\t\tts: new Date().getTime(),\n\t\t\t...payload,\n\t\t};\n\n\t\tif (message.ext_user_id === undefined || message.ext_user_id === null) {\n\t\t\tdelete message.ext_user_id;\n\t\t}\n\n\t\tif (message.brand_key === undefined || message.brand_key === null) {\n\t\t\tdelete message.brand_key;\n\t\t}\n\n\t\treturn message as any;\n\t}\n\n\tpublic async coreReportCustomEvent(user_ext_id: string, eventType: string, payload: any = {}): Promise<any> {\n\t\tconst eventMessage = this.buildMessage<any, any>(user_ext_id, ClassId.EVENT, {\n\t\t\teventType,\n\t\t\tpayload,\n\t\t});\n\n\t\tconst eventResponse = await this.send<any>(eventMessage, ClassId.EVENT_RESPONSE);\n\t\treturn eventResponse;\n\t}\n\n\tpublic async coreGetTranslations(\n\t\tuser_ext_id: string,\n\t\tlang_code: string,\n\t\tareas: TranslationArea[],\n\t\tcacheSec: number = 60,\n\t): Promise<GetTranslationsResponse> {\n\t\tif (lang_code === undefined || lang_code === null || (lang_code.trim && lang_code.trim() === '')) {\n\t\t\tlang_code = DEFAULT_LANG_EN;\n\t\t}\n\n\t\tconst response = await OCache.use<GetTranslationsResponse>(\n\t\t\t`${lang_code}-${this.label_api_key}-${this.brand_api_key}`,\n\t\t\tECacheContext.Translations,\n\t\t\tasync () => {\n\t\t\t\tconst tsBaseRQ = this.buildMessage<GetTranslationsRequest, GetTranslationsResponse>(\n\t\t\t\t\tuser_ext_id,\n\t\t\t\t\tClassId.GET_TRANSLATIONS_REQUEST,\n\t\t\t\t\t{\n\t\t\t\t\t\tlang_code: DEFAULT_LANG_EN,\n\t\t\t\t\t\thash_code: null,\n\t\t\t\t\t\tareas,\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\tconst trBase = await this.send<GetTranslationsResponse>(tsBaseRQ, ClassId.GET_TRANSLATIONS_RESPONSE);\n\n\t\t\t\tif (lang_code !== DEFAULT_LANG_EN) {\n\t\t\t\t\tconst trUserRQ = this.buildMessage<GetTranslationsRequest, GetTranslationsResponse>(\n\t\t\t\t\t\tuser_ext_id,\n\t\t\t\t\t\tClassId.GET_TRANSLATIONS_REQUEST,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlang_code,\n\t\t\t\t\t\t\thash_code: null,\n\t\t\t\t\t\t\tareas,\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\n\t\t\t\t\tconst trUser = await this.send<GetTranslationsResponse>(trUserRQ, ClassId.GET_TRANSLATIONS_RESPONSE);\n\n\t\t\t\t\tObject.keys(trUser?.translations ?? {}).forEach((k) => {\n\t\t\t\t\t\ttrBase.translations[k] = trUser.translations[k];\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\treturn trBase;\n\t\t\t},\n\t\t\tcacheSec,\n\t\t);\n\n\t\treturn response;\n\t}\n\n\tpublic async coreIdentifyLabel(user_ext_id: string, cacheSec: number = 60): Promise<GetLabelInfoResponse> {\n\t\treturn OCache.use<GetLabelInfoResponse>(\n\t\t\t`${this.label_api_key} - ${this.brand_api_key}`,\n\t\t\tECacheContext.LabelInfo,\n\t\t\tasync () => {\n\t\t\t\tconst message = this.buildMessage<GetLabelInfoRequest, GetLabelInfoResponse>(user_ext_id, ClassId.INIT);\n\n\t\t\t\treturn this.send<GetLabelInfoResponse>(message, ClassId.INIT_RESPONSE);\n\t\t\t},\n\t\t\tcacheSec,\n\t\t);\n\t}\n\n\tpublic async coreIdentifyUser(user_ext_id: string): Promise<ResponseIdentify> {\n\t\tconst message = this.buildMessage<any, ResponseIdentify>(user_ext_id, ClassId.IDENTIFY, {\n\t\t\trequest_id: IntUtils.uuid(), // AA: do we need request_id?\n\t\t});\n\n\t\tconst r = await this.send<ResponseIdentify>(message, ClassId.IDENTIFY_RESPONSE);\n\n\t\tr.avatar_id = CoreUtils.avatarUrl(r.avatar_id, this.avatarDomain);\n\n\t\treturn r;\n\t}\n\n\tpublic async coreChangeUsername(\n\t\tuser_ext_id: string,\n\t\tpublic_username_custom: string,\n\t): Promise<{ public_username_custom: string }> {\n\t\tconst message = this.buildMessage<any, any>(user_ext_id, ClassId.CLIENT_SET_CUSTOM_USERNAME_REQUEST, {\n\t\t\tpublic_username_custom,\n\t\t});\n\n\t\treturn await this.send(message, ClassId.CLIENT_SET_CUSTOM_USERNAME_RESPONSE);\n\t}\n\n\tpublic async coreCheckSegments(user_ext_id: string, segment_id: number[]): Promise<TSegmentCheckResult[]> {\n\t\tconst message = this.buildMessage<CheckSegmentMatchRequest, any>(user_ext_id, ClassId.CHECK_SEGMENT_MATCH_REQUEST, {\n\t\t\tsegment_id,\n\t\t});\n\n\t\tconst results = await this.send<CheckSegmentMatchResponse>(message, ClassId.CHECK_SEGMENT_MATCH_RESPONSE);\n\n\t\treturn results.segments || [];\n\t}\n\n\t/**\n\t * Reports an engagement impression event (when engagement content is displayed to the user).\n\t */\n\tpublic reportEngagementImpression(\n\t\tuser_ext_id: string,\n\t\tengagement_uid: string,\n\t\tactivityType: ActivityTypeLimited | number,\n\t): void {\n\t\tconst message = this.buildMessage<any, any>(user_ext_id, ClassId.CLIENT_ENGAGEMENT_IMPRESSION_REQUEST, {\n\t\t\tengagement_uid,\n\t\t\tactivityType,\n\t\t});\n\n\t\tthis.send(message).catch(() => { });\n\t}\n\n\t/**\n\t * Reports an engagement action event (when user clicks/interacts with engagement content).\n\t */\n\tpublic reportEngagementAction(\n\t\tuser_ext_id: string,\n\t\tengagement_uid: string,\n\t\tactivityType: ActivityTypeLimited | number,\n\t\taction?: string,\n\t): void {\n\t\tconst message = this.buildMessage<any, any>(user_ext_id, ClassId.CLIENT_ENGAGEMENT_ACTION_REQUEST, {\n\t\t\tengagement_uid,\n\t\t\tactivityType,\n\t\t\t...(action && { action }),\n\t\t});\n\n\t\tthis.send(message).catch(() => { });\n\t}\n\n\tpublic async jackpotGet(\n\t\tuser_ext_id: string,\n\t\tfilter?: { related_game_id?: string; jp_template_id?: number },\n\t\tforce_language?: string,\n\t): Promise<GetJackpotsResponse> {\n\t\tconst message = this.buildMessage<GetJackpotsRequest, GetJackpotsResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.JP_GET_JACKPOTS_REQUEST,\n\t\t\tfilter,\n\t\t);\n\t\treturn await this.send<GetJackpotsResponse>(message, ClassId.JP_GET_JACKPOTS_RESPONSE, force_language);\n\t}\n\n\tpublic async potGet(user_ext_id: string, filter: { jp_template_ids: number[] }): Promise<GetJackpotsPotsResponse> {\n\t\tconst message = this.buildMessage<GetJackpotsPotsRequest, GetJackpotsPotsResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.JP_GET_LATEST_POTS_REQUEST,\n\t\t\tfilter,\n\t\t);\n\t\treturn await this.send<GetJackpotsPotsResponse>(message, ClassId.JP_GET_LATEST_POTS_RESPONSE);\n\t}\n\n\tpublic async jackpotOptIn(user_ext_id: string, payload: { jp_template_id: number }): Promise<JackpotsOptinResponse> {\n\t\tconst message = this.buildMessage<JackpotsOptinRequest, JackpotsOptinResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.JP_OPTIN_REQUEST,\n\t\t\tpayload,\n\t\t);\n\t\treturn await this.send<JackpotsOptinResponse>(message, ClassId.JP_OPTIN_RESPONSE);\n\t}\n\n\tpublic async jackpotOptOut(user_ext_id: string, payload: { jp_template_id: number }): Promise<JackpotsOptoutResponse> {\n\t\tconst message = this.buildMessage<JackpotsOptoutRequest, JackpotsOptoutResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.JP_OPTOUT_REQUEST,\n\t\t\tpayload,\n\t\t);\n\t\treturn await this.send<JackpotsOptoutResponse>(message, ClassId.JP_OPTOUT_RESPONSE);\n\t}\n\n\tpublic async getJackpotWinners(user_ext_id: string, limit: number = 20, offset: number = 0, jp_template_id: number): Promise<GetJackpotWinnersResponse> {\n\t\tconst message = this.buildMessage<GetJackpotWinnersRequest, GetJackpotWinnersResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.JP_GET_WINNERS_REQUEST,\n\t\t\t{\n\t\t\t\tlimit,\n\t\t\t\toffset,\n\t\t\t\tjp_template_id,\n\t\t\t},\n\t\t);\n\t\treturn await this.send<GetJackpotWinnersResponse>(message, ClassId.JP_GET_WINNERS_RESPONSE);\n\t}\n\n\tpublic async getJackpotWinnersT(user_ext_id: string, limit: number = 20, offset: number = 0, jp_template_id: number): Promise<JackpotWinnerHistory[]> {\n\t\treturn GetJackpotWinnersResponseTransform((await this.getJackpotWinners(user_ext_id, limit, offset, jp_template_id)).winners);\n\t}\n\n\tpublic async getJackpotEligibleGames(user_ext_id: string, { jp_template_id }: { jp_template_id: number }): Promise<GetJackpotEligibleGamesResponse> {\n\t\tconst message = this.buildMessage<GetJackpotEligibleGamesRequest, GetJackpotEligibleGamesResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.JP_GET_ELIGIBLE_GAMES_REQUEST,\n\t\t\t{ jp_template_id },\n\t\t);\n\n\t\treturn await this.send<GetJackpotEligibleGamesResponse>(message, ClassId.JP_GET_ELIGIBLE_GAMES_RESPONSE);\n\t}\n\n\tpublic async getJackpotEligibleGamesT(user_ext_id: string, { jp_template_id }: { jp_template_id: number }): Promise<TGetJackpotEligibleGamesResponse> {\n\t\treturn GetJackpotEligibleGamesResponseTransform(await this.getJackpotEligibleGames(user_ext_id, { jp_template_id }));\n\t}\n\n\tpublic async sawGetTemplates(\n\t\tuser_ext_id: string,\n\t\tforce_language?: string,\n\t\tis_visitor_mode: boolean = false,\n\t): Promise<SAWGetTemplatesResponse> {\n\t\tconst message = this.buildMessage<SAWGetTemplatesRequest, SAWGetTemplatesResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.SAW_GET_SPINS_REQUEST,\n\t\t\t{ is_visitor_mode },\n\t\t);\n\n\t\tconst response = await this.send<SAWGetTemplatesResponse>(message, ClassId.SAW_GET_SPINS_RESPONSE, force_language);\n\n\t\tif (response && response.templates) {\n\t\t\tresponse.templates.forEach((t) => {\n\t\t\t\tif (t.jackpot_current !== undefined && t.jackpot_current !== null) {\n\t\t\t\t\tconst jackpotValue =\n\t\t\t\t\t\tt.jackpot_current +\n\t\t\t\t\t\t(t.saw_template_ui_definition?.jackpot_symbol ? ' ' + t.saw_template_ui_definition?.jackpot_symbol : '');\n\t\t\t\t\tt.saw_template_ui_definition.name = IntUtils.replaceAll(\n\t\t\t\t\t\tt.saw_template_ui_definition.name,\n\t\t\t\t\t\t'{{jackpot}}',\n\t\t\t\t\t\tjackpotValue,\n\t\t\t\t\t);\n\t\t\t\t\tt.saw_template_ui_definition.description = IntUtils.replaceAll(\n\t\t\t\t\t\tt.saw_template_ui_definition.description,\n\t\t\t\t\t\t'{{jackpot}}',\n\t\t\t\t\t\tjackpotValue,\n\t\t\t\t\t);\n\t\t\t\t\tt.saw_template_ui_definition.promo_text = IntUtils.replaceAll(\n\t\t\t\t\t\tt.saw_template_ui_definition.promo_text,\n\t\t\t\t\t\t'{{jackpot}}',\n\t\t\t\t\t\tjackpotValue,\n\t\t\t\t\t);\n\t\t\t\t\tt.prizes.forEach((p) => {\n\t\t\t\t\t\tp.saw_prize_ui_definition.name = IntUtils.replaceAll(\n\t\t\t\t\t\t\tp.saw_prize_ui_definition.name,\n\t\t\t\t\t\t\t'{{jackpot}}',\n\t\t\t\t\t\t\tjackpotValue,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tp.saw_prize_ui_definition.aknowledge_message = IntUtils.replaceAll(\n\t\t\t\t\t\t\tp.saw_prize_ui_definition.aknowledge_message,\n\t\t\t\t\t\t\t'{{jackpot}}',\n\t\t\t\t\t\t\tjackpotValue,\n\t\t\t\t\t\t);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn response;\n\t}\n\n\tpublic async sawGetTemplatesT(user_ext_id: string): Promise<TMiniGameTemplate[]> {\n\t\treturn SAWTemplatesTransform((await this.sawGetTemplates(user_ext_id)).templates);\n\t}\n\n\tpublic async doAcknowledgeRequest(user_ext_id: string, request_id: string): Promise<SAWDoAknowledgeResponse> {\n\t\tconst message = this.buildMessage<SAWDoAknowledgeRequest, SAWDoAknowledgeResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.SAW_AKNOWLEDGE_REQUEST,\n\t\t\t{\n\t\t\t\trequest_id,\n\t\t\t},\n\t\t);\n\n\t\treturn await this.send<SAWDoAknowledgeResponse>(message, ClassId.SAW_AKNOWLEDGE_RESPONSE);\n\t}\n\n\tpublic async sawSpinRequest(user_ext_id: string, saw_template_id: number, round_id?: number): Promise<SAWDoSpinResponse> {\n\t\tif (!saw_template_id) {\n\t\t\tthrow new Error('Missing template id');\n\t\t}\n\n\t\tconst request_id = IntUtils.uuid();\n\n\t\tconst message = this.buildMessage<SAWDoSpinRequest, SAWDoSpinResponse>(user_ext_id, ClassId.SAW_DO_SPIN_REQUEST, {\n\t\t\tsaw_template_id,\n\t\t\trequest_id,\n\t\t});\n\n\t\tconst spinAttemptResponse = await this.send<SAWDoSpinResponse>(message, ClassId.SAW_DO_SPIN_RESPONSE);\n\n\t\t// to simulate fail\n\t\t// response.errCode = SAWSpinErrorCode.SAW_NO_SPINS;\n\n\t\tconst status: string =\n\t\t\t{\n\t\t\t\t[SAWSpinErrorCode.SAW_OK]: 'OK',\n\t\t\t\t[SAWSpinErrorCode.SAW_NO_SPINS]: 'NO SPINS AVAILABLE',\n\t\t\t\t[SAWSpinErrorCode.SAW_PRIZE_POOL_EMPTY]: 'PRIZE POOL IS EMPTY',\n\t\t\t\t[SAWSpinErrorCode.SAW_NOT_ENOUGH_POINTS]: 'NOT ENOUGH POINTS',\n\t\t\t\t[SAWSpinErrorCode.SAW_FAILED_MAX_SPINS_REACHED]: 'MAX SPIN ATTEMPTS REACHED',\n\t\t\t\t[SAWSpinErrorCode.SAW_TEMPLATE_NOT_ACTIVE]: \"MINIGAME IS NOT IN ACTIVE PERIOD\",\n\t\t\t\t[SAWSpinErrorCode.SAW_NOT_IN_SEGMENT]: \"USER IS NOT IN SEGMENT\",\n\t\t\t\t[SAWSpinErrorCode.SAW_NO_BALANCE_GEMS]: \"NOT ENOUGH GEMS\",\n\t\t\t\t[SAWSpinErrorCode.SAW_NO_BALANCE_DIAMONDS]: \"NOT ENOUGH DIAMONDS\",\n\t\t\t}[spinAttemptResponse.errCode] || 'OTHER';\n\n\t\tawait this.coreReportCustomEvent(user_ext_id, 'minigame_attempt', {\n\t\t\tsaw_template_id,\n\t\t\tstatus,\n\t\t\tround_id,\n\t\t});\n\n\t\treturn { ...spinAttemptResponse, request_id };\n\t}\n\n\n\tpublic async doAcknowledgeBatchRequest(user_ext_id: string, request_ids: string[]): Promise<SAWDoAcknowledgeBatchResponse> {\n\t\tconst message = this.buildMessage<SAWDoAcknowledgeBatchRequest, SAWDoAcknowledgeBatchResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.SAW_AKNOWLEDGE_REQUEST,\n\t\t\t{\n\t\t\t\trequest_ids,\n\t\t\t},\n\t\t);\n\n\t\treturn await this.send<SAWDoAcknowledgeBatchResponse>(message, ClassId.SAW_AKNOWLEDGE_BATCH_RESPONSE);\n\t}\n\n\tpublic async sawSpinBatchRequest(user_ext_id: string, saw_template_id: number, spins_count: number): Promise<SAWDoSpinBatchResponse> {\n\n\t\tconst spins = [];\n\t\tfor (let i = 0; i < spins_count; i++) {\n\t\t\tconst request_id = IntUtils.uuid();\n\t\t\tspins.push({ request_id, saw_template_id })\n\t\t}\n\n\t\tconst message = this.buildMessage<SAWDoSpinBatchRequest, SAWDoSpinBatchResponse>(user_ext_id, ClassId.SAW_DO_SPIN_BATCH_REQUEST, { spins });\n\t\tconst spinAttemptResponse = await this.send<SAWDoSpinBatchResponse>(message, ClassId.SAW_DO_SPIN_BATCH_RESPONSE);\n\n\t\t// If one response is 'OK' we consider that whole result is 'OK'\n\t\tconst result = spinAttemptResponse.results.find((res) => res.errCode === 0);\n\n\t\tlet status = 'OK';\n\t\tif (!result) {\n\t\t\tstatus = 'BATCH FAIL';\n\t\t}\n\n\t\tawait this.coreReportCustomEvent(user_ext_id, 'minigame_attempt', {\n\t\t\tsaw_template_id,\n\t\t\tstatus,\n\t\t\tspins_count,\n\t\t});\n\n\t\treturn { ...spinAttemptResponse };\n\t}\n\n\tpublic async getSawWinningHistory(user_ext_id: string, limit: number = 20, offset: number = 0, saw_template_id: number): Promise<SAWWinningHistoryResponse> {\n\t\tconst message = this.buildMessage<SAWWinningHistoryRequest, SAWWinningHistoryResponse>(user_ext_id, ClassId.GET_SAW_HISTORY_REQUEST, {\n\t\t\tlimit, offset, saw_template_id\n\t\t})\n\n\t\treturn await this.send<SAWWinningHistoryResponse>(message, ClassId.GET_SAW_HISTORY_RESPONSE);\n\t}\n\n\tpublic async getSawWinningHistoryT(user_ext_id: string, limit?: number, offset?: number, saw_template_id?: number): Promise<SAWPrizesHistory[]> {\n\t\treturn SAWHistoryTransform((await this.getSawWinningHistory(user_ext_id, limit, offset, saw_template_id)).prizes);\n\t}\n\n\tpublic async missionOptIn(user_ext_id: string, mission_id: number) {\n\t\tif (!mission_id) {\n\t\t\tthrow new Error('Missing mission id');\n\t\t}\n\t\tconst message = this.buildMessage<AchievementOptinRequest, AchievementOptinResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.MISSION_OPTIN_REQUEST,\n\t\t\t{\n\t\t\t\tachievementId: mission_id,\n\t\t\t},\n\t\t);\n\n\t\tconst res = await this.send<AchievementOptinResponse>(message, ClassId.MISSION_OPTIN_RESPONSE);\n\n\t\treturn res;\n\t}\n\n\tpublic async missionClaimPrize(user_ext_id: string, mission_id: number, ach_completed_id: number) {\n\t\tif (!mission_id) {\n\t\t\tthrow new Error('Missing mission id');\n\t\t}\n\n\t\tconst message = this.buildMessage<AchClaimPrizeRequest, AchClaimPrizeResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.ACHIEVEMENT_CLAIM_PRIZE_REQUEST,\n\t\t\t{\n\t\t\t\tach_id: mission_id,\n\t\t\t\tach_completed_id: ach_completed_id,\n\t\t\t},\n\t\t);\n\n\t\tconst res = await this.send<AchClaimPrizeResponse>(message, ClassId.ACHIEVEMENT_CLAIM_PRIZE_RESPONSE);\n\n\t\treturn res;\n\t}\n\n\tpublic async registerInTournament(user_ext_id: string, tournamentInstanceId: number) {\n\t\tif (!tournamentInstanceId) {\n\t\t\tthrow new Error('Missing tournament instance id');\n\t\t}\n\t\tconst message = this.buildMessage<TournamentRegisterRequest, TournamentRegisterResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.TOURNAMENT_REGISTER_REQUEST,\n\t\t\t{\n\t\t\t\ttournamentInstanceId,\n\t\t\t},\n\t\t);\n\n\t\tconst res = await this.send<TournamentRegisterResponse>(message, ClassId.TOURNAMENT_REGISTER_RESPONSE);\n\n\t\treturn res;\n\t}\n\n\tpublic async buyStoreItem(user_ext_id: string, itemId: number) {\n\t\tif (!itemId) {\n\t\t\tthrow new Error('Missing store item id');\n\t\t}\n\t\tconst message = this.buildMessage<BuyStoreItemRequest, BuyStoreItemResponse>(user_ext_id, ClassId.BUY_SHOP_ITEM_REQUEST, {\n\t\t\titemId,\n\t\t});\n\n\t\tconst res = await this.send<BuyStoreItemResponse>(message, ClassId.BUY_SHOP_ITEM_RESPONSE);\n\n\t\treturn res;\n\t}\n\n\tpublic async inboxGetMessages(\n\t\tuser_ext_id: string,\n\t\tlimit: number = 10,\n\t\toffset: number = 0,\n\t): Promise<GetInboxMessagesResponse> {\n\t\tconst message = this.buildMessage<GetInboxMessagesRequest, GetInboxMessagesResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_INBOX_MESSAGES_REQUEST,\n\t\t\t{\n\t\t\t\tlimit,\n\t\t\t\toffset,\n\t\t\t},\n\t\t);\n\n\t\treturn await this.send<GetInboxMessagesResponse>(message, ClassId.GET_INBOX_MESSAGES_RESPONSE);\n\t}\n\n\tpublic async storeGetItems(user_ext_id: string, force_language?: string): Promise<GetStoreItemsResponse> {\n\t\tconst message = this.buildMessage<any, GetStoreItemsResponse>(user_ext_id, ClassId.GET_SHOP_ITEMS_REQUEST);\n\t\treturn await this.send<GetStoreItemsResponse>(message, ClassId.GET_SHOP_ITEMS_RESPONSE, force_language);\n\t}\n\n\tpublic async storeGetItemsT(user_ext_id: string): Promise<TStoreItem[]> {\n\t\treturn StoreItemTransform((await this.storeGetItems(user_ext_id)).items);\n\t}\n\n\tpublic async storeGetCategories(user_ext_id: string, force_language?: string): Promise<GetCategoriesStoreResponse> {\n\t\tconst message = this.buildMessage<any, GetCategoriesStoreResponse>(user_ext_id, ClassId.GET_SHOP_CATEGORIES_REQUEST);\n\t\treturn await this.send<GetCategoriesStoreResponse>(message, ClassId.GET_SHOP_CATEGORIES_RESPONSE, force_language);\n\t}\n\n\tpublic async storeGetCategoriesT(user_ext_id: string): Promise<TStoreCategory[]> {\n\t\treturn StoreCategoryTransform((await this.storeGetCategories(user_ext_id)).categories);\n\t}\n\n\tpublic async storeGetPurchasedItems(\n\t\tuser_ext_id: string,\n\t\tlimit: number = 20,\n\t\toffset: number = 0,\n\t): Promise<GetStoreHistoryResponse> {\n\t\tconst message = this.buildMessage<GetStoreHistoryRequest, GetStoreHistoryResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.ACH_SHOP_ITEM_HISTORY_REQUEST,\n\t\t\t{\n\t\t\t\tlimit,\n\t\t\t\toffset,\n\t\t\t},\n\t\t);\n\n\t\treturn await this.send<GetStoreHistoryResponse>(message, ClassId.ACH_SHOP_ITEM_HISTORY_RESPONSE);\n\t}\n\n\tpublic async storeGetPurchasedItemsT(user_ext_id: string, limit?: number, offset?: number): Promise<TStoreItem[]> {\n\t\treturn StoreItemPurchasedTransform((await this.storeGetPurchasedItems(user_ext_id, limit, offset)).items);\n\t}\n\n\tpublic async missionsGetItems(user_ext_id: string, force_language?: string): Promise<GetAchievementMapResponse> {\n\t\tconst message = this.buildMessage<GetAchievementMapRequest, GetAchievementMapResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_ACHIEVEMENT_MAP_REQUEST,\n\t\t);\n\t\tconst response = await this.send<GetAchievementMapResponse>(\n\t\t\tmessage,\n\t\t\tClassId.GET_ACHIEVEMENT_MAP_RESPONSE,\n\t\t\tforce_language,\n\t\t);\n\t\t// we need to clone response to avoid changing original object,for cases when its called together with badgesGetItems (e.g. in Promise.all)\n\t\tconst responseClone = { ...response };\n\n\t\tif (responseClone.achievements) {\n\t\t\tresponseClone.achievements = responseClone.achievements.filter((a) => a.ach_type_id === AchievementType.Mission);\n\t\t}\n\t\treturn responseClone;\n\t}\n\n\tpublic async missionsGetItemsT(user_ext_id: string): Promise<TMissionOrBadge[]> {\n\t\treturn UserAchievementTransform((await this.missionsGetItems(user_ext_id)).achievements);\n\t}\n\n\tpublic async getUserGamificationInfo(user_ext_id: string): Promise<GetAchievementsUserInfoResponse> {\n\t\tconst message = this.buildMessage<GetAchievementMapRequest, GetAchievementsUserInfoResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_ACHIEVEMENT_USER_REQUEST,\n\t\t);\n\n\t\treturn await this.send<GetAchievementsUserInfoResponse>(message, ClassId.GET_ACHIEVEMENT_USER_RESPONSE);\n\t}\n\n\tpublic async getUserGamificationInfoT(user_ext_id: string): Promise<UserLevelExtraCountersT> {\n\t\tconst response = await this.getUserGamificationInfo(user_ext_id);\n\n\t\treturn {\n\t\t\tlevel_counter_1: response.level_counter_1,\n\t\t\tlevel_counter_2: response.level_counter_2,\n\t\t};\n\t}\n\n\tpublic async achGetCategories(user_ext_id: string, force_language?: string): Promise<GetAchCategoriesResponse> {\n\t\tconst message = this.buildMessage<any, GetAchCategoriesResponse>(user_ext_id, ClassId.GET_ACH_CATEGORIES_REQUEST);\n\t\treturn await this.send<GetAchCategoriesResponse>(message, ClassId.GET_ACH_CATEGORIES_RESPONSE, force_language);\n\t}\n\n\tpublic async achGetCategoriesT(user_ext_id: string): Promise<TAchCategory[]> {\n\t\treturn AchCategoryTransform((await this.achGetCategories(user_ext_id)).categories);\n\t}\n\n\tpublic async badgetsGetItems(user_ext_id: string, force_language?: string): Promise<GetAchievementMapResponse> {\n\t\tconst message = this.buildMessage<GetAchievementMapRequest, GetAchievementMapResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_ACHIEVEMENT_MAP_REQUEST,\n\t\t);\n\t\tconst response = await this.send<GetAchievementMapResponse>(\n\t\t\tmessage,\n\t\t\tClassId.GET_ACHIEVEMENT_MAP_RESPONSE,\n\t\t\tforce_language,\n\t\t);\n\t\t// we need to clone response to avoid changing original object,for cases when its called together with missionsGetItems (e.g. in Promise.all)\n\t\tconst responseClone = { ...response };\n\n\t\tif (responseClone.achievements) {\n\t\t\tresponseClone.achievements = responseClone.achievements.filter((a) => a.ach_type_id === AchievementType.Badge);\n\t\t\tresponseClone.achievements = enrichUserAchievementsWithBadgeState(responseClone.achievements);\n\t\t}\n\t\treturn responseClone;\n\t}\n\n\tpublic async bonusesGetItems(user_ext_id: string, force_language?: string): Promise<GetBonusesResponse> {\n\t\tconst message = this.buildMessage<GetBonusesRequest, GetBonusesResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_BONUSES_REQUEST,\n\t\t);\n\t\tconst response = await this.send<GetBonusesResponse>(\n\t\t\tmessage,\n\t\t\tClassId.GET_BONUSES_RESPONSE,\n\t\t\tforce_language,\n\t\t);\n\n\t\tconst responseClone = { ...response };\n\n\t\treturn responseClone;\n\t}\n\tpublic async bonusClaimItem(user_ext_id: string, bonus_id: number): Promise<ClaimBonusResponse> {\n\t\tconst message = this.buildMessage<ClaimBonusRequest, ClaimBonusResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.CLAIM_BONUS_REQUEST,\n\t\t\t{ bonusId: bonus_id }\n\n\t\t);\n\t\tconst response = await this.send<ClaimBonusResponse>(\n\t\t\tmessage,\n\t\t\tClassId.CLAIM_BONUS_RESPONSE,\n\n\t\t);\n\n\t\tconst responseClone = { ...response };\n\n\t\treturn responseClone;\n\t}\n\n\tpublic async bonusesGetItemsT(user_ext_id: string): Promise<TBonus[]> {\n\t\treturn BonusItemsTransform((await this.bonusesGetItems(user_ext_id)).bonuses);\n\t}\n\n\tpublic async badgetsGetItemsT(user_ext_id: string): Promise<TMissionOrBadge[]> {\n\t\treturn UserAchievementTransform((await this.badgetsGetItems(user_ext_id)).achievements);\n\t}\n\n\tpublic async tournamentsGetLobby(user_ext_id: string, force_language?: string): Promise<GetTournamentsResponse> {\n\t\tconst message = this.buildMessage<GetTournamentsRequest, GetTournamentsResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_TOURNAMENT_LOBBY_REQUEST,\n\t\t);\n\t\treturn await this.send<GetTournamentsResponse>(message, ClassId.GET_TOURNAMENT_LOBBY_RESPONSE, force_language);\n\t}\n\n\tpublic async tournamentsGetLobbyT(user_ext_id: string): Promise<TTournament[]> {\n\t\treturn TournamentItemsTransform((await this.tournamentsGetLobby(user_ext_id)).tournaments);\n\t}\n\n\tpublic async clansGetList(user_ext_id: string, force_language?: string): Promise<GetClanListResponse> {\n\t\tconst message = this.buildMessage<GetClanListRequest, GetClanListResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_CLAN_LIST_REQUEST,\n\t\t);\n\t\treturn await this.send<GetClanListResponse>(message, ClassId.GET_CLAN_LIST_RESPONSE, force_language);\n\t}\n\n\tpublic async clansGetListT(user_ext_id: string): Promise<TClans> {\n\t\tconst response = await this.clansGetList(user_ext_id);\n\t\treturn {\n\t\t\tclans: response.clans,\n\t\t\tuser_clan_id: response.user_clan_id,\n\t\t\tcooldown_until: response.cooldown_until,\n\t\t\tjoin_date: response.join_date ?? null,\n\t\t};\n\t}\n\n\tpublic async clansGetInfo(user_ext_id: string, clanId: number, force_language?: string): Promise<GetClanInfoResponse> {\n\t\tconst message = this.buildMessage<GetClanInfoRequest, GetClanInfoResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_CLAN_INFO_REQUEST,\n\t\t\t{ clan_id: clanId },\n\t\t);\n\t\treturn await this.send<GetClanInfoResponse>(message, ClassId.GET_CLAN_INFO_RESPONSE, force_language);\n\t}\n\n\tpublic async clansGetInfoT(user_ext_id: string, clanId: number, force_language?: string): Promise<TClanInfo> {\n\t\tconst response = await this.clansGetInfo(user_ext_id, clanId, force_language);\n\t\tconst c = response.clanInfo;\n\t\treturn {\n\t\t\tclan_id: c.clan_id,\n\t\t\tpublic_meta: c.public_meta,\n\t\t\tmember_count: c.member_count,\n\t\t\tcapacity_limit: c.capacity_limit,\n\t\t\tentry_fee_currency_type_id: c.entry_fee_currency_type_id,\n\t\t\tentry_fee_amount: c.entry_fee_amount,\n\t\t\trating_position: c.rating_position,\n\t\t\trating_score: c.rating_score,\n\t\t\tcooldown_until: c.cooldown_until ?? null,\n\t\t\tmembers: (c.members || []).map((m) => ({\n\t\t\t\tuser_id: m.user_id,\n\t\t\t\tpublic_username: m.public_username,\n\t\t\t\tavatar_id: m.avatar_id,\n\t\t\t\tavatar_real_id: m.avatar_real_id,\n\t\t\t\tavatar_url: CoreUtils.avatarUrl(m.avatar_id, this.avatarDomain),\n\t\t\t\tposition: m.position,\n\t\t\t\tcontribution_score: m.contribution_score,\n\t\t\t\tis_me: m.is_me,\n\t\t\t\tclean_ext_user_id: m.clean_ext_user_id,\n\t\t\t})),\n\t\t};\n\t}\n\n\tpublic async clanJoin(user_ext_id: string, clanId: number, joinSourceId: number = 0): Promise<TClanJoinResult> {\n\t\tconst message = this.buildMessage<JoinClanRequest, JoinClanResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.JOIN_CLAN_REQUEST,\n\t\t\t{ clan_id: clanId, join_source_id: joinSourceId },\n\t\t);\n\t\tconst response = await this.send<JoinClanResponse>(message, ClassId.JOIN_CLAN_RESPONSE);\n\t\treturn { errCode: response.errCode ?? 0, errMsg: response.errMsg ?? '' };\n\t}\n\n\tpublic async tournamentsGetInfo(\n\t\tuser_ext_id: string,\n\t\ttournamentInstanceId: number,\n\t\tforce_language?: string,\n\t): Promise<GetTournamentInfoResponse> {\n\t\tconst message = this.buildMessage<GetTournamentInfoRequest, GetTournamentInfoResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_TOURNAMENT_INFO_REQUEST,\n\t\t\t{\n\t\t\t\ttournamentInstanceId,\n\t\t\t},\n\t\t);\n\t\tconst response = await this.send<GetTournamentInfoResponse>(\n\t\t\tmessage,\n\t\t\tClassId.GET_TOURNAMENT_INFO_RESPONSE,\n\t\t\tforce_language,\n\t\t);\n\n\t\tif (response.userPosition?.avatar_id) {\n\t\t\tresponse.userPosition.avatar_url = CoreUtils.avatarUrl(response.userPosition.avatar_id, this.avatarDomain);\n\t\t}\n\n\t\tif (response.tournamentInfo?.players?.length) {\n\t\t\tresponse.tournamentInfo.players.forEach((p) => {\n\t\t\t\tp.avatar_url = CoreUtils.avatarUrl(p.avatar_id, this.avatarDomain);\n\t\t\t});\n\t\t}\n\n\t\treturn response;\n\t}\n\n\tpublic async tournamentsGetInfoT(user_ext_id: string, tournamentInstanceId: number): Promise<TTournamentDetailed> {\n\t\tif (!tournamentInstanceId) {\n\t\t\tthrow new Error('Missing tournament instance id');\n\t\t}\n\t\tconst response = await this.tournamentsGetInfo(user_ext_id, tournamentInstanceId);\n\t\treturn tournamentInfoItemTransform(response);\n\t}\n\n\tpublic async clanTournamentGetPlayers(\n\t\tuser_ext_id: string,\n\t\ttournament_instance_id: number,\n\t\tclan_id: number,\n\t\tforce_language?: string,\n\t): Promise<TClanTournamentPlayers> {\n\t\tconst message = this.buildMessage<GetClanTournamentPlayersRequest, GetClanTournamentPlayersResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_CLAN_TOURNAMENT_PLAYERS_REQUEST,\n\t\t\t{ tournament_instance_id, clan_id, force_language },\n\t\t);\n\t\tconst response = await this.send<GetClanTournamentPlayersResponse>(\n\t\t\tmessage,\n\t\t\tClassId.GET_CLAN_TOURNAMENT_PLAYERS_RESPONSE,\n\t\t\tforce_language,\n\t\t);\n\t\tif (response.players?.length) {\n\t\t\tresponse.players.forEach((p) => {\n\t\t\t\tp.avatar_url = CoreUtils.avatarUrl(p.avatar_id, this.avatarDomain);\n\t\t\t});\n\t\t}\n\t\treturn clanTournamentPlayersTransform(response);\n\t}\n\n\tpublic async leaderboardGet(\n\t\tuser_ext_id: string,\n\t\tperiod_type_id?: LeaderBoardPeriodType,\n\t\tprevPeriod: boolean = false,\n\t\tforce_language?: string,\n\t): Promise<LeaderBoardDetails> {\n\t\tconst message = this.buildMessage<GetLeaderBoardsRequest, GetLeaderBoardsResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_LEADERS_BOARD_REQUEST,\n\t\t\t{\n\t\t\t\tperiod_type_id,\n\t\t\t\tsnapshot_offset: prevPeriod ? 1 : 0,\n\t\t\t\tinclude_users: true,\n\t\t\t},\n\t\t);\n\n\t\tconst response = await this.send<GetLeaderBoardsResponse>(message, ClassId.GET_LEADERS_BOARD_RESPONSE, force_language);\n\n\t\tconst boardKey = Object.keys(response.map || {}).find((k) => period_type_id === undefined || k === period_type_id?.toString());\n\n\t\tif (boardKey === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (response.map[boardKey]?.userPosition?.avatar_id) {\n\t\t\tresponse.map[boardKey].userPosition.avatar_url = CoreUtils.avatarUrl(\n\t\t\t\tresponse.map[boardKey].userPosition.avatar_id,\n\t\t\t\tthis.avatarDomain,\n\t\t\t);\n\t\t}\n\n\t\tif (response.map[boardKey]?.positions?.length) {\n\t\t\tresponse.map[boardKey].positions.forEach((p) => {\n\t\t\t\tp.avatar_url = CoreUtils.avatarUrl(p.avatar_id, this.avatarDomain);\n\t\t\t});\n\t\t}\n\n\t\treturn response.map[boardKey];\n\t}\n\n\tpublic async leaderboardsGetT(\n\t\tuser_ext_id: string,\n\t\tperiod_type_id: LeaderBoardPeriodType = LeaderBoardPeriodType.DAILY,\n\t\tprevPeriod: boolean = false,\n\t): Promise<LeaderBoardDetailsT> {\n\t\treturn getLeaderBoardTransform(await this.leaderboardGet(user_ext_id, period_type_id, prevPeriod));\n\t}\n\n\tpublic async levelsGet(user_ext_id: string, force_language?: string): Promise<GetLevelMapResponse> {\n\t\tconst message = this.buildMessage<any, GetLevelMapResponse>(user_ext_id, ClassId.GET_LEVEL_MAP_REQUEST);\n\t\treturn await this.send<GetLevelMapResponse>(message, ClassId.GET_LEVEL_MAP_RESPONSE, force_language);\n\t}\n\n\tpublic async levelsGetT(user_ext_id: string): Promise<TLevel[]> {\n\t\treturn GetLevelMapResponseTransform(await this.levelsGet(user_ext_id));\n\t}\n\n\tpublic async getLevelCurrent(user_ext_id: string): Promise<TLevelCurrent> {\n\t\tconst levels = await this.levelsGetT(user_ext_id);\n\t\tconst userInfo = await this.getUserGamificationInfo(user_ext_id);\n\t\tif (!levels || levels.length === 0) return null;\n\n\t\tconst sortedLevels = [...levels].sort((a, b) => a.required_points - b.required_points);\n\n\t\tlet currentLevelIndex = sortedLevels.findIndex((level) => level.id === userInfo.current_level);\n\n\t\tif (currentLevelIndex === -1) {\n\t\t\tconst userPointsEver = userInfo.points_ever ?? 0;\n\t\t\tcurrentLevelIndex = sortedLevels.findIndex((level, index) => {\n\t\t\t\tconst nextLevel = sortedLevels[index + 1];\n\t\t\t\treturn userPointsEver >= level.required_points && (!nextLevel || userPointsEver < nextLevel.required_points);\n\t\t\t});\n\t\t\tif (currentLevelIndex === -1) {\n\t\t\t\tcurrentLevelIndex = sortedLevels.length - 1;\n\t\t\t}\n\t\t}\n\n\t\tconst currentLevel = sortedLevels[currentLevelIndex];\n\t\tconst nextLevel = sortedLevels[currentLevelIndex + 1];\n\t\tconst userPointsEver = userInfo.points_ever ?? 0;\n\t\tconst progress = nextLevel\n\t\t\t? ((userPointsEver - currentLevel.required_points) / (nextLevel.required_points - currentLevel.required_points)) * 100\n\t\t\t: 100;\n\n\t\treturn {\n\t\t\t...currentLevel,\n\t\t\tprogress: Math.min(Math.max(progress, 0), 100),\n\t\t};\n\t}\n\n\tpublic async customSectionsGet(user_ext_id: string, force_language?: string): Promise<GetCustomSectionsResponse> {\n\t\tconst message = this.buildMessage<GetCustomSectionsRequest, GetCustomSectionsResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_CUSTOM_SECTIONS_REQUEST,\n\t\t);\n\t\treturn await this.send<GetCustomSectionsResponse>(message, ClassId.GET_CUSTOM_SECTIONS_RESPONSE, force_language);\n\t}\n\n\tpublic async customSectionsGetT(user_ext_id: string): Promise<TUICustomSection[]> {\n\t\treturn UICustomSectionTransform(await this.customSectionsGet(user_ext_id));\n\t}\n\n\tpublic async getTranslationsT(\n\t\tuser_ext_id: string,\n\t\tlang_code: string,\n\t\tareas: TranslationArea[],\n\t\tcacheSec: number = 60,\n\t): Promise<GetTranslationsResponse> {\n\t\treturn await this.coreGetTranslations(user_ext_id, lang_code, areas, 30);\n\t}\n\n\tpublic async getInboxMessages(\n\t\tuser_ext_id: string,\n\t\tlimit: number = 20,\n\t\toffset: number = 0,\n\t\tstarred_only: boolean,\n\t\tcategory_id?: InboxCategories,\n\t\tread_status?: InboxReadStatus,\n\t): Promise<GetInboxMessagesResponse> {\n\t\tconst message = this.buildMessage<GetInboxMessagesRequest, GetInboxMessagesResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_INBOX_MESSAGES_REQUEST,\n\t\t\t{\n\t\t\t\tlimit,\n\t\t\t\toffset,\n\t\t\t\tstarred_only,\n\t\t\t\tcategory_id,\n\t\t\t\tread_status,\n\t\t\t},\n\t\t);\n\t\treturn await this.send<GetInboxMessagesResponse>(message, ClassId.GET_INBOX_MESSAGES_RESPONSE);\n\t}\n\n\tpublic async getInboxMessagesT(\n\t\tuser_ext_id: string,\n\t\tfrom: number = 0,\n\t\tto: number = 20,\n\t\tfavoriteOnly: boolean = false,\n\t\tcategoryId?: InboxCategories,\n\t\tread_status?: InboxReadStatus,\n\t): Promise<TInboxMessage[]> {\n\t\tconst limit = to - from > 20 ? 20 : to - from;\n\t\tconst offset = from;\n\n\t\treturn InboxMessagesTransform((await this.getInboxMessages(user_ext_id, limit, offset, favoriteOnly, categoryId, read_status)).log);\n\t}\n\n\tpublic async getInboxUnreadCountT(\n\t\tuser_ext_id: string,\n\t): Promise<number> {\n\t\tconst limit = 1;\n\t\tconst offset = 0;\n\n\t\treturn (await this.getInboxMessages(user_ext_id, limit, offset, false, null)).unread_count;\n\t}\n\n\tpublic async getInboxMessageBody(messageGuid: string): Promise<InboxMessageBody> {\n\t\tconst getMessageBody = async (messageGuid: string): Promise<InboxMessageBody> => {\n\t\t\tconst inboxCdnUrl = this.tracker.getLabelSetting(PublicLabelSettings.INBOX_PUBLIC_CDN);\n\n\t\t\ttry {\n\t\t\t\tconst url = `${inboxCdnUrl}${messageGuid}.json`;\n\n\t\t\t\tconst response = await fetch(url, {\n\t\t\t\t\tmethod: 'GET',\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t'Accept': 'application/json',\n\t\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\t\t'Access-Control-Allow-Origin': '*',\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t\tconst data = await response.json();\n\t\t\t\treturn data || {};\n\t\t\t} catch (error) {\n\t\t\t\tthis.logger.error('Error fetching inbox message body:', error);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\n\t\treturn await getMessageBody(messageGuid);\n\t}\n\n\tpublic async getInboxMessageBodyT(messageGuid: string): Promise<TInboxMessageBody> {\n\t\tconst message = await this.getInboxMessageBody(messageGuid);\n\t\treturn InboxMessageBodyTransform(message);\n\t}\n\n\tpublic async markInboxMessageRead(user_ext_id: string, messageGuid: string): Promise<MarkInboxMessageReadResponse> {\n\t\tconst message = this.buildMessage<MarkInboxMessageReadRequest, MarkInboxMessageReadResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.MARK_INBOX_READ_REQUEST,\n\t\t\t{\n\t\t\t\tengagement_uid: messageGuid,\n\t\t\t},\n\t\t);\n\n\t\treturn await this.send<MarkInboxMessageReadResponse>(message, ClassId.MARK_INBOX_READ_RESPONSE);\n\t}\n\n\tpublic async markAllInboxMessageRead(user_ext_id: string): Promise<MarkInboxMessageReadResponse> {\n\t\tconst message = this.buildMessage<MarkInboxMessageReadRequest, MarkInboxMessageReadResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.MARK_INBOX_READ_REQUEST,\n\t\t\t{\n\t\t\t\tall_read: true,\n\t\t\t},\n\t\t);\n\n\t\treturn await this.send<MarkInboxMessageReadResponse>(message, ClassId.MARK_INBOX_READ_RESPONSE);\n\t}\n\n\tpublic async markUnmarkInboxMessageAsFavorite(\n\t\tuser_ext_id: string,\n\t\tmessageGuid: string,\n\t\tmark: boolean,\n\t): Promise<MarkInboxMessageStarredResponse> {\n\t\tconst message = this.buildMessage<MarkInboxMessageStarredRequest, MarkInboxMessageStarredResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.MARK_INBOX_STARRED_REQUEST,\n\t\t\t{\n\t\t\t\tengagement_uid: messageGuid,\n\t\t\t\tis_starred: mark,\n\t\t\t},\n\t\t);\n\n\t\treturn await this.send<MarkInboxMessageStarredResponse>(message, ClassId.MARK_INBOX_STARRED_RESPONSE);\n\t}\n\n\tpublic async deleteInboxMessage(user_ext_id: string, messageGuid: string): Promise<MarkInboxMessageDeletedResponse> {\n\t\tconst message = this.buildMessage<MarkInboxMessageDeletedRequest, MarkInboxMessageDeletedResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.MARK_INBOX_DELETED_REQUEST,\n\t\t\t{\n\t\t\t\tengagement_uid: messageGuid,\n\t\t\t},\n\t\t);\n\n\t\treturn await this.send<MarkInboxMessageDeletedResponse>(message, ClassId.MARK_INBOX_DELETED_RESPONSE);\n\t}\n\n\tpublic async deleteAllInboxMessages(user_ext_id: string): Promise<MarkInboxMessageDeletedResponse> {\n\t\tconst message = this.buildMessage<MarkInboxMessageDeletedRequest, MarkInboxMessageDeletedResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.MARK_INBOX_DELETED_REQUEST,\n\t\t\t{\n\t\t\t\tall_deleted: true,\n\t\t\t},\n\t\t);\n\n\t\treturn await this.send<MarkInboxMessageDeletedResponse>(message, ClassId.MARK_INBOX_DELETED_RESPONSE);\n\t}\n\n\tprivate buildGamesApiParams(): Record<string, string> {\n\t\tconst params: Record<string, string> = Object.assign({}, this.baseRgApiParams, {\n\t\t\text_user_id: this.tracker.userPublicProps?.user_id,\n\t\t\tsmartico_ext_user_id: this.tracker.getExtUserId(),\n\t\t\tlang: this.tracker.userPublicProps?.core_user_language,\n\t\t});\n\n\t\treturn params;\n\t}\n\n\tprivate async sendGamesApi<T>({ method, params, usePost = false }: { method: string, params: Record<string, any>, usePost?: boolean }): Promise<GamesApiResponse<T>> {\n\n\t\tif (!this.tracker) {\n\t\t\tthrow new Error(`MatchX and Quiz APIs are not available in the visitor mode`);\n\t\t}\n\n\t\tconst baseParams = this.buildGamesApiParams();\n\t\tconst queryString = Object.entries(baseParams).map(([k, v]) => `${k}=${encodeURIComponent(v)}`).join('&');\n\t\tlet url = `${GAMES_API_URL}/${method}?${queryString}`;\n\n\t\tlet fetchOptions: RequestInit = {\n\t\t\tmethod: 'GET',\n\t\t\theaders: { 'Accept': 'application/json' },\n\t\t};\n\n\t\tif (usePost && params) {\n\t\t\tfetchOptions = {\n\t\t\t\tmethod: 'POST',\n\t\t\t\theaders: {\n\t\t\t\t\t'Accept': 'application/json',\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t},\n\t\t\t\tbody: JSON.stringify(params),\n\t\t\t};\n\t\t} else if (params) {\n\t\t\tconst extraQuery = Object.entries(params)\n\t\t\t\t.map(([k, v]) => `${k}=${encodeURIComponent(JSON.stringify(v))}`)\n\t\t\t\t.join('&');\n\t\t\turl += `&${extraQuery}`;\n\t\t}\n\n\t\ttry {\n\t\t\tconst response = await fetch(url, fetchOptions);\n\n\t\t\tconst data = await response.json();\n\t\t\treturn SmarticoAPI.replaceSmrDomainsWithCloudfront<GamesApiResponse<T>>(data);\n\t\t} catch (e) {\n\t\t\tthis.logger.error(`Failed to call games API: ${method}`, { url, error: e.message });\n\t\t\tthrow new Error(`Failed to call games API: ${method}. ${e.message}`);\n\t\t}\n\t}\n\n\tpublic async gpGetActiveRounds(saw_template_id: number): Promise<GamesApiResponse<GamePickRound[]>> {\n\t\tconst params = {\n\t\t\text_game_id: saw_template_id,\n\t\t};\n\n\t\treturn this.sendGamesApi<GamePickRound[]>({ method: 'active-rounds', params });\n\t}\n\n\tpublic async gpGetActiveRound(saw_template_id: number, round_id?: number): Promise<GamesApiResponse<GamePickRound>> {\n\t\tconst params = {\n\t\t\text_game_id: saw_template_id,\n\t\t\tround_id: round_id,\n\t\t};\t\n\t\t\n\t\treturn this.sendGamesApi<GamePickRound>({ method: 'active-round', params });\n\t}\n\n\tpublic async gpGetGamesHistory(saw_template_id: number): Promise<GamesApiResponse<GamePickRound[]>> {\n\t\tconst params = {\n\t\t\text_game_id: saw_template_id,\n\t\t};\n\n\t\treturn this.sendGamesApi<GamePickRound[]>({ method: 'games-history', params });\n\t}\n\n\tpublic async gpGetGameBoard(saw_template_id: number, round_id: number): Promise<GamesApiResponse<GamePickRoundBoard>> {\n\t\tconst params = {\n\t\t\text_game_id: saw_template_id,\n\t\t\tround_id: round_id,\n\t\t};\n\n\t\treturn this.sendGamesApi<GamePickRoundBoard>({ method: 'game-board', params });\n\t}\n\n\tpublic async gpSubmitSelection(saw_template_id: number, round: any, isQuiz: boolean): Promise<GamesApiResponse<GamePickRound>> {\n\t\tconst method = isQuiz ? 'submit-selection-quiz' : 'submit-selection';\n\t\tconst params = {\n\t\t\text_game_id: saw_template_id,\n\t\t\tround: round,\n\t\t};\n\n\t\treturn this.sendGamesApi<GamePickRound>({ method, params, usePost: true });\n\t}\n\n\tpublic async gpGetUserInfo(saw_template_id: number): Promise<GamesApiResponse<GamePickUserInfo>> {\n\t\tconst params = {\n\t\t\text_game_id: saw_template_id,\n\t\t};\n\n\t\treturn this.sendGamesApi<GamePickUserInfo>({ method: 'user-info', params });\n\t}\n\n\tpublic async gpGetGameInfo(saw_template_id: number): Promise<GamesApiResponse<GamePickGameInfo>> {\n\t\tconst params = {\n\t\t\text_game_id: saw_template_id,\n\t\t};\n\n\t\treturn this.sendGamesApi<GamePickGameInfo>({ method: 'game-info', params });\n\t}\n\n\tpublic async gpGetTranslations(saw_template_id: number): Promise<GamesApiResponse<any>> {\n\t\tconst params = {\n\t\t\text_game_id: saw_template_id,\n\t\t};\n\n\t\treturn this.sendGamesApi<any>({ method: 'translations', params });\n\t}\n\n\tpublic async gpGetRoundInfoForUser(saw_template_id: number, round_id: number, int_user_id: number): Promise<GamesApiResponse<GamePickRound>> {\n\t\tconst params = {\n\t\t\text_game_id: saw_template_id,\n\t\t\tround_id: round_id,\n\t\t\tint_user_id: int_user_id,\n\t\t};\n\n\t\treturn this.sendGamesApi<GamePickRound>({ method: 'game-round-info-for-user', params });\n\t}\n\n\tpublic async avatarsGetList(user_ext_id: string): Promise<GetAvatarsListResponse> {\n\t\tconst message = this.buildMessage<any, GetAvatarsListResponse>(user_ext_id, ClassId.GET_AVATARS_LIST_REQUEST);\n\t\treturn await this.send<GetAvatarsListResponse>(message, ClassId.GET_AVATARS_LIST_RESPONSE);\n\t}\n\n\tpublic async avatarsGetCustomized(user_ext_id: string): Promise<GetAvatarsCustomizedResponse> {\n\t\tconst message = this.buildMessage<any, GetAvatarsCustomizedResponse>(user_ext_id, ClassId.GET_AVATARS_CUSTOMIZED_REQUEST);\n\t\treturn await this.send<GetAvatarsCustomizedResponse>(message, ClassId.GET_AVATARS_CUSTOMIZED_RESPONSE);\n\t}\n\n\tpublic async avatarsGetPrompts(user_ext_id: string): Promise<GetAvatarPromptsResponse> {\n\t\tconst message = this.buildMessage<any, GetAvatarPromptsResponse>(user_ext_id, ClassId.GET_AVATAR_PROMPTS_REQUEST);\n\t\treturn await this.send<GetAvatarPromptsResponse>(message, ClassId.GET_AVATAR_PROMPTS_RESPONSE);\n\t}\n\n\tpublic async avatarSetAvatar(user_ext_id: string, avatar_id: string, avatar_real_id: number): Promise<SetAvatarResponse> {\n\t\tconst message = this.buildMessage<SetAvatarRequest, SetAvatarResponse>(user_ext_id, ClassId.CLIENT_SET_AVATAR_REQUEST, {\n\t\t\tavatar_id,\n\t\t\tavatar_real_id,\n\t\t});\n\t\treturn await this.send<SetAvatarResponse>(message, ClassId.CLIENT_SET_AVATAR_RESPONSE);\n\t}\n\n\tpublic async avatarsGetListT(user_ext_id: string): Promise<TAvatarDefinition[]> {\n\t\treturn avatarDefinitionTransform((await this.avatarsGetList(user_ext_id)).avatars ?? [], this.avatarDomain);\n\t}\n\n\tpublic async avatarsGetCustomizedT(user_ext_id: string): Promise<TAvatarCustomized[]> {\n\t\treturn avatarCustomizedTransform((await this.avatarsGetCustomized(user_ext_id)).avatars ?? [], this.avatarDomain);\n\t}\n\n\tpublic async avatarsGetPromptsT(user_ext_id: string): Promise<TAvatarPrompt[]> {\n\t\treturn avatarPromptTransform((await this.avatarsGetPrompts(user_ext_id)).prompts ?? [], this.avatarDomain);\n\t}\n\n\tpublic getWSCalls(): WSAPI {\n\t\treturn new WSAPI(this);\n\t}\n\n\tpublic async getRelatedItemsForGame(user_ext_id: string, related_game_id: string,): Promise<GetRelatedAchTourResponse> {\n\t\tconst message = this.buildMessage<GetRelatedAchTourRequest, GetRelatedAchTourResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_RELATED_ACH_N_TOURNAMENTS_REQUEST,\n\t\t\t{\n\t\t\t\trelated_game_id: related_game_id\n\t\t\t}\n\t\t);\n\n\t\treturn await this.send<GetRelatedAchTourResponse>(message, ClassId.GET_RELATED_ACH_N_TOURNAMENTS_RESPONSE);\n\t}\n\n\tpublic async getRafflesT(user_ext_id: string): Promise<TRaffle[]> {\n\t\treturn raffleTransform((await this.getRaffles(user_ext_id)).items);\n\t}\n\n\tpublic async getRaffles(user_ext_id: string): Promise<GetRafflesResponse> {\n\t\tconst message = this.buildMessage<GetRafflesRequest, GetRafflesResponse>(user_ext_id, ClassId.RAF_GET_RAFFLES_REQUEST);\n\n\t\treturn await this.send<GetRafflesResponse>(message, ClassId.RAF_GET_RAFFLES_RESPONSE);\n\t}\n\n\tpublic async getRaffleDrawRun(user_ext_id: string, payload: { raffle_id: number; run_id: number; winners_limit?: number; winners_offset?: number }): Promise<GetDrawRunResponse> {\n\t\tconst message = this.buildMessage<GetDrawRunRequest, GetDrawRunResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.RAF_GET_DRAW_RUN_REQUEST,\n\t\t\tpayload,\n\t\t);\n\n\t\treturn await this.send<GetDrawRunResponse>(message, ClassId.RAF_GET_DRAW_RUN_RESPONSE);\n\t}\n\n\tpublic async getRaffleDrawRunT(\n\t\tuser_ext_id: string,\n\t\traffle_id: number,\n\t\trun_id: number,\n\t\twinners_from: number = 0,\n\t\twinners_to: number = 20,\n\t): Promise<TRaffleDraw> {\n\t\tconst winners_limit = winners_to - winners_from > 50 ? 50 : winners_to - winners_from;\n\t\tconst winners_offset = winners_from;\n\n\t\treturn drawRunTransform(await this.getRaffleDrawRun(user_ext_id, { raffle_id, run_id, winners_limit, winners_offset }),);\n\t}\n\n\tpublic async getRaffleDrawRunsHistory(\n\t\tuser_ext_id: string,\n\t\tprops: { raffle_id: number; draw_id?: number },\n\t): Promise<GetRaffleDrawRunsHistoryResponse> {\n\t\tconst message = this.buildMessage<GetRaffleDrawRunsHistoryRequest, GetRaffleDrawRunsHistoryResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.RAF_GET_DRAW_HISTORY_REQUEST,\n\t\t\tprops,\n\t\t);\n\n\t\treturn await this.send<GetRaffleDrawRunsHistoryResponse>(message, ClassId.RAF_GET_DRAW_HISTORY_RESPONSE);\n\t}\n\n\tpublic async claimRafflePrize(user_ext_id: string, props: { won_id: number }): Promise<RaffleClaimPrizeResponse> {\n\t\tconst message = this.buildMessage<RaffleClaimPrizeRequest, RaffleClaimPrizeResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.RAF_CLAIM_PRIZE_REQUEST,\n\t\t\tprops,\n\t\t);\n\n\t\treturn await this.send<RaffleClaimPrizeResponse>(message, ClassId.RAF_CLAIM_PRIZE_RESPONSE);\n\n\t}\n\n\tpublic async raffleOptin(user_ext_id: string, props: { raffle_id: number; draw_id: number; raffle_run_id: number }): Promise<RaffleOptinResponse> {\n\t\tconst message = this.buildMessage<RaffleOptinRequest, RaffleOptinResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.RAF_OPTIN_REQUEST,\n\t\t\tprops,\n\t\t);\n\n\t\treturn await this.send<RaffleOptinResponse>(message, ClassId.RAF_OPTIN_RESPONSE);\n\n\t}\n\n\tpublic async getActivityLog(\n\t\tuser_ext_id: string,\n\t\tstartTimeSeconds: number,\n\t\tendTimeSeconds: number,\n\t\tlimit: number,\n\t\toffset: number,\n\t): Promise<GetActivityLogResponse> {\n\t\tconst message = this.buildMessage<GetActivityLogRequest, GetActivityLogResponse>(\n\t\t\tuser_ext_id,\n\t\t\tClassId.GET_POINT_HISTORY_REQUEST,\n\t\t\t{\n\t\t\t\tstartTimeSeconds: Math.floor(startTimeSeconds),\n\t\t\t\tendTimeSeconds: Math.floor(endTimeSeconds),\n\t\t\t\tlimit,\n\t\t\t\toffset,\n\t\t\t},\n\t\t);\n\n\t\treturn await this.send<GetActivityLogResponse>(message, ClassId.GET_POINT_HISTORY_RESPONSE);\n\t}\n\n\tpublic async getActivityLogT(\n\t\tuser_ext_id: string,\n\t\tstartTimeSeconds: number,\n\t\tendTimeSeconds: number,\n\t\tfrom: number = 0,\n\t\tto: number = 50,\n\t): Promise<TActivityLog[]> {\n\t\tconst limit = to - from > 50 ? 50 : to - from;\n\t\tconst offset = from;\n\n\t\treturn ActivityLogTransform(\n\t\t\t(await this.getActivityLog(user_ext_id, startTimeSeconds, endTimeSeconds, limit, offset)).logHistory,\n\t\t);\n\t}\n}\n\nexport { SmarticoAPI, MessageSender };\n","import { TSMap } from 'typescript-map';\n\nclass CookieStore {\n\tprivate static cookieStore = new TSMap<string, string[]>();\n\n\tpublic static get(key: string): string[] | undefined {\n\t\treturn CookieStore.cookieStore.get(key);\n\t}\n\n\tpublic static set(key: string, value: string[]) {\n\t\tconst v = value.map((v) => v.split(';')[0]);\n\t\tCookieStore.cookieStore.set(key, v);\n\t}\n}\n\nexport { CookieStore };\n","\nexport enum AnalyticsInterfaceType {\n\tMobile = 0,\n\tDesktop = 1,\n}\n\nexport enum AnalyticsScreenNameId {\n\tOverview = 1,\n\tMissions = 2,\n\tLeaderboards = 3,\n\tTournaments = 4,\n\tTournamentLobby = 5,\n\tLevels = 6,\n\tLevelsMap = 7,\n\tBadges = 8,\n\tBonuses = 9,\n\tSpinAWheel = 10,\n\tStore = 11,\n\tStoreHistory = 12,\n\tInbox = 13,\n\tMatchX = 14,\n\tQuiz = 15,\n\tJackpots = 16,\n\tLootbox = 17,\n\tCustomSection = 18,\n\tShortInbox = 19,\n\tLootboxWeekdays = 20,\n\tLootboxCalendarDays = 21,\n\tTreasureHunt = 22,\n\tLiquidSection = 23,\n\tActivityLog = 24,\n\n\tModalMission = 31,\n\tModalLevel = 32,\n\tModalBadge = 33,\n\tModalStore = 34,\n\tModalBonus = 35,\n\tModalJackpot = 36,\n\tModalUsername = 37,\n\tModalAvatar = 38,\n\tModalQR = 39,\n}\n\nexport enum AnalyticsTournamentsLobbySubScreenNameId {\n\tGeneral = 1,\n\tPrizes = 2,\n\tPlayers = 3,\n\tRelatedGames = 4,\n}\n\nexport enum AnalyticsInboxSubScreenNameId {\n\tAll = 1,\n\tFavorite = 2,\n}\n","export enum QuizSportType {\n\tSoccer = 1,\n\tBasketball = 2,\n\tTennis = 5,\n}\n\nexport const quizSupportedSports = [QuizSportType.Basketball, QuizSportType.Soccer, QuizSportType.Tennis];\n","export enum SAWGPMarketType {\n\tTwoTeamsWithScore = 1,\n\tRedCard = 2,\n\tOneXTwo = 3,\n\tOneXTwoHalftime = 4,\n\t// HalftimeFulltime = 5,\n\tFirstGoal = 6,\n\tDoubleChance = 7,\n\tOverUnder2_5 = 8,\n\tOverUnder1_5Halftime = 9,\n\tOverUnder1_5__2ndHalf = 10,\n\tTotalCorners8_5 = 11,\n\tTotalCorners9_5 = 12,\n\tCorners1x2 = 13,\n\tOne_Two = 14,\n\tOvertime = 15,\n\tOddEven = 16,\n\tOddEvenHomeAway = 17,\n\tFirstSet = 18,\n\tSecondSet = 19,\n\tThirdSet = 20,\n\tFourthSet = 21,\n\tFifthSet = 22,\n\tPlayerOneWinsOneSet = 23,\n\tPlayerTwoWinsOneSet = 24,\n\tLastGoal = 25,\n\n\tCustomSport = 26,\n\tCustomNonSport = 27,\n}\n","export enum QuizAnswersValueType {\n\tHomeTeam = '1',\n\tAwayTeam = '2',\n\tDraw = 'x',\n\tHomeTeamHomeTeam = '1/1',\n\tHomeTeamDraw = '1/x',\n\tHomeTeamAwayTeam = '1/2',\n\tDrawHomeTeam = 'x/1',\n\tDrawDraw = 'x/x',\n\tDrawAwayTeam = 'x/2',\n\tAwayTeamHomeTeam = '2/1',\n\tAwayTeamDraw = '2/x',\n\tAwayTeamAwayTeam = '2/2',\n\tYes = 'yes',\n\tNo = 'no',\n\tOdd = 'odd',\n\tEven = 'even',\n\tHomeOdd = '1/odd',\n\tHomeEven = '1/even',\n\tAwayOdd = '2/odd',\n\tAwayEven = '2/even',\n}\n\nexport const quizAnswerHomeTeamReplacementText = '{quiz_home_team}';\nexport const quizAnswerAwayTeamReplacementText = '{quiz_away_team}';\nexport const quizDrawReplacementText = '{quiz_draw}';\nexport const quizYesReplacementText = '{yes}';\nexport const quizNoReplacementText = '{no}';\nexport const quizOddReplacementText = '{odd}';\nexport const quizEvenReplacementText = '{even}';\nexport const quizOrReplacementText = '{or}';\nexport const quizNoGoalsReplacementText = '{quiz_no_goals}';\n\nexport const quizAnswersTrKeys = {\n\t[quizDrawReplacementText]: 'quizAnswer_draw',\n\t[quizYesReplacementText]: 'quizAnswer_yes',\n\t[quizNoReplacementText]: 'quizAnswer_no',\n\t[quizOddReplacementText]: 'quizAnswer_odd',\n\t[quizEvenReplacementText]: 'quizAnswer_even',\n\t[quizOrReplacementText]: 'quizAnswer_or',\n\t[quizNoGoalsReplacementText]: 'quizAnswer_no_goals',\n};\n","import {\n\tQuizAnswersValueType,\n\tquizAnswerAwayTeamReplacementText,\n\tquizAnswerHomeTeamReplacementText,\n\tquizDrawReplacementText,\n\tquizEvenReplacementText,\n\tquizNoGoalsReplacementText,\n\tquizNoReplacementText,\n\tquizOddReplacementText,\n\tquizOrReplacementText,\n\tquizYesReplacementText,\n} from './MarketsAnswers';\nimport { SAWGPMarketType } from './MarketsType';\n\nconst yesNoAnswers = [\n\t{ text: quizYesReplacementText, value: QuizAnswersValueType.Yes },\n\t{ text: quizNoReplacementText, value: QuizAnswersValueType.No },\n];\n\nconst homeAwayAnswers = [\n\t{ text: quizAnswerHomeTeamReplacementText, value: QuizAnswersValueType.HomeTeam },\n\t{ text: quizAnswerAwayTeamReplacementText, value: QuizAnswersValueType.AwayTeam },\n];\n\nconst homeAwayDrawAnswers = [...homeAwayAnswers, { text: quizDrawReplacementText, value: QuizAnswersValueType.Draw }];\nconst homeAwayNoGoalsAnswers = [...homeAwayAnswers, { text: quizNoGoalsReplacementText, value: QuizAnswersValueType.Draw }];\n\nexport const marketsInfo = [\n\t{\n\t\ttype: SAWGPMarketType.OneXTwo,\n\t\tname: '1x2',\n\t\tquestion: { text: 'Who will win the match ?', trKey: 'quizQuestion_1x2' },\n\t\tanswers: homeAwayDrawAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.OneXTwoHalftime,\n\t\tname: '1x2 Halftime',\n\t\tquestion: { text: 'Who will lead the first half of the match ?', trKey: 'quizQuestion_x2half' },\n\t\tanswers: homeAwayDrawAnswers,\n\t},\n\t// {\n\t// \ttype: SAWGPMarketType.HalftimeFulltime,\n\t// \tname: 'Halftime / Fulltime',\n\t// \tquestion: { text: 'Who will lead the first half and who will win the match ?', trKey: 'quizQuestion__HalftimeFulltime' },\n\t// \tanswers: [\n\t// \t\t{\n\t// \t\t\ttext: `${quizAnswerHomeTeamReplacementText} / ${quizAnswerHomeTeamReplacementText}`,\n\t// \t\t\tvalue: QuizAnswersValueType.HomeTeamHomeTeam,\n\t// \t\t},\n\t// \t\t{\n\t// \t\t\ttext: `${quizAnswerHomeTeamReplacementText} / ${quizDrawReplacementText}`,\n\t// \t\t\tvalue: QuizAnswersValueType.HomeTeamDraw,\n\t// \t\t},\n\t// \t\t{\n\t// \t\t\ttext: `${quizAnswerHomeTeamReplacementText} / ${quizAnswerAwayTeamReplacementText}`,\n\t// \t\t\tvalue: QuizAnswersValueType.HomeTeamAwayTeam,\n\t// \t\t},\n\t// \t\t{\n\t// \t\t\ttext: `${quizDrawReplacementText} / ${quizAnswerHomeTeamReplacementText}`,\n\t// \t\t\tvalue: QuizAnswersValueType.DrawHomeTeam,\n\t// \t\t},\n\t// \t\t{ text: `${quizDrawReplacementText} / ${quizDrawReplacementText}`, value: QuizAnswersValueType.DrawDraw },\n\t// \t\t{\n\t// \t\t\ttext: `${quizDrawReplacementText} / ${quizAnswerAwayTeamReplacementText}`,\n\t// \t\t\tvalue: QuizAnswersValueType.DrawAwayTeam,\n\t// \t\t},\n\t// \t\t{\n\t// \t\t\ttext: `${quizAnswerAwayTeamReplacementText} / ${quizAnswerHomeTeamReplacementText}`,\n\t// \t\t\tvalue: QuizAnswersValueType.AwayTeamHomeTeam,\n\t// \t\t},\n\t// \t\t{\n\t// \t\t\ttext: `${quizAnswerAwayTeamReplacementText} / ${quizDrawReplacementText}`,\n\t// \t\t\tvalue: QuizAnswersValueType.AwayTeamDraw,\n\t// \t\t},\n\t// \t\t{\n\t// \t\t\ttext: `${quizAnswerAwayTeamReplacementText} / ${quizAnswerAwayTeamReplacementText}`,\n\t// \t\t\tvalue: QuizAnswersValueType.AwayTeamAwayTeam,\n\t// \t\t},\n\t// \t],\n\t// },\n\t{\n\t\ttype: SAWGPMarketType.FirstGoal,\n\t\tname: 'First Goal',\n\t\tquestion: { text: 'Who will score the first goal ?', trKey: 'quizQuestion_firstGoal' },\n\t\tanswers: homeAwayNoGoalsAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.LastGoal,\n\t\tname: 'Last Goal',\n\t\tquestion: { text: 'Who will score the last goal ?', trKey: 'quizQuestion_lastGoal' },\n\t\tanswers: homeAwayNoGoalsAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.DoubleChance,\n\t\tname: 'Double Chance',\n\t\tquestion: { text: 'Who will win the match? Choose a combination:', trKey: 'quizQuestion_doubleChance' },\n\t\tanswers: [\n\t\t\t{\n\t\t\t\ttext: `${quizDrawReplacementText} ${quizOrReplacementText} ${quizAnswerHomeTeamReplacementText}`,\n\t\t\t\tvalue: QuizAnswersValueType.HomeTeamDraw,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttext: `${quizAnswerHomeTeamReplacementText} ${quizOrReplacementText} ${quizAnswerAwayTeamReplacementText}`,\n\t\t\t\tvalue: QuizAnswersValueType.HomeTeamAwayTeam,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttext: `${quizDrawReplacementText} ${quizOrReplacementText} ${quizAnswerAwayTeamReplacementText}`,\n\t\t\t\tvalue: QuizAnswersValueType.AwayTeamDraw,\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\ttype: SAWGPMarketType.OverUnder2_5,\n\t\tname: 'Over/Under 2.5',\n\t\tquestion: { text: 'Will there be 3 or more goals in the match?', trKey: 'quizQuestion_overUnder2_5' },\n\t\tanswers: yesNoAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.OverUnder1_5Halftime,\n\t\tname: 'Over/Under 1.5 Halftime',\n\t\tquestion: { text: 'Will there be 2 or more goals in the first half?', trKey: 'quizQuestion_overUnder1_5Halftime' },\n\t\tanswers: yesNoAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.OverUnder1_5__2ndHalf,\n\t\tname: 'Over/Under 1.5 2nd Half',\n\t\tquestion: { text: 'Will there be 2 or more goals in the second half?', trKey: 'quizQuestion_overUnder1_5__2ndHalf' },\n\t\tanswers: yesNoAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.RedCard,\n\t\tname: 'Red Card',\n\t\tquestion: { text: 'Will there be a red card in the match?', trKey: 'quizQuestion_redCard' },\n\t\tanswers: yesNoAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.TotalCorners8_5,\n\t\tname: 'Total Corners 8.5',\n\t\tquestion: { text: 'Will there be 9 or more corners in the match?', trKey: 'quizQuestion_totalCorners8_5' },\n\t\tanswers: yesNoAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.TotalCorners9_5,\n\t\tname: 'Total Corners 9.5',\n\t\tquestion: { text: 'Will there be 10 or more corners in the match?', trKey: 'quizQuestion_totalCorners9_5' },\n\t\tanswers: yesNoAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.Corners1x2,\n\t\tname: 'Corners 1x2',\n\t\tquestion: { text: 'Which team will have more corners in the match?', trKey: 'quizQuestion_corners1x2' },\n\t\tanswers: homeAwayDrawAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.One_Two,\n\t\tname: '1-2',\n\t\tquestion: { text: 'Who will win the match ?', trKey: 'quizQuestion_1-2' },\n\t\tanswers: homeAwayAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.Overtime,\n\t\tname: 'Overtime',\n\t\tquestion: { text: 'Will there be overtime in the match?', trKey: 'quizQuestion_overtime' },\n\t\tanswers: yesNoAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.OddEven,\n\t\tname: 'Odd/Even',\n\t\tquestion: {\n\t\t\ttext: 'Is the sum of all points scored in the game going to be an odd number or even?',\n\t\t\ttrKey: 'quizQuestion_oddEven',\n\t\t},\n\t\tanswers: [\n\t\t\t{ text: quizOddReplacementText, value: QuizAnswersValueType.Odd },\n\t\t\t{ text: quizEvenReplacementText, value: QuizAnswersValueType.Even },\n\t\t],\n\t},\n\t{\n\t\ttype: SAWGPMarketType.OddEvenHomeAway,\n\t\tname: 'Odd/Even Home/Away',\n\t\tquestion: {\n\t\t\ttext: 'Which team will win and what will be the sum of the points (Odd or Even)?',\n\t\t\ttrKey: 'quizQuestion_oddEvenHomeAway',\n\t\t},\n\t\tanswers: [\n\t\t\t{ text: `${quizAnswerHomeTeamReplacementText} - ${quizOddReplacementText}`, value: QuizAnswersValueType.HomeOdd },\n\t\t\t{ text: `${quizAnswerHomeTeamReplacementText} - ${quizEvenReplacementText}`, value: QuizAnswersValueType.HomeEven },\n\t\t\t{ text: `${quizAnswerAwayTeamReplacementText} - ${quizOddReplacementText}`, value: QuizAnswersValueType.AwayOdd },\n\t\t\t{ text: `${quizAnswerAwayTeamReplacementText} - ${quizEvenReplacementText}`, value: QuizAnswersValueType.AwayEven },\n\t\t],\n\t},\n\t{\n\t\ttype: SAWGPMarketType.FirstSet,\n\t\tname: 'First Set',\n\t\tquestion: { text: 'Who will win the first set ?', trKey: 'quizQuestion_firstSet' },\n\t\tanswers: homeAwayAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.SecondSet,\n\t\tname: 'Second Set',\n\t\tquestion: { text: 'Who will win the second set ?', trKey: 'quizQuestion_secondSet' },\n\t\tanswers: homeAwayAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.ThirdSet,\n\t\tname: 'Third Set',\n\t\tquestion: { text: 'Who will win the third set ?', trKey: 'quizQuestion_thirdSet' },\n\t\tanswers: homeAwayAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.FourthSet,\n\t\tname: 'Fourth Set',\n\t\tquestion: { text: 'Who will win the fourth set ?', trKey: 'quizQuestion_fourthSet' },\n\t\tanswers: homeAwayAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.FifthSet,\n\t\tname: 'Fifth Set',\n\t\tquestion: { text: 'Who will win the fifth set ?', trKey: 'quizQuestion_fifthSet' },\n\t\tanswers: homeAwayAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.PlayerOneWinsOneSet,\n\t\tname: 'Player One Wins One Set',\n\t\tquestion: { text: 'Will Player One win at least one set?', trKey: 'quizQuestion_playerOneWinsOneSet' },\n\t\tanswers: yesNoAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.PlayerTwoWinsOneSet,\n\t\tname: 'Player Two Wins One Set',\n\t\tquestion: { text: 'Will Player Two win at least one set?', trKey: 'quizQuestion_playerTwoWinsOneSet' },\n\t\tanswers: yesNoAnswers,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.CustomNonSport,\n\t\tname: 'Custom question (non sport)',\n\t\tquestion: null,\n\t\tanswers: null,\n\t},\n\t{\n\t\ttype: SAWGPMarketType.CustomSport,\n\t\tname: 'Custom question (sport)',\n\t\tquestion: null,\n\t\tanswers: null,\n\t},\n];\n","import { SAWGPMarketType } from './MarketsType';\nimport { QuizSportType } from './SportTypes';\n\nexport const QuizMarketPerSport = {\n\t[QuizSportType.Basketball]: [\n\t\tSAWGPMarketType.One_Two,\n\t\tSAWGPMarketType.Overtime,\n\t\tSAWGPMarketType.OneXTwo,\n\t\tSAWGPMarketType.OddEven,\n\t\tSAWGPMarketType.OddEvenHomeAway,\n\t\tSAWGPMarketType.DoubleChance,\n\t],\n\t[QuizSportType.Soccer]: [\n\t\tSAWGPMarketType.OneXTwo,\n\t\tSAWGPMarketType.OneXTwoHalftime,\n\t\t// SAWGPMarketType.HalftimeFulltime,\n\t\tSAWGPMarketType.FirstGoal,\n\t\tSAWGPMarketType.LastGoal,\n\t\tSAWGPMarketType.DoubleChance,\n\t\tSAWGPMarketType.OverUnder2_5,\n\t\tSAWGPMarketType.OverUnder1_5Halftime,\n\t\tSAWGPMarketType.OverUnder1_5__2ndHalf,\n\t\tSAWGPMarketType.RedCard,\n\t\tSAWGPMarketType.TotalCorners8_5,\n\t\tSAWGPMarketType.TotalCorners9_5,\n\t\tSAWGPMarketType.Corners1x2,\n\t],\n\t[QuizSportType.Tennis]: [\n\t\tSAWGPMarketType.One_Two,\n\t\tSAWGPMarketType.FirstSet,\n\t\tSAWGPMarketType.SecondSet,\n\t\tSAWGPMarketType.ThirdSet,\n\t\tSAWGPMarketType.FourthSet,\n\t\tSAWGPMarketType.FifthSet,\n\t\tSAWGPMarketType.PlayerOneWinsOneSet,\n\t\tSAWGPMarketType.PlayerTwoWinsOneSet,\n\t\tSAWGPMarketType.OddEven,\n\t],\n};\n","enum JackpotContributionType {\n\tFixed = 1,\n\tPercentage = 2,\n}\n\nexport { JackpotContributionType };\n","enum JackPotTemparature {\n\t/** cold, seed amount < current pot < (min amount - seed amount)/2 */\n\tCOLD = 0,\n\t/** warm, (min amount - seed amount)/2 < current pot < min amount */\n\tWARM = 1,\n\t/** hot, current pot > min amount, entered explosion range */\n\tHOT = 2,\n\t/** burning, current pot > min amount + 0.5 * (max amount - min amount). E.g. mid of allowed explosion range */\n\tBURNING = 3,\n}\n\ninterface JackpotPot {\n\t/** ID of the jackpot template */\n\tjp_template_id: number;\n\t/** ID of the jackpot pot */\n\tjp_pot_id: number;\n\t/** currency of the jackpot pot in the Jackput base currency */\n\tcurrent_pot_amount: number;\n\t/** currency of the jackpot pot in the user wallet currency */\n\tcurrent_pot_amount_user_currency: number;\n\t/** the date/time when this pot exploded */\n\texplode_date_ts: number;\n\t/** current pot temperature */\n\tcurrent_pot_temperature: JackPotTemparature;\n}\n\nexport { JackpotPot, JackPotTemparature };\n","enum JackpotType {\n\tMultiUser = 1,\n\tPersonal = 2,\n}\n\nexport { JackpotType };\n","export enum AvatarCustomizeErrorCode {\n\tAVATAR_USER_LIMIT = 12001,\n\tAVATAR_LABEL_LIMIT = 12002,\n}\n\nexport const AvatarCustomizeErrorMessage: Record<AvatarCustomizeErrorCode, string> = {\n\t[AvatarCustomizeErrorCode.AVATAR_USER_LIMIT]: 'You have exceeded number of custom avatars creation, please try later',\n\t[AvatarCustomizeErrorCode.AVATAR_LABEL_LIMIT]: 'The custom avatars are not available, please try again later',\n};\n","/*\n * Possible error codes returned in JOIN_CLAN_RESPONSE.errCode (cid: 575).\n * Clan-protocol-specific numeric codes defined in the handler spec.\n */\nexport enum JoinClanErrorCode {\n\t/** No error, join completed */\n\tJOIN_CLAN_OK = 0,\n\t/** Invalid parameters */\n\tJOIN_CLAN_INVALID_PARAMETERS = 1000,\n\t/** clan_id doesn't exist for this label */\n\tJOIN_CLAN_NOT_FOUND = 1001,\n\t/** members_count >= capacity_limit */\n\tJOIN_CLAN_FULL = 1002,\n\t/** Not enough Points / Gems / Diamonds for entry fee */\n\tJOIN_CLAN_INSUFFICIENT_FUNDS = 1003,\n\t/** User doesn't satisfy entry_conditions / entry_segment_id */\n\tJOIN_CLAN_SEGMENT_MISMATCH = 1004,\n\t/** User is not in a clan */\n\tJOIN_CLAN_USER_IS_NOT_IN_CLAN = 1005,\n\t/** User is within the CLAN_COOLDOWN_DAYS window */\n\tJOIN_CLAN_COOLDOWN_ACTIVE = 1006,\n\t/** clan_status_id != 1 (clan is archived) */\n\tJOIN_CLAN_ARCHIVED = 1007,\n\t/** Clan joined after tournament start */\n\tJOIN_CLAN_JOINED_AFTER_TOURNAMENT_START = 1011,\n}\n"],"names":["ClassId","IntUtils","uuid","a","b","Math","random","toString","isNotNull","val","isNotEmpty","length","replaceAll","value","regex","replacement","replace","RegExp","escapeRegExp","v","JsonOrText","str","includes","JSON","parse","e","isWithinPeriod","timestamp","period","now","Date","completedDate","getFullYear","getMonth","getDate","startOfWeek","setDate","getDay","setHours","endOfWeek","SAWBuyInType","SAWBuyInTypeName","SAWBuyInTypeNamed","type","Free","Points","Spins","Gems","Diamonds","Unknown","SAWUtils","canPlay","t","user_balances","undefined","saw_buyin_type_id","spin_count","balance","ach_points_balance","ach_gems_balance","ach_diamonds_balance","buyin_cost_points","console","error","SAWAcknowledgeType","SAWAcknowledgeTypeName","SAWAcknowledgeTypeNamed","Silent","QuickMessage","FullMessage","ExplicityAcknowledge","SAWAskForUsername","SAWGameType","SAWGameTypeName","SAWGameTypeNamed","SpinAWheel","ScratchCard","MatchX","GiftBox","PrizeDrop","Quiz","LootboxWeekdays","LootboxCalendarDays","TreasureHunt","Voyager","Plinko","CoinFlip","SAWExposeUserSpinId","SAWExposeUserSpinIdName","SAWExposeUserSpinIdNamed","id","UserId","SpinId","SAWGameLayout","SAWGameLayoutName","SAWGameLayoutNamed","layout","Horizontal","VerticalMap","SAWPrizeType","MiniGamePrizeTypeName","MiniGamePrizeTypeNamed","NO_PRIZE","POINTS","BONUS","MANUAL","SPIN","JACKPOT","CHANGE_LEVEL","MISSION","RAFFLE_TICKET","GEMS_AND_DIAMONDS","UNKNOWN","SAWTemplatesTransform","items","map","r","_r$saw_skin_ui_defini","x","_extends","saw_template_id","name","saw_template_ui_definition","description","thumbnail","saw_skin_ui_definition","skin_folder","saw_skin_key","visibile_when_can_spin","over_limit_message","no_attempts_message","jackpot_symbol","saw_game_type","saw_game_type_id","saw_buyin_type","buyin_cost_gems","buyin_cost_diamonds","jackpot_add_on_attempt","jackpot_current","promo_image","promo_text","custom_data","expose_game_stat_on_api","relative_period_timezone","activeFromDate","activeTillDate","next_available_spin_ts","steps_to_finish_game","custom_section_id","game_layout","show_prize_history","max_number_of_attempts","maxSpinsCount","max_spins_period_ms","maxSpinsPediodMs","expose_user_spin_id","prizes","p","_p$saw_prize_ui_defin","y","saw_prize_id","saw_prize_ui_definition","prize_type","prize_type_id","prize_value","font_size","font_size_mobile","icon","position","sectors","acknowledge_type","aknowledge_message","acknowledge_dp","acknowledge_action_title","acknowledge_dp_additional","acknowledge_action_title_additional","out_of_stock_message","pool","pool_initial","wins_count","weekdays","active_from_ts","active_till_ts","is_surcharge","is_deleted","prize_modifiers","allow_split_decimal","hide_prize_from_history","requirements_to_get_prize","max_give_period_type_id","SAWSpinErrorCode","SAWWinSoundType","SAWWinSoundFiles","NoSound","Disappointing","Positive","HighlyPositive","SAWHistoryTransform","template","prize_amount","client_request_id","is_claimed","create_date_ts","acknowledge_date_ts","PrizeModifiers","PrizeModifiersKeysNames","SAWWheelLayout","SAWGameDifficultyType","SAWGameDifficultyTypeName","SawGameDifficultyTypeNamed","EASY","MEDIUM","HARD","AttemptPeriodType","NodeCache","constructor","ttlChecker","cache","setInterval","getTime","key","hasOwnProperty","o","ttl","get","set","ttlSeconds","remove","flushAll","clearInterval","ECacheContext","OCache","init","cacheContext","oKey","stringify","deepClone","use","f","clear","clearContext","clearAll","ActivityTypeLimited","CoreUtils","currencySymbol","currency","toUpperCase","USD","EUR","JPY","GBP","AUD","CAD","CHF","CNY","SEK","NZD","MXN","SGD","HKD","NOK","KRW","TRY","INR","RUB","BRL","ZAR","avatarUrl","avatar_id","avatarDomain","startsWith","endsWith","slice","PublicLabelSettings","TranslationArea","InboxMessagesTransform","item","sent_date","createDate","message_guid","engagement_uid","read","is_read","favorite","is_starred","category_id","expire_on_dt","InboxMessageBodyTransform","action","image","title","preview_body","body","additional_buttons","buttons","text","inbox_cta_text","html_body","InboxMessageType","OpenLinksType","InboxCategories","InboxReadStatus","BuyStoreItemErrorCode","StoreCategoryTransform","_r$publicMeta","_r$publicMeta2","publicMeta","order","StoreItemPurchaseType","StoreItemType","StoreItemTypeName","StoreItemTypeNamed","Bonus","Tangible","MiniGameSpin","ChangeLevel","RaffleTicket","mapPurchaseType","purchaseType","StoreItemTransform","filter","_r$itemPublicMeta$pri","_r$categoryIds","_r$relatedGames","itemPublicMeta","purchase_type","price","image_url","ribbon","label_tag","custom_label_tag","limit_message","purchase_limit_message","priority","related_item_ids","related_items","hint_text","itemTypeId","can_buy","canBuy","category_ids","categoryIds","shopPool","active_till_date","show_timer","discounted_price","discount_prize","discount_price_ribbon","discount_prize_ribbon","custom_ribbon_image","only_in_custom_section","custom_section_type_id","cant_buy_message","related_games","relatedGames","g","game_public_meta","enabled","i","ext_game_id","link","game_categories","game_provider","mobile_spec_link","StoreItemPurchasedTransform","purchasedToday","purchase_ts","purchasedThisWeek","purchasedThisMonth","purchase_points_amount","purchased_today","purchased_this_week","purchased_this_month","AchievementStatus","AchievementTaskType","AchievementType","AchievementAvailabilityStatus","BadgesTimeLimitStates","USER_STATE_PARAMS_KEYS_GAMES","USER_STATE_PARAMS_KEYS_BET_AMOUNT","MINOR_WORDS","Set","toGameTitleCase","raw","tokens","toLowerCase","split","wordTokens","test","lastWordIdx","wordIndex","token","isFirst","isLast","has","charAt","join","MissionUtils","getAvailabilityStatus","mission","activeFrom","getMs","activeTill","startDate","start_date_ts","timeLimit","time_limit_ms","requiresOptIn","requiresOptin","optedIn","isOptedIn","isLockedMission","ach_status_id","AvailableLocked","isLocked","AvailableActive","AvailableInactive","Available","UnavailableWithActiveFrom","AvailableWithActiveTillActive","AvailableWithActiveTillInactive","AvailableWithActiveTill","MissedByActiveTill","endDate","AvailableLimitedActive","MissedByLimitInTime","AvailableLimitedInactive","AvailableLimited","AvailableFullyLimitedActive","AvailableFullyLimitedInactive","AvailableFullyLimited","ts","replaceTagsFavMissionTask","task","valueToReplace","_task$task_public_met","result","userStateParams","user_state_params","userStateOperator","task_public_meta","user_state_operations","userStateParamsKeys","Object","keys","operatorsMulti","operatorsPos","suggestedGames","suggestedValue","forEach","k","_userStateOperator$k","operator","op","_userStateParams$k","Boolean","cleaned","pos","Number","currencyFromTheTask","core_wallet_currency","replaceFavGameNameTag","determineBadgeState","badge","progress","isCompleted","complete_date_ts","BeforeStartDate","AfterStartDateNoProgress","AfterStartDateNoProgressAndEndDate","AfterStartDateWithProgressAndEndDate","AfterEndDateNotStarted","AfterEndDateWithProgress","enrichUserAchievementsWithBadgeState","ach_type_id","Badge","badgeTimeLimitState","UserAchievementTransform","ach_id","_missionName","_missionSubHeader","_missionDescription","_r$ach_categories","completedToday","completedThisWeek","completedThisMonth","missionName","ach_public_meta","missionSubHeader","sub_header","missionDescription","achievementTasks","_r$ach_public_meta$na","_r$ach_public_meta$su","_r$ach_public_meta$de","unlock_mission_description","is_completed","is_locked","is_requires_optin","is_opted_in","dt_start","reward","Mission","cta_action","cta_text","tasks","task_type_id","CompleteAchievement","_t$task_public_meta","task_id","points_reward","userProgress","execution_count_expected","executionCount","execution_count_actual","userExecutedCount","display_progress_as_count","stage_image","ach_categories","ach_completed_id","requires_prize_claim","prize_claimed_date_ts","complete_date","completed_today","completed_this_week","completed_this_month","availability_status","claim_button_title","claim_button_action","hide_locked_mission","prize_claim_expiration_date","prize_claim_period_type_id","Recurring","next_recurrence_date_ts","milliseconds_till_available","RecurringUponCompletion","completion_count","completed_count","max_completion_count","recurring_quantity","ScheduledMissionType","AchCategoryTransform","MissionCategory","AchievementClaimPeriodTypeId","clanTournamentPlayersTransform","response","clan_id","clan_public_meta","players","user_id","userId","clean_ext_user_id","cleanExtUserId","public_username","userAltName","avatar_real_id","avatar_url","scores","is_me","isMe","TournamentRegistrationType","TournamentRegistrationTypeGetName","AUTO","BUY_IN_POINTS","MANUAL_APPROVAL","OPT_IN","REQUIRES_QUALIFICATION","BUY_IN_GEMS","BUY_IN_DIAMONDS","TournamentRegistrationStatus","TournamentRegistrationStatusName","TournamentRegistrationStatusNamed","CANCELLED","FINISHED","NOT_REGISTERED","PENDING","QUALIFIED_PENDING_REGISTRATION","REGISTERED","REGISTERED_PENDING_QUALIFICATION","TournamentInstanceStatus","TournamentInstanceStatusName","s","PUBLISHED","REGISTER","STARTED","FAILED","FINALIZING","tournamentPrizeTypeToPrizeName","DoNothing","DeductPoints","ResetPoints","MiniGameAttempt","AddGemsAndDiamonds","DeductGemsAndDiamonds","ResetGemsAndDiamonds","TournamentUtils","isCanRegister","tournament","tournamentRegistrationStatus","isUserRegistered","playersMaxCount","registrationCount","registrationType","tournamentInstanceStatus","allowLateRegistration","isInProgress","isActive","isFinished","isCancelled","isUpcoming","getPlayerTransformed","player","playerTransformed","user_ext_id","crm_brand_id","crmBrandId","getPrizeTransformed","prize","TournamentItemsTransform","tournamentId","instance_id","tournamentInstanceId","tournament_id","segment_dont_match_message","image1","image2","image_url2","image2_mobile","image_url2_mobile","prize_pool_short","custom_price_text","is_featured","featured","start_time","startTimeTs","end_time","endTimeTs","registration_count","is_user_registered","players_min_count","playersMinCount","players_max_count","registration_status","registration_type","registration_cost_points","buyInAmount","registration_cost_gems","registration_cost_diamonds","duration_ms","durationMs","is_active","is_can_register","is_cancelled","is_finished","is_in_progress","is_upcoming","min_scores_win","minScoreToWin","hide_leaderboard_min_scores","hideLeaderboardsMinScores","total_scores","totalScores","is_clan_based","isClanBased","prizeStructure","tournamentPlayer","me","tournamentInfoItemTransform","_TournamentItemsTrans","_t$tournamentInfo$tou","_t$tournamentInfo","_t$tournamentInfo2","tournamentInfo","tournamentLobbyInfo","userPosition","_t$userClanId","user_clan_id","userClanId","clan_leaderboard","clanLeaderboard","entry","clanId","public_meta","rank","total_score","totalScore","contributing_members","memberCount","clan_prize_structure","clanPrizes","clan_place","prize_pool_amount","prize_pool_currency_code","activity_type_id","details_json","prize_name","tiers","player_tiers","tier","player_place_from","player_place_to","pool_amount","distribution_type","TournamentRegistrationError","TournamentType","LeaderBoardPeriodType","pointsRewardTransform","reward_points","place","points","getLeaderBoardPlayerTransformed","user","user_alt_name","position_in_board","points_accumulated","getLeaderBoardTransform","board","board_id","board_public_meta","rules","period_type_id","rewards","users","positions","GetLevelMapResponseTransform","levels","mapped","l","_l$level_public_meta","level_id","level_public_meta","required_points","visibility_points","parseInt","required_level_counter_1","required_level_counter_2","ordinal_position","ordinalById","Map","sort","index","CACHE_DATA_SEC","JACKPOT_TEMPLATE_CACHE_SEC","JACKPOT_POT_CACHE_SEC","JACKPOT_WINNERS_CACHE_SEC","JACKPOT_ELIGIBLE_GAMES_CACHE_SEC","onUpdateContextKey","WSAPIBase","api","userExtId","onUpdateCallback","clearCaches","updateEntity","contextKey","payload","WSAPI","onUpdate","ticketsTransform","ticekt_id","ticket_id_string","winnersTransform","username","ticket","raf_won_id","claimed_date","prizeTransform","prize_id","prizes_per_run","prizes_per_run_actual","chances_to_win_perc","min_required_total_tickets","cap_prizes_per_run","stock_items_per_draw","should_claim","winners","requires_claim","min_required_tickets_for_user","drawTransform","draw_id","image_url_mobile","icon_url","background_image_url","background_image_url_mobile","is_grand","current_state","run_id","execution_type","execution_ts","previous_run_ts","previous_run_id","ticket_start_ts","allow_multi_prize_per_ticket","total_tickets_count","my_tickets_count","my_last_tickets","user_opted_in","requires_optin","winners_limit","winners_offset","winners_total","raffleTransform","raffle_id","start_date","end_date","end_date_ts","max_tickets_count","current_tickets_count","draws","ticket_cap_visualization","drawRunTransform","res","_res$draw$ticket_star","draw","RaffleTicketCapVisualization","RaffleDrawInstanceState","RaffleDrawTypeExecution","drawRunHistoryTransform","draw_runs","actual_execution_ts","is_winner","has_unclaimed_prize","raffleClaimPrizeResponseTransform","info","errorCode","errCode","errorMessage","errMsg","WSAPIUser","getUserProfile","tracker","assign","userPublicProps","Error","checkSegmentMatch","segment_id","coreCheckSegments","find","is_matching","checkSegmentListMatch","segment_ids","Array","isArray","getLevels","Levels","levelsGetT","getCurrentLevel","CurrentLevel","getLevelCurrent","getUserLevelExtraCounters","LevelExtraCounters","getUserGamificationInfoT","getActivityLog","startTimeSeconds","endTimeSeconds","from","to","ActivityLog","getActivityLogT","notifyActivityLogUpdate","startSeconds","endSeconds","WSAPIGeneral","getCustomSections","CustomSections","customSectionsGetT","getTranslations","lang_code","getTranslationsT","translations","getRelatedItemsForGame","related_game_id","WSAPIMissions","getMissions","Missions","missionsGetItemsT","getBadges","Badges","badgetsGetItemsT","getAchCategories","AchCategories","achGetCategoriesT","requestMissionOptIn","mission_id","missionOptIn","err_code","err_message","requestMissionClaimReward","missionClaimPrize","updateMissions","WSAPIBonuses","getBonuses","Bonuses","bonusesGetItemsT","claimBonus","bonus_id","bonusClaimItem","success","updateBonuses","WSAPIStore","args","storeHistoryOnUpdateParams","limit","offset","storeHistoryCacheKey","StoreHistory","getStoreItems","StoreItems","storeGetItemsT","buyStoreItem","item_id","getStoreCategories","StoreCategories","storeGetCategoriesT","getStorePurchasedItems","requestLimit","requestOffset","cacheKey","storeGetPurchasedItemsT","updateStorePurchasedItems","updateStoreItems","WSAPITournaments","getTournamentsList","TournamentList","tournamentsGetLobbyT","getTournamentInstanceInfo","tournamentsGetInfoT","getClanTournamentPlayers","clanTournamentGetPlayers","registerInTournament","updateTournaments","WSAPIClans","getClans","Clans","clansGetListT","getClanInfo","clansGetInfoT","joinClan","clanJoin","updateClans","WSAPIJackpots","jackpotGetSignature","jackpotClearCache","Jackpots","Pots","JackpotWinners","jackpotGet","_this","signature","jp_template_id","jackpots","pots","_jackpots","_pots","jp","pot","jp_public_meta","jp_template_ids","potGet","_jp","jackpotOptIn","jackpotOptOut","getJackpotWinners","getJackpotWinnersT","getJackpotEligibleGames","JackpotEligibleGames","getJackpotEligibleGamesT","WSAPIRaffles","updateRaffles","getRafflesT","Raffles","getRaffles","getRaffleDrawRun","props","getRaffleDrawRunT","winners_from","winners_to","getRaffleDrawRunsHistory","claimRafflePrize","won_id","requestRaffleOptin","raffle_run_id","raffleOptin","WSAPIMiniGames","getMiniGames","Saw","sawGetTemplatesT","getMiniGamesHistory","SAWHistory","getSawWinningHistoryT","playMiniGame","template_id","sawSpinRequest","doAcknowledgeRequest","request_id","miniGameWinAcknowledgeRequest","playMiniGameBatch","sawSpinBatchRequest","request_ids","results","doAcknowledgeBatchRequest","errMessage","jackpot_amount","first_spin_in_period","updateOnSpin","data","templates","findIndex","reloadMiniGameTemplate","updatedTemplates","WSAPIAvatars","getAvatarsList","AvatarsList","avatarsGetListT","getAvatarsCustomized","AvatarsCustomized","avatarsGetCustomizedT","getAvatarPrompts","AvatarPrompts","avatarsGetPromptsT","setAvatar","_r$errCode","avatarSetAvatar","WSAPIGamePick","gamePickGetActiveRounds","gpGetActiveRounds","gamePickGetActiveRound","round_id","gpGetActiveRound","gamePickGetHistory","gpGetGamesHistory","gamePickGetBoard","gpGetGameBoard","gamePickSubmitSelection","_props$round","round","gpSubmitSelection","gamePickSubmitSelectionQuiz","_props$round2","gamePickGetUserInfo","gpGetUserInfo","gamePickGetGameInfo","gpGetGameInfo","gamePickGetRoundInfoForUser","int_user_id","gpGetRoundInfoForUser","WSAPILeaderBoard","getLeaderBoard","periodType","getPreviousPeriod","LeaderBoards","leaderboardsGetT","WSAPIInbox","reportImpressionEvent","activityType","reportEngagementImpression","reportClickEvent","reportEngagementAction","getInboxMessages","onlyFavorite","categoryId","read_status","InboxMessages","getInboxMessagesT","getInboxUnreadCount","InboxUnreadCount","getInboxUnreadCountT","getInboxMessageBody","messageGuid","getInboxMessageBodyT","markInboxMessageAsRead","markInboxMessageRead","markAllInboxMessagesAsRead","markAllInboxMessageRead","markUnmarkInboxMessageAsFavorite","mark","deleteInboxMessage","deleteAllInboxMessages","updateInboxUnreadCount","count","updateInboxMessages","on","SAW_SPINS_COUNT_PUSH","SAW_SHOW_SPIN_PUSH","SAW_AKNOWLEDGE_RESPONSE","SAW_DO_SPIN_RESPONSE","MISSION_OPTIN_RESPONSE","ACHIEVEMENT_CLAIM_PRIZE_RESPONSE","RELOAD_ACHIEVEMENTS_EVENT","TOURNAMENT_REGISTER_RESPONSE","BUY_SHOP_ITEM_RESPONSE","CLIENT_ENGAGEMENT_EVENT_NEW","LOGOUT_RESPONSE","IDENTIFY_RESPONSE","JP_WIN_PUSH","_data","JP_OPTOUT_RESPONSE","JP_OPTIN_RESPONSE","CLAIM_BONUS_RESPONSE","SAW_DO_SPIN_BATCH_RESPONSE","RAF_CLAIM_PRIZE_RESPONSE","GET_INBOX_MESSAGES_RESPONSE","unread_count","CLIENT_PUBLIC_PROPERTIES_CHANGED_EVENT","_data$props","_data$props2","_data$props3","_data$props4","_data$props5","core_inbox_unread_count","RAF_OPTIN_RESPONSE","AchCustomSectionType","AchCustomLayoutTheme","AchMissionsTabsOptions","AchOverviewMissionsFilter","LiquidEntityData","UICustomSectionTransform","customSections","section_type_id","menu_img","menu_name","custom_skin_images","generic_custom_css","mission_tabs_options","overview_missions_count","overview_missions_filter","url_or_dp","theme","LEVELS","liquid_entity_data","ach_tournament_id","show_raw_data","liquid_template","BADGES","ach_category_ids","STORE","shop_category_ids","push","BonusItemsTransform","is_redeemable","redeemable","create_date","redeem_date","redeemDate","label_bonus_template_id","labelBonusTemplateId","bonus_status_id","bonusStatusId","label_bonus_template_meta_map","labelBonusTemplateMetaMap","bonus_meta_map","bonusMetaMap","BonusStatus","UserBalanceType","ActivityLogTransform","_item$type","itemTransformed","source_type_id","amount","points_collected","user_points_balance","total_ever","user_points_ever","PointChangeSourceType","avatarDefinitionTransform","is_default","hide_until_achieved","url","avatar_source_type_id","active_from_date","is_given","is_in_use","avatarCustomizedTransform","dt_created","avatarPromptTransform","prompt_id","cost_currency_type_id","cost_value","GetJackpotWinnersResponseTransform","winnerInfo","winner","win_date_ts","jp_pot_id","GetJackpotEligibleGamesResponseTransform","eligible_games","games","game","game_id","ach_game_id","PUBLIC_API_URL","C_SOCKET_PROD","GAMES_API_URL","AVATAR_DOMAIN","DEFAULT_LANG_EN","SmarticoAPI","label_api_key","brand_api_key","messageSender","options","_options$tracker","publicUrl","wsUrl","inboxCdnUrl","partnerUrl","gamesApiUrl","baseRgApiParams","envId","logger","logCIDs","logHTTPTiming","always","getPublicUrl","getPublicWsUrl","env_id","String","getEnvId","brand_key","params","hash","getAvatarUrl","getCleanLabelApiKey","getEnvDnsSuffix","ENV_ID","substring","replaceSmrDomainsWithCloudfront","domains","replacedValue","oldDomain","newDomain","entries","err","send","message","expectCID","force_language","cid","timeStart","errSetup","timeEnd","warn","request","obj","buildMessage","api_key","ext_user_id","coreReportCustomEvent","eventType","eventMessage","EVENT","eventResponse","EVENT_RESPONSE","coreGetTranslations","areas","cacheSec","trim","Translations","tsBaseRQ","GET_TRANSLATIONS_REQUEST","hash_code","trBase","GET_TRANSLATIONS_RESPONSE","_trUser$translations","trUserRQ","trUser","coreIdentifyLabel","_this2","LabelInfo","INIT","INIT_RESPONSE","coreIdentifyUser","IDENTIFY","coreChangeUsername","public_username_custom","CLIENT_SET_CUSTOM_USERNAME_REQUEST","CLIENT_SET_CUSTOM_USERNAME_RESPONSE","CHECK_SEGMENT_MATCH_REQUEST","CHECK_SEGMENT_MATCH_RESPONSE","segments","CLIENT_ENGAGEMENT_IMPRESSION_REQUEST","catch","CLIENT_ENGAGEMENT_ACTION_REQUEST","JP_GET_JACKPOTS_REQUEST","JP_GET_JACKPOTS_RESPONSE","JP_GET_LATEST_POTS_REQUEST","JP_GET_LATEST_POTS_RESPONSE","JP_OPTIN_REQUEST","JP_OPTOUT_REQUEST","JP_GET_WINNERS_REQUEST","JP_GET_WINNERS_RESPONSE","JP_GET_ELIGIBLE_GAMES_REQUEST","JP_GET_ELIGIBLE_GAMES_RESPONSE","sawGetTemplates","is_visitor_mode","SAW_GET_SPINS_REQUEST","SAW_GET_SPINS_RESPONSE","_t$saw_template_ui_de","_t$saw_template_ui_de2","jackpotValue","SAW_AKNOWLEDGE_REQUEST","SAW_DO_SPIN_REQUEST","spinAttemptResponse","status","SAW_OK","SAW_NO_SPINS","SAW_PRIZE_POOL_EMPTY","SAW_NOT_ENOUGH_POINTS","SAW_FAILED_MAX_SPINS_REACHED","SAW_TEMPLATE_NOT_ACTIVE","SAW_NOT_IN_SEGMENT","SAW_NO_BALANCE_GEMS","SAW_NO_BALANCE_DIAMONDS","SAW_AKNOWLEDGE_BATCH_RESPONSE","spins_count","spins","SAW_DO_SPIN_BATCH_REQUEST","getSawWinningHistory","GET_SAW_HISTORY_REQUEST","GET_SAW_HISTORY_RESPONSE","MISSION_OPTIN_REQUEST","achievementId","ACHIEVEMENT_CLAIM_PRIZE_REQUEST","TOURNAMENT_REGISTER_REQUEST","itemId","BUY_SHOP_ITEM_REQUEST","inboxGetMessages","GET_INBOX_MESSAGES_REQUEST","storeGetItems","GET_SHOP_ITEMS_REQUEST","GET_SHOP_ITEMS_RESPONSE","storeGetCategories","GET_SHOP_CATEGORIES_REQUEST","GET_SHOP_CATEGORIES_RESPONSE","categories","storeGetPurchasedItems","ACH_SHOP_ITEM_HISTORY_REQUEST","ACH_SHOP_ITEM_HISTORY_RESPONSE","missionsGetItems","GET_ACHIEVEMENT_MAP_REQUEST","GET_ACHIEVEMENT_MAP_RESPONSE","responseClone","achievements","getUserGamificationInfo","GET_ACHIEVEMENT_USER_REQUEST","GET_ACHIEVEMENT_USER_RESPONSE","level_counter_1","level_counter_2","achGetCategories","GET_ACH_CATEGORIES_REQUEST","GET_ACH_CATEGORIES_RESPONSE","badgetsGetItems","bonusesGetItems","GET_BONUSES_REQUEST","GET_BONUSES_RESPONSE","CLAIM_BONUS_REQUEST","bonusId","bonuses","tournamentsGetLobby","GET_TOURNAMENT_LOBBY_REQUEST","GET_TOURNAMENT_LOBBY_RESPONSE","tournaments","clansGetList","GET_CLAN_LIST_REQUEST","GET_CLAN_LIST_RESPONSE","_response$join_date","clans","cooldown_until","join_date","clansGetInfo","GET_CLAN_INFO_REQUEST","GET_CLAN_INFO_RESPONSE","_c$cooldown_until","c","clanInfo","member_count","capacity_limit","entry_fee_currency_type_id","entry_fee_amount","rating_position","rating_score","members","m","contribution_score","joinSourceId","_response$errCode","_response$errMsg","JOIN_CLAN_REQUEST","join_source_id","JOIN_CLAN_RESPONSE","tournamentsGetInfo","_response$userPositio","_response$tournamentI","GET_TOURNAMENT_INFO_REQUEST","GET_TOURNAMENT_INFO_RESPONSE","tournament_instance_id","_response$players","GET_CLAN_TOURNAMENT_PLAYERS_REQUEST","GET_CLAN_TOURNAMENT_PLAYERS_RESPONSE","leaderboardGet","prevPeriod","_response$map$boardKe","_response$map$boardKe2","GET_LEADERS_BOARD_REQUEST","snapshot_offset","include_users","GET_LEADERS_BOARD_RESPONSE","boardKey","DAILY","levelsGet","GET_LEVEL_MAP_REQUEST","GET_LEVEL_MAP_RESPONSE","_userInfo$points_ever2","userInfo","sortedLevels","currentLevelIndex","level","current_level","_userInfo$points_ever","userPointsEver","points_ever","nextLevel","currentLevel","min","max","customSectionsGet","GET_CUSTOM_SECTIONS_REQUEST","GET_CUSTOM_SECTIONS_RESPONSE","starred_only","favoriteOnly","log","_this3","getMessageBody","getLabelSetting","INBOX_PUBLIC_CDN","fetch","method","headers","json","MARK_INBOX_READ_REQUEST","MARK_INBOX_READ_RESPONSE","all_read","MARK_INBOX_STARRED_REQUEST","MARK_INBOX_STARRED_RESPONSE","MARK_INBOX_DELETED_REQUEST","MARK_INBOX_DELETED_RESPONSE","all_deleted","buildGamesApiParams","_this$tracker$userPub","_this$tracker$userPub2","smartico_ext_user_id","getExtUserId","lang","core_user_language","sendGamesApi","usePost","baseParams","queryString","encodeURIComponent","fetchOptions","extraQuery","isQuiz","gpGetTranslations","avatarsGetList","GET_AVATARS_LIST_REQUEST","GET_AVATARS_LIST_RESPONSE","avatarsGetCustomized","GET_AVATARS_CUSTOMIZED_REQUEST","GET_AVATARS_CUSTOMIZED_RESPONSE","avatarsGetPrompts","GET_AVATAR_PROMPTS_REQUEST","GET_AVATAR_PROMPTS_RESPONSE","CLIENT_SET_AVATAR_REQUEST","CLIENT_SET_AVATAR_RESPONSE","_await$this$avatarsGe","avatars","_await$this$avatarsGe2","_await$this$avatarsGe3","prompts","getWSCalls","GET_RELATED_ACH_N_TOURNAMENTS_REQUEST","GET_RELATED_ACH_N_TOURNAMENTS_RESPONSE","RAF_GET_RAFFLES_REQUEST","RAF_GET_RAFFLES_RESPONSE","RAF_GET_DRAW_RUN_REQUEST","RAF_GET_DRAW_RUN_RESPONSE","RAF_GET_DRAW_HISTORY_REQUEST","RAF_GET_DRAW_HISTORY_RESPONSE","RAF_CLAIM_PRIZE_REQUEST","RAF_OPTIN_REQUEST","GET_POINT_HISTORY_REQUEST","floor","GET_POINT_HISTORY_RESPONSE","logHistory","CookieStore","cookieStore","TSMap","AnalyticsInterfaceType","AnalyticsScreenNameId","AnalyticsTournamentsLobbySubScreenNameId","AnalyticsInboxSubScreenNameId","QuizSportType","quizSupportedSports","Basketball","Soccer","Tennis","SAWGPMarketType","QuizAnswersValueType","quizAnswerHomeTeamReplacementText","quizAnswerAwayTeamReplacementText","quizDrawReplacementText","quizYesReplacementText","quizNoReplacementText","quizOddReplacementText","quizEvenReplacementText","quizOrReplacementText","quizNoGoalsReplacementText","quizAnswersTrKeys","yesNoAnswers","Yes","No","homeAwayAnswers","HomeTeam","AwayTeam","homeAwayDrawAnswers","Draw","homeAwayNoGoalsAnswers","marketsInfo","OneXTwo","question","trKey","answers","OneXTwoHalftime","FirstGoal","LastGoal","DoubleChance","HomeTeamDraw","HomeTeamAwayTeam","AwayTeamDraw","OverUnder2_5","OverUnder1_5Halftime","OverUnder1_5__2ndHalf","RedCard","TotalCorners8_5","TotalCorners9_5","Corners1x2","One_Two","Overtime","OddEven","Odd","Even","OddEvenHomeAway","HomeOdd","HomeEven","AwayOdd","AwayEven","FirstSet","SecondSet","ThirdSet","FourthSet","FifthSet","PlayerOneWinsOneSet","PlayerTwoWinsOneSet","CustomNonSport","CustomSport","QuizMarketPerSport","JackpotContributionType","JackPotTemparature","JackpotType","AvatarCustomizeErrorCode","AvatarCustomizeErrorMessage","AVATAR_USER_LIMIT","AVATAR_LABEL_LIMIT","JoinClanErrorCode"],"mappings":";;IAAYA,QAuNX;AAvND,CAAA,UAAYA,OAAO,EAAA;EAClBA,OAAA,CAAAA,OAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ,CAAA;EACRA,OAAA,CAAAA,OAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ,CAAA;EAERA,OAAA,CAAAA,OAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ,CAAA;EACRA,OAAA,CAAAA,OAAA,CAAA,eAAA,CAAA,GAAA,CAAA,CAAA,GAAA,eAAiB,CAAA;EACjBA,OAAA,CAAAA,OAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAY,CAAA;EACZA,OAAA,CAAAA,OAAA,CAAA,mBAAA,CAAA,GAAA,CAAA,CAAA,GAAA,mBAAqB,CAAA;EACrBA,OAAA,CAAAA,OAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAS,CAAA;EACTA,OAAA,CAAAA,OAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAU,CAAA;EACVA,OAAA,CAAAA,OAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,O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