@saasquatch/mint-components 1.5.0-13 → 1.5.0-17

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 (213) hide show
  1. package/CHANGELOG.md +48 -24
  2. package/dist/cjs/{global-89f66e76.js → global-5ca2a131.js} +5 -5
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/mint-components.cjs.js +2 -2
  5. package/dist/cjs/sqm-big-stat.cjs.entry.js +1 -1
  6. package/dist/cjs/sqm-brand_39.cjs.entry.js +422 -238
  7. package/dist/cjs/sqm-card-feed-view-17fd3f0a.js +369 -0
  8. package/dist/cjs/sqm-card-feed.cjs.entry.js +4 -5
  9. package/dist/cjs/{sqm-leaderboard-rank-view-510f16d3.js → sqm-leaderboard-rank-view-dff9de2e.js} +1 -1
  10. package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +2 -2
  11. package/dist/cjs/{sqm-portal-email-verification-view-5093ac20.js → sqm-portal-email-verification-view-f0cbd78b.js} +1 -1
  12. package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +10 -3
  13. package/dist/cjs/{sqm-portal-footer-view-03408484.js → sqm-portal-footer-view-c714590c.js} +1 -1
  14. package/dist/cjs/sqm-portal-footer.cjs.entry.js +2 -2
  15. package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +16 -4
  16. package/dist/cjs/{sqm-portal-profile-view-1a6327e4.js → sqm-portal-profile-view-f0233000.js} +3 -2
  17. package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
  18. package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +9 -1
  19. package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +10 -2
  20. package/dist/cjs/{sqm-program-explainer-step-view-54424840.js → sqm-program-explainer-step-view-17c5e99d.js} +4 -4
  21. package/dist/cjs/sqm-program-explainer-step.cjs.entry.js +1 -1
  22. package/dist/cjs/{sqm-program-explainer-view-db516613.js → sqm-program-explainer-view-d516c9df.js} +2 -2
  23. package/dist/cjs/sqm-program-explainer.cjs.entry.js +1 -1
  24. package/dist/cjs/{useDemoBigStat-5f770877.js → useDemoBigStat-49cd314a.js} +1 -2
  25. package/dist/collection/components/sqm-big-stat/sqm-big-stat.js +20 -0
  26. package/dist/collection/components/sqm-big-stat/useBigStat.js +1 -2
  27. package/dist/collection/components/sqm-card-feed/CardFeed.stories.js +13 -1
  28. package/dist/collection/components/sqm-card-feed/sqm-card-feed-view.js +7 -10
  29. package/dist/collection/components/sqm-card-feed/sqm-card-feed.js +9 -13
  30. package/dist/collection/components/sqm-portal-container/PortalContainer.stories.js +11 -1
  31. package/dist/collection/components/sqm-portal-container/sqm-portal-container-view.js +2 -1
  32. package/dist/collection/components/sqm-portal-container/sqm-portal-container.js +25 -0
  33. package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification.js +27 -0
  34. package/dist/collection/components/sqm-portal-email-verification/usePortalEmailVerification.js +2 -1
  35. package/dist/collection/components/sqm-portal-forgot-password/PortalForgotPassword.stories.js +4 -0
  36. package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password.js +55 -3
  37. package/dist/collection/components/sqm-portal-forgot-password/usePortalForgotPassword.js +4 -2
  38. package/dist/collection/components/sqm-portal-login/PortalLogin.stories.js +6 -0
  39. package/dist/collection/components/sqm-portal-login/sqm-portal-login.js +59 -4
  40. package/dist/collection/components/sqm-portal-login/usePortalLogin.js +4 -2
  41. package/dist/collection/components/sqm-portal-register/PortalRegister.stories.js +5 -0
  42. package/dist/collection/components/sqm-portal-register/sqm-portal-register.js +55 -2
  43. package/dist/collection/components/sqm-portal-register/usePortalRegister.js +3 -0
  44. package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password.js +30 -1
  45. package/dist/collection/components/sqm-portal-reset-password/usePortalResetPassword.js +1 -1
  46. package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email.js +30 -1
  47. package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +2 -2
  48. package/dist/collection/components/sqm-program-explainer/ProgramExplainer.stories.js +1 -1
  49. package/dist/collection/components/sqm-program-explainer/sqm-program-explainer-view.js +2 -2
  50. package/dist/collection/components/sqm-program-explainer-step/ProgramExplainerStep.stories.js +1 -1
  51. package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +5 -5
  52. package/dist/collection/components/sqm-referral-table/sqm-referral-table.js +5 -2
  53. package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeListData.js +13 -8
  54. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +91 -114
  55. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list.js +113 -5
  56. package/dist/collection/components/sqm-share-button/ShareButton.stories.js +21 -0
  57. package/dist/collection/components/sqm-share-button/sqm-share-button-view.js +17 -9
  58. package/dist/collection/components/sqm-share-button/sqm-share-button.js +62 -10
  59. package/dist/collection/components/sqm-task-card/TaskCard.stories.js +12 -0
  60. package/dist/collection/components/sqm-task-card/progress-bar/SVGs.js +1 -1
  61. package/dist/collection/components/sqm-task-card/progress-bar/progress-bar-view.js +24 -31
  62. package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +79 -22
  63. package/dist/collection/components/sqm-task-card/sqm-task-card.js +106 -0
  64. package/dist/collection/components/sqm-user-name/sqm-user-name.js +1 -1
  65. package/dist/collection/global/styles.js +5 -5
  66. package/dist/collection/global/styles.ts +5 -5
  67. package/dist/esm/{global-e0e25c22.js → global-1c68ff6e.js} +5 -5
  68. package/dist/esm/loader.js +2 -2
  69. package/dist/esm/mint-components.js +2 -2
  70. package/dist/esm/sqm-big-stat.entry.js +1 -1
  71. package/dist/esm/sqm-brand_39.entry.js +422 -238
  72. package/dist/esm/sqm-card-feed-view-cdd1f818.js +367 -0
  73. package/dist/esm/sqm-card-feed.entry.js +4 -5
  74. package/dist/esm/{sqm-leaderboard-rank-view-cd1e8962.js → sqm-leaderboard-rank-view-95e6fb4f.js} +1 -1
  75. package/dist/esm/sqm-leaderboard-rank.entry.js +2 -2
  76. package/dist/esm/{sqm-portal-email-verification-view-2af31979.js → sqm-portal-email-verification-view-71eb8adb.js} +1 -1
  77. package/dist/esm/sqm-portal-email-verification.entry.js +10 -3
  78. package/dist/esm/{sqm-portal-footer-view-60cd9ae5.js → sqm-portal-footer-view-5cb00c4e.js} +1 -1
  79. package/dist/esm/sqm-portal-footer.entry.js +2 -2
  80. package/dist/esm/sqm-portal-forgot-password.entry.js +16 -4
  81. package/dist/esm/{sqm-portal-profile-view-ba06e776.js → sqm-portal-profile-view-864dd5b5.js} +3 -2
  82. package/dist/esm/sqm-portal-profile.entry.js +2 -2
  83. package/dist/esm/sqm-portal-reset-password.entry.js +9 -1
  84. package/dist/esm/sqm-portal-verify-email.entry.js +10 -2
  85. package/dist/esm/{sqm-program-explainer-step-view-7c0d5f71.js → sqm-program-explainer-step-view-e2b39225.js} +4 -4
  86. package/dist/esm/sqm-program-explainer-step.entry.js +1 -1
  87. package/dist/esm/{sqm-program-explainer-view-ab291eb4.js → sqm-program-explainer-view-f726f5ec.js} +2 -2
  88. package/dist/esm/sqm-program-explainer.entry.js +1 -1
  89. package/dist/esm/{useDemoBigStat-a0dd50ab.js → useDemoBigStat-acd4b73f.js} +1 -2
  90. package/dist/esm-es5/{global-e0e25c22.js → global-1c68ff6e.js} +1 -1
  91. package/dist/esm-es5/loader.js +1 -1
  92. package/dist/esm-es5/mint-components.js +1 -1
  93. package/dist/esm-es5/sqm-big-stat.entry.js +1 -1
  94. package/dist/esm-es5/sqm-brand_39.entry.js +1 -1
  95. package/dist/esm-es5/sqm-card-feed-view-cdd1f818.js +1 -0
  96. package/dist/esm-es5/sqm-card-feed.entry.js +1 -1
  97. package/dist/esm-es5/{sqm-leaderboard-rank-view-cd1e8962.js → sqm-leaderboard-rank-view-95e6fb4f.js} +1 -1
  98. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  99. package/dist/esm-es5/{sqm-portal-email-verification-view-2af31979.js → sqm-portal-email-verification-view-71eb8adb.js} +1 -1
  100. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  101. package/dist/esm-es5/{sqm-portal-footer-view-60cd9ae5.js → sqm-portal-footer-view-5cb00c4e.js} +1 -1
  102. package/dist/esm-es5/sqm-portal-footer.entry.js +1 -1
  103. package/dist/esm-es5/sqm-portal-forgot-password.entry.js +1 -1
  104. package/dist/esm-es5/sqm-portal-profile-view-864dd5b5.js +1 -0
  105. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  106. package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
  107. package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
  108. package/dist/esm-es5/{sqm-program-explainer-step-view-7c0d5f71.js → sqm-program-explainer-step-view-e2b39225.js} +1 -1
  109. package/dist/esm-es5/sqm-program-explainer-step.entry.js +1 -1
  110. package/dist/esm-es5/{sqm-program-explainer-view-ab291eb4.js → sqm-program-explainer-view-f726f5ec.js} +1 -1
  111. package/dist/esm-es5/sqm-program-explainer.entry.js +1 -1
  112. package/dist/esm-es5/{useDemoBigStat-a0dd50ab.js → useDemoBigStat-acd4b73f.js} +1 -1
  113. package/dist/mint-components/global/styles.ts +5 -5
  114. package/dist/mint-components/mint-components.esm.js +1 -1
  115. package/dist/mint-components/mint-components.js +1 -1
  116. package/dist/mint-components/{p-bbb06296.entry.js → p-05de158b.entry.js} +1 -1
  117. package/dist/mint-components/p-0b7cc270.system.js +1 -0
  118. package/dist/mint-components/p-172e487a.system.entry.js +1 -0
  119. package/dist/mint-components/{p-759d3800.entry.js → p-26e63ecb.entry.js} +2 -2
  120. package/dist/mint-components/{p-376a0b37.js → p-35ee8cdf.js} +1 -1
  121. package/dist/mint-components/p-3e187434.system.js +1 -0
  122. package/dist/mint-components/{p-5001b2d1.system.js → p-5744f326.system.js} +1 -1
  123. package/dist/mint-components/p-5896caca.system.js +1 -0
  124. package/dist/mint-components/p-59cc7a26.system.entry.js +1 -0
  125. package/dist/mint-components/{p-8b523e73.entry.js → p-5b9a5dfa.entry.js} +1 -1
  126. package/dist/mint-components/{p-f79454fc.entry.js → p-69e273b4.entry.js} +1 -1
  127. package/dist/mint-components/p-6b8d51d6.entry.js +1 -0
  128. package/dist/mint-components/{p-0d0ec6fd.system.entry.js → p-6caa44e1.system.entry.js} +1 -1
  129. package/dist/mint-components/{p-0e95b67b.js → p-700f96f5.js} +1 -1
  130. package/dist/mint-components/{p-a8246a50.system.entry.js → p-71b6d552.system.entry.js} +1 -1
  131. package/dist/mint-components/{p-02dc36a4.system.js → p-7638bf48.system.js} +1 -1
  132. package/dist/mint-components/p-7798ebd4.js +1 -0
  133. package/dist/mint-components/{p-0e8ae7e3.system.js → p-79baab87.system.js} +1 -1
  134. package/dist/mint-components/p-7f6d37d8.entry.js +1 -0
  135. package/dist/mint-components/p-878ff4ca.entry.js +1 -0
  136. package/dist/mint-components/{p-4fc31af7.system.js → p-89d63744.system.js} +1 -1
  137. package/dist/mint-components/p-8c3d0392.system.entry.js +1 -0
  138. package/dist/mint-components/{p-8a261335.system.entry.js → p-8f58ce03.system.entry.js} +1 -1
  139. package/dist/mint-components/p-9a82ec56.entry.js +1 -0
  140. package/dist/mint-components/{p-21b4044a.entry.js → p-9bc12158.entry.js} +1 -1
  141. package/dist/mint-components/p-a3a5c48f.js +1 -0
  142. package/dist/mint-components/{p-2027edc0.system.entry.js → p-a424ac85.system.entry.js} +1 -1
  143. package/dist/mint-components/{p-1f95b411.js → p-a72143af.js} +1 -1
  144. package/dist/mint-components/p-b0d598db.system.entry.js +1 -0
  145. package/dist/mint-components/p-b11625ed.system.entry.js +1 -0
  146. package/dist/mint-components/p-b2cbbcce.system.js +1 -0
  147. package/dist/mint-components/p-ba1f4bf4.system.entry.js +1 -0
  148. package/dist/mint-components/{p-f8f125a7.system.js → p-bb7fd343.system.js} +1 -1
  149. package/dist/mint-components/{p-11cd0656.js → p-bd0887fb.js} +1 -1
  150. package/dist/mint-components/{p-72a5a051.system.entry.js → p-bffad7b3.system.entry.js} +1 -1
  151. package/dist/mint-components/p-c3d0b165.entry.js +1 -0
  152. package/dist/mint-components/p-c4a8c149.system.entry.js +1 -0
  153. package/dist/mint-components/{p-046c45b1.entry.js → p-c61028b0.entry.js} +1 -1
  154. package/dist/mint-components/{p-f7f87338.js → p-cd0ff606.js} +1 -1
  155. package/dist/mint-components/{p-8fd8682c.js → p-d793d269.js} +1 -1
  156. package/dist/mint-components/{p-4b719313.js → p-da46fc91.js} +1 -1
  157. package/dist/mint-components/{p-2e63dcfd.system.js → p-f47bf492.system.js} +1 -1
  158. package/dist/mint-components/p-ff74bee4.entry.js +372 -0
  159. package/dist/types/components/sqm-big-stat/sqm-big-stat.d.ts +6 -0
  160. package/dist/types/components/sqm-card-feed/sqm-card-feed-view.d.ts +2 -1
  161. package/dist/types/components/sqm-card-feed/sqm-card-feed.d.ts +3 -4
  162. package/dist/types/components/sqm-portal-container/PortalContainer.stories.d.ts +2 -0
  163. package/dist/types/components/sqm-portal-container/sqm-portal-container-view.d.ts +1 -0
  164. package/dist/types/components/sqm-portal-container/sqm-portal-container.d.ts +4 -0
  165. package/dist/types/components/sqm-portal-email-verification/sqm-portal-email-verification.d.ts +6 -0
  166. package/dist/types/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.d.ts +1 -0
  167. package/dist/types/components/sqm-portal-forgot-password/sqm-portal-forgot-password.d.ts +10 -0
  168. package/dist/types/components/sqm-portal-forgot-password/usePortalForgotPassword.d.ts +3 -1
  169. package/dist/types/components/sqm-portal-login/sqm-portal-login-view.d.ts +2 -0
  170. package/dist/types/components/sqm-portal-login/sqm-portal-login.d.ts +8 -0
  171. package/dist/types/components/sqm-portal-login/usePortalLogin.d.ts +3 -3
  172. package/dist/types/components/sqm-portal-register/sqm-portal-register-view.d.ts +1 -0
  173. package/dist/types/components/sqm-portal-register/sqm-portal-register.d.ts +10 -0
  174. package/dist/types/components/sqm-portal-register/usePortalRegister.d.ts +1 -0
  175. package/dist/types/components/sqm-portal-reset-password/sqm-portal-reset-password.d.ts +8 -0
  176. package/dist/types/components/sqm-portal-verify-email/sqm-portal-verify-email.d.ts +8 -0
  177. package/dist/types/components/sqm-portal-verify-email/usePortalVerifyEmail.d.ts +2 -1
  178. package/dist/types/components/sqm-reward-exchange-list/RewardExchangeListData.d.ts +143 -88
  179. package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list.d.ts +21 -0
  180. package/dist/types/components/sqm-share-button/ShareButton.stories.d.ts +2 -0
  181. package/dist/types/components/sqm-share-button/sqm-share-button-view.d.ts +3 -0
  182. package/dist/types/components/sqm-share-button/sqm-share-button.d.ts +12 -0
  183. package/dist/types/components/sqm-task-card/progress-bar/SVGs.d.ts +1 -1
  184. package/dist/types/components/sqm-task-card/sqm-task-card-view.d.ts +4 -0
  185. package/dist/types/components/sqm-task-card/sqm-task-card.d.ts +22 -0
  186. package/dist/types/components/sqm-user-name/sqm-user-name.d.ts +1 -1
  187. package/dist/types/components.d.ts +212 -8
  188. package/dist/types/global/styles.d.ts +1 -1
  189. package/grapesjs/grapesjs.js +1 -1
  190. package/package.json +2 -1
  191. package/dist/cjs/sqm-card-feed-view-ec75fafc.js +0 -36
  192. package/dist/esm/sqm-card-feed-view-81f93bc7.js +0 -34
  193. package/dist/esm-es5/sqm-card-feed-view-81f93bc7.js +0 -1
  194. package/dist/esm-es5/sqm-portal-profile-view-ba06e776.js +0 -1
  195. package/dist/mint-components/p-20c95798.entry.js +0 -1
  196. package/dist/mint-components/p-3f5aa202.system.js +0 -1
  197. package/dist/mint-components/p-4658d225.system.entry.js +0 -1
  198. package/dist/mint-components/p-5939212e.system.entry.js +0 -1
  199. package/dist/mint-components/p-6f498a6b.system.entry.js +0 -1
  200. package/dist/mint-components/p-77b5a0a4.js +0 -1
  201. package/dist/mint-components/p-7cdbe82a.entry.js +0 -1
  202. package/dist/mint-components/p-8a714f3f.js +0 -1
  203. package/dist/mint-components/p-91fde765.system.js +0 -1
  204. package/dist/mint-components/p-9608ce17.system.entry.js +0 -1
  205. package/dist/mint-components/p-9dd76aed.system.entry.js +0 -1
  206. package/dist/mint-components/p-9ef3c3bc.entry.js +0 -372
  207. package/dist/mint-components/p-a88a08bb.system.js +0 -1
  208. package/dist/mint-components/p-a9a6f205.entry.js +0 -1
  209. package/dist/mint-components/p-b86cbac3.system.entry.js +0 -1
  210. package/dist/mint-components/p-c65cfc9d.system.js +0 -1
  211. package/dist/mint-components/p-e36ff7fa.entry.js +0 -1
  212. package/dist/mint-components/p-ed696e43.entry.js +0 -1
  213. package/dist/mint-components/p-ef7f70f2.system.entry.js +0 -1
