@xylabs/sdk-react 2.9.9 → 2.9.13

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 (272) hide show
  1. package/dist/calcSpacing.js +3 -3
  2. package/dist/calcSpacing.js.map +1 -1
  3. package/dist/cjs5/components/Portal.d.ts +1 -0
  4. package/dist/cjs5/index.js +1127 -1651
  5. package/dist/cjs5/index.js.map +1 -1
  6. package/dist/components/AppBarEx/AppBarEx.js +7 -7
  7. package/dist/components/AppBarEx/AppBarEx.js.map +1 -1
  8. package/dist/components/AppBarEx/AppBarEx.stories.js +3 -4
  9. package/dist/components/AppBarEx/AppBarEx.stories.js.map +1 -1
  10. package/dist/components/Background.js +2 -3
  11. package/dist/components/Background.js.map +1 -1
  12. package/dist/components/BasePage/BasePage.js +7 -6
  13. package/dist/components/BasePage/BasePage.js.map +1 -1
  14. package/dist/components/BasePage/BasePage.stories.js +5 -6
  15. package/dist/components/BasePage/BasePage.stories.js.map +1 -1
  16. package/dist/components/Breadcrumbs/BreadcrumbsEx.js +12 -12
  17. package/dist/components/Breadcrumbs/BreadcrumbsEx.js.map +1 -1
  18. package/dist/components/Breadcrumbs/BreadcrumbsEx.stories.js +4 -5
  19. package/dist/components/Breadcrumbs/BreadcrumbsEx.stories.js.map +1 -1
  20. package/dist/components/BusyCircularProgress.js +5 -5
  21. package/dist/components/BusyCircularProgress.js.map +1 -1
  22. package/dist/components/BusyLinearProgress.js +5 -5
  23. package/dist/components/BusyLinearProgress.js.map +1 -1
  24. package/dist/components/ButtonEx/ButtonEx.js +5 -5
  25. package/dist/components/ButtonEx/ButtonEx.js.map +1 -1
  26. package/dist/components/ButtonEx/ButtonEx.stories.js +5 -6
  27. package/dist/components/ButtonEx/ButtonEx.stories.js.map +1 -1
  28. package/dist/components/ButtonEx/ButtonExBase.js +6 -6
  29. package/dist/components/ButtonEx/ButtonExBase.js.map +1 -1
  30. package/dist/components/ButtonEx/ButtonExTo.js +6 -6
  31. package/dist/components/ButtonEx/ButtonExTo.js.map +1 -1
  32. package/dist/components/CookieConsent/CookieConsent.js +5 -6
  33. package/dist/components/CookieConsent/CookieConsent.js.map +1 -1
  34. package/dist/components/CookieConsent/CookieConsent.stories.js +10 -11
  35. package/dist/components/CookieConsent/CookieConsent.stories.js.map +1 -1
  36. package/dist/components/CookieConsent/CookieConsentBody.js +11 -11
  37. package/dist/components/CookieConsent/CookieConsentBody.js.map +1 -1
  38. package/dist/components/CoverProgress.js +4 -5
  39. package/dist/components/CoverProgress.js.map +1 -1
  40. package/dist/components/Errors/ErrorViewer.js +5 -5
  41. package/dist/components/Errors/ErrorViewer.js.map +1 -1
  42. package/dist/components/Errors/ErrorViewer.stories.js +3 -4
  43. package/dist/components/Errors/ErrorViewer.stories.js.map +1 -1
  44. package/dist/components/Errors/ErrorsViewer.js +5 -5
  45. package/dist/components/Errors/ErrorsViewer.js.map +1 -1
  46. package/dist/components/Errors/ErrorsViewer.stories.js +3 -4
  47. package/dist/components/Errors/ErrorsViewer.stories.js.map +1 -1
  48. package/dist/components/EthAccount/EthAccount.js +12 -12
  49. package/dist/components/EthAccount/EthAccount.js.map +1 -1
  50. package/dist/components/EthAccount/EthAccount.stories.js +8 -9
  51. package/dist/components/EthAccount/EthAccount.stories.js.map +1 -1
  52. package/dist/components/EthBlock.js +3 -4
  53. package/dist/components/EthBlock.js.map +1 -1
  54. package/dist/components/Experiments/Experiment.js +2 -2
  55. package/dist/components/Experiments/Experiment.js.map +1 -1
  56. package/dist/components/Experiments/Experiments.js +43 -66
  57. package/dist/components/Experiments/Experiments.js.map +1 -1
  58. package/dist/components/Experiments/Experiments.stories.js +5 -6
  59. package/dist/components/Experiments/Experiments.stories.js.map +1 -1
  60. package/dist/components/Experiments/ExperimentsDebugger.js +20 -22
  61. package/dist/components/Experiments/ExperimentsDebugger.js.map +1 -1
  62. package/dist/components/Experiments/ExperimentsDebugger.stories.js +3 -4
  63. package/dist/components/Experiments/ExperimentsDebugger.stories.js.map +1 -1
  64. package/dist/components/Experiments/models/index.js +2 -2
  65. package/dist/components/Experiments/models/index.js.map +1 -1
  66. package/dist/components/FlexBox/BusyBox.js +6 -6
  67. package/dist/components/FlexBox/BusyBox.js.map +1 -1
  68. package/dist/components/FlexBox/BusyBox.stories.js +7 -8
  69. package/dist/components/FlexBox/BusyBox.stories.js.map +1 -1
  70. package/dist/components/FlexBox/FlexCol.js +4 -5
  71. package/dist/components/FlexBox/FlexCol.js.map +1 -1
  72. package/dist/components/FlexBox/FlexCol.stories.js +10 -11
  73. package/dist/components/FlexBox/FlexCol.stories.js.map +1 -1
  74. package/dist/components/FlexBox/FlexRow.js +4 -5
  75. package/dist/components/FlexBox/FlexRow.js.map +1 -1
  76. package/dist/components/FlexBox/FlexRow.stories.js +14 -15
  77. package/dist/components/FlexBox/FlexRow.stories.js.map +1 -1
  78. package/dist/components/HoverScale.js +12 -15
  79. package/dist/components/HoverScale.js.map +1 -1
  80. package/dist/components/Identicon.js +22 -22
  81. package/dist/components/Identicon.js.map +1 -1
  82. package/dist/components/InvertableThemeProvider/InvertableThemeContext.js +1 -1
  83. package/dist/components/InvertableThemeProvider/InvertableThemeContext.js.map +1 -1
  84. package/dist/components/InvertableThemeProvider/InvertableThemeProvider.js +7 -9
  85. package/dist/components/InvertableThemeProvider/InvertableThemeProvider.js.map +1 -1
  86. package/dist/components/InvertableThemeProvider/InvertableThemeProvider.stories.js +3 -4
  87. package/dist/components/InvertableThemeProvider/InvertableThemeProvider.stories.js.map +1 -1
  88. package/dist/components/LinkEx/LinkToEx.js +4 -4
  89. package/dist/components/LinkEx/LinkToEx.js.map +1 -1
  90. package/dist/components/NumberStatus/NumberStatus.js +10 -10
  91. package/dist/components/NumberStatus/NumberStatus.js.map +1 -1
  92. package/dist/components/NumberStatus/NumberStatus.stories.js +11 -12
  93. package/dist/components/NumberStatus/NumberStatus.stories.js.map +1 -1
  94. package/dist/components/Portal.d.ts +1 -0
  95. package/dist/components/Portal.js +21 -0
  96. package/dist/components/Portal.js.map +1 -0
  97. package/dist/components/QuickTipButton/QuickTipButton.js +5 -5
  98. package/dist/components/QuickTipButton/QuickTipButton.js.map +1 -1
  99. package/dist/components/QuickTipButton/QuickTipButton.stories.js +3 -4
  100. package/dist/components/QuickTipButton/QuickTipButton.stories.js.map +1 -1
  101. package/dist/components/RedirectWithQuery.js +6 -8
  102. package/dist/components/RedirectWithQuery.js.map +1 -1
  103. package/dist/components/RichResult/RichResult.js +4 -5
  104. package/dist/components/RichResult/RichResult.js.map +1 -1
  105. package/dist/components/ScrollToTop.js +3 -3
  106. package/dist/components/ScrollToTop.js.map +1 -1
  107. package/dist/components/ScrollToTopButton.js +8 -8
  108. package/dist/components/ScrollToTopButton.js.map +1 -1
  109. package/dist/components/TokenAmount/TokenAmount.js +8 -8
  110. package/dist/components/TokenAmount/TokenAmount.js.map +1 -1
  111. package/dist/components/TokenAmount/TokenAmount.stories.js +9 -10
  112. package/dist/components/TokenAmount/TokenAmount.stories.js.map +1 -1
  113. package/dist/components/dialogs/ErrorDialog.js +12 -12
  114. package/dist/components/dialogs/ErrorDialog.js.map +1 -1
  115. package/dist/components/dialogs/ErrorDialog.stories.js +3 -4
  116. package/dist/components/dialogs/ErrorDialog.stories.js.map +1 -1
  117. package/dist/components/dialogs/MessageDialog.js +4 -4
  118. package/dist/components/dialogs/MessageDialog.js.map +1 -1
  119. package/dist/components/dialogs/MessageDialog.stories.js +3 -4
  120. package/dist/components/dialogs/MessageDialog.stories.js.map +1 -1
  121. package/dist/contexts/CookieConsent/Context.js +1 -1
  122. package/dist/contexts/CookieConsent/Context.js.map +1 -1
  123. package/dist/contexts/CookieConsent/Loader.js +8 -10
  124. package/dist/contexts/CookieConsent/Loader.js.map +1 -1
  125. package/dist/contexts/CookieConsent/use.js +1 -1
  126. package/dist/contexts/CookieConsent/use.js.map +1 -1
  127. package/dist/contexts/Ethers/Context.js +1 -1
  128. package/dist/contexts/Ethers/Context.js.map +1 -1
  129. package/dist/contexts/Ethers/Infura.js +8 -9
  130. package/dist/contexts/Ethers/Infura.js.map +1 -1
  131. package/dist/contexts/Ethers/Loader.js +3 -3
  132. package/dist/contexts/Ethers/Loader.js.map +1 -1
  133. package/dist/contexts/Ethers/MetaMask.js +73 -100
  134. package/dist/contexts/Ethers/MetaMask.js.map +1 -1
  135. package/dist/contexts/Ethers/MyEtherWallet.js +54 -80
  136. package/dist/contexts/Ethers/MyEtherWallet.js.map +1 -1
  137. package/dist/contexts/Ethers/Opera.js +39 -51
  138. package/dist/contexts/Ethers/Opera.js.map +1 -1
  139. package/dist/contexts/Ethers/Trust.js +30 -42
  140. package/dist/contexts/Ethers/Trust.js.map +1 -1
  141. package/dist/contexts/NetworkSettings/Context.js +1 -1
  142. package/dist/contexts/NetworkSettings/Context.js.map +1 -1
  143. package/dist/contexts/NetworkSettings/Loader.js +3 -4
  144. package/dist/contexts/NetworkSettings/Loader.js.map +1 -1
  145. package/dist/contexts/UserEvents/Context.js +1 -1
  146. package/dist/contexts/UserEvents/Context.js.map +1 -1
  147. package/dist/contexts/UserEvents/Loader.js +2 -4
  148. package/dist/contexts/UserEvents/Loader.js.map +1 -1
  149. package/dist/esm2015/components/Portal.d.ts +1 -0
  150. package/dist/esm2015/index.js +1127 -1651
  151. package/dist/esm2015/index.js.map +1 -1
  152. package/dist/esm2017/components/Portal.d.ts +1 -0
  153. package/dist/esm2017/index.js +1127 -1651
  154. package/dist/esm2017/index.js.map +1 -1
  155. package/dist/esm5/components/Portal.d.ts +1 -0
  156. package/dist/esm5/index.js +1127 -1651
  157. package/dist/esm5/index.js.map +1 -1
  158. package/dist/hooks/useBreakpoint.js +7 -7
  159. package/dist/hooks/useBreakpoint.js.map +1 -1
  160. package/dist/hooks/useLocalStorage.js +5 -6
  161. package/dist/hooks/useLocalStorage.js.map +1 -1
  162. package/dist/hooks/useMounted.js +5 -6
  163. package/dist/hooks/useMounted.js.map +1 -1
  164. package/dist/hooks/useNavigateToEthAddress.js +7 -7
  165. package/dist/hooks/useNavigateToEthAddress.js.map +1 -1
  166. package/dist/hooks/useSpacing.js +2 -2
  167. package/dist/hooks/useSpacing.js.map +1 -1
  168. package/dist/hooks/useUserEvents.js +5 -2
  169. package/dist/hooks/useUserEvents.js.map +1 -1
  170. package/dist/hooks/useWebP.js +19 -32
  171. package/dist/hooks/useWebP.js.map +1 -1
  172. package/dist/hooks/useWindowSize.js +4 -5
  173. package/dist/hooks/useWindowSize.js.map +1 -1
  174. package/dist/lib/Tracking/Drip/BaseEvent.js +18 -28
  175. package/dist/lib/Tracking/Drip/BaseEvent.js.map +1 -1
  176. package/dist/lib/Tracking/Drip/CustomEvent.js +2 -8
  177. package/dist/lib/Tracking/Drip/CustomEvent.js.map +1 -1
  178. package/dist/lib/Tracking/Drip/StandardEvents.js +4 -7
  179. package/dist/lib/Tracking/Drip/StandardEvents.js.map +1 -1
  180. package/dist/lib/Tracking/Facebook/BaseEvent.js +8 -16
  181. package/dist/lib/Tracking/Facebook/BaseEvent.js.map +1 -1
  182. package/dist/lib/Tracking/Facebook/CustomEvent.js +8 -21
  183. package/dist/lib/Tracking/Facebook/CustomEvent.js.map +1 -1
  184. package/dist/lib/Tracking/Facebook/Fbq.js +11 -13
  185. package/dist/lib/Tracking/Facebook/Fbq.js.map +1 -1
  186. package/dist/lib/Tracking/Facebook/StandardEvent.js +8 -21
  187. package/dist/lib/Tracking/Facebook/StandardEvent.js.map +1 -1
  188. package/dist/lib/Tracking/Facebook/StandardEvents.js +38 -42
  189. package/dist/lib/Tracking/Facebook/StandardEvents.js.map +1 -1
  190. package/dist/lib/Tracking/Facebook/UserEventHandler.js +23 -54
  191. package/dist/lib/Tracking/Facebook/UserEventHandler.js.map +1 -1
  192. package/dist/lib/Tracking/Google/BaseEvent.js +23 -45
  193. package/dist/lib/Tracking/Google/BaseEvent.js.map +1 -1
  194. package/dist/lib/Tracking/Google/CustomEvent.js +2 -8
  195. package/dist/lib/Tracking/Google/CustomEvent.js.map +1 -1
  196. package/dist/lib/Tracking/Google/Gtag.js +37 -41
  197. package/dist/lib/Tracking/Google/Gtag.js.map +1 -1
  198. package/dist/lib/Tracking/Google/Gtm.js +18 -21
  199. package/dist/lib/Tracking/Google/Gtm.js.map +1 -1
  200. package/dist/lib/Tracking/Google/StandardEvent.js +2 -8
  201. package/dist/lib/Tracking/Google/StandardEvent.js.map +1 -1
  202. package/dist/lib/Tracking/Google/StandardEvents.js +62 -66
  203. package/dist/lib/Tracking/Google/StandardEvents.js.map +1 -1
  204. package/dist/lib/Tracking/Google/UserEventHandler.js +23 -54
  205. package/dist/lib/Tracking/Google/UserEventHandler.js.map +1 -1
  206. package/dist/lib/Tracking/Reddit/BaseEvent.js +8 -16
  207. package/dist/lib/Tracking/Reddit/BaseEvent.js.map +1 -1
  208. package/dist/lib/Tracking/Reddit/CustomEvent.js +8 -21
  209. package/dist/lib/Tracking/Reddit/CustomEvent.js.map +1 -1
  210. package/dist/lib/Tracking/Reddit/Rdt.js +11 -15
  211. package/dist/lib/Tracking/Reddit/Rdt.js.map +1 -1
  212. package/dist/lib/Tracking/Reddit/StandardEvent.js +8 -21
  213. package/dist/lib/Tracking/Reddit/StandardEvent.js.map +1 -1
  214. package/dist/lib/Tracking/Reddit/StandardEvents.js +18 -21
  215. package/dist/lib/Tracking/Reddit/StandardEvents.js.map +1 -1
  216. package/dist/lib/Tracking/Referrer.js +12 -13
  217. package/dist/lib/Tracking/Referrer.js.map +1 -1
  218. package/dist/lib/Tracking/Snapchat/BaseEvent.js +8 -16
  219. package/dist/lib/Tracking/Snapchat/BaseEvent.js.map +1 -1
  220. package/dist/lib/Tracking/Snapchat/Snaptr.js +10 -21
  221. package/dist/lib/Tracking/Snapchat/Snaptr.js.map +1 -1
  222. package/dist/lib/Tracking/Snapchat/StandardEvent.js +7 -19
  223. package/dist/lib/Tracking/Snapchat/StandardEvent.js.map +1 -1
  224. package/dist/lib/Tracking/Snapchat/StandardEvents.js +60 -64
  225. package/dist/lib/Tracking/Snapchat/StandardEvents.js.map +1 -1
  226. package/dist/lib/Tracking/Tiktok/BaseEvent.js +8 -16
  227. package/dist/lib/Tracking/Tiktok/BaseEvent.js.map +1 -1
  228. package/dist/lib/Tracking/Tiktok/CustomEvent.js +8 -21
  229. package/dist/lib/Tracking/Tiktok/CustomEvent.js.map +1 -1
  230. package/dist/lib/Tracking/Tiktok/StandardEvent.js +8 -21
  231. package/dist/lib/Tracking/Tiktok/StandardEvent.js.map +1 -1
  232. package/dist/lib/Tracking/Tiktok/StandardEvents.js +34 -38
  233. package/dist/lib/Tracking/Tiktok/StandardEvents.js.map +1 -1
  234. package/dist/lib/Tracking/Tiktok/Ttq.js +14 -18
  235. package/dist/lib/Tracking/Tiktok/Ttq.js.map +1 -1
  236. package/dist/lib/Tracking/Xy/BaseEvent.js +8 -16
  237. package/dist/lib/Tracking/Xy/BaseEvent.js.map +1 -1
  238. package/dist/lib/Tracking/Xy/CustomEvent.js +2 -8
  239. package/dist/lib/Tracking/Xy/CustomEvent.js.map +1 -1
  240. package/dist/lib/Tracking/Xy/StandardEvent.js +2 -8
  241. package/dist/lib/Tracking/Xy/StandardEvent.js.map +1 -1
  242. package/dist/lib/Tracking/Xy/UserEventHandler.js +23 -54
  243. package/dist/lib/Tracking/Xy/UserEventHandler.js.map +1 -1
  244. package/dist/lib/Tracking/XyoUserEventHandler.js +22 -54
  245. package/dist/lib/Tracking/XyoUserEventHandler.js.map +1 -1
  246. package/dist/lib/getApiStage.js +1 -1
  247. package/dist/lib/getApiStage.js.map +1 -1
  248. package/dist/lib/global.js +1 -1
  249. package/dist/lib/global.js.map +1 -1
  250. package/dist/lib/isLocalHost.js +1 -1
  251. package/dist/lib/isLocalHost.js.map +1 -1
  252. package/dist/lib/profile.js +13 -22
  253. package/dist/lib/profile.js.map +1 -1
  254. package/dist/lib/safeLocalStorage.js +3 -3
  255. package/dist/lib/safeLocalStorage.js.map +1 -1
  256. package/dist/lib/safeSessionStorage.js +3 -3
  257. package/dist/lib/safeSessionStorage.js.map +1 -1
  258. package/dist/lib/useAsyncEffect.js +5 -5
  259. package/dist/lib/useAsyncEffect.js.map +1 -1
  260. package/dist/mergeBoxlikeStyles.js +19 -5
  261. package/dist/mergeBoxlikeStyles.js.map +1 -1
  262. package/dist/node/components/Portal.d.ts +1 -0
  263. package/dist/node/index.js +1127 -1651
  264. package/dist/node/index.js.map +1 -1
  265. package/dist/node-esm/components/Portal.d.ts +1 -0
  266. package/dist/node-esm/index.js +1127 -1651
  267. package/dist/node-esm/index.js.map +1 -1
  268. package/package.json +13 -12
  269. package/src/components/BasePage/BasePage.tsx +2 -0
  270. package/src/components/Portal.tsx +28 -0
  271. package/src/components/index.ts +1 -0
  272. package/src/hooks/useUserEvents.ts +3 -0
@@ -30,33 +30,6 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
30
30
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
31
31
  PERFORMANCE OF THIS SOFTWARE.
32
32
  ***************************************************************************** */
33
- /* global Reflect, Promise */
34
-
35
- var extendStatics = function(d, b) {
36
- extendStatics = Object.setPrototypeOf ||
37
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
38
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
39
- return extendStatics(d, b);
40
- };
41
-
42
- function __extends(d, b) {
43
- if (typeof b !== "function" && b !== null)
44
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
45
- extendStatics(d, b);
46
- function __() { this.constructor = d; }
47
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
48
- }
49
-
50
- var __assign = function() {
51
- __assign = Object.assign || function __assign(t) {
52
- for (var s, i = 1, n = arguments.length; i < n; i++) {
53
- s = arguments[i];
54
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
55
- }
56
- return t;
57
- };
58
- return __assign.apply(this, arguments);
59
- };
60
33
 
61
34
  function __rest(s, e) {
62
35
  var t = {};
@@ -78,176 +51,107 @@ function __awaiter(thisArg, _arguments, P, generator) {
78
51
  function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
79
52
  step((generator = generator.apply(thisArg, _arguments || [])).next());
80
53
  });
81
- }
82
-
83
- function __generator(thisArg, body) {
84
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
85
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
86
- function verb(n) { return function (v) { return step([n, v]); }; }
87
- function step(op) {
88
- if (f) throw new TypeError("Generator is already executing.");
89
- while (_) try {
90
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
91
- if (y = 0, t) op = [op[0] & 2, t.value];
92
- switch (op[0]) {
93
- case 0: case 1: t = op; break;
94
- case 4: _.label++; return { value: op[1], done: false };
95
- case 5: _.label++; y = op[1]; op = [0]; continue;
96
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
97
- default:
98
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
99
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
100
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
101
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
102
- if (t[2]) _.ops.pop();
103
- _.trys.pop(); continue;
104
- }
105
- op = body.call(thisArg, _);
106
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
107
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
108
- }
109
- }
110
-
111
- function __values(o) {
112
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
113
- if (m) return m.call(o);
114
- if (o && typeof o.length === "number") return {
115
- next: function () {
116
- if (o && i >= o.length) o = void 0;
117
- return { value: o && o[i++], done: !o };
118
- }
119
- };
120
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
121
- }
122
-
123
- function __read(o, n) {
124
- var m = typeof Symbol === "function" && o[Symbol.iterator];
125
- if (!m) return o;
126
- var i = m.call(o), r, ar = [], e;
127
- try {
128
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
129
- }
130
- catch (error) { e = { error: error }; }
131
- finally {
132
- try {
133
- if (r && !r.done && (m = i["return"])) m.call(i);
134
- }
135
- finally { if (e) throw e.error; }
136
- }
137
- return ar;
138
- }
139
-
140
- function __spreadArray(to, from, pack) {
141
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
142
- if (ar || !(i in from)) {
143
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
144
- ar[i] = from[i];
145
- }
146
- }
147
- return to.concat(ar || Array.prototype.slice.call(from));
148
54
  }
149
55
 
