@everymatrix/casino-game-thumb-view 1.44.0 → 1.45.0

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.
Files changed (131) hide show
  1. package/dist/casino-game-thumb-view/casino-game-thumb-view.esm.js +1 -1
  2. package/dist/casino-game-thumb-view/p-2207062c.entry.js +1 -0
  3. package/dist/casino-game-thumb-view/p-39684b4a.entry.js +1 -0
  4. package/dist/casino-game-thumb-view/p-af0284b5.entry.js +1 -0
  5. package/dist/casino-game-thumb-view/p-b73b7a18.entry.js +1 -0
  6. package/dist/casino-game-thumb-view/p-bd016895.entry.js +7 -0
  7. package/dist/casino-game-thumb-view/p-d2580653.js +8 -0
  8. package/dist/casino-game-thumb-view/p-d48c3566.entry.js +1 -0
  9. package/dist/casino-game-thumb-view/p-e1255160.js +1 -0
  10. package/dist/casino-game-thumb-view/p-eef6f908.js +2 -0
  11. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  12. package/dist/cjs/casino-extrainfo-baccarat.cjs.entry.js +327 -322
  13. package/dist/cjs/casino-extrainfo-blackjack.cjs.entry.js +45 -45
  14. package/dist/cjs/casino-extrainfo-roulette.cjs.entry.js +35 -34
  15. package/dist/cjs/casino-game-thumb-view.cjs.js +17 -11
  16. package/dist/cjs/casino-game-thumb-view_2.cjs.entry.js +469 -519
  17. package/dist/cjs/casino-game-thumbnail-betlimit_2.cjs.entry.js +258 -251
  18. package/dist/cjs/casino-normal-game-thumbnail.cjs.entry.js +14 -12
  19. package/dist/cjs/game-thumbnail-5a34c727.js +78 -0
  20. package/dist/cjs/index-48d13981.js +1709 -0
  21. package/dist/cjs/loader.cjs.js +7 -13
  22. package/dist/cjs/locale.utils-53bf703a.js +132 -0
  23. package/dist/cjs/{utils-a0afc0a9.js → utils-c4ed3adc.js} +407 -404
  24. package/dist/collection/collection-manifest.json +10 -10
  25. package/dist/collection/components/casino-extrainfo-baccarat/casino-extrainfo-baccarat.js +251 -230
  26. package/dist/collection/components/casino-extrainfo-blackjack/casino-extrainfo-blackjack.js +136 -114
  27. package/dist/collection/components/casino-extrainfo-roulette/casino-extrainfo-roulette.js +126 -119
  28. package/dist/collection/components/casino-game-thumb-view/casino-game-thumb-view.css +1 -1
  29. package/dist/collection/components/casino-game-thumb-view/casino-game-thumb-view.js +1023 -1027
  30. package/dist/collection/components/casino-game-thumb-view/index.js +1 -0
  31. package/dist/collection/components/casino-game-thumbnail-betlimit/casino-game-thumbnail-betlimit.js +78 -80
  32. package/dist/collection/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.js +153 -150
  33. package/dist/collection/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.js +201 -206
  34. package/dist/collection/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.js +71 -58
  35. package/dist/collection/constants/game-thumbnail.js +66 -66
  36. package/dist/collection/models/casino-game-thumb-view.js +6 -6
  37. package/dist/collection/models/currency-symbols.js +170 -170
  38. package/dist/collection/utils/baccarat-board-svg.js +225 -225
  39. package/dist/collection/utils/locale.utils.js +122 -122
  40. package/dist/collection/utils/utils.js +41 -41
  41. package/dist/esm/app-globals-0f993ce5.js +3 -0
  42. package/dist/esm/casino-extrainfo-baccarat.entry.js +327 -322
  43. package/dist/esm/casino-extrainfo-blackjack.entry.js +45 -45
  44. package/dist/esm/casino-extrainfo-roulette.entry.js +35 -34
  45. package/dist/esm/casino-game-thumb-view.js +14 -11
  46. package/dist/esm/casino-game-thumb-view_2.entry.js +469 -519
  47. package/dist/esm/casino-game-thumbnail-betlimit_2.entry.js +258 -251
  48. package/dist/esm/casino-normal-game-thumbnail.entry.js +14 -12
  49. package/dist/esm/game-thumbnail-035e97e2.js +72 -0
  50. package/dist/esm/index-8c9a8030.js +1681 -0
  51. package/dist/esm/loader.js +7 -13
  52. package/dist/esm/locale.utils-0c514ca8.js +130 -0
  53. package/dist/{components/utils.js → esm/utils-090ac2e9.js} +407 -404
  54. package/dist/stencil.config.dev.js +17 -0
  55. package/dist/stencil.config.js +12 -35
  56. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.d.ts +2 -0
  57. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.dev.d.ts +2 -0
  58. package/dist/types/components/casino-extrainfo-baccarat/casino-extrainfo-baccarat.d.ts +36 -36
  59. package/dist/types/components/casino-extrainfo-blackjack/casino-extrainfo-blackjack.d.ts +33 -33
  60. package/dist/types/components/casino-extrainfo-roulette/casino-extrainfo-roulette.d.ts +18 -18
  61. package/dist/types/components/casino-game-thumb-view/casino-game-thumb-view.d.ts +213 -213
  62. package/dist/types/components/casino-game-thumb-view/index.d.ts +1 -0
  63. package/dist/types/components/casino-game-thumbnail-betlimit/casino-game-thumbnail-betlimit.d.ts +14 -14
  64. package/dist/types/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.d.ts +13 -13
  65. package/dist/types/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.d.ts +28 -28
  66. package/dist/types/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.d.ts +4 -4
  67. package/dist/types/components.d.ts +33 -2
  68. package/dist/types/constants/game-thumbnail.d.ts +66 -66
  69. package/dist/types/models/casino-game-thumb-view.d.ts +107 -107
  70. package/dist/types/models/currency-symbols.d.ts +170 -170
  71. package/dist/types/stencil-public-runtime.d.ts +142 -33
  72. package/dist/types/utils/baccarat-board-svg.d.ts +29 -29
  73. package/loader/cdn.js +1 -3
  74. package/loader/index.cjs.js +1 -3
  75. package/loader/index.d.ts +13 -1
  76. package/loader/index.es2017.js +1 -3
  77. package/loader/index.js +1 -3
  78. package/loader/package.json +1 -0
  79. package/package.json +8 -8
  80. package/dist/assets/baccarat.svg +0 -43
  81. package/dist/assets/fav.svg +0 -9
  82. package/dist/assets/favorite.svg +0 -12
  83. package/dist/assets/seat.svg +0 -6
  84. package/dist/assets/unfav.svg +0 -20
  85. package/dist/casino-game-thumb-view/p-1bbf4b70.entry.js +0 -1
  86. package/dist/casino-game-thumb-view/p-42bf2034.entry.js +0 -1
  87. package/dist/casino-game-thumb-view/p-46dbb1cb.js +0 -1
  88. package/dist/casino-game-thumb-view/p-6a6b2a78.js +0 -8
  89. package/dist/casino-game-thumb-view/p-7ae107ed.entry.js +0 -1
  90. package/dist/casino-game-thumb-view/p-9cbfffbc.entry.js +0 -1
  91. package/dist/casino-game-thumb-view/p-d961aec4.entry.js +0 -1
  92. package/dist/casino-game-thumb-view/p-db43bb56.entry.js +0 -7
  93. package/dist/cjs/game-thumbnail-31d518f0.js +0 -78
  94. package/dist/cjs/index-65a1d768.js +0 -1796
  95. package/dist/cjs/locale.utils-aa160787.js +0 -132
  96. package/dist/components/casino-extrainfo-baccarat.d.ts +0 -11
  97. package/dist/components/casino-extrainfo-baccarat.js +0 -400
  98. package/dist/components/casino-extrainfo-blackjack.d.ts +0 -11
  99. package/dist/components/casino-extrainfo-blackjack.js +0 -92
  100. package/dist/components/casino-extrainfo-roulette.d.ts +0 -11
  101. package/dist/components/casino-extrainfo-roulette.js +0 -78
  102. package/dist/components/casino-game-thumb-view.d.ts +0 -11
  103. package/dist/components/casino-game-thumb-view.js +0 -1625
  104. package/dist/components/casino-game-thumbnail-betlimit.d.ts +0 -11
  105. package/dist/components/casino-game-thumbnail-betlimit.js +0 -6
  106. package/dist/components/casino-game-thumbnail-betlimit2.js +0 -227
  107. package/dist/components/casino-game-thumbnail-extrainfo.d.ts +0 -11
  108. package/dist/components/casino-game-thumbnail-extrainfo.js +0 -6
  109. package/dist/components/casino-game-thumbnail-extrainfo2.js +0 -96
  110. package/dist/components/casino-game-thumbnail-overlay.d.ts +0 -11
  111. package/dist/components/casino-game-thumbnail-overlay.js +0 -6
  112. package/dist/components/casino-game-thumbnail-overlay2.js +0 -69
  113. package/dist/components/casino-normal-game-thumbnail.d.ts +0 -11
  114. package/dist/components/casino-normal-game-thumbnail.js +0 -52
  115. package/dist/components/game-thumbnail.js +0 -72
  116. package/dist/components/index.d.ts +0 -26
  117. package/dist/components/index.js +0 -1
  118. package/dist/components/locale.utils.js +0 -130
  119. package/dist/esm/game-thumbnail-0a56ee03.js +0 -72
  120. package/dist/esm/index-1e44dd9f.js +0 -1769
  121. package/dist/esm/locale.utils-e0cf897e.js +0 -130
  122. package/dist/esm/polyfills/core-js.js +0 -11
  123. package/dist/esm/polyfills/css-shim.js +0 -1
  124. package/dist/esm/polyfills/dom.js +0 -79
  125. package/dist/esm/polyfills/es5-html-element.js +0 -1
  126. package/dist/esm/polyfills/index.js +0 -34
  127. package/dist/esm/polyfills/system.js +0 -6
  128. package/dist/esm/utils-e9314132.js +0 -5739
  129. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-game-thumb-view/.stencil/packages/casino-game-thumb-view/stencil.config.d.ts +0 -2
  130. /package/dist/casino-game-thumb-view/{p-2d5f59fe.js → p-2d02adb1.js} +0 -0
  131. /package/dist/casino-game-thumb-view/{p-1e63a1ab.js → p-59ceeaaa.js} +0 -0
@@ -2,34 +2,22 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-65a1d768.js');
6
- const utils = require('./utils-a0afc0a9.js');
7
- const gameThumbnail = require('./game-thumbnail-31d518f0.js');
8
- const locale_utils = require('./locale.utils-aa160787.js');
5
+ const index = require('./index-48d13981.js');
6
+ const utils = require('./utils-c4ed3adc.js');
7
+ const gameThumbnail = require('./game-thumbnail-5a34c727.js');
8
+ const locale_utils = require('./locale.utils-53bf703a.js');
9
9
 