@@ -0,0 +1,369 @@
1
+ 'use strict';
2
+
3
+ const index = require('./index-b0129cd6.js');
4
+ const jssPresetDefault_esm = require('./jss-preset-default.esm-6304d24f.js');
5
+
6
+ const DEFAULT_MAX_COL_WIDTH = 500;
7
+ const DEFAULT_COLS = "auto";
8
+ const DEFAULT_DEBOUNCE_MS = 300;
9
+ const DEFAULT_GAP_PX = 24;
10
+ const COL_COUNT_CSS_VAR_NAME = `--_masonry-layout-col-count`;
11
+ const GAP_CSS_VAR_NAME = `--_masonry-layout-gap`;
12
+ // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
13
+ const ELEMENT_NODE_TYPE = 1;
14
+ const DEBOUNCE_MAP = new Map();
15
+ /**
16
+ * Returns a number attribute from an element.
17
+ * @param $elem
18
+ * @param name
19
+ * @param defaultValue
20
+ */
21
+ function getNumberAttribute($elem, name, defaultValue) {
22
+ const value = parseFloat($elem.getAttribute(name) || "");
23
+ return isNaN(value) ? defaultValue : value;
24
+ }
25
+ /**
26
+ * Returns the amount of cols that the masonry grid should have.
27
+ * @param totalWidth
28
+ * @param cols
29
+ * @param maxColWidth
30
+ */
31
+ function getColCount(totalWidth, cols, maxColWidth) {
32
+ return isNaN(cols)
33
+ ? Math.max(1, Math.ceil(totalWidth / maxColWidth))
34
+ : cols;
35
+ }
36
+ /**
37
+ * Debounces a function.
38
+ * @param cb
39
+ * @param ms
40
+ * @param id
41
+ */
42
+ function debounce(cb, ms, id) {
43
+ const existingTimeout = DEBOUNCE_MAP.get(id);
44
+ if (existingTimeout != null)
45
+ window.clearTimeout(existingTimeout);
46
+ DEBOUNCE_MAP.set(id, window.setTimeout(cb, ms));
47
+ }
48
+ /**
49
+ * Returns the index of the column with the smallest height.
50
+ * @param colHeights
51
+ */
52
+ function findSmallestColIndex(colHeights) {
53
+ let smallestIndex = 0;
54
+ let smallestHeight = Infinity;
55
+ colHeights.forEach((height, i) => {
56
+ if (height < smallestHeight) {
57
+ smallestHeight = height;
58
+ smallestIndex = i;
59
+ }
60
+ });
61
+ return smallestIndex;
62
+ }
63
+
64
+ /**
65
+ * Template for the masonry layout.
66
+ * Max width of each column is computed as the width in percentage of
67
+ * the column minus the total with of the gaps divided between each column.
68
+ */
69
+ const $template = document.createElement("template");
70
+ $template.innerHTML = `
71
+ <style>
72
+ :host {
73
+ display: flex;
74
+ align-items: flex-start;
75
+ justify-content: stretch;
76
+ }
77
+
78
+ .column {
79
+ max-width: calc((100% / var(${COL_COUNT_CSS_VAR_NAME}, 1) - ((var(${GAP_CSS_VAR_NAME}, ${DEFAULT_GAP_PX}px) * (var(${COL_COUNT_CSS_VAR_NAME}, 1) - 1) / var(${COL_COUNT_CSS_VAR_NAME}, 1)))));
80
+ width: 100%;
81
+ flex: 1;
82
+ display: flex;
83
+ flex-direction: column;
84
+ }
85
+
86
+ .column:not(:last-child) {
87
+ margin-right: var(${GAP_CSS_VAR_NAME}, ${DEFAULT_GAP_PX}px);
88
+ }
89
+
90
+ .column ::slotted(*) {
91
+ margin-bottom: var(${GAP_CSS_VAR_NAME}, ${DEFAULT_GAP_PX}px);
92
+ box-sizing: border-box;
93
+ width: 100%;
94
+ }
95
+
96
+ /* Hide the items that has not yet found the correct slot */
97
+ #unset-items {
98
+ opacity: 0;
99
+ position: absolute;
100
+ pointer-events: none;
101
+ }
102
+ </style>
103
+ <div id="unset-items">
104
+ <slot></slot>
105
+ </div>
106
+ `;
107
+ // Use polyfill only in browsers that lack native Shadow DOM.
108
+ window.ShadyCSS && window.ShadyCSS.prepareTemplateStyles($template, "masonry-layout");
109
+ /**
110
+ * Masonry layout web component. It places the slotted elements in the optimal position based
111
+ * on the available vertical space, just like mason fitting stones in a wall.
112
+ * @example <masonry-layout><div class="item"></div><div class="item"></div></masonry-layout>
113
+ * @csspart column - Each column of the masonry layout.
114
+ * @csspart column-index - The specific column at the given index (eg. column-0 would target the first column and so on)
115
+ * @slot - Items that should be distributed in the layout.
116
+ */
117
+ class MasonryLayout extends HTMLElement {
118
+ /**
119
+ * Attach the shadow DOM.
120
+ */
121
+ constructor() {
122
+ super();
123
+ // Unique debounce ID so different masonry layouts on one page won't affect eachother
124
+ this.debounceId = `layout_${Math.random()}`;
125
+ // Resize observer that layouts when necessary
126
+ this.ro = undefined;
127
+ // The current request animation frame callback
128
+ this.currentRequestAnimationFrameCallback = undefined;
129
+ const shadow = this.attachShadow({ mode: "open" });
130
+ shadow.appendChild($template.content.cloneNode(true));
131
+ this.onSlotChange = this.onSlotChange.bind(this);
132
+ this.onResize = this.onResize.bind(this);
133
+ this.layout = this.layout.bind(this);
134
+ this.$unsetElementsSlot = this.shadowRoot.querySelector("#unset-items > slot");
135
+ }
136
+ // The observed attributes.
137
+ // Whenever one of these changes we need to update the layout.
138
+ static get observedAttributes() {
139
+ return ["maxcolwidth", "gap", "cols"];
140
+ }
141
+ /**
142
+ * The maximum width of each column if cols are set to auto.
143
+ * @attr maxcolwidth
144
+ * @param v
145
+ */
146
+ set maxColWidth(v) {
147
+ this.setAttribute("maxcolwidth", v.toString());
148
+ }
149
+ get maxColWidth() {
150
+ return getNumberAttribute(this, "maxcolwidth", DEFAULT_MAX_COL_WIDTH);
151
+ }
152
+ /**
153
+ * The amount of columns.
154
+ * @attr cols
155
+ * @param v
156
+ */
157
+ set cols(v) {
158
+ this.setAttribute("cols", v.toString());
159
+ }
160
+ get cols() {
161
+ return getNumberAttribute(this, "cols", DEFAULT_COLS);
162
+ }
163
+ /**
164
+ * The gap in pixels between the columns.
165
+ * @attr gap
166
+ * @param v
167
+ */
168
+ set gap(v) {
169
+ this.setAttribute("gap", v.toString());
170
+ }
171
+ get gap() {
172
+ return getNumberAttribute(this, "gap", DEFAULT_GAP_PX);
173
+ }
174
+ /**
175
+ * The ms of debounce when the element resizes.
176
+ * @attr debounce
177
+ * @param v
178
+ */
179
+ set debounce(v) {
180
+ this.setAttribute("debounce", v.toString());
181
+ }
182
+ get debounce() {
183
+ return getNumberAttribute(this, "debounce", DEFAULT_DEBOUNCE_MS);
184
+ }
185
+ /**
186
+ * The column elements.
187
+ */
188
+ get $columns() {
189
+ return Array.from(this.shadowRoot.querySelectorAll(`.column`));
190
+ }
191
+ /**
192
+ * Hook up event listeners when added to the DOM.
193
+ */
194
+ connectedCallback() {
195
+ this.$unsetElementsSlot.addEventListener("slotchange", this.onSlotChange);
196
+ // Attach resize observer so we can relayout eachtime the size changes
197
+ if ("ResizeObserver" in window) {
198
+ this.ro = new ResizeObserver(this.onResize);
199
+ this.ro.observe(this);
200
+ }
201
+ else {
202
+ window.addEventListener("resize", this.onResize);
203
+ }
204
+ }
205
+ /**
206
+ * Remove event listeners when removed from the DOM.
207
+ */
208
+ disconnectedCallback() {
209
+ this.$unsetElementsSlot.removeEventListener("slotchange", this.onSlotChange);
210
+ window.removeEventListener("resize", this.onResize);
211
+ if (this.ro != null) {
212
+ this.ro.unobserve(this);
213
+ }
214
+ }
215
+ /**
216
+ * Updates the layout when one of the observed attributes changes.
217
+ */
218
+ attributeChangedCallback(name) {
219
+ switch (name) {
220
+ case "gap":
221
+ this.style.setProperty(GAP_CSS_VAR_NAME, `${this.gap}px`);
222
+ break;
223
+ }
224
+ // Recalculate the layout
225
+ this.scheduleLayout();
226
+ }
227
+ /**
228
+ *
229
+ */
230
+ onSlotChange() {
231
+ // Grab unset elements
232
+ const $unsetElements = (this.$unsetElementsSlot.assignedNodes() || [])
233
+ .filter(node => node.nodeType === ELEMENT_NODE_TYPE);
234
+ // If there are more items not yet set layout straight awy to avoid the item being delayed in its render.
235
+ if ($unsetElements.length > 0) {
236
+ this.layout();
237
+ }
238
+ }
239
+ /**
240
+ * Each time the element resizes we need to schedule a layout
241
+ * if the amount available columns has has changed.
242
+ * @param entries
243
+ */
244
+ onResize(entries) {
245
+ // Grab the width of the element. If it isn't provided by the resize observer entry
246
+ // we compute it ourselves by looking at the offset width of the element.
247
+ const { width } = entries != null && Array.isArray(entries) && entries.length > 0
248
+ ? entries[0].contentRect : { width: this.offsetWidth };
249
+ // Get the amount of columns we should have
250
+ const colCount = getColCount(width, this.cols, this.maxColWidth);
251
+ // Compare the amount of columns we should have to the current amount of columns.
252
+ // Schedule a layout if they are no longer the same.
253
+ if (colCount !== this.$columns.length) {
254
+ this.scheduleLayout();
255
+ }
256
+ }
257
+ /**
258
+ * Render X amount of columns.
259
+ * @param colCount
260
+ */
261
+ renderCols(colCount) {
262
+ // Get the current columns
263
+ const $columns = this.$columns;
264
+ // If the amount of columns is correct we don't have to add new columns.
265
+ if ($columns.length === colCount) {
266
+ return;
267
+ }
268
+ // Remove all of the current columns
269
+ for (const $column of $columns) {
270
+ $column.parentNode && $column.parentNode.removeChild($column);
271
+ }
272
+ // Add some new columns
273
+ for (let i = 0; i < colCount; i++) {
274
+ // Create a column element
275
+ const $column = document.createElement(`div`);
276
+ $column.classList.add(`column`);
277
+ $column.setAttribute(`part`, `column column-${i}`);
278
+ // Add a slot with the name set to the index of the column
279
+ const $slot = document.createElement(`slot`);
280
+ $slot.setAttribute(`name`, i.toString());
281
+ // Append the slot to the column an the column to the shadow root.
282
+ $column.appendChild($slot);
283
+ this.shadowRoot.appendChild($column);
284
+ }
285
+ // Set the column count so we can compute the correct width of the columns
286
+ this.style.setProperty(COL_COUNT_CSS_VAR_NAME, colCount.toString());
287
+ // Commit the changes for ShadyCSS
288
+ window.ShadyCSS && window.ShadyCSS.styleElement(this);
289
+ }
290
+ /**
291
+ * Schedules a layout.
292
+ * @param ms
293
+ */
294
+ scheduleLayout(ms = this.debounce) {
295
+ debounce(this.layout, ms, this.debounceId);
296
+ }
297
+ /**
298
+ * Layouts the elements.
299
+ */
300
+ layout() {
301
+ // Cancel the current animation frame callback
302
+ if (this.currentRequestAnimationFrameCallback != null) {
303
+ window.cancelAnimationFrame(this.currentRequestAnimationFrameCallback);
304
+ }
305
+ // Layout in the next animationframe
306
+ this.currentRequestAnimationFrameCallback = requestAnimationFrame(() => {
307
+ // console.time("layout");
308
+ // Compute relevant values we are going to use for layouting the elements.
309
+ const gap = this.gap;
310
+ const $elements = Array.from(this.children)
311
+ .filter(node => node.nodeType === ELEMENT_NODE_TYPE);
312
+ const colCount = getColCount(this.offsetWidth, this.cols, this.maxColWidth);
313
+ // Have an array that keeps track of the highest col height.
314
+ const colHeights = Array(colCount).fill(0);
315
+ // Instead of interleaving reads and writes we create an array for all writes so we can batch them at once.
316
+ const writes = [];
317
+ // Go through all elements and figure out what column (aka slot) they should be put in.
318
+ // We only do reads in this for loop and postpone the writes
319
+ for (const $elem of $elements) {
320
+ // Read the height of the element
321
+ const height = $elem.getBoundingClientRect().height;
322
+ // Find the currently smallest column
323
+ let smallestColIndex = findSmallestColIndex(colHeights);
324
+ // Add the height of the item and the gap to the column heights.
325
+ // It is very important we add the gap since the more elements we have,
326
+ // the bigger the role the margins play when computing the actual height of the columns.
327
+ colHeights[smallestColIndex] += height + gap;
328
+ // Set the slot on the element to get the element to the correct column.
329
+ // Only do it if the slot has actually changed.
330
+ const newSlot = smallestColIndex.toString();
331
+ if ($elem.slot !== newSlot) {
332
+ writes.push(() => ($elem.slot = newSlot));
333
+ }
334
+ }
335
+ // Batch all the writes at once
336
+ for (const write of writes) {
337
+ write();
338
+ }
339
+ // Render the columns
340
+ this.renderCols(colCount);
341
+ // Commit the changes for ShadyCSS
342
+ window.ShadyCSS && window.ShadyCSS.styleElement(this);
343
+ // console.timeEnd("layout");
344
+ });
345
+ }
346
+ }
347
+ customElements.define("masonry-layout", MasonryLayout);
348
+
349
+ function CardFeedView(props, children) {
350
+ const style = {
351
+ Container: {
352
+ columnGap: props.gap + "px",
353
+ columnWidth: props.width + "px",
354
+ "& > div": {
355
+ // display: "inline-block!important",
356
+ marginBottom: "24px",
357
+ },
358
+ },
359
+ };
360
+ jssPresetDefault_esm.jss.setup(jssPresetDefault_esm.create());
361
+ const sheet = jssPresetDefault_esm.jss.createStyleSheet(style);
362
+ const styleString = sheet.toString();
363
+ console.log(props);
364
+ return (index.h("div", null,
365
+ index.h("style", { type: "text/css" }, styleString),
366
+ index.h("div", { class: sheet.classes.Container }, children)));
367
+ }
368
+
369
+ exports.CardFeedView = CardFeedView;
@@ -6,7 +6,7 @@ const index = require('./index-b0129cd6.js');
6
6
  const _extends = require('./extends-0302d27d.js');
