@saasquatch/mint-components 1.5.0-0 → 1.5.0-101

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 (794) hide show
  1. package/CHANGELOG.md +156 -24
  2. package/dist/cjs/GenericTableView-28642daf.js +115 -0
  3. package/dist/cjs/{jss-preset-default.esm-6304d24f.js → JSS-c65a40f1.js} +5 -3
  4. package/dist/cjs/ShadowViewAddon-e23d7213.js +2630 -0
  5. package/dist/cjs/extends-08099afd.js +21 -0
  6. package/dist/cjs/{global-6223fe8f.js → global-4c495d76.js} +80 -140
  7. package/dist/cjs/{index.module-7dd4b981.js → index.module-54724339.js} +58 -57
  8. package/dist/cjs/loader.cjs.js +6 -5
  9. package/dist/cjs/luxon-59ca7d19.js +8348 -0
  10. package/dist/cjs/mint-components.cjs.js +6 -5
  11. package/dist/cjs/{re-render-6111d4bd.js → re-render-2f8d0f37.js} +5 -5
  12. package/dist/cjs/{sqm-asset-card-view-07f86880.js → sqm-asset-card-view-d9ac6a95.js} +2 -3
  13. package/dist/cjs/sqm-asset-card.cjs.entry.js +8 -7
  14. package/dist/cjs/sqm-big-stat-view-e5dc0877.js +40 -0
  15. package/dist/cjs/sqm-big-stat.cjs.entry.js +10 -8
  16. package/dist/cjs/sqm-brand_30.cjs.entry.js +7321 -0
  17. package/dist/cjs/sqm-form-message.cjs.entry.js +31 -0
  18. package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +10 -9
  19. package/dist/cjs/{sqm-hero-view-bb3d00a1.js → sqm-hero-view-a13795c0.js} +6 -7
  20. package/dist/cjs/sqm-hero.cjs.entry.js +7 -6
  21. package/dist/cjs/sqm-image_4.cjs.entry.js +196 -0
  22. package/dist/cjs/sqm-leaderboard-rank-view-35015d30.js +10 -0
  23. package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +12 -14
  24. package/dist/cjs/{sqm-name-fields-view-24614ac7.js → sqm-name-fields-view-c95e4768.js} +2 -3
  25. package/dist/cjs/sqm-name-fields.cjs.entry.js +9 -8
  26. package/dist/cjs/{sqm-navigation-sidebar-item-view-6c7f78e6.js → sqm-navigation-sidebar-item-view-da648fbc.js} +7 -6
  27. package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +10 -9
  28. package/dist/cjs/{sqm-navigation-sidebar-view-d06e1885.js → sqm-navigation-sidebar-view-36632c96.js} +2 -3
  29. package/dist/cjs/sqm-navigation-sidebar.cjs.entry.js +5 -4
  30. package/dist/cjs/sqm-password-field.cjs.entry.js +581 -0
  31. package/dist/cjs/sqm-popup-container.cjs.entry.js +6 -5
  32. package/dist/cjs/{sqm-portal-container-view-d144735a.js → sqm-portal-container-view-fdfb3656.js} +9 -5
  33. package/dist/cjs/{sqm-portal-email-verification-view-08d1848c.js → sqm-portal-email-verification-view-1552442a.js} +5 -6
  34. package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +24 -16
  35. package/dist/cjs/{sqm-portal-footer-view-69c73802.js → sqm-portal-footer-view-15ce261b.js} +3 -4
  36. package/dist/cjs/sqm-portal-footer.cjs.entry.js +9 -8
  37. package/dist/cjs/{sqm-portal-forgot-password-view-1704d285.js → sqm-portal-forgot-password-view-10c0b54f.js} +3 -4
  38. package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +30 -17
  39. package/dist/cjs/sqm-portal-logout.cjs.entry.js +8 -7
  40. package/dist/cjs/{sqm-portal-profile-view-14b41436.js → sqm-portal-profile-view-659635e9.js} +5 -6
  41. package/dist/cjs/sqm-portal-profile.cjs.entry.js +21 -20
  42. package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +11 -10
  43. package/dist/cjs/{sqm-portal-reset-password-view-4d78fd6d.js → sqm-portal-reset-password-view-1fdc957e.js} +3 -4
  44. package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +27 -18
  45. package/dist/cjs/{sqm-portal-section-view-3b008930.js → sqm-portal-section-view-186a5f7e.js} +4 -6
  46. package/dist/cjs/{sqm-portal-verify-email-view-b595e302.js → sqm-portal-verify-email-view-4c78e231.js} +3 -4
  47. package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +30 -21
  48. package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1006 -0
  49. package/dist/cjs/sqm-refresh-button.cjs.entry.js +54 -0
  50. package/dist/cjs/sqm-rewards-table-customer-note-cell.cjs.entry.js +26 -0
  51. package/dist/cjs/sqm-rewards-table-customer-note-column.cjs.entry.js +38 -0
  52. package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +1147 -0
  53. package/dist/cjs/{sqm-stat-container-view-ee7b00ff.js → sqm-stat-container-view-5b2db929.js} +3 -4
  54. package/dist/cjs/sqm-stat-container.cjs.entry.js +6 -5
  55. package/dist/cjs/sqm-stencilbook.cjs.entry.js +14590 -0
  56. package/dist/cjs/sqm-tab.cjs.entry.js +20 -0
  57. package/dist/cjs/sqm-tabs.cjs.entry.js +89 -0
  58. package/dist/cjs/{sqm-text-span-view-b5ae787b.js → sqm-text-span-view-f101dedf.js} +2 -3
  59. package/dist/cjs/sqm-text-span.cjs.entry.js +5 -4
  60. package/dist/cjs/{extends-0302d27d.js → stencil-hooks.module-87a1f4f7.js} +0 -19
  61. package/dist/cjs/use-callback-e754042f.js +7 -0
  62. package/dist/cjs/useChildElements-a68699b4.js +21 -0
  63. package/dist/cjs/{useDemoBigStat-2786227e.js → useDemoBigStat-426e3319.js} +23 -49
  64. package/dist/cjs/useReferralTable-273bb515.js +355 -0
  65. package/dist/cjs/{utils-95e5317c.js → utils-01dbfd4a.js} +9 -0
  66. package/dist/collection/collection-manifest.json +58 -6
  67. package/dist/collection/components/sqm-asset-card/sqm-asset-card-view.js +2 -4
  68. package/dist/collection/components/sqm-big-stat/BigStat.stories.js +12 -1
  69. package/dist/collection/components/sqm-big-stat/sqm-big-stat-view.js +2 -4
  70. package/dist/collection/components/sqm-big-stat/sqm-big-stat.js +21 -1
  71. package/dist/collection/components/sqm-big-stat/useBigStat.js +14 -4
  72. package/dist/collection/components/sqm-big-stat/useDemoBigStat.js +2 -0
  73. package/dist/collection/components/sqm-brand/SqmBrand.stories.js +112 -0
  74. package/dist/collection/components/sqm-brand/sqm-brand.js +127 -0
  75. package/dist/collection/components/sqm-card-feed/CardFeed.stories.js +232 -0
  76. package/dist/collection/components/sqm-card-feed/sqm-card-feed-view.js +27 -0
  77. package/dist/collection/components/sqm-card-feed/sqm-card-feed.js +79 -0
  78. package/dist/collection/components/sqm-divided-layout/sqm-divided-layout-view.js +2 -4
  79. package/dist/collection/components/sqm-empty/sqm-empty-view.js +10 -0
  80. package/dist/collection/components/sqm-empty/sqm-empty.js +78 -0
  81. package/dist/collection/components/sqm-hero/sqm-hero-view.js +2 -4
  82. package/dist/collection/components/sqm-hero-image/HeroImage.stories.js +56 -0
  83. package/dist/collection/components/sqm-hero-image/sqm-hero-image-view.js +132 -0
  84. package/dist/collection/components/sqm-hero-image/sqm-hero-image.js +453 -0
  85. package/dist/collection/components/sqm-image/Image.stories.js +26 -0
  86. package/dist/collection/components/sqm-image/sqm-image-view.js +32 -0
  87. package/dist/collection/components/sqm-image/sqm-image.js +116 -0
  88. package/dist/collection/components/sqm-leaderboard/Leaderboard.stories.js +521 -9
  89. package/dist/collection/components/sqm-leaderboard/UseLeaderboard.stories.js +73 -11
  90. package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +96 -9
  91. package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.js +121 -23
  92. package/dist/collection/components/sqm-leaderboard/useLeaderboard.js +31 -3
  93. package/dist/collection/components/sqm-leaderboard-rank/sqm-leaderboard-rank.js +1 -4
  94. package/dist/collection/components/sqm-leaderboard-rank/useLeaderboardRank.js +1 -1
  95. package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +2 -4
  96. package/dist/collection/components/sqm-navigation-sidebar/sqm-navigation-sidebar-view.js +2 -4
  97. package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item-view.js +5 -5
  98. package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item.js +1 -1
  99. package/dist/collection/components/sqm-password-field/passwordValidation.js +2 -4
  100. package/dist/collection/components/sqm-password-field/sqm-password-field-view.js +2 -4
  101. package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password-view.js +2 -4
  102. package/dist/collection/components/sqm-portal-container/PortalContainer.stories.js +47 -0
  103. package/dist/collection/components/sqm-portal-container/sqm-portal-container-view.js +9 -6
  104. package/dist/collection/components/sqm-portal-container/sqm-portal-container.js +78 -0
  105. package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification-view.js +4 -6
  106. package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification.js +27 -0
  107. package/dist/collection/components/sqm-portal-email-verification/usePortalEmailVerification.js +2 -1
  108. package/dist/collection/components/sqm-portal-footer/sqm-portal-footer-view.js +2 -4
  109. package/dist/collection/components/sqm-portal-forgot-password/PortalForgotPassword.stories.js +4 -0
  110. package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.js +2 -4
  111. package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password.js +55 -3
  112. package/dist/collection/components/sqm-portal-forgot-password/usePortalForgotPassword.js +4 -2
  113. package/dist/collection/components/sqm-portal-frame/sqm-portal-frame-view.js +2 -4
  114. package/dist/collection/components/sqm-portal-login/PortalLogin.stories.js +6 -0
  115. package/dist/collection/components/sqm-portal-login/sqm-portal-login-view.js +3 -5
  116. package/dist/collection/components/sqm-portal-login/sqm-portal-login.js +59 -4
  117. package/dist/collection/components/sqm-portal-login/usePortalLogin.js +4 -2
  118. package/dist/collection/components/sqm-portal-profile/PortalProfile.stories.js +1 -7
  119. package/dist/collection/components/sqm-portal-profile/sqm-portal-profile-view.js +2 -4
  120. package/dist/collection/components/sqm-portal-register/PortalRegister.stories.js +12 -0
  121. package/dist/collection/components/sqm-portal-register/sqm-portal-register-view.js +3 -4
  122. package/dist/collection/components/sqm-portal-register/sqm-portal-register.js +56 -2
  123. package/dist/collection/components/sqm-portal-register/usePortalRegister.js +3 -0
  124. package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password-view.js +3 -5
  125. package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password.js +30 -1
  126. package/dist/collection/components/sqm-portal-reset-password/usePortalResetPassword.js +1 -1
  127. package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email-view.js +2 -4
  128. package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email.js +30 -1
  129. package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +2 -2
  130. package/dist/collection/components/sqm-program-explainer/ProgramExplainer.stories.js +41 -0
  131. package/dist/collection/components/sqm-program-explainer/sqm-program-explainer-view.js +44 -0
  132. package/dist/collection/components/sqm-program-explainer/sqm-program-explainer.js +91 -0
  133. package/dist/collection/components/sqm-program-explainer-step/ProgramExplainerStep.stories.js +14 -0
  134. package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +71 -0
  135. package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step.js +146 -0
  136. package/dist/collection/components/sqm-referral-card/ReferralCard.stories.js +81 -0
  137. package/dist/collection/components/sqm-referral-card/sqm-referral-card-view.js +54 -0
  138. package/dist/collection/components/sqm-referral-card/sqm-referral-card.js +62 -0
  139. package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe-view.js +2 -4
  140. package/dist/collection/components/sqm-referral-table/ReferralTable.stories.js +135 -70
  141. package/dist/collection/components/sqm-referral-table/ReferralTableCell.stories.js +11 -1
  142. package/dist/collection/components/sqm-referral-table/ReferralTableRewardsCell.stories.js +35 -25
  143. package/dist/collection/components/sqm-referral-table/UseReferralTable.stories.js +149 -0
  144. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-date-cell.js +23 -5
  145. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +197 -26
  146. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-status-cell.js +14 -1
  147. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-user-cell.js +2 -3
  148. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-date-column.js +35 -5
  149. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.js +182 -3
  150. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-status-column.js +29 -0
  151. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-user-column.js +45 -4
  152. package/dist/collection/components/sqm-referral-table/mockReferralData.js +437 -0
  153. package/dist/collection/components/sqm-referral-table/sqm-referral-table-view.js +3 -7
  154. package/dist/collection/components/sqm-referral-table/sqm-referral-table.js +148 -25
  155. package/dist/collection/components/sqm-referral-table/useReferralTable.js +50 -22
  156. package/dist/collection/components/sqm-refresh-button/RefreshButtonView.js +8 -0
  157. package/dist/collection/components/sqm-refresh-button/sqm-refresh-button.js +66 -0
  158. package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeList.stories.js +16 -7
  159. package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeListData.js +199 -43
  160. package/dist/collection/components/sqm-reward-exchange-list/SVGs.js +3 -0
  161. package/dist/collection/components/sqm-reward-exchange-list/assets/Reward-image.png +0 -0
  162. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +399 -241
  163. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list.js +595 -5
  164. package/dist/collection/components/sqm-reward-exchange-list/useRewardExchangeList.js +47 -16
  165. package/dist/collection/components/sqm-rewards-table/RewardsTable.stories.js +122 -0
  166. package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +249 -0
  167. package/dist/collection/components/sqm-rewards-table/UseRewardsTable.stories.js +98 -2
  168. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-customer-note-cell.js +58 -0
  169. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-date-cell.js +62 -0
  170. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-reward-cell.js +246 -0
  171. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.js +193 -0
  172. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +237 -0
  173. package/dist/collection/components/sqm-rewards-table/columns/RewardTableColumn.js +1 -0
  174. package/dist/collection/components/sqm-rewards-table/{sqm-rewards-table-column.js → columns/sqm-customer-note-column.js} +19 -41
  175. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.js +134 -0
  176. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.js +169 -0
  177. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.js +225 -0
  178. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.js +145 -0
  179. package/dist/collection/components/sqm-rewards-table/mockRewardData.js +326 -0
  180. package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +122 -24
  181. package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +59 -22
  182. package/dist/collection/components/sqm-scroll/Scroll.stories.js +50 -0
  183. package/dist/collection/components/sqm-scroll/sqm-scroll.js +111 -0
  184. package/dist/collection/components/sqm-scroll/useScroll.js +18 -0
  185. package/dist/collection/components/sqm-share-button/ShareButton.stories.js +63 -6
  186. package/dist/collection/components/sqm-share-button/sqm-share-button-view.js +67 -11
  187. package/dist/collection/components/sqm-share-button/sqm-share-button.js +71 -13
  188. package/dist/collection/components/sqm-share-button/useShareButton.js +1 -1
  189. package/dist/collection/components/sqm-share-code/ShareCode.stories.js +17 -0
  190. package/dist/collection/components/sqm-share-code/sqm-share-code.js +1 -1
  191. package/dist/collection/components/sqm-share-code/useShareCode.js +20 -1
  192. package/dist/collection/components/sqm-share-link/ShareLink.stories.js +4 -0
  193. package/dist/collection/components/sqm-share-link/sqm-share-link-view.js +2 -4
  194. package/dist/collection/components/sqm-share-link/useShareLink.js +20 -1
  195. package/dist/collection/components/sqm-stat-container/sqm-stat-container-view.js +3 -5
  196. package/dist/collection/components/sqm-stencilbook/AutoColor.js +47 -24
  197. package/dist/collection/components/sqm-stencilbook/Resizer.js +1 -0
  198. package/dist/collection/components/sqm-stencilbook/Themes.js +7 -1
  199. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +32 -0
  200. package/dist/collection/components/sqm-tab/sqm-tab-view.js +4 -0
  201. package/dist/collection/components/sqm-tab/sqm-tab.js +28 -0
  202. package/dist/collection/{tables → components/sqm-table-cell}/sqm-table-cell.js +0 -0
  203. package/dist/collection/{tables → components/sqm-table-row}/sqm-table-row.js +0 -0
  204. package/dist/collection/components/sqm-tabs/Tabs.stories.js +150 -0
  205. package/dist/collection/components/sqm-tabs/sqm-tabs-view.js +27 -0
  206. package/dist/collection/components/sqm-tabs/sqm-tabs.js +50 -0
  207. package/dist/collection/components/sqm-tabs/useTabs.js +39 -0
  208. package/dist/collection/components/sqm-task-card/DetailsView.js +53 -0
  209. package/dist/collection/components/sqm-task-card/TaskCard.stories.js +183 -170
  210. package/dist/collection/components/sqm-task-card/UseTaskCard.stories.js +28 -2
  211. package/dist/collection/components/sqm-task-card/progress-bar/SVGs.js +1 -1
  212. package/dist/collection/components/sqm-task-card/progress-bar/progress-bar-view.js +350 -283
  213. package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +246 -202
  214. package/dist/collection/components/sqm-task-card/sqm-task-card.js +232 -31
  215. package/dist/collection/components/sqm-task-card/useTaskCard.js +43 -0
  216. package/dist/collection/components/sqm-text/sqm-text.js +30 -29
  217. package/dist/collection/components/sqm-text-span/sqm-text-span-view.js +2 -4
  218. package/dist/collection/components/sqm-timeline/SVGs.js +10 -0
  219. package/dist/collection/components/sqm-timeline/Timeline.stories.js +70 -0
  220. package/dist/collection/components/sqm-timeline/sqm-timeline-entry.js +203 -0
  221. package/dist/collection/components/sqm-timeline/sqm-timeline.js +118 -0
  222. package/dist/collection/components/sqm-titled-section/TitledSection.stories.js +237 -0
  223. package/dist/collection/components/sqm-titled-section/sqm-portal-section-view.js +4 -7
  224. package/dist/collection/components/sqm-titled-section/sqm-titled-section.js +39 -3
  225. package/dist/collection/components/sqm-user-name/sqm-user-name.js +1 -1
  226. package/dist/collection/components/sqm-user-name/useUserName.js +1 -1
  227. package/dist/collection/fonts/GoogleFonts.js +12 -0
  228. package/dist/collection/global/global.js +1 -1
  229. package/dist/collection/global/styles.js +14 -72
  230. package/dist/collection/global/styles.ts +14 -72
  231. package/dist/collection/stories/NewPortal.stories.js +17 -19
  232. package/dist/collection/styling/JSS.js +9 -0
  233. package/dist/collection/tables/GenericTableView.js +96 -37
  234. package/dist/collection/tables/TableSlots.js +9 -1
  235. package/dist/collection/utils/RequiredPropsError.js +2 -4
  236. package/dist/collection/utils/utils.js +8 -0
  237. package/dist/esm/GenericTableView-6e103d56.js +113 -0
  238. package/dist/esm/{jss-preset-default.esm-71fae192.js → JSS-96eeab98.js} +5 -2
  239. package/dist/esm/ShadowViewAddon-72b97747.js +2594 -0
  240. package/dist/esm/extends-c31f1eff.js +19 -0
  241. package/dist/esm/{global-90da933f.js → global-a8e9f822.js} +18 -76
  242. package/dist/esm/{index.module-90d2c3ad.js → index.module-2821f17d.js} +11 -10
  243. package/dist/esm/loader.js +6 -5
  244. package/dist/esm/luxon-f44215d9.js +8346 -0
  245. package/dist/esm/mint-components.js +6 -5
  246. package/dist/esm/{re-render-e06f2f7f.js → re-render-07721d1b.js} +3 -3
  247. package/dist/esm/{sqm-asset-card-view-6f360937.js → sqm-asset-card-view-f9ca5345.js} +2 -3
  248. package/dist/esm/sqm-asset-card.entry.js +7 -6
  249. package/dist/esm/sqm-big-stat-view-309f7c1f.js +38 -0
  250. package/dist/esm/sqm-big-stat.entry.js +8 -6
  251. package/dist/esm/sqm-brand_30.entry.js +7288 -0
  252. package/dist/esm/sqm-form-message.entry.js +27 -0
  253. package/dist/esm/sqm-graphql-client-provider.entry.js +8 -7
  254. package/dist/esm/{sqm-hero-view-bfd8abd1.js → sqm-hero-view-5ea17052.js} +4 -5
  255. package/dist/esm/sqm-hero.entry.js +6 -5
  256. package/dist/esm/sqm-image_4.entry.js +189 -0
  257. package/dist/esm/sqm-leaderboard-rank-view-da91f5f3.js +8 -0
  258. package/dist/esm/sqm-leaderboard-rank.entry.js +10 -12
  259. package/dist/esm/{sqm-name-fields-view-4162fb7b.js → sqm-name-fields-view-69b1583f.js} +2 -3
  260. package/dist/esm/sqm-name-fields.entry.js +7 -6
  261. package/dist/esm/{sqm-navigation-sidebar-item-view-f2304ad9.js → sqm-navigation-sidebar-item-view-9380a346.js} +7 -6
  262. package/dist/esm/sqm-navigation-sidebar-item.entry.js +9 -8
  263. package/dist/esm/{sqm-navigation-sidebar-view-2242502c.js → sqm-navigation-sidebar-view-816558e3.js} +2 -3
  264. package/dist/esm/sqm-navigation-sidebar.entry.js +4 -3
  265. package/dist/esm/sqm-password-field.entry.js +577 -0
  266. package/dist/esm/sqm-popup-container.entry.js +5 -4
  267. package/dist/esm/{sqm-portal-container-view-73757ca5.js → sqm-portal-container-view-f74db584.js} +9 -5
  268. package/dist/esm/{sqm-portal-email-verification-view-8cefe480.js → sqm-portal-email-verification-view-cf3a4840.js} +5 -6
  269. package/dist/esm/sqm-portal-email-verification.entry.js +19 -11
  270. package/dist/esm/{sqm-portal-footer-view-d9fe0bf8.js → sqm-portal-footer-view-ba9892f9.js} +4 -5
  271. package/dist/esm/sqm-portal-footer.entry.js +8 -7
  272. package/dist/esm/{sqm-portal-forgot-password-view-e3a6a716.js → sqm-portal-forgot-password-view-fa088f83.js} +3 -4
  273. package/dist/esm/sqm-portal-forgot-password.entry.js +25 -12
  274. package/dist/esm/sqm-portal-logout.entry.js +7 -6
  275. package/dist/esm/{sqm-portal-profile-view-b67467b4.js → sqm-portal-profile-view-f795d0cd.js} +5 -6
  276. package/dist/esm/sqm-portal-profile.entry.js +14 -13
  277. package/dist/esm/sqm-portal-protected-route.entry.js +9 -8
  278. package/dist/esm/{sqm-portal-reset-password-view-a4e50da2.js → sqm-portal-reset-password-view-73e14282.js} +3 -4
  279. package/dist/esm/sqm-portal-reset-password.entry.js +21 -12
  280. package/dist/esm/{sqm-portal-section-view-f0876545.js → sqm-portal-section-view-88a80af9.js} +4 -6
  281. package/dist/esm/{sqm-portal-verify-email-view-6f18bac2.js → sqm-portal-verify-email-view-cbf1cfdc.js} +3 -4
  282. package/dist/esm/sqm-portal-verify-email.entry.js +22 -13
  283. package/dist/esm/sqm-referral-table_11.entry.js +992 -0
  284. package/dist/esm/sqm-refresh-button.entry.js +50 -0
  285. package/dist/esm/sqm-rewards-table-customer-note-cell.entry.js +22 -0
  286. package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +34 -0
  287. package/dist/esm/sqm-rewards-table_9.entry.js +1135 -0
  288. package/dist/esm/{sqm-stat-container-view-4133feb6.js → sqm-stat-container-view-8a565c5a.js} +3 -4
  289. package/dist/esm/sqm-stat-container.entry.js +5 -4
  290. package/dist/esm/sqm-stencilbook.entry.js +14586 -0
  291. package/dist/esm/sqm-tab.entry.js +16 -0
  292. package/dist/esm/sqm-tabs.entry.js +85 -0
  293. package/dist/esm/{sqm-text-span-view-1781df94.js → sqm-text-span-view-7e61c95c.js} +2 -3
  294. package/dist/esm/sqm-text-span.entry.js +4 -3
  295. package/dist/esm/{extends-3a3f9fe2.js → stencil-hooks.module-acc8a613.js} +2 -20
  296. package/dist/esm/{use-callback-b38a1523.js → use-callback-7e0bfd3b.js} +1 -1
  297. package/dist/esm/useChildElements-62af7349.js +19 -0
  298. package/dist/esm/{useDemoBigStat-c3b955b7.js → useDemoBigStat-b5a22d26.js} +21 -46
  299. package/dist/esm/useReferralTable-43a3a215.js +351 -0
  300. package/dist/esm/{utils-454405f5.js → utils-1d345130.js} +9 -1
  301. package/dist/esm-es5/GenericTableView-6e103d56.js +1 -0
  302. package/dist/esm-es5/{jss-preset-default.esm-71fae192.js → JSS-96eeab98.js} +2 -2
  303. package/dist/esm-es5/ShadowViewAddon-72b97747.js +1 -0
  304. package/dist/esm-es5/extends-c31f1eff.js +1 -0
  305. package/dist/esm-es5/{global-90da933f.js → global-a8e9f822.js} +2 -2
  306. package/dist/esm-es5/index.module-2821f17d.js +1 -0
  307. package/dist/esm-es5/loader.js +1 -1
  308. package/dist/esm-es5/luxon-f44215d9.js +1 -0
  309. package/dist/esm-es5/mint-components.js +1 -1
  310. package/dist/esm-es5/re-render-07721d1b.js +1 -0
  311. package/dist/esm-es5/sqm-asset-card-view-f9ca5345.js +1 -0
  312. package/dist/esm-es5/sqm-asset-card.entry.js +1 -1
  313. package/dist/esm-es5/sqm-big-stat-view-309f7c1f.js +1 -0
  314. package/dist/esm-es5/sqm-big-stat.entry.js +1 -1
  315. package/dist/esm-es5/sqm-brand_30.entry.js +1 -0
  316. package/dist/esm-es5/sqm-form-message.entry.js +1 -0
  317. package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
  318. package/dist/esm-es5/sqm-hero-view-5ea17052.js +1 -0
  319. package/dist/esm-es5/sqm-hero.entry.js +1 -1
  320. package/dist/esm-es5/sqm-image_4.entry.js +1 -0
  321. package/dist/esm-es5/sqm-leaderboard-rank-view-da91f5f3.js +1 -0
  322. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  323. package/dist/esm-es5/sqm-name-fields-view-69b1583f.js +1 -0
  324. package/dist/esm-es5/sqm-name-fields.entry.js +1 -1
  325. package/dist/esm-es5/sqm-navigation-sidebar-item-view-9380a346.js +1 -0
  326. package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
  327. package/dist/esm-es5/sqm-navigation-sidebar-view-816558e3.js +1 -0
  328. package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
  329. package/dist/esm-es5/sqm-password-field.entry.js +1 -0
  330. package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
  331. package/dist/esm-es5/sqm-portal-container-view-f74db584.js +1 -0
  332. package/dist/esm-es5/sqm-portal-email-verification-view-cf3a4840.js +1 -0
  333. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  334. package/dist/esm-es5/sqm-portal-footer-view-ba9892f9.js +1 -0
  335. package/dist/esm-es5/sqm-portal-footer.entry.js +1 -1
  336. package/dist/esm-es5/sqm-portal-forgot-password-view-fa088f83.js +1 -0
  337. package/dist/esm-es5/sqm-portal-forgot-password.entry.js +1 -1
  338. package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
  339. package/dist/esm-es5/sqm-portal-profile-view-f795d0cd.js +1 -0
  340. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  341. package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
  342. package/dist/esm-es5/sqm-portal-reset-password-view-73e14282.js +1 -0
  343. package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
  344. package/dist/esm-es5/sqm-portal-section-view-88a80af9.js +1 -0
  345. package/dist/esm-es5/sqm-portal-verify-email-view-cbf1cfdc.js +1 -0
  346. package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
  347. package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -0
  348. package/dist/esm-es5/sqm-refresh-button.entry.js +1 -0
  349. package/dist/esm-es5/sqm-rewards-table-customer-note-cell.entry.js +1 -0
  350. package/dist/esm-es5/{sqm-referral-table-column.entry.js → sqm-rewards-table-customer-note-column.entry.js} +1 -1
  351. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -0
  352. package/dist/esm-es5/sqm-stat-container-view-8a565c5a.js +1 -0
  353. package/dist/esm-es5/sqm-stat-container.entry.js +1 -1
  354. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -0
  355. package/dist/esm-es5/sqm-tab.entry.js +1 -0
  356. package/dist/esm-es5/sqm-tabs.entry.js +1 -0
  357. package/dist/esm-es5/sqm-text-span-view-7e61c95c.js +1 -0
  358. package/dist/esm-es5/sqm-text-span.entry.js +1 -1
  359. package/dist/esm-es5/{extends-3a3f9fe2.js → stencil-hooks.module-acc8a613.js} +2 -2
  360. package/dist/esm-es5/use-callback-7e0bfd3b.js +1 -0
  361. package/dist/esm-es5/useChildElements-62af7349.js +1 -0
  362. package/dist/esm-es5/useDemoBigStat-b5a22d26.js +1 -0
  363. package/dist/esm-es5/useReferralTable-43a3a215.js +1 -0
  364. package/dist/esm-es5/utils-1d345130.js +1 -0
  365. package/dist/mint-components/assets/Reward-image.png +0 -0
  366. package/dist/mint-components/global/styles.ts +14 -72
  367. package/dist/mint-components/mint-components.esm.js +1 -1
  368. package/dist/mint-components/mint-components.js +1 -1
  369. package/dist/mint-components/p-030f89b3.entry.js +1 -0
  370. package/dist/mint-components/p-09fbcba5.js +1 -0
  371. package/dist/mint-components/p-1122f7df.system.js +1 -0
  372. package/dist/mint-components/p-147440c3.js +1 -0
  373. package/dist/mint-components/p-1703d3c0.system.entry.js +1 -0
  374. package/dist/mint-components/p-179988b5.js +1 -0
  375. package/dist/mint-components/p-192f4931.system.entry.js +1 -0
  376. package/dist/mint-components/p-1959da16.system.js +1 -0
  377. package/dist/mint-components/p-19822c1b.entry.js +1 -0
  378. package/dist/mint-components/p-198409c1.entry.js +1 -0
  379. package/dist/mint-components/p-1af65647.js +239 -0
  380. package/dist/mint-components/p-1c17892a.system.js +1 -0
  381. package/dist/mint-components/p-1d1e9197.js +1 -0
  382. package/dist/mint-components/p-1ffa9d4b.js +1 -0
  383. package/dist/mint-components/p-204fd08c.js +1 -0
  384. package/dist/mint-components/p-21129bee.system.js +1 -0
  385. package/dist/mint-components/p-250d40f6.system.entry.js +1 -0
  386. package/dist/mint-components/p-266268d2.system.js +1 -0
  387. package/dist/mint-components/{p-44578b22.js → p-27455c4c.js} +2 -2
  388. package/dist/mint-components/p-2a42ac80.js +30 -0
  389. package/dist/mint-components/p-2af04f82.system.entry.js +1 -0
  390. package/dist/mint-components/p-373fa002.js +1 -0
  391. package/dist/mint-components/p-3a0e33b9.entry.js +13 -0
  392. package/dist/mint-components/p-3a5d7f3a.entry.js +150 -0
  393. package/dist/mint-components/{p-1b7d89a7.system.js → p-3bbb90a9.system.js} +2 -2
  394. package/dist/mint-components/p-3e556042.js +1 -0
  395. package/dist/mint-components/p-3e65453b.system.js +1 -0
  396. package/dist/mint-components/p-403e84cc.system.entry.js +1 -0
  397. package/dist/mint-components/p-4063dca2.js +1 -0
  398. package/dist/mint-components/p-40dd0af3.entry.js +1 -0
  399. package/dist/mint-components/p-41a87a92.entry.js +1 -0
  400. package/dist/mint-components/p-4279da4b.system.js +1 -0
  401. package/dist/mint-components/p-48b4104d.entry.js +1 -0
  402. package/dist/mint-components/{p-015b683f.system.js → p-48ec6605.system.js} +2 -2
  403. package/dist/mint-components/p-4a1b7d35.js +1 -0
  404. package/dist/mint-components/p-4b60eb5d.entry.js +1 -0
  405. package/dist/mint-components/{p-b608f7a4.system.js → p-4ceaa514.system.js} +11 -11
  406. package/dist/mint-components/p-4e05c65a.js +1 -0
  407. package/dist/mint-components/p-4e4b69c2.system.entry.js +1 -0
  408. package/dist/mint-components/p-4f4bdfad.system.entry.js +1 -0
  409. package/dist/mint-components/p-505d8965.system.entry.js +1 -0
  410. package/dist/mint-components/p-53af4433.system.js +1 -0
  411. package/dist/mint-components/p-59afa159.entry.js +1 -0
  412. package/dist/mint-components/p-59e4405d.system.js +1 -0
  413. package/dist/mint-components/p-5c75acad.js +1 -0
  414. package/dist/mint-components/p-5da31edf.system.entry.js +1 -0
  415. package/dist/mint-components/p-5ec4939c.system.entry.js +1 -0
  416. package/dist/mint-components/p-62dd50b3.js +167 -0
  417. package/dist/mint-components/p-66fc28d0.js +1 -0
  418. package/dist/mint-components/p-67749aab.system.entry.js +1 -0
  419. package/dist/mint-components/p-68bafbde.entry.js +1 -0
  420. package/dist/mint-components/p-6b43e4cc.system.js +1 -0
  421. package/dist/mint-components/p-6cb25b8b.entry.js +1 -0
  422. package/dist/mint-components/p-71ecbb3b.system.js +1 -0
  423. package/dist/mint-components/p-73d5306f.js +1 -0
  424. package/dist/mint-components/p-75a78c16.system.entry.js +1 -0
  425. package/dist/mint-components/p-7794c289.js +1 -0
  426. package/dist/mint-components/p-77c4071b.entry.js +1 -0
  427. package/dist/mint-components/p-7b854fc1.system.entry.js +1 -0
  428. package/dist/mint-components/p-81f34787.js +1 -0
  429. package/dist/mint-components/p-838242f3.system.js +1 -0
  430. package/dist/mint-components/p-8a8d0514.system.js +1 -0
  431. package/dist/mint-components/p-8bcaafaf.system.js +1 -0
  432. package/dist/mint-components/p-91d119ad.system.js +1 -0
  433. package/dist/mint-components/p-95a89867.js +1 -0
  434. package/dist/mint-components/p-975d4358.js +1 -0
  435. package/dist/mint-components/p-982ad256.js +1 -0
  436. package/dist/mint-components/p-996e20c4.entry.js +1 -0
  437. package/dist/mint-components/p-999a46af.entry.js +1 -0
  438. package/dist/mint-components/p-9a41655e.entry.js +1 -0
  439. package/dist/mint-components/p-9b48d01e.js +1 -0
  440. package/dist/mint-components/p-9d467470.system.js +1 -0
  441. package/dist/mint-components/p-9e2168f7.system.entry.js +1 -0
  442. package/dist/mint-components/p-a09e3176.system.js +1 -0
  443. package/dist/mint-components/p-a13b5757.system.js +1 -0
  444. package/dist/mint-components/p-a27f07cd.system.entry.js +1 -0
  445. package/dist/mint-components/p-a62a0cf6.system.entry.js +1 -0
  446. package/dist/mint-components/p-a6d4cffd.system.entry.js +1 -0
  447. package/dist/mint-components/p-aa09f12b.system.js +1 -0
  448. package/dist/mint-components/p-b0f4c0a7.entry.js +9 -0
  449. package/dist/mint-components/p-b3af1c6f.js +1 -0
  450. package/dist/mint-components/p-b5c6ff52.system.entry.js +1 -0
  451. package/dist/mint-components/p-b6fbd9cd.system.entry.js +1 -0
  452. package/dist/mint-components/p-b7e5ba0d.system.entry.js +1 -0
  453. package/dist/mint-components/p-b8434fc0.system.js +1 -0
  454. package/dist/mint-components/p-bbf96ff3.system.js +1 -0
  455. package/dist/mint-components/p-bc19e1c2.system.js +1 -0
  456. package/dist/mint-components/p-bc77fb14.system.js +1 -0
  457. package/dist/mint-components/p-bca007f0.entry.js +1 -0
  458. package/dist/mint-components/p-be02b2a2.system.entry.js +1 -0
  459. package/dist/mint-components/p-bf055b6c.system.js +1 -0
  460. package/dist/mint-components/p-c00fd233.system.entry.js +1 -0
  461. package/dist/mint-components/p-c0693ddc.entry.js +1 -0
  462. package/dist/mint-components/p-c29c5491.entry.js +93 -0
  463. package/dist/mint-components/p-c3f300e8.system.js +1 -0
  464. package/dist/mint-components/p-c5037c05.system.entry.js +1 -0
  465. package/dist/mint-components/p-c5a656af.system.entry.js +1 -0
  466. package/dist/mint-components/p-c7f81b0e.system.entry.js +1 -0
  467. package/dist/mint-components/{p-723ebe45.entry.js → p-cd69d4f6.entry.js} +2 -2
  468. package/dist/mint-components/p-cdebf9f7.system.entry.js +1 -0
  469. package/dist/mint-components/p-ce0ec1c4.system.js +1 -0
  470. package/dist/mint-components/{p-3ce2fb83.system.js → p-cf9c3022.system.js} +1 -1
  471. package/dist/mint-components/p-cf9cfac0.entry.js +1 -0
  472. package/dist/mint-components/p-d0c09868.js +1 -0
  473. package/dist/mint-components/p-d13b1d06.entry.js +1 -0
  474. package/dist/mint-components/p-d1ffec5b.entry.js +1 -0
  475. package/dist/mint-components/p-d33eb961.js +1 -0
  476. package/dist/mint-components/p-d6e7f685.system.entry.js +1 -0
  477. package/dist/mint-components/p-d98083fb.entry.js +1 -0
  478. package/dist/mint-components/p-da1eb628.system.entry.js +1 -0
  479. package/dist/mint-components/p-db9e20a0.entry.js +1 -0
  480. package/dist/mint-components/p-dd4f754e.system.entry.js +1 -0
  481. package/dist/mint-components/p-de2e871a.js +1 -0
  482. package/dist/mint-components/p-dec7a657.entry.js +1 -0
  483. package/dist/mint-components/p-e08f5f8e.js +1 -0
  484. package/dist/mint-components/{p-224504ad.js → p-e15e8e89.js} +1 -1
  485. package/dist/mint-components/p-e4320d52.entry.js +1 -0
  486. package/dist/mint-components/p-e6fac878.entry.js +1 -0
  487. package/dist/mint-components/p-e89b298a.system.entry.js +1 -0
  488. package/dist/mint-components/p-e9d8c4d3.system.entry.js +1 -0
  489. package/dist/mint-components/p-ea110693.system.js +1 -0
  490. package/dist/mint-components/{p-46a4269a.js → p-ef030fdf.js} +153 -153
  491. package/dist/mint-components/p-f94c4847.entry.js +1 -0
  492. package/dist/mint-components/p-f983083d.system.js +1 -0
  493. package/dist/mint-components/p-fe0d7472.entry.js +1 -0
  494. package/dist/mint-components/sqm-rewards-table-reward-column.entry.js +41 -0
  495. package/dist/types/components/sqm-big-stat/BigStat.stories.d.ts +3 -0
  496. package/dist/types/components/sqm-big-stat/sqm-big-stat-view.d.ts +1 -0
  497. package/dist/types/components/sqm-big-stat/sqm-big-stat.d.ts +6 -0
  498. package/dist/types/components/sqm-big-stat/useBigStat.d.ts +1 -0
  499. package/dist/types/components/sqm-brand/SqmBrand.stories.d.ts +11 -0
  500. package/dist/types/components/sqm-brand/sqm-brand.d.ts +31 -0
  501. package/dist/types/components/sqm-card-feed/CardFeed.stories.d.ts +13 -0
  502. package/dist/types/components/sqm-card-feed/sqm-card-feed-view.d.ts +6 -0
  503. package/dist/types/components/sqm-card-feed/sqm-card-feed.d.ts +18 -0
  504. package/dist/types/components/sqm-empty/sqm-empty-view.d.ts +6 -0
  505. package/dist/types/components/sqm-empty/sqm-empty.d.ts +14 -0
  506. package/dist/types/components/sqm-hero-image/HeroImage.stories.d.ts +23 -0
  507. package/dist/types/components/sqm-hero-image/sqm-hero-image-view.d.ts +21 -0
  508. package/dist/types/components/sqm-hero-image/sqm-hero-image.d.ts +88 -0
  509. package/dist/types/components/sqm-image/Image.stories.d.ts +13 -0
  510. package/dist/types/components/sqm-image/sqm-image-view.d.ts +10 -0
  511. package/dist/types/components/sqm-image/sqm-image.d.ts +27 -0
  512. package/dist/types/components/sqm-leaderboard/Leaderboard.stories.d.ts +7 -1
  513. package/dist/types/components/sqm-leaderboard/UseLeaderboard.stories.d.ts +18 -0
  514. package/dist/types/components/sqm-leaderboard/sqm-leaderboard-view.d.ts +10 -0
  515. package/dist/types/components/sqm-leaderboard/sqm-leaderboard.d.ts +12 -2
  516. package/dist/types/components/sqm-leaderboard/useLeaderboard.d.ts +3 -0
  517. package/dist/types/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item.d.ts +2 -0
  518. package/dist/types/components/sqm-portal-container/PortalContainer.stories.d.ts +15 -0
  519. package/dist/types/components/sqm-portal-container/sqm-portal-container-view.d.ts +3 -0
  520. package/dist/types/components/sqm-portal-container/sqm-portal-container.d.ts +14 -0
  521. package/dist/types/components/sqm-portal-email-verification/sqm-portal-email-verification.d.ts +6 -0
  522. package/dist/types/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.d.ts +1 -0
  523. package/dist/types/components/sqm-portal-forgot-password/sqm-portal-forgot-password.d.ts +10 -0
  524. package/dist/types/components/sqm-portal-forgot-password/usePortalForgotPassword.d.ts +3 -1
  525. package/dist/types/components/sqm-portal-login/sqm-portal-login-view.d.ts +2 -0
  526. package/dist/types/components/sqm-portal-login/sqm-portal-login.d.ts +8 -0
  527. package/dist/types/components/sqm-portal-login/usePortalLogin.d.ts +3 -3
  528. package/dist/types/components/sqm-portal-register/PortalRegister.stories.d.ts +1 -0
  529. package/dist/types/components/sqm-portal-register/sqm-portal-register-view.d.ts +6 -3
  530. package/dist/types/components/sqm-portal-register/sqm-portal-register.d.ts +10 -0
  531. package/dist/types/components/sqm-portal-register/usePortalRegister.d.ts +1 -0
  532. package/dist/types/components/sqm-portal-reset-password/sqm-portal-reset-password.d.ts +8 -0
  533. package/dist/types/components/sqm-portal-verify-email/sqm-portal-verify-email.d.ts +8 -0
  534. package/dist/types/components/sqm-portal-verify-email/usePortalVerifyEmail.d.ts +2 -1
  535. package/dist/types/components/sqm-program-explainer/ProgramExplainer.stories.d.ts +10 -0
  536. package/dist/types/components/sqm-program-explainer/sqm-program-explainer-view.d.ts +7 -0
  537. package/dist/types/components/sqm-program-explainer/sqm-program-explainer.d.ts +23 -0
  538. package/dist/types/components/sqm-program-explainer-step/ProgramExplainerStep.stories.d.ts +9 -0
  539. package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step-view.d.ts +9 -0
  540. package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step.d.ts +38 -0
  541. package/dist/types/components/sqm-referral-card/ReferralCard.stories.d.ts +16 -0
  542. package/dist/types/components/sqm-referral-card/sqm-referral-card-view.d.ts +9 -0
  543. package/dist/types/components/sqm-referral-card/sqm-referral-card.d.ts +15 -0
  544. package/dist/types/components/sqm-referral-table/ReferralTable.stories.d.ts +5 -0
  545. package/dist/types/components/sqm-referral-table/ReferralTableCell.stories.d.ts +3 -0
  546. package/dist/types/components/sqm-referral-table/ReferralTableRewardsCell.stories.d.ts +3 -0
  547. package/dist/types/components/sqm-referral-table/UseReferralTable.stories.d.ts +40 -0
  548. package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-date-cell.d.ts +2 -1
  549. package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.d.ts +7 -0
  550. package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-user-cell.d.ts +1 -1
  551. package/dist/types/components/sqm-referral-table/columns/ReferralTableColumn.d.ts +1 -1
  552. package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-date-column.d.ts +2 -1
  553. package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.d.ts +26 -1
  554. package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-status-column.d.ts +1 -0
  555. package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-user-column.d.ts +1 -0
  556. package/dist/types/components/sqm-referral-table/mockReferralData.d.ts +83 -0
  557. package/dist/types/components/sqm-referral-table/sqm-referral-table-view.d.ts +1 -1
  558. package/dist/types/components/sqm-referral-table/sqm-referral-table.d.ts +8 -2
  559. package/dist/types/components/sqm-referral-table/useReferralTable.d.ts +5 -2
  560. package/dist/types/components/sqm-refresh-button/RefreshButtonView.d.ts +15 -0
  561. package/dist/types/components/sqm-refresh-button/sqm-refresh-button.d.ts +12 -0
  562. package/dist/types/components/sqm-reward-exchange-list/RewardExchangeList.stories.d.ts +13 -3
  563. package/dist/types/components/sqm-reward-exchange-list/RewardExchangeListData.d.ts +650 -0
  564. package/dist/types/components/sqm-reward-exchange-list/SVGs.d.ts +1 -0
  565. package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.d.ts +6 -0
  566. package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list.d.ts +100 -0
  567. package/dist/types/components/sqm-reward-exchange-list/useRewardExchangeList.d.ts +17 -1
  568. package/dist/types/components/sqm-rewards-table/RewardsTable.stories.d.ts +14 -0
  569. package/dist/types/components/sqm-rewards-table/RewardsTableCell.stories.d.ts +36 -0
  570. package/dist/types/components/sqm-rewards-table/UseRewardsTable.stories.d.ts +24 -0
  571. package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-customer-note-cell.d.ts +8 -0
  572. package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-date-cell.d.ts +8 -0
  573. package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-reward-cell.d.ts +8 -0
  574. package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.d.ts +10 -0
  575. package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.d.ts +11 -0
  576. package/dist/types/components/sqm-rewards-table/columns/RewardTableColumn.d.ts +5 -0
  577. package/dist/types/components/sqm-rewards-table/columns/sqm-customer-note-column.d.ts +15 -0
  578. package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.d.ts +25 -0
  579. package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.d.ts +27 -0
  580. package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.d.ts +37 -0
  581. package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.d.ts +23 -0
  582. package/dist/types/components/sqm-rewards-table/mockRewardData.d.ts +45 -0
  583. package/dist/types/components/sqm-rewards-table/sqm-rewards-table.d.ts +6 -2
  584. package/dist/types/components/sqm-rewards-table/useRewardsTable.d.ts +1 -33
  585. package/dist/types/components/sqm-scroll/Scroll.stories.d.ts +7 -0
  586. package/dist/types/components/sqm-scroll/sqm-scroll.d.ts +11 -0
  587. package/dist/types/components/sqm-scroll/useScroll.d.ts +6 -0
  588. package/dist/types/components/sqm-share-button/ShareButton.stories.d.ts +8 -1
  589. package/dist/types/components/sqm-share-button/sqm-share-button-view.d.ts +3 -0
  590. package/dist/types/components/sqm-share-button/sqm-share-button.d.ts +18 -2
  591. package/dist/types/components/sqm-share-code/ShareCode.stories.d.ts +10 -0
  592. package/dist/types/components/sqm-share-link/ShareLink.stories.d.ts +3 -0
  593. package/dist/types/components/sqm-stencilbook/AutoColor.d.ts +7 -0
  594. package/dist/types/components/sqm-stencilbook/Resizer.d.ts +1 -1
  595. package/dist/types/components/sqm-stencilbook/Themes.d.ts +1 -0
  596. package/dist/types/components/sqm-tab/sqm-tab-view.d.ts +4 -0
  597. package/dist/types/components/sqm-tab/sqm-tab.d.ts +4 -0
  598. package/dist/types/{tables → components/sqm-table-cell}/sqm-table-cell.d.ts +0 -0
  599. package/dist/types/{tables → components/sqm-table-row}/sqm-table-row.d.ts +0 -0
  600. package/dist/types/components/sqm-tabs/Tabs.stories.d.ts +15 -0
  601. package/dist/types/components/sqm-tabs/sqm-tabs-view.d.ts +9 -0
  602. package/dist/types/components/sqm-tabs/sqm-tabs.d.ts +16 -0
  603. package/dist/types/components/sqm-tabs/useTabs.d.ts +9 -0
  604. package/dist/types/components/sqm-task-card/DetailsView.d.ts +41 -0
  605. package/dist/types/components/sqm-task-card/TaskCard.stories.d.ts +1 -0
  606. package/dist/types/components/sqm-task-card/UseTaskCard.stories.d.ts +6 -0
  607. package/dist/types/components/sqm-task-card/progress-bar/SVGs.d.ts +1 -1
  608. package/dist/types/components/sqm-task-card/sqm-task-card-view.d.ts +32 -15
  609. package/dist/types/components/sqm-task-card/sqm-task-card.d.ts +50 -6
  610. package/dist/types/components/sqm-task-card/useTaskCard.d.ts +11 -0
  611. package/dist/types/components/sqm-timeline/SVGs.d.ts +3 -0
  612. package/dist/types/components/sqm-timeline/Timeline.stories.d.ts +11 -0
  613. package/dist/types/components/sqm-timeline/sqm-timeline-entry.d.ts +31 -0
  614. package/dist/types/components/sqm-timeline/sqm-timeline.d.ts +15 -0
  615. package/dist/types/components/sqm-titled-section/TitledSection.stories.d.ts +12 -0
  616. package/dist/types/components/sqm-titled-section/sqm-portal-section-view.d.ts +1 -0
  617. package/dist/types/components/sqm-titled-section/sqm-titled-section.d.ts +12 -1
  618. package/dist/types/components/sqm-user-name/sqm-user-name.d.ts +1 -1
  619. package/dist/types/components.d.ts +1546 -46
  620. package/dist/types/fonts/GoogleFonts.d.ts +9 -0
  621. package/dist/types/global/styles.d.ts +1 -1
  622. package/dist/types/saasquatch.d.ts +40 -0
  623. package/dist/types/styling/JSS.d.ts +7 -0
  624. package/dist/types/tables/GenericTableView.d.ts +4 -1
  625. package/dist/types/tables/TableSlots.d.ts +1 -0
  626. package/dist/types/utils/utils.d.ts +1 -0
  627. package/grapesjs/grapesjs.js +1 -1
  628. package/package.json +11 -13
  629. package/dist/cjs/ShadowViewAddon-a85b8c8d.js +0 -127
  630. package/dist/cjs/sqm-divided-layout_30.cjs.entry.js +0 -32306
  631. package/dist/cjs/sqm-leaderboard-rank-view-7dd44d62.js +0 -131
  632. package/dist/cjs/sqm-leaderboard.cjs.entry.js +0 -69
  633. package/dist/cjs/sqm-portal-container.cjs.entry.js +0 -35
  634. package/dist/cjs/sqm-referral-table-column.cjs.entry.js +0 -30
  635. package/dist/cjs/sqm-referral-table-date-column.cjs.entry.js +0 -47
  636. package/dist/cjs/sqm-referral-table-rewards-column.cjs.entry.js +0 -38
  637. package/dist/cjs/sqm-referral-table-status-column.cjs.entry.js +0 -45
  638. package/dist/cjs/sqm-referral-table-user-column.cjs.entry.js +0 -57
  639. package/dist/cjs/sqm-share-code.cjs.entry.js +0 -87
  640. package/dist/cjs/sqm-share-link-view-a935d07e.js +0 -24
  641. package/dist/cjs/sqm-titled-section.cjs.entry.js +0 -36
  642. package/dist/cjs/use-callback-fadb2643.js +0 -7
  643. package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.css +0 -37
  644. package/dist/collection/components/sqm-reward-exchange-list/assets/placeholder.png +0 -0
  645. package/dist/esm/ShadowViewAddon-a3f510db.js +0 -122
  646. package/dist/esm/sqm-divided-layout_30.entry.js +0 -32273
  647. package/dist/esm/sqm-leaderboard-rank-view-47844836.js +0 -128
  648. package/dist/esm/sqm-leaderboard.entry.js +0 -65
  649. package/dist/esm/sqm-portal-container.entry.js +0 -31
  650. package/dist/esm/sqm-referral-table-column.entry.js +0 -26
  651. package/dist/esm/sqm-referral-table-date-column.entry.js +0 -43
  652. package/dist/esm/sqm-referral-table-rewards-column.entry.js +0 -34
  653. package/dist/esm/sqm-referral-table-status-column.entry.js +0 -41
  654. package/dist/esm/sqm-referral-table-user-column.entry.js +0 -53
  655. package/dist/esm/sqm-share-code.entry.js +0 -83
  656. package/dist/esm/sqm-share-link-view-9282b8e8.js +0 -22
  657. package/dist/esm/sqm-titled-section.entry.js +0 -32
  658. package/dist/esm-es5/ShadowViewAddon-a3f510db.js +0 -1
  659. package/dist/esm-es5/index.module-90d2c3ad.js +0 -1
  660. package/dist/esm-es5/re-render-e06f2f7f.js +0 -1
  661. package/dist/esm-es5/sqm-asset-card-view-6f360937.js +0 -1
  662. package/dist/esm-es5/sqm-divided-layout_30.entry.js +0 -58
  663. package/dist/esm-es5/sqm-hero-view-bfd8abd1.js +0 -1
  664. package/dist/esm-es5/sqm-leaderboard-rank-view-47844836.js +0 -1
  665. package/dist/esm-es5/sqm-leaderboard.entry.js +0 -1
  666. package/dist/esm-es5/sqm-name-fields-view-4162fb7b.js +0 -1
  667. package/dist/esm-es5/sqm-navigation-sidebar-item-view-f2304ad9.js +0 -1
  668. package/dist/esm-es5/sqm-navigation-sidebar-view-2242502c.js +0 -1
  669. package/dist/esm-es5/sqm-portal-container-view-73757ca5.js +0 -1
  670. package/dist/esm-es5/sqm-portal-container.entry.js +0 -1
  671. package/dist/esm-es5/sqm-portal-email-verification-view-8cefe480.js +0 -1
  672. package/dist/esm-es5/sqm-portal-footer-view-d9fe0bf8.js +0 -1
  673. package/dist/esm-es5/sqm-portal-forgot-password-view-e3a6a716.js +0 -1
  674. package/dist/esm-es5/sqm-portal-profile-view-b67467b4.js +0 -1
  675. package/dist/esm-es5/sqm-portal-reset-password-view-a4e50da2.js +0 -1
  676. package/dist/esm-es5/sqm-portal-section-view-f0876545.js +0 -1
  677. package/dist/esm-es5/sqm-portal-verify-email-view-6f18bac2.js +0 -1
  678. package/dist/esm-es5/sqm-referral-table-date-column.entry.js +0 -1
  679. package/dist/esm-es5/sqm-referral-table-rewards-column.entry.js +0 -1
  680. package/dist/esm-es5/sqm-referral-table-status-column.entry.js +0 -1
  681. package/dist/esm-es5/sqm-referral-table-user-column.entry.js +0 -1
  682. package/dist/esm-es5/sqm-share-code.entry.js +0 -1
  683. package/dist/esm-es5/sqm-share-link-view-9282b8e8.js +0 -1
  684. package/dist/esm-es5/sqm-stat-container-view-4133feb6.js +0 -1
  685. package/dist/esm-es5/sqm-text-span-view-1781df94.js +0 -1
  686. package/dist/esm-es5/sqm-titled-section.entry.js +0 -1
  687. package/dist/esm-es5/use-callback-b38a1523.js +0 -1
  688. package/dist/esm-es5/useDemoBigStat-c3b955b7.js +0 -1
  689. package/dist/esm-es5/utils-454405f5.js +0 -1
  690. package/dist/mint-components/assets/placeholder.png +0 -0
  691. package/dist/mint-components/p-07c924fa.system.js +0 -1
  692. package/dist/mint-components/p-0a39b23c.system.entry.js +0 -1
  693. package/dist/mint-components/p-0bcefa93.entry.js +0 -1
  694. package/dist/mint-components/p-0eb3e89c.js +0 -1
  695. package/dist/mint-components/p-1575e8a3.system.js +0 -1
  696. package/dist/mint-components/p-160bd62f.entry.js +0 -1
  697. package/dist/mint-components/p-16f5a7cb.system.js +0 -1
  698. package/dist/mint-components/p-1a09e4e1.system.entry.js +0 -1
  699. package/dist/mint-components/p-1c8b0290.entry.js +0 -1
  700. package/dist/mint-components/p-1dcdca58.system.entry.js +0 -1
  701. package/dist/mint-components/p-1e182e88.system.js +0 -1
  702. package/dist/mint-components/p-20d41ab1.entry.js +0 -1
  703. package/dist/mint-components/p-221a4097.entry.js +0 -1
  704. package/dist/mint-components/p-223b42bd.system.entry.js +0 -1
  705. package/dist/mint-components/p-24b3c6f0.system.entry.js +0 -1
  706. package/dist/mint-components/p-24c9a599.system.entry.js +0 -1
  707. package/dist/mint-components/p-282ed862.js +0 -1
  708. package/dist/mint-components/p-29fab29b.entry.js +0 -1
  709. package/dist/mint-components/p-304e6c82.system.entry.js +0 -1
  710. package/dist/mint-components/p-3397167c.entry.js +0 -1
  711. package/dist/mint-components/p-33c5ffb7.entry.js +0 -1
  712. package/dist/mint-components/p-34696973.system.js +0 -1
  713. package/dist/mint-components/p-35476f7e.system.js +0 -1
  714. package/dist/mint-components/p-396bf448.system.entry.js +0 -1
  715. package/dist/mint-components/p-3b97aed8.system.js +0 -1
  716. package/dist/mint-components/p-3d856985.entry.js +0 -1
  717. package/dist/mint-components/p-4052b948.system.entry.js +0 -1
  718. package/dist/mint-components/p-412a9226.system.entry.js +0 -1
  719. package/dist/mint-components/p-412d31b1.js +0 -1
  720. package/dist/mint-components/p-44d0fc80.system.entry.js +0 -1
  721. package/dist/mint-components/p-45c752a0.entry.js +0 -1
  722. package/dist/mint-components/p-509dda90.js +0 -1
  723. package/dist/mint-components/p-52802c88.entry.js +0 -13
  724. package/dist/mint-components/p-53b0c355.system.js +0 -1
  725. package/dist/mint-components/p-53ec4863.entry.js +0 -1
  726. package/dist/mint-components/p-547a0354.system.js +0 -1
  727. package/dist/mint-components/p-5480e4ee.entry.js +0 -1
  728. package/dist/mint-components/p-55508395.system.entry.js +0 -1
  729. package/dist/mint-components/p-55f8387d.system.js +0 -1
  730. package/dist/mint-components/p-562199e3.system.js +0 -1
  731. package/dist/mint-components/p-563253e8.js +0 -17
  732. package/dist/mint-components/p-60855d33.system.js +0 -1
  733. package/dist/mint-components/p-60ae1ec5.system.js +0 -1
  734. package/dist/mint-components/p-67ae18d1.system.entry.js +0 -1
  735. package/dist/mint-components/p-6882070c.js +0 -1
  736. package/dist/mint-components/p-69bcf4fa.system.entry.js +0 -1
  737. package/dist/mint-components/p-69f28472.system.js +0 -1
  738. package/dist/mint-components/p-6bf0a4d9.system.entry.js +0 -1
  739. package/dist/mint-components/p-6d27cd05.system.entry.js +0 -1
  740. package/dist/mint-components/p-6e245fa3.system.entry.js +0 -1
  741. package/dist/mint-components/p-73148868.system.entry.js +0 -1
  742. package/dist/mint-components/p-739b3032.js +0 -1
  743. package/dist/mint-components/p-8435a22d.entry.js +0 -1
  744. package/dist/mint-components/p-883a32e7.entry.js +0 -1
  745. package/dist/mint-components/p-925ccb31.system.entry.js +0 -58
  746. package/dist/mint-components/p-952ed169.js +0 -1
  747. package/dist/mint-components/p-99f1208f.js +0 -1
  748. package/dist/mint-components/p-9b4f2af6.js +0 -1
  749. package/dist/mint-components/p-9c554ca0.system.js +0 -1
  750. package/dist/mint-components/p-9c79643f.system.js +0 -1
  751. package/dist/mint-components/p-9d6dbb2d.entry.js +0 -1
  752. package/dist/mint-components/p-9e4fee30.system.entry.js +0 -1
  753. package/dist/mint-components/p-a2c3cff3.js +0 -1
  754. package/dist/mint-components/p-a4c2c7ed.entry.js +0 -1
  755. package/dist/mint-components/p-a565e753.entry.js +0 -1
  756. package/dist/mint-components/p-a6094ff9.system.js +0 -1
  757. package/dist/mint-components/p-a8b913a8.js +0 -1
  758. package/dist/mint-components/p-aaf68d9d.system.js +0 -1
  759. package/dist/mint-components/p-ade44a4e.entry.js +0 -1
  760. package/dist/mint-components/p-b1bb07db.entry.js +0 -1
  761. package/dist/mint-components/p-b8bd2607.entry.js +0 -1
  762. package/dist/mint-components/p-ba505a8c.js +0 -1
  763. package/dist/mint-components/p-bb76c6f3.system.js +0 -1
  764. package/dist/mint-components/p-bd903567.js +0 -1
  765. package/dist/mint-components/p-be2738b0.system.entry.js +0 -1
  766. package/dist/mint-components/p-c3bf9440.entry.js +0 -1
  767. package/dist/mint-components/p-c6114bfe.system.js +0 -1
  768. package/dist/mint-components/p-c79c608d.system.entry.js +0 -1
  769. package/dist/mint-components/p-cca9026f.system.entry.js +0 -1
  770. package/dist/mint-components/p-cd410a05.entry.js +0 -9
  771. package/dist/mint-components/p-cdeae699.system.js +0 -1
  772. package/dist/mint-components/p-d174d0bc.system.entry.js +0 -1
  773. package/dist/mint-components/p-d21e0dbd.js +0 -1
  774. package/dist/mint-components/p-d35b0366.js +0 -1
  775. package/dist/mint-components/p-d7d6bf44.system.js +0 -1
  776. package/dist/mint-components/p-db2e4c42.js +0 -1
  777. package/dist/mint-components/p-db5a1e78.js +0 -1
  778. package/dist/mint-components/p-dc603d08.system.entry.js +0 -1
  779. package/dist/mint-components/p-e069bc2d.entry.js +0 -1
  780. package/dist/mint-components/p-e14c15ca.system.entry.js +0 -1
  781. package/dist/mint-components/p-e426715b.js +0 -1
  782. package/dist/mint-components/p-e43cc1f8.system.entry.js +0 -1
  783. package/dist/mint-components/p-e7f633b9.system.js +0 -1
  784. package/dist/mint-components/p-ebcd8a59.js +0 -1
  785. package/dist/mint-components/p-f17050de.entry.js +0 -1
  786. package/dist/mint-components/p-f85f36c6.system.entry.js +0 -1
  787. package/dist/mint-components/p-f90486ca.js +0 -235
  788. package/dist/mint-components/p-f9cb55dc.entry.js +0 -1
  789. package/dist/mint-components/p-fb1b6fdf.js +0 -1
  790. package/dist/mint-components/p-fce1dbf6.entry.js +0 -1
  791. package/dist/mint-components/p-fdb484a0.entry.js +0 -392
  792. package/dist/mint-components/p-fee468b7.system.entry.js +0 -1
  793. package/dist/mint-components/p-fee6801c.js +0 -1
  794. package/dist/types/components/sqm-rewards-table/sqm-rewards-table-column.d.ts +0 -20