10
10
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
11
11
 
12
- function createCommonjsModule(fn, basedir, module) {
13
- return module = {
14
- path: basedir,
15
- exports: {},
16
- require: function (path, base) {
17
- return commonjsRequire();
18
- }
19
- }, fn(module, module.exports), module.exports;
20
- }
12
+ var eventsource = {exports: {}};
21
13
 
22
- function commonjsRequire () {
23
- throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
24
- }
25
-
26
- var eventsource = createCommonjsModule(function (module, exports) {
27
14
  /** @license
28
15
  * eventsource.js
29
16
  * Available under MIT License (MIT)
30
17
  * https://github.com/Yaffle/EventSource/
31
- */
32
-
18
+ */
19
+
20
+ (function (module, exports) {
33
21
  /*jslint indent: 2, vars: true, plusplus: true */
34
22
  /*global setTimeout, clearTimeout */
35
23
 
@@ -1065,548 +1053,510 @@ var eventsource = createCommonjsModule(function (module, exports) {
1065
1053
  exports.EventSource = R;
1066
1054
  });
1067
1055
  }(typeof globalThis === 'undefined' ? (typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : commonjsGlobal) : globalThis));
1068
- });
1056
+ }(eventsource, eventsource.exports));
1069
1057
 
1070
- const Fav = `<svg
1071
- version="1.1"
1072
- xmlns="http://www.w3.org/2000/svg"
1073
- viewBox="0 0 19.481 19.481"
1074
- enable-background="new 0 0 19.481 19.481"
1075
- >
1076
- <path
1077
- d="m10.201,.758l2.478,5.865 6.344,.545c0.44,0.038 0.619,0.587 0.285,0.876l-4.812,4.169 1.442,6.202c0.1,0.431-0.367,0.77-0.745,0.541l-5.452-3.288-5.452,3.288c-0.379,0.228-0.845-0.111-0.745-0.541l1.442-6.202-4.813-4.17c-0.334-0.289-0.156-0.838 0.285-0.876l6.344-.545 2.478-5.864c0.172-0.408 0.749-0.408 0.921,0z"/>
1078
- </svg>
1079
- `;
1058
+ const favSvg = 'data:image/svg+xml;base64,PHN2ZwogIHZlcnNpb249IjEuMSIKICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgdmlld0JveD0iMCAwIDE5LjQ4MSAxOS40ODEiCiAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTkuNDgxIDE5LjQ4MSIKPgogIDxwYXRoCiAgICBkPSJtMTAuMjAxLC43NThsMi40NzgsNS44NjUgNi4zNDQsLjU0NWMwLjQ0LDAuMDM4IDAuNjE5LDAuNTg3IDAuMjg1LDAuODc2bC00LjgxMiw0LjE2OSAxLjQ0Miw2LjIwMmMwLjEsMC40MzEtMC4zNjcsMC43Ny0wLjc0NSwwLjU0MWwtNS40NTItMy4yODgtNS40NTIsMy4yODhjLTAuMzc5LDAuMjI4LTAuODQ1LTAuMTExLTAuNzQ1LTAuNTQxbDEuNDQyLTYuMjAyLTQuODEzLTQuMTdjLTAuMzM0LTAuMjg5LTAuMTU2LTAuODM4IDAuMjg1LTAuODc2bDYuMzQ0LS41NDUgMi40NzgtNS44NjRjMC4xNzItMC40MDggMC43NDktMC40MDggMC45MjEsMHoiLz4KPC9zdmc+Cg==';
1080
1059
 
1081
- const UnFavSvg = `<svg
1082
- version="1.1"
1083
- class="UnfavoredIcon"
1084
- xmlns="http://www.w3.org/2000/svg"
1085
- x="20px"
1086
- y="20px"
1087
- viewBox="0 0 512.001 512.001"
1088
- >
1089
- <path
1090
- d="M511.266,197.256c-1.764-5.431-6.458-9.388-12.108-10.209l-158.722-23.065L269.452,20.155
1091
- c-2.527-5.12-7.741-8.361-13.451-8.361c-5.709,0-10.924,3.242-13.451,8.361l-70.988,143.828L12.843,187.047
1092
- c-5.65,0.821-10.344,4.779-12.108,10.209c-1.765,5.43-0.293,11.391,3.795,15.376l114.848,111.955L92.27,482.67
1093
- c-0.965,5.627,1.349,11.315,5.968,14.67c4.618,3.355,10.74,3.798,15.797,1.142L256,423.846l141.961,74.637
1094
- c2.195,1.154,4.591,1.723,6.979,1.723c3.11,0,6.206-0.966,8.818-2.865c4.619-3.356,6.933-9.043,5.968-14.671L392.61,324.587
1095
- l114.86-111.954C511.559,208.647,513.031,202.686,511.266,197.256z M366.023,308.608c-3.536,3.446-5.15,8.412-4.314,13.278
1096
- l23.311,135.898l-122.038-64.162c-4.37-2.297-9.591-2.297-13.961,0l-122.045,64.163l23.304-135.9
1097
- c0.834-4.866-0.779-9.83-4.313-13.276l-98.731-96.244l136.445-19.829c4.886-0.71,9.108-3.778,11.294-8.205L256,60.685
1098
- l61.023,123.645c2.186,4.427,6.408,7.496,11.294,8.206l136.447,19.828L366.023,308.608z"
1099
- />
1100
- </svg>
1101
- `;
1060
+ const unfavSvg = 'data:image/svg+xml;base64,PHN2ZwogIHZlcnNpb249IjEuMSIKICBjbGFzcz0iVW5mYXZvcmVkSWNvbiIKICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgeD0iMjBweCIKICB5PSIyMHB4IgogIHZpZXdCb3g9IjAgMCA1MTIuMDAxIDUxMi4wMDEiCj4KICA8cGF0aAogICAgZD0iTTUxMS4yNjYsMTk3LjI1NmMtMS43NjQtNS40MzEtNi40NTgtOS4zODgtMTIuMTA4LTEwLjIwOWwtMTU4LjcyMi0yMy4wNjVMMjY5LjQ1MiwyMC4xNTUKICAgICAgICAgICAgICAgICAgICAgIGMtMi41MjctNS4xMi03Ljc0MS04LjM2MS0xMy40NTEtOC4zNjFjLTUuNzA5LDAtMTAuOTI0LDMuMjQyLTEzLjQ1MSw4LjM2MWwtNzAuOTg4LDE0My44MjhMMTIuODQzLDE4Ny4wNDcKICAgICAgICAgICAgICAgICAgICAgIGMtNS42NSwwLjgyMS0xMC4zNDQsNC43NzktMTIuMTA4LDEwLjIwOWMtMS43NjUsNS40My0wLjI5MywxMS4zOTEsMy43OTUsMTUuMzc2bDExNC44NDgsMTExLjk1NUw5Mi4yNyw0ODIuNjcKICAgICAgICAgICAgICAgICAgICAgIGMtMC45NjUsNS42MjcsMS4zNDksMTEuMzE1LDUuOTY4LDE0LjY3YzQuNjE4LDMuMzU1LDEwLjc0LDMuNzk4LDE1Ljc5NywxLjE0MkwyNTYsNDIzLjg0NmwxNDEuOTYxLDc0LjYzNwogICAgICAgICAgICAgICAgICAgICAgYzIuMTk1LDEuMTU0LDQuNTkxLDEuNzIzLDYuOTc5LDEuNzIzYzMuMTEsMCw2LjIwNi0wLjk2Niw4LjgxOC0yLjg2NWM0LjYxOS0zLjM1Niw2LjkzMy05LjA0Myw1Ljk2OC0xNC42NzFMMzkyLjYxLDMyNC41ODcKICAgICAgICAgICAgICAgICAgICAgIGwxMTQuODYtMTExLjk1NEM1MTEuNTU5LDIwOC42NDcsNTEzLjAzMSwyMDIuNjg2LDUxMS4yNjYsMTk3LjI1NnogTTM2Ni4wMjMsMzA4LjYwOGMtMy41MzYsMy40NDYtNS4xNSw4LjQxMi00LjMxNCwxMy4yNzgKICAgICAgICAgICAgICAgICAgICAgIGwyMy4zMTEsMTM1Ljg5OGwtMTIyLjAzOC02NC4xNjJjLTQuMzctMi4yOTctOS41OTEtMi4yOTctMTMuOTYxLDBsLTEyMi4wNDUsNjQuMTYzbDIzLjMwNC0xMzUuOQogICAgICAgICAgICAgICAgICAgICAgYzAuODM0LTQuODY2LTAuNzc5LTkuODMtNC4zMTMtMTMuMjc2bC05OC43MzEtOTYuMjQ0bDEzNi40NDUtMTkuODI5YzQuODg2LTAuNzEsOS4xMDgtMy43NzgsMTEuMjk0LTguMjA1TDI1Niw2MC42ODUKICAgICAgICAgICAgICAgICAgICAgIGw2MS4wMjMsMTIzLjY0NWMyLjE4Niw0LjQyNyw2LjQwOCw3LjQ5NiwxMS4yOTQsOC4yMDZsMTM2LjQ0NywxOS44MjhMMzY2LjAyMywzMDguNjA4eiIKICAvPgo8L3N2Zz4K';
1102
1061
 