150
- var BusyCircularProgress = function (_a) {
151
- var bgcolor = _a.bgcolor, style = _a.style, rounded = _a.rounded, size = _a.size, _b = _a.opacity, opacity = _b === void 0 ? 0.85 : _b, props = __rest(_a, ["bgcolor", "style", "rounded", "size", "opacity"]);
152
- var theme = useTheme();
153
- return (jsx(Box, __assign({ display: "flex", bgcolor: alpha(bgcolor !== null && bgcolor !== void 0 ? bgcolor : theme.palette.background.default, parseFloat("".concat(opacity))), flexGrow: 1, position: "absolute", left: 0, right: 0, top: 0, bottom: 0, justifyContent: "center", alignItems: "center", overflow: "hidden", style: __assign({ borderRadius: rounded ? theme.shape.borderRadius : 0 }, style) }, { children: jsx(CircularProgress, __assign({ size: size }, props), void 0) }), void 0));
56
+ const BusyCircularProgress = (_a) => {
57
+ var { bgcolor, style, rounded, size, opacity = 0.85 } = _a, props = __rest(_a, ["bgcolor", "style", "rounded", "size", "opacity"]);
58
+ const theme = useTheme();
59
+ return (jsx(Box, Object.assign({ display: "flex", bgcolor: alpha(bgcolor !== null && bgcolor !== void 0 ? bgcolor : theme.palette.background.default, parseFloat(`${opacity}`)), flexGrow: 1, position: "absolute", left: 0, right: 0, top: 0, bottom: 0, justifyContent: "center", alignItems: "center", overflow: "hidden", style: Object.assign({ borderRadius: rounded ? theme.shape.borderRadius : 0 }, style) }, { children: jsx(CircularProgress, Object.assign({ size: size }, props), void 0) }), void 0));
154
60
  };
155
61
 
156
- var BusyLinearProgress = function (_a) {
157
- var bgcolor = _a.bgcolor, style = _a.style, rounded = _a.rounded, _b = _a.opacity, opacity = _b === void 0 ? 0.85 : _b, props = __rest(_a, ["bgcolor", "style", "rounded", "opacity"]);
158
- var theme = useTheme();
159
- return (jsx(Box, __assign({ display: "flex", flexDirection: "column", bgcolor: alpha(bgcolor !== null && bgcolor !== void 0 ? bgcolor : theme.palette.background.default, parseFloat("".concat(opacity))), position: "absolute", left: 0, right: 0, top: 0, bottom: 0, justifyContent: "flex-start", alignItems: "stretch", overflow: "hidden", style: __assign({ borderRadius: rounded ? theme.shape.borderRadius : 0 }, style) }, { children: jsx(LinearProgress, __assign({}, props), void 0) }), void 0));
62
+ const BusyLinearProgress = (_a) => {
63
+ var { bgcolor, style, rounded, opacity = 0.85 } = _a, props = __rest(_a, ["bgcolor", "style", "rounded", "opacity"]);
64
+ const theme = useTheme();
65
+ return (jsx(Box, Object.assign({ display: "flex", flexDirection: "column", bgcolor: alpha(bgcolor !== null && bgcolor !== void 0 ? bgcolor : theme.palette.background.default, parseFloat(`${opacity}`)), position: "absolute", left: 0, right: 0, top: 0, bottom: 0, justifyContent: "flex-start", alignItems: "stretch", overflow: "hidden", style: Object.assign({ borderRadius: rounded ? theme.shape.borderRadius : 0 }, style) }, { children: jsx(LinearProgress, Object.assign({}, props), void 0) }), void 0));
160
66
  };
161
67
 
162
- var BusyBox = function (_a) {
163
- var background = _a.background, children = _a.children, component = _a.component, _b = _a.busyVariant, busyVariant = _b === void 0 ? 'circular' : _b, busySize = _a.busySize, _c = _a.busyOpacity, busyOpacity = _c === void 0 ? 0.85 : _c, busyColor = _a.busyColor, busy = _a.busy, busyCircularProps = _a.busyCircularProps, busyLinearProps = _a.busyLinearProps, paper = _a.paper, style = _a.style, props = __rest(_a, ["background", "children", "component", "busyVariant", "busySize", "busyOpacity", "busyColor", "busy", "busyCircularProps", "busyLinearProps", "paper", "style"]);
164
- var theme = useTheme();
165
- return (jsxs(Box, __assign({ component: paper ? Paper : component, position: "relative", style: background
166
- ? __assign({ backgroundColor: theme.palette.background.default, color: theme.palette.text.primary }, style) : style }, props, { children: [children, busy && busyVariant === 'linear' ? (jsx(BusyLinearProgress, __assign({ color: busyColor, opacity: busyOpacity }, busyLinearProps), void 0)) : null, busy && busyVariant === 'circular' ? (jsx(BusyCircularProgress, __assign({ color: busyColor, opacity: busyOpacity, size: busySize }, busyCircularProps), void 0)) : null] }), void 0));
68
+ const BusyBox = (_a) => {
69
+ var { background, children, component, busyVariant = 'circular', busySize, busyOpacity = 0.85, busyColor, busy, busyCircularProps, busyLinearProps, paper, style } = _a, props = __rest(_a, ["background", "children", "component", "busyVariant", "busySize", "busyOpacity", "busyColor", "busy", "busyCircularProps", "busyLinearProps", "paper", "style"]);
70
+ const theme = useTheme();
71
+ return (jsxs(Box, Object.assign({ component: paper ? Paper : component, position: "relative", style: background
72
+ ? Object.assign({ backgroundColor: theme.palette.background.default, color: theme.palette.text.primary }, style) : style }, props, { children: [children, busy && busyVariant === 'linear' ? (jsx(BusyLinearProgress, Object.assign({ color: busyColor, opacity: busyOpacity }, busyLinearProps), void 0)) : null, busy && busyVariant === 'circular' ? (jsx(BusyCircularProgress, Object.assign({ color: busyColor, opacity: busyOpacity, size: busySize }, busyCircularProps), void 0)) : null] }), void 0));
167
73
  };
168
74
 
169
- var FlexCol = function (props) {
170
- return jsx(BusyBox, __assign({ alignItems: "center", display: "flex", flexDirection: "column", justifyContent: "center" }, props), void 0);
75
+ const FlexCol = (props) => {
76
+ return jsx(BusyBox, Object.assign({ alignItems: "center", display: "flex", flexDirection: "column", justifyContent: "center" }, props), void 0);
171
77
  };
172
- var FlexGrowCol = function (props) {
173
- return jsx(FlexCol, __assign({ flexGrow: 1 }, props), void 0);
78
+ const FlexGrowCol = (props) => {
79
+ return jsx(FlexCol, Object.assign({ flexGrow: 1 }, props), void 0);
174
80
  };
175
81
 
176
- var FlexRow = function (props) {
177
- return jsx(BusyBox, __assign({ alignItems: "center", display: "flex", flexDirection: "row", justifyContent: "center" }, props), void 0);
82
+ const FlexRow = (props) => {
83
+ return jsx(BusyBox, Object.assign({ alignItems: "center", display: "flex", flexDirection: "row", justifyContent: "center" }, props), void 0);
178
84
  };
179
- var FlexGrowRow = function (props) {
180
- return jsx(FlexRow, __assign({ flexGrow: 1 }, props), void 0);
85
+ const FlexGrowRow = (props) => {
86
+ return jsx(FlexRow, Object.assign({ flexGrow: 1 }, props), void 0);
181
87
  };
182
88
 
183
89
  /**
184
90
  * @deprecated The functionality of Background is now part of FlexBox. Use the 'background' property to enable the background.
185
91
  */
186
- var Background = function (props) {
187
- return jsx(FlexRow, __assign({}, props), void 0);
92
+ const Background = (props) => {
93
+ return jsx(FlexRow, Object.assign({}, props), void 0);
188
94
  };
189
95
 
190
- var ErrorViewer = function (props) {
191
- var error = props.error, boxProps = __rest(props, ["error"]);
192
- var theme = useTheme();
193
- return (jsxs(FlexCol, __assign({ color: theme.palette.error.main }, boxProps, { children: [jsx(Typography, __assign({ align: "center", variant: "subtitle1" }, { children: error === null || error === void 0 ? void 0 : error.name }), void 0), jsx(Typography, __assign({ align: "center", variant: "body2" }, { children: error === null || error === void 0 ? void 0 : error.message }), void 0)] }), void 0));
96
+ const ErrorViewer = (props) => {
97
+ const { error } = props, boxProps = __rest(props, ["error"]);
98
+ const theme = useTheme();
99
+ return (jsxs(FlexCol, Object.assign({ color: theme.palette.error.main }, boxProps, { children: [jsx(Typography, Object.assign({ align: "center", variant: "subtitle1" }, { children: error === null || error === void 0 ? void 0 : error.name }), void 0), jsx(Typography, Object.assign({ align: "center", variant: "body2" }, { children: error === null || error === void 0 ? void 0 : error.message }), void 0)] }), void 0));
194
100
  };
195
101
 
196
- var ErrorsViewer = function (props) {
197
- var onRetry = props.onRetry, errors = props.errors, boxProps = __rest(props, ["onRetry", "errors"]);
198
- return (jsxs(FlexGrowCol, __assign({ padding: 1 }, boxProps, { children: [errors === null || errors === void 0 ? void 0 : errors.map(function (error, index) {
102
+ const ErrorsViewer = (props) => {
103
+ const { onRetry, errors } = props, boxProps = __rest(props, ["onRetry", "errors"]);
104
+ return (jsxs(FlexGrowCol, Object.assign({ padding: 1 }, boxProps, { children: [errors === null || errors === void 0 ? void 0 : errors.map((error, index) => {
199
105
  return jsx(ErrorViewer, { error: error }, index);
200
- }), onRetry ? (jsx(IconButton, __assign({ onClick: onRetry }, { children: jsx(AiOutlineReload, {}, void 0) }), void 0)) : null] }), void 0));
106
+ }), onRetry ? (jsx(IconButton, Object.assign({ onClick: onRetry }, { children: jsx(AiOutlineReload, {}, void 0) }), void 0)) : null] }), void 0));
201
107
  };
202
108
 
203
- var CoverProgress = function (props) {
109
+ const CoverProgress = (props) => {
204
110
  var _a;
205
- var _b = props.paper, paper = _b === void 0 ? true : _b, open = props.open, _c = props.opacity, opacity = _c === void 0 ? 0.25 : _c, errors = props.errors, onRetry = props.onRetry;
206
- var theme = useTheme();
111
+ const { paper = true, open, opacity = 0.25, errors, onRetry } = props;
112
+ const theme = useTheme();
207
113
  if (open) {
208
- return (jsx(FlexGrowRow, __assign({ position: "absolute", margin: -1, top: 0, bottom: 0, right: 0, left: 0, bgcolor: paper ? theme.palette.background.paper : theme.palette.background.default }, { children: ((_a = errors === null || errors === void 0 ? void 0 : errors.length) !== null && _a !== void 0 ? _a : 0) === 0 ? (jsx(CircularProgress, { style: { opacity: opacity } }, void 0)) : (jsx(ErrorsViewer, { margin: 1, errors: errors, onRetry: onRetry }, void 0)) }), void 0));
114
+ return (jsx(FlexGrowRow, Object.assign({ position: "absolute", margin: -1, top: 0, bottom: 0, right: 0, left: 0, bgcolor: paper ? theme.palette.background.paper : theme.palette.background.default }, { children: ((_a = errors === null || errors === void 0 ? void 0 : errors.length) !== null && _a !== void 0 ? _a : 0) === 0 ? (jsx(CircularProgress, { style: { opacity } }, void 0)) : (jsx(ErrorsViewer, { margin: 1, errors: errors, onRetry: onRetry }, void 0)) }), void 0));
209
115
  }
210
116
  return null;
211
117
  };
212
118
 
213
- var HoverScale = function (props) {
214
- var children = props.children, _a = props.scale, scale = _a === void 0 ? 1.1 : _a;
215
- var useStyles = makeStyles(function () {
216
- return createStyles({
217
- zoomdiv: {
218
- '&:hover': {
219
- transform: "scale(".concat(scale, ")"),
220
- transitionDuration: '0.2s',
221
- transitionTimingFunction: 'ease',
222
- },
119
+ const HoverScale = (props) => {
120
+ const { children, scale = 1.1 } = props;
121
+ const useStyles = makeStyles(() => createStyles({
122
+ zoomdiv: {
123
+ '&:hover': {
124
+ transform: `scale(${scale})`,
125
+ transitionDuration: '0.2s',
126
+ transitionTimingFunction: 'ease',
223
127
  },
224
- });
225
- });
226
- var classes = useStyles();
227
- return (jsx(FlexRow, { children: jsx(Box, __assign({ className: classes.zoomdiv }, { children: children }), void 0) }, void 0));
128
+ },
129
+ }));
130
+ const classes = useStyles();
131
+ return (jsx(FlexRow, { children: jsx(Box, Object.assign({ className: classes.zoomdiv }, { children: children }), void 0) }, void 0));
228
132
  };
229
133
 
230
- var range = function (n, in_min, in_max, out_min, out_max) {
134
+ const range = (n, in_min, in_max, out_min, out_max) => {
231
135
  return ((n - in_min) * (out_max - out_min)) / (in_max - in_min) + out_min;
232
136
  };
233
- var updateCanvas = function (canvas, props) {
234
- var _a = props.value, value = _a === void 0 ? '' : _a, _b = props.size, size = _b === void 0 ? 400 : _b, _c = props.bg, bg = _c === void 0 ? 'transparent' : _c, _d = props.count, count = _d === void 0 ? 5 : _d, palette = props.palette, _e = props.iconPadding, iconPadding = _e === void 0 ? 0 : _e;
235
- var fg = props.fg;
236
- var hash = md5(value);
237
- var block = Math.floor(size / count);
238
- var hashcolor = hash.slice(0, 6);
239
- var current = canvas.current;
137
+ const updateCanvas = (canvas, props) => {
138
+ const { value = '', size = 400, bg = 'transparent', count = 5, palette, iconPadding = 0 } = props;
139
+ let { fg } = props;
140
+ const hash = md5(value);
141
+ const block = Math.floor(size / count);
142
+ const hashcolor = hash.slice(0, 6);
143
+ const current = canvas.current;
240
144
  if (!current) {
241
145
  return;
242
146
  }
243
147
  if (palette && palette.length) {
244
- var index = Math.floor(range(parseInt(hash.slice(-3), 16), 0, 4095, 0, palette.length));
148
+ const index = Math.floor(range(parseInt(hash.slice(-3), 16), 0, 4095, 0, palette.length));
245
149
  fg = palette[index];
246
150
  }
247
151
  current.width = block * count + iconPadding;
248
152
  current.height = block * count + iconPadding;
249
- var arr = hash.split('').map(function (el) {
250
- var parsedEl = parseInt(el, 16);
153
+ const arr = hash.split('').map((el) => {
154
+ const parsedEl = parseInt(el, 16);
251
155
  if (parsedEl < 8) {
252
156
  return 0;
253
157
  }
@@ -255,16 +159,16 @@ var updateCanvas = function (canvas, props) {
255
159
  return 1;
256
160
  }
257
161
  });
258
- var map = [];
162
+ const map = [];
259
163
  map[0] = map[4] = arr.slice(0, 5);
260
164
  map[1] = map[3] = arr.slice(5, 10);
261
165
  map[2] = arr.slice(10, 15);
262
- var ctx = current.getContext('2d');
166
+ const ctx = current.getContext('2d');
263
167
  if (ctx) {
264
168
  ctx.imageSmoothingEnabled = false;
265
169
  ctx.clearRect(0, 0, current.width, current.height);
266
- map.forEach(function (row, i) {
267
- row.forEach(function (el, j) {
170
+ map.forEach((row, i) => {
171
+ row.forEach((el, j) => {
268
172
  if (el) {
269
173
  ctx.fillStyle = fg ? fg : '#' + hashcolor;
270
174
  ctx.fillRect(block * i + iconPadding, block * j + iconPadding, block - iconPadding, block - iconPadding);
@@ -277,101 +181,99 @@ var updateCanvas = function (canvas, props) {
277
181
  });
278
182
  }
279
183
  };
280
- var Identicon = function (_a) {
281
- var _b = _a.size, size = _b === void 0 ? 400 : _b, _c = _a.className, className = _c === void 0 ? 'identicon' : _c, bg = _a.bg, count = _a.count, fg = _a.fg, iconPadding = _a.iconPadding, palette = _a.palette, value = _a.value, props = __rest(_a, ["size", "className", "bg", "count", "fg", "iconPadding", "palette", "value"]);
282
- var canvas = useRef(null);
283
- useEffect(function () {
284
- updateCanvas(canvas, { bg: bg, className: className, count: count, fg: fg, iconPadding: iconPadding, palette: palette, size: size, value: value });
184
+ const Identicon = (_a) => {
185
+ var { size = 400, className = 'identicon', bg, count, fg, iconPadding, palette, value } = _a, props = __rest(_a, ["size", "className", "bg", "count", "fg", "iconPadding", "palette", "value"]);
186
+ const canvas = useRef(null);
187
+ useEffect(() => {
188
+ updateCanvas(canvas, { bg, className, count, fg, iconPadding, palette, size, value });
285
189
  });
286
- return (jsx(FlexRow, __assign({}, props, { children: jsx("canvas", { className: className, ref: canvas, style: { height: size, width: size } }, void 0) }), void 0));
190
+ return (jsx(FlexRow, Object.assign({}, props, { children: jsx("canvas", { className: className, ref: canvas, style: { height: size, width: size } }, void 0) }), void 0));
287
191
  };
288
192
 
289
- var RedirectWithQuery = function (_a) {
290
- var to = _a.to, toOptions = _a.toOptions;
291
- var newPath = "".concat(to).concat(document.location.search);
292
- var navigate = useNavigate();
293
- var pathname = useLocation().pathname;
294
- useEffect(function () {
193
+ const RedirectWithQuery = ({ to, toOptions }) => {
194
+ const newPath = `${to}${document.location.search}`;
195
+ const navigate = useNavigate();
196
+ const { pathname } = useLocation();
197
+ useEffect(() => {
295
198
  if (newPath !== pathname) {
296
- navigate(newPath, __assign({ replace: true }, toOptions));
199
+ navigate(newPath, Object.assign({ replace: true }, toOptions));
297
200
  }
298
201
  });
299
202
  return jsx("div", {}, void 0);
300
203
  };
301
204
 
302
- var ScrollToTopButton = function (_a) {
303
- var children = _a.children, anchorId = _a.anchorId, props = __rest(_a, ["children", "anchorId"]);
304
- var trigger = useScrollTrigger({
205
+ const ScrollToTopButton = (_a) => {
206
+ var { children, anchorId } = _a, props = __rest(_a, ["children", "anchorId"]);
207
+ const trigger = useScrollTrigger({
305
208
  disableHysteresis: true,
306
209
  threshold: 100,
307
210
  });
308
- var handleClick = function (event) {
309
- var anchor = (event.target.ownerDocument || document).querySelector("#".concat(anchorId));
211
+ const handleClick = (event) => {
212
+ const anchor = (event.target.ownerDocument || document).querySelector(`#${anchorId}`);
310
213
  if (anchor) {
311
214
  anchor.scrollIntoView({ behavior: 'smooth', block: 'center' });
312
215
  }
313
216
  };
314
- var theme = useTheme();
315
- return (jsx(Zoom, __assign({ in: trigger }, props, { children: jsx(Box, __assign({ zIndex: 10, position: "fixed", right: theme.spacing(2), bottom: theme.spacing(2), onClick: handleClick, role: "presentation" }, { children: children }), void 0) }), void 0));
217
+ const theme = useTheme();
218
+ return (jsx(Zoom, Object.assign({ in: trigger }, props, { children: jsx(Box, Object.assign({ zIndex: 10, position: "fixed", right: theme.spacing(2), bottom: theme.spacing(2), onClick: handleClick, role: "presentation" }, { children: children }), void 0) }), void 0));
316
219
  };
317
220
 
318
- var AppBarEx = function (props) {
319
- var contextToolbar = props.contextToolbar, systemToolbar = props.systemToolbar, container = props.container, style = props.style, appbarProps = __rest(props, ["contextToolbar", "systemToolbar", "container", "style"]);
320
- var theme = useTheme();
321
- var AppBarExInner = function () {
322
- return (jsxs(FlexGrowRow, __assign({ justifyContent: "space-between" }, { children: [contextToolbar !== null && contextToolbar !== void 0 ? contextToolbar : jsx(Toolbar, {}, void 0), systemToolbar !== null && systemToolbar !== void 0 ? systemToolbar : jsx(Toolbar, {}, void 0)] }), void 0));
221
+ const AppBarEx = (props) => {
222
+ const { contextToolbar, systemToolbar, container, style } = props, appbarProps = __rest(props, ["contextToolbar", "systemToolbar", "container", "style"]);
223
+ const theme = useTheme();
224
+ const AppBarExInner = () => {
225
+ return (jsxs(FlexGrowRow, Object.assign({ justifyContent: "space-between" }, { children: [contextToolbar !== null && contextToolbar !== void 0 ? contextToolbar : jsx(Toolbar, {}, void 0), systemToolbar !== null && systemToolbar !== void 0 ? systemToolbar : jsx(Toolbar, {}, void 0)] }), void 0));
323
226
  };
324
- return (jsx(AppBar, __assign({ position: "static", style: __assign({ backgroundColor: theme.palette.background.paper, color: theme.palette.text.primary, display: 'flex' }, style) }, appbarProps, { children: container ? (jsx(Container, __assign({ maxWidth: container }, { children: jsx(AppBarExInner, {}, void 0) }), void 0)) : (jsx(AppBarExInner, {}, void 0)) }), void 0));
227
+ return (jsx(AppBar, Object.assign({ position: "static", style: Object.assign({ backgroundColor: theme.palette.background.paper, color: theme.palette.text.primary, display: 'flex' }, style) }, appbarProps, { children: container ? (jsx(Container, Object.assign({ maxWidth: container }, { children: jsx(AppBarExInner, {}, void 0) }), void 0)) : (jsx(AppBarExInner, {}, void 0)) }), void 0));
325
228
  };
326
229
 
327
- var CookieConsentContext = createContext({});
230
+ const CookieConsentContext = createContext({});
328
231
 
329
- var CookiesAcceptedLocalStorageName = 'CookiesAccepted';
330
- var CookieConsentLoader = function (_a) {
331
- var children = _a.children;
332
- var getAcceptedFromLocalStorage = function () {
232
+ const CookiesAcceptedLocalStorageName = 'CookiesAccepted';
233
+ const CookieConsentLoader = ({ children }) => {
234
+ const getAcceptedFromLocalStorage = () => {
333
235
  return localStorage.getItem(CookiesAcceptedLocalStorageName) === 'true';
334
236
  };
335
- var setAcceptedToLocalStorage = function (accepted) {
237
+ const setAcceptedToLocalStorage = (accepted) => {
336
238
  localStorage.setItem(CookiesAcceptedLocalStorageName, accepted ? 'true' : 'false');
337
239
  };
338
- var _b = __read(useState(getAcceptedFromLocalStorage()), 2), accepted = _b[0], setAccepted = _b[1];
339
- var setAcceptedHandler = function (accepted) {
240
+ const [accepted, setAccepted] = useState(getAcceptedFromLocalStorage());
241
+ const setAcceptedHandler = (accepted) => {
340
242
  setAcceptedToLocalStorage(accepted);
341
243
  setAccepted(accepted);
342
244
  };
343
- var clearAccepted = function () {
245
+ const clearAccepted = () => {
344
246
  localStorage.removeItem(CookiesAcceptedLocalStorageName);
345
247
  setAccepted(getAcceptedFromLocalStorage());
346
248
  };
347
- return (jsx(CookieConsentContext.Provider, __assign({ value: { accepted: accepted, clearAccepted: clearAccepted, setAccepted: setAcceptedHandler, storageName: CookiesAcceptedLocalStorageName } }, { children: children }), void 0));
249
+ return (jsx(CookieConsentContext.Provider, Object.assign({ value: { accepted, clearAccepted, setAccepted: setAcceptedHandler, storageName: CookiesAcceptedLocalStorageName } }, { children: children }), void 0));
348
250
  };
349
251
 
350
- var useCookieConsent = function () {
252
+ const useCookieConsent = () => {
351
253
  return useContext(CookieConsentContext);
352
254
  };
353
255
 
354
- var EthersContext = createContext({});
256
+ const EthersContext = createContext({});
355
257
 
356
- var infuraKey = '1d9f8053c65a49cfb99fafaa8ef201c0';
357
- var InfuraEthersLoader = function (props) {
358
- var children = props.children;
359
- var chainId = 1;
360
- var provider = new InfuraProvider(1, infuraKey);
361
- return (jsx(EthersContext.Provider, __assign({ value: {
258
+ const infuraKey = '1d9f8053c65a49cfb99fafaa8ef201c0';
259
+ const InfuraEthersLoader = (props) => {
260
+ const { children } = props;
261
+ const chainId = 1;
262
+ const provider = new InfuraProvider(1, infuraKey);
263
+ return (jsx(EthersContext.Provider, Object.assign({ value: {
362
264
  busy: false,
363
- chainId: chainId,
265
+ chainId,
364
266
  isConnected: true,
365
- provider: provider,
267
+ provider,
366
268
  signer: null,
367
269
  } }, { children: children }), void 0));
368
270
  };
369
271
 
370
- var getApiStage = function () {
272
+ const getApiStage = () => {
371
273
  return getApiStage$1(document.location.hostname);
372
274
  };
373
275
 
374
- var isLocalhost = !!(window.location.hostname === 'localhost' ||
276
+ const isLocalhost = !!(window.location.hostname === 'localhost' ||
375
277
  // [::1] is the IPv6 localhost address.
376
278
  window.location.hostname === '[::1]' ||
377
279
  // 127.0.0.0/8 are considered localhost for IPv4.
@@ -380,18 +282,18 @@ var isLocalhost = !!(window.location.hostname === 'localhost' ||
380
282
  /* eslint-disable react-hooks/exhaustive-deps */
381
283
  function useAsyncEffect(effect, inputs) {
382
284
  useEffect(function () {
383
- var mounted = true;
384
- var promise = effect(function () {
285
+ let mounted = true;
286
+ const promise = effect(() => {
385
287
  return mounted;
386
288
  });
387
289
  Promise.resolve(promise)
388
- .then(function (callback) {
290
+ .then((callback) => {
389
291
  if (callback) {
390
292
  callback === null || callback === void 0 ? void 0 : callback();
391
293
  }
392
294
  })
393
- .catch(function (reason) {
394
- console.log("useAsyncEffect Excepted: ".concat(reason));
295
+ .catch((reason) => {
296
+ console.log(`useAsyncEffect Excepted: ${reason}`);
395
297
  });
396
298
  return function () {
397
299
  mounted = false;
@@ -399,33 +301,24 @@ function useAsyncEffect(effect, inputs) {
399
301
  }, inputs !== null && inputs !== void 0 ? inputs : []);
400
302
  }
401
303
 
402
- var logProfiling = false;
403
- var enableProfileLogging = function (enabled) {
304
+ let logProfiling = false;
305
+ const enableProfileLogging = (enabled) => {
404
306
  logProfiling = enabled;
405
307
  };
406
- var profileResults = [];
407
- var profileBlock = function (name, closure) { return __awaiter(void 0, void 0, void 0, function () {
408
- var startTime, endTime;
409
- return __generator(this, function (_a) {
410
- switch (_a.label) {
411
- case 0:
412
- startTime = Date.now();
413
- return [4 /*yield*/, closure()];
414
- case 1:
415
- _a.sent();
416
- endTime = Date.now();
417
- profileResults.push({ endTime: endTime, name: name, startTime: startTime });
418
- if (logProfiling) {
419
- console.log("Timed ".concat(name, " [").concat(endTime - startTime, "ms]"));
420
- }
421
- return [2 /*return*/];
422
- }
423
- });
424
- }); };
308
+ const profileResults = [];
309
+ const profileBlock = (name, closure) => __awaiter(void 0, void 0, void 0, function* () {
310
+ const startTime = Date.now();
311
+ yield closure();
312
+ const endTime = Date.now();
313
+ profileResults.push({ endTime, name, startTime });
314
+ if (logProfiling) {
315
+ console.log(`Timed ${name} [${endTime - startTime}ms]`);
316
+ }
317
+ });
425
318
 
426
- var getLocalStorageObject = function (key, log) {
319
+ const getLocalStorageObject = (key, log) => {
427
320
  var _a;
428
- var result = {};
321
+ let result = {};
429
322
  try {
430
323
  result = JSON.parse((_a = localStorage.getItem(key)) !== null && _a !== void 0 ? _a : '{}');
431
324
  }
@@ -434,7 +327,7 @@ var getLocalStorageObject = function (key, log) {
434
327
  }
435
328
  return result;
436
329
  };
437
- var setLocalStorageObject = function (key, value, log) {
330
+ const setLocalStorageObject = (key, value, log) => {
438
331
  try {
439
332
  localStorage.setItem(key, JSON.stringify(value));
440
333
  }
@@ -443,9 +336,9 @@ var setLocalStorageObject = function (key, value, log) {
443
336
  }
444
337
  };
445
338
 
446
- var getSessionStorageObject = function (key, log) {
339
+ const getSessionStorageObject = (key, log) => {
447
340
  var _a;
448
- var result = {};
341
+ let result = {};
449
342
  try {
450
343
  result = JSON.parse((_a = sessionStorage.getItem(key)) !== null && _a !== void 0 ? _a : '{}');
451
344
  }
@@ -454,7 +347,7 @@ var getSessionStorageObject = function (key, log) {
454
347
  }
455
348
  return result;
456
349
  };
457
- var setSessionStorageObject = function (key, value, log) {
350
+ const setSessionStorageObject = (key, value, log) => {
458
351
  try {
459
352
  sessionStorage.setItem(key, JSON.stringify(value));
460
353
  }
@@ -463,161 +356,110 @@ var setSessionStorageObject = function (key, value, log) {
463
356
  }
464
357
  };
465
358
 
466
- var Referrer = /** @class */ (function () {
467
- function Referrer() {
359
+ class Referrer {
360
+ constructor() {
468
361
  var _a, _b;
469
362
  this.session = (_a = this.getFromSession()) !== null && _a !== void 0 ? _a : document.referrer;
470
363
  sessionStorage.setItem(Referrer.storageId, this.session);
471
364
  this.local = (_b = this.getFromLocal()) !== null && _b !== void 0 ? _b : document.referrer;
472
365
  localStorage.setItem(Referrer.storageId, this.local);
473
366
  }
474
- Referrer.prototype.getFromLocal = function () {
475
- var value = localStorage.getItem(Referrer.storageId);
367
+ getFromLocal() {
368
+ const value = localStorage.getItem(Referrer.storageId);
476
369
  if (value && value.length > 0) {
477
370
  return value;
478
371
  }
479
- };
480
- Referrer.prototype.getFromSession = function () {
481
- var value = sessionStorage.getItem(Referrer.storageId);
372
+ }
373
+ getFromSession() {
374
+ const value = sessionStorage.getItem(Referrer.storageId);
482
375
  if (value && value.length > 0) {
483
376
  return value;
484
377
  }
485
- };
486
- Referrer.prototype.toJson = function () {
378
+ }
379
+ toJson() {
487
380
  if ((this.local && this.local.length > 0) || (this.session && this.session.length > 0)) {
488
381
  return {
489
382
  local: this.local,
490
383
  session: this.session,
491
384
  };
492
385
  }
493
- };
494
- Referrer.storageId = '_coin_referrer';
495
- return Referrer;
496
- }());
497
-
498
- var XyoUserEventHandler = /** @class */ (function (_super) {
499
- __extends(XyoUserEventHandler, _super);
500
- function XyoUserEventHandler(handlers) {
501
- if (handlers === void 0) { handlers = []; }
502
- var _this = _super.call(this) || this;
503
- _this.handlers = handlers;
504
- return _this;
505
- }
506
- XyoUserEventHandler.prototype.testStarted = function (data) {
507
- return __awaiter(this, void 0, void 0, function () {
508
- return __generator(this, function (_a) {
509
- switch (_a.label) {
510
- case 0: return [4 /*yield*/, Promise.allSettled(this.handlers.map(function (handler) { return handler.testStarted(data); }))];
511
- case 1:
512
- _a.sent();
513
- return [2 /*return*/];
514
- }
515
- });
386
+ }
387
+ }
388
+ Referrer.storageId = '_coin_referrer';
389
+
390
+ class XyoUserEventHandler extends UserEventHandler {
391
+ constructor(handlers = []) {
392
+ super();
393
+ this.handlers = handlers;
394
+ }
395
+ testStarted(data) {
396
+ return __awaiter(this, void 0, void 0, function* () {
397
+ yield Promise.allSettled(this.handlers.map((handler) => handler.testStarted(data)));
516
398
  });
517
- };
518
- XyoUserEventHandler.prototype.funnelStarted = function (data) {
519
- return __awaiter(this, void 0, void 0, function () {
520
- return __generator(this, function (_a) {
521
- switch (_a.label) {
522
- case 0: return [4 /*yield*/, Promise.allSettled(this.handlers.map(function (handler) { return handler.funnelStarted(data); }))];
523
- case 1:
524
- _a.sent();
525
- return [2 /*return*/];
526
- }
527
- });
399
+ }
400
+ funnelStarted(data) {
401
+ return __awaiter(this, void 0, void 0, function* () {
402
+ yield Promise.allSettled(this.handlers.map((handler) => handler.funnelStarted(data)));
528
403
  });
529
- };
530
- XyoUserEventHandler.prototype.viewContent = function (data) {
531
- return __awaiter(this, void 0, void 0, function () {
532
- return __generator(this, function (_a) {
533
- switch (_a.label) {
534
- case 0: return [4 /*yield*/, Promise.allSettled(this.handlers.map(function (handler) { return handler.viewContent(data); }))];
535
- case 1:
536
- _a.sent();
537
- return [2 /*return*/];
538
- }
539
- });
404
+ }
405
+ viewContent(data) {
406
+ return __awaiter(this, void 0, void 0, function* () {
407
+ yield Promise.allSettled(this.handlers.map((handler) => handler.viewContent(data)));
540
408
  });
541
- };
542
- XyoUserEventHandler.prototype.userClick = function (data) {
543
- return __awaiter(this, void 0, void 0, function () {
544
- return __generator(this, function (_a) {
545
- switch (_a.label) {
546
- case 0: return [4 /*yield*/, Promise.allSettled(this.handlers.map(function (handler) { return handler.userClick(data); }))];
547
- case 1:
548
- _a.sent();
549
- return [2 /*return*/];
550
- }
551
- });
409
+ }
410
+ userClick(data) {
411
+ return __awaiter(this, void 0, void 0, function* () {
412
+ yield Promise.allSettled(this.handlers.map((handler) => handler.userClick(data)));
552
413
  });
553
- };
554
- return XyoUserEventHandler;
555
- }(UserEventHandler));
414
+ }
415
+ }
556
416
 
557
417
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
558
- var global = window;
418
+ const global = window;
559
419
 
560
- var DripBaseEvent = /** @class */ (function () {
561
- function DripBaseEvent(name, param) {
420
+ class DripBaseEvent {
421
+ constructor(name, param) {
562
422
  this.name = name;
563
423
  this.param = param;
564
424
  this.dcq = this.getDcq();
565
425
  this.dcs = this.getDcs();
566
426
  }
567
- DripBaseEvent.prototype.send = function (data) {
568
- return __awaiter(this, void 0, void 0, function () {
569
- var payload;
570
- return __generator(this, function (_a) {
571
- switch (_a.label) {
572
- case 0:
573
- payload = [this.name];
574
- if (this.param) {
575
- payload.push(this.param);
576
- }
577
- payload.push(data);
578
- this.dcq.push(payload);
579
- return [4 /*yield*/, delay(0)];
580
- case 1:
581
- _a.sent();
582
- return [2 /*return*/];
583
- }
584
- });
427
+ send(data) {
428
+ return __awaiter(this, void 0, void 0, function* () {
429
+ const payload = [this.name];
430
+ if (this.param) {
431
+ payload.push(this.param);
432
+ }
433
+ payload.push(data);
434
+ this.dcq.push(payload);
435
+ yield delay(0);
585
436
  });
586
- };
587
- DripBaseEvent.prototype.getDcq = function () {
437
+ }
438
+ getDcq() {
588
439
  if (!global._dcq) {
589
440
  throw Error('DCQ not found');
590
441
  }
591
442
  return global._dcq;
592
- };
593
- DripBaseEvent.prototype.getDcs = function () {
443
+ }
444
+ getDcs() {
594
445
  if (!global._dcs) {
595
446
  throw Error('DCS not found');
596
447
  }
597
448
  return global._dcs;
598
- };
599
- return DripBaseEvent;
600
- }());
601
-
602
- var DripCustomEvent = /** @class */ (function (_super) {
603
- __extends(DripCustomEvent, _super);
604
- function DripCustomEvent() {
605
- return _super !== null && _super.apply(this, arguments) || this;
606
449
  }
607
- return DripCustomEvent;
608
- }(DripBaseEvent));
450
+ }
609
451
 
610
- var DripStandardEvents = /** @class */ (function () {
611
- function DripStandardEvents() {
612
- }
613
- DripStandardEvents.prototype.identify = function () {
452
+ class DripCustomEvent extends DripBaseEvent {
453
+ }
454
+
455
+ class DripStandardEvents {
456
+ identify() {
614
457
  return new DripBaseEvent('identify');
615
- };
616
- return DripStandardEvents;
617
- }());
458
+ }
459
+ }
618
460
 
619
- var Fbq = /** @class */ (function () {
620
- function Fbq(pixelId) {
461
+ class Fbq {
462
+ constructor(pixelId) {
621
463
  this.pixelId = pixelId;
622
464
  this.fbq = function () {
623
465
  // eslint-disable-next-line prefer-rest-params,prefer-spread
@@ -633,147 +475,109 @@ var Fbq = /** @class */ (function () {
633
475
  this.fbq('init', pixelId);
634
476
  this.fbq('track', 'PageView');
635
477
  }
636
- Fbq.init = function (pixelId) {
478
+ static init(pixelId) {
637
479
  if (!this.instance) {
638
480
  this.instance = new Fbq(pixelId);
639
481
  }
640
482
  return this.instance;
641
- };
642
- Fbq.prototype.track = function (event, data) {
643
- this.fbq('track', event, __assign({}, data));
644
- };
645
- Fbq.prototype.trackCustom = function (event, data) {
646
- this.fbq('trackCustom', event, __assign({}, data));
647
- };
648
- return Fbq;
649
- }());
483
+ }
484
+ track(event, data) {
485
+ this.fbq('track', event, Object.assign({}, data));
486
+ }
487
+ trackCustom(event, data) {
488
+ this.fbq('trackCustom', event, Object.assign({}, data));
489
+ }
490
+ }
650
491
 
651
- var FacebookBaseEvent = /** @class */ (function () {
652
- function FacebookBaseEvent(name) {
492
+ class FacebookBaseEvent {
493
+ constructor(name) {
653
494
  this.name = name;
654
495
  this.fbq = assertEx(Fbq.instance, 'Missing Fbq');
655
496
  }
656
- FacebookBaseEvent.prototype.send = function (_data) {
657
- return __awaiter(this, void 0, void 0, function () {
658
- return __generator(this, function (_a) {
659
- switch (_a.label) {
660
- case 0: return [4 /*yield*/, delay(0)]; //force async to increase reporting odds
661
- case 1:
662
- _a.sent(); //force async to increase reporting odds
663
- return [2 /*return*/];
664
- }
665
- });
666
- });
667
- };
668
- return FacebookBaseEvent;
669
- }());
670
-
671
- var FacebookCustomEvent = /** @class */ (function (_super) {
672
- __extends(FacebookCustomEvent, _super);
673
- function FacebookCustomEvent() {
674
- return _super !== null && _super.apply(this, arguments) || this;
675
- }
676
- FacebookCustomEvent.prototype.send = function (data) {
677
- return __awaiter(this, void 0, void 0, function () {
678
- return __generator(this, function (_a) {
679
- switch (_a.label) {
680
- case 0:
681
- this.fbq.trackCustom(this.name, data);
682
- return [4 /*yield*/, delay(0)]; //force async to increase reporting odds
683
- case 1:
684
- _a.sent(); //force async to increase reporting odds
685
- return [2 /*return*/];
686
- }
687
- });
497
+ send(_data) {
498
+ return __awaiter(this, void 0, void 0, function* () {
499
+ yield delay(0); //force async to increase reporting odds
688
500
  });
689
- };
690
- return FacebookCustomEvent;
691
- }(FacebookBaseEvent));
692
-
693
- var FacebookStandardEvent = /** @class */ (function (_super) {
694
- __extends(FacebookStandardEvent, _super);
695
- function FacebookStandardEvent() {
696
- return _super !== null && _super.apply(this, arguments) || this;
697
- }
698
- FacebookStandardEvent.prototype.send = function (data) {
699
- return __awaiter(this, void 0, void 0, function () {
700
- return __generator(this, function (_a) {
701
- switch (_a.label) {
702
- case 0:
703
- this.fbq.track(this.name, data);
704
- return [4 /*yield*/, delay(0)]; //force async to increase reporting odds
705
- case 1:
706
- _a.sent(); //force async to increase reporting odds
707
- return [2 /*return*/];
708
- }
709
- });
501
+ }
502
+ }
503
+
504
+ class FacebookCustomEvent extends FacebookBaseEvent {
505
+ send(data) {
506
+ return __awaiter(this, void 0, void 0, function* () {
507
+ this.fbq.trackCustom(this.name, data);
508
+ yield delay(0); //force async to increase reporting odds
710
509
  });
711
- };
712
- return FacebookStandardEvent;
713
- }(FacebookBaseEvent));
510
+ }
511
+ }
714
512
 
715
- var FacebookStandardEvents = /** @class */ (function () {
716
- function FacebookStandardEvents() {
513
+ class FacebookStandardEvent extends FacebookBaseEvent {
514
+ send(data) {
515
+ return __awaiter(this, void 0, void 0, function* () {
516
+ this.fbq.track(this.name, data);
517
+ yield delay(0); //force async to increase reporting odds
518
+ });
717
519
  }
718
- FacebookStandardEvents.prototype.addPaymentInfo = function () {
520
+ }
521
+
522
+ class FacebookStandardEvents {
523
+ addPaymentInfo() {
719
524
  return new FacebookStandardEvent('AddPaymentInfo');
720
- };
721
- FacebookStandardEvents.prototype.addToCart = function () {
525
+ }
526
+ addToCart() {
722
527
  return new FacebookStandardEvent('AddToCart');
723
- };
724
- FacebookStandardEvents.prototype.addToWishList = function () {
528
+ }
529
+ addToWishList() {
725
530
  return new FacebookStandardEvent('AddToWishList');
726
- };
727
- FacebookStandardEvents.prototype.completedRegistration = function () {
531
+ }
532
+ completedRegistration() {
728
533
  return new FacebookStandardEvent('CompleteRegistration');
729
- };
730
- FacebookStandardEvents.prototype.contact = function () {
534
+ }
535
+ contact() {
731
536
  return new FacebookStandardEvent('Contact');
732
- };
733
- FacebookStandardEvents.prototype.customizeProduct = function () {
537
+ }
538
+ customizeProduct() {
734
539
  return new FacebookStandardEvent('CustomizeProduct');
735
- };
736
- FacebookStandardEvents.prototype.donate = function () {
540
+ }
541
+ donate() {
737
542
  return new FacebookStandardEvent('Donate');
738
- };
739
- FacebookStandardEvents.prototype.findLocation = function () {
543
+ }
544
+ findLocation() {
740
545
  return new FacebookStandardEvent('FindLocation');
741
- };
742
- FacebookStandardEvents.prototype.initiateCheckout = function () {
546
+ }
547
+ initiateCheckout() {
743
548
  return new FacebookStandardEvent('InitiateCheckout');
744
- };
745
- FacebookStandardEvents.prototype.lead = function () {
549
+ }
550
+ lead() {
746
551
  return new FacebookStandardEvent('Lead');
747
- };
748
- FacebookStandardEvents.prototype.pageView = function () {
552
+ }
553
+ pageView() {
749
554
  return new FacebookStandardEvent('PageView');
750
- };
751
- FacebookStandardEvents.prototype.purchase = function () {
555
+ }
556
+ purchase() {
752
557
  return new FacebookStandardEvent('Purchase');
753
- };
754
- FacebookStandardEvents.prototype.schedule = function () {
558
+ }
559
+ schedule() {
755
560
  return new FacebookStandardEvent('Schedule');
756
- };
757
- FacebookStandardEvents.prototype.search = function () {
561
+ }
562
+ search() {
758
563
  return new FacebookStandardEvent('Search');
759
- };
760
- FacebookStandardEvents.prototype.startTrial = function () {
564
+ }
565
+ startTrial() {
761
566
  return new FacebookStandardEvent('StartTrial');
762
- };
763
- FacebookStandardEvents.prototype.submitApplication = function () {
567
+ }
568
+ submitApplication() {
764
569
  return new FacebookStandardEvent('SubmitApplication');
765
- };
766
- FacebookStandardEvents.prototype.subscribe = function () {
570
+ }
571
+ subscribe() {
767
572
  return new FacebookStandardEvent('Subscribe');
768
- };
769
- FacebookStandardEvents.prototype.viewContent = function () {
573
+ }
574
+ viewContent() {
770
575
  return new FacebookStandardEvent('ViewContent');
771
- };
772
- return FacebookStandardEvents;
773
- }());
576
+ }
577
+ }
774
578
 
775
- var Gtag = /** @class */ (function () {
776
- function Gtag(ga4id, awid, domains) {
579
+ class Gtag {
580
+ constructor(ga4id, awid, domains) {
777
581
  var _a, _b, _c, _d;
778
582
  this.ga4id = ga4id;
779
583
  this.awid = awid;
@@ -788,328 +592,255 @@ var Gtag = /** @class */ (function () {
788
592
  this.gtag('js', new Date());
789
593
  this.gtag('config', ga4id);
790
594
  //this.gtag('config', awid) - this is configured in the Data Stream in Google Analytics
791
- var parsedQueryString = parse(document.location.search);
595
+ const parsedQueryString = parse(document.location.search);
792
596
  //we handle the utm_referrer here incase a referrer was forwarded (special.coinapp.co does this)
793
597
  sessionStorage.setItem('initialReferrer', decodeURIComponent((_d = (_c = parsedQueryString['utm_referrer']) === null || _c === void 0 ? void 0 : _c.toString()) !== null && _d !== void 0 ? _d : document.referrer));
794
598
  delete parsedQueryString['utm_referrer'];
795
- var remainingSearch = parsedQueryString ? stringify(parsedQueryString) : '';
599
+ const remainingSearch = parsedQueryString ? stringify(parsedQueryString) : '';
796
600
  sessionStorage.setItem('initialQuery', remainingSearch);
797
601
  sessionStorage.setItem('initialPage', document.location.href);
798
602
  }
799
- Gtag.prototype.updatePagePath = function (page_path) {
800
- var ga4id = assertEx(this.ga4id, 'Missing GA4ID');
801
- var pathOnly = page_path.split('?')[0];
802
- var search = Gtag.getInitialQuery();
803
- this.gtag('config', ga4id, { page_path: "".concat(pathOnly).concat(search) });
804
- };
603
+ updatePagePath(page_path) {
604
+ const ga4id = assertEx(this.ga4id, 'Missing GA4ID');
605
+ const pathOnly = page_path.split('?')[0];
606
+ const search = Gtag.getInitialQuery();
607
+ this.gtag('config', ga4id, { page_path: `${pathOnly}${search}` });
608
+ }
805
609
  //
806
- Gtag.getInitialQuery = function () {
610
+ static getInitialQuery() {
807
611
  return sessionStorage.getItem('initialQuery') || '';
808
- };
809
- Gtag.getInitialPage = function () {
612
+ }
613
+ static getInitialPage() {
810
614
  return sessionStorage.getItem('initialPage') || '';
811
- };
812
- Gtag.getInitialReferrer = function () {
615
+ }
616
+ static getInitialReferrer() {
813
617
  return sessionStorage.getItem('initialReferrer') || '';
814
- };
815
- Gtag.clearDataLayer = function () {
816
- var dataLayer = global.dataLayer;
618
+ }
619
+ static clearDataLayer() {
620
+ const dataLayer = global.dataLayer;
817
621
  dataLayer.length = 0;
818
- };
819
- Gtag.init = function (ga4id, awid, domains) {
622
+ }
623
+ static init(ga4id, awid, domains) {
820
624
  if (!this.instance) {
821
625
  return this.reinit(ga4id, awid, domains);
822
626
  }
823
627
  return this.instance;
824
- };
825
- Gtag.reinit = function (ga4id, awid, domains) {
628
+ }
629
+ static reinit(ga4id, awid, domains) {
826
630
  this.instance = new Gtag(ga4id, awid, domains);
827
631
  return this.instance;
828
- };
829
- Gtag.updatePagePath = function (page_path) {
830
- var instance = assertEx(this.instance, 'Not initialized');
632
+ }
633
+ static updatePagePath(page_path) {
634
+ const instance = assertEx(this.instance, 'Not initialized');
831
635
  return instance.updatePagePath(page_path);
832
- };
833
- Gtag.prototype.sendAnalytics = function (event, data) {
834
- var _this = this;
835
- return new Promise(function (resolve) {
836
- _this.gtag('event', event, __assign(__assign({}, data), { event_callback: function () {
636
+ }
637
+ sendAnalytics(event, data) {
638
+ return new Promise((resolve) => {
639
+ this.gtag('event', event, Object.assign(Object.assign({}, data), { event_callback: () => {
837
640
  resolve();
838
- }, event_timeout: 2000, page_location: Gtag.getInitialPage(), page_referrer: Gtag.getInitialReferrer(), send_to: _this.ga4id }));
641
+ }, event_timeout: 2000, page_location: Gtag.getInitialPage(), page_referrer: Gtag.getInitialReferrer(), send_to: this.ga4id }));
839
642
  });
840
- };
841
- Gtag.prototype.sendAdwords = function (event, data) {
842
- var _this = this;
843
- return new Promise(function (resolve) {
844
- _this.gtag('event', 'conversion', __assign(__assign({}, data), { event_callback: function () {
643
+ }
644
+ sendAdwords(event, data) {
645
+ return new Promise((resolve) => {
646
+ this.gtag('event', 'conversion', Object.assign(Object.assign({}, data), { event_callback: () => {
845
647
  resolve();
846
- }, event_timeout: 2000, send_to: "".concat(_this.awid, "/").concat(event) }));
648
+ }, event_timeout: 2000, send_to: `${this.awid}/${event}` }));
847
649
  });
848
- };
849
- return Gtag;
850
- }());
650
+ }
651
+ }
851
652
 
852
- var Gtm = /** @class */ (function () {
853
- function Gtm(containerId) {
653
+ class Gtm {
654
+ constructor(containerId) {
854
655
  this.containerId = containerId;
855
- var global = window;
656
+ const global = window;
856
657
  global.dataLayer = global.dataLayer || [];
857
658
  global.dataLayer.push({ event: 'gtm.js', 'gtm.start': new Date().getTime() });
858
659
  }
859
- Gtm.getInitialQuery = function () {
660
+ static getInitialQuery() {
860
661
  return sessionStorage.getItem('initialQuery') || '';
861
- };
862
- Gtm.clearDataLayer = function () {
863
- var global = window;
864
- var dataLayer = global.dataLayer;
662
+ }
663
+ static clearDataLayer() {
664
+ const global = window;
665
+ const dataLayer = global.dataLayer;
865
666
  dataLayer.length = 0;
866
- };
867
- Gtm.init = function (containerId) {
667
+ }
668
+ static init(containerId) {
868
669
  if (!this.instance) {
869
670
  this.instance = new Gtm(containerId);
870
671
  }
871
672
  return this.instance;
872
- };
873
- Gtm.prototype.send = function (event, data, eventTimeout) {
874
- if (eventTimeout === void 0) { eventTimeout = 500; }
875
- return new Promise(function (resolve) {
673
+ }
674
+ send(event, data, eventTimeout = 500) {
675
+ return new Promise((resolve) => {
876
676
  var _a;
877
- var global = window;
878
- (_a = global.dataLayer) === null || _a === void 0 ? void 0 : _a.push(__assign(__assign({ event: event }, data), { eventCallback: function () {
677
+ const global = window;
678
+ (_a = global.dataLayer) === null || _a === void 0 ? void 0 : _a.push(Object.assign(Object.assign({ event }, data), { eventCallback: () => {
879
679
  resolve();
880
- }, eventTimeout: eventTimeout }));
680
+ }, eventTimeout }));
881
681
  });
882
- };
883
- return Gtm;
884
- }());
682
+ }
683
+ }
885
684
 
886
- var GoogleBaseEvent = /** @class */ (function () {
887
- function GoogleBaseEvent(name, adwordConversionId) {
685
+ class GoogleBaseEvent {
686
+ constructor(name, adwordConversionId) {
888
687
  this.name = name;
889
688
  this.adwordConversionId = adwordConversionId;
890
689
  }
891
- GoogleBaseEvent.prototype.send = function (data) {
892
- return __awaiter(this, void 0, void 0, function () {
893
- return __generator(this, function (_a) {
894
- switch (_a.label) {
895
- case 0: return [4 /*yield*/, this.sendGtag(data)];
896
- case 1: return [2 /*return*/, _a.sent()];
897
- }
898
- });
690
+ send(data) {
691
+ return __awaiter(this, void 0, void 0, function* () {
692
+ return yield this.sendGtag(data);
899
693
  });
900
- };
901
- GoogleBaseEvent.prototype.sendGtag = function (data) {
902
- return __awaiter(this, void 0, void 0, function () {
903
- return __generator(this, function (_a) {
904
- switch (_a.label) {
905
- case 0: return [4 /*yield*/, this.gtag().sendAnalytics(this.name, data)];
906
- case 1:
907
- _a.sent();
908
- if (!this.adwordConversionId) return [3 /*break*/, 3];
909
- return [4 /*yield*/, this.gtag().sendAdwords(this.adwordConversionId, data)];
910
- case 2:
911
- _a.sent();
912
- _a.label = 3;
913
- case 3: return [2 /*return*/];
914
- }
915
- });
694
+ }
695
+ sendGtag(data) {
696
+ return __awaiter(this, void 0, void 0, function* () {
697
+ yield this.gtag().sendAnalytics(this.name, data);
698
+ if (this.adwordConversionId) {
699
+ yield this.gtag().sendAdwords(this.adwordConversionId, data);
700
+ }
916
701
  });
917
- };
918
- GoogleBaseEvent.prototype.sendGtm = function (data) {
919
- return __awaiter(this, void 0, void 0, function () {
920
- return __generator(this, function (_a) {
921
- switch (_a.label) {
922
- case 0: return [4 /*yield*/, this.gtm().send(this.name, data)];
923
- case 1:
924
- _a.sent();
925
- return [2 /*return*/];
926
- }
927
- });
702
+ }
703
+ sendGtm(data) {
704
+ return __awaiter(this, void 0, void 0, function* () {
705
+ yield this.gtm().send(this.name, data);
928
706
  });
929
- };
930
- GoogleBaseEvent.prototype.gtag = function () {
707
+ }
708
+ gtag() {
931
709
  return assertEx(Gtag.instance, 'Missing/uninitialized gtag');
932
- };
933
- GoogleBaseEvent.prototype.gtm = function () {
710
+ }
711
+ gtm() {
934
712
  return assertEx(Gtm.instance, 'Missing/uninitialized gtm');
935
- };
936
- return GoogleBaseEvent;
937
- }());
938
-
939
- var GoogleCustomEvent = /** @class */ (function (_super) {
940
- __extends(GoogleCustomEvent, _super);
941
- function GoogleCustomEvent() {
942
- return _super !== null && _super.apply(this, arguments) || this;
943
- }
944
- return GoogleCustomEvent;
945
- }(GoogleBaseEvent));
946
-
947
- var GoogleUserEventHandler = /** @class */ (function () {
948
- function GoogleUserEventHandler() {
949
- }
950
- GoogleUserEventHandler.prototype.testStarted = function (data) {
951
- return __awaiter(this, void 0, void 0, function () {
952
- var event;
953
- return __generator(this, function (_a) {
954
- switch (_a.label) {
955
- case 0:
956
- event = new GoogleCustomEvent('TestStarted');
957
- return [4 /*yield*/, event.send(data)];
958
- case 1: return [2 /*return*/, _a.sent()];
959
- }
960
- });
713
+ }
714
+ }
715
+
716
+ class GoogleCustomEvent extends GoogleBaseEvent {
717
+ }
718
+
719
+ class GoogleUserEventHandler {
720
+ testStarted(data) {
721
+ return __awaiter(this, void 0, void 0, function* () {
722
+ const event = new GoogleCustomEvent('TestStarted');
723
+ return yield event.send(data);
961
724
  });
962
- };
963
- GoogleUserEventHandler.prototype.funnelStarted = function (data) {
964
- return __awaiter(this, void 0, void 0, function () {
965
- var event;
966
- return __generator(this, function (_a) {
967
- switch (_a.label) {
968
- case 0:
969
- event = new GoogleCustomEvent('FunnelStarted');
970
- return [4 /*yield*/, event.send(data)];
971
- case 1: return [2 /*return*/, _a.sent()];
972
- }
973
- });
725
+ }
726
+ funnelStarted(data) {
727
+ return __awaiter(this, void 0, void 0, function* () {
728
+ const event = new GoogleCustomEvent('FunnelStarted');
729
+ return yield event.send(data);
974
730
  });
975
- };
976
- GoogleUserEventHandler.prototype.viewContent = function (data) {
977
- return __awaiter(this, void 0, void 0, function () {
978
- var event;
979
- return __generator(this, function (_a) {
980
- switch (_a.label) {
981
- case 0:
982
- event = new GoogleCustomEvent('ViewContent');
983
- return [4 /*yield*/, event.send(data)];
984
- case 1: return [2 /*return*/, _a.sent()];
985
- }
986
- });
731
+ }
732
+ viewContent(data) {
733
+ return __awaiter(this, void 0, void 0, function* () {
734
+ const event = new GoogleCustomEvent('ViewContent');
735
+ return yield event.send(data);
987
736
  });
988
- };
989
- GoogleUserEventHandler.prototype.userClick = function (data) {
990
- return __awaiter(this, void 0, void 0, function () {
991
- var event;
992
- return __generator(this, function (_a) {
993
- switch (_a.label) {
994
- case 0:
995
- event = new GoogleCustomEvent('UserClick');
996
- return [4 /*yield*/, event.send(data)];
997
- case 1: return [2 /*return*/, _a.sent()];
998
- }
999
- });
737
+ }
738
+ userClick(data) {
739
+ return __awaiter(this, void 0, void 0, function* () {
740
+ const event = new GoogleCustomEvent('UserClick');
741
+ return yield event.send(data);
1000
742
  });
1001
- };
1002
- return GoogleUserEventHandler;
1003
- }());
1004
-
1005
- var GoogleStandardEvent = /** @class */ (function (_super) {
1006
- __extends(GoogleStandardEvent, _super);
1007
- function GoogleStandardEvent() {
1008
- return _super !== null && _super.apply(this, arguments) || this;
1009
743
  }
1010
- return GoogleStandardEvent;
1011
- }(GoogleBaseEvent));
744
+ }
1012
745
 
1013
- var GoogleStandardEvents = /** @class */ (function () {
1014
- function GoogleStandardEvents() {
1015
- }
1016
- GoogleStandardEvents.prototype.addPaymentInfo = function () {
746
+ class GoogleStandardEvent extends GoogleBaseEvent {
747
+ }
748
+
749
+ class GoogleStandardEvents {
750
+ addPaymentInfo() {
1017
751
  return new GoogleStandardEvent('add_paymennt_info');
1018
- };
1019
- GoogleStandardEvents.prototype.addShippingInfo = function () {
752
+ }
753
+ addShippingInfo() {
1020
754
  return new GoogleStandardEvent('add_shipping_info');
1021
- };
1022
- GoogleStandardEvents.prototype.addToCart = function () {
755
+ }
756
+ addToCart() {
1023
757
  return new GoogleStandardEvent('add_to_cart');
1024
- };
1025
- GoogleStandardEvents.prototype.addToWishList = function () {
758
+ }
759
+ addToWishList() {
1026
760
  return new GoogleStandardEvent('add_to_wishlist');
1027
- };
1028
- GoogleStandardEvents.prototype.beginCheckout = function () {
761
+ }
762
+ beginCheckout() {
1029
763
  return new GoogleStandardEvent('begin_checkout');
1030
- };
1031
- GoogleStandardEvents.prototype.earnVirtualCurrency = function () {
764
+ }
765
+ earnVirtualCurrency() {
1032
766
  return new GoogleStandardEvent('earn_virtual_currency');
1033
- };
1034
- GoogleStandardEvents.prototype.generateLead = function () {
767
+ }
768
+ generateLead() {
1035
769
  return new GoogleStandardEvent('generate_lead');
1036
- };
1037
- GoogleStandardEvents.prototype.joinGroup = function () {
770
+ }
771
+ joinGroup() {
1038
772
  return new GoogleStandardEvent('join_group');
1039
- };
1040
- GoogleStandardEvents.prototype.levelEnd = function () {
773
+ }
774
+ levelEnd() {
1041
775
  return new GoogleStandardEvent('level_end');
1042
- };
1043
- GoogleStandardEvents.prototype.levelStart = function () {
776
+ }
777
+ levelStart() {
1044
778
  return new GoogleStandardEvent('level_start');
1045
- };
1046
- GoogleStandardEvents.prototype.levelUp = function () {
779
+ }
780
+ levelUp() {
1047
781
  return new GoogleStandardEvent('level_up');
1048
- };
1049
- GoogleStandardEvents.prototype.login = function () {
782
+ }
783
+ login() {
1050
784
  return new GoogleStandardEvent('login');
1051
- };
1052
- GoogleStandardEvents.prototype.postScore = function () {
785
+ }
786
+ postScore() {
1053
787
  return new GoogleStandardEvent('post_score');
1054
- };
1055
- GoogleStandardEvents.prototype.purchase = function () {
788
+ }
789
+ purchase() {
1056
790
  return new GoogleStandardEvent('purchase');
1057
- };
1058
- GoogleStandardEvents.prototype.refund = function () {
791
+ }
792
+ refund() {
1059
793
  return new GoogleStandardEvent('refund');
1060
- };
1061
- GoogleStandardEvents.prototype.removeFromCart = function () {
794
+ }
795
+ removeFromCart() {
1062
796
  return new GoogleStandardEvent('remove_from_cart');
1063
- };
1064
- GoogleStandardEvents.prototype.search = function () {
797
+ }
798
+ search() {
1065
799
  return new GoogleStandardEvent('search');
1066
- };
1067
- GoogleStandardEvents.prototype.selectContent = function () {
800
+ }
801
+ selectContent() {
1068
802
  return new GoogleStandardEvent('select_content');
1069
- };
1070
- GoogleStandardEvents.prototype.selectItem = function () {
803
+ }
804
+ selectItem() {
1071
805
  return new GoogleStandardEvent('select_item');
1072
- };
1073
- GoogleStandardEvents.prototype.selectPromotion = function () {
806
+ }
807
+ selectPromotion() {
1074
808
  return new GoogleStandardEvent('select_promotion');
1075
- };
1076
- GoogleStandardEvents.prototype.share = function () {
809
+ }
810
+ share() {
1077
811
  return new GoogleStandardEvent('share');
1078
- };
1079
- GoogleStandardEvents.prototype.signUp = function () {
812
+ }
813
+ signUp() {
1080
814
  return new GoogleStandardEvent('sign_up');
1081
- };
1082
- GoogleStandardEvents.prototype.spendVirtualCurrency = function () {
815
+ }
816
+ spendVirtualCurrency() {
1083
817
  return new GoogleStandardEvent('spend_virtual_currency');
1084
- };
1085
- GoogleStandardEvents.prototype.tutorialBegin = function () {
818
+ }
819
+ tutorialBegin() {
1086
820
  return new GoogleStandardEvent('tutorial_begin');
1087
- };
1088
- GoogleStandardEvents.prototype.tutorialComplete = function () {
821
+ }
822
+ tutorialComplete() {
1089
823
  return new GoogleStandardEvent('tutorial_complete');
1090
- };
1091
- GoogleStandardEvents.prototype.unlockAchievement = function () {
824
+ }
825
+ unlockAchievement() {
1092
826
  return new GoogleStandardEvent('unlock_achievement');
1093
- };
1094
- GoogleStandardEvents.prototype.viewCart = function () {
827
+ }
828
+ viewCart() {
1095
829
  return new GoogleStandardEvent('view_cart');
1096
- };
1097
- GoogleStandardEvents.prototype.viewItem = function () {
830
+ }
831
+ viewItem() {
1098
832
  return new GoogleStandardEvent('view_item');
1099
- };
1100
- GoogleStandardEvents.prototype.viewItemList = function () {
833
+ }
834
+ viewItemList() {
1101
835
  return new GoogleStandardEvent('view_item_list');
1102
- };
1103
- GoogleStandardEvents.prototype.viewPromotion = function () {
836
+ }
837
+ viewPromotion() {
1104
838
  return new GoogleStandardEvent('view_promotion');
1105
- };
1106
- return GoogleStandardEvents;
1107
- }());
1108
-
1109
- var Rdt = /** @class */ (function () {
1110
- function Rdt() {
1111
839
  }
1112
- Rdt.init = function (pixelId) {
840
+ }
841
+
842
+ class Rdt {
843
+ static init(pixelId) {
1113
844
  try {
1114
845
  Rdt.instance = new Rdt();
1115
846
  Rdt.instance.load(pixelId);
@@ -1118,553 +849,391 @@ var Rdt = /** @class */ (function () {
1118
849
  catch (ex) {
1119
850
  console.error(ex);
1120
851
  }
1121
- };
1122
- Rdt.getRdt = function () {
852
+ }
853
+ static getRdt() {
1123
854
  if (global.rdt) {
1124
855
  return global.rdt;
1125
856
  }
1126
857
  console.warn('Missing rdt');
1127
- };
1128
- Rdt.prototype.load = function (id) {
858
+ }
859
+ load(id) {
1129
860
  try {
1130
861
  Rdt.getRdt()('init', id);
1131
862
  }
1132
863
  catch (ex) {
1133
864
  console.error(ex);
1134
865
  }
1135
- };
1136
- Rdt.prototype.track = function (event, data) {
866
+ }
867
+ track(event, data) {
1137
868
  try {
1138
- Rdt.getRdt()('track', event, __assign({}, data));
869
+ Rdt.getRdt()('track', event, Object.assign({}, data));
1139
870
  }
1140
871
  catch (ex) {
1141
872
  console.error(ex);
1142
873
  }
1143
- };
1144
- return Rdt;
1145
- }());
874
+ }
875
+ }
1146
876
 
1147
- var RedditBaseEvent = /** @class */ (function () {
1148
- function RedditBaseEvent(name) {
877
+ class RedditBaseEvent {
878
+ constructor(name) {
1149
879
  this.name = name;
1150
880
  this.rdt = assertEx(Rdt.instance, 'Missing Rdt');
1151
881
  }
1152
- RedditBaseEvent.prototype.send = function (_data) {
1153
- return __awaiter(this, void 0, void 0, function () {
1154
- return __generator(this, function (_a) {
1155
- switch (_a.label) {
1156
- case 0: return [4 /*yield*/, delay(0)]; //force async to increase reporting odds
1157
- case 1:
1158
- _a.sent(); //force async to increase reporting odds
1159
- return [2 /*return*/];
1160
- }
1161
- });
1162
- });
1163
- };
1164
- return RedditBaseEvent;
1165
- }());
1166
-
1167
- var RedditCustomEvent = /** @class */ (function (_super) {
1168
- __extends(RedditCustomEvent, _super);
1169
- function RedditCustomEvent() {
1170
- return _super !== null && _super.apply(this, arguments) || this;
1171
- }
1172
- RedditCustomEvent.prototype.send = function (data) {
1173
- return __awaiter(this, void 0, void 0, function () {
1174
- return __generator(this, function (_a) {
1175
- switch (_a.label) {
1176
- case 0:
1177
- this.rdt.track(this.name, data);
1178
- return [4 /*yield*/, delay(0)]; //force async to increase reporting odds
1179
- case 1:
1180
- _a.sent(); //force async to increase reporting odds
1181
- return [2 /*return*/];
1182
- }
1183
- });
882
+ send(_data) {
883
+ return __awaiter(this, void 0, void 0, function* () {
884
+ yield delay(0); //force async to increase reporting odds
1184
885
  });
1185
- };
1186
- return RedditCustomEvent;
1187
- }(RedditBaseEvent));
1188
-
1189
- var RedditStandardEvent = /** @class */ (function (_super) {
1190
- __extends(RedditStandardEvent, _super);
1191
- function RedditStandardEvent() {
1192
- return _super !== null && _super.apply(this, arguments) || this;
1193
- }
1194
- RedditStandardEvent.prototype.send = function (data) {
1195
- return __awaiter(this, void 0, void 0, function () {
1196
- return __generator(this, function (_a) {
1197
- switch (_a.label) {
1198
- case 0:
1199
- this.rdt.track(this.name, data);
1200
- return [4 /*yield*/, delay(0)]; //force async to increase reporting odds
1201
- case 1:
1202
- _a.sent(); //force async to increase reporting odds
1203
- return [2 /*return*/];
1204
- }
1205
- });
886
+ }
887
+ }
888
+
889
+ class RedditCustomEvent extends RedditBaseEvent {
890
+ send(data) {
891
+ return __awaiter(this, void 0, void 0, function* () {
892
+ this.rdt.track(this.name, data);
893
+ yield delay(0); //force async to increase reporting odds
1206
894
  });
1207
- };
1208
- return RedditStandardEvent;
1209
- }(RedditBaseEvent));
895
+ }
896
+ }
1210
897
 
1211
- var RedditStandardEvents = /** @class */ (function () {
1212
- function RedditStandardEvents() {
898
+ class RedditStandardEvent extends RedditBaseEvent {
899
+ send(data) {
900
+ return __awaiter(this, void 0, void 0, function* () {
901
+ this.rdt.track(this.name, data);
902
+ yield delay(0); //force async to increase reporting odds
903
+ });
1213
904
  }
1214
- RedditStandardEvents.prototype.pageView = function () {
905
+ }
906
+
907
+ class RedditStandardEvents {
908
+ pageView() {
1215
909
  return new RedditStandardEvent('PageView');
1216
- };
1217
- RedditStandardEvents.prototype.viewContent = function () {
910
+ }
911
+ viewContent() {
1218
912
  return new RedditStandardEvent('ViewContent');
1219
- };
1220
- RedditStandardEvents.prototype.addToCart = function () {
913
+ }
914
+ addToCart() {
1221
915
  return new RedditStandardEvent('AddToCart');
1222
- };
1223
- RedditStandardEvents.prototype.addToWishlist = function () {
916
+ }
917
+ addToWishlist() {
1224
918
  return new RedditStandardEvent('AddToWishlist');
1225
- };
1226
- RedditStandardEvents.prototype.purchase = function () {
919
+ }
920
+ purchase() {
1227
921
  return new RedditStandardEvent('Purchase');
1228
- };
1229
- RedditStandardEvents.prototype.signup = function () {
922
+ }
923
+ signup() {
1230
924
  return new RedditStandardEvent('SignUp');
1231
- };
1232
- RedditStandardEvents.prototype.lead = function () {
925
+ }
926
+ lead() {
1233
927
  return new RedditStandardEvent('Lead');
1234
- };
1235
- RedditStandardEvents.prototype.search = function () {
928
+ }
929
+ search() {
1236
930
  return new RedditStandardEvent('Search');
1237
- };
1238
- return RedditStandardEvents;
1239
- }());
1240
-
1241
- var SnapTr = /** @class */ (function () {
1242
- function SnapTr() {
1243
931
  }
1244
- SnapTr.getSnapTr = function () {
932
+ }
933
+
934
+ class SnapTr {
935
+ static getSnapTr() {
1245
936
  if (global.snaptr) {
1246
937
  return global.snaptr;
1247
938
  }
1248
939
  console.warn('Missing snaptr');
1249
- };
1250
- SnapTr.track = function (event, data) {
1251
- return __awaiter(this, void 0, void 0, function () {
1252
- return __generator(this, function (_a) {
1253
- switch (_a.label) {
1254
- case 0:
1255
- this.getSnapTr()('track', event, data);
1256
- return [4 /*yield*/, delay(0)];
1257
- case 1:
1258
- _a.sent();
1259
- return [2 /*return*/];
1260
- }
1261
- });
940
+ }
941
+ static track(event, data) {
942
+ return __awaiter(this, void 0, void 0, function* () {
943
+ this.getSnapTr()('track', event, data);
944
+ yield delay(0);
1262
945
  });
1263
- };
1264
- return SnapTr;
1265
- }());
946
+ }
947
+ }
1266
948
 
1267
- var SnapchatBaseEvent = /** @class */ (function () {
1268
- function SnapchatBaseEvent(name) {
949
+ class SnapchatBaseEvent {
950
+ constructor(name) {
1269
951
  this.name = name;
1270
952
  }
1271
- SnapchatBaseEvent.prototype.send = function (_data) {
1272
- return __awaiter(this, void 0, void 0, function () {
1273
- return __generator(this, function (_a) {
1274
- switch (_a.label) {
1275
- case 0: return [4 /*yield*/, delay(0)]; //force async to increase reporting odds
1276
- case 1:
1277
- _a.sent(); //force async to increase reporting odds
1278
- return [2 /*return*/];
1279
- }
1280
- });
1281
- });
1282
- };
1283
- return SnapchatBaseEvent;
1284
- }());
1285
-
1286
- var SnapchatStandardEvent = /** @class */ (function (_super) {
1287
- __extends(SnapchatStandardEvent, _super);
1288
- function SnapchatStandardEvent() {
1289
- return _super !== null && _super.apply(this, arguments) || this;
1290
- }
1291
- SnapchatStandardEvent.prototype.send = function (data) {
1292
- return __awaiter(this, void 0, void 0, function () {
1293
- return __generator(this, function (_a) {
1294
- switch (_a.label) {
1295
- case 0: return [4 /*yield*/, SnapTr.track(this.name, data)];
1296
- case 1:
1297
- _a.sent();
1298
- return [2 /*return*/];
1299
- }
1300
- });
953
+ send(_data) {
954
+ return __awaiter(this, void 0, void 0, function* () {
955
+ yield delay(0); //force async to increase reporting odds
1301
956
  });
1302
- };
1303
- return SnapchatStandardEvent;
1304
- }(SnapchatBaseEvent));
957
+ }
958
+ }
1305
959
 
1306
- var SnapchatStandardEvents = /** @class */ (function () {
1307
- function SnapchatStandardEvents() {
960
+ class SnapchatStandardEvent extends SnapchatBaseEvent {
961
+ send(data) {
962
+ return __awaiter(this, void 0, void 0, function* () {
963
+ yield SnapTr.track(this.name, data);
964
+ });
1308
965
  }
1309
- SnapchatStandardEvents.prototype.pageView = function () {
966
+ }
967
+
968
+ class SnapchatStandardEvents {
969
+ pageView() {
1310
970
  return new SnapchatStandardEvent('PAGE_VIEW');
1311
- };
1312
- SnapchatStandardEvents.prototype.signUp = function () {
971
+ }
972
+ signUp() {
1313
973
  return new SnapchatStandardEvent('SIGN_UP');
1314
- };
1315
- SnapchatStandardEvents.prototype.purchase = function () {
974
+ }
975
+ purchase() {
1316
976
  return new SnapchatStandardEvent('PURCHASE');
1317
- };
1318
- SnapchatStandardEvents.prototype.save = function () {
977
+ }
978
+ save() {
1319
979
  return new SnapchatStandardEvent('SAVE');
1320
- };
1321
- SnapchatStandardEvents.prototype.startCheckout = function () {
980
+ }
981
+ startCheckout() {
1322
982
  return new SnapchatStandardEvent('START_CHECKOUT');
1323
- };
1324
- SnapchatStandardEvents.prototype.addCart = function () {
983
+ }
984
+ addCart() {
1325
985
  return new SnapchatStandardEvent('ADD_CART');
1326
- };
1327
- SnapchatStandardEvents.prototype.openApp = function () {
986
+ }
987
+ openApp() {
1328
988
  return new SnapchatStandardEvent('OPEN_APP');
1329
- };
1330
- SnapchatStandardEvents.prototype.viewContent = function () {
989
+ }
990
+ viewContent() {
1331
991
  return new SnapchatStandardEvent('VIEW_CONTENT');
1332
- };
1333
- SnapchatStandardEvents.prototype.addBilling = function () {
992
+ }
993
+ addBilling() {
1334
994
  return new SnapchatStandardEvent('ADD_BILLING');
1335
- };
1336
- SnapchatStandardEvents.prototype.search = function () {
995
+ }
996
+ search() {
1337
997
  return new SnapchatStandardEvent('SEARCH');
1338
- };
1339
- SnapchatStandardEvents.prototype.subscribe = function () {
998
+ }
999
+ subscribe() {
1340
1000
  return new SnapchatStandardEvent('SUBSCRIBE');
1341
- };
1342
- SnapchatStandardEvents.prototype.adClick = function () {
1001
+ }
1002
+ adClick() {
1343
1003
  return new SnapchatStandardEvent('AD_CLICK');
1344
- };
1345
- SnapchatStandardEvents.prototype.adView = function () {
1004
+ }
1005
+ adView() {
1346
1006
  return new SnapchatStandardEvent('AD_VIEW');
1347
- };
1348
- SnapchatStandardEvents.prototype.completeTutorial = function () {
1007
+ }
1008
+ completeTutorial() {
1349
1009
  return new SnapchatStandardEvent('COMPLETE_TUTORIAL');
1350
- };
1351
- SnapchatStandardEvents.prototype.invite = function () {
1010
+ }
1011
+ invite() {
1352
1012
  return new SnapchatStandardEvent('INVITE');
1353
- };
1354
- SnapchatStandardEvents.prototype.login = function () {
1013
+ }
1014
+ login() {
1355
1015
  return new SnapchatStandardEvent('LOGIN');
1356
- };
1357
- SnapchatStandardEvents.prototype.share = function () {
1016
+ }
1017
+ share() {
1358
1018
  return new SnapchatStandardEvent('SHARE');
1359
- };
1360
- SnapchatStandardEvents.prototype.reserve = function () {
1019
+ }
1020
+ reserve() {
1361
1021
  return new SnapchatStandardEvent('RESERVE');
1362
- };
1363
- SnapchatStandardEvents.prototype.achievementUnlocked = function () {
1022
+ }
1023
+ achievementUnlocked() {
1364
1024
  return new SnapchatStandardEvent('ACHIEVEMENT_UNLOCKED');
1365
- };
1366
- SnapchatStandardEvents.prototype.addToWishlist = function () {
1025
+ }
1026
+ addToWishlist() {
1367
1027
  return new SnapchatStandardEvent('ADD_TO_WISHLIST');
1368
- };
1369
- SnapchatStandardEvents.prototype.spentCredits = function () {
1028
+ }
1029
+ spentCredits() {
1370
1030
  return new SnapchatStandardEvent('SPENT_CREDITS');
1371
- };
1372
- SnapchatStandardEvents.prototype.rate = function () {
1031
+ }
1032
+ rate() {
1373
1033
  return new SnapchatStandardEvent('RATE');
1374
- };
1375
- SnapchatStandardEvents.prototype.startTrial = function () {
1034
+ }
1035
+ startTrial() {
1376
1036
  return new SnapchatStandardEvent('START_TRIAL');
1377
- };
1378
- SnapchatStandardEvents.prototype.listView = function () {
1037
+ }
1038
+ listView() {
1379
1039
  return new SnapchatStandardEvent('LIST_VIEW');
1380
- };
1381
- SnapchatStandardEvents.prototype.custom1 = function () {
1040
+ }
1041
+ custom1() {
1382
1042
  return new SnapchatStandardEvent('CUSTOM_EVENT_1');
1383
- };
1384
- SnapchatStandardEvents.prototype.custom2 = function () {
1043
+ }
1044
+ custom2() {
1385
1045
  return new SnapchatStandardEvent('CUSTOM_EVENT_2');
1386
- };
1387
- SnapchatStandardEvents.prototype.custom3 = function () {
1046
+ }
1047
+ custom3() {
1388
1048
  return new SnapchatStandardEvent('CUSTOM_EVENT_3');
1389
- };
1390
- SnapchatStandardEvents.prototype.custom4 = function () {
1049
+ }
1050
+ custom4() {
1391
1051
  return new SnapchatStandardEvent('CUSTOM_EVENT_4');
1392
- };
1393
- SnapchatStandardEvents.prototype.custom5 = function () {
1052
+ }
1053
+ custom5() {
1394
1054
  return new SnapchatStandardEvent('CUSTOM_EVENT_5');
1395
- };
1396
- return SnapchatStandardEvents;
1397
- }());
1398
-
1399
- var Ttq = /** @class */ (function () {
1400
- function Ttq() {
1401
1055
  }
1402
- Ttq.init = function (pixelId) {
1056
+ }
1057
+
1058
+ class Ttq {
1059
+ static init(pixelId) {
1403
1060
  try {
1404
1061
  Ttq.instance = new Ttq();
1405
1062
  Ttq.getTtq().load(pixelId);
1406
1063
  Ttq.page();
1407
1064
  }
1408
1065
  catch (ex) {
1409
- console.error("Ttq.init: ".concat(ex));
1066
+ console.error(`Ttq.init: ${ex}`);
1410
1067
  }
1411
- };
1412
- Ttq.getTtq = function () {
1068
+ }
1069
+ static getTtq() {
1413
1070
  if (global.ttq) {
1414
1071
  return global.ttq;
1415
1072
  }
1416
1073
  console.warn('Missing ttq');
1417
- };
1418
- Ttq.page = function () {
1074
+ }
1075
+ static page() {
1419
1076
  try {
1420
1077
  Ttq.getTtq().page();
1421
1078
  }
1422
1079
  catch (ex) {
1423
- console.error("Ttq.page: ".concat(ex));
1080
+ console.error(`Ttq.page: ${ex}`);
1424
1081
  }
1425
- };
1426
- Ttq.prototype.track = function (event, data) {
1082
+ }
1083
+ track(event, data) {
1427
1084
  try {
1428
- Ttq.getTtq().track(event, __assign({}, data));
1085
+ Ttq.getTtq().track(event, Object.assign({}, data));
1429
1086
  }
1430
1087
  catch (ex) {
1431
- console.error("Ttq.track: ".concat(ex));
1088
+ console.error(`Ttq.track: ${ex}`);
1432
1089
  }
1433
- };
1434
- return Ttq;
1435
- }());
1090
+ }
1091
+ }
1436
1092
 
1437
- var TiktokBaseEvent = /** @class */ (function () {
1438
- function TiktokBaseEvent(name) {
1093
+ class TiktokBaseEvent {
1094
+ constructor(name) {
1439
1095
  this.name = name;
1440
1096
  this.ttq = assertEx(Ttq.instance, 'Missing Ttq');
1441
1097
  }
1442
- TiktokBaseEvent.prototype.send = function (_data) {
1443
- return __awaiter(this, void 0, void 0, function () {
1444
- return __generator(this, function (_a) {
1445
- switch (_a.label) {
1446
- case 0: return [4 /*yield*/, delay(0)]; //force async to increase reporting odds
1447
- case 1:
1448
- _a.sent(); //force async to increase reporting odds
1449
- return [2 /*return*/];
1450
- }
1451
- });
1452
- });
1453
- };
1454
- return TiktokBaseEvent;
1455
- }());
1456
-
1457
- var TiktokCustomEvent = /** @class */ (function (_super) {
1458
- __extends(TiktokCustomEvent, _super);
1459
- function TiktokCustomEvent() {
1460
- return _super !== null && _super.apply(this, arguments) || this;
1461
- }
1462
- TiktokCustomEvent.prototype.send = function (data) {
1463
- return __awaiter(this, void 0, void 0, function () {
1464
- return __generator(this, function (_a) {
1465
- switch (_a.label) {
1466
- case 0:
1467
- this.ttq.track(this.name, data);
1468
- return [4 /*yield*/, delay(0)]; //force async to increase reporting odds
1469
- case 1:
1470
- _a.sent(); //force async to increase reporting odds
1471
- return [2 /*return*/];
1472
- }
1473
- });
1098
+ send(_data) {
1099
+ return __awaiter(this, void 0, void 0, function* () {
1100
+ yield delay(0); //force async to increase reporting odds
1474
1101
  });
1475
- };
1476
- return TiktokCustomEvent;
1477
- }(TiktokBaseEvent));
1478
-
1479
- var TiktokStandardEvent = /** @class */ (function (_super) {
1480
- __extends(TiktokStandardEvent, _super);
1481
- function TiktokStandardEvent() {
1482
- return _super !== null && _super.apply(this, arguments) || this;
1483
- }
1484
- TiktokStandardEvent.prototype.send = function (data) {
1485
- return __awaiter(this, void 0, void 0, function () {
1486
- return __generator(this, function (_a) {
1487
- switch (_a.label) {
1488
- case 0:
1489
- this.ttq.track(this.name, data);
1490
- return [4 /*yield*/, delay(0)]; //force async to increase reporting odds
1491
- case 1:
1492
- _a.sent(); //force async to increase reporting odds
1493
- return [2 /*return*/];
1494
- }
1495
- });
1102
+ }
1103
+ }
1104
+
1105
+ class TiktokCustomEvent extends TiktokBaseEvent {
1106
+ send(data) {
1107
+ return __awaiter(this, void 0, void 0, function* () {
1108
+ this.ttq.track(this.name, data);
1109
+ yield delay(0); //force async to increase reporting odds
1496
1110
  });
1497
- };
1498
- return TiktokStandardEvent;
1499
- }(TiktokBaseEvent));
1111
+ }
1112
+ }
1500
1113
 
1501
- var TiktokStandardEvents = /** @class */ (function () {
1502
- function TiktokStandardEvents() {
1114
+ class TiktokStandardEvent extends TiktokBaseEvent {
1115
+ send(data) {
1116
+ return __awaiter(this, void 0, void 0, function* () {
1117
+ this.ttq.track(this.name, data);
1118
+ yield delay(0); //force async to increase reporting odds
1119
+ });
1503
1120
  }
1504
- TiktokStandardEvents.prototype.pageView = function () {
1121
+ }
1122
+
1123
+ class TiktokStandardEvents {
1124
+ pageView() {
1505
1125
  return new TiktokStandardEvent('Browse');
1506
- };
1507
- TiktokStandardEvents.prototype.viewContent = function () {
1126
+ }
1127
+ viewContent() {
1508
1128
  return new TiktokStandardEvent('ViewContent');
1509
- };
1510
- TiktokStandardEvents.prototype.addToCart = function () {
1129
+ }
1130
+ addToCart() {
1511
1131
  return new TiktokStandardEvent('AddToCart');
1512
- };
1513
- TiktokStandardEvents.prototype.checkout = function () {
1132
+ }
1133
+ checkout() {
1514
1134
  return new TiktokStandardEvent('Checkout');
1515
- };
1516
- TiktokStandardEvents.prototype.purchase = function () {
1135
+ }
1136
+ purchase() {
1517
1137
  return new TiktokStandardEvent('Purchase');
1518
- };
1519
- TiktokStandardEvents.prototype.registration = function () {
1138
+ }
1139
+ registration() {
1520
1140
  return new TiktokStandardEvent('Registration');
1521
- };
1522
- TiktokStandardEvents.prototype.startCheckout = function () {
1141
+ }
1142
+ startCheckout() {
1523
1143
  return new TiktokStandardEvent('StartCheckout');
1524
- };
1525
- TiktokStandardEvents.prototype.addBilling = function () {
1144
+ }
1145
+ addBilling() {
1526
1146
  return new TiktokStandardEvent('AddBilling');
1527
- };
1528
- TiktokStandardEvents.prototype.search = function () {
1147
+ }
1148
+ search() {
1529
1149
  return new TiktokStandardEvent('Search');
1530
- };
1531
- TiktokStandardEvents.prototype.viewForm = function () {
1150
+ }
1151
+ viewForm() {
1532
1152
  return new TiktokStandardEvent('ViewForm');
1533
- };
1534
- TiktokStandardEvents.prototype.clickForm = function () {
1153
+ }
1154
+ clickForm() {
1535
1155
  return new TiktokStandardEvent('ClickForm');
1536
- };
1537
- TiktokStandardEvents.prototype.submitForm = function () {
1156
+ }
1157
+ submitForm() {
1538
1158
  return new TiktokStandardEvent('SubmitForm');
1539
- };
1540
- TiktokStandardEvents.prototype.viewDownloadPage = function () {
1159
+ }
1160
+ viewDownloadPage() {
1541
1161
  return new TiktokStandardEvent('ViewDownloadPage');
1542
- };
1543
- TiktokStandardEvents.prototype.clickInDownloadPage = function () {
1162
+ }
1163
+ clickInDownloadPage() {
1544
1164
  return new TiktokStandardEvent('ClickInDownloadPage');
1545
- };
1546
- TiktokStandardEvents.prototype.clickToDownload = function () {
1165
+ }
1166
+ clickToDownload() {
1547
1167
  return new TiktokStandardEvent('ClickToDownload');
1548
- };
1549
- TiktokStandardEvents.prototype.clickButton = function () {
1168
+ }
1169
+ clickButton() {
1550
1170
  return new TiktokStandardEvent('ClickButton');
1551
- };
1552
- return TiktokStandardEvents;
1553
- }());
1171
+ }
1172
+ }
1554
1173
 
1555
- var XyBaseEvent = /** @class */ (function () {
1556
- function XyBaseEvent(name) {
1174
+ class XyBaseEvent {
1175
+ constructor(name) {
1557
1176
  this.name = name;
1558
1177
  }
1559
- XyBaseEvent.prototype.send = function (fields) {
1560
- return __awaiter(this, void 0, void 0, function () {
1561
- return __generator(this, function (_a) {
1562
- switch (_a.label) {
1563
- case 0: return [4 /*yield*/, XyPixel.instance.send(this.name, fields)];
1564
- case 1:
1565
- _a.sent();
1566
- return [2 /*return*/];
1567
- }
1568
- });
1178
+ send(fields) {
1179
+ return __awaiter(this, void 0, void 0, function* () {
1180
+ yield XyPixel.instance.send(this.name, fields);
1569
1181
  });
1570
- };
1571
- return XyBaseEvent;
1572
- }());
1573
-
1574
- var XyCustomEvent = /** @class */ (function (_super) {
1575
- __extends(XyCustomEvent, _super);
1576
- function XyCustomEvent() {
1577
- return _super !== null && _super.apply(this, arguments) || this;
1578
- }
1579
- return XyCustomEvent;
1580
- }(XyBaseEvent));
1581
-
1582
- var XyUserEventHandler = /** @class */ (function () {
1583
- function XyUserEventHandler() {
1584
- }
1585
- XyUserEventHandler.prototype.testStarted = function (data) {
1586
- return __awaiter(this, void 0, void 0, function () {
1587
- var event;
1588
- return __generator(this, function (_a) {
1589
- switch (_a.label) {
1590
- case 0:
1591
- event = new XyCustomEvent('TestStarted');
1592
- return [4 /*yield*/, event.send(data)];
1593
- case 1: return [2 /*return*/, _a.sent()];
1594
- }
1595
- });
1182
+ }
1183
+ }
1184
+
1185
+ class XyCustomEvent extends XyBaseEvent {
1186
+ }
1187
+
1188
+ class XyUserEventHandler {
1189
+ testStarted(data) {
1190
+ return __awaiter(this, void 0, void 0, function* () {
1191
+ const event = new XyCustomEvent('TestStarted');
1192
+ return yield event.send(data);
1596
1193
  });
1597
- };
1598
- XyUserEventHandler.prototype.funnelStarted = function (data) {
1599
- return __awaiter(this, void 0, void 0, function () {
1600
- var event;
1601
- return __generator(this, function (_a) {
1602
- switch (_a.label) {
1603
- case 0:
1604
- event = new XyCustomEvent('FunnelStarted');
1605
- return [4 /*yield*/, event.send(data)];
1606
- case 1: return [2 /*return*/, _a.sent()];
1607
- }
1608
- });
1194
+ }
1195
+ funnelStarted(data) {
1196
+ return __awaiter(this, void 0, void 0, function* () {
1197
+ const event = new XyCustomEvent('FunnelStarted');
1198
+ return yield event.send(data);
1609
1199
  });
1610
- };
1611
- XyUserEventHandler.prototype.viewContent = function (data) {
1612
- return __awaiter(this, void 0, void 0, function () {
1613
- var event;
1614
- return __generator(this, function (_a) {
1615
- switch (_a.label) {
1616
- case 0:
1617
- event = new XyCustomEvent('ViewContent');
1618
- return [4 /*yield*/, event.send(data)];
1619
- case 1: return [2 /*return*/, _a.sent()];
1620
- }
1621
- });
1200
+ }
1201
+ viewContent(data) {
1202
+ return __awaiter(this, void 0, void 0, function* () {
1203
+ const event = new XyCustomEvent('ViewContent');
1204
+ return yield event.send(data);
1622
1205
  });
1623
- };
1624
- XyUserEventHandler.prototype.userClick = function (data) {
1625
- return __awaiter(this, void 0, void 0, function () {
1626
- var event;
1627
- return __generator(this, function (_a) {
1628
- switch (_a.label) {
1629
- case 0:
1630
- event = new XyCustomEvent('UserClick');
1631
- return [4 /*yield*/, event.send(data)];
1632
- case 1: return [2 /*return*/, _a.sent()];
1633
- }
1634
- });
1206
+ }
1207
+ userClick(data) {
1208
+ return __awaiter(this, void 0, void 0, function* () {
1209
+ const event = new XyCustomEvent('UserClick');
1210
+ return yield event.send(data);
1635
1211
  });
1636
- };
1637
- return XyUserEventHandler;
1638
- }());
1212
+ }
1213
+ }
1639
1214
 
1640
- var MetaMaskEthersLoader = function (props) {
1641
- var children = props.children, _a = props.enabled, enabled = _a === void 0 ? true : _a;
1215
+ const MetaMaskEthersLoader = (props) => {
1216
+ const { children, enabled = true } = props;
1642
1217
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1643
- var global = window;
1644
- var ethereum = global.ethereum;
1645
- var _b = __read(useState(), 2), error = _b[0], setError = _b[1];
1646
- var _c = __read(useState(), 2), localAddress = _c[0], setLocalAddress = _c[1];
1647
- var _d = __read(useState(0), 2), resetCount = _d[0], setResetCount = _d[1];
1648
- var _e = __read(useState(), 2), providerName = _e[0], setProviderName = _e[1];
1218
+ const global = window;
1219
+ const ethereum = global.ethereum;
1220
+ const [error, setError] = useState();
1221
+ const [localAddress, setLocalAddress] = useState();
1222
+ const [resetCount, setResetCount] = useState(0);
1223
+ const [providerName, setProviderName] = useState();
1649
1224
  if (ethereum) {
1650
1225
  ethereum.autoRefreshOnNetworkChange = false;
1651
1226
  }
1652
- var connect = function () { return __awaiter(void 0, void 0, void 0, function () {
1227
+ const connect = () => __awaiter(void 0, void 0, void 0, function* () {
1653
1228
  var _a;
1654
- return __generator(this, function (_b) {
1655
- switch (_b.label) {
1656
- case 0: return [4 /*yield*/, ((_a = global.ethereum) === null || _a === void 0 ? void 0 : _a.enable())];
1657
- case 1:
1658
- _b.sent();
1659
- return [2 /*return*/, localAddress ? [localAddress.toString()] : []];
1660
- }
1661
- });
1662
- }); };
1663
- var _f = __read(useState(), 2), isConnected = _f[0], setIsConnected = _f[1];
1664
- useEffect(function () {
1229
+ yield ((_a = global.ethereum) === null || _a === void 0 ? void 0 : _a.enable());
1230
+ return localAddress ? [localAddress.toString()] : [];
1231
+ });
1232
+ const [isConnected, setIsConnected] = useState();
1233
+ useEffect(() => {
1665
1234
  if (ethereum && enabled) {
1666
- ethereum.on('accountsChanged', function (accounts) {
1667
- console.log("accountsChanged: ".concat(JSON.stringify(accounts)));
1235
+ ethereum.on('accountsChanged', (accounts) => {
1236
+ console.log(`accountsChanged: ${JSON.stringify(accounts)}`);
1668
1237
  setResetCount(resetCount + 1);
1669
1238
  if (accounts.length > 0) {
1670
1239
  setLocalAddress(EthAddress.fromString(accounts[0]));
@@ -1673,7 +1242,7 @@ var MetaMaskEthersLoader = function (props) {
1673
1242
  setLocalAddress(undefined);
1674
1243
  }
1675
1244
  });
1676
- ethereum.on('chainChanged', function (chainId) {
1245
+ ethereum.on('chainChanged', (chainId) => {
1677
1246
  setResetCount(resetCount + 1);
1678
1247
  if (chainId) {
1679
1248
  setChainId(parseInt(chainId));
@@ -1684,130 +1253,103 @@ var MetaMaskEthersLoader = function (props) {
1684
1253
  });
1685
1254
  }
1686
1255
  }, [ethereum, resetCount, enabled]);
1687
- var _g = __read(useState(), 2), walletProvider = _g[0], setWalletProvider = _g[1];
1688
- var _h = __read(useState(), 2), provider = _h[0], setProvider = _h[1];
1689
- var _j = __read(useState(), 2), signer = _j[0], setSigner = _j[1];
1690
- useEffect(function () {
1256
+ const [walletProvider, setWalletProvider] = useState();
1257
+ const [provider, setProvider] = useState();
1258
+ const [signer, setSigner] = useState();
1259
+ useEffect(() => {
1691
1260
  if (enabled) {
1692
- var walletProvider_1 = ethereum ? new Web3Provider(ethereum) : null;
1693
- var provider_1 = null;
1694
- var providerName_1 = null;
1695
- if (walletProvider_1) {
1696
- provider_1 = walletProvider_1;
1697
- providerName_1 = 'Meta Mask';
1261
+ const walletProvider = ethereum ? new Web3Provider(ethereum) : null;
1262
+ let provider = null;
1263
+ let providerName = null;
1264
+ if (walletProvider) {
1265
+ provider = walletProvider;
1266
+ providerName = 'Meta Mask';
1698
1267
  }
1699
1268
  else {
1700
- provider_1 = new InfuraProvider(1, infuraKey);
1701
- providerName_1 = 'Infura (Default)';
1269
+ provider = new InfuraProvider(1, infuraKey);
1270
+ providerName = 'Infura (Default)';
1702
1271
  }
1703
- provider_1 = walletProvider_1 !== null && walletProvider_1 !== void 0 ? walletProvider_1 : provider_1;
1704
- setProvider(provider_1);
1705
- setProviderName(providerName_1);
1706
- setWalletProvider(walletProvider_1);
1707
- var signer_1 = null;
1272
+ provider = walletProvider !== null && walletProvider !== void 0 ? walletProvider : provider;
1273
+ setProvider(provider);
1274
+ setProviderName(providerName);
1275
+ setWalletProvider(walletProvider);
1276
+ let signer = null;
1708
1277
  try {
1709
- signer_1 = walletProvider_1 === null || walletProvider_1 === void 0 ? void 0 : walletProvider_1.getSigner();
1278
+ signer = walletProvider === null || walletProvider === void 0 ? void 0 : walletProvider.getSigner();
1710
1279
  }
1711
1280
  catch (ex) {
1712
1281
  console.error(ex);
1713
1282
  }
1714
- setSigner(signer_1);
1283
+ setSigner(signer);
1715
1284
  }
1716
1285
  }, [ethereum, isConnected, enabled]);
1717
- useAsyncEffect(function (isMounted) { return __awaiter(void 0, void 0, void 0, function () {
1718
- var localAddress_1, _a, _b, ex_1;
1719
- return __generator(this, function (_c) {
1720
- switch (_c.label) {
1721
- case 0:
1722
- if (!(signer && enabled)) return [3 /*break*/, 4];
1723
- _c.label = 1;
1724
- case 1:
1725
- _c.trys.push([1, 3, , 4]);
1726
- _b = (_a = EthAddress).fromString;
1727
- return [4 /*yield*/, signer.getAddress()];
1728
- case 2:
1729
- localAddress_1 = _b.apply(_a, [_c.sent()]);
1730
- console.log("Setting Local Address: ".concat(localAddress_1));
1731
- if (isMounted()) {
1732
- setLocalAddress(localAddress_1);
1733
- setIsConnected(true);
1734
- }
1735
- return [3 /*break*/, 4];
1736
- case 3:
1737
- ex_1 = _c.sent();
1738
- if (isMounted()) {
1739
- setError(Error("localAddress: ".concat(ex_1)));
1740
- setLocalAddress(undefined);
1741
- setIsConnected(false);
1742
- }
1743
- return [3 /*break*/, 4];
1744
- case 4: return [2 /*return*/];
1286
+ useAsyncEffect((isMounted) => __awaiter(void 0, void 0, void 0, function* () {
1287
+ if (signer && enabled) {
1288
+ try {
1289
+ const localAddress = EthAddress.fromString(yield signer.getAddress());
1290
+ console.log(`Setting Local Address: ${localAddress}`);
1291
+ if (isMounted()) {
1292
+ setLocalAddress(localAddress);
1293
+ setIsConnected(true);
1294
+ }
1745
1295
  }
1746
- });
1747
- }); }, [signer, resetCount, enabled]);
1748
- var _k = __read(useState(), 2), chainId = _k[0], setChainId = _k[1];
1749
- useAsyncEffect(function (isMounted) { return __awaiter(void 0, void 0, void 0, function () {
1750
- var chainId_1;
1751
- var _a;
1752
- return __generator(this, function (_b) {
1753
- switch (_b.label) {
1754
- case 0:
1755
- if (!enabled) return [3 /*break*/, 2];
1756
- return [4 /*yield*/, (provider === null || provider === void 0 ? void 0 : provider.getNetwork())];
1757
- case 1:
1758
- chainId_1 = (_a = (_b.sent())) === null || _a === void 0 ? void 0 : _a.chainId;
1759
- if (!isMounted())
1760
- return [2 /*return*/];
1761
- setChainId(chainId_1);
1762
- _b.label = 2;
1763
- case 2: return [2 /*return*/];
1296
+ catch (ex) {
1297
+ if (isMounted()) {
1298
+ setError(Error(`localAddress: ${ex}`));
1299
+ setLocalAddress(undefined);
1300
+ setIsConnected(false);
1301
+ }
1764
1302
  }
1765
- });
1766
- }); }, [provider, enabled]);
1767
- return (jsx(EthersContext.Provider, __assign({ value: {
1303
+ }
1304
+ }), [signer, resetCount, enabled]);
1305
+ const [chainId, setChainId] = useState();
1306
+ useAsyncEffect((isMounted) => __awaiter(void 0, void 0, void 0, function* () {
1307
+ var _b;
1308
+ if (enabled) {
1309
+ const chainId = (_b = (yield (provider === null || provider === void 0 ? void 0 : provider.getNetwork()))) === null || _b === void 0 ? void 0 : _b.chainId;
1310
+ if (!isMounted())
1311
+ return;
1312
+ setChainId(chainId);
1313
+ }
1314
+ }), [provider, enabled]);
1315
+ return (jsx(EthersContext.Provider, Object.assign({ value: {
1768
1316
  busy: false,
1769
- chainId: chainId,
1770
- connect: connect,
1771
- error: error,
1772
- isConnected: isConnected,
1773
- localAddress: localAddress,
1774
- provider: provider,
1775
- providerName: providerName,
1317
+ chainId,
1318
+ connect,
1319
+ error,
1320
+ isConnected,
1321
+ localAddress,
1322
+ provider,
1323
+ providerName,
1776
1324
  signer: isConnected ? signer : undefined,
1777
- walletProvider: walletProvider,
1325
+ walletProvider,
1778
1326
  } }, { children: children }), void 0));
1779
1327
  };
1780
1328
 
1781
- var MyEtherWalletEthersLoader = function (props) {
1782
- var children = props.children;
1329
+ const MyEtherWalletEthersLoader = (props) => {
1330
+ const { children } = props;
1783
1331
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1784
- var global = window;
1785
- var ethereum = global.ethereum;
1786
- var _a = __read(useState(), 2), error = _a[0], setError = _a[1];
1787
- var _b = __read(useState(), 2), localAddress = _b[0], setLocalAddress = _b[1];
1788
- var _c = __read(useState(), 2), providerName = _c[0], setProviderName = _c[1];
1332
+ const global = window;
1333
+ const ethereum = global.ethereum;
1334
+ const [error, setError] = useState();
1335
+ const [localAddress, setLocalAddress] = useState();
1336
+ const [providerName, setProviderName] = useState();
1789
1337
  if (ethereum) {
1790
1338
  ethereum.autoRefreshOnNetworkChange = false;
1791
1339
  }
1792
- var connect = function () { return __awaiter(void 0, void 0, void 0, function () {
1340
+ const connect = () => __awaiter(void 0, void 0, void 0, function* () {
1793
1341
  var _a;
1794
- return __generator(this, function (_b) {
1795
- switch (_b.label) {
1796
- case 0: return [4 /*yield*/, ((_a = global.ethereum) === null || _a === void 0 ? void 0 : _a.enable())];
1797
- case 1:
1798
- _b.sent();
1799
- return [2 /*return*/, localAddress ? [localAddress.toString()] : []];
1800
- }
1801
- });
1802
- }); };
1803
- var _d = __read(useState(), 2), isConnected = _d[0], setIsConnected = _d[1];
1804
- var _e = __read(useState(), 2), walletProvider = _e[0], setWalletProvider = _e[1];
1805
- var _f = __read(useState(), 2), provider = _f[0], setProvider = _f[1];
1806
- var _g = __read(useState(), 2), signer = _g[0], setSigner = _g[1];
1807
- useEffect(function () {
1808
- var walletProvider = ethereum ? new Web3Provider(ethereum) : null;
1809
- var provider = null;
1810
- var providerName = null;
1342
+ yield ((_a = global.ethereum) === null || _a === void 0 ? void 0 : _a.enable());
1343
+ return localAddress ? [localAddress.toString()] : [];
1344
+ });
1345
+ const [isConnected, setIsConnected] = useState();
1346
+ const [walletProvider, setWalletProvider] = useState();
1347
+ const [provider, setProvider] = useState();
1348
+ const [signer, setSigner] = useState();
1349
+ useEffect(() => {
1350
+ const walletProvider = ethereum ? new Web3Provider(ethereum) : null;
1351
+ let provider = null;
1352
+ let providerName = null;
1811
1353
  if (walletProvider) {
1812
1354
  provider = walletProvider;
1813
1355
  providerName = 'MyEtherWallet';
@@ -1819,7 +1361,7 @@ var MyEtherWalletEthersLoader = function (props) {
1819
1361
  setProvider(provider);
1820
1362
  setProviderName(providerName);
1821
1363
  setWalletProvider(walletProvider);
1822
- var signer = null;
1364
+ let signer = null;
1823
1365
  try {
1824
1366
  signer = walletProvider === null || walletProvider === void 0 ? void 0 : walletProvider.getSigner();
1825
1367
  }
@@ -1828,175 +1370,131 @@ var MyEtherWalletEthersLoader = function (props) {
1828
1370
  }
1829
1371
  setSigner(signer);
1830
1372
  }, [ethereum, isConnected]);
1831
- useAsyncEffect(function (isMounted) { return __awaiter(void 0, void 0, void 0, function () {
1832
- var localAddress_1, _a, _b, ex_1;
1833
- return __generator(this, function (_c) {
1834
- switch (_c.label) {
1835
- case 0:
1836
- if (!signer) return [3 /*break*/, 4];
1837
- _c.label = 1;
1838
- case 1:
1839
- _c.trys.push([1, 3, , 4]);
1840
- _b = (_a = EthAddress).fromString;
1841
- return [4 /*yield*/, signer.getAddress()];
1842
- case 2:
1843
- localAddress_1 = _b.apply(_a, [_c.sent()]);
1844
- if (isMounted()) {
1845
- setLocalAddress(localAddress_1);
1846
- setIsConnected(true);
1847
- }
1848
- return [3 /*break*/, 4];
1849
- case 3:
1850
- ex_1 = _c.sent();
1851
- if (isMounted()) {
1852
- setError(Error("localAddress: ".concat(ex_1)));
1853
- setLocalAddress(undefined);
1854
- setIsConnected(false);
1855
- }
1856
- return [3 /*break*/, 4];
1857
- case 4: return [2 /*return*/];
1373
+ useAsyncEffect((isMounted) => __awaiter(void 0, void 0, void 0, function* () {
1374
+ if (signer) {
1375
+ try {
1376
+ const localAddress = EthAddress.fromString(yield signer.getAddress());
1377
+ if (isMounted()) {
1378
+ setLocalAddress(localAddress);
1379
+ setIsConnected(true);
1380
+ }
1858
1381
  }
1859
- });
1860
- }); }, [signer]);
1861
- var _h = __read(useState(), 2), chainId = _h[0], setChainId = _h[1];
1862
- useAsyncEffect(function (isMounted) { return __awaiter(void 0, void 0, void 0, function () {
1863
- var chainId;
1864
- var _a;
1865
- return __generator(this, function (_b) {
1866
- switch (_b.label) {
1867
- case 0: return [4 /*yield*/, (provider === null || provider === void 0 ? void 0 : provider.getNetwork())];
1868
- case 1:
1869
- chainId = (_a = (_b.sent())) === null || _a === void 0 ? void 0 : _a.chainId;
1870
- if (!isMounted())
1871
- return [2 /*return*/];
1872
- setChainId(chainId);
1873
- return [2 /*return*/];
1382
+ catch (ex) {
1383
+ if (isMounted()) {
1384
+ setError(Error(`localAddress: ${ex}`));
1385
+ setLocalAddress(undefined);
1386
+ setIsConnected(false);
1387
+ }
1874
1388
  }
1875
- });
1876
- }); }, [provider]);
1877
- return (jsx(EthersContext.Provider, __assign({ value: {
1389
+ }
1390
+ }), [signer]);
1391
+ const [chainId, setChainId] = useState();
1392
+ useAsyncEffect((isMounted) => __awaiter(void 0, void 0, void 0, function* () {
1393
+ var _b;
1394
+ const chainId = (_b = (yield (provider === null || provider === void 0 ? void 0 : provider.getNetwork()))) === null || _b === void 0 ? void 0 : _b.chainId;
1395
+ if (!isMounted())
1396
+ return;
1397
+ setChainId(chainId);
1398
+ }), [provider]);
1399
+ return (jsx(EthersContext.Provider, Object.assign({ value: {
1878
1400
  busy: false,
1879
- chainId: chainId,
1880
- connect: connect,
1881
- error: error,
1882
- isConnected: isConnected,
1883
- localAddress: localAddress,
1884
- provider: provider,
1885
- providerName: providerName,
1401
+ chainId,
1402
+ connect,
1403
+ error,
1404
+ isConnected,
1405
+ localAddress,
1406
+ provider,
1407
+ providerName,
1886
1408
  signer: isConnected ? signer : undefined,
1887
- walletProvider: walletProvider,
1409
+ walletProvider,
1888
1410
  } }, { children: children }), void 0));
1889
1411
  };
1890
1412
 
1891
- var OperaEthersLoader = function (props) {
1413
+ const OperaEthersLoader = (props) => {
1892
1414
  var _a, _b, _c, _d, _e, _f;
1893
- var children = props.children;
1415
+ const { children } = props;
1894
1416
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1895
- var global = window;
1896
- var ethereum = global.ethereum;
1897
- var _g = __read(useState(), 2), error = _g[0], setError = _g[1];
1898
- var _h = __read(useState(), 2), signer = _h[0], setSigner = _h[1];
1899
- var _j = __read(useState(), 2), provider = _j[0], setProvider = _j[1];
1900
- var _k = __read(useState(((_c = (_b = (_a = global.ethereum) === null || _a === void 0 ? void 0 : _a.addresses) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0) > 0 ? EthAddress.fromString((_e = (_d = global.ethereum) === null || _d === void 0 ? void 0 : _d.addresses) === null || _e === void 0 ? void 0 : _e[0]) : null), 2), localAddress = _k[0], setLocalAddress = _k[1];
1901
- var chainId = (ethereum === null || ethereum === void 0 ? void 0 : ethereum.chainId) ? parseInt(ethereum === null || ethereum === void 0 ? void 0 : ethereum.chainId) : 1;
1902
- var isConnected = (_f = ethereum === null || ethereum === void 0 ? void 0 : ethereum.isConnected()) !== null && _f !== void 0 ? _f : false;
1903
- useAsyncEffect(function (mounted) { return __awaiter(void 0, void 0, void 0, function () {
1904
- var operaProvider, provider_1, signer_1, localAddress_1, _a, _b, ex_1;
1905
- return __generator(this, function (_c) {
1906
- switch (_c.label) {
1907
- case 0:
1908
- if (!ethereum) return [3 /*break*/, 4];
1909
- ethereum.enable();
1910
- operaProvider = new Web3Provider(ethereum);
1911
- provider_1 = operaProvider;
1912
- signer_1 = operaProvider.getSigner();
1913
- _c.label = 1;
1914
- case 1:
1915
- _c.trys.push([1, 3, , 4]);
1916
- _b = (_a = EthAddress).fromString;
1917
- return [4 /*yield*/, signer_1.getAddress()];
1918
- case 2:
1919
- localAddress_1 = _b.apply(_a, [_c.sent()]);
1920
- ethereum.autoRefreshOnNetworkChange = false;
1921
- if (mounted()) {
1922
- setSigner(signer_1);
1923
- setProvider(provider_1);
1924
- setLocalAddress(localAddress_1);
1925
- }
1926
- return [3 /*break*/, 4];
1927
- case 3:
1928
- ex_1 = _c.sent();
1929
- if (mounted()) {
1930
- setError(Error("localAddress: ".concat(ex_1)));
1931
- }
1932
- return [3 /*break*/, 4];
1933
- case 4: return [2 /*return*/];
1417
+ const global = window;
1418
+ const ethereum = global.ethereum;
1419
+ const [error, setError] = useState();
1420
+ const [signer, setSigner] = useState();
1421
+ const [provider, setProvider] = useState();
1422
+ const [localAddress, setLocalAddress] = useState(((_c = (_b = (_a = global.ethereum) === null || _a === void 0 ? void 0 : _a.addresses) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0) > 0 ? EthAddress.fromString((_e = (_d = global.ethereum) === null || _d === void 0 ? void 0 : _d.addresses) === null || _e === void 0 ? void 0 : _e[0]) : null);
1423
+ const chainId = (ethereum === null || ethereum === void 0 ? void 0 : ethereum.chainId) ? parseInt(ethereum === null || ethereum === void 0 ? void 0 : ethereum.chainId) : 1;
1424
+ const isConnected = (_f = ethereum === null || ethereum === void 0 ? void 0 : ethereum.isConnected()) !== null && _f !== void 0 ? _f : false;
1425
+ useAsyncEffect((mounted) => __awaiter(void 0, void 0, void 0, function* () {
1426
+ if (ethereum) {
1427
+ ethereum.enable();
1428
+ const operaProvider = new Web3Provider(ethereum);
1429
+ const provider = operaProvider;
1430
+ const signer = operaProvider.getSigner();
1431
+ try {
1432
+ const localAddress = EthAddress.fromString(yield signer.getAddress());
1433
+ ethereum.autoRefreshOnNetworkChange = false;
1434
+ if (mounted()) {
1435
+ setSigner(signer);
1436
+ setProvider(provider);
1437
+ setLocalAddress(localAddress);
1438
+ }
1934
1439
  }
1935
- });
1936
- }); }, [ethereum]);
1937
- return (jsx(EthersContext.Provider, __assign({ value: {
1440
+ catch (ex) {
1441
+ if (mounted()) {
1442
+ setError(Error(`localAddress: ${ex}`));
1443
+ }
1444
+ }
1445
+ }
1446
+ }), [ethereum]);
1447
+ return (jsx(EthersContext.Provider, Object.assign({ value: {
1938
1448
  busy: false,
1939
- chainId: chainId,
1940
- error: error,
1941
- isConnected: isConnected,
1942
- localAddress: localAddress,
1943
- provider: provider,
1944
- signer: signer,
1449
+ chainId,
1450
+ error,
1451
+ isConnected,
1452
+ localAddress,
1453
+ provider,
1454
+ signer,
1945
1455
  } }, { children: children }), void 0));
1946
1456
  };
1947
1457
 
1948
- var TrustEthersLoader = function (props) {
1949
- var children = props.children;
1458
+ const TrustEthersLoader = (props) => {
1459
+ const { children } = props;
1950
1460
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1951
- var global = window;
1952
- var _a = __read(useState(), 2), error = _a[0], setError = _a[1];
1953
- var _b = __read(useState(), 2), localAddress = _b[0], setLocalAddress = _b[1];
1954
- var trustProvider = new Web3Provider(global.ethereum);
1955
- var signer = trustProvider.getSigner();
1956
- var chainId = 1;
1957
- var provider = trustProvider;
1958
- useAsyncEffect(function (mounted) { return __awaiter(void 0, void 0, void 0, function () {
1959
- var localAddress_1, _a, _b, ex_1;
1960
- return __generator(this, function (_c) {
1961
- switch (_c.label) {
1962
- case 0:
1963
- if (!signer) return [3 /*break*/, 4];
1964
- _c.label = 1;
1965
- case 1:
1966
- _c.trys.push([1, 3, , 4]);
1967
- _b = (_a = EthAddress).fromString;
1968
- return [4 /*yield*/, signer.getAddress()];
1969
- case 2:
1970
- localAddress_1 = _b.apply(_a, [_c.sent()]);
1971
- if (mounted()) {
1972
- setLocalAddress(localAddress_1);
1973
- }
1974
- return [3 /*break*/, 4];
1975
- case 3:
1976
- ex_1 = _c.sent();
1977
- if (mounted()) {
1978
- setError(Error("localAddress: ".concat(ex_1)));
1979
- }
1980
- return [3 /*break*/, 4];
1981
- case 4: return [2 /*return*/];
1461
+ const global = window;
1462
+ const [error, setError] = useState();
1463
+ const [localAddress, setLocalAddress] = useState();
1464
+ const trustProvider = new Web3Provider(global.ethereum);
1465
+ const signer = trustProvider.getSigner();
1466
+ const chainId = 1;
1467
+ const provider = trustProvider;
1468
+ useAsyncEffect((mounted) => __awaiter(void 0, void 0, void 0, function* () {
1469
+ if (signer) {
1470
+ try {
1471
+ const localAddress = EthAddress.fromString(yield signer.getAddress());
1472
+ if (mounted()) {
1473
+ setLocalAddress(localAddress);
1474
+ }
1982
1475
  }
1983
- });
1984
- }); }, [signer]);
1985
- return (jsx(EthersContext.Provider, __assign({ value: {
1476
+ catch (ex) {
1477
+ if (mounted()) {
1478
+ setError(Error(`localAddress: ${ex}`));
1479
+ }
1480
+ }
1481
+ }
1482
+ }), [signer]);
1483
+ return (jsx(EthersContext.Provider, Object.assign({ value: {
1986
1484
  busy: false,
1987
- chainId: chainId,
1988
- error: error,
1989
- localAddress: localAddress,
1990
- provider: provider,
1991
- signer: signer,
1485
+ chainId,
1486
+ error,
1487
+ localAddress,
1488
+ provider,
1489
+ signer,
1992
1490
  } }, { children: children }), void 0));
1993
1491
  };
1994
1492
 
1995
- var EthersLoader = function (props) {
1493
+ const EthersLoader = (props) => {
1996
1494
  var _a, _b, _c, _d;
1997
1495
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1998
- var global = window;
1999
- var children = props.children;
1496
+ const global = window;
1497
+ const { children } = props;
2000
1498
  if ((_a = global.ethereum) === null || _a === void 0 ? void 0 : _a.isMetaMask) {
2001
1499
  return jsx(MetaMaskEthersLoader, { children: children }, void 0);
2002
1500
  }
@@ -2015,11 +1513,11 @@ var EthersLoader = function (props) {
2015
1513
  return jsx(InfuraEthersLoader, { children: children }, void 0);
2016
1514
  };
2017
1515
 
2018
- var NetworkSettingsContext = createContext({});
1516
+ const NetworkSettingsContext = createContext({});
2019
1517
 
2020
- var NetworkSettingsLoader = function (props) {
2021
- var children = props.children;
2022
- return (jsx(NetworkSettingsContext.Provider, __assign({ value: {
1518
+ const NetworkSettingsLoader = (props) => {
1519
+ const { children } = props;
1520
+ return (jsx(NetworkSettingsContext.Provider, Object.assign({ value: {
2023
1521
  xyBondAddress: EthAddress.fromString('0x1a024A698EEBdB86ccf3fCaF2F589839bdc066AD'),
2024
1522
  xyFhrMerkleSendAddress: EthAddress.fromString('0x46FEEBDffC8076D9E5fd8a11CF1508810472A79f'),
2025
1523
  xyGovernanceAddress: EthAddress.fromString('0x01925d0fFE4a6a6162B51ba611e3D4780Fc2dF42'),
@@ -2027,16 +1525,15 @@ var NetworkSettingsLoader = function (props) {
2027
1525
  } }, { children: children }), void 0));
2028
1526
  };
2029
1527
 
2030
- var UserEventsContext = createContext({});
1528
+ const UserEventsContext = createContext({});
2031
1529
 
2032
- var UserEventsLoader = function (_a) {
2033
- var userEvents = _a.userEvents, children = _a.children;
2034
- return jsx(UserEventsContext.Provider, __assign({ value: { userEvents: userEvents } }, { children: children }), void 0);
1530
+ const UserEventsLoader = ({ userEvents, children }) => {
1531
+ return jsx(UserEventsContext.Provider, Object.assign({ value: { userEvents } }, { children: children }), void 0);
2035
1532
  };
2036
1533
 
2037
- var calcSpacing = function (theme, values) {
2038
- for (var i = 0; i < values.length; i++) {
2039
- var value = values[i];
1534
+ const calcSpacing = (theme, values) => {
1535
+ for (let i = 0; i < values.length; i++) {
1536
+ const value = values[i];
2040
1537
  if (value !== undefined) {
2041
1538
  if (typeof value === 'string') {
2042
1539
  return value;
@@ -2048,63 +1545,77 @@ var calcSpacing = function (theme, values) {
2048
1545
  }
2049
1546
  };
2050
1547
 
2051
- var mergeBoxlikeStyles = function (theme, props, defaultProps) {
2052
- var _a = __assign(__assign({}, defaultProps), props), alignContent = _a.alignContent, alignItems = _a.alignItems, alignSelf = _a.alignSelf, bgcolor = _a.bgcolor, border = _a.border, borderColor = _a.borderColor, display = _a.display, flexGrow = _a.flexGrow, flexShrink = _a.flexShrink, flexDirection = _a.flexDirection, flexWrap = _a.flexWrap, justifyContent = _a.justifyContent, justifyItems = _a.justifyItems, justifySelf = _a.justifySelf, height = _a.height, minHeight = _a.minHeight, minWidth = _a.minWidth, margin = _a.margin, marginX = _a.marginX, marginY = _a.marginY, marginTop = _a.marginTop, marginLeft = _a.marginLeft, marginRight = _a.marginRight, marginBottom = _a.marginBottom, padding = _a.padding, paddingX = _a.paddingX, paddingY = _a.paddingY, paddingTop = _a.paddingTop, paddingLeft = _a.paddingLeft, paddingRight = _a.paddingRight, paddingBottom = _a.paddingBottom, position = _a.position, style = _a.style, width = _a.width, rootProps = __rest(_a, ["alignContent", "alignItems", "alignSelf", "bgcolor", "border", "borderColor", "display", "flexGrow", "flexShrink", "flexDirection", "flexWrap", "justifyContent", "justifyItems", "justifySelf", "height", "minHeight", "minWidth", "margin", "marginX", "marginY", "marginTop", "marginLeft", "marginRight", "marginBottom", "padding", "paddingX", "paddingY", "paddingTop", "paddingLeft", "paddingRight", "paddingBottom", "position", "style", "width"]);
2053
- var mergedStyle = __assign({ alignContent: alignContent, alignItems: alignItems, alignSelf: alignSelf, backgroundColor: bgcolor, border: border, borderColor: borderColor, display: display, flexDirection: flexDirection, flexGrow: flexGrow, flexShrink: flexShrink, flexWrap: flexWrap, height: height, justifyContent: justifyContent, justifyItems: justifyItems, justifySelf: justifySelf, marginBottom: calcSpacing(theme, [marginBottom, marginY, margin]), marginLeft: calcSpacing(theme, [marginLeft, marginX, margin]), marginRight: calcSpacing(theme, [marginRight, marginX, margin]), marginTop: calcSpacing(theme, [marginTop, marginY, margin]), minHeight: minHeight, minWidth: minWidth, paddingBottom: calcSpacing(theme, [paddingBottom, paddingY, padding]), paddingLeft: calcSpacing(theme, [paddingLeft, paddingX, padding]), paddingRight: calcSpacing(theme, [paddingRight, paddingX, padding]), paddingTop: calcSpacing(theme, [paddingTop, paddingY, padding]), position: position, width: width }, style);
2054
- return __assign(__assign({}, rootProps), { style: mergedStyle });
2055
- };
2056
-
2057
- var ButtonExBase = function (props) {
2058
- var theme = useTheme();
2059
- var _a = mergeBoxlikeStyles(theme, props), busy = _a.busy, _b = _a.busyVariant, busyVariant = _b === void 0 ? 'linear' : _b, busyOpacity = _a.busyOpacity, onClick = _a.onClick, children = _a.children, rootProps = __rest(_a, ["busy", "busyVariant", "busyOpacity", "onClick", "children"]);
2060
- var localOnClick = function (event) {
1548
+ const mergeBoxlikeStyles = (theme, props, defaultProps) => {
1549
+ const _a = Object.assign(Object.assign({}, defaultProps), props), { alignContent, alignItems, alignSelf, bgcolor, border, borderColor, display, flexGrow, flexShrink, flexDirection, flexWrap, justifyContent, justifyItems, justifySelf, height, minHeight, minWidth, margin, marginX, marginY, marginTop, marginLeft, marginRight, marginBottom, padding, paddingX, paddingY, paddingTop, paddingLeft, paddingRight, paddingBottom, position, style, width } = _a, rootProps = __rest(_a, ["alignContent", "alignItems", "alignSelf", "bgcolor", "border", "borderColor", "display", "flexGrow", "flexShrink", "flexDirection", "flexWrap", "justifyContent", "justifyItems", "justifySelf", "height", "minHeight", "minWidth", "margin", "marginX", "marginY", "marginTop", "marginLeft", "marginRight", "marginBottom", "padding", "paddingX", "paddingY", "paddingTop", "paddingLeft", "paddingRight", "paddingBottom", "position", "style", "width"]);
1550
+ const mergedStyle = Object.assign({ alignContent,
1551
+ alignItems,
1552
+ alignSelf, backgroundColor: bgcolor, border,
1553
+ borderColor,
1554
+ display,
1555
+ flexDirection,
1556
+ flexGrow,
1557
+ flexShrink,
1558
+ flexWrap,
1559
+ height,
1560
+ justifyContent,
1561
+ justifyItems,
1562
+ justifySelf, marginBottom: calcSpacing(theme, [marginBottom, marginY, margin]), marginLeft: calcSpacing(theme, [marginLeft, marginX, margin]), marginRight: calcSpacing(theme, [marginRight, marginX, margin]), marginTop: calcSpacing(theme, [marginTop, marginY, margin]), minHeight,
1563
+ minWidth, paddingBottom: calcSpacing(theme, [paddingBottom, paddingY, padding]), paddingLeft: calcSpacing(theme, [paddingLeft, paddingX, padding]), paddingRight: calcSpacing(theme, [paddingRight, paddingX, padding]), paddingTop: calcSpacing(theme, [paddingTop, paddingY, padding]), position,
1564
+ width }, style);
1565
+ return Object.assign(Object.assign({}, rootProps), { style: mergedStyle });
1566
+ };
1567
+
1568
+ const ButtonExBase = (props) => {
1569
+ const theme = useTheme();
1570
+ const _a = mergeBoxlikeStyles(theme, props), { busy, busyVariant = 'linear', busyOpacity, onClick, children } = _a, rootProps = __rest(_a, ["busy", "busyVariant", "busyOpacity", "onClick", "children"]);
1571
+ const localOnClick = (event) => {
2061
1572
  if (!busy) {
2062
1573
  onClick === null || onClick === void 0 ? void 0 : onClick(event);
2063
1574
  }
2064
1575
  };
2065
- return (jsxs(Button, __assign({ onClick: localOnClick }, rootProps, { children: [busy && busyVariant === 'linear' ? jsx(BusyLinearProgress, { rounded: true, opacity: busyOpacity !== null && busyOpacity !== void 0 ? busyOpacity : 0 }, void 0) : null, busy && busyVariant === 'circular' ? (jsx(BusyCircularProgress, { rounded: true, size: 24, opacity: busyOpacity !== null && busyOpacity !== void 0 ? busyOpacity : 0.5 }, void 0)) : null, children] }), void 0));
1576
+ return (jsxs(Button, Object.assign({ onClick: localOnClick }, rootProps, { children: [busy && busyVariant === 'linear' ? jsx(BusyLinearProgress, { rounded: true, opacity: busyOpacity !== null && busyOpacity !== void 0 ? busyOpacity : 0 }, void 0) : null, busy && busyVariant === 'circular' ? (jsx(BusyCircularProgress, { rounded: true, size: 24, opacity: busyOpacity !== null && busyOpacity !== void 0 ? busyOpacity : 0.5 }, void 0)) : null, children] }), void 0));
2066
1577
  };
2067
1578
 
2068
- var ButtonExTo = function (_a) {
2069
- var to = _a.to, toOptions = _a.toOptions, onClick = _a.onClick, props = __rest(_a, ["to", "toOptions", "onClick"]);
2070
- var navigate = useNavigate();
2071
- var localOnClick = function (event) {
1579
+ const ButtonExTo = (_a) => {
1580
+ var { to, toOptions, onClick } = _a, props = __rest(_a, ["to", "toOptions", "onClick"]);
1581
+ const navigate = useNavigate();
1582
+ const localOnClick = (event) => {
2072
1583
  onClick === null || onClick === void 0 ? void 0 : onClick(event);
2073
1584
  if (to) {
2074
1585
  navigate(to, toOptions);
2075
1586
  }
2076
1587
  };
2077
- return jsx(ButtonExBase, __assign({ onClick: localOnClick }, props), void 0);
1588
+ return jsx(ButtonExBase, Object.assign({ onClick: localOnClick }, props), void 0);
2078
1589
  };
2079
1590
 
2080
- var ButtonEx = function (_a) {
2081
- var to = _a.to, props = __rest(_a, ["to"]);
1591
+ const ButtonEx = (_a) => {
1592
+ var { to } = _a, props = __rest(_a, ["to"]);
2082
1593
  if (to) {
2083
- return jsx(ButtonExTo, __assign({ to: to }, props), void 0);
1594
+ return jsx(ButtonExTo, Object.assign({ to: to }, props), void 0);
2084
1595
  }
2085
1596
  else {
2086
- return jsx(ButtonExBase, __assign({}, props), void 0);
1597
+ return jsx(ButtonExBase, Object.assign({}, props), void 0);
2087
1598
  }
2088
1599
  };
2089
1600
 
2090
- var CookieConsentBody = function (_a) {
2091
- var acceptOnScroll = _a.acceptOnScroll, _b = _a.acceptOnTimer, acceptOnTimer = _b === void 0 ? 0 : _b, onAccept = _a.onAccept, props = __rest(_a, ["acceptOnScroll", "acceptOnTimer", "onAccept"]);
2092
- var _c = useCookieConsent(), accepted = _c.accepted, setAccepted = _c.setAccepted, storageName = _c.storageName;
2093
- var onScroll = function () {
1601
+ const CookieConsentBody = (_a) => {
1602
+ var { acceptOnScroll, acceptOnTimer = 0, onAccept } = _a, props = __rest(_a, ["acceptOnScroll", "acceptOnTimer", "onAccept"]);
1603
+ const { accepted, setAccepted, storageName } = useCookieConsent();
1604
+ const onScroll = () => {
2094
1605
  //hide it one the user has scrolled at least one page
2095
1606
  if (window.scrollY > window.innerHeight && !accepted) {
2096
1607
  onAcceptClick();
2097
1608
  }
2098
1609
  };
2099
- useEffect(function () {
1610
+ useEffect(() => {
2100
1611
  if (acceptOnScroll) {
2101
1612
  window.addEventListener('scroll', onScroll);
2102
- return function () {
1613
+ return () => {
2103
1614
  window.removeEventListener('scroll', onScroll);
2104
1615
  };
2105
1616
  }
2106
1617
  });
2107
- var onAcceptClick = function () {
1618
+ const onAcceptClick = () => {
2108
1619
  if (setAccepted) {
2109
1620
  setAccepted === null || setAccepted === void 0 ? void 0 : setAccepted(true);
2110
1621
  }
@@ -2114,21 +1625,21 @@ var CookieConsentBody = function (_a) {
2114
1625
  onAccept === null || onAccept === void 0 ? void 0 : onAccept(true);
2115
1626
  };
2116
1627
  if (acceptOnTimer > 0 && !accepted) {
2117
- setTimeout(function () {
1628
+ setTimeout(() => {
2118
1629
  onAcceptClick();
2119
1630
  }, acceptOnTimer);
2120
1631
  }
2121
1632
  if (!storageName) {
2122
- return (jsx(FlexRow, __assign({ justifyContent: "center", paddingY: 2 }, props, { children: jsx(Typography, __assign({ color: "error", variant: "body1" }, { children: "Missing CookieConsentContext" }), void 0) }), void 0));
1633
+ return (jsx(FlexRow, Object.assign({ justifyContent: "center", paddingY: 2 }, props, { children: jsx(Typography, Object.assign({ color: "error", variant: "body1" }, { children: "Missing CookieConsentContext" }), void 0) }), void 0));
2123
1634
  }
2124
- return accepted ? null : (jsxs(FlexRow, __assign({ justifyContent: "space-between" }, props, { children: [jsxs(Typography, __assign({ variant: "body2", margin: 2 }, { children: ['This site uses ', jsx(Link, __assign({ href: "https://cookiesandyou.com/", rel: "noopener noreferrer", target: "_blank" }, { children: "cookies" }), void 0), ' and ', jsx(Link, __assign({ href: "https://policies.google.com/technologies/partner-sites", rel: "noopener noreferrer", target: "_blank" }, { children: "Google\u00A0tools" }), void 0), ' to analyze traffic and for ads measurement purposes.'] }), void 0), jsx(ButtonEx, __assign({ variant: "contained", color: "secondary", onClick: onAcceptClick, margin: 2 }, { children: "Accept" }), void 0)] }), void 0));
1635
+ return accepted ? null : (jsxs(FlexRow, Object.assign({ justifyContent: "space-between" }, props, { children: [jsxs(Typography, Object.assign({ variant: "body2", margin: 2 }, { children: ['This site uses ', jsx(Link, Object.assign({ href: "https://cookiesandyou.com/", rel: "noopener noreferrer", target: "_blank" }, { children: "cookies" }), void 0), ' and ', jsx(Link, Object.assign({ href: "https://policies.google.com/technologies/partner-sites", rel: "noopener noreferrer", target: "_blank" }, { children: "Google\u00A0tools" }), void 0), ' to analyze traffic and for ads measurement purposes.'] }), void 0), jsx(ButtonEx, Object.assign({ variant: "contained", color: "secondary", onClick: onAcceptClick, margin: 2 }, { children: "Accept" }), void 0)] }), void 0));
2125
1636
  };
2126
1637
 
2127
- var CookieConsent = function (props) {
2128
- var storageName = useCookieConsent().storageName;
2129
- var Inner = function () {
2130
- var accepted = useCookieConsent().accepted;
2131
- return accepted ? null : (jsx(CookieConsentBody, __assign({ background: true, paper: true, position: "fixed", bottom: 0, maxWidth: "100vw", width: "100%", zIndex: 1000 }, props), void 0));
1638
+ const CookieConsent = (props) => {
1639
+ const { storageName } = useCookieConsent();
1640
+ const Inner = () => {
1641
+ const { accepted } = useCookieConsent();
1642
+ return accepted ? null : (jsx(CookieConsentBody, Object.assign({ background: true, paper: true, position: "fixed", bottom: 0, maxWidth: "100vw", width: "100%", zIndex: 1000 }, props), void 0));
2132
1643
  };
2133
1644
  //if not inside a context, make a context
2134
1645
  if (!storageName) {
@@ -2137,96 +1648,104 @@ var CookieConsent = function (props) {
2137
1648
  return jsx(Inner, {}, void 0);
2138
1649
  };
2139
1650
 
2140
- var InvertableThemeContext = createContext({
1651
+ const InvertableThemeContext = createContext({
2141
1652
  options: {},
2142
1653
  });
2143
1654
 
2144
- var InvertableThemeProvider = function (_a) {
2145
- var _b, _c;
2146
- var options = _a.options, children = _a.children, dark = _a.dark, _d = _a.scoped, scoped = _d === void 0 ? false : _d, _e = _a.invert, invert = _e === void 0 ? false : _e, noResponsiveFonts = _a.noResponsiveFonts;
2147
- var contextInvertableTheme = useContext(InvertableThemeContext);
2148
- var clonedOptions = clone((_b = options !== null && options !== void 0 ? options : contextInvertableTheme.options) !== null && _b !== void 0 ? _b : {});
2149
- clonedOptions.palette = (_c = clonedOptions.palette) !== null && _c !== void 0 ? _c : {};
1655
+ const InvertableThemeProvider = ({ options, children, dark, scoped = false, invert = false, noResponsiveFonts, }) => {
1656
+ var _a, _b;
1657
+ const contextInvertableTheme = useContext(InvertableThemeContext);
1658
+ const clonedOptions = clone((_a = options !== null && options !== void 0 ? options : contextInvertableTheme.options) !== null && _a !== void 0 ? _a : {});
1659
+ clonedOptions.palette = (_b = clonedOptions.palette) !== null && _b !== void 0 ? _b : {};
2150
1660
  if (invert) {
2151
1661
  clonedOptions.palette.mode = clonedOptions.palette.mode === 'dark' ? 'light' : 'dark';
2152
1662
  }
2153
1663
  if (dark !== undefined) {
2154
1664
  clonedOptions.palette.mode = dark ? 'dark' : 'light';
2155
1665
  }
2156
- var theme = createTheme(clonedOptions);
1666
+ let theme = createTheme(clonedOptions);
2157
1667
  if (!noResponsiveFonts) {
2158
1668
  theme = responsiveFontSizes(theme);
2159
1669
  }
2160
- return scoped ? (jsx(ScopedCssBaseline, { children: jsx(InvertableThemeContext.Provider, __assign({ value: { options: clonedOptions } }, { children: jsx(ThemeProvider, __assign({ theme: theme }, { children: children }), void 0) }), void 0) }, void 0)) : (jsx(InvertableThemeContext.Provider, __assign({ value: { options: clonedOptions } }, { children: jsx(ThemeProvider, __assign({ theme: theme }, { children: children }), void 0) }), void 0));
1670
+ return scoped ? (jsx(ScopedCssBaseline, { children: jsx(InvertableThemeContext.Provider, Object.assign({ value: { options: clonedOptions } }, { children: jsx(ThemeProvider, Object.assign({ theme: theme }, { children: children }), void 0) }), void 0) }, void 0)) : (jsx(InvertableThemeContext.Provider, Object.assign({ value: { options: clonedOptions } }, { children: jsx(ThemeProvider, Object.assign({ theme: theme }, { children: children }), void 0) }), void 0));
1671
+ };
1672
+
1673
+ // The point of this component it to return to the top of the page on any router navigate
1674
+ const ScrollToTop = () => {
1675
+ const { pathname } = useLocation();
1676
+ useEffect(() => {
1677
+ window.scrollTo(0, 0);
1678
+ }, [pathname]);
1679
+ return null;
2161
1680
  };
2162
1681
 
2163
- var BasePage = function (_a) {
2164
- var disableGutters = _a.disableGutters, children = _a.children, beta = _a.beta, container = _a.container, hideFooter = _a.hideFooter, appFooter = _a.appFooter, appBar = _a.appBar, cookieConsent = _a.cookieConsent, filterBar = _a.filterBar, hideAppBar = _a.hideAppBar, hideFilterBar = _a.hideFilterBar, _b = _a.noindex, noindex = _b === void 0 ? false : _b, _c = _a.scrollToTopButton, scrollToTopButton = _c === void 0 ? false : _c, title = _a.title, props = __rest(_a, ["disableGutters", "children", "beta", "container", "hideFooter", "appFooter", "appBar", "cookieConsent", "filterBar", "hideAppBar", "hideFilterBar", "noindex", "scrollToTopButton", "title"]);
2165
- var theme = useTheme();
2166
- var scrollToTopAnchorId = 'scroll-to-top-anchor';
2167
- return (jsxs(FlexCol, __assign({ justifyContent: "flex-start", color: theme.palette.text.primary, alignItems: "stretch", width: "100%", maxWidth: "100vw", minHeight: "100vh" }, props, { children: [jsx(Helmet, __assign({ title: title }, { children: noindex ? jsx("meta", { content: "noindex", name: "robots" }, void 0) : null }), void 0), scrollToTopButton ? jsx("div", { id: scrollToTopAnchorId }, void 0) : null, hideAppBar ? null : appBar, hideFilterBar ? null : filterBar, beta ? (jsx(FlexRow, __assign({ margin: 1, position: "absolute", top: 0, left: 0, bgcolor: "#cccccc88", paddingX: 1, style: { opacity: 0.5 } }, { children: jsx(Typography, __assign({ variant: "body2" }, { children: "Important: This page is a Beta page. It is possible that some information may not be correct." }), void 0) }), void 0)) : null, container ? (jsx(Container, __assign({ style: { alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1 }, maxWidth: container, disableGutters: disableGutters }, { children: children }), void 0)) : (children), hideFooter ? null : jsx("footer", { children: appFooter }, void 0), cookieConsent !== null && cookieConsent !== void 0 ? cookieConsent : (jsx(ScopedCssBaseline, { children: jsx(InvertableThemeProvider, __assign({ invert: true }, { children: jsx(CookieConsent, { borderRadius: 0 }, void 0) }), void 0) }, void 0)), scrollToTopButton ? (jsx(ScrollToTopButton, __assign({ anchorId: scrollToTopAnchorId }, { children: jsx(Fab, __assign({ "aria-label": "scroll to top", color: "secondary", size: "small" }, { children: jsx(KeyboardArrowUp, {}, void 0) }), void 0) }), void 0)) : null] }), void 0));
1682
+ const BasePage = (_a) => {
1683
+ var { disableGutters, children, beta, container, hideFooter, appFooter, appBar, cookieConsent, filterBar, hideAppBar, hideFilterBar, noindex = false, scrollToTopButton = false, title } = _a, props = __rest(_a, ["disableGutters", "children", "beta", "container", "hideFooter", "appFooter", "appBar", "cookieConsent", "filterBar", "hideAppBar", "hideFilterBar", "noindex", "scrollToTopButton", "title"]);
1684
+ const theme = useTheme();
1685
+ const scrollToTopAnchorId = 'scroll-to-top-anchor';
1686
+ return (jsxs(FlexCol, Object.assign({ justifyContent: "flex-start", color: theme.palette.text.primary, alignItems: "stretch", width: "100%", maxWidth: "100vw", minHeight: "100vh" }, props, { children: [jsx(ScrollToTop, {}, void 0), jsx(Helmet, Object.assign({ title: title }, { children: noindex ? jsx("meta", { content: "noindex", name: "robots" }, void 0) : null }), void 0), scrollToTopButton ? jsx("div", { id: scrollToTopAnchorId }, void 0) : null, hideAppBar ? null : appBar, hideFilterBar ? null : filterBar, beta ? (jsx(FlexRow, Object.assign({ margin: 1, position: "absolute", top: 0, left: 0, bgcolor: "#cccccc88", paddingX: 1, style: { opacity: 0.5 } }, { children: jsx(Typography, Object.assign({ variant: "body2" }, { children: "Important: This page is a Beta page. It is possible that some information may not be correct." }), void 0) }), void 0)) : null, container ? (jsx(Container, Object.assign({ style: { alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1 }, maxWidth: container, disableGutters: disableGutters }, { children: children }), void 0)) : (children), hideFooter ? null : jsx("footer", { children: appFooter }, void 0), cookieConsent !== null && cookieConsent !== void 0 ? cookieConsent : (jsx(ScopedCssBaseline, { children: jsx(InvertableThemeProvider, Object.assign({ invert: true }, { children: jsx(CookieConsent, { borderRadius: 0 }, void 0) }), void 0) }, void 0)), scrollToTopButton ? (jsx(ScrollToTopButton, Object.assign({ anchorId: scrollToTopAnchorId }, { children: jsx(Fab, Object.assign({ "aria-label": "scroll to top", color: "secondary", size: "small" }, { children: jsx(KeyboardArrowUp, {}, void 0) }), void 0) }), void 0)) : null] }), void 0));
2168
1687
  };
2169
1688
 
2170
- var getPartialPath = function (pathParts, index) {
2171
- var result = [];
2172
- for (var i = 0; i <= index; i++) {
2173
- result.push("".concat(pathParts[i], "/"));
1689
+ const getPartialPath = (pathParts, index) => {
1690
+ const result = [];
1691
+ for (let i = 0; i <= index; i++) {
1692
+ result.push(`${pathParts[i]}/`);
2174
1693
  }
2175
1694
  return result.join('');
2176
1695
  };
2177
- var BreadcrumbsEx = function (_a) {
1696
+ const BreadcrumbsEx = (_a) => {
2178
1697
  var _b;
2179
- var titles = _a.titles, _c = _a.path, path = _c === void 0 ? document.location.pathname : _c, _d = _a.separator, separator = _d === void 0 ? '|' : _d, logo = _a.logo, children = _a.children, props = __rest(_a, ["titles", "path", "separator", "logo", "children"]);
2180
- var pathParts = path.split('/');
1698
+ var { titles, path = document.location.pathname, separator = '|', logo, children } = _a, props = __rest(_a, ["titles", "path", "separator", "logo", "children"]);
1699
+ const pathParts = path.split('/');
2181
1700
  //if the url has a trailing '/', remove the last part
2182
1701
  if (((_b = pathParts[pathParts.length - 1]) === null || _b === void 0 ? void 0 : _b.length) === 0) {
2183
1702
  pathParts.pop();
2184
1703
  }
2185
- assertEx(pathParts.length - 1 === (titles === null || titles === void 0 ? void 0 : titles.length), "Path/Title length mismatch: ".concat(JSON.stringify(titles), " with ").concat(JSON.stringify(pathParts)));
2186
- return (jsxs(Breadcrumbs, __assign({ separator: separator }, props, { children: [pathParts.map(function (_pathPart, index) {
2187
- var path = getPartialPath(pathParts, index);
2188
- return (jsx(Link, __assign({ title: index > 0 ? titles === null || titles === void 0 ? void 0 : titles[index - 1] : 'COIN', color: index === pathParts.length - 1 ? 'textPrimary' : 'inherit', component: Link$1, to: path }, { children: index > 0 ? (titles === null || titles === void 0 ? void 0 : titles[index - 1]) : (jsx(FlexRow, { children: typeof logo === 'string' ? jsx("img", { src: logo }, void 0) : logo }, void 0)) }), path));
1704
+ assertEx(pathParts.length - 1 === (titles === null || titles === void 0 ? void 0 : titles.length), `Path/Title length mismatch: ${JSON.stringify(titles)} with ${JSON.stringify(pathParts)}`);
1705
+ return (jsxs(Breadcrumbs, Object.assign({ separator: separator }, props, { children: [pathParts.map((_pathPart, index) => {
1706
+ const path = getPartialPath(pathParts, index);
1707
+ return (jsx(Link, Object.assign({ title: index > 0 ? titles === null || titles === void 0 ? void 0 : titles[index - 1] : 'COIN', color: index === pathParts.length - 1 ? 'textPrimary' : 'inherit', component: Link$1, to: path }, { children: index > 0 ? (titles === null || titles === void 0 ? void 0 : titles[index - 1]) : (jsx(FlexRow, { children: typeof logo === 'string' ? jsx("img", { src: logo }, void 0) : logo }, void 0)) }), path));
2189
1708
  }), children] }), void 0));
2190
1709
  };
2191
1710
 
2192
- var toAxiosError = function (error) {
1711
+ const toAxiosError = (error) => {
2193
1712
  return error.isAxiosError ? error : undefined;
2194
1713
  };
2195
- var ErrorDialogOpen = function (_a) {
1714
+ const ErrorDialogOpen = (_a) => {
2196
1715
  var _b, _c;
2197
- var onAction = _a.onAction, _d = _a.title, title = _d === void 0 ? 'Oops. Something went wrong.' : _d, _e = _a.error, error = _e === void 0 ? Error('Unknown Error') : _e, props = __rest(_a, ["onAction", "title", "error"]);
2198
- var onCloseClicked = function () {
1716
+ var { onAction, title = 'Oops. Something went wrong.', error = Error('Unknown Error') } = _a, props = __rest(_a, ["onAction", "title", "error"]);
1717
+ const onCloseClicked = () => {
2199
1718
  onAction === null || onAction === void 0 ? void 0 : onAction(false);
2200
1719
  };
2201
- var onRetryClicked = function () {
1720
+ const onRetryClicked = () => {
2202
1721
  onAction === null || onAction === void 0 ? void 0 : onAction(true);
2203
1722
  };
2204
- var axiosError = toAxiosError(error);
2205
- var message = (_b = error.message) !== null && _b !== void 0 ? _b : error.toString();
2206
- return (jsxs(Dialog, __assign({}, props, { children: [jsx(DialogTitle, { children: title }, void 0), jsx(DialogContent, { children: jsx(FlexRow, { children: jsx(Typography, __assign({ color: "error" }, { children: axiosError ? "".concat(message, " [").concat((_c = axiosError === null || axiosError === void 0 ? void 0 : axiosError.code) !== null && _c !== void 0 ? _c : 'Connection Failure', "]") : "".concat(message) }), void 0) }, void 0) }, void 0), jsx(DialogActions, { children: jsxs(FlexRow, __assign({ justifyContent: "space-between", width: "100%", minWidth: "300px" }, { children: [jsx(ButtonEx, __assign({ onClick: onCloseClicked, variant: "text" }, { children: "Close" }), void 0), jsx(ButtonEx, __assign({ onClick: onRetryClicked, variant: "text" }, { children: "Retry" }), void 0)] }), void 0) }, void 0)] }), void 0));
1723
+ const axiosError = toAxiosError(error);
1724
+ const message = (_b = error.message) !== null && _b !== void 0 ? _b : error.toString();
1725
+ return (jsxs(Dialog, Object.assign({}, props, { children: [jsx(DialogTitle, { children: title }, void 0), jsx(DialogContent, { children: jsx(FlexRow, { children: jsx(Typography, Object.assign({ color: "error" }, { children: axiosError ? `${message} [${(_c = axiosError === null || axiosError === void 0 ? void 0 : axiosError.code) !== null && _c !== void 0 ? _c : 'Connection Failure'}]` : `${message}` }), void 0) }, void 0) }, void 0), jsx(DialogActions, { children: jsxs(FlexRow, Object.assign({ justifyContent: "space-between", width: "100%", minWidth: "300px" }, { children: [jsx(ButtonEx, Object.assign({ onClick: onCloseClicked, variant: "text" }, { children: "Close" }), void 0), jsx(ButtonEx, Object.assign({ onClick: onRetryClicked, variant: "text" }, { children: "Retry" }), void 0)] }), void 0) }, void 0)] }), void 0));
2207
1726
  };
2208
- var ErrorDialog = function (_a) {
2209
- var open = _a.open, error = _a.error, props = __rest(_a, ["open", "error"]);
1727
+ const ErrorDialog = (_a) => {
1728
+ var { open, error } = _a, props = __rest(_a, ["open", "error"]);
2210
1729
  if (error) {
2211
- return jsx(ErrorDialogOpen, __assign({ open: !!error || open, error: error }, props), void 0);
1730
+ return jsx(ErrorDialogOpen, Object.assign({ open: !!error || open, error: error }, props), void 0);
2212
1731
  }
2213
1732
  else {
2214
1733
  return null;
2215
1734
  }
2216
1735
  };
2217
1736
 
2218
- var MessageDialog = function (_a) {
2219
- var onOk = _a.onOk, onCancel = _a.onCancel, children = _a.children, title = _a.title, props = __rest(_a, ["onOk", "onCancel", "children", "title"]);
2220
- return (jsxs(Dialog, __assign({}, props, { children: [jsx(DialogTitle, { children: title }, void 0), jsx(DialogContent, { children: jsx(FlexCol, __assign({ alignItems: "stretch" }, { children: children }), void 0) }, void 0), jsx(DialogActions, { children: jsxs(FlexRow, __assign({ justifyContent: "space-between", width: "100%" }, { children: [jsx(Button, __assign({ onClick: onCancel, variant: "text" }, { children: "Cancel" }), void 0), jsx(Button, __assign({ onClick: onOk, variant: "text" }, { children: "Ok" }), void 0)] }), void 0) }, void 0)] }), void 0));
1737
+ const MessageDialog = (_a) => {
1738
+ var { onOk, onCancel, children, title } = _a, props = __rest(_a, ["onOk", "onCancel", "children", "title"]);
1739
+ return (jsxs(Dialog, Object.assign({}, props, { children: [jsx(DialogTitle, { children: title }, void 0), jsx(DialogContent, { children: jsx(FlexCol, Object.assign({ alignItems: "stretch" }, { children: children }), void 0) }, void 0), jsx(DialogActions, { children: jsxs(FlexRow, Object.assign({ justifyContent: "space-between", width: "100%" }, { children: [jsx(Button, Object.assign({ onClick: onCancel, variant: "text" }, { children: "Cancel" }), void 0), jsx(Button, Object.assign({ onClick: onOk, variant: "text" }, { children: "Ok" }), void 0)] }), void 0) }, void 0)] }), void 0));
2221
1740
  };
2222
1741
 
2223
- var useBreakpoint = function () {
2224
- var theme = useTheme();
2225
- var xs = useMediaQuery(theme.breakpoints.only('xs'));
2226
- var sm = useMediaQuery(theme.breakpoints.only('sm'));
2227
- var md = useMediaQuery(theme.breakpoints.only('md'));
2228
- var lg = useMediaQuery(theme.breakpoints.only('lg'));
2229
- var xl = useMediaQuery(theme.breakpoints.only('xl'));
1742
+ const useBreakpoint = () => {
1743
+ const theme = useTheme();
1744
+ const xs = useMediaQuery(theme.breakpoints.only('xs'));
1745
+ const sm = useMediaQuery(theme.breakpoints.only('sm'));
1746
+ const md = useMediaQuery(theme.breakpoints.only('md'));
1747
+ const lg = useMediaQuery(theme.breakpoints.only('lg'));
1748
+ const xl = useMediaQuery(theme.breakpoints.only('xl'));
2230
1749
  if (xs) {
2231
1750
  return 'xs';
2232
1751
  }
@@ -2244,18 +1763,18 @@ var useBreakpoint = function () {
2244
1763
  }
2245
1764
  };
2246
1765
 
2247
- var useLocalStorage = function (key, defaultValue) {
2248
- var _a = __read(useState(function () {
1766
+ const useLocalStorage = (key, defaultValue) => {
1767
+ const [storedValue, setStoredValue] = useState(() => {
2249
1768
  try {
2250
- var item = getLocalStorageObject(key);
1769
+ const item = getLocalStorageObject(key);
2251
1770
  return item || defaultValue;
2252
1771
  }
2253
1772
  catch (ex) {
2254
1773
  //Error is already logged
2255
1774
  return defaultValue;
2256
1775
  }
2257
- }), 2), storedValue = _a[0], setStoredValue = _a[1];
2258
- var setValue = function (value) {
1776
+ });
1777
+ const setValue = (value) => {
2259
1778
  console.log('setValue', value);
2260
1779
  setStoredValue(value);
2261
1780
  setLocalStorageObject(key, value);
@@ -2264,30 +1783,30 @@ var useLocalStorage = function (key, defaultValue) {
2264
1783
  return [storedValue, setValue];
2265
1784
  };
2266
1785
 
2267
- var useMounted = function () {
2268
- var _a = __read(useState(true), 2), mounted = _a[0], setMounted = _a[1];
2269
- useEffect(function () {
1786
+ const useMounted = () => {
1787
+ const [mounted, setMounted] = useState(true);
1788
+ useEffect(() => {
2270
1789
  setMounted(true);
2271
- return function () {
1790
+ return () => {
2272
1791
  // eslint-disable-next-line react-hooks/exhaustive-deps
2273
1792
  setMounted(false);
2274
1793
  };
2275
1794
  }, []);
2276
- return function () {
1795
+ return () => {
2277
1796
  return mounted;
2278
1797
  };
2279
1798
  };
2280
1799
 
2281
- var useNavigateToEthAddress = function () {
2282
- var navigate = useNavigate();
2283
- var navigateToEthAddress = function (address, event, page, to, toOptions, toEtherScan) {
1800
+ const useNavigateToEthAddress = () => {
1801
+ const navigate = useNavigate();
1802
+ const navigateToEthAddress = (address, event, page, to, toOptions, toEtherScan) => {
2284
1803
  var _a;
2285
- var openInEtherScan = toEtherScan || (!to && !page);
1804
+ const openInEtherScan = toEtherScan || (!to && !page);
2286
1805
  if (openInEtherScan) {
2287
- window.open("https://etherscan.io/address/".concat(address.toString()), '_blank');
1806
+ window.open(`https://etherscan.io/address/${address.toString()}`, '_blank');
2288
1807
  }
2289
1808
  else {
2290
- var path = (_a = to === null || to === void 0 ? void 0 : to.toString()) !== null && _a !== void 0 ? _a : "/".concat(page, "/").concat(address.toString());
1809
+ const path = (_a = to === null || to === void 0 ? void 0 : to.toString()) !== null && _a !== void 0 ? _a : `/${page}/${address.toString()}`;
2291
1810
  if (event.metaKey || toEtherScan) {
2292
1811
  window.open(path, '_blank');
2293
1812
  }
@@ -2296,60 +1815,50 @@ var useNavigateToEthAddress = function () {
2296
1815
  }
2297
1816
  }
2298
1817
  };
2299
- return { navigateToEthAddress: navigateToEthAddress };
1818
+ return { navigateToEthAddress };
2300
1819
  };
2301
1820
 
2302
- var useSpacing = function (value) {
2303
- var theme = useTheme();
1821
+ const useSpacing = (value) => {
1822
+ const theme = useTheme();
2304
1823
  return theme.spacing(typeof value === 'string' ? parseInt(value) : value);
2305
1824
  };
2306
1825
 
2307
- var useUserEvents = function () {
2308
- var userEvents = useContext(UserEventsContext).userEvents;
1826
+ const useUserEvents = () => {
1827
+ const { userEvents } = useContext(UserEventsContext);
1828
+ if (!userEvents) {
1829
+ console.error('useUserEvents must be called inside a UserEventsContext');
1830
+ }
2309
1831
  return userEvents;
2310
1832
  };
2311
1833
 
2312
- var supportsWebP = undefined;
2313
- var useWebP = function (webp, alt) {
2314
- var _a = __read(useState(supportsWebP === true ? webp : supportsWebP === false ? alt : undefined), 2), img = _a[0], setImg = _a[1];
2315
- useAsyncEffect(function (mounted) { return __awaiter(void 0, void 0, void 0, function () {
2316
- return __generator(this, function (_a) {
2317
- switch (_a.label) {
2318
- case 0:
2319
- if (!(supportsWebP === undefined)) return [3 /*break*/, 2];
2320
- return [4 /*yield*/, getSupportsWebP()];
2321
- case 1:
2322
- supportsWebP = _a.sent();
2323
- if (mounted()) {
2324
- setImg(supportsWebP ? webp : alt);
2325
- }
2326
- _a.label = 2;
2327
- case 2: return [2 /*return*/];
1834
+ let supportsWebP = undefined;
1835
+ const useWebP = (webp, alt) => {
1836
+ const [img, setImg] = useState(supportsWebP === true ? webp : supportsWebP === false ? alt : undefined);
1837
+ useAsyncEffect((mounted) => __awaiter(void 0, void 0, void 0, function* () {
1838
+ if (supportsWebP === undefined) {
1839
+ supportsWebP = yield getSupportsWebP();
1840
+ if (mounted()) {
1841
+ setImg(supportsWebP ? webp : alt);
2328
1842
  }
2329
- });
2330
- }); }, [supportsWebP]);
1843
+ }
1844
+ }), [supportsWebP]);
2331
1845
  return img;
2332
1846
  };
2333
- var getSupportsWebP = function () { return __awaiter(void 0, void 0, void 0, function () {
2334
- return __generator(this, function (_a) {
2335
- switch (_a.label) {
2336
- case 0: return [4 /*yield*/, new Promise(function (resolve) {
2337
- var image = new Image();
2338
- image.onerror = function () { return resolve(false); };
2339
- image.onload = function () { return resolve(image.width === 1); };
2340
- image.src = 'data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA=';
2341
- }).catch(function () { return false; })];
2342
- case 1: return [2 /*return*/, _a.sent()];
2343
- }
2344
- });
2345
- }); };
1847
+ const getSupportsWebP = () => __awaiter(void 0, void 0, void 0, function* () {
1848
+ return yield new Promise((resolve) => {
1849
+ const image = new Image();
1850
+ image.onerror = () => resolve(false);
1851
+ image.onload = () => resolve(image.width === 1);
1852
+ image.src = 'data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA=';
1853
+ }).catch(() => false);
1854
+ });
2346
1855
 
2347
1856
  function useWindowSize() {
2348
- var _a = __read(useState({
1857
+ const [windowSize, setWindowSize] = useState({
2349
1858
  height: undefined,
2350
1859
  width: undefined,
2351
- }), 2), windowSize = _a[0], setWindowSize = _a[1];
2352
- useEffect(function () {
1860
+ });
1861
+ useEffect(() => {
2353
1862
  function handleResize() {
2354
1863
  setWindowSize({
2355
1864
  height: window.innerHeight,
@@ -2358,25 +1867,25 @@ function useWindowSize() {
2358
1867
  }
2359
1868
  window.addEventListener('resize', handleResize);
2360
1869
  handleResize();
2361
- return function () { return window.removeEventListener('resize', handleResize); };
1870
+ return () => window.removeEventListener('resize', handleResize);
2362
1871
  }, []);
2363
1872
  return windowSize;
2364
1873
  }
2365
1874
 
2366
- var EthAccount = function (_a) {
2367
- var address = _a.address, _b = _a.icon, icon = _b === void 0 ? false : _b, _c = _a.iconSize, iconSize = _c === void 0 ? 16 : _c, _d = _a.iconOnly, iconOnly = _d === void 0 ? false : _d, _e = _a.addressLength, addressLength = _e === void 0 ? 'auto' : _e, _f = _a.fontFamily, fontFamily = _f === void 0 ? '"Source Code Pro",monospace' : _f, toEtherScan = _a.toEtherScan, onButtonClick = _a.onButtonClick, props = __rest(_a, ["address", "icon", "iconSize", "iconOnly", "addressLength", "fontFamily", "toEtherScan", "onButtonClick"]);
2368
- var localAddress = useContext(EthersContext).localAddress;
2369
- var theme = useTheme();
2370
- var large = useMediaQuery(theme.breakpoints.up('md'));
2371
- var isLocalAddress = address ? (localAddress === null || localAddress === void 0 ? void 0 : localAddress.toString()) === address.toString() : false;
2372
- var onClickLocal = function (event) {
1875
+ const EthAccount = (_a) => {
1876
+ var { address, icon = false, iconSize = 16, iconOnly = false, addressLength = 'auto', fontFamily = '"Source Code Pro",monospace', toEtherScan, onButtonClick } = _a, props = __rest(_a, ["address", "icon", "iconSize", "iconOnly", "addressLength", "fontFamily", "toEtherScan", "onButtonClick"]);
1877
+ const { localAddress } = useContext(EthersContext);
1878
+ const theme = useTheme();
1879
+ const large = useMediaQuery(theme.breakpoints.up('md'));
1880
+ const isLocalAddress = address ? (localAddress === null || localAddress === void 0 ? void 0 : localAddress.toString()) === address.toString() : false;
1881
+ const onClickLocal = (event) => {
2373
1882
  onButtonClick === null || onButtonClick === void 0 ? void 0 : onButtonClick(event);
2374
1883
  if (toEtherScan && address) {
2375
- window.open("https://etherscan.io/address/".concat(address.toString()), '_blank');
1884
+ window.open(`https://etherscan.io/address/${address.toString()}`, '_blank');
2376
1885
  }
2377
1886
  };
2378
- var addressToDisplay = assertEx(address !== null && address !== void 0 ? address : EthAddress.fromString('0x00'), 'Bad Eth Address');
2379
- var testToDisplay = addressLength === 'long'
1887
+ const addressToDisplay = assertEx(address !== null && address !== void 0 ? address : EthAddress.fromString('0x00'), 'Bad Eth Address');
1888
+ const testToDisplay = addressLength === 'long'
2380
1889
  ? addressToDisplay.toString()
2381
1890
  : addressLength === 'short'
2382
1891
  ? addressToDisplay.toShortString()
@@ -2384,36 +1893,36 @@ var EthAccount = function (_a) {
2384
1893
  ? addressToDisplay.toString()
2385
1894
  : addressToDisplay.toShortString();
2386
1895
  // Note: We use the all zero address for spacing in case it is
2387
- return (jsx(ButtonEx, __assign({ onClick: onClickLocal, title: "0x".concat(address === null || address === void 0 ? void 0 : address.toHex()) }, props, { children: jsxs(FlexGrowRow, __assign({ justifyContent: "space-between", alignItems: "center" }, { children: [icon && address ? jsx(Identicon, { size: iconSize, value: address === null || address === void 0 ? void 0 : address.toHex() }, void 0) : null, iconOnly ? null : (jsxs(FlexRow, { children: [jsx(Typography, __assign({ marginLeft: icon ? 1 : 0, variant: "body1", fontFamily: fontFamily, visibility: address ? 'inherit' : 'hidden' }, { children: testToDisplay }), void 0), address ? null : (jsx(Typography, __assign({ position: "absolute", marginLeft: icon ? 1 : 0, variant: "body1", fontFamily: fontFamily }, { children: "-- --" }), void 0))] }, void 0)), isLocalAddress ? jsx(FlexRow, __assign({ marginLeft: 0.5 }, { children: "(You)" }), void 0) : null] }), void 0) }), void 0));
1896
+ return (jsx(ButtonEx, Object.assign({ onClick: onClickLocal, title: `0x${address === null || address === void 0 ? void 0 : address.toHex()}` }, props, { children: jsxs(FlexGrowRow, Object.assign({ justifyContent: "space-between", alignItems: "center" }, { children: [icon && address ? jsx(Identicon, { size: iconSize, value: address === null || address === void 0 ? void 0 : address.toHex() }, void 0) : null, iconOnly ? null : (jsxs(FlexRow, { children: [jsx(Typography, Object.assign({ marginLeft: icon ? 1 : 0, variant: "body1", fontFamily: fontFamily, visibility: address ? 'inherit' : 'hidden' }, { children: testToDisplay }), void 0), address ? null : (jsx(Typography, Object.assign({ position: "absolute", marginLeft: icon ? 1 : 0, variant: "body1", fontFamily: fontFamily }, { children: "-- --" }), void 0))] }, void 0)), isLocalAddress ? jsx(FlexRow, Object.assign({ marginLeft: 0.5 }, { children: "(You)" }), void 0) : null] }), void 0) }), void 0));
2388
1897
  };
2389
1898
 
2390
- var Experiment = function (props) {
2391
- var children = props.children;
1899
+ const Experiment = (props) => {
1900
+ const { children } = props;
2392
1901
  return jsx(Fragment, { children: children }, void 0);
2393
1902
  };
2394
1903
 
2395
- var OutcomesLocalStorageKey = 'outcomes';
2396
- var ExperimentsLocalStorageKey = 'experiments';
1904
+ const OutcomesLocalStorageKey = 'outcomes';
1905
+ const ExperimentsLocalStorageKey = 'experiments';
2397
1906
 
2398
- var defaultLocalStorageKey = 'testData';
2399
- var experimentsTestData = {};
2400
- var outcomes = {}; //prevent multi-outcome
2401
- var saveOutcomes = function () {
1907
+ const defaultLocalStorageKey = 'testData';
1908
+ const experimentsTestData = {};
1909
+ let outcomes = {}; //prevent multi-outcome
1910
+ const saveOutcomes = () => {
2402
1911
  setLocalStorageObject(OutcomesLocalStorageKey, outcomes);
2403
1912
  };
2404
- var loadOutcomes = function () {
1913
+ const loadOutcomes = () => {
2405
1914
  outcomes = getLocalStorageObject(OutcomesLocalStorageKey);
2406
1915
  };
2407
- var mergeData = function (data, log) {
2408
- var dataArray = [];
2409
- for (var key in data) {
2410
- dataArray.push("".concat(key, "-").concat(data[key]));
1916
+ const mergeData = (data, log) => {
1917
+ const dataArray = [];
1918
+ for (const key in data) {
1919
+ dataArray.push(`${key}-${data[key]}`);
2411
1920
  }
2412
1921
  log === null || log === void 0 ? void 0 : log.info('MergeData', dataArray.join('|'));
2413
1922
  return dataArray.join('|');
2414
1923
  };
2415
- var missingKeyError = new Error('Experiment Elements must have Keys');
2416
- var makeChildrenArray = function (children) {
1924
+ const missingKeyError = new Error('Experiment Elements must have Keys');
1925
+ const makeChildrenArray = (children) => {
2417
1926
  if (Array.isArray(children)) {
2418
1927
  return children;
2419
1928
  }
@@ -2421,36 +1930,25 @@ var makeChildrenArray = function (children) {
2421
1930
  return [children];
2422
1931
  }
2423
1932
  };
2424
- var buildLocalStorageKey = function (localStorageProp) {
1933
+ const buildLocalStorageKey = (localStorageProp) => {
2425
1934
  return localStorageProp === true
2426
1935
  ? defaultLocalStorageKey
2427
1936
  : typeof localStorageProp === 'string'
2428
1937
  ? localStorageProp !== null && localStorageProp !== void 0 ? localStorageProp : defaultLocalStorageKey
2429
1938
  : '';
2430
1939
  };
2431
- var calcTotalWeight = function (childList) {
2432
- var e_1, _a;
2433
- var totalWeight = 0;
2434
- try {
2435
- for (var childList_1 = __values(childList), childList_1_1 = childList_1.next(); !childList_1_1.done; childList_1_1 = childList_1.next()) {
2436
- var child = childList_1_1.value;
2437
- totalWeight += child.props.weight;
2438
- }
2439
- }
2440
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
2441
- finally {
2442
- try {
2443
- if (childList_1_1 && !childList_1_1.done && (_a = childList_1.return)) _a.call(childList_1);
2444
- }
2445
- finally { if (e_1) throw e_1.error; }
1940
+ const calcTotalWeight = (childList) => {
1941
+ let totalWeight = 0;
1942
+ for (const child of childList) {
1943
+ totalWeight += child.props.weight;
2446
1944
  }
2447
1945
  return totalWeight;
2448
1946
  };
2449
- var saveExperimentDebugRanges = function (name, totalWeight, childList) {
2450
- var experiments = getLocalStorageObject(ExperimentsLocalStorageKey) || {};
1947
+ const saveExperimentDebugRanges = (name, totalWeight, childList) => {
1948
+ const experiments = getLocalStorageObject(ExperimentsLocalStorageKey) || {};
2451
1949
  experiments[name] = {
2452
- totalWeight: totalWeight,
2453
- variants: childList.map(function (child) {
1950
+ totalWeight,
1951
+ variants: childList.map((child) => {
2454
1952
  var _a;
2455
1953
  return ({
2456
1954
  name: (_a = child.key) === null || _a === void 0 ? void 0 : _a.toString(),
@@ -2460,109 +1958,96 @@ var saveExperimentDebugRanges = function (name, totalWeight, childList) {
2460
1958
  };
2461
1959
  setLocalStorageObject(ExperimentsLocalStorageKey, experiments);
2462
1960
  };
2463
- var Experiments = function (props) {
2464
- var e_2, _a;
2465
- var _b, _c;
2466
- var name = props.name, children = props.children, _d = props.localStorageProp, localStorageProp = _d === void 0 ? true : _d;
2467
- var userEvents = useUserEvents();
1961
+ const Experiments = (props) => {
1962
+ var _a, _b;
1963
+ const { name, children, localStorageProp = true } = props;
1964
+ const userEvents = useUserEvents();
2468
1965
  loadOutcomes();
2469
- var localStorageKey = buildLocalStorageKey(localStorageProp);
2470
- var childList = makeChildrenArray(children);
2471
- var totalWeight = calcTotalWeight(childList);
1966
+ const localStorageKey = buildLocalStorageKey(localStorageProp);
1967
+ const childList = makeChildrenArray(children);
1968
+ const totalWeight = calcTotalWeight(childList);
2472
1969
  saveExperimentDebugRanges(name, totalWeight, childList);
2473
- var firstTime = outcomes[name] === undefined;
2474
- var targetWeight = (_b = outcomes[name]) !== null && _b !== void 0 ? _b : Math.random() * totalWeight;
1970
+ const firstTime = outcomes[name] === undefined;
1971
+ let targetWeight = (_a = outcomes[name]) !== null && _a !== void 0 ? _a : Math.random() * totalWeight;
2475
1972
  outcomes[name] = targetWeight;
2476
1973
  saveOutcomes();
2477
- try {
2478
- for (var childList_2 = __values(childList), childList_2_1 = childList_2.next(); !childList_2_1.done; childList_2_1 = childList_2.next()) {
2479
- var child = childList_2_1.value;
2480
- targetWeight -= child.props.weight;
2481
- if (targetWeight > 0)
2482
- continue;
2483
- if (!child.key) {
2484
- throw missingKeyError;
1974
+ for (const child of childList) {
1975
+ targetWeight -= child.props.weight;
1976
+ if (targetWeight > 0)
1977
+ continue;
1978
+ if (!child.key) {
1979
+ throw missingKeyError;
1980
+ }
1981
+ experimentsTestData[name] = (_b = child.key) === null || _b === void 0 ? void 0 : _b.toString();
1982
+ if (firstTime) {
1983
+ if (localStorageProp !== false) {
1984
+ localStorage.setItem(localStorageKey, mergeData(experimentsTestData));
2485
1985
  }
2486
- experimentsTestData[name] = (_c = child.key) === null || _c === void 0 ? void 0 : _c.toString();
2487
- if (firstTime) {
2488
- if (localStorageProp !== false) {
2489
- localStorage.setItem(localStorageKey, mergeData(experimentsTestData));
2490
- }
2491
- if (userEvents) {
2492
- forget(userEvents.testStarted({ name: name, variation: child.key }));
2493
- }
1986
+ if (userEvents) {
1987
+ forget(userEvents.testStarted({ name, variation: child.key }));
2494
1988
  }
2495
- return child;
2496
- }
2497
- }
2498
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
2499
- finally {
2500
- try {
2501
- if (childList_2_1 && !childList_2_1.done && (_a = childList_2.return)) _a.call(childList_2);
2502
1989
  }
2503
- finally { if (e_2) throw e_2.error; }
1990
+ return child;
2504
1991
  }
2505
1992
  throw new Error('Experiment Choice Failed');
2506
1993
  };
2507
1994
 
2508
- var ExperimentsDebugger = function (_a) {
1995
+ const ExperimentsDebugger = (_a) => {
2509
1996
  var props = __rest(_a, []);
2510
- var _b = __read(useLocalStorage(ExperimentsLocalStorageKey, {}), 1), experiments = _b[0];
2511
- var _c = __read(useLocalStorage(OutcomesLocalStorageKey, {}), 2), outcomes = _c[0], setOutcomes = _c[1];
2512
- var sumUpVariants = function (items) { return items.reduce(function (acc, curr) { return acc + curr.weight; }, 0); };
2513
- var experimentEntries = Object.entries(experiments);
1997
+ const [experiments] = useLocalStorage(ExperimentsLocalStorageKey, {});
1998
+ const [outcomes, setOutcomes] = useLocalStorage(OutcomesLocalStorageKey, {});
1999
+ const sumUpVariants = (items) => items.reduce((acc, curr) => acc + curr.weight, 0);
2000
+ const experimentEntries = Object.entries(experiments);
2514
2001
  if (!experiments || !experimentEntries.length) {
2515
- return (jsxs(FlexCol, __assign({ alignItems: "stretch" }, props, { children: [jsx(Typography, __assign({ variant: "subtitle1" }, { children: "No Experiments loaded" }), void 0), jsx(Typography, __assign({ variant: "subtitle2" }, { children: "Visit a page with an experiment to load the data" }), void 0)] }), void 0));
2516
- }
2517
- return (jsx(FlexCol, __assign({ alignItems: "stretch" }, props, { children: Object.entries(experiments).map(function (data) {
2518
- var _a = __read(data, 2), name = _a[0], experiment = _a[1];
2519
- var outcome = (outcomes[name] || 0);
2520
- var marks = __spreadArray([
2521
- { label: "".concat(experiment.variants[0].name, " | ").concat(experiment.variants[0].weight), value: 0 }
2522
- ], __read(experiment.variants.map(function (_a, index) {
2523
- var weight = _a.weight;
2524
- return ({
2525
- label: index === experiment.variants.length - 1 ? 'End' : "".concat(experiment.variants[index + 1].name, " | ").concat(weight),
2002
+ return (jsxs(FlexCol, Object.assign({ alignItems: "stretch" }, props, { children: [jsx(Typography, Object.assign({ variant: "subtitle1" }, { children: "No Experiments loaded" }), void 0), jsx(Typography, Object.assign({ variant: "subtitle2" }, { children: "Visit a page with an experiment to load the data" }), void 0)] }), void 0));
2003
+ }
2004
+ return (jsx(FlexCol, Object.assign({ alignItems: "stretch" }, props, { children: Object.entries(experiments).map((data) => {
2005
+ const [name, experiment] = data;
2006
+ const outcome = (outcomes[name] || 0);
2007
+ const marks = [
2008
+ { label: `${experiment.variants[0].name} | ${experiment.variants[0].weight}`, value: 0 },
2009
+ ...experiment.variants.map(({ weight }, index) => ({
2010
+ label: index === experiment.variants.length - 1 ? 'End' : `${experiment.variants[index + 1].name} | ${weight}`,
2526
2011
  value: index === 0 ? weight : sumUpVariants(experiment.variants.slice(0, index + 1)),
2527
- });
2528
- })), false);
2529
- return (jsxs(FlexCol, __assign({ alignItems: "stretch", paddingX: 4, marginBottom: 4 }, props, { children: [jsxs(FlexRow, { children: [name, ":\u00A0", outcome] }, void 0), jsx(FlexRow, { children: jsx(Slider, { "aria-label": "Experiment ".concat(name), defaultValue: outcome, value: outcome, marks: marks, onChange: function (e, value) {
2530
- var truncated = Number((Array.isArray(value) ? value[0] : value).toFixed(2));
2012
+ })),
2013
+ ];
2014
+ return (jsxs(FlexCol, Object.assign({ alignItems: "stretch", paddingX: 4, marginBottom: 4 }, props, { children: [jsxs(FlexRow, { children: [name, ":\u00A0", outcome] }, void 0), jsx(FlexRow, { children: jsx(Slider, { "aria-label": `Experiment ${name}`, defaultValue: outcome, value: outcome, marks: marks, onChange: (e, value) => {
2015
+ const truncated = Number((Array.isArray(value) ? value[0] : value).toFixed(2));
2531
2016
  outcomes[name] = truncated;
2532
2017
  // Spread operator triggers rerender
2533
- setOutcomes(__assign({}, outcomes));
2534
- } }, void 0) }, void 0)] }), "experiment-".concat(name)));
2018
+ setOutcomes(Object.assign({}, outcomes));
2019
+ } }, void 0) }, void 0)] }), `experiment-${name}`));
2535
2020
  }) }), void 0));
2536
2021
  };
2537
2022
 
2538
- var LinkToEx = function (_a) {
2539
- var to = _a.to, props = __rest(_a, ["to"]);
2540
- return jsx(Link, __assign({ component: Link$1, to: to }, props), void 0);
2023
+ const LinkToEx = (_a) => {
2024
+ var { to } = _a, props = __rest(_a, ["to"]);
2025
+ return jsx(Link, Object.assign({ component: Link$1, to: to }, props), void 0);
2541
2026
  };
2542
2027
 
2543
- var NumberStatus = function (_a) {
2028
+ const NumberStatus = (_a) => {
2544
2029
  var _b, _c;
2545
- var error = _a.error, _d = _a.format, format = _d === void 0 ? '0[.]0a' : _d, _e = _a.color, color = _e === void 0 ? 'primary' : _e, title = _a.title, value = _a.value, size = _a.size, fontSize = _a.fontSize, _f = _a.rounded, rounded = _f === void 0 ? false : _f, _g = _a.autoWidth, autoWidth = _g === void 0 ? false : _g, style = _a.style, props = __rest(_a, ["error", "format", "color", "title", "value", "size", "fontSize", "rounded", "autoWidth", "style"]);
2546
- var theme = useTheme();
2547
- var palette = color === 'inherit' ? undefined : theme.palette[color];
2548
- var bgColorTop = (_b = palette === null || palette === void 0 ? void 0 : palette.dark) !== null && _b !== void 0 ? _b : theme.palette.background.paper;
2549
- var bgColorBottom = (_c = palette === null || palette === void 0 ? void 0 : palette.main) !== null && _c !== void 0 ? _c : theme.palette.background.default;
2550
- var sizePixels = size === 'large' ? 96 : size === 'small' ? 64 : 80;
2551
- var calcFontSize = fontSize !== null && fontSize !== void 0 ? fontSize : sizePixels * 0.2;
2552
- return (jsx(ButtonEx, __assign({ size: size, padding: 0, style: __assign({ borderRadius: rounded ? theme.shape.borderRadius : 0, overflow: rounded ? 'hidden' : undefined }, style) }, props, { children: jsxs(FlexCol, __assign({ alignItems: "stretch", height: sizePixels, width: autoWidth ? '100%' : sizePixels, busy: value === undefined && !error }, { children: [jsx(FlexGrowRow, __assign({ bgcolor: bgColorTop, color: theme.palette.getContrastText(bgColorTop), fontSize: calcFontSize, fontFamily: "Source Code Pro,monospace", alignItems: "center", height: sizePixels * 0.75 }, { children: numeral(value).format(format) }), void 0), jsx(FlexGrowRow, __assign({ bgcolor: bgColorBottom, borderTop: "1px", color: theme.palette.getContrastText(bgColorBottom), fontSize: sizePixels * 0.12, fontFamily: theme.typography.fontFamily, height: sizePixels * 0.25 }, { children: title }), void 0)] }), void 0) }), void 0));
2030
+ var { error, format = '0[.]0a', color = 'primary', title, value, size, fontSize, rounded = false, autoWidth = false, style } = _a, props = __rest(_a, ["error", "format", "color", "title", "value", "size", "fontSize", "rounded", "autoWidth", "style"]);
2031
+ const theme = useTheme();
2032
+ const palette = color === 'inherit' ? undefined : theme.palette[color];
2033
+ const bgColorTop = (_b = palette === null || palette === void 0 ? void 0 : palette.dark) !== null && _b !== void 0 ? _b : theme.palette.background.paper;
2034
+ const bgColorBottom = (_c = palette === null || palette === void 0 ? void 0 : palette.main) !== null && _c !== void 0 ? _c : theme.palette.background.default;
2035
+ const sizePixels = size === 'large' ? 96 : size === 'small' ? 64 : 80;
2036
+ const calcFontSize = fontSize !== null && fontSize !== void 0 ? fontSize : sizePixels * 0.2;
2037
+ return (jsx(ButtonEx, Object.assign({ size: size, padding: 0, style: Object.assign({ borderRadius: rounded ? theme.shape.borderRadius : 0, overflow: rounded ? 'hidden' : undefined }, style) }, props, { children: jsxs(FlexCol, Object.assign({ alignItems: "stretch", height: sizePixels, width: autoWidth ? '100%' : sizePixels, busy: value === undefined && !error }, { children: [jsx(FlexGrowRow, Object.assign({ bgcolor: bgColorTop, color: theme.palette.getContrastText(bgColorTop), fontSize: calcFontSize, fontFamily: "Source Code Pro,monospace", alignItems: "center", height: sizePixels * 0.75 }, { children: numeral(value).format(format) }), void 0), jsx(FlexGrowRow, Object.assign({ bgcolor: bgColorBottom, borderTop: "1px", color: theme.palette.getContrastText(bgColorBottom), fontSize: sizePixels * 0.12, fontFamily: theme.typography.fontFamily, height: sizePixels * 0.25 }, { children: title }), void 0)] }), void 0) }), void 0));
2553
2038
  };
2554
2039
 
2555
- var QuickTipButton = function (_a) {
2556
- var title = _a.title, children = _a.children, props = __rest(_a, ["title", "children"]);
2557
- var _b = __read(useState(false), 2), messageOpen = _b[0], setMessageOpen = _b[1];
2558
- return (jsxs(Fragment, { children: [jsx(IconButton, __assign({ onClick: function () { return setMessageOpen(true); }, size: "small" }, props, { children: jsx(AiOutlineQuestionCircle, { size: 16 }, void 0) }), void 0), jsx(MessageDialog, __assign({ onOk: function () { return setMessageOpen(false); }, onCancel: function () { return setMessageOpen(false); }, onClose: function () { return setMessageOpen(false); }, open: messageOpen, title: title !== null && title !== void 0 ? title : '' }, { children: children }), void 0)] }, void 0));
2040
+ const QuickTipButton = (_a) => {
2041
+ var { title, children } = _a, props = __rest(_a, ["title", "children"]);
2042
+ const [messageOpen, setMessageOpen] = useState(false);
2043
+ return (jsxs(Fragment, { children: [jsx(IconButton, Object.assign({ onClick: () => setMessageOpen(true), size: "small" }, props, { children: jsx(AiOutlineQuestionCircle, { size: 16 }, void 0) }), void 0), jsx(MessageDialog, Object.assign({ onOk: () => setMessageOpen(false), onCancel: () => setMessageOpen(false), onClose: () => setMessageOpen(false), open: messageOpen, title: title !== null && title !== void 0 ? title : '' }, { children: children }), void 0)] }, void 0));
2559
2044
  };
2560
2045
 
2561
- var RichResult = function (props) {
2562
- var thing = props.thing;
2563
- var thingWithContext = thing;
2046
+ const RichResult = (props) => {
2047
+ const { thing } = props;
2048
+ const thingWithContext = thing;
2564
2049
  thingWithContext['@context'] = 'https://schema.org';
2565
- return jsx("script", __assign({ type: "application/ld+json" }, { children: JSON.stringify(thingWithContext) }), void 0);
2050
+ return jsx("script", Object.assign({ type: "application/ld+json" }, { children: JSON.stringify(thingWithContext) }), void 0);
2566
2051
  };
2567
2052
 
2568
2053
  var ActionStatusType;
@@ -2609,19 +2094,10 @@ var MapCategoryType;
2609
2094
  MapCategoryType["VenueMap"] = "VenueMap";
2610
2095
  })(MapCategoryType || (MapCategoryType = {}));
2611
2096
 
2612
- // The point of this component it to return to the top of the page on any router navigate
2613
- var ScrollToTop = function () {
2614
- var pathname = useLocation().pathname;
2615
- useEffect(function () {
2616
- window.scrollTo(0, 0);
2617
- }, [pathname]);
2618
- return null;
2619
- };
2620
-
2621
2097
  var img = "data:image/svg+xml,%3csvg id='Layer_1' data-name='Layer 1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 238'%3e%3cdefs%3e%3cstyle%3e.cls-1%7bfill:%23999%3b%7d%3c/style%3e%3c/defs%3e%3ctitle%3eicon_gray%3c/title%3e%3cpath class='cls-1' d='M74.5%2c28.33%2c21.29%2c120.5%2c74.5%2c212.67H180.94l1.76-3%2c51.46-89.13L180.94%2c28.33ZM84.65%2c40.54h78.83L111.65%2c56.93a15.85%2c15.85%2c0%2c0%2c1%2c2%2c5l59.66-18.81L185.22%2c101a20.12%2c20.12%2c0%2c0%2c1%2c5.36-.78l-10-47.91%2c37.87%2c65.53h-7.62a24.21%2c24.21%2c0%2c0%2c1%2c.15%2c2.68%2c23.29%2c23.29%2c0%2c0%2c1-.15%2c2.68h7.62l-39.1%2c67.75%2c10.92-50.13A20.57%2c20.57%2c0%2c0%2c1%2c185%2c140l-12.88%2c59-58.37-19.53a17.61%2c17.61%2c0%2c0%2c1-1.7%2c5l47.5%2c15.92H84.65l4-6.85A20.17%2c20.17%2c0%2c0%2c1%2c83.93%2c191L80%2c197.78%2c42.67%2c133.13l37%2c32.66a20.52%2c20.52%2c0%2c0%2c1%2c3.6-4L36.69%2c120.66%2c85%2c77.79a17.45%2c17.45%2c0%2c0%2c1-3.19-4.32l-39.46%2c35L80%2c43.22l5.56%2c9.69A17.51%2c17.51%2c0%2c0%2c1%2c90.12%2c50Zm28.24%2c31.17a16.15%2c16.15%2c0%2c0%2c1-2.68%2c4.64l62%2c35.81a19.74%2c19.74%2c0%2c0%2c1%2c2.83-4.54Zm-20%2c10.51v75.33a18%2c18%2c0%2c0%2c1%2c2.47-.16%2c17.18%2c17.18%2c0%2c0%2c1%2c2.89.21v-75a11.21%2c11.21%2c0%2c0%2c1-1.29%2c0%2c17.57%2c17.57%2c0%2c0%2c1-4.07-.47Zm79.34%2c46.63-62.08%2c35.81a18.45%2c18.45%2c0%2c0%2c1%2c2.68%2c4.68l62.23-36a19.68%2c19.68%2c0%2c0%2c1-2.83-4.53Z'/%3e%3cpath class='cls-1' d='M97%2c48.58a17.06%2c17.06%2c0%2c1%2c0%2c17%2c17%2c17.08%2c17.08%2c0%2c0%2c0-17-17Zm0%2c5.36a11.7%2c11.7%2c0%2c1%2c1-11.7%2c11.69A11.65%2c11.65%2c0%2c0%2c1%2c97%2c53.94Z'/%3e%3cpath class='cls-1' d='M95.37%2c157.39a18.73%2c18.73%2c0%2c1%2c0%2c18.7%2c18.7%2c18.74%2c18.74%2c0%2c0%2c0-18.7-18.7Zm0%2c5.31A13.4%2c13.4%2c0%2c1%2c1%2c82%2c176.09a13.37%2c13.37%2c0%2c0%2c1%2c13.4-13.39Z'/%3e%3cpath class='cls-1' d='M190.73%2c100.2A20.3%2c20.3%2c0%2c1%2c0%2c211%2c120.5a20.34%2c20.34%2c0%2c0%2c0-20.3-20.3Zm0%2c5.36a14.94%2c14.94%2c0%2c1%2c1-14.94%2c14.94%2c14.88%2c14.88%2c0%2c0%2c1%2c14.94-14.94Z'/%3e%3c/svg%3e";
2622
2098
 
2623
- var base10Shift = function (bn, places) {
2624
- var factor = new BigNumber(10).pow(new BigNumber(Math.abs(places)));
2099
+ const base10Shift = (bn, places) => {
2100
+ const factor = new BigNumber(10).pow(new BigNumber(Math.abs(places)));
2625
2101
  if (places > 0) {
2626
2102
  return bn.mul(factor);
2627
2103
  }
@@ -2629,11 +2105,11 @@ var base10Shift = function (bn, places) {
2629
2105
  return bn.div(factor);
2630
2106
  }
2631
2107
  };
2632
- var TokenAmount = function (_a) {
2633
- var _b = _a.textFontFamily, textFontFamily = _b === void 0 ? '"Source Code Pro",monospace' : _b, textColor = _a.textColor, statusColor = _a.statusColor, style = _a.style, amount = _a.amount, _c = _a.places, places = _c === void 0 ? -18 : _c, logo = _a.logo, label = _a.label, onButtonClick = _a.onButtonClick, props = __rest(_a, ["textFontFamily", "textColor", "statusColor", "style", "amount", "places", "logo", "label", "onButtonClick"]);
2634
- var adjustedAmount = amount ? base10Shift(amount, places).toNumber() : undefined;
2635
- var amountString = adjustedAmount ? Math.trunc(adjustedAmount).toLocaleString() : '-';
2636
- return (jsx(ButtonEx, __assign({ style: __assign({ backgroundColor: statusColor }, style), variant: "outlined", onClick: onButtonClick }, props, { children: jsxs(FlexRow, __assign({ justifyContent: "space-between", width: "100%", busy: amount === undefined, busySize: 16 }, { children: [jsxs(FlexRow, { children: [logo ? jsx("img", { src: img, height: 24 }, void 0) : null, label ? (jsx(Typography, __assign({ marginRight: 1, marginLeft: logo ? 1 : 0, noWrap: true, fontFamily: textFontFamily, variant: "caption" }, { children: label }), void 0)) : null] }, void 0), jsx(Typography, __assign({ color: textColor, noWrap: true, fontFamily: textFontFamily, variant: "body1", style: { textTransform: 'none' } }, { children: amountString }), void 0)] }), void 0) }), void 0));
2108
+ const TokenAmount = (_a) => {
2109
+ var { textFontFamily = '"Source Code Pro",monospace', textColor, statusColor, style, amount, places = -18, logo, label, onButtonClick } = _a, props = __rest(_a, ["textFontFamily", "textColor", "statusColor", "style", "amount", "places", "logo", "label", "onButtonClick"]);
2110
+ const adjustedAmount = amount ? base10Shift(amount, places).toNumber() : undefined;
2111
+ const amountString = adjustedAmount ? Math.trunc(adjustedAmount).toLocaleString() : '-';
2112
+ return (jsx(ButtonEx, Object.assign({ style: Object.assign({ backgroundColor: statusColor }, style), variant: "outlined", onClick: onButtonClick }, props, { children: jsxs(FlexRow, Object.assign({ justifyContent: "space-between", width: "100%", busy: amount === undefined, busySize: 16 }, { children: [jsxs(FlexRow, { children: [logo ? jsx("img", { src: img, height: 24 }, void 0) : null, label ? (jsx(Typography, Object.assign({ marginRight: 1, marginLeft: logo ? 1 : 0, noWrap: true, fontFamily: textFontFamily, variant: "caption" }, { children: label }), void 0)) : null] }, void 0), jsx(Typography, Object.assign({ color: textColor, noWrap: true, fontFamily: textFontFamily, variant: "body1", style: { textTransform: 'none' } }, { children: amountString }), void 0)] }), void 0) }), void 0));
2637
2113
  };
2638
2114
 
2639
2115
  export { ActionStatusType, AppBarEx, Background, BasePage, BreadcrumbsEx, BusyBox, ButtonEx, ContactPointOption, CookieConsent, CookieConsentBody, CookieConsentContext, CookieConsentLoader, CoverProgress, DripCustomEvent, DripStandardEvents, ErrorDialog, EthAccount, EthersContext, EthersLoader, Experiment, Experiments, ExperimentsDebugger, FacebookCustomEvent, FacebookStandardEvents, Fbq, FlexCol, FlexGrowCol, FlexGrowRow, FlexRow, GoogleBaseEvent, GoogleCustomEvent, GoogleStandardEvents, GoogleUserEventHandler, Gtag, Gtm, HoverScale, Identicon, InvertableThemeProvider, ItemAvailability, LinkToEx, MapCategoryType, MessageDialog, NetworkSettingsContext, NetworkSettingsLoader, NumberStatus, QuickTipButton, Rdt, RedditCustomEvent, RedditStandardEvents, RedirectWithQuery, Referrer, RichResult, ScrollToTop, ScrollToTopButton, SnapTr, SnapchatStandardEvents, TiktokCustomEvent, TiktokStandardEvents, TokenAmount, Ttq, UserEventsContext, UserEventsLoader, XyBaseEvent, XyCustomEvent, XyUserEventHandler, XyoUserEventHandler, enableProfileLogging, getApiStage, getLocalStorageObject, getSessionStorageObject, isLocalhost, profileBlock, profileResults, setLocalStorageObject, setSessionStorageObject, useAsyncEffect, useBreakpoint, useCookieConsent, useLocalStorage, useMounted, useNavigateToEthAddress, useSpacing, useUserEvents, useWebP, useWindowSize };