@@ -0,0 +1,2594 @@
1
+ import { h, c as Host, d as getAssetPath, g as getElement } from './index-17b4da69.js';
2
+ import { k as useState } from './stencil-hooks.module-acc8a613.js';
3
+ import { i as intl } from './global-a8e9f822.js';
4
+ import { d as dist, M, n as ne, x, b as mn, D as De, f as D } from './index.module-2821f17d.js';
5
+ import { H as HostBlock, A as AuthWrapper, a as AuthColumn, b as AuthButtonsContainer, E as ErrorStyles } from './mixins-10353a39.js';
6
+ import { c as createStyleSheet } from './JSS-96eeab98.js';
7
+ import { l as luxon } from './luxon-f44215d9.js';
8
+ import { l as luxonLocale } from './utils-1d345130.js';
9
+ import { T as TextSpanView } from './sqm-text-span-view-7e61c95c.js';
10
+ import { P as PortalContainerView } from './sqm-portal-container-view-f74db584.js';
11
+ import { P as PortalSectionView } from './sqm-portal-section-view-88a80af9.js';
12
+
13
+ const medium = {
14
+ facebook: { color: "#1877f2", text: "#fff", icon: "facebook" },
15
+ twitter: { color: "#1da1f2", text: "#fff", icon: "twitter" },
16
+ email: { color: "#666666", text: "#fff", icon: "envelope" },
17
+ direct: { color: "var(--sl-color-primary-500)", text: "#fff", icon: "send" },
18
+ linkedin: { color: "#0077b5", text: "#fff", icon: "linkedin" },
19
+ sms: { color: "#34DA50", text: "#fff", icon: "chat" },
20
+ fbmessenger: { color: "#0084ff", text: "#fff", icon: "messenger" },
21
+ whatsapp: { color: "#25d366", text: "#fff", icon: "whatsapp" },
22
+ linemessenger: { color: "#00B300", text: "#fff", icon: "line" },
23
+ pinterest: { color: "#e60023", text: "#fff", icon: "pinterest" },
24
+ };
25
+ function ShareButtonView(props, children) {
26
+ const vanillaStyle = `
27
+ *::part(base) {
28
+ --sl-focus-ring-color-primary: ${props.backgroundcolor
29
+ ? props.backgroundcolor
30
+ : props.medium
31
+ ? medium[props.medium].color
32
+ : ""}80!important;
33
+
34
+ background: ${props.backgroundcolor
35
+ ? props.backgroundcolor
36
+ : props.medium
37
+ ? medium[props.medium].color
38
+ : ""};
39
+ color: ${props.textcolor
40
+ ? props.textcolor
41
+ : props.medium
42
+ ? medium[props.medium].text
43
+ : ""};
44
+ border-radius: ${props.borderradius ? props.borderradius + "px" : ""};
45
+ }
46
+
47
+ *::part(base):hover {
48
+ border-color: ${props.backgroundcolor
49
+ ? props.backgroundcolor
50
+ : props.medium
51
+ ? medium[props.medium].color
52
+ : ""}D1!important;
53
+ }
54
+
55
+ *::part(base):focus {
56
+ border-color: ${props.backgroundcolor
57
+ ? props.backgroundcolor
58
+ : props.medium
59
+ ? medium[props.medium].color
60
+ : ""}D1!important;
61
+ }
62
+
63
+ *::part(label) {
64
+ position: relative;
65
+ top: 2%;
66
+ }
67
+ `;
68
+ const style = {
69
+ HostBlock: HostBlock,
70
+ buttonStyle: {
71
+ display: "flex",
72
+ alignItems: "center",
73
+ justifyContent: "center",
74
+ lineHeight: "0",
75
+ },
76
+ };
77
+ const sheet = createStyleSheet(style);
78
+ const styleString = sheet.toString();
79
+ return props.hide ? (h(Host, { style: { display: "none" } })) : (h("div", null,
80
+ h("style", { type: "text/css" }, styleString),
81
+ h("style", { type: "text/css" }, vanillaStyle),
82
+ h("sl-button", { class: sheet.classes.buttonStyle, loading: props.loading, disabled: props.disabled, pill: props.pill, size: props.size, type: props.type, onClick: props.onClick, exportparts: `base: ${props.type}sharebutton-base` },
83
+ !props.hideicon && (h("sl-icon", { slot: props.iconslot || "prefix", name: props.icon ? props.icon : medium[props.medium].icon, exportparts: "icon" })),
84
+ !props.hidetext && children)));
85
+ }
86
+
87
+ const style = {
88
+ HostBlock: HostBlock,
89
+ inputStyle: {
90
+ "&::part(base)": { background: "white", opacity: "1", cursor: "pointer" },
91
+ },
92
+ };
93
+ const sheet = createStyleSheet(style);
94
+ const styleString = sheet.toString();
95
+ function ShareLinkView(props) {
96
+ return (h("div", null,
97
+ h("style", { type: "text/css" }, styleString),
98
+ h("sl-tooltip", { trigger: "manual", content: props.tooltiptext, placement: "top-end", disabled: props.disabled, open: props.open },
99
+ h("sl-input", { class: sheet.classes.inputStyle, exportparts: "label: input-label", value: props.shareString, readonly: true },
100
+ h("sl-icon-button", { onClick: () => { var _a; return (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props); }, slot: "suffix", name: "files", disabled: props.disabled })))));
101
+ }
102
+
103
+ const style$1 = {
104
+ Leaderboard: {
105
+ "& table": {
106
+ width: "100%",
107
+ borderCollapse: "collapse",
108
+ },
109
+ "& th": {
110
+ textAlign: "left",
111
+ padding: "var(--sl-spacing-medium)",
112
+ paddingTop: "0",
113
+ fontSize: "var(--sl-font-size-medium)",
114
+ fontWeight: "var(--sl-font-weight-semibold)",
115
+ },
116
+ "& tr:not(:first-child)": {
117
+ borderTop: "1px solid var(--sl-color-neutral-200)",
118
+ },
119
+ "& td": {
120
+ fontSize: "var(--sl-font-size-medium)",
121
+ fontWeight: "var(--sl-font-weight-normal)",
122
+ },
123
+ "& .ellipses": {
124
+ textAlign: "center",
125
+ padding: "0",
126
+ color: "var(--sl-color-neutral-500)",
127
+ },
128
+ "& .highlight": {
129
+ background: "var(--sl-color-primary-50)",
130
+ },
131
+ "& td, th": {
132
+ color: "var(--sl-color-gray-800)",
133
+ padding: "var(--sl-spacing-medium)",
134
+ },
135
+ "& .User": {
136
+ width: "100%",
137
+ },
138
+ "& .Score": {
139
+ width: "auto",
140
+ whiteSpace: "nowrap",
141
+ },
142
+ },
143
+ };
144
+ const sheet$1 = createStyleSheet(style$1);
145
+ const styleString$1 = sheet$1.toString();
146
+ const vanillaStyle = `
147
+ :host{
148
+ display: block;
149
+ }
150
+ `;
151
+ function LeaderboardView(props) {
152
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
153
+ const { states, data, elements } = props;
154
+ const { styles } = states;
155
+ console.log("LEADERBOARD PROPS", props);
156
+ if (states.loading)
157
+ return (h("div", { class: sheet$1.classes.Leaderboard },
158
+ h("style", { type: "text/css" },
159
+ styleString$1,
160
+ vanillaStyle),
161
+ elements.loadingstate));
162
+ let userSeenFlag = false;
163
+ if (!states.hasLeaders) {
164
+ return (h("div", { class: sheet$1.classes.Leaderboard },
165
+ h("style", { type: "text/css" },
166
+ styleString$1,
167
+ vanillaStyle),
168
+ h("table", null,
169
+ h("tr", null,
170
+ styles.showRank && h("th", { class: "Rank" }, styles.rankheading),
171
+ h("th", { class: "User" }, styles.usersheading),
172
+ h("th", { class: "Score" }, styles.statsheading))),
173
+ elements.empty));
174
+ }
175
+ return (h("div", { class: sheet$1.classes.Leaderboard },
176
+ h("style", { type: "text/css" },
177
+ styleString$1,
178
+ vanillaStyle),
179
+ h("table", null,
180
+ h("tr", null,
181
+ styles.showRank && h("th", { class: "Rank" }, styles.rankheading),
182
+ h("th", { class: "User" }, styles.usersheading),
183
+ h("th", { class: "Score" }, styles.statsheading)), (_a = data.leaderboard) === null || _a === void 0 ? void 0 :
184
+ _a.map((user) => {
185
+ var _a, _b;
186
+ if (user.rowNumber === ((_a = data.userRank) === null || _a === void 0 ? void 0 : _a.rowNumber))
187
+ userSeenFlag = true;
188
+ return (h("tr", { class: user.rowNumber === ((_b = data.userRank) === null || _b === void 0 ? void 0 : _b.rowNumber) ? "highlight" : "" },
189
+ styles.showRank && h("td", { class: "Rank" }, user.rank),
190
+ h("td", { class: "User" }, user.firstName && user.lastInitial
191
+ ? user.firstName + " " + user.lastInitial
192
+ : user.firstName || user.lastInitial
193
+ ? user.firstName || user.lastInitial
194
+ : styles.anonymousUser || "Anonymous User"),
195
+ h("td", { class: "Score" }, user.value)));
196
+ }),
197
+ states.hasLeaders && !userSeenFlag && data.showUser && (h("tr", null,
198
+ h("td", { colSpan: 100, class: "ellipses" },
199
+ h("sl-icon", { name: "three-dots", style: { verticalAlign: "middle" } })))),
200
+ states.hasLeaders && !userSeenFlag && data.showUser && (h("tr", { class: "highlight" },
201
+ styles.showRank && (h("td", { class: "Rank" }, ((_b = data.userRank) === null || _b === void 0 ? void 0 : _b.rank) || "-")),
202
+ h("td", { class: "User" }, ((_c = data.userRank) === null || _c === void 0 ? void 0 : _c.firstName) && ((_d = data.userRank) === null || _d === void 0 ? void 0 : _d.lastInitial)
203
+ ? ((_e = data.userRank) === null || _e === void 0 ? void 0 : _e.firstName) + " " + ((_f = data.userRank) === null || _f === void 0 ? void 0 : _f.lastInitial)
204
+ : ((_g = data.userRank) === null || _g === void 0 ? void 0 : _g.firstName) || ((_h = data.userRank) === null || _h === void 0 ? void 0 : _h.lastInitial)
205
+ ? ((_j = data.userRank) === null || _j === void 0 ? void 0 : _j.firstName) || ((_k = data.userRank) === null || _k === void 0 ? void 0 : _k.lastInitial)
206
+ : styles.anonymousUser || "Anonymous User"),
207
+ h("td", { class: "Score" }, ((_l = data.userRank) === null || _l === void 0 ? void 0 : _l.value) || "0"))),
208
+ data.leaderboard.length ? elements.empty : "")));
209
+ }
210
+
211
+ const style$2 = {
212
+ HostBlock: HostBlock,
213
+ ":host": {
214
+ "min-height": "100vh",
215
+ },
216
+ Frame: {
217
+ "min-height": "100vh",
218
+ display: "flex",
219
+ "flex-direction": "column",
220
+ "box-sizing": "border-box",
221
+ },
222
+ FooterWrapper: {
223
+ width: "100%",
224
+ "max-width": "100%",
225
+ padding: "var(--sl-spacing-medium) var(--sl-spacing-x-large)",
226
+ background: "var(--sqm-footer-background)",
227
+ display: "flex",
228
+ "justify-content": "flex-end",
229
+ "align-items": "center",
230
+ "box-sizing": "border-box",
231
+ "margin-top": "auto",
232
+ },
233
+ HeaderWrapper: {
234
+ width: "100%",
235
+ "max-width": "100%",
236
+ "box-sizing": "border-box",
237
+ display: "flex",
238
+ "justify-content": "space-between",
239
+ padding: "var(--sl-spacing-small) var(--sl-spacing-large)",
240
+ "align-items": "center",
241
+ "background-color": "var(--sqm-header-background)",
242
+ "@media screen and (max-width: 499px)": {
243
+ "flex-direction": "row-reverse",
244
+ "justify-content": "flex-end",
245
+ padding: "0",
246
+ },
247
+ },
248
+ };
249
+ const sheet$2 = createStyleSheet(style$2);
250
+ const styleString$2 = sheet$2.toString();
251
+ function PortalFrameView(props, children) {
252
+ const { data } = props;
253
+ return (h("div", { class: sheet$2.classes.Frame },
254
+ h("style", { type: "text/css" }, styleString$2),
255
+ h("div", { class: sheet$2.classes.HeaderWrapper },
256
+ data.header,
257
+ h("slot", { name: "sqm-navigation-menu" })),
258
+ children,
259
+ h("div", { class: sheet$2.classes.FooterWrapper }, data.footer)));
260
+ }
261
+
262
+ const EditProfileView = (props) => {
263
+ var _a, _b, _c, _d;
264
+ const { states, callbacks } = props;
265
+ const { text } = states;
266
+ const { errors } = states.formState;
267
+ if (states.showEdit) {
268
+ return (h("div", { class: `CardWrapper ${!states.showEdit && "ShowEdit"}` },
269
+ h("h2", { style: {
270
+ fontSize: "var(--sl-font-size-x-large)",
271
+ margin: "0px",
272
+ textAlign: "center",
273
+ } }, text.editprofileheader),
274
+ h("form", { class: "FormWrapper", onSubmit: callbacks.onSubmit },
275
+ h("div", { class: "FormSection" },
276
+ states.formState.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
277
+ h("div", { part: "erroralert-text" }, states.formState.error))),
278
+ h("sl-input", Object.assign({ exportparts: "label: input-label", value: states.formState.firstName, onInput: callbacks.onChange, label: text.firstnametext, disabled: states.loading }, (errors.firstName && errors.firstName.status !== "valid"
279
+ ? { class: "ErrorStyles", helpText: "Cannot be empty" }
280
+ : []), { id: "firstName", name: "firstName", error: errors.firstName && errors.firstName.status !== "valid"
281
+ ? errors.firstName.message
282
+ : undefined })),
283
+ h("sl-input", Object.assign({ exportparts: "label: input-label", value: states.formState.lastName, onInput: callbacks.onChange, label: text.lastnametext, disabled: states.loading, id: "lastName", name: "lastName" }, (errors.lastName && errors.lastName.status !== "valid"
284
+ ? { class: "ErrorStyles", helpText: "Cannot be empty" }
285
+ : []), { error: errors.lastName && errors.lastName.status !== "valid"
286
+ ? errors.lastName.message
287
+ : undefined }))),
288
+ text.showregion && states.formState.currentRegion && (h("sl-input", { exportparts: "label: input-label", disabled: true, value: states.formState.currentRegion, label: text.currentregiontext, id: "currentRegion", name: "currentRegion" })),
289
+ h("div", { class: "ButtonWrapper" },
290
+ h("sl-button", { onClick: () => {
291
+ callbacks.setShowEdit(false);
292
+ }, exportparts: "base: defaultbutton-base" }, text.canceltext),
293
+ h("sl-button", { type: "primary", loading: states.loading, disabled: states.submitDisabled, onClick: (e) => {
294
+ callbacks.onSubmit(e);
295
+ }, submit: true, exportparts: "base: primarybutton-base" }, text.updatetext)))));
296
+ }
297
+ return (h("div", { class: `CardWrapper FormWrapper ${!states.showEdit && "ShowEdit"}` },
298
+ h("div", { class: "FormSection" },
299
+ h("h2", { style: {
300
+ fontSize: "var(--sl-font-size-x-large",
301
+ marginBottom: "0px",
302
+ textAlign: "center",
303
+ } }, text.editprofileheader),
304
+ h("div", null,
305
+ h("p", { style: { fontSize: "var(--sl-font-size-medium)" } }, (_a = states.user) === null || _a === void 0 ? void 0 :
306
+ _a.firstName,
307
+ " ", (_b = states.user) === null || _b === void 0 ? void 0 :
308
+ _b.lastName),
309
+ h("p", { style: { fontSize: "var(--sl-font-size-medium)" }, title: (_c = states.user) === null || _c === void 0 ? void 0 : _c.email }, (_d = states.user) === null || _d === void 0 ? void 0 : _d.email))),
310
+ h("sl-button", { type: "primary", loading: states.loading, onClick: () => {
311
+ callbacks.resetForm();
312
+ callbacks.setShowEdit(true);
313
+ }, exportparts: "base: primarybutton-base" }, text.editprofiletext)));
314
+ };
315
+
316
+ const MessageLinkQuery = dist.gql `
317
+ query ($programId: ID) {
318
+ user: viewer {
319
+ ... on User {
320
+ shareLink(programId: $programId)
321
+ }
322
+ }
323
+ }
324
+ `;
325
+ const WIDGET_ENGAGEMENT_EVENT = dist.gql `
326
+ mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
327
+ createUserAnalyticsEvent(eventMeta: $eventMeta)
328
+ }
329
+ `;
330
+ function useShareLink(props) {
331
+ var _a, _b;
332
+ const { programId = M() } = props;
333
+ const user = ne();
334
+ const engagementMedium = x();
335
+ const { data } = mn(MessageLinkQuery, { programId }, !(user === null || user === void 0 ? void 0 : user.jwt));
336
+ const [sendLoadEvent] = De(WIDGET_ENGAGEMENT_EVENT);
337
+ const shareString = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.shareLink) !== null && _b !== void 0 ? _b :
338
+ // Shown during loading
339
+ "...";
340
+ const [open, setOpen] = useState(false);
341
+ function onClick() {
342
+ // Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
343
+ // Only if called from a user-initiated event
344
+ navigator.clipboard.writeText(shareString);
345
+ setOpen(true);
346
+ setTimeout(() => setOpen(false), props.tooltiplifespan);
347
+ sendLoadEvent({
348
+ eventMeta: {
349
+ programId,
350
+ id: user === null || user === void 0 ? void 0 : user.id,
351
+ accountId: user === null || user === void 0 ? void 0 : user.accountId,
352
+ type: "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",
353
+ meta: {
354
+ engagementMedium,
355
+ shareMedium: "DIRECT",
356
+ },
357
+ },
358
+ });
359
+ }
360
+ return { ...props, onClick, open, shareString };
361
+ }
362
+
363
+ const MessageLinkQuery$1 = dist.gql `
364
+ query (
365
+ $programId: ID
366
+ $engagementMedium: UserEngagementMedium!
367
+ $shareMedium: ReferralShareMedium!
368
+ ) {
369
+ viewer {
370
+ ... on User {
371
+ messageLink(
372
+ programId: $programId
373
+ engagementMedium: $engagementMedium
374
+ shareMedium: $shareMedium
375
+ )
376
+ shareLink(programId: $programId, engagementMedium: $engagementMedium)
377
+ }
378
+ }
379
+ }
380
+ `;
381
+ function NativeShare(props, directLink) {
382
+ const title = props.sharetitle || "Share title";
383
+ const text = props.sharetext || "Share text";
384
+ if (directLink === "undefined") {
385
+ return alert("error: message link undefined!");
386
+ }
387
+ if (window.navigator.share) {
388
+ window.navigator
389
+ .share({
390
+ title,
391
+ text,
392
+ url: directLink,
393
+ })
394
+ .catch((error) => console.error("Error on web share", error));
395
+ }
396
+ else {
397
+ alert("Not on a supported device");
398
+ }
399
+ }
400
+ function FacebookShare(directLink, res) {
401
+ var _a, _b;
402
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.messageLink) === "undefined" ||
403
+ directLink === "undefined") {
404
+ return alert("error: message link undefined!");
405
+ }
406
+ if (typeof SquatchAndroid.shareOnFacebook !== "undefined") {
407
+ return SquatchAndroid.shareOnFacebook(directLink, res.data.viewer.messageLink);
408
+ }
409
+ else {
410
+ return GenericShare(res);
411
+ }
412
+ }
413
+ function GenericShare(res) {
414
+ var _a, _b;
415
+ return ((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.messageLink) ? window.open(res.data.viewer.messageLink)
416
+ : alert("error: message link undefined!");
417
+ }
418
+ function useShareButton(props) {
419
+ var _a, _b;
420
+ const { sharetitle, sharetext, medium } = props;
421
+ const programId = props.programId ? props.programId : M();
422
+ const user = ne();
423
+ const variables = {
424
+ engagementMedium: x(),
425
+ programId: programId,
426
+ shareMedium: medium.toUpperCase(),
427
+ };
428
+ // only queries if a programId is available
429
+ const res = mn(MessageLinkQuery$1, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId);
430
+ const directLink = (_b = (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.shareLink;
431
+ const environment = D();
432
+ const hide = (medium.toLocaleUpperCase() === "SMS" &&
433
+ window.orientation === undefined) ||
434
+ (medium.toLocaleUpperCase() === "DIRECT" && !window.navigator.share);
435
+ function onClick() {
436
+ if (medium.toLocaleUpperCase() === "FACEBOOK" &&
437
+ environment.type === "SquatchAndroid") {
438
+ FacebookShare(directLink, res);
439
+ }
440
+ else if (medium.toLocaleUpperCase() === "DIRECT") {
441
+ NativeShare({ sharetitle, sharetext }, directLink);
442
+ }
443
+ else {
444
+ GenericShare(res);
445
+ }
446
+ }
447
+ return { ...props, loading: res.loading, onClick, hide };
448
+ }
449
+
450
+ function PortalChangePasswordView(props) {
451
+ const { states, callbacks } = props;
452
+ const style = {
453
+ Dialog: {
454
+ padding: "0",
455
+ "&::part(close-button)": {
456
+ "margin-top": "var(--sl-spacing-medium)",
457
+ },
458
+ "&::part(body)": {
459
+ padding: "0 var(--sl-spacing-x-large) var(--sl-spacing-x-large) var(--sl-spacing-x-large)",
460
+ },
461
+ },
462
+ Error: {
463
+ "&::part(erroralert-base)": {
464
+ "margin-bottom": "15px",
465
+ },
466
+ },
467
+ Success: {
468
+ "&::part(successalert-base)": {
469
+ "margin-bottom": "15px",
470
+ },
471
+ },
472
+ InputContainer: {
473
+ "& > :not(:last-child)": {
474
+ "margin-bottom": "var(--sl-spacing-x-large)",
475
+ },
476
+ },
477
+ CancelButton: {
478
+ width: "25%",
479
+ margin: "var(--sl-spacing-large) auto",
480
+ },
481
+ PasswordField: {
482
+ marginBottom: "var(--sl-spacing-large) !important",
483
+ display: "block",
484
+ },
485
+ ChangePasswordButton: {
486
+ paddingTop: "var(--sl-spacing-x-large)",
487
+ },
488
+ };
489
+ const sheet = createStyleSheet(style);
490
+ const styleString = sheet.toString();
491
+ return (h("div", null,
492
+ h("style", { type: "text/css" }, styleString),
493
+ h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, "onSl-hide": () => callbacks.setOpen(false) },
494
+ h(PortalSectionView, Object.assign({}, {
495
+ labelMargin: "x-large",
496
+ padding: "none",
497
+ label: (h(TextSpanView, Object.assign({}, { type: "h2" }), states.content.modalChangePasswordHeader)),
498
+ content: (h(PortalContainerView, Object.assign({}, { direction: "column", padding: "none", gap: "32px" }),
499
+ states.error && (h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
500
+ h("div", { part: "erroralert-text" }, states.error))),
501
+ states.success && (h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
502
+ h("div", { part: "successalert-text" }, states.content.successMessage))),
503
+ h("sl-form", { "onSl-submit": callbacks.submit },
504
+ h("div", { class: sheet.classes.InputContainer },
505
+ h("sqm-password-field", { exportparts: "input-label: input-label", class: sheet.classes.PasswordField, fieldLabel: states.content.passwordFieldLabel }),
506
+ h("sl-input", { exportparts: "label: input-label", name: "/confirmPassword", label: states.content.confirmPasswordFieldLabel, required: true, togglePassword: true, disabled: states.loading, type: "password" })),
507
+ h(PortalContainerView, Object.assign({}, { direction: "row", padding: "none", gap: "20px" }),
508
+ h("sl-button", { class: sheet.classes.ChangePasswordButton, type: "primary", submit: true, loading: states.loading }, states.content.changePasswordButtonText),
509
+ h("sl-button", { class: sheet.classes.CancelButton, type: "text", onClick: () => callbacks.setOpen(false) }, states.content.cancelText))))),
510
+ }))),
511
+ h(PortalSectionView, Object.assign({}, {
512
+ labelMargin: "x-large",
513
+ padding: "xxx-large",
514
+ label: (h(TextSpanView, Object.assign({}, { type: "h2" }), states.content.portalChangePasswordHeader)),
515
+ content: (h("sl-button", { onClick: () => callbacks.setOpen(true) }, states.content.portalChangePasswordButtonText)),
516
+ }),
517
+ h("style", { type: "text/css" }, styleString))));
518
+ }
519
+
520
+ const style$3 = {
521
+ Wrapper: AuthWrapper,
522
+ Column: AuthColumn,
523
+ ForgotButtonContainer: {
524
+ display: "inline",
525
+ cursor: "pointer",
526
+ "font-size": "13px",
527
+ "font-weight": "600",
528
+ color: "#AAAAAA",
529
+ margin: "0",
530
+ },
531
+ ButtonsContainer: AuthButtonsContainer,
532
+ };
533
+ const vanillaStyle$1 = `
534
+ :host {
535
+ display: block;
536
+ }
537
+ :host([hidden]): {
538
+ display: none;
539
+ }
540
+ `;
541
+ const sheet$3 = createStyleSheet(style$3);
542
+ const styleString$3 = sheet$3.toString();
543
+ function PortalLoginView(props) {
544
+ const { states, callbacks, content } = props;
545
+ return (h("div", { class: sheet$3.classes.Wrapper },
546
+ h("style", { type: "text/css" },
547
+ vanillaStyle$1,
548
+ styleString$3),
549
+ h(TextSpanView, { type: "h3" }, content.pageLabel),
550
+ h("sl-form", { class: sheet$3.classes.Column, "onSl-submit": callbacks.submit },
551
+ props.states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
552
+ h("div", { part: "erroralert-text" }, props.states.error))),
553
+ h("sl-input", { exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true }),
554
+ h("div", null,
555
+ h("sl-input", { exportparts: "label: input-label", type: "password", name: "/password", label: content.passwordLabel || "Password", disabled: states.loading, required: true }),
556
+ h("div", { class: sheet$3.classes.ForgotButtonContainer }, content.forgotPasswordButton)),
557
+ h("div", { class: sheet$3.classes.ButtonsContainer },
558
+ h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Login"),
559
+ content.secondaryButton))));
560
+ }
561
+
562
+ const style$4 = {
563
+ Wrapper: { ...AuthWrapper, "max-width": "600px" },
564
+ Column: AuthColumn,
565
+ HostBlock: HostBlock,
566
+ ":host": {
567
+ margin: "0 auto",
568
+ width: "100%",
569
+ },
570
+ ButtonsContainer: AuthButtonsContainer,
571
+ ErrorStyle: ErrorStyles,
572
+ };
573
+ const vanillaStyle$2 = `
574
+ sqm-portal-register {
575
+ margin: 0 auto;
576
+ width: 100%;
577
+ display: block;
578
+ }
579
+
580
+ :host{
581
+ display: block;
582
+ }
583
+
584
+ :host([hidden]) {
585
+ display: none;
586
+ }
587
+ `;
588
+ const sheet$4 = createStyleSheet(style$4);
589
+ const styleString$4 = sheet$4.toString();
590
+ function PortalRegisterView(props) {
591
+ var _a, _b, _c, _d, _e, _f, _g, _h;
592
+ const { states, refs, callbacks, content } = props;
593
+ if (states.error) {
594
+ window.scrollTo({ top: 0, left: 0, behavior: "smooth" });
595
+ }
596
+ return (h("div", { class: sheet$4.classes.Wrapper },
597
+ h("style", { type: "text/css" },
598
+ vanillaStyle$2,
599
+ styleString$4),
600
+ h(TextSpanView, { type: "h3" }, content.pageLabel),
601
+ h("sl-form", { class: sheet$4.classes.Column, "onSl-submit": callbacks.submit, ref: (el) => (refs.formRef.current = el), novalidate: true },
602
+ states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
603
+ h("div", { part: "erroralert-text" }, props.states.error))),
604
+ content.formData,
605
+ !states.hideInputs && (h("sl-input", Object.assign({ exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true, validationError: ({ value }) => {
606
+ if (!value) {
607
+ return "Cannot be empty";
608
+ }
609
+ // this matches shoelace validation, but could be better
610
+ if (!value.includes("@")) {
611
+ return "Must be a valid email address";
612
+ }
613
+ } }, (((_b = (_a = states.validationState) === null || _a === void 0 ? void 0 : _a.validationErrors) === null || _b === void 0 ? void 0 : _b.email) ? {
614
+ class: sheet$4.classes.ErrorStyle,
615
+ helpText: ((_d = (_c = states.validationState) === null || _c === void 0 ? void 0 : _c.validationErrors) === null || _d === void 0 ? void 0 : _d.email) ||
616
+ "Cannot be empty",
617
+ }
618
+ : [])))),
619
+ !states.hideInputs && (h("sqm-password-field", { fieldLabel: content.passwordLabel, "enable-validation": states.enablePasswordValidation })),
620
+ content.passwordField,
621
+ !states.hideInputs && states.confirmPassword && (h("sl-input", Object.assign({ exportparts: "label: input-label", type: "password", name: "/confirmPassword", label: content.confirmPasswordLabel, disabled: states.loading, required: true }, (((_f = (_e = states.validationState) === null || _e === void 0 ? void 0 : _e.validationErrors) === null || _f === void 0 ? void 0 : _f.confirmPassword) ? {
622
+ class: sheet$4.classes.ErrorStyle,
623
+ helpText: ((_h = (_g = states.validationState) === null || _g === void 0 ? void 0 : _g.validationErrors) === null || _h === void 0 ? void 0 : _h.confirmPassword) ||
624
+ "Cannot be empty",
625
+ }
626
+ : [])))),
627
+ content.terms,
628
+ h("div", { class: sheet$4.classes.ButtonsContainer },
629
+ h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
630
+ content.secondaryButton))));
631
+ }
632
+
633
+ const style$5 = {
634
+ Description: {
635
+ "& input[type=checkbox]": {
636
+ display: "none",
637
+ },
638
+ "& input:checked ~ .details": {
639
+ transform: "rotate(-180deg)",
640
+ },
641
+ "& .details": {
642
+ position: "absolute",
643
+ top: "var(--sl-spacing-medium)",
644
+ right: "var(--sl-spacing-medium)",
645
+ color: "var(--sl-color-neutral-700)",
646
+ fontSize: "var(--sl-font-size-large)",
647
+ "& :hover": {
648
+ color: "var(--sl-color-primary-700)",
649
+ },
650
+ transformOrigin: "50% 37%",
651
+ transition: "transform var(--sl-transition-medium) ease",
652
+ cursor: "pointer",
653
+ },
654
+ "& input:checked ~ .summary": {
655
+ transition: "all var(--sl-transition-medium) ease",
656
+ maxHeight: "300px",
657
+ marginBottom: "var(--sl-spacing-x-large)",
658
+ },
659
+ "& input:checked ~ .summary[progress-bar]": {
660
+ marginBottom: "var(--sl-spacing-xx-large)",
661
+ },
662
+ "& .summary": {
663
+ display: "block",
664
+ overflow: "hidden",
665
+ fontSize: "var(--sl-font-size-small)",
666
+ maxHeight: "0px",
667
+ transition: "all var(--sl-transition-fast) ease-out",
668
+ marginBottom: "var(--sl-spacing-medium)",
669
+ },
670
+ },
671
+ };
672
+ const sheet$5 = createStyleSheet(style$5);
673
+ const styleString$5 = sheet$5.toString();
674
+ function Details(props) {
675
+ const rid = Math.random().toString(36).slice(2);
676
+ return (h("div", null,
677
+ h("style", { type: "text/css" }, styleString$5),
678
+ h("span", { class: sheet$5.classes.Description },
679
+ h("input", { type: "checkbox", id: "details-" + rid }),
680
+ h("label", { class: "details", htmlFor: "details-" + rid },
681
+ h("sl-icon", { name: "chevron-down" })),
682
+ h("span", { class: "summary", "progress-bar": props.progressBar }, props.content.description))));
683
+ }
684
+
685
+ const Gift = () => {
686
+ return (h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
687
+ h("path", { d: "M15 5H12.4508H9V16H13.5C14.0523 16 14.5 15.5523 14.5 15V9H15C15.5523 9 16 8.55228 16 8V6C16 5.44772 15.5523 5 15 5Z", fill: "#F2C94C" }),
688
+ h("path", { d: "M1.5 9V15C1.5 15.5523 1.94772 16 2.5 16H7V5H4.64242H1C0.447715 5 0 5.44772 0 6V8C0 8.55228 0.447715 9 1 9H1.5Z", fill: "#F2C94C" }),
689
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M1.5 9V10H14.5V9H1.5Z", fill: "#BE9720" }),
690
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M14 2.70949C14 3.59565 12.6694 4.93746 12 5H9V16H7.00179V5H4.58792C3.21247 4.70182 2 3.64537 2 2.52072C2 1.42474 2.47603 0.556701 3.34184 0.182041C4.16921 -0.175986 5.12452 0.0203328 5.87976 0.544666C6.80676 1.18825 7.32679 2.3963 7.79856 3.49226C7.83996 3.58845 7.88099 3.68378 7.9219 3.77778C7.96173 3.68865 8.00186 3.59793 8.0425 3.50608C8.50995 2.44948 9.04359 1.24325 9.9404 0.59563C10.7332 0.0231438 11.741 -0.193157 12.6121 0.198945C13.5129 0.604397 14 1.53453 14 2.70949ZM10.6123 1.5C11.0928 1.15305 11.668 1.09012 12.1597 1.5C12.5879 1.85694 12.6108 2.02497 12.6658 2.42926L12.6755 2.5C12.6755 3.09851 12.1597 4 11.6439 4C11.2785 4 10.9914 3.99691 10.7224 3.99402C10.2319 3.98875 9.80131 3.98412 9.06496 4C9.20533 3.72786 9.31743 3.46669 9.42434 3.21761C9.71026 2.55143 9.95907 1.97176 10.6123 1.5ZM4.93861 1.5C4.70607 1.33855 4.17281 1.4106 3.95166 1.5063C3.76894 1.58537 3.49602 1.82658 3.49602 2.52072C3.49602 3.19524 4.58792 3.77778 4.58792 3.77778C4.58792 3.77778 5.45441 4 7.00179 4C6.47506 2.69451 5.7289 2.04867 4.93861 1.5Z", fill: "#EB5757" })));
691
+ };
692
+
693
+ const style$6 = {
694
+ ProgressBar: {
695
+ "& .progress-bar": {
696
+ height: "0",
697
+ marginTop: "var(--sl-spacing-large)",
698
+ marginBottom: "var(--sl-spacing-xxx-large)",
699
+ marginRight: "var(--sl-spacing-x-small)",
700
+ fontSize: "var(--sl-font-size-x-small)",
701
+ display: "grid",
702
+ lineHeight: "45px",
703
+ userSelect: "none",
704
+ },
705
+ "&[data-steps]": {
706
+ marginTop: "calc(-1*var(--sl-spacing-x-small))",
707
+ },
708
+ "&[data-steps] .progress-bar": {
709
+ marginTop: "var(--sl-spacing-medium)",
710
+ },
711
+ "&[data-expired] .progress-bar": {
712
+ filter: "grayscale(1)",
713
+ },
714
+ "& .progress-bar.repeatable-steps": {
715
+ marginLeft: "var(--sl-spacing-x-small)",
716
+ },
717
+ "& .filled:after": {
718
+ content: '""',
719
+ display: "flex",
720
+ width: "100%",
721
+ height: "4px",
722
+ borderRadius: "4px",
723
+ backgroundColor: "var(--sl-color-primary-300)",
724
+ },
725
+ "& .progress": {
726
+ display: "block",
727
+ textAlign: "center",
728
+ marginLeft: "-100px",
729
+ marginRight: "-100px",
730
+ },
731
+ "& .progress::after": {
732
+ content: '""',
733
+ width: "12px",
734
+ height: "12px",
735
+ display: "flex",
736
+ backgroundColor: "var(--sl-color-primary-300)",
737
+ borderRadius: "50%",
738
+ position: "relative",
739
+ left: "47%",
740
+ top: "-85%",
741
+ },
742
+ "& .progress.bg:after": {
743
+ width: "0",
744
+ height: "0",
745
+ border: "none",
746
+ },
747
+ "& .progress.top": {
748
+ position: "relative",
749
+ top: "-40px",
750
+ },
751
+ "& .progress.top:after": {
752
+ top: "-16%",
753
+ },
754
+ "& .empty": {
755
+ display: "block",
756
+ textAlign: "center",
757
+ marginLeft: "-100px",
758
+ marginRight: "-100px",
759
+ },
760
+ "& .empty::after": {
761
+ content: '""',
762
+ width: "12px",
763
+ height: "12px",
764
+ border: "2px solid #E0E0E0",
765
+ margin: "-2px",
766
+ display: "flex",
767
+ backgroundColor: "white",
768
+ borderRadius: "50%",
769
+ position: "relative",
770
+ left: "47%",
771
+ top: "-85%",
772
+ },
773
+ "& .empty.bg:after": {
774
+ width: "0",
775
+ height: "0",
776
+ border: "none",
777
+ },
778
+ "& .remain:after": {
779
+ content: '""',
780
+ display: "flex",
781
+ width: "100%",
782
+ height: "4px",
783
+ borderRadius: "4px",
784
+ backgroundColor: "#E0E0E0",
785
+ },
786
+ "& .gift.bw": {
787
+ filter: "grayscale(100%)",
788
+ },
789
+ "& .gift.start": {
790
+ transform: "scale(80%)",
791
+ top: "-20px",
792
+ },
793
+ "& .gift": {
794
+ textAlign: "center",
795
+ marginLeft: "-100px",
796
+ marginRight: "-100px",
797
+ position: "relative",
798
+ top: "-18px",
799
+ },
800
+ },
801
+ };
802
+ const sheet$6 = createStyleSheet(style$6, { classNamePrefix: "sqm-prog-bar" });
803
+ const styleString$6 = sheet$6.toString();
804
+ function ProgressBarView(props) {
805
+ var _a;
806
+ const { progress = 0, goal = 1, steps = false, progressBarUnit = "", repeatable = false, expired = false, finite = 0, } = props;
807
+ let aggregate = buildProgressBar(repeatable, steps, props);
808
+ const { columns, items } = aggregate;
809
+ //@ts-ignore
810
+ console.log("PROGRESS BAR PROPS " + ((_a = props === null || props === void 0 ? void 0 : props.content) === null || _a === void 0 ? void 0 : _a.cardTitle));
811
+ console.log({ props });
812
+ return (h("div", { class: sheet$6.classes.ProgressBar, "data-expired": expired, "data-steps": steps, "data-done": goal <= progress },
813
+ h("style", { type: "text/css" }, styleString$6),
814
+ h("div", { class: (!Boolean(finite) && progress >= 2 * goal) ||
815
+ (Boolean(finite) && progress > 2 * goal)
816
+ ? "progress-bar repeatable-steps"
817
+ : "progress-bar", style: {
818
+ gridTemplateColumns: columns,
819
+ marginLeft: progress === 0 && !steps ? "var(--sl-spacing-x-small)" : "",
820
+ } }, items)));
821
+ }
822
+ function buildProgressBar(repeatable, steps, props) {
823
+ if (repeatable) {
824
+ if (steps) {
825
+ return addStepsRepeatable(props);
826
+ }
827
+ else {
828
+ return addLinearRepeatable(props);
829
+ }
830
+ }
831
+ // non repeatable
832
+ else {
833
+ if (steps) {
834
+ return addSteps(props);
835
+ }
836
+ else {
837
+ return addLinear(props);
838
+ }
839
+ }
840
+ }
841
+ function addSteps({ progress, goal }) {
842
+ const items = [];
843
+ const columns = [];
844
+ let ratio = 1 / goal;
845
+ for (let i = 1; i < goal; i++) {
846
+ columns.push(ratio + "fr");
847
+ columns.push("0fr");
848
+ if (i > progress) {
849
+ items.push(h("div", { class: "remain" }));
850
+ items.push(h("div", { class: "empty" }, i));
851
+ }
852
+ else {
853
+ items.push(h("div", { class: "filled" }));
854
+ items.push(h("div", { class: "progress" }, i));
855
+ }
856
+ }
857
+ columns.push(ratio + "fr");
858
+ columns.push("0fr");
859
+ // reward success
860
+ if (goal <= progress) {
861
+ columns.push("0fr");
862
+ items.push(h("div", { class: "filled" }));
863
+ items.push(h("div", { class: "progress bg" }, goal));
864
+ items.push(h("div", { class: "gift" }, h(Gift, null)));
865
+ }
866
+ // reward fail
867
+ else {
868
+ columns.push("0fr");
869
+ items.push(h("div", { class: "remain" }));
870
+ items.push(h("div", { class: "empty bg" }, goal));
871
+ items.push(h("div", { class: "gift bw" }, h(Gift, null)));
872
+ }
873
+ return {
874
+ items,
875
+ columns: columns.join(" "),
876
+ };
877
+ }
878
+ function addLinearRepeatable({ progress, goal, progressBarUnit, finite, }) {
879
+ let repetitions = Math.floor(progress / goal);
880
+ let ratio = ((progress % goal) / goal) * 0.5;
881
+ const items = [];
882
+ let columns = "";
883
+ // 0 repetition
884
+ if (repetitions == 0) {
885
+ columns = ratio + "fr 0fr " + (0.5 - ratio) + "fr 0fr 0fr 0.5fr 0fr 0fr";
886
+ items.push(h("div", { class: "filled" }));
887
+ items.push(h("div", { class: progress == goal ? "progress top bg" : "progress top" }, progressBarUnit + progress));
888
+ items.push(h("div", { class: "remain" }));
889
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal));
890
+ items.push(h("div", { class: progress == goal ? "gift" : "gift bw" },
891
+ h(Gift, null)));
892
+ items.push(h("div", { class: "remain" }));
893
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * 2));
894
+ items.push(h("div", { class: "gift bw" }, h(Gift, null)));
895
+ }
896
+ // single repetition
897
+ else if (repetitions == 1) {
898
+ columns =
899
+ "0.5fr 0fr 0fr " + ratio + "fr 0fr " + (0.5 - ratio) + "fr 0fr 0fr";
900
+ items.push(h("div", { class: "filled" }));
901
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal));
902
+ items.push(h("div", { class: "gift" }, h(Gift, null)));
903
+ items.push(h("div", { class: "filled" }));
904
+ items.push(h("div", { class: progress == goal ? "progress top bg" : "progress top" }, progress == goal ? "" : progressBarUnit + progress));
905
+ items.push(h("div", { class: "remain" }));
906
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * 2));
907
+ items.push(h("div", { class: "gift bw" }, h(Gift, null)));
908
+ }
909
+ // finite repetition hit
910
+ else if (finite && repetitions >= finite) {
911
+ if (repetitions > 2) {
912
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * (finite - 2)));
913
+ items.push(h("div", { class: "gift start" }, h(Gift, null)));
914
+ columns = "0fr 0fr 0.5fr 0fr 0fr 0.5fr 0fr 0fr";
915
+ }
916
+ else {
917
+ columns = "0.5fr 0fr 0fr 0.5fr 0fr 0fr";
918
+ }
919
+ items.push(h("div", { class: "filled" }));
920
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * (finite - 1)));
921
+ items.push(h("div", { class: "gift" }, h(Gift, null)));
922
+ items.push(h("div", { class: "filled" }));
923
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * finite));
924
+ items.push(h("div", { class: "gift" }, h(Gift, null)));
925
+ }
926
+ // multiple repetitions
927
+ else {
928
+ columns =
929
+ "0fr 0fr 0.5fr 0fr 0fr " +
930
+ ratio +
931
+ "fr 0fr " +
932
+ (0.5 - ratio) +
933
+ "fr 0fr 0fr";
934
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * (repetitions - 1)));
935
+ items.push(h("div", { class: "gift start" }, h(Gift, null)));
936
+ items.push(h("div", { class: "filled" }));
937
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * repetitions));
938
+ items.push(h("div", { class: "gift" }, h(Gift, null)));
939
+ items.push(h("div", { class: "filled" }));
940
+ items.push(h("div", { class: progress == goal * repetitions ? "progress top bg" : "progress top" }, progress == goal * repetitions ? "" : progressBarUnit + progress));
941
+ items.push(h("div", { class: "remain" }));
942
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal * (repetitions + 1)));
943
+ items.push(h("div", { class: "gift bw" }, h(Gift, null)));
944
+ }
945
+ return { items, columns };
946
+ }
947
+ function addStepsRepeatable({ progress, goal, finite, }) {
948
+ const items = [];
949
+ const columns = [];
950
+ let repetitions = Math.floor(progress / goal);
951
+ // no or single repetition
952
+ if (repetitions < 2) {
953
+ let ratio = 1 / goal;
954
+ for (let i = 1; i < goal * 2 + 1; i++) {
955
+ columns.push(ratio + "fr");
956
+ columns.push("0fr");
957
+ if (i > progress) {
958
+ if (i == goal) {
959
+ columns.push("0fr");
960
+ items.push(h("div", { class: "remain" }));
961
+ items.push(h("div", { class: "empty bg" }, goal));
962
+ items.push(h("div", { class: "gift bw" }, h(Gift, null)));
963
+ }
964
+ else if (i == goal * 2) {
965
+ columns.push("0fr");
966
+ columns.push("0fr");
967
+ items.push(h("div", { class: "remain" }));
968
+ items.push(h("div", { class: "empty bg" }, goal * 2));
969
+ items.push(h("div", { class: "gift bw" }, h(Gift, null)));
970
+ }
971
+ else {
972
+ items.push(h("div", { class: "remain" }));
973
+ items.push(h("div", { class: "empty" }, i));
974
+ }
975
+ }
976
+ else if (i == goal) {
977
+ columns.push("0fr");
978
+ items.push(h("div", { class: "filled" }));
979
+ items.push(h("div", { class: "progress bg" }, i));
980
+ items.push(h("div", { class: "gift" }, h(Gift, null)));
981
+ }
982
+ else {
983
+ items.push(h("div", { class: "filled" }));
984
+ items.push(h("div", { class: "progress" }, i));
985
+ }
986
+ }
987
+ }
988
+ // finite repetition hit
989
+ else if (finite && repetitions >= finite) {
990
+ let ratio = 1 / goal;
991
+ if (repetitions > 2) {
992
+ columns.push("0fr");
993
+ columns.push("0fr");
994
+ items.push(h("div", { class: "progress bg" }, goal * (finite - 2)));
995
+ items.push(h("div", { class: "gift start" }, h(Gift, null)));
996
+ }
997
+ for (let i = 1; i < goal * 2 + 1; i++) {
998
+ columns.push(ratio + "fr");
999
+ columns.push("0fr");
1000
+ if (i > progress) {
1001
+ if (i == goal) {
1002
+ columns.push("0fr");
1003
+ items.push(h("div", { class: "remain" }));
1004
+ items.push(h("div", { class: "progress bg" }, goal * (finite - 1)));
1005
+ items.push(h("div", { class: "gift bw" }, h(Gift, null)));
1006
+ }
1007
+ }
1008
+ else if (i == goal) {
1009
+ columns.push("0fr");
1010
+ items.push(h("div", { class: "filled" }));
1011
+ items.push(h("div", { class: "progress bg" }, goal * (finite - 1)));
1012
+ items.push(h("div", { class: "gift" }, h(Gift, null)));
1013
+ }
1014
+ else if (i == goal * 2) {
1015
+ columns.push("0fr");
1016
+ columns.push("0fr");
1017
+ items.push(h("div", { class: "filled" }));
1018
+ items.push(h("div", { class: "progress bg" }, goal * finite));
1019
+ items.push(h("div", { class: "gift" }, h(Gift, null)));
1020
+ }
1021
+ else {
1022
+ items.push(h("div", { class: "filled" }));
1023
+ items.push(h("div", { class: "progress" }, i + goal * (finite - 2)));
1024
+ }
1025
+ }
1026
+ }
1027
+ // case repetition many
1028
+ else {
1029
+ let position = (progress % goal) + goal;
1030
+ let ratio = 1 / goal;
1031
+ columns.push("0fr");
1032
+ columns.push("0fr");
1033
+ items.push(h("div", { class: "progress bg" }, goal * (repetitions - 1)));
1034
+ items.push(h("div", { class: "gift start" }, h(Gift, null)));
1035
+ for (let i = 1; i < goal * 2 + 1; i++) {
1036
+ columns.push(ratio + "fr");
1037
+ columns.push("0fr");
1038
+ if (i <= goal) {
1039
+ if (i == goal) {
1040
+ columns.push("0fr");
1041
+ items.push(h("div", { class: "filled" }));
1042
+ items.push(h("div", { class: "progress bg" }, i + goal * (repetitions - 1)));
1043
+ items.push(h("div", { class: "gift" }, h(Gift, null)));
1044
+ }
1045
+ else {
1046
+ items.push(h("div", { class: "filled" }));
1047
+ items.push(h("div", { class: "progress" }, i + goal * (repetitions - 1)));
1048
+ }
1049
+ }
1050
+ else if (i > position) {
1051
+ if (i == goal * 2) {
1052
+ columns.push("0fr");
1053
+ columns.push("0fr");
1054
+ items.push(h("div", { class: "remain" }));
1055
+ items.push(h("div", { class: "empty bg" }, i + goal * (repetitions - 1)));
1056
+ items.push(h("div", { class: "gift bw" }, h(Gift, null)));
1057
+ }
1058
+ else {
1059
+ items.push(h("div", { class: "remain" }));
1060
+ items.push(h("div", { class: "empty" }, i + goal * (repetitions - 1)));
1061
+ }
1062
+ }
1063
+ else {
1064
+ items.push(h("div", { class: "filled" }));
1065
+ items.push(h("div", { class: "progress" }, i + goal * (repetitions - 1)));
1066
+ }
1067
+ }
1068
+ }
1069
+ return { items, columns: columns.join(" ") };
1070
+ }
1071
+ function addLinear({ progress, goal, progressBarUnit, }) {
1072
+ const items = [];
1073
+ let columns = "";
1074
+ const ratio = progress / goal;
1075
+ columns =
1076
+ clamp(ratio, 0, 1) + "fr 0fr " + clamp(1 - ratio, 0, 1) + "fr 0fr 0fr";
1077
+ items.push(h("div", { class: "filled" }));
1078
+ items.push(h("div", { class: clamp(progress, 0, goal) == goal ? "progress top bg" : "progress top" }, clamp(progress, 0, goal) == goal
1079
+ ? ""
1080
+ : progressBarUnit + clamp(progress, 0, goal)));
1081
+ items.push(h("div", { class: "remain" }));
1082
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal));
1083
+ items.push(h("div", { class: clamp(progress, 0, goal) == goal ? "gift" : "gift bw" },
1084
+ h(Gift, null)));
1085
+ return { items, columns };
1086
+ }
1087
+ function clamp(x, min, max) {
1088
+ return Math.min(Math.max(x, min), max);
1089
+ }
1090
+
1091
+ const checkmark_circle = () => {
1092
+ return (h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1093
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M1.81818 10C1.81818 5.48131 5.48131 1.81818 10 1.81818C14.5187 1.81818 18.1818 5.48131 18.1818 10C18.1818 14.5187 14.5187 18.1818 10 18.1818C5.48131 18.1818 1.81818 14.5187 1.81818 10ZM10 0C4.47715 0 0 4.47715 0 10C0 15.5228 4.47715 20 10 20C15.5228 20 20 15.5228 20 10C20 4.47715 15.5228 0 10 0ZM15.7692 6.96189C16.1398 6.48683 16.0551 5.80132 15.58 5.43077C15.1049 5.06022 14.4194 5.14495 14.0489 5.62001L8.72994 12.4391L5.86229 9.5715C5.43627 9.14548 4.74554 9.14548 4.31952 9.5715C3.89349 9.99752 3.89349 10.6882 4.31952 11.1143L8.05976 14.8545C8.28083 15.0756 8.58613 15.1912 8.89818 15.172C9.21023 15.1528 9.49905 15.0006 9.69133 14.7541L15.7692 6.96189Z", fill: "currentColor" })));
1094
+ };
1095
+ const checkmark_filled = () => {
1096
+ return (h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1097
+ h("circle", { cx: "10", cy: "10", r: "10", fill: "currentColor" }),
1098
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M14.65 6.19231C15.0459 6.5011 15.1165 7.07236 14.8077 7.46825L9.74277 13.9617C9.58254 14.1672 9.34186 14.294 9.08182 14.31C8.82178 14.326 8.56736 14.2297 8.38314 14.0454L5.26627 10.9286C4.91124 10.5735 4.91124 9.99794 5.26627 9.64292C5.62129 9.2879 6.19689 9.2879 6.55191 9.64292L8.94162 12.0326L13.3741 6.35001C13.6828 5.95412 14.2541 5.88352 14.65 6.19231Z", fill: "white" })));
1099
+ };
1100
+ const arrow_left_right = () => {
1101
+ return (h("svg", { width: 11, height: 12, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1102
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10.265 2.789a.346.346 0 000-.489L8.066.101a.346.346 0 10-.489.489l1.61 1.609H2.073a.691.691 0 00-.69.691v1.728a.346.346 0 00.69 0V2.89h7.114L7.577 4.5a.346.346 0 10.49.488l2.198-2.2zM.101 9.21a.346.346 0 000 .489l2.2 2.199a.346.346 0 00.488-.489l-1.61-1.609h7.114c.382 0 .691-.31.691-.691V7.382a.346.346 0 00-.691 0V9.11H1.18L2.789 7.5a.346.346 0 10-.489-.488l-2.199 2.2z", fill: "currentColor" })));
1103
+ };
1104
+
1105
+ const style$7 = {
1106
+ TaskCard: {
1107
+ display: "inline-block",
1108
+ width: "100%",
1109
+ "& .main": {
1110
+ position: "relative",
1111
+ boxSizing: "border-box",
1112
+ background: "var(--sl-color-neutral-0)",
1113
+ border: "1px solid var(--sl-color-neutral-200)",
1114
+ borderRadius: "var(--sl-border-radius-medium)",
1115
+ boxShadow: "1px 2px 4px rgba(211, 211, 211, 0.2)",
1116
+ fontSize: "var(--sl-font-size-small)",
1117
+ lineHeight: "var(--sl-line-height-dense)",
1118
+ color: "var(--sl-color-neutral-600)",
1119
+ },
1120
+ "& .main.complete": {
1121
+ background: "var(--sl-color-primary-50)",
1122
+ borderColor: "var(--sl-color-primary-500)",
1123
+ },
1124
+ "& .main.expired": {
1125
+ color: "var(--sl-color-neutral-600)",
1126
+ background: "var(--sl-color-neutral-50)",
1127
+ },
1128
+ "& .title": {
1129
+ fontSize: "var(--sl-font-size-medium)",
1130
+ color: "var(--sl-color-neutral-950)",
1131
+ },
1132
+ "& .container": {
1133
+ margin: "var(--sl-spacing-medium)",
1134
+ },
1135
+ "& .container.subdued": {
1136
+ opacity: "0.45",
1137
+ },
1138
+ "& .container > div": {
1139
+ margin: "var(--sl-spacing-medium) 0",
1140
+ },
1141
+ },
1142
+ NotStarted: {
1143
+ fontSize: "var(--sl-font-size-small)",
1144
+ padding: "var(--sl-spacing-medium)",
1145
+ color: "var(--sl-color-primary-600)",
1146
+ border: "1px solid var(--sl-color-neutral-200)",
1147
+ borderRadius: "var(--sl-border-radius-medium) var(--sl-border-radius-medium) 0 0",
1148
+ borderBottom: "none",
1149
+ background: "var(--sl-color-primary-50)",
1150
+ fontWeight: "var(--sl-font-weight-semibold)",
1151
+ lineHeight: "var(--sl-line-height-dense)",
1152
+ "& .icon": {
1153
+ position: "relative",
1154
+ top: "0.1em",
1155
+ marginRight: "var(--sl-spacing-small)",
1156
+ color: "var(--sl-color-primary-500)",
1157
+ },
1158
+ },
1159
+ Ended: {
1160
+ fontSize: "var(--sl-font-size-small)",
1161
+ padding: "var(--sl-spacing-medium)",
1162
+ color: "var(--sl-color-warning-600)",
1163
+ border: "1px solid var(--sl-color-neutral-200)",
1164
+ borderRadius: "var(--sl-border-radius-medium) var(--sl-border-radius-medium) 0 0",
1165
+ borderBottom: "none",
1166
+ background: "var(--sl-color-warning-50)",
1167
+ fontWeight: "var(--sl-font-weight-semibold)",
1168
+ lineHeight: "var(--sl-line-height-dense)",
1169
+ "& .icon": {
1170
+ position: "relative",
1171
+ top: "0.1em",
1172
+ marginRight: "var(--sl-spacing-small)",
1173
+ color: "var(--sl-color-warning-500)",
1174
+ },
1175
+ },
1176
+ Header: {
1177
+ display: "flex",
1178
+ "& .icon": {
1179
+ position: "relative",
1180
+ top: "5%",
1181
+ alignSelf: "center",
1182
+ lineHeight: "0",
1183
+ color: "var(--sl-color-primary-400)",
1184
+ fontSize: "var(--sl-font-size-large)",
1185
+ marginRight: "var(--sl-spacing-x-small)",
1186
+ },
1187
+ "& .value": {
1188
+ alignSelf: "center",
1189
+ fontSize: "var(--sl-font-size-x-large)",
1190
+ fontWeight: "var(--sl-font-weight-semibold)",
1191
+ color: "var(--sl-color-neutral-950)",
1192
+ lineHeight: "100%",
1193
+ marginRight: "var(--sl-spacing-xx-small)",
1194
+ },
1195
+ "& .text": {
1196
+ alignSelf: "end",
1197
+ textTransform: "uppercase",
1198
+ fontSize: "var(--sl-font-size-x-small)",
1199
+ color: "var(--sl-color-neutral-950)",
1200
+ lineHeight: "var(--sl-font-size-medium)",
1201
+ marginRight: "var(--sl-spacing-xx-small)",
1202
+ },
1203
+ "& .end": {
1204
+ color: "var(--sl-color-warning-500)",
1205
+ fontWeight: "var(--sl-font-weight-semibold)",
1206
+ marginBottom: "var(--sl-spacing-xx-small)",
1207
+ },
1208
+ "& .neutral": {
1209
+ color: "var(--sl-color-neutral-400)",
1210
+ },
1211
+ },
1212
+ Footer: {
1213
+ display: "flex",
1214
+ "& .icon": {
1215
+ fontSize: "var(--sl-font-size-xx-small)",
1216
+ marginRight: "var(--sl-spacing-xx-small)",
1217
+ verticalAlign: "middle",
1218
+ },
1219
+ "& .text": {
1220
+ marginTop: "auto",
1221
+ verticalAlign: "text-bottom",
1222
+ fontSize: "var(--sl-font-size-x-small)",
1223
+ color: "var(--sl-color-neutral-400)",
1224
+ },
1225
+ "& .success": {
1226
+ color: "var(--sl-color-primary-500)",
1227
+ fontWeight: "var(--sl-font-weight-semibold)",
1228
+ },
1229
+ "& .action": {
1230
+ marginTop: "auto",
1231
+ marginLeft: "auto",
1232
+ "&::part(base)": {
1233
+ color: "var(--sl-color-neutral-0)",
1234
+ borderRadius: "var(--sl-border-radius-medium)",
1235
+ },
1236
+ "&.disabled::part(base)": {
1237
+ border: "1px solid var(--sl-color-primary-400)",
1238
+ background: "var(--sl-color-primary-400)",
1239
+ },
1240
+ "&.neutral::part(base)": {
1241
+ border: "1px solid var(--sl-color-neutral-400)",
1242
+ background: "var(--sl-color-neutral-400)",
1243
+ },
1244
+ },
1245
+ "& .neutral": {
1246
+ color: "var(--sl-color-neutral-400)",
1247
+ },
1248
+ "& .datetime": {
1249
+ display: "block",
1250
+ marginTop: "var(--sl-spacing-xx-small)",
1251
+ color: "var(--sl-color-neutral-400)",
1252
+ },
1253
+ },
1254
+ };
1255
+ const sheet$7 = createStyleSheet(style$7);
1256
+ const styleString$7 = sheet$7.toString();
1257
+ function TaskCardView(props) {
1258
+ var _a, _b, _c;
1259
+ console.log("TASK CARD PROPS " + ((_a = props === null || props === void 0 ? void 0 : props.content) === null || _a === void 0 ? void 0 : _a.cardTitle));
1260
+ console.log({ props });
1261
+ const { callbacks, states, content } = props;
1262
+ const dateStart = content.rewardDuration &&
1263
+ luxon.DateTime.fromISO(content.rewardDuration.split("/")[0]);
1264
+ const dateEnd = content.rewardDuration &&
1265
+ luxon.DateTime.fromISO(content.rewardDuration.split("/")[1]);
1266
+ const dateToday = luxon.DateTime.now();
1267
+ if (content.displayDuration) {
1268
+ const start = (_b = content.displayDuration.split("/")) === null || _b === void 0 ? void 0 : _b[0];
1269
+ const end = (_c = content.displayDuration.split("/")) === null || _c === void 0 ? void 0 : _c[1];
1270
+ const displayDateStart = start ? luxon.DateTime.fromISO(start) : dateToday;
1271
+ const displayDateEnd = end ? luxon.DateTime.fromISO(end) : dateToday;
1272
+ console.log({ displayDateStart, dateToday, displayDateEnd });
1273
+ if (dateToday < displayDateStart || dateToday > displayDateEnd)
1274
+ return h("span", null);
1275
+ }
1276
+ const checkmark_circle$1 = checkmark_circle();
1277
+ const checkmark_filled$1 = checkmark_filled();
1278
+ const arrow_left_right$1 = arrow_left_right();
1279
+ const showComplete = states.progress >= content.goal;
1280
+ const repetitions = content.showProgressBar
1281
+ ? Math.floor(states.progress / content.goal)
1282
+ : states.progress;
1283
+ const taskComplete = (showComplete && content.repeatable === false) ||
1284
+ (content.finite && states.progress >= content.finite * content.goal);
1285
+ const taskEnded = content.rewardDuration && dateEnd <= dateToday;
1286
+ const taskNotStarted = content.rewardDuration && dateToday <= dateStart;
1287
+ const taskUnavailable = taskEnded || taskNotStarted;
1288
+ const vanillaStyle = `
1289
+ :host{
1290
+ display: block;
1291
+ margin-bottom: var(--sl-spacing-large);
1292
+ }
1293
+ `;
1294
+ return (h("div", { class: sheet$7.classes.TaskCard },
1295
+ h("style", { type: "text/css" },
1296
+ styleString$7,
1297
+ vanillaStyle),
1298
+ !states.loading && taskNotStarted && (h("div", { class: sheet$7.classes.NotStarted },
1299
+ h("span", { class: "icon" },
1300
+ h("sl-icon", { name: "info-circle-fill" })),
1301
+ intl.formatMessage({
1302
+ id: "startsOnMessage",
1303
+ defaultMessage: content.startsOnMessage,
1304
+ }, {
1305
+ startDate: dateStart
1306
+ .setLocale(luxonLocale(states.locale))
1307
+ .toLocaleString(luxon.DateTime.DATETIME_MED),
1308
+ }))),
1309
+ !states.loading && taskEnded && (h("div", { class: sheet$7.classes.Ended },
1310
+ h("span", { class: "icon" },
1311
+ h("sl-icon", { name: "exclamation-triangle-fill" })),
1312
+ intl.formatMessage({
1313
+ id: "endedMessage",
1314
+ defaultMessage: content.endedMessage,
1315
+ }, {
1316
+ endDate: dateEnd
1317
+ .setLocale(luxonLocale(states.locale))
1318
+ .toLocaleString(luxon.DateTime.DATETIME_MED),
1319
+ }))),
1320
+ h("div", { style: {
1321
+ borderRadius: taskUnavailable &&
1322
+ "0 0 var(--sl-border-radius-medium) var(--sl-border-radius-medium)",
1323
+ }, class: taskUnavailable
1324
+ ? "main expired"
1325
+ : taskComplete
1326
+ ? "main complete"
1327
+ : "main" },
1328
+ h("div", { class: taskComplete || taskUnavailable ? "container subdued" : "container" },
1329
+ h("div", { class: sheet$7.classes.Header }, states.loading ? (h("sl-skeleton", { style: { width: "22%", margin: "0" } })) : (h("div", null,
1330
+ showComplete && (h("span", { class: taskUnavailable ? "icon neutral" : "icon" }, taskComplete ? checkmark_filled$1 : checkmark_circle$1)),
1331
+ h("span", { class: "value" }, content.rewardAmount),
1332
+ h("span", { class: "text" }, content.rewardUnit)))),
1333
+ states.loading ? (h("sl-skeleton", { style: { width: "42%", margin: "var(--sl-spacing-medium) 0" } })) : (h("div", { class: "title", style: {
1334
+ marginBottom: !content.description
1335
+ ? content.steps
1336
+ ? "var(--sl-spacing-x-large)"
1337
+ : content.showProgressBar
1338
+ ? "var(--sl-spacing-xx-large)"
1339
+ : ""
1340
+ : "",
1341
+ } }, content.cardTitle)),
1342
+ states.loading ? (h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.description && h(Details, Object.assign({}, props))),
1343
+ content.showProgressBar && states.loading ? (h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.showProgressBar && (h(ProgressBarView, Object.assign({}, props.content, props.states, { complete: taskComplete, expired: taskUnavailable })))),
1344
+ h("div", { class: sheet$7.classes.Footer }, states.loading ? (h("sl-skeleton", { style: { width: "25%", marginLeft: "auto" } })) : (h("div", { style: { display: "contents" } },
1345
+ h("span", { class: "text" },
1346
+ content.repeatable && (h("div", null,
1347
+ h("span", { class: repetitions > 0
1348
+ ? taskUnavailable
1349
+ ? "icon neutral"
1350
+ : "icon success"
1351
+ : "icon" }, arrow_left_right$1),
1352
+ h("span", { class: repetitions > 0
1353
+ ? taskUnavailable
1354
+ ? "neutral"
1355
+ : "success"
1356
+ : "" }, intl.formatMessage({
1357
+ id: "completedMessage",
1358
+ defaultMessage: content.completedText,
1359
+ }, {
1360
+ finite: content.finite,
1361
+ count: content.finite
1362
+ ? Math.min(repetitions, content.finite)
1363
+ : repetitions,
1364
+ })))),
1365
+ dateEnd && !taskUnavailable && (h("span", { class: "datetime" }, intl.formatMessage({
1366
+ id: "expiryMessage",
1367
+ defaultMessage: content.expiryMessage,
1368
+ }, {
1369
+ endDate: dateEnd
1370
+ .setLocale(luxonLocale(states.locale))
1371
+ .toLocaleString(luxon.DateTime.DATETIME_MED),
1372
+ })))),
1373
+ h("sl-button", { class: taskUnavailable
1374
+ ? "action neutral"
1375
+ : taskComplete
1376
+ ? "action disabled"
1377
+ : "action", type: "primary", size: "small", onClick: callbacks.onClick, loading: states.loadingEvent, disabled: taskComplete || taskUnavailable }, content.buttonText))))))));
1378
+ }
1379
+
1380
+ function ReferralIframeView(props) {
1381
+ const { states, data } = props;
1382
+ const { content } = states;
1383
+ const style = {
1384
+ Container: {
1385
+ position: "relative",
1386
+ width: content.iframeWidth,
1387
+ height: content.iframeHeight,
1388
+ },
1389
+ IFrame: {
1390
+ position: "absolute",
1391
+ width: "100%",
1392
+ height: "100%",
1393
+ border: "0",
1394
+ top: "0",
1395
+ left: "0",
1396
+ right: "0",
1397
+ },
1398
+ };
1399
+ // JSS config
1400
+ const sheet = createStyleSheet(style);
1401
+ const styleString = sheet.toString();
1402
+ return (h("div", { class: sheet.classes.Container },
1403
+ h("style", { type: "text/css" }, styleString),
1404
+ h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?rsCode=${data.shareCode}` })));
1405
+ }
1406
+
1407
+ const CheckMark = () => (h("svg", { width: 12, height: 10, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1408
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.58.23c.475.371.56 1.057.19 1.532L5.69 9.554a1.091 1.091 0 0 1-1.631.1L.32 5.915a1.09 1.09 0 1 1 1.542-1.542L4.73 7.239 10.049.42A1.09 1.09 0 0 1 11.58.23Z", fill: "#fff" })));
1409
+ const CheckmarkFilled = () => (h("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1410
+ h("path", { d: "M0 9C0 4.02944 4.02944 0 9 0C13.9706 0 18 4.02944 18 9C18 13.9706 13.9706 18 9 18C4.02944 18 0 13.9706 0 9Z", fill: "currentColor" }),
1411
+ h("path", { d: "M5.68394 8.77046C5.28103 8.39273 4.64819 8.41315 4.27046 8.81606C3.89273 9.21897 3.91315 9.85181 4.31606 10.2295L5.68394 8.77046ZM7.66667 12L6.98273 12.7295C7.36738 13.0902 7.96595 13.0902 8.35061 12.7295L7.66667 12ZM13.6839 7.72954C14.0869 7.35181 14.1073 6.71897 13.7295 6.31606C13.3518 5.91315 12.719 5.89273 12.3161 6.27046L13.6839 7.72954ZM4.31606 10.2295L6.98273 12.7295L8.35061 11.2705L5.68394 8.77046L4.31606 10.2295ZM8.35061 12.7295L13.6839 7.72954L12.3161 6.27046L6.98273 11.2705L8.35061 12.7295Z", fill: "white" })));
1412
+ const Gift$1 = () => (h("svg", { width: 156, height: 157, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1413
+ h("path", { d: "M40.18 126h83.663a3 3 0 0 0 3-3V73.966a3 3 0 0 0-3-3H40.18a3 3 0 0 0-3 3V123a3 3 0 0 0 3 3Z", fill: "#FFD34F" }),
1414
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M37.18 73.862v7.966h89.663v-7.966H37.18Z", fill: "#E9BB30" }),
1415
+ h("path", { d: "M133.039 74.224a2.18 2.18 0 0 0 2.187-2.172v-19.19c0-1.2-.98-2.172-2.187-2.172H31.347a2.18 2.18 0 0 0-2.187 2.172v19.19c0 1.2.98 2.172 2.187 2.172H133.04Z", fill: "#FFC000" }),
1416
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M123.287 35.172c0 6.056-9.155 15.226-13.76 15.654H88.888V126H75.141V50.826H58.534c-9.462-2.038-17.803-9.258-17.803-16.944 0-7.49 3.274-13.422 9.23-15.983 5.693-2.446 12.265-1.105 17.46 2.479 6.378 4.398 9.956 12.654 13.202 20.144.284.657.567 1.308.848 1.95.274-.608.55-1.228.83-1.856 3.216-7.22 6.887-15.464 13.057-19.89 5.454-3.913 12.387-5.39 18.38-2.711 6.197 2.77 9.549 9.127 9.549 17.157Zm-23.306-8.266c3.305-2.37 7.262-2.8 10.645 0 2.946 2.44 3.103 3.588 3.482 6.351l.067.483c0 4.09-3.549 10.252-7.097 10.252-2.515 0-4.489-.022-6.34-.041-3.375-.036-6.337-.068-11.403.04.966-1.86 1.737-3.644 2.473-5.346 1.967-4.553 3.678-8.515 8.173-11.739Zm-39.034 0c-1.6-1.103-5.268-.61-6.79.043-1.257.54-3.134 2.19-3.134 6.933 0 4.61 7.511 8.59 7.511 8.59s5.962 1.52 16.607 1.52c-3.624-8.922-8.757-13.336-14.194-17.086Z", fill: "#EB5757" }),
1417
+ h("path", { d: "M75.086 74.224h13.85v7.604h-13.85v-7.604Z", fill: "#DD4747" }),
1418
+ h("g", { filter: "url(#a)" },
1419
+ h("ellipse", { cx: 82.008, cy: 141.207, rx: 36.813, ry: 5.793, fill: "#E0DDDD", "fill-opacity": 0.8 })),
1420
+ h("path", { d: "M150.446 79.134a.5.5 0 0 1 .9 0l1.133 2.336c.05.102.132.184.234.233l2.344 1.122a.5.5 0 0 1 0 .902l-2.344 1.122a.503.503 0 0 0-.234.233l-1.133 2.336a.5.5 0 0 1-.9 0l-1.134-2.336a.499.499 0 0 0-.234-.233l-2.343-1.122a.5.5 0 0 1 0-.902l2.343-1.122a.499.499 0 0 0 .234-.233l1.134-2.336Z", fill: "#FAB6B6" }),
1421
+ h("path", { d: "M14.86 29.168a.5.5 0 0 1 .9 0l1.133 2.336a.5.5 0 0 0 .234.233l2.344 1.122a.5.5 0 0 1 0 .902l-2.344 1.122a.5.5 0 0 0-.234.233l-1.133 2.336a.5.5 0 0 1-.9 0l-1.134-2.336a.5.5 0 0 0-.234-.233l-2.343-1.122a.5.5 0 0 1 0-.902l2.344-1.122a.5.5 0 0 0 .233-.233l1.134-2.336Z", fill: "#F4EFBC" }),
1422
+ h("path", { d: "m125.382 0 .712 1.466 1.475.706-1.475.707-.712 1.466-.711-1.466-1.476-.707 1.476-.706.711-1.466Z", fill: "#FDA802" }),
1423
+ h("path", { d: "m2.187 103.552.711 1.466 1.476.706-1.476.707-.711 1.466-.711-1.466L0 105.724l1.476-.706.71-1.466Z", fill: "#E4599C" }),
1424
+ h("defs", null,
1425
+ h("filter", { id: "a", x: 35.195, y: 125.414, width: 93.625, height: 31.586, filterUnits: "userSpaceOnUse", "color-interpolation-filters": "s-rGB" },
1426
+ h("feFlood", { "flood-opacity": 0, result: "BackgroundImageFix" }),
1427
+ h("feBlend", { in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
1428
+ h("feGaussianBlur", { stdDeviation: 5, result: "effect1_foregroundBlur_653_17907" })))));
1429
+
1430
+ function Dot({ active, completed, incomplete, stage, }) {
1431
+ return (h("div", { style: {
1432
+ display: "flex",
1433
+ } },
1434
+ h("div", { style: {
1435
+ backgroundColor: completed
1436
+ ? "var(--sl-color-success-500)"
1437
+ : incomplete
1438
+ ? "var(--sl-color-neutral-200)"
1439
+ : "var(--sl-color-neutral-0)",
1440
+ border: active
1441
+ ? "1px solid var(--sl-color-success-500)"
1442
+ : incomplete
1443
+ ? "1px solid var(--sl-color-neutral-200)"
1444
+ : "1px solid var(--sl-color-success-500)",
1445
+ borderRadius: "50%",
1446
+ width: "23px",
1447
+ height: "23px",
1448
+ margin: "-11px",
1449
+ zIndex: "1",
1450
+ boxSizing: "content-box",
1451
+ } }, completed ? (h("div", { style: { top: "-10.5%", left: "23.5%", position: "relative" } },
1452
+ h(CheckMark, null))) : (h("div", { style: {
1453
+ color: active
1454
+ ? "var(--sl-color-success-500)"
1455
+ : "var(--sl-color-neutral-50)",
1456
+ width: "23px",
1457
+ lineHeight: "24px",
1458
+ textAlign: "center",
1459
+ position: "relative",
1460
+ } }, stage + 1)))));
1461
+ }
1462
+ function ProgressLine({ incomplete = false, active = false, invisible = false, }) {
1463
+ return (h("div", { style: {
1464
+ content: "''",
1465
+ flex: "0.5 0.5 0",
1466
+ height: "4px",
1467
+ borderRadius: "4px",
1468
+ background: incomplete || active
1469
+ ? "var(--sl-color-neutral-200)"
1470
+ : "var(--sl-color-success-500)",
1471
+ position: "relative",
1472
+ bottom: "0",
1473
+ left: "0",
1474
+ display: "flex",
1475
+ justifyContent: "center",
1476
+ columnGap: "50px",
1477
+ marginRight: "-2px",
1478
+ boxSizing: "content-box",
1479
+ opacity: invisible ? "0" : "1",
1480
+ } }));
1481
+ }
1482
+ function Progress({ active, completed, incomplete, stage }) {
1483
+ return [
1484
+ h(ProgressLine, { incomplete: incomplete, invisible: stage === 0 }),
1485
+ h(Dot, { active: active, completed: completed, incomplete: incomplete, stage: stage }),
1486
+ h(ProgressLine, { incomplete: incomplete, active: active, invisible: stage === 2 }),
1487
+ ];
1488
+ }
1489
+ function ProgressBar({ stageCount, currentStage, }) {
1490
+ return (h("div", { style: { display: "flex", columnGap: "-2px" } }, Array.from(Array(stageCount).keys()).map((stage) => (h(Progress, { active: currentStage === stage, completed: currentStage > stage, incomplete: currentStage < stage, stage: stage })))));
1491
+ }
1492
+
1493
+ const stageList = ["chooseReward", "chooseAmount", "confirmation", "success"];
1494
+ function RewardExchangeView(props) {
1495
+ const { states, data, callbacks, refs } = props;
1496
+ const { selectedItem, selectedStep } = states;
1497
+ const stageProgressList = {
1498
+ chooseReward: states.content.text.chooseRewardTitle,
1499
+ chooseAmount: states.content.text.chooseAmountTitle,
1500
+ confirmation: states.content.text.confirmationTitle,
1501
+ };
1502
+ const style = {
1503
+ HostBlock: HostBlock,
1504
+ Container: {
1505
+ minWidth: "300px",
1506
+ position: "relative",
1507
+ },
1508
+ FullImage: {
1509
+ objectFit: "contain",
1510
+ maxWidth: "100%",
1511
+ height: "250px",
1512
+ display: "flex",
1513
+ margin: "0 auto",
1514
+ },
1515
+ Select: {
1516
+ "&::part(label)": {
1517
+ color: "var(--sl-color-primary-500)",
1518
+ },
1519
+ "&::part(menu)": {
1520
+ maxHeight: "50vh",
1521
+ },
1522
+ "& sl-menu-item::part(checked-icon)": {
1523
+ top: "8px",
1524
+ },
1525
+ "& sl-menu-item::part(base)": {
1526
+ flexDirection: "column",
1527
+ },
1528
+ "& sl-menu-item::part(base):focus": {
1529
+ background: "transparent",
1530
+ color: "var(--sl-color-gray-700)",
1531
+ },
1532
+ },
1533
+ ProgressBar: {
1534
+ maxWidth: "350px",
1535
+ width: "100%",
1536
+ margin: "auto",
1537
+ marginBottom: "var(--sl-spacing-xxx-large)",
1538
+ "& .text-area": {
1539
+ marginTop: "5px",
1540
+ display: "flex",
1541
+ justifyContent: "center",
1542
+ textAlign: "center",
1543
+ whiteSpace: "nowrap",
1544
+ marginBottom: "6px",
1545
+ "& .text": {
1546
+ marginBottom: "var(--sl-spacing-x-small)",
1547
+ flex: "1 1 0",
1548
+ },
1549
+ "& .text.subdued": {
1550
+ color: "var(--sl-color-neutral-200)",
1551
+ },
1552
+ },
1553
+ },
1554
+ CardLayout: {
1555
+ display: "flex",
1556
+ width: "100%",
1557
+ borderRadius: "3px",
1558
+ background: "rgba(0, 0, 0, 0)",
1559
+ },
1560
+ Card: {
1561
+ display: "flex",
1562
+ userSelect: "none",
1563
+ height: "120px",
1564
+ "&::part(base)": {
1565
+ boxShadow: "none",
1566
+ width: "100%",
1567
+ },
1568
+ "&::part(body)": {
1569
+ display: "flex",
1570
+ padding: 0,
1571
+ },
1572
+ "& .selected": {
1573
+ position: "relative",
1574
+ top: "-2%",
1575
+ left: "100%",
1576
+ color: "var(--sl-color-primary-500)",
1577
+ margin: "-9px",
1578
+ },
1579
+ },
1580
+ Image: {
1581
+ padding: "var(--sl-spacing-small)",
1582
+ minWidth: "96px",
1583
+ maxWidth: "96px",
1584
+ "& .image": {
1585
+ width: "100%",
1586
+ height: "100%",
1587
+ objectFit: "contain",
1588
+ borderRadius: "4px",
1589
+ },
1590
+ "& .image.subdued": {
1591
+ filter: "brightness(0.95)",
1592
+ opacity: "0.5",
1593
+ },
1594
+ },
1595
+ Square: {
1596
+ width: "120px",
1597
+ height: "118px",
1598
+ borderRadius: "3px 0 0 3px",
1599
+ "& .image": {
1600
+ width: "100%",
1601
+ height: "100%",
1602
+ objectFit: "contain",
1603
+ borderRadius: "inherit",
1604
+ },
1605
+ },
1606
+ TextArea: {
1607
+ textAlign: "left",
1608
+ padding: "var(--sl-spacing-small)",
1609
+ paddingLeft: "0",
1610
+ "& .title": {
1611
+ fontSize: "var(--sl-font-size-medium)",
1612
+ lineHeight: "var(--sl-line-height-dense)",
1613
+ fontWeight: "600",
1614
+ color: "var(--sl-color-neutral-1000)",
1615
+ display: "-webkit-box",
1616
+ "-webkit-line-clamp": "1",
1617
+ "-webkit-box-orient": "vertical",
1618
+ overflow: "hidden",
1619
+ },
1620
+ "& .amount": {
1621
+ fontSize: "var(--sl-font-size-small)",
1622
+ lineHeight: "var(--sl-line-height-dense)",
1623
+ marginTop: "var(--sl-spacing-x-small)",
1624
+ color: "var(--sl-color-neutral-500)",
1625
+ display: "-webkit-box",
1626
+ "-webkit-line-clamp": "1",
1627
+ "-webkit-box-orient": "vertical",
1628
+ overflow: "hidden",
1629
+ },
1630
+ "& .error": {
1631
+ fontSize: "var(--sl-font-size-small)",
1632
+ lineHeight: "var(--sl-line-height-dense)",
1633
+ marginTop: "var(--sl-spacing-x-small)",
1634
+ fontWeight: "600",
1635
+ color: "var(--sl-color-warning-600)",
1636
+ display: "-webkit-box",
1637
+ "-webkit-line-clamp": "1",
1638
+ "-webkit-box-orient": "vertical",
1639
+ overflow: "hidden",
1640
+ "& .icon": {
1641
+ position: "relative",
1642
+ top: "0.1em",
1643
+ marginRight: "var(--sl-spacing-xx-small)",
1644
+ },
1645
+ },
1646
+ },
1647
+ ChooseAmount: {
1648
+ display: "flex",
1649
+ alignItems: "center",
1650
+ justifyContent: "center",
1651
+ margin: "var(--sl-spacing-medium) 0",
1652
+ "& .wrapper": {
1653
+ display: "flex",
1654
+ justifyContent: "center",
1655
+ alignItems: "center",
1656
+ gap: "var(--sl-spacing-xx-large)",
1657
+ "@media (max-width: 799px)": {
1658
+ flexDirection: "column",
1659
+ },
1660
+ },
1661
+ "& .image": {
1662
+ width: "50%",
1663
+ objectFit: "contain",
1664
+ maxWidth: "100%",
1665
+ height: "250px",
1666
+ display: "flex",
1667
+ "@media (max-width: 799px)": {
1668
+ width: "auto",
1669
+ },
1670
+ },
1671
+ "& .text": {
1672
+ width: "50%",
1673
+ maxWidth: "400px",
1674
+ minWidth: "330px",
1675
+ "@media (max-width: 799px)": {
1676
+ width: "auto",
1677
+ margin: "auto",
1678
+ },
1679
+ },
1680
+ "& .title": {
1681
+ fontSize: "var(--sl-font-size-large)",
1682
+ fontWeight: "var(--sl-font-weight-semibold)",
1683
+ color: "var(--sl-color-neutral-1000)",
1684
+ },
1685
+ "& .points": {
1686
+ fontSize: "var(--sl-font-size-large)",
1687
+ fontWeight: "var(--sl-font-weight-semibold)",
1688
+ color: "var(--sl-color-primary-500)",
1689
+ },
1690
+ "& .description": {
1691
+ fontSize: "var(--sl-font-size-medium)",
1692
+ fontWeight: "var(--sl-font-weight-normal)",
1693
+ color: "var(--sl-color-neutral-500)",
1694
+ margin: "var(--sl-spacing-medium) 0",
1695
+ lineHeight: "var(--sl-line-height-dense)",
1696
+ marginTop: "var(--sl-spacing-xx-small)",
1697
+ },
1698
+ "& .space": {
1699
+ marginBottom: "var(--sl-spacing-xxx-large)",
1700
+ },
1701
+ "& sl-menu-item[disabled]::part(label)": {
1702
+ color: "var(--sl-color-neutral-200)",
1703
+ },
1704
+ "& sl-menu-item[disabled]": {
1705
+ "& .step-cost": {
1706
+ color: "var(--sl-color-neutral-200)",
1707
+ },
1708
+ },
1709
+ },
1710
+ SelectItem: {
1711
+ display: "flex",
1712
+ flexDirection: "column",
1713
+ "& > .step-cost": {
1714
+ color: "var(--sl-color-neutral-400)",
1715
+ height: "0",
1716
+ marginBottom: "5px",
1717
+ },
1718
+ "& > .step-value": {
1719
+ margin: "0",
1720
+ },
1721
+ },
1722
+ Success: {
1723
+ textAlign: "center",
1724
+ "& .title": {
1725
+ fontSize: "var(--sl-font-size-large)",
1726
+ fontWeight: "var(--sl-font-weight-semibold)",
1727
+ color: "var(--sl-color-neutral-1000)",
1728
+ },
1729
+ "& .description": {
1730
+ color: "var(--sl-color-neutral-400)",
1731
+ width: "100%",
1732
+ maxWidth: "350px",
1733
+ margin: "0 auto",
1734
+ lineHeight: "var(--sl-line-height-dense)",
1735
+ marginBottom: "var(--sl-spacing-xx-large)",
1736
+ marginTop: "var(--sl-spacing-xx-small)",
1737
+ },
1738
+ },
1739
+ Grid: {
1740
+ display: "grid",
1741
+ justifyContent: "center",
1742
+ gap: "20px",
1743
+ gridTemplateColumns: "repeat(auto-fill, minmax(300px, 1fr))",
1744
+ },
1745
+ Confirmation: {
1746
+ maxWidth: "800px",
1747
+ margin: "auto",
1748
+ "& .wrapper": {
1749
+ display: "flex",
1750
+ "@media (max-width: 499px)": {
1751
+ flexDirection: "column",
1752
+ },
1753
+ },
1754
+ "& .reward-item-container": {
1755
+ "@media (max-width: 499px)": {
1756
+ display: "flex",
1757
+ flexDirection: "row-reverse",
1758
+ justifyContent: "flex-end",
1759
+ alignItems: "center",
1760
+ },
1761
+ },
1762
+ "& .reward-item-container .reward-title": {
1763
+ paddingBottom: "var(--sl-spacing-medium)",
1764
+ lineHeight: "20px",
1765
+ "@media (max-width: 499px)": {
1766
+ paddingBottom: "none",
1767
+ paddingLeft: "var(--sl-spacing-small)",
1768
+ },
1769
+ },
1770
+ "& .padding": {
1771
+ padding: "var(--sl-spacing-medium) 0",
1772
+ "@media (max-width: 499px)": {
1773
+ padding: "var(--sl-spacing-small) 0",
1774
+ },
1775
+ },
1776
+ "& .field": {
1777
+ width: "30%",
1778
+ textTransform: "uppercase",
1779
+ fontSize: "var(--sl-font-size-medium)",
1780
+ fontWeight: "var(--sl-font-weight-normal)",
1781
+ color: "var(--sl-color-neutral-400)",
1782
+ textAlign: "left",
1783
+ paddingRight: "var(--sl-spacing-xxx-large)",
1784
+ "@media (max-width: 499px)": {
1785
+ width: "100%",
1786
+ paddingRight: "0",
1787
+ paddingBottom: "0",
1788
+ },
1789
+ },
1790
+ "& .value": {
1791
+ fontSize: "var(--sl-font-size-large)",
1792
+ fontWeight: "var(--sl-font-weight-semibold)",
1793
+ },
1794
+ "& .top-border": {
1795
+ borderTop: "1px solid var(--sl-color-neutral-200)",
1796
+ },
1797
+ "& .image": {
1798
+ width: "200px",
1799
+ "@media (max-width: 499px)": {
1800
+ width: "100px",
1801
+ },
1802
+ },
1803
+ },
1804
+ Button: {
1805
+ display: "flex",
1806
+ flexWrap: "wrap-reverse",
1807
+ margin: "var(--sl-spacing-medium) 0",
1808
+ "& .cancel": {
1809
+ marginLeft: "auto",
1810
+ marginRight: "var(--sl-spacing-medium)",
1811
+ "&::part(base)": {
1812
+ fontWeight: "var(--sl-font-weight-normal)",
1813
+ color: "var(--sl-color-neutral-1000)",
1814
+ },
1815
+ "@media (max-width: 499px)": {
1816
+ width: "100%",
1817
+ marginRight: "0",
1818
+ marginTop: "var(--sl-spacing-small)",
1819
+ },
1820
+ },
1821
+ "& .continue": {
1822
+ "&::part(base)": {
1823
+ background: "var(--sl-color-primary-500)",
1824
+ borderColor: "var(--sl-color-primary-500)",
1825
+ fontWeight: "var(--sl-font-weight-normal)",
1826
+ color: "var(--sl-color-neutral-0)",
1827
+ },
1828
+ "@media (max-width: 499px)": {
1829
+ width: "100%",
1830
+ },
1831
+ },
1832
+ "& .continue.right": {
1833
+ marginLeft: "auto",
1834
+ },
1835
+ "& .continue.center": {
1836
+ margin: "0 auto",
1837
+ },
1838
+ },
1839
+ Confetti: {
1840
+ pointerEvents: "none",
1841
+ position: "absolute",
1842
+ width: "100%",
1843
+ height: "100%",
1844
+ top: "0%",
1845
+ left: "0%",
1846
+ zIndex: "1",
1847
+ },
1848
+ };
1849
+ // JSS config
1850
+ const sheet = createStyleSheet(style);
1851
+ const styleString = sheet.toString();
1852
+ function getInput() {
1853
+ var _a, _b, _c;
1854
+ const item = states.selectedItem;
1855
+ if (!item || (item === null || item === void 0 ? void 0 : item.ruleType) === "FIXED_GLOBAL_REWARD")
1856
+ return h("span", null, item === null || item === void 0 ? void 0 : item.prettySourceValue);
1857
+ if (!((_a = item.steps) === null || _a === void 0 ? void 0 : _a.length)) {
1858
+ return (h("p", null, intl.formatMessage({
1859
+ id: "notEnoughError",
1860
+ defaultMessage: states.content.text.notEnoughError,
1861
+ }, {
1862
+ sourceUnit: item.sourceUnit,
1863
+ })));
1864
+ }
1865
+ // console.log("SELECTED ITEM ", states.selectedStep);
1866
+ // console.log("CALLBACKS ", callbacks);
1867
+ return (h("sl-select", { style: { width: "auto" }, label: (_b = states === null || states === void 0 ? void 0 : states.content) === null || _b === void 0 ? void 0 : _b.text.selectText, class: sheet.classes.Select, value: states.selectedStep, "onSl-select": (e) => {
1868
+ var _a, _b, _c, _d, _e;
1869
+ return callbacks.setExchangeState({
1870
+ amount: (_c = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.value) === null || _c === void 0 ? void 0 : _c.sourceValue,
1871
+ selectedStep: (_e = (_d = e.detail) === null || _d === void 0 ? void 0 : _d.item) === null || _e === void 0 ? void 0 : _e.value,
1872
+ });
1873
+ } }, (_c = item.steps) === null || _c === void 0 ? void 0 : _c.map((step) => {
1874
+ // console.log(item.steps);
1875
+ var _a, _b;
1876
+ return (h("sl-menu-item", { value: step, disabled: !step.available },
1877
+ step.prettyDestinationValue,
1878
+ " ",
1879
+ h("br", null),
1880
+ step.unavailableReasonCode && (h("p", { style: {
1881
+ fontSize: "var(--sl-font-size-small)",
1882
+ color: "var(--sl-color-warning-500)",
1883
+ margin: "0",
1884
+ } }, intl.formatMessage({
1885
+ id: "unavailableCode",
1886
+ defaultMessage: (_b = (_a = states.content) === null || _a === void 0 ? void 0 : _a.text) === null || _b === void 0 ? void 0 : _b.notAvailableError,
1887
+ }, {
1888
+ unavailableReasonCode: step.unavailableReasonCode,
1889
+ sourceUnit: item.sourceUnit,
1890
+ sourceValue: step.prettySourceValue || item.prettySourceMinValue,
1891
+ }))),
1892
+ h("div", { class: "step-cost", slot: "suffix" }, step.prettySourceValue)));
1893
+ })));
1894
+ }
1895
+ function chooseReward() {
1896
+ var _a;
1897
+ return [
1898
+ h("div", null,
1899
+ h("h2", { style: { margin: "var(--sl-spacing-large) 0" } }, states.content.text.rewardTitle),
1900
+ states.loading ? (loading()) : (h("div", { class: sheet.classes.Grid }, (_a = data.exchangeList) === null || _a === void 0 ? void 0 : _a.map((item) => {
1901
+ var _a, _b, _c, _d, _e;
1902
+ const style = {
1903
+ boxShadow: item.key === (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.key)
1904
+ ? "0 0 0 2px var(--sl-color-primary-500)"
1905
+ : "none",
1906
+ borderRadius: "4px",
1907
+ };
1908
+ return (h("div", { key: item.key, style: style },
1909
+ h("sl-card", { class: sheet.classes.Card, style: {
1910
+ cursor: item.unavailableReasonCode
1911
+ ? "not-allowed"
1912
+ : "pointer",
1913
+ }, onClick: () => item.available &&
1914
+ callbacks.setExchangeState({ selectedItem: item }) },
1915
+ item.key === (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.key) && (h("div", { class: "selected" },
1916
+ h(CheckmarkFilled, null))),
1917
+ h("div", { style: {
1918
+ display: "flex",
1919
+ width: "100%",
1920
+ height: "120px",
1921
+ borderRadius: "3px",
1922
+ background: item.unavailableReasonCode
1923
+ ? "rgba(0, 0, 0, 0.05)"
1924
+ : "rgba(0, 0, 0, 0)",
1925
+ } },
1926
+ h("div", { class: sheet.classes.Image, style: {
1927
+ opacity: item.unavailableReasonCode ? "0.5" : "1",
1928
+ } },
1929
+ h("img", { class: item.unavailableReasonCode
1930
+ ? "image subdued"
1931
+ : "image", src: (item === null || item === void 0 ? void 0 : item.imageUrl) ||
1932
+ getAssetPath("./assets/Reward-image.png") })),
1933
+ h("div", { class: sheet.classes.TextArea, style: {
1934
+ opacity: item.unavailableReasonCode ? "0.5" : "1",
1935
+ } },
1936
+ h("div", { class: "title", style: {
1937
+ "-webkit-line-clamp": item.unavailableReasonCode
1938
+ ? "1"
1939
+ : "2",
1940
+ } }, (_a = item.name) !== null && _a !== void 0 ? _a : ""),
1941
+ h("div", { class: "amount", style: {
1942
+ "-webkit-line-clamp": item.unavailableReasonCode
1943
+ ? "1"
1944
+ : "2",
1945
+ } }, intl.formatMessage({
1946
+ id: "sourceAmountMessage",
1947
+ defaultMessage: (_c = (_b = states.content) === null || _b === void 0 ? void 0 : _b.text) === null || _c === void 0 ? void 0 : _c.sourceAmountMessage,
1948
+ }, {
1949
+ ruleType: item.ruleType,
1950
+ sourceValue: item.prettySourceValue,
1951
+ sourceMinValue: item.prettySourceMinValue,
1952
+ sourceMaxValue: item.prettySourceMaxValue,
1953
+ })),
1954
+ item.unavailableReasonCode && (h("div", { class: "error" },
1955
+ h("sl-icon", { class: "icon", name: "exclamation-triangle-fill" }),
1956
+ intl.formatMessage({
1957
+ id: "unavailableCode",
1958
+ defaultMessage: (_e = (_d = states.content) === null || _d === void 0 ? void 0 : _d.text) === null || _e === void 0 ? void 0 : _e.notAvailableError,
1959
+ }, {
1960
+ unavailableReasonCode: item.unavailableReasonCode,
1961
+ sourceUnit: item.sourceUnit,
1962
+ sourceValue: item.prettySourceValue ||
1963
+ item.prettySourceMinValue,
1964
+ }))))))));
1965
+ }))),
1966
+ h("div", { class: sheet.classes.Button },
1967
+ h("sl-button", { class: "continue right", size: "large", onClick: () => callbacks.setStage("chooseAmount"), loading: states.loading, disabled: !states.selectedItem }, states.content.text.continueText))),
1968
+ ];
1969
+ }
1970
+ function chooseAmount() {
1971
+ var _a, _b, _c, _d;
1972
+ const input = getInput();
1973
+ const isDisabled = ((_a = states.selectedItem) === null || _a === void 0 ? void 0 : _a.ruleType) === "FIXED_GLOBAL_REWARD"
1974
+ ? false
1975
+ : input && !states.amount;
1976
+ console.log("input", input);
1977
+ console.log(states.amount);
1978
+ return (h("div", null,
1979
+ h("div", { class: sheet.classes.ChooseAmount },
1980
+ h("div", { class: "wrapper" },
1981
+ h("img", { class: "image", src: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) ||
1982
+ getAssetPath("./assets/Reward-image.png") }),
1983
+ h("div", { class: "text" },
1984
+ h("div", { class: "title" }, (_b = selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.name) !== null && _b !== void 0 ? _b : ""),
1985
+ ((_c = states.selectedItem) === null || _c === void 0 ? void 0 : _c.ruleType) === "FIXED_GLOBAL_REWARD" ? (h("div", { class: "points" }, input)) : (h("div", { class: "description" }, selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.description)),
1986
+ ((_d = states.selectedItem) === null || _d === void 0 ? void 0 : _d.ruleType) === "FIXED_GLOBAL_REWARD" ? (h("div", { class: "description" }, selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.description)) : (h("div", { class: "points" }, input)),
1987
+ h("div", { class: "space" }),
1988
+ h("div", { class: sheet.classes.Button },
1989
+ h("sl-button", { class: "cancel", size: "large", type: "text", onClick: () => callbacks.resetState() }, states.content.text.cancelText),
1990
+ h("sl-button", { class: "continue", size: "large", onClick: () => callbacks.setStage("confirmation"), disabled: isDisabled }, states.content.text.continueToConfirmationText)))))));
1991
+ }
1992
+ function confirmation() {
1993
+ // console.log(selectedItem);
1994
+ // console.log(selectedStep);
1995
+ const cost = (selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettySourceValue) || selectedItem.prettySourceValue;
1996
+ const amount = selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettyDestinationValue;
1997
+ return (h("div", null,
1998
+ h("h2", { style: { margin: "var(--sl-spacing-large) 0", textAlign: "center" } }, states.content.text.redeemTitle),
1999
+ h("div", { class: sheet.classes.Confirmation },
2000
+ h("div", { class: "wrapper" },
2001
+ h("div", { class: "field" }, states.content.text.rewardNameTitle),
2002
+ h("div", { class: "reward-item-container" },
2003
+ h("div", { class: "reward-title" }, selectedItem.name),
2004
+ h("img", { class: "image", src: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) ||
2005
+ getAssetPath("./assets/Reward-image.png") }))),
2006
+ h("div", { class: "wrapper padding" },
2007
+ h("div", { class: "field" })),
2008
+ amount && (h("div", { class: "wrapper top-border padding" },
2009
+ h("div", { class: "field" }, states.content.text.rewardAmountTitle),
2010
+ h("div", null, amount))),
2011
+ h("div", { class: "wrapper top-border padding" },
2012
+ h("div", { class: "field" }, states.content.text.costTitle),
2013
+ h("div", { class: "value" }, cost)),
2014
+ h("div", { class: sheet.classes.Button },
2015
+ h("sl-button", { class: "cancel", type: "text", size: "large", onClick: () => callbacks.setStage("chooseAmount") }, states.content.text.backText),
2016
+ h("sl-button", { class: "continue", size: "large", loading: states.loading, onClick: callbacks.exchangeReward }, states.content.text.redeemText)))));
2017
+ }
2018
+ function success() {
2019
+ var _a, _b, _c, _d, _e;
2020
+ // console.log("success");
2021
+ return (h("div", { class: sheet.classes.Success },
2022
+ h(Gift$1, null),
2023
+ h(Confetti, null),
2024
+ h("div", { class: "title" }, states.content.text.rewardRedeemedText),
2025
+ h("div", { class: "description" }, intl.formatMessage({
2026
+ id: "successMessage",
2027
+ defaultMessage: states.content.text.redemptionSuccessText,
2028
+ }, {
2029
+ sourceValue: (_a = states.selectedItem.prettySourceValue) !== null && _a !== void 0 ? _a : (_b = states.selectedStep) === null || _b === void 0 ? void 0 : _b.prettySourceValue,
2030
+ destinationValue: ((_c = states.selectedStep) === null || _c === void 0 ? void 0 : _c.prettyDestinationValue) || ((_d = states.selectedItem) === null || _d === void 0 ? void 0 : _d.name) ||
2031
+ states.selectedItem.globalRewardKey,
2032
+ })),
2033
+ (data === null || data === void 0 ? void 0 : data.fuelTankCode) && (h("div", { style: {
2034
+ width: "40%",
2035
+ margin: "-30px auto var(--sl-spacing-xxx-large) auto",
2036
+ textAlign: "left",
2037
+ color: "var(--sl-color-neutral-700)",
2038
+ } },
2039
+ states.content.text.promoCode,
2040
+ h(ShareLinkView, { shareString: data.fuelTankCode, tooltiptext: (_e = states === null || states === void 0 ? void 0 : states.content) === null || _e === void 0 ? void 0 : _e.text.toopTipText, open: states.open, onClick: callbacks.copyFuelTankCode }))),
2041
+ h("div", { class: sheet.classes.Button },
2042
+ h("sl-button", { class: "continue center", type: "primary", size: "large", onClick: () => callbacks.resetState(true) }, states.content.text.doneText))));
2043
+ }
2044
+ const stages = {
2045
+ chooseReward: () => chooseReward(),
2046
+ chooseAmount: () => chooseAmount(),
2047
+ confirmation: () => confirmation(),
2048
+ success: () => success(),
2049
+ };
2050
+ const currentStage = stages[states.redeemStage];
2051
+ function stageMap() {
2052
+ const stageNumber = stageList.indexOf(states.redeemStage);
2053
+ return (h("div", { class: sheet.classes.ProgressBar },
2054
+ h("div", { class: "text-area" }, Object.keys(stageProgressList).map((stage) => {
2055
+ if (stageList.indexOf(stage) <= stageNumber) {
2056
+ return h("span", { class: "text" }, stageProgressList[stage]);
2057
+ }
2058
+ else {
2059
+ return (h("span", { class: "text subdued" }, stageProgressList[stage]));
2060
+ }
2061
+ })),
2062
+ h(ProgressBar, { stageCount: 3, currentStage: stageNumber })));
2063
+ }
2064
+ function loading() {
2065
+ return (h("div", { class: sheet.classes.Grid }, [...Array(states.content.text.skeletonCardNum)].map(() => {
2066
+ return (h("div", null,
2067
+ h("sl-card", { class: sheet.classes.Card },
2068
+ h("div", { class: sheet.classes.CardLayout },
2069
+ h("div", null,
2070
+ h("sl-skeleton", { style: {
2071
+ width: "100px",
2072
+ height: "100px",
2073
+ margin: "9px",
2074
+ "--border-radius": "4px",
2075
+ } })),
2076
+ h("div", { style: {
2077
+ margin: "var(--sl-spacing-small) var(--sl-spacing-small) 0 0",
2078
+ width: "100%",
2079
+ } },
2080
+ h("sl-skeleton", { style: { marginBottom: "var(--sl-spacing-small)" } }),
2081
+ h("sl-skeleton", { style: { marginBottom: "var(--sl-spacing-small)" } }),
2082
+ h("sl-skeleton", { style: { width: "45%" } }))))));
2083
+ })));
2084
+ }
2085
+ function errorMessage() {
2086
+ return (h("sl-alert", { type: "danger", open: true },
2087
+ h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
2088
+ states.content.text.redemptionError));
2089
+ }
2090
+ function queryErrorMessage() {
2091
+ return (h("sl-alert", { type: "danger", open: true },
2092
+ h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
2093
+ states.content.text.queryError));
2094
+ }
2095
+ function Confetti() {
2096
+ return (h("canvas", { ref: (canvas) => {
2097
+ if (!(refs === null || refs === void 0 ? void 0 : refs.canvasRef))
2098
+ return;
2099
+ refs.canvasRef.current = canvas;
2100
+ }, id: "my-canvas", class: sheet.classes.Confetti }));
2101
+ }
2102
+ return (h("div", { class: sheet.classes.Container },
2103
+ h("style", { type: "text/css" }, styleString),
2104
+ h("div", null,
2105
+ stageMap(),
2106
+ states.exchangeError && errorMessage(),
2107
+ states.queryError && queryErrorMessage(),
2108
+ currentStage && currentStage(),
2109
+ states.redeemStage === "success")));
2110
+ }
2111
+
2112
+ const baseResponse = (data, stage = "chooseReward", selectedItem = null, selectedStep = null, error = false, loading = false, fueltank = null) => ({
2113
+ states: {
2114
+ content: {
2115
+ text: {
2116
+ buttonText: "Exchange Rewards",
2117
+ notAvailableError: "{unavailableReasonCode, select, NOT_CHAMPION {CUSTOM ERROR MESSAGE } US_TAX {Exceeds tax limit for this year} INSUFFICIENT_REDEEMABLE_CREDIT {{sourceValue} required} AVAILABILITY_PREDICATE {Not available} other {unavailableReasonCode} }",
2118
+ chooseRewardTitle: "Rewards",
2119
+ chooseAmountTitle: "Select",
2120
+ confirmationTitle: "Confirm",
2121
+ rewardTitle: "Choose a reward",
2122
+ cancelText: "Cancel",
2123
+ backText: "Back",
2124
+ continueText: "Continue",
2125
+ continueToConfirmationText: "Continue to confirmation",
2126
+ redeemText: "Redeem",
2127
+ redeemTitle: "Confirm and redeem",
2128
+ redemptionSuccessText: "Redeemed {sourceValue} for {destinationValue}",
2129
+ doneText: "Done",
2130
+ toolTipText: "Copied!",
2131
+ selectText: "Select amount to receive",
2132
+ sourceAmountMessage: "{ruleType, select, FIXED_GLOBAL_REWARD {{sourceValue}} other {{sourceMinValue} to {sourceMaxValue}}}",
2133
+ rewardRedeemedText: "Reward redeemed",
2134
+ redemptionError: "An error occured trying to redeem this reward. Please try again",
2135
+ promoCode: "Promo code",
2136
+ skeletonCardNum: 8,
2137
+ rewardNameTitle: "Reward Name",
2138
+ rewardAmountTitle: "Reward Amount",
2139
+ costTitle: "Cost",
2140
+ },
2141
+ },
2142
+ redeemStage: stage,
2143
+ amount: 0,
2144
+ exchangeError: error,
2145
+ loading: loading,
2146
+ selectedItem: selectedItem,
2147
+ selectedStep: selectedStep,
2148
+ open: false,
2149
+ },
2150
+ data: {
2151
+ exchangeList: data,
2152
+ fuelTankCode: fueltank,
2153
+ },
2154
+ callbacks: {
2155
+ exchangeReward: null,
2156
+ resetState: null,
2157
+ setStage: null,
2158
+ setExchangeState: null,
2159
+ copyFuelTankCode: null,
2160
+ refs: null,
2161
+ },
2162
+ refs: null,
2163
+ });
2164
+ const baseReward = {
2165
+ key: "",
2166
+ name: "",
2167
+ description: "Description of reward. Lorem ipsum dolor sit amet, consectetur adipiscing. Id nec semper sapien dignissim rhoncus nunc.",
2168
+ imageUrl: "",
2169
+ available: true,
2170
+ unavailableReasonCode: null,
2171
+ ruleType: "FIXED_GLOBAL_REWARD",
2172
+ sourceUnit: "POINT",
2173
+ sourceValue: 10,
2174
+ prettySourceValue: "10 SaaSquatch Points",
2175
+ sourceMinValue: null,
2176
+ prettySourceMinValue: null,
2177
+ sourceMaxValue: null,
2178
+ prettySourceMaxValue: null,
2179
+ destinationMinValue: null,
2180
+ prettyDestinationMinValue: null,
2181
+ destinationMaxValue: null,
2182
+ prettyDestinationMaxValue: null,
2183
+ globalRewardKey: "",
2184
+ destinationUnit: null,
2185
+ steps: [],
2186
+ };
2187
+ const notEnoughPoints = {
2188
+ available: false,
2189
+ unavailableReasonCode: "INSUFFICIENT_REDEEMABLE_CREDIT",
2190
+ };
2191
+ const usTax = {
2192
+ available: false,
2193
+ unavailableReasonCode: "US_TAX",
2194
+ };
2195
+ const customError = {
2196
+ available: false,
2197
+ unavailableReasonCode: "NOT_CHAMPION",
2198
+ };
2199
+ const selected = {
2200
+ key: "r1",
2201
+ };
2202
+ const imageUrl = (props) => ({
2203
+ imageUrl: props,
2204
+ });
2205
+ const name = (props) => ({
2206
+ name: props,
2207
+ });
2208
+ const description = (props) => ({
2209
+ description: props,
2210
+ });
2211
+ const fixedValue = (props) => ({
2212
+ prettySourceValue: props,
2213
+ });
2214
+ const variableValue = (min, max, unit) => ({
2215
+ ruleType: "VARIABLE_CREDIT_REWARD",
2216
+ sourceMinValue: min,
2217
+ prettySourceMinValue: min + " " + unit,
2218
+ sourceMaxValue: max,
2219
+ prettySourceMaxValue: max + " " + unit,
2220
+ });
2221
+ const demoData = [
2222
+ {
2223
+ ...baseReward,
2224
+ ...name("Free swag with a promo code"),
2225
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1643653103/squatch-assets/default_rewards_1.png"),
2226
+ ...fixedValue("40 Points"),
2227
+ },
2228
+ {
2229
+ ...baseReward,
2230
+ ...selected,
2231
+ ...name("Visa® Prepaid Card USD"),
2232
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000268/squatch-assets/veHErQX.png"),
2233
+ ...variableValue(20, 80, "Points"),
2234
+ },
2235
+ {
2236
+ ...baseReward,
2237
+ ...name("$50 Store credit"),
2238
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000270/squatch-assets/WkCMVSE.png"),
2239
+ ...fixedValue("100 Points"),
2240
+ },
2241
+ {
2242
+ ...baseReward,
2243
+ ...name("Variable amount of store credit"),
2244
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000240/squatch-assets/Jn2fE0s.png"),
2245
+ ...variableValue(20, 100, "Points"),
2246
+ },
2247
+ ];
2248
+ const data = [
2249
+ {
2250
+ ...baseReward,
2251
+ ...name("Free swag with a promo code"),
2252
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1643653103/squatch-assets/default_rewards_1.png"),
2253
+ ...fixedValue("40 SaaSquatch Points"),
2254
+ },
2255
+ {
2256
+ ...baseReward,
2257
+ ...selected,
2258
+ ...name("Visa® Prepaid Card USD"),
2259
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000268/squatch-assets/veHErQX.png"),
2260
+ ...variableValue(20, 80, "Points"),
2261
+ },
2262
+ {
2263
+ ...baseReward,
2264
+ ...name("A very exclusive gift box"),
2265
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000223/squatch-assets/93BvEgH.png"),
2266
+ ...fixedValue("30 SaaSquatch Points"),
2267
+ },
2268
+ {
2269
+ ...baseReward,
2270
+ ...name("$50 Store credit"),
2271
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000270/squatch-assets/WkCMVSE.png"),
2272
+ ...fixedValue("100 SaaSquatch Points"),
2273
+ },
2274
+ {
2275
+ ...baseReward,
2276
+ ...name("Variable amount of store credit"),
2277
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000240/squatch-assets/Jn2fE0s.png"),
2278
+ ...variableValue(20, 100, "Points"),
2279
+ },
2280
+ {
2281
+ ...baseReward,
2282
+ ...notEnoughPoints,
2283
+ ...name("A very rare cactus"),
2284
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000224/squatch-assets/hhlF2Ey.png"),
2285
+ ...fixedValue("2000 SaaSquatch Points"),
2286
+ },
2287
+ {
2288
+ ...baseReward,
2289
+ ...usTax,
2290
+ ...name("$1000 Store credit with a really super long name in the front page"),
2291
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000273/squatch-assets/y9HSls1.png"),
2292
+ ...fixedValue("2000 SaaSquatch Long Points"),
2293
+ },
2294
+ {
2295
+ ...baseReward,
2296
+ ...notEnoughPoints,
2297
+ ...name("A holiday gift box"),
2298
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000223/squatch-assets/dWEdB3p.png"),
2299
+ ...fixedValue("100 SaaSquatch Points"),
2300
+ },
2301
+ ];
2302
+ const rewardExchange = {
2303
+ ...baseResponse(data),
2304
+ };
2305
+ const demoRewardExchange = {
2306
+ ...baseResponse(demoData),
2307
+ };
2308
+ const rewardExchangeLongText = {
2309
+ ...baseResponse([
2310
+ {
2311
+ ...baseReward,
2312
+ ...notEnoughPoints,
2313
+ ...name("Lorem ipsum dolor sit amet consectetur adipisicing elit. Sunt ratione a itaque non obcaecati iste, amet repudiandae at consequatur adipisci culpa nam, incidunt exercitationem aliquid."),
2314
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000223/squatch-assets/dWEdB3p.png"),
2315
+ ...fixedValue("Lorem ipsum dolor sit amet consectetur adipisicing elit. Sunt ratione a itaque non obcaecati iste, amet repudiandae at consequatur adipisci culpa nam, incidunt exercitationem aliquid."),
2316
+ },
2317
+ {
2318
+ ...baseReward,
2319
+ ...name("Lorem ipsum dolor sit amet consectetur adipisicing elit. Sunt ratione a itaque non obcaecati iste, amet repudiandae at consequatur adipisci culpa nam, incidunt exercitationem aliquid."),
2320
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000273/squatch-assets/y9HSls1.png"),
2321
+ ...fixedValue("Lorem ipsum dolor sit amet consectetur adipisicing elit. Sunt ratione a itaque non obcaecati iste, amet repudiandae at consequatur adipisci culpa nam, incidunt exercitationem aliquid."),
2322
+ },
2323
+ {
2324
+ ...baseReward,
2325
+ ...name("Suuuuuuuuper aweeeeesssssoooommme reward!!!!!!"),
2326
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000270/squatch-assets/WkCMVSE.png"),
2327
+ ...fixedValue("Lorem ipsum dolor sit amet consectetur adipisicing elit. Sunt ratione a itaque non obcaecati iste, amet repudiandae at consequatur adipisci culpa nam, incidunt exercitationem aliquid."),
2328
+ },
2329
+ ...data,
2330
+ ]),
2331
+ };
2332
+ const rewardExchangeCustomErrorMsg = {
2333
+ ...baseResponse([
2334
+ {
2335
+ ...baseReward,
2336
+ ...customError,
2337
+ ...name("A very rare cactus"),
2338
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000224/squatch-assets/hhlF2Ey.png"),
2339
+ ...fixedValue("2000 SaaSquatch Points"),
2340
+ },
2341
+ ...data,
2342
+ ]),
2343
+ };
2344
+ const rewardExchangeSelected = {
2345
+ ...baseResponse(data, "chooseReward", {
2346
+ ...baseReward,
2347
+ ...selected,
2348
+ ...name("Visa® Prepaid Card USD"),
2349
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000268/squatch-assets/veHErQX.png"),
2350
+ ...variableValue(20, 80, "Points"),
2351
+ }),
2352
+ };
2353
+ const baseStep = (dst, dstUnit, src, srcUnit, available = true, unavailableReason = null) => ({
2354
+ destinationValue: dst,
2355
+ prettyDestinationValue: dstUnit + dst,
2356
+ sourceValue: src,
2357
+ prettySourceValue: src + " " + srcUnit,
2358
+ available: available,
2359
+ unavailableReasonCode: unavailableReason,
2360
+ });
2361
+ const chooseAmountVariable = {
2362
+ ...baseResponse(data, "chooseAmount", {
2363
+ ...baseReward,
2364
+ ...name("Visa® Prepaid Card USD"),
2365
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000268/squatch-assets/veHErQX.png"),
2366
+ ...variableValue(20, 80, "Points"),
2367
+ steps: [
2368
+ baseStep(20, "$", 40, "Points"),
2369
+ baseStep(30, "$", 60, "Points"),
2370
+ baseStep(40, "$", 80, "Points"),
2371
+ baseStep(50, "$", 100, "Points"),
2372
+ baseStep(60, "$", 120, "Points"),
2373
+ ],
2374
+ }),
2375
+ };
2376
+ const chooseAmountVariableNoDescription = {
2377
+ ...baseResponse(data, "chooseAmount", {
2378
+ ...baseReward,
2379
+ ...name("Visa® Prepaid Card USD"),
2380
+ ...description(""),
2381
+ ...imageUrl("https://i.imgur.com/veHErQX.png"),
2382
+ ...variableValue(20, 80, "Points"),
2383
+ steps: [
2384
+ baseStep(20, "$", 40, "Points"),
2385
+ baseStep(30, "$", 60, "Points"),
2386
+ baseStep(40, "$", 80, "Points"),
2387
+ baseStep(50, "$", 100, "Points"),
2388
+ baseStep(60, "$", 120, "Points"),
2389
+ ],
2390
+ }),
2391
+ };
2392
+ const chooseAmountVariableDisabled = {
2393
+ ...baseResponse(data, "chooseAmount", {
2394
+ ...baseReward,
2395
+ ...name("Visa® Prepaid Card USD"),
2396
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000268/squatch-assets/veHErQX.png"),
2397
+ ...variableValue(20, 80, "Points"),
2398
+ steps: [
2399
+ baseStep(20, "$", 40, "Points"),
2400
+ baseStep(30, "$", 60, "Points"),
2401
+ baseStep(40, "$", 80, "Points", false, "INSUFFICIENT_REDEEMABLE_CREDIT"),
2402
+ baseStep(50, "$", 100, "Points", false, "INSUFFICIENT_REDEEMABLE_CREDIT"),
2403
+ baseStep(60, "$", 120, "Points", false, "INSUFFICIENT_REDEEMABLE_CREDIT"),
2404
+ ],
2405
+ }),
2406
+ };
2407
+ const chooseAmountVariableUnavailable = {
2408
+ ...baseResponse(data, "chooseAmount", {
2409
+ ...baseReward,
2410
+ ...name("Visa® Prepaid Card USD"),
2411
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000268/squatch-assets/veHErQX.png"),
2412
+ ...variableValue(20, 80, "Points"),
2413
+ steps: [
2414
+ baseStep(20, "$", 40, "Points"),
2415
+ baseStep(30, "$", 60, "Points"),
2416
+ baseStep(40, "$", 80, "Points", false, "US_TAX"),
2417
+ baseStep(50, "$", 100, "Points", false, "US_TAX"),
2418
+ baseStep(60, "$", 120, "Points", false, "US_TAX"),
2419
+ ],
2420
+ }),
2421
+ };
2422
+ const chooseAmountFixed = {
2423
+ ...baseResponse(data, "chooseAmount", {
2424
+ ...baseReward,
2425
+ ...name("Free swag with a promo code"),
2426
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000252/squatch-assets/n7vC4BR.png"),
2427
+ ...fixedValue("40 SaaSquatch Points"),
2428
+ }),
2429
+ };
2430
+ const chooseAmountFixedNoDescription = {
2431
+ ...baseResponse(data, "chooseAmount", {
2432
+ ...baseReward,
2433
+ ...description(""),
2434
+ ...name("Free swag with a promo code"),
2435
+ ...imageUrl("https://i.imgur.com/n7vC4BR.png"),
2436
+ ...fixedValue("40 SaaSquatch Points"),
2437
+ }),
2438
+ };
2439
+ const confirmFixed = {
2440
+ ...baseResponse(data, "confirmation", {
2441
+ ...baseReward,
2442
+ ...name("Free swag with a promo code"),
2443
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000252/squatch-assets/n7vC4BR.png"),
2444
+ ...fixedValue("40 SaaSquatch Points"),
2445
+ }),
2446
+ };
2447
+ const confirmVariable = {
2448
+ ...baseResponse(data, "confirmation", {
2449
+ ...baseReward,
2450
+ ...name("Visa® Prepaid Card USD"),
2451
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000268/squatch-assets/veHErQX.png"),
2452
+ ...variableValue(20, 80, "Points"),
2453
+ }, baseStep(20, "$", 40, "Points")),
2454
+ };
2455
+ const error = {
2456
+ ...baseResponse(data, "confirmation", {
2457
+ ...baseReward,
2458
+ ...name("Visa® Prepaid Card USD"),
2459
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000268/squatch-assets/veHErQX.png"),
2460
+ ...variableValue(20, 80, "Points"),
2461
+ }, baseStep(20, "$", 40, "Points"), true),
2462
+ };
2463
+ const success = {
2464
+ ...baseResponse(data, "success", {
2465
+ ...baseReward,
2466
+ ...name("Free swag with a promo code"),
2467
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000252/squatch-assets/n7vC4BR.png"),
2468
+ ...fixedValue("40 SaaSquatch Points"),
2469
+ }, undefined, undefined, undefined, "4ah2-hh46-gk7r"),
2470
+ };
2471
+ const successVariable = {
2472
+ ...baseResponse(data, "success", {
2473
+ ...baseReward,
2474
+ ...name("Visa® Prepaid Card USD"),
2475
+ ...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1644000223/squatch-assets/93BvEgH.png"),
2476
+ ...variableValue(20, 80, "Points"),
2477
+ }, baseStep(20, "$", 40, "Points")),
2478
+ };
2479
+ const loading = {
2480
+ ...baseResponse(null, "chooseReward", null, null, false, true),
2481
+ };
2482
+
2483
+ function CardFeedView(props, children) {
2484
+ const style = {
2485
+ Container: {
2486
+ columnGap: props.gap + "px",
2487
+ columnWidth: props.width + "px",
2488
+ "& > div": {
2489
+ marginBottom: "24px",
2490
+ },
2491
+ },
2492
+ };
2493
+ const sheet = createStyleSheet(style);
2494
+ const styleString = sheet.toString();
2495
+ console.log(props);
2496
+ const vanillaStyle = `
2497
+ :host{
2498
+ display: block;
2499
+ }
2500
+
2501
+ `;
2502
+ return (h("div", null,
2503
+ h("style", { type: "text/css" },
2504
+ styleString,
2505
+ vanillaStyle),
2506
+ h("div", { class: sheet.classes.Container }, children)));
2507
+ }
2508
+
2509
+ function t(t,n,r){return Math.min(Math.max(t,r),n)}class n extends Error{constructor(t){super(`Failed to parse color: "${t}"`);}}function r(r){if("string"!=typeof r)throw new n(r);if("transparent"===r.trim().toLowerCase())return [0,0,0,0];let e=r.trim();e=u.test(r)?function(t){const r=t.toLowerCase().trim(),e=o[function(t){let n=5381,r=t.length;for(;r;)n=33*n^t.charCodeAt(--r);return (n>>>0)%2341}(r)];if(!e)throw new n(t);return `#${e}`}(r):r;const f=s.exec(e);if(f){const t=Array.from(f).slice(1);return [...t.slice(0,3).map(t=>parseInt(_(t,2),16)),parseInt(_(t[3]||"f",2),16)/255]}const p=i.exec(e);if(p){const t=Array.from(p).slice(1);return [...t.slice(0,3).map(t=>parseInt(t,16)),parseInt(t[3]||"ff",16)/255]}const z=a.exec(e);if(z){const t=Array.from(z).slice(1);return [...t.slice(0,3).map(t=>parseInt(t,10)),parseFloat(t[3]||"1")]}const h=c.exec(e);if(h){const[e,o,_,s]=Array.from(h).slice(1).map(parseFloat);if(t(0,100,o)!==o)throw new n(r);if(t(0,100,_)!==_)throw new n(r);return [...l(e,o,_),s||1]}throw new n(r)}const e=t=>parseInt(t.replace(/_/g,""),36),o="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((t,n)=>{const r=e(n.substring(0,3)),o=e(n.substring(3)).toString(16);let _="";for(let t=0;t<6-o.length;t++)_+="0";return t[r]=`${_}${o}`,t},{}),_=(t,n)=>Array.from(Array(n)).map(()=>t).join(""),s=new RegExp(`^#${_("([a-f0-9])",3)}([a-f0-9])?$`,"i"),i=new RegExp(`^#${_("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),a=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${_(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),c=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,u=/^[a-z]+$/i,f=t=>Math.round(255*t),l=(t,n,r)=>{let e=r/100;if(0===n)return [e,e,e].map(f);const o=(t%360+360)%360/60,_=(1-Math.abs(2*e-1))*(n/100),s=_*(1-Math.abs(o%2-1));let i=0,a=0,c=0;o>=0&&o<1?(i=_,a=s):o>=1&&o<2?(i=s,a=_):o>=2&&o<3?(a=_,c=s):o>=3&&o<4?(a=s,c=_):o>=4&&o<5?(i=s,c=_):o>=5&&o<6&&(i=_,c=s);const u=e-_/2;return [i+u,a+u,c+u].map(f)};function p(t){const[n,e,o,_]=r(t).map((t,n)=>3===n?t:t/255),s=Math.max(n,e,o),i=Math.min(n,e,o),a=(s+i)/2;if(s===i)return [0,0,a,_];const c=s-i;return [60*(n===s?(e-o)/c+(e<o?6:0):e===s?(o-n)/c+2:(n-e)/c+4),a>.5?c/(2-s-i):c/(s+i),a,_]}function z(n,r,e,o){return `hsla(${(n%360).toFixed()}, ${t(0,100,100*r).toFixed()}%, ${t(0,100,100*e).toFixed()}%, ${parseFloat(t(0,1,o).toFixed(3))})`}
2510
+
2511
+ const colorScale = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
2512
+ const lScale = [
2513
+ 0.95,
2514
+ 0.86,
2515
+ 0.76,
2516
+ 0.66,
2517
+ 0.56,
2518
+ 0.46,
2519
+ 0.39,
2520
+ 0.32,
2521
+ 0.25,
2522
+ 0.18,
2523
+ 0.15,
2524
+ ];
2525
+ // https://github.com/ricokahler/color2k/blob/main/src/parseToRgba.ts
2526
+ const hslaRegex = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i;
2527
+ function niceParseToHsla(color) {
2528
+ const normalizedColor = color.trim();
2529
+ const hslaMatch = hslaRegex.exec(normalizedColor);
2530
+ if (hslaMatch) {
2531
+ const [h, s, l, a] = Array.from(hslaMatch).slice(1).map(parseFloat);
2532
+ if (t(0, 100, s) !== s)
2533
+ throw new n(color);
2534
+ if (t(0, 100, l) !== l)
2535
+ throw new n(color);
2536
+ return [h, s / 100, l, a || 1];
2537
+ }
2538
+ // Warning -- converts to RGB first, so is lossy
2539
+ return p(color);
2540
+ }
2541
+ function generateScale(color, name = "primary") {
2542
+ const [h, s, l, a] = niceParseToHsla(color);
2543
+ return lScale
2544
+ .map((l) => z(h, s, l, a))
2545
+ .map((color, index) => {
2546
+ return `--sl-color-${name}-${colorScale[index]}: ${color};\n`;
2547
+ });
2548
+ }
2549
+ /**
2550
+ * Generated a Shoelace color scale css string from a base color
2551
+ *
2552
+ * @param color
2553
+ * @param name
2554
+ * @returns
2555
+ */
2556
+ function autoColorScaleCss(color, name = "primary") {
2557
+ return generateScale(color, name).join("\n");
2558
+ }
2559
+
2560
+ const map = new Map();
2561
+ function withShadowView(component) {
2562
+ // TODO: Could only do this if rendered in a Stencilbook environment to prevent unintended side-effects
2563
+ const element = getElement(component);
2564
+ let renderFn = component["render"].bind(component);
2565
+ const newRenderFn = () => {
2566
+ const key = element.getAttribute("stencilbook-shadow-view");
2567
+ if (key) {
2568
+ const value = map.get(key);
2569
+ if (value) {
2570
+ return value;
2571
+ }
2572
+ }
2573
+ return renderFn();
2574
+ };
2575
+ component["render"] = newRenderFn;
2576
+ }
2577
+ /**
2578
+ * Any story that defines `parameters.tagname` will be used as a wrapper component around the view
2579
+ */
2580
+ const ShadowViewAddon = ({ story }, children) => {
2581
+ var _a;
2582
+ let TagName = (_a = story.parent.parameters) === null || _a === void 0 ? void 0 : _a.tagname;
2583
+ if (!TagName)
2584
+ return children;
2585
+ const randomInt = Math.round(Math.random() * 100000);
2586
+ map.set(randomInt + "", children);
2587
+ const RandomTagName = "stencilbook-shawdow-view-" + randomInt;
2588
+ // This will only re-render when the tag name changes, so we use a random tag name every time.
2589
+ // Altneratively we could try to trick Stencil to call `forceUpdate` every time.
2590
+ return (h(RandomTagName, null,
2591
+ h(TagName, { "stencilbook-shadow-view": randomInt })));
2592
+ };
2593
+
2594
+ export { withShadowView as A, demoRewardExchange as B, CardFeedView as C, EditProfileView as E, LeaderboardView as L, PortalFrameView as P, ReferralIframeView as R, ShareButtonView as S, TaskCardView as T, ShareLinkView as a, useShareButton as b, PortalChangePasswordView as c, PortalLoginView as d, PortalRegisterView as e, ProgressBarView as f, RewardExchangeView as g, rewardExchangeLongText as h, rewardExchangeSelected as i, chooseAmountFixed as j, chooseAmountFixedNoDescription as k, chooseAmountVariable as l, chooseAmountVariableNoDescription as m, chooseAmountVariableDisabled as n, chooseAmountVariableUnavailable as o, confirmFixed as p, confirmVariable as q, rewardExchangeCustomErrorMsg as r, error as s, success as t, useShareLink as u, successVariable as v, loading as w, rewardExchange as x, autoColorScaleCss as y, ShadowViewAddon as z };