1103
- const casinoGameThumbViewCss = ":host{display:block}*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}.GameContainer{width:100%;height:100%;position:relative}.GameInnerContainer{position:relative;width:100%;height:100%;overflow:hidden;border-radius:5px}.GameInnerContainer .GameBg{width:100%;height:100%;object-fit:unset;transition:all 150ms ease-in-out}.GameInnerContainer .GameBg.GameBg-1x2,.GameInnerContainer .GameBg.GameBg-2x1,.GameInnerContainer .GameBg.GameBg-2x2{object-fit:cover}.GameInnerContainer:hover{cursor:pointer}.GameInnerContainer:hover .GameInfoWrapper{display:block}.GameInnerContainer:hover .GameBg{filter:blur(5px) grayscale(1)}.ListGame.GameBackdrop .GameInnerContainer::after{content:\"\";position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(0deg, black 15%, rgba(0, 0, 0, 0) 100%)}.ListGame .GameInnerContainer{z-index:0}.ListGame .GameInnerContainer .GameBg{z-index:5}.ListGame .GameInnerContainer::after{content:\"\";position:absolute;top:0;right:0;bottom:0;left:0}.ListGame .GameInnerContainer.GameInnerContainerUnavailable::after{content:\"\";position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0, 0, 0, 0.9)}.ListGame .GameInnerContainer .ListGame:hover .OpenSeat,.ListGame .GameInnerContainer .ListGame:hover .ClosedSeat,.ListGame .GameInnerContainer .ListGame:hover .LiveLimits,.ListGame .GameInnerContainer .ListGame:hover .LatestResult,.ListGame .GameInnerContainer .ListGame:hover .FullTable,.ListGame .GameInnerContainer .ListGame:active .OpenSeat,.ListGame .GameInnerContainer .ListGame:active .ClosedSeat,.ListGame .GameInnerContainer .ListGame:active .LiveLimits,.ListGame .GameInnerContainer .ListGame:active .LatestResult,.ListGame .GameInnerContainer .ListGame:active .FullTable{opacity:0.2}.ListGame .GameInnerContainer .ListGame.GameContainerDimmed:before{display:block;content:\" \";width:100%;height:100%;position:absolute;top:0;right:0;bottom:0;left:0;z-index:5;background:rgba(0, 0, 0, 0.4);color:var(--emfe-w-color-white, #FFFFFF);fill:var(--emfe-w-color-white, #FFFFFF);opacity:1;border-radius:4px}.ListGame .GameInnerContainer .ListGame.GameContainerFullyDimmed:before{display:block;content:\" \";width:100%;height:100%;position:absolute;top:0;right:0;bottom:0;left:0;z-index:5;background:rgba(0, 0, 0, 0.8);color:var(--emfe-w-color-white, #FFFFFF);fill:var(--emfe-w-color-white, #FFFFFF);opacity:1;border-radius:4px}.ListGame .GameInnerContainer .ListGame:hover .LiveProps,.ListGame .GameInnerContainer .ListGameLink:hover .LiveProps{opacity:0}@keyframes red-pulse{0%{box-shadow:0 0 2px 0 rgba(255, 0, 0, 0.75)}15%{box-shadow:0 0 10px 2px rgba(255, 0, 0, 0.75)}30%{box-shadow:0 0 2px 0 rgba(255, 0, 0, 0.75)}50%{box-shadow:0 0 10px 2px rgba(255, 0, 0, 0.75)}65%{box-shadow:0 0 2px 0 rgba(255, 0, 0, 0.75)}80%{box-shadow:0 0 10px 2px rgba(255, 0, 0, 0.75)}100%{box-shadow:0 0 0 0 rgba(255, 0, 0, 0.75)}}@keyframes green-pulse{0%{box-shadow:0 0 2px 0 rgba(86, 168, 10, 0.75)}15%{box-shadow:0 0 10px 2px rgba(86, 168, 10, 0.75)}30%{box-shadow:0 0 2px 0 rgba(86, 168, 10, 0.75)}50%{box-shadow:0 0 10px 2px rgba(86, 168, 10, 0.75)}65%{box-shadow:0 0 2px 0 rgba(86, 168, 10, 0.75)}80%{box-shadow:0 0 10px 2px rgba(86, 168, 10, 0.75)}100%{box-shadow:0 0 0 0 rgba(86, 168, 10, 0.75)}}@keyframes flip-open{0%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, 90deg);transform:perspective(400px) rotate3d(0, 1, 0, 90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, -20deg);transform:perspective(400px) rotate3d(0, 1, 0, -20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, 10deg);transform:perspective(400px) rotate3d(0, 1, 0, 10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, -5deg);transform:perspective(400px) rotate3d(0, 1, 0, -5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}.ListGame .GameInnerContainer .silde-in-from-left{-webkit-animation-name:silde-in-from-left;animation-name:silde-in-from-left;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes silde-in-from-left{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%);visibility:visible}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes silde-in-from-left{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%);visibility:visible}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes flip-closed-seat{0%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, 90deg);transform:perspective(400px) rotate3d(0, 1, 0, 90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, -20deg);transform:perspective(400px) rotate3d(0, 1, 0, -20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, 10deg);transform:perspective(400px) rotate3d(0, 1, 0, 10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, -5deg);transform:perspective(400px) rotate3d(0, 1, 0, -5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}.ListGame .GameInnerContainer .ListGame.PulsatingGreenShadow{animation:green-pulse 2s linear}.ListGame .GameInnerContainer .ListGame.PulsatingRedShadow{animation:red-pulse 2s linear}.ListGame .GameInnerContainer .Blue{color:#4d90a7}.ListGame .GameInnerContainer .Red{background-color:red}.ListGame .GameInnerContainer .Black{background-color:var(--emfe-w-color-black, #000000)}.ListGame .GameInnerContainer .Green{background-color:#56A80A}.ListGame .GameInnerContainer .White{background-color:var(--emfe-w-color-white, #FFFFFF)}.ListGame .GameInnerContainer .Yellow{background-color:#eeca3d}.ListGame .GameInnerContainer .Gold{background-color:#866d0c}.ListGame .GameInnerContainer .Orange{background-color:#574708}.ListGame .GameInnerContainer .Purple{background-color:#330033}.ListGame .GameInnerContainer .Tie{background-color:var(--emfe-w-color-white, #FFFFFF);background-image:linear-gradient(135deg, var(--emfe-w-color-white, #FFFFFF) 25%, transparent 25%, transparent 50%, #212121 50%, var(--emfe-w-color-white, #FFFFFF) 75%, transparent 75%, var(--emfe-w-color-white, #FFFFFF))}.ListGame .GameInnerContainer .PlayersDisplay{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;padding:2px 10px;background:linear-gradient(to bottom, rgba(33, 33, 33, 0.9) 0%, rgba(33, 33, 33, 0.1) 100%);color:var(--emfe-w-color-white, #FFFFFF)}.ListGame .GameInnerContainer .PlayersDisplay .PlayersIcon{width:14px;height:14px;margin-right:4px}.ListGame .GameInnerContainer .PlayersDisplay .PlayersIcon svg{fill:var(--emfe-w-color-white, #FFFFFF);width:100%;height:100%}.ListGame .GameInnerContainer .ClosedGame{opacity:1;z-index:10;padding:8px 10px;color:var(--emfe-w-color-white, #FFFFFF);font-size:18px}.ListGame .GameInnerContainer .ClosedGame span{font-size:18px}.ListGame .GameInnerContainer .Players{display:inline-block;width:19px;height:19px}.FavIconContainer{position:absolute;top:10px;right:10px;cursor:pointer;z-index:16;width:15px;height:15px;opacity:0}.FavIconContainer.Favorited{opacity:1}.FavIconContainer svg path{fill:#fff}.Hovered .FavIconContainer{opacity:1}.GameNameBelow{color:var(--emfe-w-color-white, #FFFFFF);position:relative;bottom:-5px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}";
1062
+ const casinoGameThumbViewCss = ":host{display:block}*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}.GameContainer{width:100%;height:100%;position:relative}.GameInnerContainer{position:relative;width:100%;height:100%;overflow:hidden;border-radius:5px}.GameInnerContainer .GameBg{width:100%;height:100%;object-fit:unset;transition:all 150ms ease-in-out}.GameInnerContainer .GameBg.GameBg-1x2,.GameInnerContainer .GameBg.GameBg-2x1,.GameInnerContainer .GameBg.GameBg-2x2{object-fit:cover}.GameInnerContainer:hover{cursor:pointer}.GameInnerContainer:hover .GameInfoWrapper{display:block}.GameInnerContainer:hover .GameBg{filter:blur(5px) grayscale(1)}.ListGame.GameBackdrop .GameInnerContainer::after{content:\"\";position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(0deg, rgb(0, 0, 0) 15%, rgba(0, 0, 0, 0) 100%)}.ListGame .GameInnerContainer{z-index:0}.ListGame .GameInnerContainer .GameBg{z-index:5}.ListGame .GameInnerContainer::after{content:\"\";position:absolute;top:0;right:0;bottom:0;left:0}.ListGame .GameInnerContainer.GameInnerContainerUnavailable::after{content:\"\";position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0, 0, 0, 0.9)}.ListGame .GameInnerContainer .ListGame:hover .OpenSeat,.ListGame .GameInnerContainer .ListGame:hover .ClosedSeat,.ListGame .GameInnerContainer .ListGame:hover .LiveLimits,.ListGame .GameInnerContainer .ListGame:hover .LatestResult,.ListGame .GameInnerContainer .ListGame:hover .FullTable,.ListGame .GameInnerContainer .ListGame:active .OpenSeat,.ListGame .GameInnerContainer .ListGame:active .ClosedSeat,.ListGame .GameInnerContainer .ListGame:active .LiveLimits,.ListGame .GameInnerContainer .ListGame:active .LatestResult,.ListGame .GameInnerContainer .ListGame:active .FullTable{opacity:0.2}.ListGame .GameInnerContainer .ListGame.GameContainerDimmed:before{display:block;content:\" \";width:100%;height:100%;position:absolute;top:0;right:0;bottom:0;left:0;z-index:5;background:rgba(0, 0, 0, 0.4);color:var(--emfe-w-color-white, #FFFFFF);fill:var(--emfe-w-color-white, #FFFFFF);opacity:1;border-radius:4px}.ListGame .GameInnerContainer .ListGame.GameContainerFullyDimmed:before{display:block;content:\" \";width:100%;height:100%;position:absolute;top:0;right:0;bottom:0;left:0;z-index:5;background:rgba(0, 0, 0, 0.8);color:var(--emfe-w-color-white, #FFFFFF);fill:var(--emfe-w-color-white, #FFFFFF);opacity:1;border-radius:4px}.ListGame .GameInnerContainer .ListGame:hover .LiveProps,.ListGame .GameInnerContainer .ListGameLink:hover .LiveProps{opacity:0}@keyframes red-pulse{0%{box-shadow:0 0 2px 0 rgba(255, 0, 0, 0.75)}15%{box-shadow:0 0 10px 2px rgba(255, 0, 0, 0.75)}30%{box-shadow:0 0 2px 0 rgba(255, 0, 0, 0.75)}50%{box-shadow:0 0 10px 2px rgba(255, 0, 0, 0.75)}65%{box-shadow:0 0 2px 0 rgba(255, 0, 0, 0.75)}80%{box-shadow:0 0 10px 2px rgba(255, 0, 0, 0.75)}100%{box-shadow:0 0 0 0 rgba(255, 0, 0, 0.75)}}@keyframes green-pulse{0%{box-shadow:0 0 2px 0 rgba(86, 168, 10, 0.75)}15%{box-shadow:0 0 10px 2px rgba(86, 168, 10, 0.75)}30%{box-shadow:0 0 2px 0 rgba(86, 168, 10, 0.75)}50%{box-shadow:0 0 10px 2px rgba(86, 168, 10, 0.75)}65%{box-shadow:0 0 2px 0 rgba(86, 168, 10, 0.75)}80%{box-shadow:0 0 10px 2px rgba(86, 168, 10, 0.75)}100%{box-shadow:0 0 0 0 rgba(86, 168, 10, 0.75)}}@keyframes flip-open{0%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, 90deg);transform:perspective(400px) rotate3d(0, 1, 0, 90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, -20deg);transform:perspective(400px) rotate3d(0, 1, 0, -20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, 10deg);transform:perspective(400px) rotate3d(0, 1, 0, 10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, -5deg);transform:perspective(400px) rotate3d(0, 1, 0, -5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}.ListGame .GameInnerContainer .silde-in-from-left{-webkit-animation-name:silde-in-from-left;animation-name:silde-in-from-left;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes silde-in-from-left{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%);visibility:visible}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes silde-in-from-left{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%);visibility:visible}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes flip-closed-seat{0%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, 90deg);transform:perspective(400px) rotate3d(0, 1, 0, 90deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, -20deg);transform:perspective(400px) rotate3d(0, 1, 0, -20deg);-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, 10deg);transform:perspective(400px) rotate3d(0, 1, 0, 10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0, 1, 0, -5deg);transform:perspective(400px) rotate3d(0, 1, 0, -5deg)}100%{-webkit-transform:perspective(400px);transform:perspective(400px)}}.ListGame .GameInnerContainer .ListGame.PulsatingGreenShadow{animation:green-pulse 2s linear}.ListGame .GameInnerContainer .ListGame.PulsatingRedShadow{animation:red-pulse 2s linear}.ListGame .GameInnerContainer .Blue{color:#4d90a7}.ListGame .GameInnerContainer .Red{background-color:red}.ListGame .GameInnerContainer .Black{background-color:var(--emfe-w-color-black, #000000)}.ListGame .GameInnerContainer .Green{background-color:#56A80A}.ListGame .GameInnerContainer .White{background-color:var(--emfe-w-color-white, #FFFFFF)}.ListGame .GameInnerContainer .Yellow{background-color:#eeca3d}.ListGame .GameInnerContainer .Gold{background-color:#866d0c}.ListGame .GameInnerContainer .Orange{background-color:#574708}.ListGame .GameInnerContainer .Purple{background-color:#330033}.ListGame .GameInnerContainer .Tie{background-color:var(--emfe-w-color-white, #FFFFFF);background-image:linear-gradient(135deg, var(--emfe-w-color-white, #FFFFFF) 25%, transparent 25%, transparent 50%, #212121 50%, var(--emfe-w-color-white, #FFFFFF) 75%, transparent 75%, var(--emfe-w-color-white, #FFFFFF))}.ListGame .GameInnerContainer .PlayersDisplay{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;padding:2px 10px;background:linear-gradient(to bottom, rgba(33, 33, 33, 0.9) 0%, rgba(33, 33, 33, 0.1) 100%);color:var(--emfe-w-color-white, #FFFFFF)}.ListGame .GameInnerContainer .PlayersDisplay .PlayersIcon{width:14px;height:14px;margin-right:4px}.ListGame .GameInnerContainer .PlayersDisplay .PlayersIcon svg{fill:var(--emfe-w-color-white, #FFFFFF);width:100%;height:100%}.ListGame .GameInnerContainer .ClosedGame{opacity:1;z-index:10;padding:8px 10px;color:var(--emfe-w-color-white, #FFFFFF);font-size:18px}.ListGame .GameInnerContainer .ClosedGame span{font-size:18px}.ListGame .GameInnerContainer .Players{display:inline-block;width:19px;height:19px}.FavIconContainer{position:absolute;top:10px;right:10px;cursor:pointer;z-index:16;width:15px;height:15px;opacity:0}.FavIconContainer.Favorited{opacity:1}.FavIconContainer svg path{fill:#fff}.Hovered .FavIconContainer{opacity:1}.GameNameBelow{color:var(--emfe-w-color-white, #FFFFFF);position:relative;bottom:-5px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}";
1063
+ const CasinoGameThumbViewStyle0 = casinoGameThumbViewCss;
1104
1064
 