7
7
  require('./jss-preset-default.esm-6304d24f.js');
8
8
  const utils = require('./utils-95e5317c.js');
9
- const sqmCardFeedView = require('./sqm-card-feed-view-ec75fafc.js');
9
+ const sqmCardFeedView = require('./sqm-card-feed-view-17fd3f0a.js');
10
10
 
11
11
  const CardFeed = class {
12
12
  constructor(hostRef) {
@@ -17,11 +17,10 @@ const CardFeed = class {
17
17
  */
18
18
  this.width = 347;
19
19
  /**
20
- * @uiName Horizontal Gap
21
- * @uiType string
22
- * @uiEnum ["none", "xxx-small", "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "xxx-large", "xxxx-large"]
20
+ * @uiName Column Gap
21
+ * @uiType number
23
22
  */
24
- this.gap = "xx-large";
23
+ this.gap = 24;
25
24
  _extends.h$1(this);
26
25
  }
27
26
  disconnectedCallback() { }
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const index = require('./index-b0129cd6.js');
4
- const global = require('./global-89f66e76.js');
4
+ const global = require('./global-5ca2a131.js');
5
5
  const index_module = require('./index.module-c0bf9df0.js');
6
6
 
7
7
  var docCache = new Map();
@@ -4,11 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const _extends = require('./extends-0302d27d.js');
7
- const global = require('./global-89f66e76.js');
7
+ const global = require('./global-5ca2a131.js');
8
8
  require('./use-callback-fadb2643.js');
9
9
  const index_module = require('./index.module-c0bf9df0.js');
10
10
  const cjs = require('./cjs-1066ec21.js');
11
- const sqmLeaderboardRankView = require('./sqm-leaderboard-rank-view-510f16d3.js');
11
+ const sqmLeaderboardRankView = require('./sqm-leaderboard-rank-view-dff9de2e.js');
12
12
 
13
13
  const GET_RANK = sqmLeaderboardRankView.gql `
14
14
  query ($type: String!, $filter: UserLeaderboardFilterInput) {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const index = require('./index-b0129cd6.js');
4
- const global = require('./global-89f66e76.js');
4
+ const global = require('./global-5ca2a131.js');
5
5
  const jssPresetDefault_esm = require('./jss-preset-default.esm-6304d24f.js');
6
6
  const mixins = require('./mixins-7b7c59fe.js');
7
7
  const sqmTextSpanView = require('./sqm-text-span-view-b5ae787b.js');
@@ -4,14 +4,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const _extends = require('./extends-0302d27d.js');
7
- require('./global-89f66e76.js');
7
+ require('./global-5ca2a131.js');
8
8
  require('./use-callback-fadb2643.js');
9
9
  const index_module = require('./index.module-c0bf9df0.js');
10
10
  require('./jss-preset-default.esm-6304d24f.js');
11
11
  const cjs = require('./cjs-1066ec21.js');
12
12
  require('./mixins-7b7c59fe.js');
13
13
  require('./sqm-text-span-view-b5ae787b.js');
14
- const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-5093ac20.js');
14
+ const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-f0cbd78b.js');
15
15
 
16
16
  function usePortalEmailVerification(props) {
17
17
  var _a, _b, _c, _d, _e;
@@ -27,7 +27,8 @@ function usePortalEmailVerification(props) {
27
27
  return;
28
28
  setError("");
29
29
  const urlParams = nextPage ? { nextPage } : null;
30
- const variables = { email, urlParams };
30
+ const redirectPath = props.redirectPath;
31
+ const variables = { email, urlParams, redirectPath };
31
32
  await request(variables);
32
33
  };
33
34
  _extends.useEffect(() => {
@@ -63,6 +64,12 @@ const PortalEmailVerification = class {
63
64
  constructor(hostRef) {
64
65
  index.registerInstance(this, hostRef);
65
66
  this.ignored = true;
67
+ /**
68
+ * The page that users are redirected to from the verification email.
69
+ *
70
+ * @uiName Email redirection base path
71
+ */
72
+ this.redirectPath = "/verifyEmail";
66
73
  /**
67
74
  * @uiName Email verification header text
68
75
  */
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const index = require('./index-b0129cd6.js');
4
- const global = require('./global-89f66e76.js');
4
+ const global = require('./global-5ca2a131.js');
5
5
  const jssPresetDefault_esm = require('./jss-preset-default.esm-6304d24f.js');
6
6
 
7
7
  function PoweredByImg({ color = "#A6A6A6", width = 190, height = 29, }) {
@@ -4,12 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const _extends = require('./extends-0302d27d.js');
7
- require('./global-89f66e76.js');
7
+ require('./global-5ca2a131.js');
8
8
  require('./use-callback-fadb2643.js');
9
9
  require('./index.module-c0bf9df0.js');
10
10
  require('./jss-preset-default.esm-6304d24f.js');
11
11
  const utils = require('./utils-95e5317c.js');
12
- const sqmPortalFooterView = require('./sqm-portal-footer-view-03408484.js');
12
+ const sqmPortalFooterView = require('./sqm-portal-footer-view-c714590c.js');
13
13
 
14
14
  const PortalFooter = class {
15
15
  constructor(hostRef) {
@@ -13,7 +13,7 @@ require('./mixins-7b7c59fe.js');
13
13
  require('./sqm-text-span-view-b5ae787b.js');
14
14
  const sqmPortalForgotPasswordView = require('./sqm-portal-forgot-password-view-1704d285.js');
15
15
 
16
- function usePortalForgotPassword() {
16
+ function usePortalForgotPassword(props) {
17
17
  var _a, _b, _c, _d;
18
18
  const [success, setSuccess] = _extends.useState(false);
19
19
  const [error, setError] = _extends.useState("");
@@ -27,7 +27,8 @@ function usePortalForgotPassword() {
27
27
  jsonpointer.jsonpointer.set(formData, key, value);
28
28
  });
29
29
  const urlParams = nextPage ? { nextPage } : null;
30
- const variables = { email: formData.email, urlParams };
30
+ const redirectPath = props.redirectPath;
31
+ const variables = { email: formData.email, urlParams, redirectPath };
31
32
  await request(variables);
32
33
  };
33
34
  _extends.useEffect(() => {
@@ -46,6 +47,7 @@ function usePortalForgotPassword() {
46
47
  loading,
47
48
  error: ((_d = (_c = (_b = errors === null || errors === void 0 ? void 0 : errors.response) === null || _b === void 0 ? void 0 : _b.errors) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.message) || error,
48
49
  success,
50
+ loginPath: props.loginPath,
49
51
  },
50
52
  callbacks: {
51
53
  submit,
@@ -57,6 +59,12 @@ const PortalForgotPassword = class {
57
59
  constructor(hostRef) {
58
60
  index.registerInstance(this, hostRef);
59
61
  this.ignored = true;
62
+ /**
63
+ * The page that users are redirected to from the password reset email.
64
+ *
65
+ * @uiName Email redirection base path
66
+ */
67
+ this.redirectPath = "/resetPassword";
60
68
  /**
61
69
  * @uiName Email label
62
70
  */
@@ -65,15 +73,19 @@ const PortalForgotPassword = class {
65
73
  * @uiName Password reset button text
66
74
  */
67
75
  this.submitLabel = "Request Password Reset";
76
+ /**
77
+ * @uiName Routing path to login page
78
+ */
79
+ this.loginPath = "/login";
68
80
  _extends.h$1(this);
69
81
  }
70
82
  disconnectedCallback() { }
71
83
  render() {
72
84
  const { states, callbacks } = index_module.j()
73
85
  ? usePortalForgotPasswordDemo(this)
74
- : usePortalForgotPassword();
86
+ : usePortalForgotPassword(this);
75
87
  const content = {
76
- secondaryButton: (index.h("slot", { name: "secondaryButton" }, index.h("sl-button", { type: "text", disabled: states.loading, onClick: () => index_module.mn.push("/login") }, "Sign In"))),
88
+ secondaryButton: (index.h("slot", { name: "secondaryButton" }, index.h("sl-button", { type: "text", disabled: states.loading, onClick: () => index_module.mn.push(states.loginPath) }, "Sign In"))),
77
89
  messageSlot: (index.h("slot", { name: "messageSlot" }, "Enter your email below to receive a password reset link.")),
78
90
  emailLabel: this.emailLabel,
79
91
  submitLabel: this.submitLabel,
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const index = require('./index-b0129cd6.js');
4
- const global = require('./global-89f66e76.js');
4
+ const global = require('./global-5ca2a131.js');
5
5
  const jssPresetDefault_esm = require('./jss-preset-default.esm-6304d24f.js');
6
6
  const sqmTextSpanView = require('./sqm-text-span-view-b5ae787b.js');
7
7
 
@@ -14,12 +14,13 @@ function PortalContainerView(props, children) {
14
14
  : "100%",
15
15
  "grid-gap": `var(--sl-spacing-${props.gap})`,
16
16
  padding: props.padding === "none" ? "0" : `var(--sl-spacing-${props.padding})`,
17
+ maxWidth: props.maxWidth ? props.maxWidth : "",
17
18
  },
18
19
  };
19
20
  const vanillaStyle = `
20
21
  :host{
21
22
  width: 100%;
22
- display: "block";
23
+ display: block;
23
24
  }`;
24
25
  jssPresetDefault_esm.jss.setup(jssPresetDefault_esm.create());
25
26
  const sheet = jssPresetDefault_esm.jss.createStyleSheet(style);
@@ -4,13 +4,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const _extends = require('./extends-0302d27d.js');
7
- require('./global-89f66e76.js');
7
+ require('./global-5ca2a131.js');
8
8
  require('./use-callback-fadb2643.js');
9
9
  const index_module = require('./index.module-c0bf9df0.js');
10
10
  require('./jss-preset-default.esm-6304d24f.js');
11
11
  const utils = require('./utils-95e5317c.js');
12
12
  const cjs = require('./cjs-1066ec21.js');
13
- const sqmPortalProfileView = require('./sqm-portal-profile-view-1a6327e4.js');
13
+ const sqmPortalProfileView = require('./sqm-portal-profile-view-f0233000.js');
14
14
  require('./sqm-text-span-view-b5ae787b.js');
15
15
 
16
16
  const GET_USER = index_module.dist.gql `
@@ -45,7 +45,7 @@ function usePortalResetPassword(props) {
45
45
  };
46
46
  const failed = () => {
47
47
  index_module.mn.push({
48
- pathname: "/",
48
+ pathname: props.failedPage,
49
49
  search: urlParams.toString() && "?" + urlParams.toString(),
50
50
  });
51
51
  };
@@ -93,9 +93,17 @@ const PortalResetPassword = class {
93
93
  index.registerInstance(this, hostRef);
94
94
  this.ignored = true;
95
95
  /**
96
+ * The page that users are redirected to when the password reset succeeds.
97
+ *
96
98
  * @uiName Next page path
97
99
  */
98
100
  this.nextPage = "/";
101
+ /**
102
+ * The page that users are redirected to if the reset fails due to outdated password reset attempt.
103
+ *
104
+ * @uiName Failed page redirection path
105
+ */
106
+ this.failedPage = "/";
99
107
  /**
100
108
  * @uiName Show confirm password
101
109
  */
@@ -12,7 +12,7 @@ require('./mixins-7b7c59fe.js');
12
12
  require('./sqm-text-span-view-b5ae787b.js');
13
13
  const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-b595e302.js');
14
14
 
15
- function usePortalVerifyEmail({ nextPage }) {
15
+ function usePortalVerifyEmail({ nextPage, failedPage }) {
16
16
  var _a, _b, _c, _d, _e;
17
17
  const [verified, setVerified] = _extends.useState(false);
18
18
  const [disableContinue, setDisableContinue] = _extends.useState(true);
@@ -25,7 +25,7 @@ function usePortalVerifyEmail({ nextPage }) {
25
25
  urlParams.delete("oobCode");
26
26
  const failed = () => {
27
27
  return index_module.mn.push({
28
- pathname: "/",
28
+ pathname: failedPage,
29
29
  search: urlParams.toString() && "?" + urlParams.toString(),
30
30
  });
31
31
  };
@@ -96,9 +96,17 @@ const PortalVerifyEmail = class {
96
96
  index.registerInstance(this, hostRef);
97
97
  this.ignored = true;
98
98
  /**
99
+ * The page that users are redirected to when the verification succeeds.
100
+ *
99
101
  * @uiName Next page path
100
102
  */
101
103
  this.nextPage = "/";
104
+ /**
105
+ * The page that users are redirected to if verification fails due to outdated verification attempt.
106
+ *
107
+ * @uiName Failed page redirection path
108
+ */
109
+ this.failedPage = "/";
102
110
  _extends.h$1(this);
103
111
  }
104
112
  disconnectedCallback() { }