1105
1065
  const CasinoGameThumbView = class {
1106
- constructor(hostRef) {
1107
- index.registerInstance(this, hostRef);
1108
- this.toggleFavoriteCasinoGameEvent = index.createEvent(this, "toggleCasinoGameFavorite", 7);
1109
- /**
1110
- * Widget Setting, Game language
1111
- */
1112
- this.language = 'en';
1113
- /**
1114
- * Widget Setting, Client custom styling via string
1115
- */
1116
- this.clientStyling = '';
1117
- /**
1118
- * Widget Setting, Client custom styling via url content
1119
- */
1120
- this.clientStylingUrl = '';
1121
- /**
1122
- * Widget Setting, show game in a frame when user clicked 'start'
1123
- */
1124
- this.integratedGameframeMobile = false;
1125
- /**
1126
- * Widget Setting, show game in a frame when user clicked 'start', Open game aframe,
1127
- * gamepageModalurl value should be set
1128
- */
1129
- this.integratedGameframeDesktop = false;
1130
- /**
1131
- * Widget Setting, Load game details when set it as true, default value: false
1132
- * When loadDetails is true and type=='live-casino-tables',
1133
- * Load gameDetails by endpoint/vendor/gameId if livelobbyEndpoint is null
1134
- */
1135
- this.loadDetails = false;
1136
- /**
1137
- * Widget Setting, showRoundBoard, default value: false
1138
- */
1139
- this.showRoundBoard = false;
1140
- /**
1141
- * Game Property, default ''
1142
- */
1143
- this.gameCategory = '';
1144
- /**
1145
- * Game Property, Game lunch platform
1146
- */
1147
- this.platform = 'PC';
1148
- this.thumbnailLoaded = false;
1149
- this.containerClassWhenDetailChange = '';
1150
- this.isUserLoggedIn = false;
1151
- this.limitStylingAppends = false;
1152
- //customize style setting
1153
- this.setClientStyling = () => {
1154
- let sheet = document.createElement('style');
1155
- sheet.innerHTML = this.clientStyling;
1156
- this.stylingContainer.prepend(sheet);
1157
- };
1158
- //customize style setting
1159
- this.setClientStylingURL = () => {
1160
- let url = new URL(this.clientStylingUrl);
1161
- let cssFile = document.createElement('style');
1162
- fetch(url.href)
1163
- .then((res) => res.text())
1164
- .then((data) => {
1165
- cssFile.innerHTML = data;
1166
- setTimeout(() => {
1167
- this.stylingContainer.prepend(cssFile);
1168
- }, 1);
1169
- })
1170
- .catch((err) => {
1171
- console.error('error ', err);
1172
- });
1173
- };
1174
- this.getGameCategoryType = () => {
1175
- if (this.isLiveCasino &&
1176
- this.gameCategory &&
1177
- this.getWidgetTypeByGameCategory(this.gameCategory)) {
1178
- return `casino-extrainfo-${this.getWidgetTypeByGameCategory(this.gameCategory).toLowerCase()}`;
1179
- }
1180
- return `casino-normal-game-thumbnail`;
1181
- };
1182
- this.getGameContainerClass = () => {
1183
- let gameContainerClass = `GameContainer `;
1184
- if (this.gameInfo) {
1185
- if (this.gameInfo && this.gameInfo.details) {
1186
- gameContainerClass += ' ListGame ';
1187
- if (this.gameInfo.details.isOpen &&
1188
- this.gameInfo.details.currentRouletteNumbers) {
1189
- gameContainerClass += ' GameBackdrop ';
1190
- }
1191
- }
1192
- }
1193
- return gameContainerClass;
1194
- };
1195
- }
1196
- onSessionChanged() {
1197
- this.isUserLoggedIn = !!(this.session && this.userId);
1198
- }
1199
- onTableFullChanged(newVal, oldVal) {
1200
- if (oldVal == undefined) {
1201
- return;
1202
- }
1203
- this.containerClassWhenDetailChange =
1204
- newVal && !oldVal ? 'PulsatingRedShadow' : 'PulsatingGreenShadow';
1205
- }
1206
- handleMouseOver(event) {
1207
- this.hover = event.type === 'mouseenter';
1208
- }
1209
- gameFavoritedHandler(event) {
1210
- let eventDetail = event.detail;
1211
- this.gameInfo.isFavorite = eventDetail[this.gameId];
1212
- this.gameInfo = Object.assign({}, this.gameInfo);
1213
- }
1214
- connectLiveHandler() {
1215
- this.toggleConnect();
1216
- }
1217
- visibilityConnectHandler() {
1218
- this.toggleVisibilityConnect();
1219
- }
1220
- gameDetailChangeHandler(e) {
1221
- var _a, _b;
1222
- let message = JSON.parse(e.data);
1223
- if (message.needReconnect && this.liveLobbyConnection) {
1224
- this.liveLobbyConnection.close();
1225
- this.liveLobbyConnection = null;
1226
- this.connectGameToLiveLobby();
1227
- return;
1066
+ constructor(hostRef) {
1067
+ index.registerInstance(this, hostRef);
1068
+ this.toggleFavoriteCasinoGameEvent = index.createEvent(this, "toggleCasinoGameFavorite", 7);
1069
+ this.thumbnailLoaded = false;
1070
+ this.containerClassWhenDetailChange = '';
1071
+ this.isUserLoggedIn = false;
1072
+ this.limitStylingAppends = false;
1073
+ //customize style setting
1074
+ this.setClientStyling = () => {
1075
+ let sheet = document.createElement('style');
1076
+ sheet.innerHTML = this.clientStyling;
1077
+ this.stylingContainer.prepend(sheet);
1078
+ };
1079
+ //customize style setting
1080
+ this.setClientStylingURL = () => {
1081
+ let url = new URL(this.clientStylingUrl);
1082
+ let cssFile = document.createElement('style');
1083
+ fetch(url.href)
1084
+ .then((res) => res.text())
1085
+ .then((data) => {
1086
+ cssFile.innerHTML = data;
1087
+ setTimeout(() => {
1088
+ this.stylingContainer.prepend(cssFile);
1089
+ }, 1);
1090
+ })
1091
+ .catch((err) => {
1092
+ console.error('error ', err);
1093
+ });
1094
+ };
1095
+ this.getGameCategoryType = () => {
1096
+ if (this.isLiveCasino &&
1097
+ this.gameCategory &&
1098
+ this.getWidgetTypeByGameCategory(this.gameCategory)) {
1099
+ return `casino-extrainfo-${this.getWidgetTypeByGameCategory(this.gameCategory).toLowerCase()}`;
1100
+ }
1101
+ return `casino-normal-game-thumbnail`;
1102
+ };
1103
+ this.getGameContainerClass = () => {
1104
+ let gameContainerClass = `GameContainer `;
1105
+ if (this.gameInfo) {
1106
+ if (this.gameInfo && this.gameInfo.details) {
1107
+ gameContainerClass += ' ListGame ';
1108
+ if (this.gameInfo.details.isOpen &&
1109
+ this.gameInfo.details.currentRouletteNumbers) {
1110
+ gameContainerClass += ' GameBackdrop ';
1111
+ }
1112
+ }
1113
+ }
1114
+ return gameContainerClass;
1115
+ };
1116
+ this.language = 'en';
1117
+ this.endpoint = undefined;
1118
+ this.userId = undefined;
1119
+ this.showGameName = undefined;
1120
+ this.session = undefined;
1121
+ this.showFavoredCategory = undefined;
1122
+ this.clientStyling = '';
1123
+ this.clientStylingUrl = '';
1124
+ this.integratedGameframeMobile = false;
1125
+ this.gamepageModalurl = undefined;
1126
+ this.integratedGameframeDesktop = false;
1127
+ this.loadDetails = false;
1128
+ this.showRoundBoard = false;
1129
+ this.visibilityConnect = undefined;
1130
+ this.connectLive = undefined;
1131
+ this.gameCategory = '';
1132
+ this.livelobbyEndpoint = undefined;
1133
+ this.gameId = undefined;
1134
+ this.gameName = undefined;
1135
+ this.subVendor = undefined;
1136
+ this.gameVendor = undefined;
1137
+ this.hasFunMode = undefined;
1138
+ this.hasAnonymousFunMode = undefined;
1139
+ this.platform = 'PC';
1140
+ this.thumbnail = undefined;
1141
+ this.isFavorite = undefined;
1142
+ this.isNew = undefined;
1143
+ this.cellSize = undefined;
1144
+ this.gameTag = undefined;
1145
+ this.type = undefined;
1146
+ this.gameInfo = undefined;
1147
+ this.isTableFull = undefined;
1148
+ this.hover = undefined;
1228
1149
  }
1229
- if (!(message && message.InternalTableId == this.gameId)) {
1230
- return;
1150
+ onSessionChanged() {
1151
+ this.isUserLoggedIn = !!(this.session && this.userId);
1231
1152
  }
1232
- let MessageType = message.MessageType;
1233
- switch (MessageType) {
1234
- case 'TableOpened':
1235
- case 'TableClosed':
1236
- this.gameInfo.details.isOpen = message.Open;
1237
- break;
1238
- case 'PlayersUpdated':
1239
- this.gameInfo.details.numberOfPlayers = message.Players;
1240
- break;
1241
- case 'RouletteResultsUpdated':
1242
- this.gameInfo.details.currentRouletteNumbers = message.Results;
1243
- break;
1244
- case 'DoubleBallRouletteResultsUpdated':
1245
- this.gameInfo.details.currentDoubleBallRouletteNumbers =
1246
- message.Results;
1247
- break;
1248
- case 'SeatsUpdated':
1249
- this.gameInfo.details.currentOccupiedSeats = message.Seats;
1250
- break;
1251
- case 'DealerChanged':
1252
- this.gameInfo.details.dealer = message.Dealer;
1253
- break;
1254
- case 'BaccaratResultsUpdated':
1255
- if (this.showRoundBoard) {
1256
- const Results = message.Results;
1257
- this.gameInfo.details.results = [];
1258
- Results.forEach((item) => {
1259
- this.gameInfo.details.results.push(utils.convertGicBaccaratUpdateItem(item));
1260
- });
1261
- (_a = this.extraInfoRef) === null || _a === void 0 ? void 0 : _a.onBaccaratResultChanged(this.gameInfo.details.results);
1153
+ onTableFullChanged(newVal, oldVal) {
1154
+ if (oldVal == undefined) {
1155
+ return;
1262
1156
  }
1263
- break;
1157
+ this.containerClassWhenDetailChange =
1158
+ newVal && !oldVal ? 'PulsatingRedShadow' : 'PulsatingGreenShadow';
1159
+ }
1160
+ handleMouseOver(event) {
1161
+ this.hover = event.type === 'mouseenter';
1162
+ }
1163
+ gameFavoritedHandler(event) {
1164
+ let eventDetail = event.detail;
1165
+ this.gameInfo.isFavorite = eventDetail[this.gameId];
1166
+ this.gameInfo = Object.assign({}, this.gameInfo);
1264
1167
  }
1265
- this.resetLiveProperties();
1266
- (_b = this.extraInfoRef) === null || _b === void 0 ? void 0 : _b.onGameDetailUpdated(this.gameInfo.details);
1267
- window.postMessage({ messageType: MessageType, value: e.data });
1268
- }
1269
- messageHandler(e) {
1270
- if (e.data.type === `AddFavoriteThumbnail_${this.gameId}` &&
1271
- !this.showFavoredCategory) {
1272
- this.gameInfo.isFavorite = true;
1168
+ connectLiveHandler() {
1169
+ this.toggleConnect();
1273
1170
  }
1274
- if (e.data.type === `RemoveFavoriteThumbnail_${this.gameId}` &&
1275
- !this.showFavoredCategory) {
1276
- this.gameInfo.isFavorite = false;
1171
+ visibilityConnectHandler() {
1172
+ this.toggleVisibilityConnect();
1277
1173
  }
1278
- if (e.data.type === 'UserSessionID') {
1279
- this.isUserLoggedIn = true;
1280
- this.session = e.data.session;
1281
- this.userId = e.data.userID;
1174
+ gameDetailChangeHandler(e) {
1175
+ var _a, _b;
1176
+ let message = JSON.parse(e.data);
1177
+ if (message.needReconnect && this.liveLobbyConnection) {
1178
+ this.liveLobbyConnection.close();
1179
+ this.liveLobbyConnection = null;
1180
+ this.connectGameToLiveLobby();
1181
+ return;
1182
+ }
1183
+ if (!(message && message.InternalTableId == this.gameId)) {
1184
+ return;
1185
+ }
1186
+ let MessageType = message.MessageType;
1187
+ switch (MessageType) {
1188
+ case 'TableOpened':
1189
+ case 'TableClosed':
1190
+ this.gameInfo.details.isOpen = message.Open;
1191
+ break;
1192
+ case 'PlayersUpdated':
1193
+ this.gameInfo.details.numberOfPlayers = message.Players;
1194
+ break;
1195
+ case 'RouletteResultsUpdated':
1196
+ this.gameInfo.details.currentRouletteNumbers = message.Results;
1197
+ break;
1198
+ case 'DoubleBallRouletteResultsUpdated':
1199
+ this.gameInfo.details.currentDoubleBallRouletteNumbers =
1200
+ message.Results;
1201
+ break;
1202
+ case 'SeatsUpdated':
1203
+ this.gameInfo.details.currentOccupiedSeats = message.Seats;
1204
+ break;
1205
+ case 'DealerChanged':
1206
+ this.gameInfo.details.dealer = message.Dealer;
1207
+ break;
1208
+ case 'BaccaratResultsUpdated':
1209
+ if (this.showRoundBoard) {
1210
+ const Results = message.Results;
1211
+ this.gameInfo.details.results = [];
1212
+ Results.forEach((item) => {
1213
+ this.gameInfo.details.results.push(utils.convertGicBaccaratUpdateItem(item));
1214
+ });
1215
+ (_a = this.extraInfoRef) === null || _a === void 0 ? void 0 : _a.onBaccaratResultChanged(this.gameInfo.details.results);
1216
+ }
1217
+ break;
1218
+ }
1219
+ this.resetLiveProperties();
1220
+ (_b = this.extraInfoRef) === null || _b === void 0 ? void 0 : _b.onGameDetailUpdated(this.gameInfo.details);
1221
+ window.postMessage({ messageType: MessageType, value: e.data });
1282
1222
  }
1283
- }
1284
- resetLiveProperties() {
1285
- var _a, _b;
1286
- const details = this.gameInfo.details;
1287
- if (this.isBlackJack(this.gameCategory.toLowerCase())) {
1288
- this.isTableFull =
1289
- details.totalSeats == ((_a = details.currentOccupiedSeats) === null || _a === void 0 ? void 0 : _a.length);
1223
+ messageHandler(e) {
1224
+ if (e.data.type === `AddFavoriteThumbnail_${this.gameId}` &&
1225
+ !this.showFavoredCategory) {
1226
+ this.gameInfo.isFavorite = true;
1227
+ }
1228
+ if (e.data.type === `RemoveFavoriteThumbnail_${this.gameId}` &&
1229
+ !this.showFavoredCategory) {
1230
+ this.gameInfo.isFavorite = false;
1231
+ }
1232
+ if (e.data.type === 'UserSessionID') {
1233
+ this.isUserLoggedIn = true;
1234
+ this.session = e.data.session;
1235
+ this.userId = e.data.userID;
1236
+ }
1290
1237
  }
1291
- else if (this.isBaccarat(this.gameCategory.toLowerCase()) &&
1292
- ((_b = details.baccaratResults) === null || _b === void 0 ? void 0 : _b.length) > 0) {
1293
- this.gameInfo.details.results = [];
1294
- details.baccaratResults.forEach((item) => {
1295
- this.gameInfo.details.results.push(utils.convertGicBaccaratUpdateItem(item));
1296
- });
1297
- delete details.baccaratResults;
1238
+ resetLiveProperties() {
1239
+ var _a, _b;
1240
+ const details = this.gameInfo.details;
1241
+ if (this.isBlackJack(this.gameCategory.toLowerCase())) {
1242
+ this.isTableFull =
1243
+ details.totalSeats == ((_a = details.currentOccupiedSeats) === null || _a === void 0 ? void 0 : _a.length);
1244
+ }
1245
+ else if (this.isBaccarat(this.gameCategory.toLowerCase()) &&
1246
+ ((_b = details.baccaratResults) === null || _b === void 0 ? void 0 : _b.length) > 0) {
1247
+ this.gameInfo.details.results = [];
1248
+ details.baccaratResults.forEach((item) => {
1249
+ this.gameInfo.details.results.push(utils.convertGicBaccaratUpdateItem(item));
1250
+ });
1251
+ delete details.baccaratResults;
1252
+ }
1298
1253
  }
1299
- }
1300
- isBlackJack(gameCategory) {
1301
- return gameCategory.toLowerCase() === gameThumbnail.GAME_CATEGORY.BLACKJACK;
1302
- }
1303
- isBaccarat(gameCategory) {
1304
- return gameCategory.toLowerCase() === gameThumbnail.GAME_CATEGORY.BACCARAT;
1305
- }
1306
- /**
1307
- * Calculate component properties by game info,
1308
- * eg: isLiveCasino, gameInfo, isTableFull
1309
- */
1310
- initCtrlProperties() {
1311
- var _a;
1312
- if (this.isLiveCasino && ((_a = this.gameInfo) === null || _a === void 0 ? void 0 : _a.details)) {
1313
- this.resetLiveProperties();
1254
+ isBlackJack(gameCategory) {
1255
+ return gameCategory.toLowerCase() === gameThumbnail.GAME_CATEGORY.BLACKJACK;
1314
1256
  }
1315
- this.gameInfo = Object.assign({}, this.gameInfo);
1316
- this.triggerExtraInfoLoad();
1317
- if (this.isLiveCasino && this.connectLive === 'connect') {
1318
- this.connectGameToLiveLobby();
1257
+ isBaccarat(gameCategory) {
1258
+ return gameCategory.toLowerCase() === gameThumbnail.GAME_CATEGORY.BACCARAT;
1319
1259
  }
1320
- }
1321
- /**
1322
- * Parse game info by game info api response
1323
- * @param data
1324
- */
1325
- parseGameResponse(data) {
1326
- if (data.length == 1) {
1327
- this.gameInfo = data[0];
1328
- if (this.isLiveCasino) {
1329
- if (!this.gameInfo.details) {
1330
- this.loadGameDetailInfo();
1260
+ /**
1261
+ * Calculate component properties by game info,
1262
+ * eg: isLiveCasino, gameInfo, isTableFull
1263
+ */
1264
+ initCtrlProperties() {
1265
+ var _a;
1266
+ if (this.isLiveCasino && ((_a = this.gameInfo) === null || _a === void 0 ? void 0 : _a.details)) {
1267
+ this.resetLiveProperties();
1331
1268
  }
1332
- else {
1333
- this.parseGameDetailsResponse();
1269
+ this.gameInfo = Object.assign({}, this.gameInfo);
1270
+ this.triggerExtraInfoLoad();
1271
+ if (this.isLiveCasino && this.connectLive === 'connect') {
1272
+ this.connectGameToLiveLobby();
1273
+ }
1274
+ }
1275
+ /**
1276
+ * Parse game info by game info api response
1277
+ * @param data
1278
+ */
1279
+ parseGameResponse(data) {
1280
+ if (data.length == 1) {
1281
+ this.gameInfo = data[0];
1282
+ if (this.isLiveCasino) {
1283
+ if (!this.gameInfo.details) {
1284
+ this.loadGameDetailInfo();
1285
+ }
1286
+ else {
1287
+ this.parseGameDetailsResponse();
1288
+ }
1289
+ }
1290
+ else {
1291
+ this.initCtrlProperties();
1292
+ }
1334
1293
  }
1335
- }
1336
- else {
1337
- this.initCtrlProperties();
1338
- }
1339
1294
  }
1340
- }
1341
- /**
1342
- * Parse game detail info, set it to game info
1343
- */
1344
- parseGameDetailsResponse() {
1345
- this.initCtrlProperties();
1346
- }
1347
- connectGameToLiveLobby() {
1348
- if (EventSource && !this.liveLobbyConnection) {
1349
- const updateUrl = `${this.endpoint}/v1/encoder/lobby/updates/${this.gameInfo.vendor.name}/${this.gameInfo.id}`;
1350
- this.liveLobbyConnection = new eventsource.EventSourcePolyfill(updateUrl);
1351
- this.liveLobbyConnection.addEventListener('message', (evt) => {
1352
- this.gameDetailChangeHandler(evt);
1353
- });
1295
+ /**
1296
+ * Parse game detail info, set it to game info
1297
+ */
1298
+ parseGameDetailsResponse() {
1299
+ this.initCtrlProperties();
1354
1300
  }
1355
- }
1356
- disconnectGameFromLiveLobby() {
1357
- if (this.liveLobbyConnection) {
1358
- this.liveLobbyConnection.removeEventListener('message');
1359
- this.liveLobbyConnection.close();
1360
- this.liveLobbyConnection = undefined;
1301
+ connectGameToLiveLobby() {
1302
+ if (EventSource && !this.liveLobbyConnection) {
1303
+ const updateUrl = `${this.endpoint}/v1/encoder/lobby/updates/${this.gameInfo.vendor.name}/${this.gameInfo.id}`;
1304
+ this.liveLobbyConnection = new eventsource.exports.EventSourcePolyfill(updateUrl);
1305
+ this.liveLobbyConnection.addEventListener('message', (evt) => {
1306
+ this.gameDetailChangeHandler(evt);
1307
+ });
1308
+ }
1361
1309
  }
1362
- }
1363
- toggleConnect() {
1364
- if (!this.isLiveCasino) {
1365
- return;
1310
+ disconnectGameFromLiveLobby() {
1311
+ if (this.liveLobbyConnection) {
1312
+ this.liveLobbyConnection.removeEventListener('message');
1313
+ this.liveLobbyConnection.close();
1314
+ this.liveLobbyConnection = undefined;
1315
+ }
1366
1316
  }
1367
- if (this.connectLive === 'disconnect') {
1368
- this.disconnectGameFromLiveLobby();
1317
+ toggleConnect() {
1318
+ if (!this.isLiveCasino) {
1319
+ return;
1320
+ }
1321
+ if (this.connectLive === 'disconnect') {
1322
+ this.disconnectGameFromLiveLobby();
1323
+ }
1324
+ else if (this.connectLive === 'connect') {
1325
+ this.connectGameToLiveLobby();
1326
+ }
1369
1327
  }
1370
- else if (this.connectLive === 'connect') {
1371
- this.connectGameToLiveLobby();
1328
+ toggleVisibilityConnect() {
1329
+ if (!this.isLiveCasino) {
1330
+ return;
1331
+ }
1332
+ if (this.visibilityConnect === 'disconnect') {
1333
+ this.disconnectGameFromLiveLobby();
1334
+ }
1335
+ else if (this.visibilityConnect === 'connect' &&
1336
+ this.connectLive === 'connect') {
1337
+ this.connectGameToLiveLobby();
1338
+ }
1372
1339
  }
1373
- }
1374
- toggleVisibilityConnect() {
1375
- if (!this.isLiveCasino) {
1376
- return;
1340
+ /**
1341
+ * Get game base info from game api(casino/games/{id})
1342
+ * @private
1343
+ */
1344
+ loadGameById() {
1345
+ let url = `${this.endpoint}/v1/casino/games/${this.gameId}?expand=vendor&platform=${this.platform}&language=${this.language}`;
1346
+ fetch(url)
1347
+ .then((res) => res.json())
1348
+ .then((data) => this.parseGameResponse(data))
1349
+ .catch((err) => {
1350
+ console.error(err);
1351
+ });
1377
1352
  }
1378
- if (this.visibilityConnect === 'disconnect') {
1379
- this.disconnectGameFromLiveLobby();
1353
+ /*
1354
+ * Load game info when widget property 'livelobbyEndpoint' set
1355
+ * @private
1356
+ */
1357
+ loadGameInfoByLobbyEndpoint() {
1358
+ let url = new URL(`${this.livelobbyEndpoint.split('?')[0]}`);
1359
+ url.searchParams.append('expand', 'vendor');
1360
+ url.searchParams.append('platform', this.platform);
1361
+ url.searchParams.append('language', this.language);
1362
+ fetch(url.toString())
1363
+ .then((res) => res.json())
1364
+ .then((data) => this.parseGameResponse(data))
1365
+ .catch((error) => console.error(error));
1380
1366
  }
1381
- else if (this.visibilityConnect === 'connect' &&
1382
- this.connectLive === 'connect') {
1383
- this.connectGameToLiveLobby();
1367
+ /*
1368
+ * load game info when widget property 'livelobbyEndpoint' setted
1369
+ * @private
1370
+ */
1371
+ loadGameDetailInfo() {
1372
+ let url = new URL(`${this.endpoint}/v1/lobby/tables/${this.gameId}`);
1373
+ url.searchParams.append('platform', this.platform);
1374
+ url.searchParams.append('language', this.language);
1375
+ fetch(url.toString())
1376
+ .then((res) => res.json())
1377
+ .then((data) => {
1378
+ if (!(data === null || data === void 0 ? void 0 : data.category)) {
1379
+ return;
1380
+ }
1381
+ this.gameInfo.details = data;
1382
+ this.parseGameDetailsResponse();
1383
+ })
1384
+ .catch((err) => {
1385
+ console.error(err);
1386
+ setTimeout(() => this.loadGameDetailInfo(), 1000);
1387
+ });
1384
1388
  }
1385
- }
1386
- /**
1387
- * Get game base info from game api(casino/games/{id})
1388
- * @private
1389
- */
1390
- loadGameById() {
1391
- let url = `${this.endpoint}/v1/casino/games/${this.gameId}?expand=vendor&platform=${this.platform}&language=${this.language}`;
1392
- fetch(url)
1393
- .then((res) => res.json())
1394
- .then((data) => this.parseGameResponse(data))
1395
- .catch((err) => {
1396
- console.error(err);
1397
- });
1398
- }
1399
- /*
1400
- * Load game info when widget property 'livelobbyEndpoint' set
1401
- * @private
1402
- */
1403
- loadGameInfoByLobbyEndpoint() {
1404
- let url = new URL(`${this.livelobbyEndpoint.split('?')[0]}`);
1405
- url.searchParams.append('expand', 'vendor');
1406
- url.searchParams.append('platform', this.platform);
1407
- url.searchParams.append('language', this.language);
1408
- fetch(url.toString())
1409
- .then((res) => res.json())
1410
- .then((data) => this.parseGameResponse(data))
1411
- .catch((error) => console.error(error));
1412
- }
1413
- /*
1414
- * load game info when widget property 'livelobbyEndpoint' setted
1415
- * @private
1416
- */
1417
- loadGameDetailInfo() {
1418
- let url = new URL(`${this.endpoint}/v1/lobby/tables/${this.gameId}`);
1419
- url.searchParams.append('platform', this.platform);
1420
- url.searchParams.append('language', this.language);
1421
- fetch(url.toString())
1422
- .then((res) => res.json())
1423
- .then((data) => {
1424
- if (!(data === null || data === void 0 ? void 0 : data.category)) {
1425
- return;
1426
- }
1427
- this.gameInfo.details = data;
1428
- this.parseGameDetailsResponse();
1429
- })
1430
- .catch((err) => {
1431
- console.error(err);
1432
- setTimeout(() => this.loadGameDetailInfo(), 1000);
1433
- });
1434
- }
1435
- /**
1436
- * Toggle game favorite property
1437
- * @param gameId
1438
- * @private
1439
- */
1440
- toggleFavoriteGame(gameId) {
1441
- let triggerFactor = 'thumbnail';
1442
- if (this.gameInfo.isFavorite) {
1443
- window.postMessage({ type: 'SetUnfavoredGame', gameId, triggerFactor }, window.location.href);
1389
+ /**
1390
+ * Toggle game favorite property
1391
+ * @param gameId
1392
+ * @private
1393
+ */
1394
+ toggleFavoriteGame(gameId) {
1395
+ let triggerFactor = 'thumbnail';
1396
+ if (this.gameInfo.isFavorite) {
1397
+ window.postMessage({ type: 'SetUnfavoredGame', gameId, triggerFactor }, window.location.href);
1398
+ }
1399
+ else {
1400
+ window.postMessage({ type: 'SetFavoredGame', gameId, triggerFactor }, window.location.href);
1401
+ }
1402
+ this.toggleFavoriteCasinoGameEvent.emit(gameId);
1444
1403
  }
1445
- else {
1446
- window.postMessage({ type: 'SetFavoredGame', gameId, triggerFactor }, window.location.href);
1404
+ /**
1405
+ * Generate gameInfo obj by props
1406
+ * @private
1407
+ */
1408
+ generateGameInfoByProps() {
1409
+ return {
1410
+ id: this.gameId,
1411
+ name: this.gameName,
1412
+ subVendor: this.subVendor,
1413
+ hasFunMode: this.hasFunMode,
1414
+ hasAnonymousFunMode: this.hasAnonymousFunMode,
1415
+ thumbnail: this.thumbnail,
1416
+ cellSize: this.cellSize,
1417
+ gameTag: this.gameTag,
1418
+ vendor: { href: '', name: this.gameVendor },
1419
+ isFavorite: this.isFavorite,
1420
+ isNew: this.isNew,
1421
+ type: this.type,
1422
+ liveCasinoCategory: this.gameCategory || '',
1423
+ };
1447
1424
  }
1448
- this.toggleFavoriteCasinoGameEvent.emit(gameId);
1449
- }
1450
- /**
1451
- * Generate gameInfo obj by props
1452
- * @private
1453
- */
1454
- generateGameInfoByProps() {
1455
- return {
1456
- id: this.gameId,
1457
- name: this.gameName,
1458
- subVendor: this.subVendor,
1459
- hasFunMode: this.hasFunMode,
1460
- hasAnonymousFunMode: this.hasAnonymousFunMode,
1461
- thumbnail: this.thumbnail,
1462
- cellSize: this.cellSize,
1463
- gameTag: this.gameTag,
1464
- vendor: { href: '', name: this.gameVendor },
1465
- isFavorite: this.isFavorite,
1466
- isNew: this.isNew,
1467
- type: this.type,
1468
- liveCasinoCategory: this.gameCategory || '',
1469
- };
1470
- }
1471
- triggerExtraInfoLoad() {
1472
- var _a, _b;
1473
- //Init this.extraInfoRef, prepare for data loader, this.gameInfo did not inited might
1474
- this.extraInfoRef =
1475
- this.extraInfoRef ||
1476
- ((_a = this.extraInfoSlotRef) === null || _a === void 0 ? void 0 : _a.querySelector(this.getGameCategoryType()));
1477
- (_b = this.extraInfoRef) === null || _b === void 0 ? void 0 : _b.onGameLoaded(this.gameInfo);
1478
- window.postMessage({
1479
- type: 'casinoGameLoaded',
1480
- gameInfo: this.gameInfo,
1481
- });
1482
- }
1483
- componentDidRender() {
1484
- // start custom styling area
1485
- if (!this.limitStylingAppends && this.stylingContainer) {
1486
- if (this.clientStyling)
1487
- this.setClientStyling();
1488
- if (this.clientStylingUrl)
1489
- this.setClientStylingURL();
1490
- this.limitStylingAppends = true;
1425
+ triggerExtraInfoLoad() {
1426
+ var _a, _b;
1427
+ //Init this.extraInfoRef, prepare for data loader, this.gameInfo did not inited might
1428
+ this.extraInfoRef =
1429
+ this.extraInfoRef ||
1430
+ ((_a = this.extraInfoSlotRef) === null || _a === void 0 ? void 0 : _a.querySelector(this.getGameCategoryType()));
1431
+ (_b = this.extraInfoRef) === null || _b === void 0 ? void 0 : _b.onGameLoaded(this.gameInfo);
1432
+ window.postMessage({
1433
+ type: 'casinoGameLoaded',
1434
+ gameInfo: this.gameInfo,
1435
+ });
1491
1436
  }
1492
- // end custom styling area 500)
1493
- if (this.gameInfo) {
1494
- this.triggerExtraInfoLoad();
1437
+ componentDidRender() {
1438
+ // start custom styling area
1439
+ if (!this.limitStylingAppends && this.stylingContainer) {
1440
+ if (this.clientStyling)
1441
+ this.setClientStyling();
1442
+ if (this.clientStylingUrl)
1443
+ this.setClientStylingURL();
1444
+ this.limitStylingAppends = true;
1445
+ }
1446
+ // end custom styling area 500)
1447
+ if (this.gameInfo) {
1448
+ this.triggerExtraInfoLoad();
1449
+ }
1495
1450
  }
1496
- }
1497
- componentDidLoad() {
1498
- window.addEventListener('message', this.messageHandler);
1499
- }
1500
- componentWillLoad() {
1501
- this.isLiveCasino = this.type == gameThumbnail.GAME_TYPE.LIVE_CASINO;
1502
- this.extraInfoWidget = this.getGameCategoryType();
1503
- this.isUserLoggedIn = !!(this.session && this.userId);
1504
- if (this.isLiveCasino && this.livelobbyEndpoint) {
1505
- this.loadGameInfoByLobbyEndpoint();
1506
- return;
1451
+ componentDidLoad() {
1452
+ window.addEventListener('message', this.messageHandler);
1507
1453
  }
1508
- //generate gameInfo obj by props
1509
- if (this.thumbnail) {
1510
- this.gameInfo = this.generateGameInfoByProps();
1511
- // loadLiveDetails if game is live casino
1512
- if (this.isLiveCasino &&
1513
- this.endpoint &&
1514
- this.loadDetails &&
1515
- this.gameId) {
1516
- this.loadGameDetailInfo();
1517
- }
1518
- return;
1454
+ componentWillLoad() {
1455
+ this.isLiveCasino = this.type == gameThumbnail.GAME_TYPE.LIVE_CASINO;
1456
+ this.extraInfoWidget = this.getGameCategoryType();
1457
+ this.isUserLoggedIn = !!(this.session && this.userId);
1458
+ if (this.isLiveCasino && this.livelobbyEndpoint) {
1459
+ this.loadGameInfoByLobbyEndpoint();
1460
+ return;
1461
+ }
1462
+ //generate gameInfo obj by props
1463
+ if (this.thumbnail) {
1464
+ this.gameInfo = this.generateGameInfoByProps();
1465
+ // loadLiveDetails if game is live casino
1466
+ if (this.isLiveCasino &&
1467
+ this.endpoint &&
1468
+ this.loadDetails &&
1469
+ this.gameId) {
1470
+ this.loadGameDetailInfo();
1471
+ }
1472
+ return;
1473
+ }
1474
+ //fetch data from api if no game properties set except gameId
1475
+ if (this.gameId && this.endpoint) {
1476
+ this.loadGameById();
1477
+ }
1519
1478
  }
1520
- //fetch data from api if no game properties set except gameId
1521
- if (this.gameId && this.endpoint) {
1522
- this.loadGameById();
1479
+ disconnectedCallback() {
1480
+ if (this.liveLobbyConnection) {
1481
+ this.liveLobbyConnection.removeEventListener('message', this.gameDetailChangeHandler);
1482
+ }
1483
+ window.removeEventListener('message', this.messageHandler);
1523
1484
  }
1524
- }
1525
- disconnectedCallback() {
1526
- if (this.liveLobbyConnection) {
1527
- this.liveLobbyConnection.removeEventListener('message', this.gameDetailChangeHandler);
1485
+ // end custom styling area
1486
+ getWidgetTypeByGameCategory(gameCategory) {
1487
+ return gameThumbnail.WIDGETTYPE_GAMECATEGORY[gameCategory.toLowerCase()];
1528
1488
  }
1529
- window.removeEventListener('message', this.messageHandler);
1530
- }
1531
- // end custom styling area
1532
- getWidgetTypeByGameCategory(gameCategory) {
1533
- return gameThumbnail.WIDGETTYPE_GAMECATEGORY[gameCategory.toLowerCase()];
1534
- }
1535
- getGameOverlayProps() {
1536
- var _a, _b;
1537
- return {
1538
- gameName: this.gameInfo.name,
1539
- gameId: this.gameInfo.gameId,
1540
- gameVendor: this.gameVendor || ((_b = (_a = this.gameInfo) === null || _a === void 0 ? void 0 : _a.vendor) === null || _b === void 0 ? void 0 : _b.name),
1541
- hasFunMode: this.gameInfo.hasFunMode,
1542
- language: this.language,
1543
- integratedGameframeMobile: this.integratedGameframeMobile,
1544
- integratedGameframeDesktop: this.integratedGameframeDesktop,
1545
- gamepageModalurl: this.gamepageModalurl,
1546
- };
1547
- }
1548
- render() {
1549
- var _a, _b;
1550
- if (!this.gameInfo) {
1551
- return (index.h("div", { class: "GameInnerContainer", part: "GameInnerContainer", slot: "Game-Inner" }, index.h("img", { src: this.thumbnail, alt: "", loading: "lazy", part: "GameContainer", class: "GameContainer", onLoad: () => (this.thumbnailLoaded = true) })));
1489
+ getGameOverlayProps() {
1490
+ var _a, _b;
1491
+ return {
1492
+ gameName: this.gameInfo.name,
1493
+ gameId: this.gameInfo.gameId,
1494
+ gameVendor: this.gameVendor || ((_b = (_a = this.gameInfo) === null || _a === void 0 ? void 0 : _a.vendor) === null || _b === void 0 ? void 0 : _b.name),
1495
+ hasFunMode: this.gameInfo.hasFunMode,
1496
+ language: this.language,
1497
+ integratedGameframeMobile: this.integratedGameframeMobile,
1498
+ integratedGameframeDesktop: this.integratedGameframeDesktop,
1499
+ gamepageModalurl: this.gamepageModalurl,
1500
+ };
1552
1501
  }
1553
- const gameOverlayProps = this.getGameOverlayProps();
1554
- const gameThumbnail = ((_a = this.gameInfo) === null || _a === void 0 ? void 0 : _a.thumbnail) || ((_b = this.gameInfo) === null || _b === void 0 ? void 0 : _b.defaultThumbnail);
1555
- const gameContainerClass = this.getGameContainerClass();
1556
- const gameThumbnailClass = `GameBg ${this.cellSize ? 'GameBg-' + this.cellSize : ''}
1502
+ render() {
1503
+ var _a, _b;
1504
+ if (!this.gameInfo) {
1505
+ return (index.h("div", { class: "GameInnerContainer", part: "GameInnerContainer", slot: "Game-Inner" }, index.h("img", { src: this.thumbnail, alt: "", loading: "lazy", part: "GameContainer", class: "GameContainer", onLoad: () => (this.thumbnailLoaded = true) })));
1506
+ }
1507
+ const gameOverlayProps = this.getGameOverlayProps();
1508
+ const gameThumbnail = ((_a = this.gameInfo) === null || _a === void 0 ? void 0 : _a.thumbnail) || ((_b = this.gameInfo) === null || _b === void 0 ? void 0 : _b.defaultThumbnail);
1509
+ const gameContainerClass = this.getGameContainerClass();
1510
+ const gameThumbnailClass = `GameBg ${this.cellSize ? 'GameBg-' + this.cellSize : ''}
1557
1511
  ${this.hover ? ' GameContainerHovered' : ''} ${this.thumbnailLoaded ? ' Loaded' : ''}`;
1558
- return (index.h("div", { class: `${gameContainerClass} ${this.containerClassWhenDetailChange}`, part: `${gameContainerClass} ${this.containerClassWhenDetailChange}`, ref: (el) => (this.stylingContainer = el), "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrl }, index.h("div", { class: `GameInnerContainer ${this.hover ? 'Hovered' : ''}`, part: `GameInnerContainer ${this.hover ? 'Hovered' : ''}` }, index.h("img", { src: gameThumbnail, alt: "Game Thumbnail ", loading: "lazy", part: gameThumbnailClass, class: gameThumbnailClass, onLoad: () => (this.thumbnailLoaded = true) }), this.isUserLoggedIn && (index.h("div", { class: `FavIconContainer ${this.gameInfo.isFavorite ? 'Favorited' : ''}`, part: `FavIconContainer ${this.gameInfo.isFavorite ? 'Favorited' : ''}`, onClick: () => this.toggleFavoriteGame(this.gameId) }, this.gameInfo.isFavorite ? (index.h("slot", { name: "fav-icon" }, index.h("span", { class: "FavoredIcon", part: "FavoredIcon", innerHTML: Fav }))) : (index.h("slot", { name: "UnFavIcon" }, !utils.isMobile(window.navigator.userAgent) && (index.h("span", { class: "UnfavoredIcon", part: "UnfavoredIcon", innerHTML: UnFavSvg })))))), index.h("slot", { name: "game-overlay" }, index.h("casino-game-thumbnail-overlay", Object.assign({ language: this.language }, gameOverlayProps))), index.h("slot", { name: "extra-info", ref: (el) => (this.extraInfoSlotRef = el) }, index.h(this.extraInfoWidget, { language: this.language, "show-round-board": this.showRoundBoard })), index.h("slot", { name: "game-property-slot" })), this.showGameName && (index.h("slot", { name: "game-name" }, index.h("p", { class: "GameNameBelow", part: "GameNameBelow", title: gameOverlayProps.gameName }, gameOverlayProps.gameName)))));
1559
- }
1560
- static get assetsDirs() { return ["static"]; }
1561
- static get watchers() { return {
1562
- "session": ["onSessionChanged"],
1563
- "userId": ["onSessionChanged"],
1564
- "isTableFull": ["onTableFullChanged"],
1565
- "connectLive": ["connectLiveHandler"],
1566
- "visibilityConnect": ["visibilityConnectHandler"]
1567
- }; }
1512
+ return (index.h("div", { class: `${gameContainerClass} ${this.containerClassWhenDetailChange}`, part: `${gameContainerClass} ${this.containerClassWhenDetailChange}`, ref: (el) => (this.stylingContainer = el), "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrl }, index.h("div", { class: `GameInnerContainer ${this.hover ? 'Hovered' : ''}`, part: `GameInnerContainer ${this.hover ? 'Hovered' : ''}` }, index.h("img", { src: gameThumbnail, alt: "Game Thumbnail ", loading: "lazy", part: gameThumbnailClass, class: gameThumbnailClass, onLoad: () => (this.thumbnailLoaded = true) }), this.isUserLoggedIn && (index.h("div", { class: `FavIconContainer ${this.gameInfo.isFavorite ? 'Favorited' : ''}`, part: `FavIconContainer ${this.gameInfo.isFavorite ? 'Favorited' : ''}`, onClick: () => this.toggleFavoriteGame(this.gameId) }, this.gameInfo.isFavorite ? (index.h("slot", { name: "fav-icon" }, index.h("span", { class: "FavoredIcon", part: "FavoredIcon", innerHTML: favSvg }))) : (index.h("slot", { name: "UnFavIcon" }, !utils.isMobile(window.navigator.userAgent) && (index.h("span", { class: "UnfavoredIcon", part: "UnfavoredIcon", innerHTML: unfavSvg })))))), index.h("slot", { name: "game-overlay" }, index.h("casino-game-thumbnail-overlay", Object.assign({ language: this.language }, gameOverlayProps))), index.h("slot", { name: "extra-info", ref: (el) => (this.extraInfoSlotRef = el) }, index.h(this.extraInfoWidget, { language: this.language, "show-round-board": this.showRoundBoard })), index.h("slot", { name: "game-property-slot" })), this.showGameName && (index.h("slot", { name: "game-name" }, index.h("p", { class: "GameNameBelow", part: "GameNameBelow", title: gameOverlayProps.gameName }, gameOverlayProps.gameName)))));
1513
+ }
1514
+ static get assetsDirs() { return ["static"]; }
1515
+ static get watchers() { return {
1516
+ "session": ["onSessionChanged"],
1517
+ "userId": ["onSessionChanged"],
1518
+ "isTableFull": ["onTableFullChanged"],
1519
+ "connectLive": ["connectLiveHandler"],
1520
+ "visibilityConnect": ["visibilityConnectHandler"]
1521
+ }; }
1568
1522
  };
1569
- CasinoGameThumbView.style = casinoGameThumbViewCss;
1523
+ CasinoGameThumbView.style = CasinoGameThumbViewStyle0;
1570
1524
 
1571
1525
  const casinoGameThumbnailOverlayCss = ":host{display:block}.GameInfoWrapper{display:none;position:absolute;width:100%;height:100%;top:0;right:0;bottom:0;left:0;background:rgba(0, 0, 0, 0.65);z-index:15}.GameInfoWrapper .GameInfo{display:flex;width:100%;height:100%;flex-direction:column;align-items:center;justify-content:center}.GameInfoWrapper .GameInfoName{color:white;margin-bottom:10px;text-align:center;font-size:14px}.GameInfoWrapper .GameInfoBtn{appearance:none;padding:6px;background:var(--emfe-w-color-primary, #D0046C);color:var(--emfe-w-color-primary-50, #FBECF4);font-size:16px;border:2px solid var(--emfe-w-color-primary-600, #99034F);border-radius:5px;cursor:pointer;transition:border 150ms ease-in-out}.GameInfoWrapper .GameInfoBtn:hover{border:2px solid var(--emfe-w-color-primary-100, #F1BED9)}.GameInfoVendor{display:block;position:absolute;bottom:8px;right:8px;color:white;font-size:12px;font-weight:normal}.GameInfoWrapper:hover{display:block !important}";
1526
+ const CasinoGameThumbnailOverlayStyle0 = casinoGameThumbnailOverlayCss;
1572
1527
 
1573
1528
  const CasinoGameThumbnailOverlay = class {
1574
- constructor(hostRef) {
1575
- index.registerInstance(this, hostRef);
1576
- this.playClicked = index.createEvent(this, "playCasinoGame", 7);
1577
- /**
1578
- * Widget Setting, show game in a frame when user clicked 'start', default: false
1579
- */
1580
- this.integratedGameframeMobile = false;
1581
- /**
1582
- * Widget Setting, show game in a frame when user clicked 'start', default: false
1583
- * Open game in a frame, gamepageModalurl value should be set
1584
- */
1585
- this.integratedGameframeDesktop = false;
1586
- /**
1587
- * Language
1588
- */
1589
- this.language = 'en';
1590
- this.userAgent = window.navigator.userAgent;
1591
- }
1592
- onPlayNowClicked() {
1593
- this.playClicked.emit(this.gameId);
1594
- let modalEventData = {
1595
- gameId: this.gameId,
1596
- isMobile: utils.isMobile(this.userAgent),
1597
- };
1598
- let isFrameMode = this.integratedGameframeMobile || this.integratedGameframeDesktop;
1599
- window.postMessage({
1600
- type: isFrameMode ? 'OpenGameFrame' : 'ShowGameModal',
1601
- eventData: isFrameMode
1602
- ? Object.assign(Object.assign({}, modalEventData), { gamefunmode: this.hasFunMode, source: 'GameThumbnail', identifier: 'Lobby' }) : modalEventData,
1603
- }, window.location.href);
1604
- }
1605
- render() {
1606
- return (index.h("div", { class: "GameInfoWrapper", part: "GameInfoWrapper" }, index.h("div", { class: "GameInfo ", part: "GameInfo " }, index.h("p", { class: "GameInfoName", part: "GameInfoName", title: this.gameName }, ' ', this.gameName, ' '), index.h("button", { class: "GameInfoBtn", part: "GameInfoBtn", onClick: () => this.onPlayNowClicked() }, locale_utils.translate('playNow', this.language))), index.h("slot", { name: "vendor-name" }, index.h("span", { class: "GameInfoVendor", part: "GameInfoVendor" }, this.gameVendor))));
1607
- }
1529
+ constructor(hostRef) {
1530
+ index.registerInstance(this, hostRef);
1531
+ this.playClicked = index.createEvent(this, "playCasinoGame", 7);
1532
+ this.userAgent = window.navigator.userAgent;
1533
+ this.gamepageModalurl = undefined;
1534
+ this.integratedGameframeMobile = false;
1535
+ this.integratedGameframeDesktop = false;
1536
+ this.language = 'en';
1537
+ this.gameName = undefined;
1538
+ this.gameVendor = undefined;
1539
+ this.gameId = undefined;
1540
+ this.hasFunMode = undefined;
1541
+ }
1542
+ onPlayNowClicked() {
1543
+ this.playClicked.emit(this.gameId);
1544
+ let modalEventData = {
1545
+ gameId: this.gameId,
1546
+ isMobile: utils.isMobile(this.userAgent),
1547
+ };
1548
+ let isFrameMode = this.integratedGameframeMobile || this.integratedGameframeDesktop;
1549
+ window.postMessage({
1550
+ type: isFrameMode ? 'OpenGameFrame' : 'ShowGameModal',
1551
+ eventData: isFrameMode
1552
+ ? Object.assign(Object.assign({}, modalEventData), { gamefunmode: this.hasFunMode, source: 'GameThumbnail', identifier: 'Lobby' }) : modalEventData,
1553
+ }, window.location.href);
1554
+ }
1555
+ render() {
1556
+ return (index.h("div", { key: 'b552e85f9652d467595f9603e564387148d81417', class: "GameInfoWrapper", part: "GameInfoWrapper" }, index.h("div", { key: 'c8ad8953997fa38e46f076be71c8a26a5a47afcd', class: "GameInfo ", part: "GameInfo " }, index.h("p", { key: '7477d68d364589d8fd2ef80ec15f4457a0f8c69d', class: "GameInfoName", part: "GameInfoName", title: this.gameName }, ' ', this.gameName, ' '), index.h("button", { key: '280a36956cf541b909c8c6269f2bfd0e51ebf07b', class: "GameInfoBtn", part: "GameInfoBtn", onClick: () => this.onPlayNowClicked() }, locale_utils.translate('playNow', this.language))), index.h("slot", { key: '79c3e4ceb605025b5b25be04339a63096cd36e28', name: "vendor-name" }, index.h("span", { key: 'fdb2ebaa6eaf1f3e11356aff6c043ed6a0c41a35', class: "GameInfoVendor", part: "GameInfoVendor" }, this.gameVendor))));
1557
+ }
1608
1558
  };
1609
- CasinoGameThumbnailOverlay.style = casinoGameThumbnailOverlayCss;
1559
+ CasinoGameThumbnailOverlay.style = CasinoGameThumbnailOverlayStyle0;
1610
1560
 
1611
1561
  exports.casino_game_thumb_view = CasinoGameThumbView;
1612
1562
  exports.casino_game_thumbnail_overlay = CasinoGameThumbnailOverlay;