@saasquatch/mint-components 1.15.0-4 → 1.15.0-41

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 (578) hide show
  1. package/dist/cjs/{GenericTableView-a9f4ba75.js → GenericTableView-a9d0b798.js} +7 -7
  2. package/dist/cjs/IndirectTaxDetailsView-d0290a12.js +646 -0
  3. package/dist/cjs/{ShadowViewAddon-9e7916d8.js → ShadowViewAddon-9cb7a310.js} +1333 -1316
  4. package/dist/cjs/{copy-text-view-c85acaaa.js → copy-text-view-ee147291.js} +54 -39
  5. package/dist/cjs/data-6d96b89c.js +137 -0
  6. package/dist/cjs/{email-registration-view-55b378dc.js → email-registration-view-dca94dc9.js} +2 -2
  7. package/dist/cjs/{global-0cf6d295.js → global-d62c5561.js} +308 -90
  8. package/dist/cjs/loader.cjs.js +2 -2
  9. package/dist/cjs/mint-components.cjs.js +2 -2
  10. package/dist/cjs/{mixins-f7e0377a.js → mixins-4761d472.js} +6 -6
  11. package/dist/cjs/parseStates-d1effc19.js +16 -0
  12. package/dist/cjs/{sqm-banking-info-form_17.cjs.entry.js → sqm-banking-info-form_10.cjs.entry.js} +647 -2188
  13. package/dist/cjs/{sqm-base-registration-form-view-8a2c8763.js → sqm-base-registration-form-view-1c5094d3.js} +2 -2
  14. package/dist/cjs/{sqm-big-stat_41.cjs.entry.js → sqm-big-stat_42.cjs.entry.js} +570 -115
  15. package/dist/cjs/{sqm-close-button-view-ea3fa23b.js → sqm-close-button-view-b297e933.js} +1 -1
  16. package/dist/cjs/sqm-close-button.cjs.entry.js +2 -2
  17. package/dist/cjs/sqm-code-verification.cjs.entry.js +348 -0
  18. package/dist/cjs/sqm-email-verification.cjs.entry.js +2 -2
  19. package/dist/cjs/sqm-empty_4.cjs.entry.js +49 -49
  20. package/dist/cjs/sqm-instant-access-registration.cjs.entry.js +3 -3
  21. package/dist/cjs/sqm-invoice-table-data-cell_5.cjs.entry.js +84 -0
  22. package/dist/cjs/{sqm-leaderboard-rank-view-d39a55d8.js → sqm-leaderboard-rank-view-7c6cebe3.js} +1 -1
  23. package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +3 -3
  24. package/dist/cjs/{sqm-navigation-sidebar-item-view-6f35d2ee.js → sqm-navigation-sidebar-item-view-10b62df1.js} +18 -7
  25. package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +26 -3
  26. package/dist/cjs/{sqm-navigation-sidebar-view-17111896.js → sqm-navigation-sidebar-view-38a5227a.js} +16 -6
  27. package/dist/cjs/sqm-navigation-sidebar.cjs.entry.js +19 -3
  28. package/dist/cjs/sqm-pagination_3.cjs.entry.js +86 -59
  29. package/dist/cjs/sqm-password-field.cjs.entry.js +1 -1
  30. package/dist/cjs/{sqm-portal-email-verification-view-ab0fb983.js → sqm-portal-email-verification-view-156accab.js} +3 -3
  31. package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +4 -4
  32. package/dist/cjs/{sqm-portal-forgot-password-view-78f19ef9.js → sqm-portal-forgot-password-view-fdd97c18.js} +24 -17
  33. package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +25 -4
  34. package/dist/cjs/sqm-portal-google-login.cjs.entry.js +3 -3
  35. package/dist/cjs/sqm-portal-google-registration-form.cjs.entry.js +4 -4
  36. package/dist/cjs/{sqm-portal-login-view-761a4d8e.js → sqm-portal-login-view-0fbbda1b.js} +3 -3
  37. package/dist/cjs/{sqm-portal-profile-view-e3026b53.js → sqm-portal-profile-view-f226725e.js} +3 -3
  38. package/dist/cjs/sqm-portal-profile.cjs.entry.js +3 -3
  39. package/dist/cjs/{sqm-portal-registration-form-view-637a4bf4.js → sqm-portal-registration-form-view-399f4eaf.js} +2 -2
  40. package/dist/cjs/sqm-portal-registration-form.cjs.entry.js +3 -3
  41. package/dist/cjs/{sqm-portal-reset-password-view-fe602822.js → sqm-portal-reset-password-view-0439a9e5.js} +2 -2
  42. package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +3 -3
  43. package/dist/cjs/{sqm-portal-verify-email-view-7b678f34.js → sqm-portal-verify-email-view-05f72dec.js} +2 -2
  44. package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +3 -3
  45. package/dist/cjs/{sqm-qr-code-view-15dfc0b6.js → sqm-qr-code-view-7ee9fa56.js} +2 -7
  46. package/dist/cjs/sqm-qr-code.cjs.entry.js +1 -1
  47. package/dist/cjs/sqm-referral-table_11.cjs.entry.js +111 -24
  48. package/dist/cjs/sqm-referred-registration.cjs.entry.js +2 -2
  49. package/dist/cjs/sqm-rewards-table-customer-note-cell.cjs.entry.js +1 -1
  50. package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +81 -15
  51. package/dist/cjs/sqm-stencilbook.cjs.entry.js +13717 -12395
  52. package/dist/cjs/sqm-tabs.cjs.entry.js +16 -4
  53. package/dist/cjs/sqm-tax-and-cash.cjs.entry.js +1221 -0
  54. package/dist/cjs/sqm-text-span-view-ce4c0178.js +63 -0
  55. package/dist/cjs/sqm-text-span.cjs.entry.js +4 -4
  56. package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +11 -3
  57. package/dist/cjs/sqm-widget-verification.cjs.entry.js +17 -6
  58. package/dist/cjs/{usePayoutStatus-4b5894ef.js → usePayoutStatus-feeac99b.js} +8 -5
  59. package/dist/cjs/utils-ce18d1bc.js +105 -0
  60. package/dist/collection/collection-manifest.json +1 -0
  61. package/dist/collection/components/sqm-big-stat/BigStat.stories.js +13 -0
  62. package/dist/collection/components/sqm-big-stat/sqm-big-stat-view.js +15 -7
  63. package/dist/collection/components/sqm-big-stat/sqm-big-stat.js +162 -2
  64. package/dist/collection/components/sqm-big-stat/useBigStat.js +10 -0
  65. package/dist/collection/components/sqm-big-stat/useDemoBigStat.js +13 -4
  66. package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field.js +1 -0
  67. package/dist/collection/components/sqm-coupon-code/CouponCode.stories.js +7 -0
  68. package/dist/collection/components/sqm-coupon-code/sqm-coupon-code-view.js +13 -13
  69. package/dist/collection/components/sqm-coupon-code/sqm-coupon-code.js +169 -1
  70. package/dist/collection/components/sqm-coupon-code/useCouponCode.js +1 -0
  71. package/dist/collection/components/sqm-divided-layout/sqm-divided-layout-view.js +14 -6
  72. package/dist/collection/components/sqm-divided-layout/sqm-divided-layout.js +58 -1
  73. package/dist/collection/components/sqm-edit-profile/sqm-edit-profile-view.js +1 -1
  74. package/dist/collection/components/sqm-form-message/FormMessage.stories.js +1 -1
  75. package/dist/collection/components/sqm-hero-image/sqm-hero-image-view.js +3 -2
  76. package/dist/collection/components/sqm-hero-image/sqm-hero-image.js +79 -0
  77. package/dist/collection/components/sqm-instant-access-registration/sqm-instant-access-registration.js +2 -2
  78. package/dist/collection/components/sqm-invoice-table/cells/sqm-invoice-table-download-cell.js +2 -2
  79. package/dist/collection/components/sqm-invoice-table/sqm-invoice-table-view.js +1 -1
  80. package/dist/collection/components/sqm-leaderboard/Leaderboard.stories.js +37 -0
  81. package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +60 -54
  82. package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.js +197 -32
  83. package/dist/collection/components/sqm-leaderboard-rank/sqm-leaderboard-rank-view.js +2 -2
  84. package/dist/collection/components/sqm-leaderboard-rank/sqm-leaderboard-rank.css +2 -2
  85. package/dist/collection/components/sqm-logout-current-user/sqm-logout-current-user.js +1 -1
  86. package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +27 -2
  87. package/dist/collection/components/sqm-name-fields/sqm-name-fields.js +1 -0
  88. package/dist/collection/components/sqm-navigation-sidebar/sqm-navigation-sidebar-view.js +16 -6
  89. package/dist/collection/components/sqm-navigation-sidebar/sqm-navigation-sidebar.js +83 -5
  90. package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item-view.js +17 -6
  91. package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item.js +233 -1
  92. package/dist/collection/components/sqm-navigation-sidebar-item/useNavigationSidebarItem.js +9 -1
  93. package/dist/collection/components/sqm-pagination/sqm-pagination-view.js +3 -3
  94. package/dist/collection/components/sqm-pagination/sqm-pagination.js +43 -0
  95. package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password-view.js +8 -4
  96. package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password.js +1 -1
  97. package/dist/collection/components/sqm-portal-footer/sqm-portal-footer-view.js +6 -6
  98. package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.js +22 -15
  99. package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password.js +95 -2
  100. package/dist/collection/components/sqm-portal-frame/sqm-portal-frame-view.js +41 -36
  101. package/dist/collection/components/sqm-portal-frame/sqm-portal-frame.js +103 -2
  102. package/dist/collection/components/sqm-portal-frame/usePortalFrame.js +4 -1
  103. package/dist/collection/components/sqm-portal-login/sqm-portal-login-view.js +1 -1
  104. package/dist/collection/components/sqm-portal-profile/sqm-portal-profile-view.js +1 -1
  105. package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +9 -3
  106. package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step.js +77 -2
  107. package/dist/collection/components/sqm-qr-code/sqm-qr-code-view.js +2 -7
  108. package/dist/collection/components/sqm-referral-card/sqm-referral-card-view.js +32 -31
  109. package/dist/collection/components/sqm-referral-card/sqm-referral-card.js +75 -0
  110. package/dist/collection/components/sqm-referral-code/ReferralCode.stories.js +3 -0
  111. package/dist/collection/components/sqm-referral-code/sqm-referral-code.js +169 -1
  112. package/dist/collection/components/sqm-referral-codes/ReferralCodes.stories.js +6 -0
  113. package/dist/collection/components/sqm-referral-codes/sqm-referral-codes-view.js +46 -46
  114. package/dist/collection/components/sqm-referral-codes/sqm-referral-codes.js +28 -1
  115. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +48 -15
  116. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-status-cell.js +60 -6
  117. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-reward-cell.js +4 -4
  118. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.js +3 -3
  119. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +71 -5
  120. package/dist/collection/components/sqm-share-button/ShareButton.stories.js +3 -1
  121. package/dist/collection/components/sqm-share-button/sqm-share-button-view.js +23 -22
  122. package/dist/collection/components/sqm-share-button/sqm-share-button.js +53 -7
  123. package/dist/collection/components/sqm-share-code/sqm-share-code.js +169 -1
  124. package/dist/collection/components/sqm-share-link/ShareLink.stories.js +12 -0
  125. package/dist/collection/components/sqm-share-link/sqm-share-link.js +171 -3
  126. package/dist/collection/components/sqm-stat-container/sqm-stat-container-view.js +20 -8
  127. package/dist/collection/components/sqm-stat-container/sqm-stat-container.js +110 -2
  128. package/dist/collection/components/sqm-stencilbook/BrandSelector.js +179 -0
  129. package/dist/collection/components/sqm-stencilbook/Themes.js +21 -17
  130. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +83 -97
  131. package/dist/collection/components/sqm-tabs/Tabs.stories.js +7 -0
  132. package/dist/collection/components/sqm-tabs/sqm-tabs-view.js +14 -2
  133. package/dist/collection/components/sqm-tabs/sqm-tabs.js +28 -2
  134. package/dist/collection/components/sqm-task-card/DetailsView.js +8 -2
  135. package/dist/collection/components/sqm-task-card/progress-bar/progress-bar-view.js +3 -2
  136. package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +138 -156
  137. package/dist/collection/components/sqm-task-card/sqm-task-card.js +146 -0
  138. package/dist/collection/components/sqm-task-card/useTaskCard.js +10 -0
  139. package/dist/collection/components/sqm-text/Text.stories.js +12 -0
  140. package/dist/collection/components/sqm-text/sqm-text.js +100 -49
  141. package/dist/collection/components/sqm-text-span/sqm-text-span-view.js +44 -43
  142. package/dist/collection/components/sqm-text-span/sqm-text-span.js +51 -2
  143. package/dist/collection/components/sqm-timeline/Timeline.stories.js +8 -1
  144. package/dist/collection/components/sqm-timeline/sqm-timeline-entry-view.js +45 -45
  145. package/dist/collection/components/sqm-timeline/sqm-timeline-entry.js +52 -0
  146. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +33 -3
  147. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-controller.js +39 -5
  148. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +41 -6
  149. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +12 -8
  150. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +20 -43
  151. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +2 -2
  152. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +1 -1
  153. package/dist/collection/components/tax-and-cash/sqm-docusign-form/docusign-iframe/DocusignIframe.js +2 -2
  154. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +15 -42
  155. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.js +3 -3
  156. package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +2 -2
  157. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js +57 -23
  158. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +1 -1
  159. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +2 -2
  160. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card-view.js +13 -13
  161. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +26 -1
  162. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/usePayoutDetailsCard.js +2 -2
  163. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +8 -5
  164. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +77 -28
  165. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +1 -1
  166. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +18 -18
  167. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +62 -3
  168. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +3 -3
  169. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +173 -20
  170. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +49 -11
  171. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +3 -3
  172. package/dist/collection/components/views/copy-text-view.js +53 -38
  173. package/dist/collection/components/views/email-registration-view.js +1 -1
  174. package/dist/collection/global/mixins.js +8 -8
  175. package/dist/collection/global/styles.js +308 -90
  176. package/dist/collection/global/styles.ts +321 -90
  177. package/dist/collection/tables/GenericTableView.js +6 -6
  178. package/dist/collection/utils/parseStates.js +12 -0
  179. package/dist/esm/{GenericTableView-7b9087af.js → GenericTableView-3b6f9ccc.js} +7 -7
  180. package/dist/esm/IndirectTaxDetailsView-3be86bcf.js +639 -0
  181. package/dist/esm/{ShadowViewAddon-e350d540.js → ShadowViewAddon-d8cfd6c7.js} +1336 -1318
  182. package/dist/esm/{copy-text-view-782137ba.js → copy-text-view-4a207b17.js} +54 -39
  183. package/dist/esm/data-a05c78ae.js +121 -0
  184. package/dist/esm/{email-registration-view-a7818cf2.js → email-registration-view-8782c01b.js} +2 -2
  185. package/dist/esm/{global-1d207c9e.js → global-632fb2fa.js} +308 -90
  186. package/dist/esm/loader.js +2 -2
  187. package/dist/esm/mint-components.js +2 -2
  188. package/dist/esm/{mixins-83f90fa1.js → mixins-f750863a.js} +6 -6
  189. package/dist/esm/parseStates-ed75e224.js +14 -0
  190. package/dist/esm/{sqm-banking-info-form_17.entry.js → sqm-banking-info-form_10.entry.js} +571 -2105
  191. package/dist/esm/{sqm-base-registration-form-view-593d4ac3.js → sqm-base-registration-form-view-d732a5df.js} +2 -2
  192. package/dist/esm/{sqm-big-stat_41.entry.js → sqm-big-stat_42.entry.js} +574 -120
  193. package/dist/esm/{sqm-close-button-view-f9819751.js → sqm-close-button-view-bc2bc10e.js} +1 -1
  194. package/dist/esm/sqm-close-button.entry.js +2 -2
  195. package/dist/esm/sqm-code-verification.entry.js +344 -0
  196. package/dist/esm/sqm-email-verification.entry.js +2 -2
  197. package/dist/esm/sqm-empty_4.entry.js +49 -49
  198. package/dist/esm/sqm-instant-access-registration.entry.js +3 -3
  199. package/dist/esm/sqm-invoice-table-data-cell_5.entry.js +76 -0
  200. package/dist/esm/{sqm-leaderboard-rank-view-753c8d4a.js → sqm-leaderboard-rank-view-84b3c539.js} +1 -1
  201. package/dist/esm/sqm-leaderboard-rank.entry.js +3 -3
  202. package/dist/esm/{sqm-navigation-sidebar-item-view-8f1c72bc.js → sqm-navigation-sidebar-item-view-6e046743.js} +18 -7
  203. package/dist/esm/sqm-navigation-sidebar-item.entry.js +26 -3
  204. package/dist/esm/{sqm-navigation-sidebar-view-9d802b78.js → sqm-navigation-sidebar-view-f898265a.js} +16 -6
  205. package/dist/esm/sqm-navigation-sidebar.entry.js +20 -4
  206. package/dist/esm/sqm-pagination_3.entry.js +86 -59
  207. package/dist/esm/sqm-password-field.entry.js +1 -1
  208. package/dist/esm/{sqm-portal-email-verification-view-6c8bad0b.js → sqm-portal-email-verification-view-24ea7b3c.js} +3 -3
  209. package/dist/esm/sqm-portal-email-verification.entry.js +4 -4
  210. package/dist/esm/{sqm-portal-forgot-password-view-3d3182f1.js → sqm-portal-forgot-password-view-55fc0873.js} +24 -17
  211. package/dist/esm/sqm-portal-forgot-password.entry.js +25 -4
  212. package/dist/esm/sqm-portal-google-login.entry.js +3 -3
  213. package/dist/esm/sqm-portal-google-registration-form.entry.js +4 -4
  214. package/dist/esm/{sqm-portal-login-view-7e49609a.js → sqm-portal-login-view-e870b4b0.js} +3 -3
  215. package/dist/esm/{sqm-portal-profile-view-cbdeec1f.js → sqm-portal-profile-view-9b4d7ec1.js} +3 -3
  216. package/dist/esm/sqm-portal-profile.entry.js +3 -3
  217. package/dist/esm/{sqm-portal-registration-form-view-3c1f6000.js → sqm-portal-registration-form-view-5d651c04.js} +2 -2
  218. package/dist/esm/sqm-portal-registration-form.entry.js +3 -3
  219. package/dist/esm/{sqm-portal-reset-password-view-54a8651f.js → sqm-portal-reset-password-view-6903828e.js} +2 -2
  220. package/dist/esm/sqm-portal-reset-password.entry.js +3 -3
  221. package/dist/esm/{sqm-portal-verify-email-view-b12cb894.js → sqm-portal-verify-email-view-01ac711f.js} +2 -2
  222. package/dist/esm/sqm-portal-verify-email.entry.js +3 -3
  223. package/dist/esm/{sqm-qr-code-view-f1d0763b.js → sqm-qr-code-view-62c10948.js} +2 -7
  224. package/dist/esm/sqm-qr-code.entry.js +1 -1
  225. package/dist/esm/sqm-referral-table_11.entry.js +111 -24
  226. package/dist/esm/sqm-referred-registration.entry.js +2 -2
  227. package/dist/esm/sqm-rewards-table-customer-note-cell.entry.js +1 -1
  228. package/dist/esm/sqm-rewards-table_9.entry.js +81 -15
  229. package/dist/esm/sqm-stencilbook.entry.js +13715 -12393
  230. package/dist/esm/sqm-tabs.entry.js +16 -4
  231. package/dist/esm/sqm-tax-and-cash.entry.js +1217 -0
  232. package/dist/esm/sqm-text-span-view-cd3902e5.js +61 -0
  233. package/dist/esm/sqm-text-span.entry.js +4 -4
  234. package/dist/esm/sqm-widget-verification-controller.entry.js +12 -4
  235. package/dist/esm/sqm-widget-verification.entry.js +17 -6
  236. package/dist/esm/{usePayoutStatus-58aa56b4.js → usePayoutStatus-fed17fc9.js} +8 -5
  237. package/dist/esm/utils-1654e233.js +97 -0
  238. package/dist/esm-es5/GenericTableView-3b6f9ccc.js +1 -0
  239. package/dist/esm-es5/IndirectTaxDetailsView-3be86bcf.js +1 -0
  240. package/dist/esm-es5/ShadowViewAddon-d8cfd6c7.js +1 -0
  241. package/dist/esm-es5/copy-text-view-4a207b17.js +1 -0
  242. package/dist/esm-es5/data-a05c78ae.js +1 -0
  243. package/dist/esm-es5/email-registration-view-8782c01b.js +1 -0
  244. package/dist/esm-es5/{global-1d207c9e.js → global-632fb2fa.js} +5 -5
  245. package/dist/esm-es5/loader.js +1 -1
  246. package/dist/esm-es5/mint-components.js +1 -1
  247. package/dist/esm-es5/mixins-f750863a.js +1 -0
  248. package/dist/esm-es5/parseStates-ed75e224.js +1 -0
  249. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -0
  250. package/dist/esm-es5/{sqm-base-registration-form-view-593d4ac3.js → sqm-base-registration-form-view-d732a5df.js} +1 -1
  251. package/dist/esm-es5/sqm-big-stat_42.entry.js +1 -0
  252. package/dist/esm-es5/{sqm-close-button-view-f9819751.js → sqm-close-button-view-bc2bc10e.js} +1 -1
  253. package/dist/esm-es5/sqm-close-button.entry.js +1 -1
  254. package/dist/esm-es5/sqm-code-verification.entry.js +1 -0
  255. package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
  256. package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
  257. package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
  258. package/dist/esm-es5/sqm-invoice-table-data-cell_5.entry.js +1 -0
  259. package/dist/esm-es5/sqm-leaderboard-rank-view-84b3c539.js +1 -0
  260. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  261. package/dist/esm-es5/sqm-navigation-sidebar-item-view-6e046743.js +1 -0
  262. package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
  263. package/dist/esm-es5/sqm-navigation-sidebar-view-f898265a.js +1 -0
  264. package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
  265. package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
  266. package/dist/esm-es5/sqm-password-field.entry.js +1 -1
  267. package/dist/esm-es5/{sqm-portal-email-verification-view-6c8bad0b.js → sqm-portal-email-verification-view-24ea7b3c.js} +1 -1
  268. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  269. package/dist/esm-es5/sqm-portal-forgot-password-view-55fc0873.js +1 -0
  270. package/dist/esm-es5/sqm-portal-forgot-password.entry.js +1 -1
  271. package/dist/esm-es5/sqm-portal-google-login.entry.js +1 -1
  272. package/dist/esm-es5/sqm-portal-google-registration-form.entry.js +1 -1
  273. package/dist/esm-es5/sqm-portal-login-view-e870b4b0.js +1 -0
  274. package/dist/esm-es5/{sqm-portal-profile-view-cbdeec1f.js → sqm-portal-profile-view-9b4d7ec1.js} +1 -1
  275. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  276. package/dist/esm-es5/{sqm-portal-registration-form-view-3c1f6000.js → sqm-portal-registration-form-view-5d651c04.js} +1 -1
  277. package/dist/esm-es5/sqm-portal-registration-form.entry.js +1 -1
  278. package/dist/esm-es5/{sqm-portal-reset-password-view-54a8651f.js → sqm-portal-reset-password-view-6903828e.js} +1 -1
  279. package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
  280. package/dist/esm-es5/{sqm-portal-verify-email-view-b12cb894.js → sqm-portal-verify-email-view-01ac711f.js} +1 -1
  281. package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
  282. package/dist/esm-es5/{sqm-qr-code-view-f1d0763b.js → sqm-qr-code-view-62c10948.js} +1 -1
  283. package/dist/esm-es5/sqm-qr-code.entry.js +1 -1
  284. package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
  285. package/dist/esm-es5/sqm-referred-registration.entry.js +1 -1
  286. package/dist/esm-es5/sqm-rewards-table-customer-note-cell.entry.js +1 -1
  287. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
  288. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  289. package/dist/esm-es5/sqm-tabs.entry.js +1 -1
  290. package/dist/esm-es5/sqm-tax-and-cash.entry.js +1 -0
  291. package/dist/esm-es5/sqm-text-span-view-cd3902e5.js +1 -0
  292. package/dist/esm-es5/sqm-text-span.entry.js +1 -1
  293. package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
  294. package/dist/esm-es5/sqm-widget-verification.entry.js +1 -1
  295. package/dist/esm-es5/{usePayoutStatus-58aa56b4.js → usePayoutStatus-fed17fc9.js} +2 -2
  296. package/dist/esm-es5/utils-1654e233.js +1 -0
  297. package/dist/mint-components/global/styles.ts +321 -90
  298. package/dist/mint-components/mint-components.esm.js +1 -1
  299. package/dist/mint-components/mint-components.js +1 -1
  300. package/dist/mint-components/p-042642d3.entry.js +1 -0
  301. package/dist/mint-components/{p-91ab3da1.js → p-057f5402.js} +1 -1
  302. package/dist/mint-components/p-06ce54e2.entry.js +258 -0
  303. package/dist/mint-components/p-0984523b.js +1 -0
  304. package/dist/mint-components/p-0a37a288.system.entry.js +1 -0
  305. package/dist/mint-components/p-0a8a6d45.system.entry.js +1 -0
  306. package/dist/mint-components/{p-d07f3090.entry.js → p-0b3218a5.entry.js} +1 -1
  307. package/dist/mint-components/{p-e5d0375e.system.js → p-0df294ad.system.js} +1 -1
  308. package/dist/mint-components/p-0e32981f.js +1 -0
  309. package/dist/mint-components/p-115dfc03.system.js +1 -0
  310. package/dist/mint-components/{p-480e08e9.js → p-11dff275.js} +2 -2
  311. package/dist/mint-components/{p-1673fae9.system.entry.js → p-12e61414.system.entry.js} +1 -1
  312. package/dist/mint-components/p-13f3a647.js +1 -0
  313. package/dist/mint-components/p-155cf177.system.js +1 -0
  314. package/dist/mint-components/{p-15d77d0b.entry.js → p-1878da9b.entry.js} +2 -2
  315. package/dist/mint-components/{p-99ad7d56.system.js → p-223dd3f7.system.js} +1 -1
  316. package/dist/mint-components/p-2cfe9826.system.entry.js +1 -0
  317. package/dist/mint-components/p-2df6ce8f.entry.js +144 -0
  318. package/dist/mint-components/p-32a47b41.system.js +1 -0
  319. package/dist/mint-components/{p-9d3d4098.system.js → p-33f640f6.system.js} +1 -1
  320. package/dist/mint-components/p-3a21f8f9.system.entry.js +1 -0
  321. package/dist/mint-components/p-3c3aab4c.system.js +1 -0
  322. package/dist/mint-components/{p-19bc3406.system.entry.js → p-3e4e74a2.system.entry.js} +1 -1
  323. package/dist/mint-components/{p-164a9103.system.entry.js → p-41d051b1.system.entry.js} +1 -1
  324. package/dist/mint-components/{p-709e1799.system.entry.js → p-450a7705.system.entry.js} +1 -1
  325. package/dist/mint-components/{p-90fc6774.system.entry.js → p-457962b7.system.entry.js} +1 -1
  326. package/dist/mint-components/p-46a672e4.entry.js +1 -0
  327. package/dist/mint-components/p-4841c5e9.system.entry.js +1 -0
  328. package/dist/mint-components/p-49b20dae.js +1 -0
  329. package/dist/mint-components/{p-380bfde1.entry.js → p-4b42b756.entry.js} +1 -1
  330. package/dist/mint-components/{p-2dca9e1a.system.js → p-4b9789a2.system.js} +1 -1
  331. package/dist/mint-components/p-4bb1c4b2.system.js +1 -0
  332. package/dist/mint-components/p-4cbd7eec.js +394 -0
  333. package/dist/mint-components/{p-f0772618.system.entry.js → p-4d478108.system.entry.js} +1 -1
  334. package/dist/mint-components/{p-b75bb6e3.system.js → p-505951d2.system.js} +1 -1
  335. package/dist/mint-components/{p-6df88590.system.entry.js → p-51aa8c38.system.entry.js} +1 -1
  336. package/dist/mint-components/p-52d15f87.system.js +1 -0
  337. package/dist/mint-components/p-54b0b768.system.js +1 -0
  338. package/dist/mint-components/p-5510be1e.system.entry.js +1 -0
  339. package/dist/mint-components/p-5c5964e0.js +1 -0
  340. package/dist/mint-components/p-5d407714.system.entry.js +1 -0
  341. package/dist/mint-components/{p-a2fde301.entry.js → p-5ef6de10.entry.js} +1 -1
  342. package/dist/mint-components/p-66a2b1a4.js +1 -0
  343. package/dist/mint-components/p-66d22d46.entry.js +13 -0
  344. package/dist/mint-components/p-674b82ac.js +1 -0
  345. package/dist/mint-components/p-6798cad1.system.js +1 -0
  346. package/dist/mint-components/{p-0c78815e.system.entry.js → p-6a49b077.system.entry.js} +1 -1
  347. package/dist/mint-components/{p-53730ffe.entry.js → p-6a5f57d7.entry.js} +1 -1
  348. package/dist/mint-components/p-6ef506ba.entry.js +16 -0
  349. package/dist/mint-components/{p-9cb06082.system.entry.js → p-6fa624ff.system.entry.js} +1 -1
  350. package/dist/mint-components/p-704f162e.entry.js +1 -0
  351. package/dist/mint-components/p-70fddbdd.entry.js +11 -0
  352. package/dist/mint-components/p-731d06a9.entry.js +1 -0
  353. package/dist/mint-components/p-74afdafb.system.js +1 -0
  354. package/dist/mint-components/p-767485b8.system.js +1 -0
  355. package/dist/mint-components/p-780b981b.entry.js +1 -0
  356. package/dist/mint-components/{p-fbac722b.js → p-7adb141e.js} +1 -1
  357. package/dist/mint-components/p-7b731acd.entry.js +93 -0
  358. package/dist/mint-components/{p-7a9290ba.js → p-82113e37.js} +1 -1
  359. package/dist/mint-components/{p-42187319.system.entry.js → p-846aff6a.system.entry.js} +1 -1
  360. package/dist/mint-components/p-84a78d09.entry.js +1 -0
  361. package/dist/mint-components/{p-0d2d0b6d.entry.js → p-865f812e.entry.js} +1 -1
  362. package/dist/mint-components/p-8a6494c7.system.js +1 -0
  363. package/dist/mint-components/p-8feb4180.entry.js +1 -0
  364. package/dist/mint-components/{p-475245d1.system.js → p-96e339f6.system.js} +15 -15
  365. package/dist/mint-components/p-9711efb7.entry.js +1 -0
  366. package/dist/mint-components/{p-cc7af682.system.js → p-9721a29a.system.js} +2 -2
  367. package/dist/mint-components/p-9acf0b39.system.entry.js +1 -0
  368. package/dist/mint-components/p-9d41d676.system.entry.js +1 -0
  369. package/dist/mint-components/p-9f2edf59.system.js +1 -0
  370. package/dist/mint-components/p-a1e17fd2.js +1 -0
  371. package/dist/mint-components/p-a27a15c5.system.entry.js +1 -0
  372. package/dist/mint-components/{p-d929b9d5.system.js → p-a3383f54.system.js} +1 -1
  373. package/dist/mint-components/{p-4428294b.entry.js → p-a3e68251.entry.js} +1 -1
  374. package/dist/mint-components/p-a572db9b.system.entry.js +1 -0
  375. package/dist/mint-components/{p-7f80a9d7.entry.js → p-a60d5315.entry.js} +1 -1
  376. package/dist/mint-components/p-a91e7c05.system.entry.js +1 -0
  377. package/dist/mint-components/{p-f4a8ee29.system.entry.js → p-af516659.system.entry.js} +1 -1
  378. package/dist/mint-components/p-b637f1e4.js +1 -0
  379. package/dist/mint-components/{p-2f101bae.entry.js → p-b6761073.entry.js} +1 -1
  380. package/dist/mint-components/{p-f1e72435.entry.js → p-b73a4df4.entry.js} +2 -2
  381. package/dist/mint-components/{p-9bfd9bed.system.entry.js → p-bb6e411d.system.entry.js} +1 -1
  382. package/dist/mint-components/p-bdd80fce.js +1 -0
  383. package/dist/mint-components/p-be89074c.entry.js +1 -0
  384. package/dist/mint-components/p-c0b07067.system.js +1 -0
  385. package/dist/mint-components/p-c1b1f8ae.system.entry.js +1 -0
  386. package/dist/mint-components/p-c75a3b4a.js +103 -0
  387. package/dist/mint-components/{p-91959fbe.js → p-c96a25c6.js} +1 -1
  388. package/dist/mint-components/p-c9745c8f.system.js +1 -0
  389. package/dist/mint-components/p-ca9e0322.system.js +1 -0
  390. package/dist/mint-components/{p-1a6b7d2a.entry.js → p-cd0ee247.entry.js} +1 -1
  391. package/dist/mint-components/p-cf157c6e.system.entry.js +1 -0
  392. package/dist/mint-components/{p-9386ad84.system.entry.js → p-d12e9cfd.system.entry.js} +1 -1
  393. package/dist/mint-components/{p-35b475bf.js → p-d1ae7a2d.js} +1 -1
  394. package/dist/mint-components/{p-5c28406d.system.entry.js → p-d5b3397c.system.entry.js} +1 -1
  395. package/dist/mint-components/p-d6352d15.js +1 -0
  396. package/dist/mint-components/p-d94a4d50.system.entry.js +1 -0
  397. package/dist/mint-components/p-da71337b.entry.js +1 -0
  398. package/dist/mint-components/{p-9b894557.entry.js → p-dbb83730.entry.js} +1 -1
  399. package/dist/mint-components/{p-6d4a313f.js → p-dc293b10.js} +81 -81
  400. package/dist/mint-components/p-de136dd3.js +1 -0
  401. package/dist/mint-components/{p-00ed4c2e.entry.js → p-df223bff.entry.js} +1 -1
  402. package/dist/mint-components/p-e1e62d55.entry.js +1 -0
  403. package/dist/mint-components/{p-f2d8d3d3.system.entry.js → p-e217afd9.system.entry.js} +1 -1
  404. package/dist/mint-components/{p-4794641c.system.js → p-e2705fbe.system.js} +1 -1
  405. package/dist/mint-components/p-e309a219.js +1 -0
  406. package/dist/mint-components/{p-f940190a.js → p-e518a60d.js} +1 -1
  407. package/dist/mint-components/p-e5d9e709.entry.js +13 -0
  408. package/dist/mint-components/p-eb998f7b.entry.js +9 -0
  409. package/dist/mint-components/p-f53f5304.system.entry.js +1 -0
  410. package/dist/mint-components/p-f8175201.system.js +1 -0
  411. package/dist/mint-components/p-fb13065a.js +1 -0
  412. package/dist/mint-components/p-fb584d7a.js +1 -0
  413. package/dist/mint-components/p-fbef4ecb.system.js +1 -0
  414. package/dist/mint-components/p-fda43e22.system.entry.js +1 -0
  415. package/dist/types/components/sqm-big-stat/BigStat.stories.d.ts +2 -0
  416. package/dist/types/components/sqm-big-stat/sqm-big-stat-view.d.ts +5 -0
  417. package/dist/types/components/sqm-big-stat/sqm-big-stat.d.ts +41 -0
  418. package/dist/types/components/sqm-coupon-code/CouponCode.stories.d.ts +2 -0
  419. package/dist/types/components/sqm-coupon-code/sqm-coupon-code-view.d.ts +2 -0
  420. package/dist/types/components/sqm-coupon-code/sqm-coupon-code.d.ts +42 -0
  421. package/dist/types/components/sqm-coupon-code/useCouponCode.d.ts +1 -0
  422. package/dist/types/components/sqm-divided-layout/sqm-divided-layout-view.d.ts +4 -1
  423. package/dist/types/components/sqm-divided-layout/sqm-divided-layout.d.ts +13 -0
  424. package/dist/types/components/sqm-hero-image/sqm-hero-image-view.d.ts +1 -0
  425. package/dist/types/components/sqm-hero-image/sqm-hero-image.d.ts +19 -0
  426. package/dist/types/components/sqm-leaderboard/Leaderboard.stories.d.ts +1 -0
  427. package/dist/types/components/sqm-leaderboard/sqm-leaderboard-view.d.ts +6 -0
  428. package/dist/types/components/sqm-leaderboard/sqm-leaderboard.d.ts +48 -7
  429. package/dist/types/components/sqm-leaderboard/useLeaderboard.d.ts +6 -0
  430. package/dist/types/components/sqm-navigation-sidebar/sqm-navigation-sidebar-view.d.ts +1 -0
  431. package/dist/types/components/sqm-navigation-sidebar/sqm-navigation-sidebar.d.ts +14 -0
  432. package/dist/types/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item-view.d.ts +8 -0
  433. package/dist/types/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item.d.ts +57 -0
  434. package/dist/types/components/sqm-pagination/sqm-pagination-view.d.ts +1 -0
  435. package/dist/types/components/sqm-pagination/sqm-pagination.d.ts +9 -0
  436. package/dist/types/components/sqm-portal-change-password/sqm-portal-change-password-view.d.ts +2 -0
  437. package/dist/types/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.d.ts +7 -0
  438. package/dist/types/components/sqm-portal-forgot-password/sqm-portal-forgot-password.d.ts +15 -0
  439. package/dist/types/components/sqm-portal-frame/sqm-portal-frame-view.d.ts +3 -0
  440. package/dist/types/components/sqm-portal-frame/sqm-portal-frame.d.ts +19 -0
  441. package/dist/types/components/sqm-portal-frame/usePortalFrame.d.ts +2 -1
  442. package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step-view.d.ts +3 -0
  443. package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step.d.ts +20 -2
  444. package/dist/types/components/sqm-referral-card/sqm-referral-card-view.d.ts +5 -2
  445. package/dist/types/components/sqm-referral-card/sqm-referral-card.d.ts +20 -0
  446. package/dist/types/components/sqm-referral-code/ReferralCode.stories.d.ts +1 -0
  447. package/dist/types/components/sqm-referral-code/sqm-referral-code.d.ts +42 -0
  448. package/dist/types/components/sqm-referral-codes/ReferralCodes.stories.d.ts +1 -0
  449. package/dist/types/components/sqm-referral-codes/sqm-referral-codes-view.d.ts +1 -0
  450. package/dist/types/components/sqm-referral-codes/sqm-referral-codes.d.ts +6 -0
  451. package/dist/types/components/sqm-share-button/ShareButton.stories.d.ts +1 -1
  452. package/dist/types/components/sqm-share-button/sqm-share-button-view.d.ts +2 -1
  453. package/dist/types/components/sqm-share-button/sqm-share-button.d.ts +15 -3
  454. package/dist/types/components/sqm-share-code/sqm-share-code.d.ts +42 -0
  455. package/dist/types/components/sqm-share-link/ShareLink.stories.d.ts +1 -0
  456. package/dist/types/components/sqm-share-link/sqm-share-link.d.ts +43 -1
  457. package/dist/types/components/sqm-stat-container/sqm-stat-container-view.d.ts +3 -0
  458. package/dist/types/components/sqm-stat-container/sqm-stat-container.d.ts +23 -0
  459. package/dist/types/components/sqm-stencilbook/BrandSelector.d.ts +6 -0
  460. package/dist/types/components/sqm-stencilbook/Themes.d.ts +4 -5
  461. package/dist/types/components/sqm-tabs/Tabs.stories.d.ts +1 -0
  462. package/dist/types/components/sqm-tabs/sqm-tabs-view.d.ts +1 -0
  463. package/dist/types/components/sqm-tabs/sqm-tabs.d.ts +8 -0
  464. package/dist/types/components/sqm-task-card/DetailsView.d.ts +6 -0
  465. package/dist/types/components/sqm-task-card/sqm-task-card-view.d.ts +5 -0
  466. package/dist/types/components/sqm-task-card/sqm-task-card.d.ts +32 -0
  467. package/dist/types/components/sqm-task-card/useTaskCard.d.ts +9 -0
  468. package/dist/types/components/sqm-text/Text.stories.d.ts +6 -0
  469. package/dist/types/components/sqm-text/sqm-text.d.ts +12 -0
  470. package/dist/types/components/sqm-text-span/sqm-text-span-view.d.ts +4 -2
  471. package/dist/types/components/sqm-text-span/sqm-text-span.d.ts +13 -1
  472. package/dist/types/components/sqm-timeline/Timeline.stories.d.ts +1 -0
  473. package/dist/types/components/sqm-timeline/sqm-timeline-entry-view.d.ts +2 -0
  474. package/dist/types/components/sqm-timeline/sqm-timeline-entry.d.ts +14 -0
  475. package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.d.ts +5 -0
  476. package/dist/types/components/sqm-widget-verification/sqm-widget-verification-controller.d.ts +5 -0
  477. package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +5 -0
  478. package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +0 -1
  479. package/dist/types/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.d.ts +1 -1
  480. package/dist/types/components/tax-and-cash/sqm-docusign-form/useDocusignForm.d.ts +2 -2
  481. package/dist/types/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.d.ts +4 -0
  482. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +1 -1
  483. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +10 -4
  484. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.d.ts +1 -1
  485. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +1 -1
  486. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +10 -0
  487. package/dist/types/components/tax-and-cash/sqm-user-info-form/small-views/IndirectTaxDetailsView.d.ts +1 -1
  488. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.d.ts +7 -0
  489. package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +1 -1
  490. package/dist/types/components/tax-and-cash/utils.d.ts +1 -1
  491. package/dist/types/components/views/copy-text-view.d.ts +5 -0
  492. package/dist/types/components.d.ts +1232 -35
  493. package/dist/types/global/mixins.d.ts +12 -12
  494. package/dist/types/global/styles.d.ts +6 -1
  495. package/dist/types/saasquatch.d.ts +61 -0
  496. package/dist/types/utils/parseStates.d.ts +1 -0
  497. package/docs/docs.docx +0 -0
  498. package/docs/raisins.json +1 -1
  499. package/grapesjs/grapesjs.js +1 -1
  500. package/package.json +2 -1
  501. package/dist/cjs/sqm-invoice-table-view-dbf7a907.js +0 -2038
  502. package/dist/cjs/sqm-text-span-view-0aa82125.js +0 -62
  503. package/dist/esm/sqm-invoice-table-view-e0c9772a.js +0 -2022
  504. package/dist/esm/sqm-text-span-view-ca32495e.js +0 -60
  505. package/dist/esm-es5/GenericTableView-7b9087af.js +0 -1
  506. package/dist/esm-es5/ShadowViewAddon-e350d540.js +0 -1
  507. package/dist/esm-es5/copy-text-view-782137ba.js +0 -1
  508. package/dist/esm-es5/email-registration-view-a7818cf2.js +0 -1
  509. package/dist/esm-es5/mixins-83f90fa1.js +0 -1
  510. package/dist/esm-es5/sqm-banking-info-form_17.entry.js +0 -1
  511. package/dist/esm-es5/sqm-big-stat_41.entry.js +0 -1
  512. package/dist/esm-es5/sqm-invoice-table-view-e0c9772a.js +0 -1
  513. package/dist/esm-es5/sqm-leaderboard-rank-view-753c8d4a.js +0 -1
  514. package/dist/esm-es5/sqm-navigation-sidebar-item-view-8f1c72bc.js +0 -1
  515. package/dist/esm-es5/sqm-navigation-sidebar-view-9d802b78.js +0 -1
  516. package/dist/esm-es5/sqm-portal-forgot-password-view-3d3182f1.js +0 -1
  517. package/dist/esm-es5/sqm-portal-login-view-7e49609a.js +0 -1
  518. package/dist/esm-es5/sqm-text-span-view-ca32495e.js +0 -1
  519. package/dist/mint-components/p-091e7ca2.system.entry.js +0 -1
  520. package/dist/mint-components/p-0ebab63e.system.js +0 -1
  521. package/dist/mint-components/p-141bf5c1.system.entry.js +0 -1
  522. package/dist/mint-components/p-14a65f29.system.js +0 -1
  523. package/dist/mint-components/p-23379b5b.entry.js +0 -144
  524. package/dist/mint-components/p-24db5c70.js +0 -1
  525. package/dist/mint-components/p-2bcd406c.system.js +0 -1
  526. package/dist/mint-components/p-2da21ba4.entry.js +0 -1
  527. package/dist/mint-components/p-31015791.js +0 -1
  528. package/dist/mint-components/p-33c96e14.entry.js +0 -16
  529. package/dist/mint-components/p-342bc70c.system.entry.js +0 -1
  530. package/dist/mint-components/p-38e5c429.system.js +0 -1
  531. package/dist/mint-components/p-3a31cc83.entry.js +0 -13
  532. package/dist/mint-components/p-3b90e01b.system.js +0 -1
  533. package/dist/mint-components/p-3ba1ab43.system.js +0 -1
  534. package/dist/mint-components/p-3db34d68.js +0 -1
  535. package/dist/mint-components/p-3f6e0197.system.entry.js +0 -1
  536. package/dist/mint-components/p-420554af.system.entry.js +0 -1
  537. package/dist/mint-components/p-441b60ac.system.entry.js +0 -1
  538. package/dist/mint-components/p-492b70db.system.js +0 -1
  539. package/dist/mint-components/p-4e5af50c.js +0 -1
  540. package/dist/mint-components/p-5bdafc7e.system.entry.js +0 -1
  541. package/dist/mint-components/p-6055eb4c.system.js +0 -1
  542. package/dist/mint-components/p-626e9e84.js +0 -1
  543. package/dist/mint-components/p-635d5ef2.system.js +0 -1
  544. package/dist/mint-components/p-6427e963.entry.js +0 -1
  545. package/dist/mint-components/p-6a97b51d.entry.js +0 -13
  546. package/dist/mint-components/p-716d0275.entry.js +0 -1
  547. package/dist/mint-components/p-775f3ded.entry.js +0 -1
  548. package/dist/mint-components/p-7ab21e4d.entry.js +0 -1
  549. package/dist/mint-components/p-837a0fdd.js +0 -1
  550. package/dist/mint-components/p-85671c3d.system.entry.js +0 -1
  551. package/dist/mint-components/p-904ebcf6.system.entry.js +0 -1
  552. package/dist/mint-components/p-91521e9d.js +0 -1
  553. package/dist/mint-components/p-92816d1f.js +0 -1
  554. package/dist/mint-components/p-9cf80e85.system.entry.js +0 -1
  555. package/dist/mint-components/p-9db71c84.entry.js +0 -1
  556. package/dist/mint-components/p-aad32fb6.system.js +0 -1
  557. package/dist/mint-components/p-b207beeb.entry.js +0 -1
  558. package/dist/mint-components/p-b2bf509e.entry.js +0 -9
  559. package/dist/mint-components/p-b33b7eb5.system.js +0 -1
  560. package/dist/mint-components/p-babcdb1f.system.entry.js +0 -1
  561. package/dist/mint-components/p-c060f770.system.entry.js +0 -1
  562. package/dist/mint-components/p-c36506f6.system.entry.js +0 -1
  563. package/dist/mint-components/p-c3bfb9c3.entry.js +0 -258
  564. package/dist/mint-components/p-c8147def.js +0 -1
  565. package/dist/mint-components/p-c9f1dde7.js +0 -1
  566. package/dist/mint-components/p-cd1d497f.system.js +0 -1
  567. package/dist/mint-components/p-dbcb5359.js +0 -1
  568. package/dist/mint-components/p-dcc81e90.entry.js +0 -1
  569. package/dist/mint-components/p-e07bc6c4.system.js +0 -1
  570. package/dist/mint-components/p-e41aac34.js +0 -1
  571. package/dist/mint-components/p-e6f50ffd.entry.js +0 -1
  572. package/dist/mint-components/p-f3e2098c.js +0 -394
  573. package/dist/mint-components/p-f56bedd5.js +0 -1
  574. package/dist/mint-components/p-f71ae358.system.entry.js +0 -1
  575. package/dist/mint-components/p-f7c99803.system.js +0 -1
  576. package/dist/mint-components/p-f87ae19e.entry.js +0 -205
  577. /package/dist/collection/components/tax-and-cash/{sqm-tax-and-cash/data.js → data.js} +0 -0
  578. /package/dist/types/components/tax-and-cash/{sqm-tax-and-cash/data.d.ts → data.d.ts} +0 -0
@@ -1,20 +1,62 @@
1
1
  import { h, c as Host, d as getAssetPath, g as getElement } from './index-91e7729f.js';
2
- import { k as useState, b as browser, u as useMemo } from './stencil-hooks.module-4bc38af4.js';
3
- import { i as intl } from './global-1d207c9e.js';
4
- import { d as dist, H, J, F as Fn, w as wn, $ as $e, B, g as getEnvironmentSDK, L } from './index.module-89a79f66.js';
2
+ import { b as browser, u as useMemo, k as useState } from './stencil-hooks.module-4bc38af4.js';
3
+ import { i as intl } from './global-632fb2fa.js';
4
+ import { H, L, J, d as dist, w as wn, F as Fn, $ as $e, B, g as getEnvironmentSDK } from './index.module-89a79f66.js';
5
5
  import { c as cjs } from './cjs-bdfb4486.js';
6
6
  import { l as luxonLocale } from './utils-334c1e34.js';
7
7
  import { c as createStyleSheet, j as jss, a as create } from './JSS-67b5cff8.js';
8
8
  import { a as REFERRAL_CODES_NAMESPACE, S as SET_CODE_COPIED } from './useReferralCodes-8f75921a.js';
9
- import { H as HostBlock, A as AuthWrapper, a as AuthColumn, b as AuthButtonsContainer, E as ErrorStyles } from './mixins-83f90fa1.js';
10
- import { C as CopyTextView } from './copy-text-view-782137ba.js';
9
+ import { H as HostBlock, A as AuthWrapper, a as AuthColumn, b as AuthButtonsContainer, E as ErrorStyles } from './mixins-f750863a.js';
10
+ import { C as CopyTextView } from './copy-text-view-4a207b17.js';
11
11
  import { u as useChildElements } from './useChildElements-7945ae56.js';
12
12
  import { l as luxon } from './luxon-8d51c92b.js';
13
- import { T as TextSpanView } from './sqm-text-span-view-ca32495e.js';
13
+ import { T as TextSpanView } from './sqm-text-span-view-cd3902e5.js';
14
14
  import { p as pathToRegexp } from './index-ffa26b43.js';
15
15
  import { a as isValidColor, b as isMobile } from './utilities-5b0ca040.js';
16
16
  import { a as PortalSectionView, P as PortalContainerView } from './sqm-portal-container-view-1683ae32.js';
17
17
 
18
+ function BigStatView(props) {
19
+ const { statvalue, flexReverse, alignment, statTextColor, statFontSize, descriptionTextColor, descriptionFontSize, statFontWeight, } = props;
20
+ // Dependent on props, not feasible to move out
21
+ const style = {
22
+ Container: {
23
+ display: "flex",
24
+ // height: "inherit",
25
+ // "justify-content": "space-between",
26
+ "flex-direction": `${flexReverse ? "column-reverse" : "column"}`,
27
+ "align-items": `${alignment === "left"
28
+ ? "flex-start"
29
+ : alignment === "right"
30
+ ? "flex-end"
31
+ : "center"}`,
32
+ },
33
+ Stat: {
34
+ "font-size": statFontSize
35
+ ? `${statFontSize}px`
36
+ : "var(--sl-font-size-xx-large)",
37
+ "text-align": alignment,
38
+ color: statTextColor || "var(--sqm-text)",
39
+ lineHeight: "35px",
40
+ fontWeight: statFontWeight || "var(--sl-font-weight-normal)",
41
+ },
42
+ Description: {
43
+ "font-size": descriptionFontSize
44
+ ? `${descriptionFontSize}px`
45
+ : "var(--sl-font-size-small)",
46
+ "font-weight": "var(--sl-font-weight-normal)",
47
+ color: descriptionTextColor || "var(--sqm-text)",
48
+ "text-align": alignment,
49
+ lineHeight: "20px",
50
+ },
51
+ };
52
+ const sheet = createStyleSheet(style);
53
+ const styleString = sheet.toString();
54
+ return (h("div", { part: "stat-wrapper", class: sheet.classes.Container },
55
+ h("style", { type: "text/css" }, styleString),
56
+ h("div", { part: "stat-value", class: sheet.classes.Stat }, statvalue),
57
+ h("div", { part: "stat-description", class: sheet.classes.Description }, props.labelSlot)));
58
+ }
59
+
18
60
  const medium = {
19
61
  facebook: { color: "#1877f2", text: "#fff", icon: "facebook" },
20
62
  twitter: { color: "#000000", text: "#fff", icon: "twitter-x" },
@@ -38,15 +80,30 @@ const style = {
38
80
  };
39
81
  const sheet = createStyleSheet(style);
40
82
  const styleString = sheet.toString();
83
+ // TODO: Figure out hover and active states
84
+ // *::part(base):hover {
85
+ // border-color: ${
86
+ // props.backgroundcolor
87
+ // ? props.backgroundcolor
88
+ // : props.medium
89
+ // ? medium[props.medium].color
90
+ // : ""
91
+ // }!important;
92
+ // }
93
+ // *::part(base):focus {
94
+ // border-color: ${
95
+ // props.backgroundcolor
96
+ // ? props.backgroundcolor
97
+ // : props.medium
98
+ // ? medium[props.medium].color
99
+ // : ""
100
+ // }!important;
101
+ // }
41
102
  function ShareButtonView(props, children) {
42
103
  const vanillaStyle = `
43
- *::part(base) {
44
- border: none;
45
- --sl-focus-ring-color-primary: ${props.backgroundcolor
46
- ? props.backgroundcolor
47
- : props.medium
48
- ? medium[props.medium].color
49
- : ""}80!important;
104
+ sl-button::part(base) {
105
+ border: ${props.border || "none"};
106
+
50
107
 
51
108
  background: ${props.backgroundcolor
52
109
  ? props.backgroundcolor
@@ -61,21 +118,7 @@ function ShareButtonView(props, children) {
61
118
  border-radius: ${props.borderradius ? props.borderradius + "px" : ""};
62
119
  }
63
120
 
64
- *::part(base):hover {
65
- border-color: ${props.backgroundcolor
66
- ? props.backgroundcolor
67
- : props.medium
68
- ? medium[props.medium].color
69
- : ""}D1!important;
70
- }
71
121
 
72
- *::part(base):focus {
73
- border-color: ${props.backgroundcolor
74
- ? props.backgroundcolor
75
- : props.medium
76
- ? medium[props.medium].color
77
- : ""}D1!important;
78
- }
79
122
 
80
123
  *::part(label) {
81
124
  position: relative;
@@ -85,432 +128,180 @@ function ShareButtonView(props, children) {
85
128
  return props.hide ? (h(Host, { style: { display: "none" } })) : (h("div", null,
86
129
  h("style", { type: "text/css" }, styleString),
87
130
  h("style", { type: "text/css" }, vanillaStyle),
88
- h("sl-button", { class: sheet.classes.buttonStyle, target: props.openInSameTab ? "_self" : "_blank", loading: props.loading, disabled: props.disabled, pill: props.pill, size: props.size, type: props.type, onClick: !props.isPlainLink ? props.onClick : undefined, href: props.isPlainLink ? props.messageLink : undefined, exportparts: `base: ${props.type}sharebutton-base` },
131
+ h("sl-button", { class: sheet.classes.buttonStyle, target: props.openInSameTab ? "_self" : "_blank", loading: props.loading, disabled: props.disabled, pill: props.pill, size: props.size, type: props.type, onClick: !props.isPlainLink ? props.onClick : undefined, href: props.isPlainLink ? props.messageLink : undefined, exportparts: `base: ${props.type}button-base` },
89
132
  !props.hideicon && (h("sl-icon", { slot: props.iconslot || "prefix", name: props.icon ? props.icon : medium[props.medium].icon, exportparts: "base: icon" })),
90
133
  !props.hidetext && children)));
91
134
  }
92
135
 
93
- const style$1 = {
94
- Leaderboard: {
95
- "& table": {
136
+ function StatContainerView(props, children) {
137
+ const divideSpace = () => {
138
+ const spaceValue = getComputedStyle(document.documentElement).getPropertyValue(`--sl-spacing-${props.space}`);
139
+ return `${Math.floor(parseInt(spaceValue) / 2)}rem`;
140
+ };
141
+ // take alignment variable and convert it to CSS flexbox alignment
142
+ const alignment = props.alignment === "center"
143
+ ? "center"
144
+ : props.alignment === "right"
145
+ ? "flex-end"
146
+ : "flex-start";
147
+ // Dependent on props, not feasible to move out
148
+ const style = {
149
+ StatContainer: {
96
150
  width: "100%",
97
- borderCollapse: "collapse",
98
- },
99
- "& th": {
100
- textAlign: "left",
101
- padding: "var(--sl-spacing-medium)",
102
- paddingTop: "0",
103
- fontSize: "var(--sl-font-size-medium)",
104
- fontWeight: "var(--sl-font-weight-semibold)",
151
+ display: "flex",
152
+ flexWrap: "wrap",
153
+ alignItems: "center",
154
+ justifyContent: alignment,
155
+ flexDirection: "row",
156
+ gap: `var(--sl-spacing-${props.gap})`,
157
+ // Apply border styles conditionally based on the hideBorder prop
158
+ "& > *": {
159
+ "border-right": props.hideBorder
160
+ ? "none"
161
+ : "1px solid var(--sqm-text-subdued)",
162
+ "padding-right": divideSpace(),
163
+ },
164
+ "& > :last-child": {
165
+ "border-right": "none",
166
+ },
167
+ "& > ::slotted(*)": {
168
+ "border-right": props.hideBorder
169
+ ? "none"
170
+ : "1px solid var(--sqm-text-subdued)",
171
+ "padding-right": divideSpace(),
172
+ },
173
+ "& > ::slotted(*:last-child)": {
174
+ "border-right": "none",
175
+ },
176
+ "@media screen and (max-width: 430px)": {
177
+ "& > ::slotted(*)": {
178
+ borderRight: "none",
179
+ },
180
+ },
105
181
  },
106
- "& tr:not(:first-child)": {
107
- borderTop: "1px solid var(--sl-color-neutral-200)",
182
+ StatFrame: {
183
+ display: "flex",
108
184
  },
109
- "& td": {
110
- fontSize: "var(--sl-font-size-medium)",
111
- fontWeight: "var(--sl-font-weight-normal)",
185
+ BorderFix: {
186
+ "border-right": "1px solid transparent",
187
+ width: "0px",
188
+ "margin-left": "-1px",
112
189
  },
113
- "& .ellipses": {
114
- textAlign: "left",
190
+ };
191
+ const sheet = createStyleSheet(style);
192
+ const styleString = sheet.toString();
193
+ return (h("div", { class: sheet.classes.StatFrame, part: "sqm-base" },
194
+ h("div", { class: sheet.classes.StatContainer, part: "sqm-inner-container" },
195
+ h("style", { type: "text/css" }, styleString),
196
+ children),
197
+ h("div", { class: sheet.classes.BorderFix, part: "sqm-border" })));
198
+ }
199
+
200
+ function PortalChangePasswordView(props) {
201
+ const { states, callbacks } = props;
202
+ const style = {
203
+ Dialog: {
115
204
  padding: "0",
116
- color: "var(--sqm-text)",
117
- paddingLeft: "25%",
118
- },
119
- "& .highlight": {
120
- background: "var(--sl-color-primary-50)",
121
- },
122
- "& td, th": {
123
- color: "var(--sqm-text)",
124
- padding: "var(--sl-spacing-medium)",
205
+ "&::part(panel)": {
206
+ background: "var(--sqm-portal-background)",
207
+ borderRadius: "var(--sqm-border-radius-normal, var(--sl-border-radius-medium))",
208
+ },
209
+ "&::part(close-button)": {
210
+ "margin-top": "var(--sl-spacing-medium)",
211
+ },
212
+ "&::part(body)": {
213
+ padding: "0 var(--sl-spacing-x-large) var(--sl-spacing-x-large) var(--sl-spacing-x-large)",
214
+ },
125
215
  },
126
- "& .User": {
127
- width: "100%",
216
+ Error: {
217
+ "&::part(erroralert-base)": {
218
+ "margin-bottom": "15px",
219
+ },
128
220
  },
129
- "& .Score": {
130
- width: "auto",
131
- whiteSpace: "nowrap",
221
+ Success: {
222
+ "&::part(successalert-base)": {
223
+ "margin-bottom": "15px",
224
+ },
132
225
  },
133
- "& .Rank": {
134
- whiteSpace: "nowrap",
226
+ InputContainer: {
227
+ "& > :not(:last-child)": {
228
+ "margin-bottom": "var(--sl-spacing-x-large)",
229
+ },
135
230
  },
136
- "& .fullWidth": {
231
+ CancelButton: {
232
+ margin: "var(--sl-spacing-large) auto",
137
233
  width: "100%",
138
234
  },
139
- },
140
- };
141
- const sheet$1 = createStyleSheet(style$1);
142
- const styleString$1 = sheet$1.toString();
143
- const vanillaStyle = `
144
- :host{
145
- display: block;
146
- }
147
- `;
148
- function LeaderboardView(props) {
149
- var _a, _b, _c;
150
- const { states, data, elements } = props;
151
- const { styles } = states;
152
- if (states.isEssentials) {
153
- return (h("sqm-empty", { "empty-state-image": "https://res.cloudinary.com/saasquatch/image/upload/v1715360191/squatch-assets/Leaderboard_Not_Available.svg", "empty-state-header": "Leaderboards aren\u2019t available on your plan", "empty-state-text": "Contact {supportText} to upgrade your plan and start leveraging gamification in your program.", "support-text": "Support" }));
154
- }
155
- if (states.loading) {
156
- return (h("div", { class: sheet$1.classes.Leaderboard, style: { width: styles.width || "100%" } },
157
- h("style", { type: "text/css" },
158
- styleString$1,
159
- vanillaStyle),
160
- h("table", null, [...Array(10)].map(() => {
161
- return (h("tr", null,
162
- h("td", null,
163
- h("sl-skeleton", null))));
164
- }))));
165
- }
166
- if (!states.hasLeaders)
167
- return elements.empty;
168
- let userSeenFlag = false;
169
- const getUsersName = (user) => {
170
- if (!user.firstName && !user.lastInitial)
171
- return styles.anonymousUser;
172
- const { firstName, lastInitial } = user;
173
- if (firstName && lastInitial)
174
- return `${firstName} ${lastInitial}`;
175
- if (firstName || lastInitial)
176
- return firstName || lastInitial;
177
- return styles.anonymousUser;
178
- };
179
- const getRankCellText = (userRank, isViewingUsersRow) => {
180
- if (!userRank) {
181
- return styles.hideNames ? `${styles.viewingUserText}` : "-";
182
- }
183
- const viewingUserText = ` - ${styles.viewingUserText}`;
184
- return styles.rankSuffix
185
- ? intl.formatMessage({
186
- id: "rank",
187
- defaultMessage: styles.rankSuffix,
188
- }, {
189
- rank: userRank,
190
- }) + `${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`
191
- : `${userRank} ${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`;
192
- };
193
- return (h("div", { class: sheet$1.classes.Leaderboard, part: "sqm-base", style: { width: styles.width || "100%" } },
194
- h("style", { type: "text/css" },
195
- styleString$1,
196
- vanillaStyle),
197
- h("table", { part: "sqm-table" },
198
- h("tr", null,
199
- styles.showRank && (h("th", { class: `Rank ${styles.hideNames ? "fullWidth" : ""}` }, styles.rankheading)),
200
- !styles.hideNames && h("th", { class: "User" }, styles.usersheading),
201
- h("th", { class: "Score" }, styles.statsheading)), (_a = data.leaderboard) === null || _a === void 0 ? void 0 :
202
- _a.map((user) => {
203
- var _a, _b;
204
- if (user.rowNumber === ((_a = data.viewerRank) === null || _a === void 0 ? void 0 : _a.rowNumber))
205
- userSeenFlag = true;
206
- const isViewingUsersRow = !styles.hideViewer && user.rowNumber === ((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rowNumber);
207
- return (h("tr", { class: isViewingUsersRow ? "highlight" : "" },
208
- styles.showRank && (h("td", { class: "Rank" }, getRankCellText(user.rank, isViewingUsersRow))),
209
- !styles.hideNames && h("td", { class: "User" }, getUsersName(user)),
210
- h("td", { class: "Score" }, user.textValue)));
211
- }),
212
- !userSeenFlag && !styles.hideViewer && (h("tr", null,
213
- h("td", { colSpan: 100, class: "ellipses" },
214
- h("sl-icon", { name: "three-dots", style: { verticalAlign: "middle" } })))),
215
- !userSeenFlag && !styles.hideViewer && (h("tr", { class: "highlight" },
216
- styles.showRank && (h("td", { class: "Rank" }, getRankCellText((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rank, true))),
217
- !styles.hideNames && (h("td", { class: "User" }, getUsersName(data.viewerRank || {}))),
218
- h("td", { class: "Score" }, ((_c = data.viewerRank) === null || _c === void 0 ? void 0 : _c.textValue) || "0"))))));
219
- }
220
-
221
- function BigStatView(props) {
222
- const { statvalue, flexReverse, alignment } = props;
223
- // Dependent on props, not feasiable to move out
224
- const style = {
225
- Container: {
226
- display: "flex",
227
- height: "inherit",
228
- "justify-content": "space-between",
229
- "flex-direction": `${flexReverse ? "column-reverse" : "column"}`,
230
- "align-items": `${alignment === "left"
231
- ? "flex-start"
232
- : alignment === "right"
233
- ? "flex-end"
234
- : "center"}`,
235
- },
236
- Stat: {
237
- "font-size": "var(--sl-font-size-x-large)",
238
- "text-align": alignment,
235
+ PasswordField: {
236
+ marginBottom: "var(--sl-spacing-large) !important",
237
+ display: "block",
239
238
  },
240
- Description: {
241
- "font-size": "var(--sl-font-size-small)",
242
- "font-weight": "var(--sl-font-weight-normal)",
243
- color: "var(--sqm-text-subdued)",
244
- "text-align": alignment,
239
+ ChangePasswordButton: {
240
+ paddingTop: "var(--sl-spacing-x-large)",
245
241
  },
246
242
  };
247
243
  const sheet = createStyleSheet(style);
248
244
  const styleString = sheet.toString();
249
- return (h("div", { part: "stat-wrapper", class: sheet.classes.Container },
245
+ return (h("div", null,
250
246
  h("style", { type: "text/css" }, styleString),
251
- h("div", { part: "stat-value", class: sheet.classes.Stat }, statvalue),
252
- h("div", { part: "stat-description", class: sheet.classes.Description }, props.labelSlot)));
247
+ h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, "onSl-hide": () => callbacks.setOpen(false) },
248
+ h(PortalSectionView, Object.assign({}, {
249
+ labelMargin: "x-large",
250
+ padding: "none",
251
+ label: (h(TextSpanView, Object.assign({}, { type: "h2" }), states.content.modalChangePasswordHeader)),
252
+ content: (h(PortalContainerView, Object.assign({}, { direction: "column", padding: "none", gap: "32px" }),
253
+ states.error && (h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
254
+ h("div", { part: "erroralert-text" }, states.error))),
255
+ states.success && (h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
256
+ h("div", { part: "successalert-text" }, states.content.successMessage))),
257
+ h("sl-form", { "onSl-submit": callbacks.submit },
258
+ h("div", { class: sheet.classes.InputContainer },
259
+ h("sqm-password-field", { exportparts: "input-label: input-label", class: sheet.classes.PasswordField, fieldLabel: states.content.passwordFieldLabel, meetsRequirementsText: states.content.meetsRequirementsText, doesNotMeetRequirementsText: states.content.doesNotMeetRequirementsText, minErrorText: states.content.minErrorText, uppercaseErrorText: states.content.uppercaseErrorText, lowercaseErrorText: states.content.lowercaseErrorText, hasErrorText: states.content.hasErrorText }),
260
+ h("sl-input", { exportparts: "label: input-label, base: input-base", name: "/confirmPassword", label: states.content.confirmPasswordFieldLabel, required: true, togglePassword: true, disabled: states.loading, type: "password" })),
261
+ h(PortalContainerView, Object.assign({}, { direction: "row", padding: "none", gap: "20px" }),
262
+ h("sl-button", { class: sheet.classes.ChangePasswordButton, type: "primary", exportparts: "base: primarybutton-base", submit: true, loading: states.loading }, states.content.changePasswordButtonText),
263
+ h("sl-button", { class: sheet.classes.CancelButton, type: "text", exportparts: "base: secondarybutton-base", onClick: () => callbacks.setOpen(false) }, states.content.cancelText))))),
264
+ }))),
265
+ h(PortalSectionView, Object.assign({}, {
266
+ labelMargin: "x-large",
267
+ padding: "xxx-large",
268
+ label: (h(TextSpanView, Object.assign({}, { type: "h2" }), states.content.portalChangePasswordHeader)),
269
+ content: (h("sl-button", { exportparts: "base: primarybutton-base", onClick: () => callbacks.setOpen(true) }, states.content.portalChangePasswordButtonText)),
270
+ }),
271
+ h("style", { type: "text/css" }, styleString))));
253
272
  }
254
273
 
255
- const style$2 = {
256
- HostBlock: HostBlock,
257
- Frame: {
258
- display: "flex",
259
- "flex-direction": "column",
260
- "box-sizing": "border-box",
261
- },
262
- FooterWrapper: {
263
- width: "100%",
264
- "max-width": "100%",
265
- padding: "var(--sl-spacing-medium) var(--sl-spacing-x-large)",
266
- background: "var(--sqm-footer-background)",
267
- display: "flex",
268
- "justify-content": "flex-end",
269
- "align-items": "center",
270
- "box-sizing": "border-box",
271
- "margin-top": "auto",
272
- },
273
- HeaderWrapper: {
274
- width: "100%",
275
- "max-width": "100%",
276
- "box-sizing": "border-box",
277
- display: "flex",
278
- "justify-content": "space-between",
279
- padding: "var(--sl-spacing-small) var(--sl-spacing-large)",
280
- "align-items": "center",
281
- "background-color": "var(--sqm-header-background)",
282
- "@media screen and (max-width: 499px)": {
283
- "flex-direction": "row-reverse",
284
- "justify-content": "flex-end",
285
- padding: "0",
286
- },
287
- },
288
- };
289
- const sheet$2 = createStyleSheet(style$2);
290
- const styleString$2 = sheet$2.toString();
291
- function PortalFrameView(props, children) {
292
- const { data, notFullScreen } = props;
293
- return (h("div", { style: { minHeight: notFullScreen ? "100%" : "100vh" }, class: sheet$2.classes.Frame, part: "sqm-base" },
294
- h("style", { type: "text/css" }, styleString$2),
295
- h("div", { class: sheet$2.classes.HeaderWrapper, part: "sqm-header" },
296
- data.header,
297
- h("slot", { name: "sqm-navigation-menu" })),
298
- children,
299
- h("div", { class: sheet$2.classes.FooterWrapper, part: "sqm-footer" }, data.footer)));
300
- }
301
-
302
- const EditProfileView = (props) => {
303
- var _a, _b, _c, _d;
304
- const { states, callbacks } = props;
305
- const { text } = states;
306
- const { errors } = states.formState;
307
- if (states.showEdit) {
308
- return (h("div", { class: `CardWrapper ${!states.showEdit && "ShowEdit"}`, part: "sqm-base" },
309
- h("h2", { part: "sqm-header", style: {
310
- fontSize: "var(--sl-font-size-x-large)",
311
- margin: "0px",
312
- textAlign: "center",
313
- } }, text.editprofileheader),
314
- h("form", { class: "FormWrapper", onSubmit: callbacks.onSubmit },
315
- h("div", { class: "FormSection" },
316
- states.formState.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
317
- h("div", { part: "erroralert-text" }, states.formState.error))),
318
- h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: states.formState.firstName, onInput: callbacks.onChange, label: text.firstnametext, disabled: states.loading }, (errors.firstName && errors.firstName.status !== "valid"
319
- ? { class: "ErrorStyles", helpText: text.fieldEmptyText }
320
- : []), { id: "firstName", name: "firstName", error: errors.firstName && errors.firstName.status !== "valid"
321
- ? errors.firstName.message
322
- : undefined })),
323
- h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: states.formState.lastName, onInput: callbacks.onChange, label: text.lastnametext, disabled: states.loading, id: "lastName", name: "lastName" }, (errors.lastName && errors.lastName.status !== "valid"
324
- ? { class: "ErrorStyles", helpText: text.fieldEmptyText }
325
- : []), { error: errors.lastName && errors.lastName.status !== "valid"
326
- ? errors.lastName.message
327
- : undefined }))),
328
- text.showregion && states.formState.currentRegion && (h("sl-input", { exportparts: "label: input-label, base: input-base", disabled: true, value: states.formState.currentRegion, label: text.currentregiontext, id: "currentRegion", name: "currentRegion" })),
329
- h("div", { class: "ButtonWrapper" },
330
- h("sl-button", { type: "primary", loading: states.loading, disabled: states.submitDisabled, onClick: (e) => {
331
- callbacks.onSubmit(e);
332
- }, submit: true, exportparts: "base: primarybutton-base" }, text.updatetext),
333
- h("sl-button", { onClick: () => {
334
- callbacks.setShowEdit(false);
335
- }, exportparts: "base: defaultbutton-base" }, text.canceltext)))));
336
- }
337
- return (h("div", { class: `CardWrapper FormWrapper ${!states.showEdit && "ShowEdit"}`, part: "sqm-base" },
338
- h("div", { class: "FormSection" },
339
- h("h2", { part: "sqm-header", style: {
340
- fontSize: "var(--sl-font-size-x-large)",
341
- marginBottom: "0px",
342
- textAlign: "center",
343
- } }, text.editprofileheader),
344
- h("div", null,
345
- h("p", { style: { fontSize: "var(--sl-font-size-medium)" } }, (_a = states.user) === null || _a === void 0 ? void 0 :
346
- _a.firstName,
347
- " ", (_b = states.user) === null || _b === void 0 ? void 0 :
348
- _b.lastName),
349
- 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))),
350
- h("sl-button", { type: "primary", loading: states.loading, onClick: () => {
351
- callbacks.resetForm();
352
- callbacks.setShowEdit(true);
353
- }, exportparts: "base: primarybutton-base" }, text.editprofiletext)));
354
- };
355
-
356
- const MessageLinkQuery = dist.gql `
357
- query ($programId: ID, $engagementMedium: UserEngagementMedium!) {
358
- user: viewer {
359
- ... on User {
360
- shareLink(
361
- programId: $programId
362
- engagementMedium: $engagementMedium
363
- shareMedium: DIRECT
364
- )
365
- }
366
- }
367
- }
368
- `;
369
- const WIDGET_ENGAGEMENT_EVENT = dist.gql `
370
- mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
371
- createUserAnalyticsEvent(eventMeta: $eventMeta)
372
- }
373
- `;
374
- function useShareLink(props) {
375
- var _a, _b;
376
- const { programId = H() } = props;
377
- const user = J();
378
- const engagementMedium = B();
379
- const contextData = Fn(REFERRAL_CODES_NAMESPACE);
380
- const { data } = wn(MessageLinkQuery, { programId, engagementMedium }, !(user === null || user === void 0 ? void 0 : user.jwt) || !!props.linkOverride || (contextData === null || contextData === void 0 ? void 0 : contextData.shareLink) !== undefined);
381
- const [sendLoadEvent] = $e(WIDGET_ENGAGEMENT_EVENT);
382
- const [setCopied, copiedRes] = $e(SET_CODE_COPIED);
383
- const copyString = (_b = ((contextData === null || contextData === void 0 ? void 0 : contextData.shareLink) || ((_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.shareLink))) !== null && _b !== void 0 ? _b :
384
- // Shown during loading
385
- "...";
386
- const [open, setOpen] = useState(false);
387
- async function onClick() {
388
- if (contextData) {
389
- await setCopied({ referralCode: contextData.referralCode });
390
- contextData.refresh();
391
- }
392
- // Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
393
- // Only if called from a user-initiated event
394
- navigator.clipboard.writeText(copyString);
395
- setOpen(true);
396
- setTimeout(() => setOpen(false), props.tooltiplifespan);
397
- sendLoadEvent({
398
- eventMeta: {
399
- programId,
400
- id: user === null || user === void 0 ? void 0 : user.id,
401
- accountId: user === null || user === void 0 ? void 0 : user.accountId,
402
- type: "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",
403
- meta: {
404
- engagementMedium,
405
- shareMedium: "DIRECT",
406
- },
407
- },
408
- });
409
- }
410
- return { ...props, onClick, open, copyString: copyString };
411
- }
412
-
413
- const MessageLinkQuery$1 = dist.gql `
414
- query (
415
- $programId: ID
416
- $engagementMedium: UserEngagementMedium!
417
- $shareMedium: ReferralShareMedium!
418
- ) {
419
- viewer {
420
- ... on User {
421
- messageLink(
422
- programId: $programId
423
- engagementMedium: $engagementMedium
424
- shareMedium: $shareMedium
425
- )
426
- shareLink(programId: $programId, engagementMedium: $engagementMedium)
427
- }
428
- }
429
- }
430
- `;
431
- function NativeShare(props, directLink, undefinedErrorText, unsupportedPlatformText) {
432
- const title = props.sharetitle || "Share title";
433
- const text = props.sharetext || "Share text";
434
- if (directLink === "undefined") {
435
- return alert(undefinedErrorText);
436
- }
437
- if (window.navigator.share) {
438
- window.navigator
439
- .share({
440
- title,
441
- text,
442
- url: directLink,
443
- })
444
- .catch((error) => console.error("Error on web share", error));
445
- }
446
- else {
447
- alert(unsupportedPlatformText);
448
- }
449
- }
450
- function FacebookShare(directLink, messageLink, errorText) {
451
- if (messageLink === "undefined" || directLink === "undefined") {
452
- return alert(errorText);
453
- }
454
- if (typeof SquatchAndroid.shareOnFacebook !== "undefined") {
455
- return SquatchAndroid.shareOnFacebook(directLink, messageLink);
456
- }
457
- else {
458
- return GenericShare(messageLink, errorText);
459
- }
460
- }
461
- function GenericShare(messageLink, errorText) {
462
- return messageLink ? (window.location.href = messageLink) : alert(errorText);
463
- }
464
- function useShareButton(props) {
465
- var _a, _b, _c, _d;
466
- const { sharetitle, sharetext, medium } = props;
467
- const programId = props.programId ? props.programId : H();
468
- const user = J();
469
- const engagementMedium = B();
470
- const variables = {
471
- engagementMedium,
472
- programId: programId,
473
- shareMedium: medium.toUpperCase(),
474
- };
475
- const contextData = Fn(REFERRAL_CODES_NAMESPACE);
476
- const overrideData = contextData === null || contextData === void 0 ? void 0 : contextData[medium];
477
- // only queries if a programId is available
478
- const res = wn(MessageLinkQuery$1, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId || overrideData !== undefined);
479
- const [setCopied, copiedRes] = $e(SET_CODE_COPIED);
480
- const directLink = (overrideData === null || overrideData === void 0 ? void 0 : overrideData.shareLink) || ((_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);
481
- const environment = getEnvironmentSDK();
482
- const hide = (medium.toLocaleUpperCase() === "SMS" &&
483
- window.orientation === undefined) ||
484
- (medium.toLocaleUpperCase() === "DIRECT" && !window.navigator.share);
485
- const messageLink = (overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink) || ((_d = (_c = res.data) === null || _c === void 0 ? void 0 : _c.viewer) === null || _d === void 0 ? void 0 : _d.messageLink);
486
- async function onClick() {
487
- if (overrideData) {
488
- await setCopied({ referralCode: contextData.referralCode });
489
- contextData.refresh();
490
- }
491
- if (medium.toLocaleUpperCase() === "FACEBOOK" &&
492
- environment.type === "SquatchAndroid") {
493
- FacebookShare(directLink, messageLink, props.errorText);
494
- }
495
- else if (medium.toLocaleUpperCase() === "DIRECT") {
496
- NativeShare({ sharetitle, sharetext }, directLink, props.errorText, props.unsupportedPlatformText);
497
- }
498
- }
499
- const isPlainLink = !(medium.toLocaleUpperCase() === "FACEBOOK" &&
500
- environment.type === "SquatchAndroid") &&
501
- medium.toLocaleUpperCase() !== "DIRECT" &&
502
- messageLink;
503
- const userAgent = window.navigator.userAgent.toLowerCase(), safari = /safari/.test(userAgent), ios = /iphone|ipod|ipad/.test(userAgent);
504
- const openInSameTab = ios && !safari;
505
- return {
506
- ...props,
507
- loading: res.loading && !(overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink),
508
- messageLink,
509
- isPlainLink,
510
- onClick,
511
- openInSameTab,
512
- hide,
513
- };
274
+ function PoweredByImg({ color = "#A6A6A6", width = 120, height = 16, }) {
275
+ return (h("svg", { width: width, height: height, viewBox: "0 0 1662 254", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
276
+ h("path", { d: "M801.082 253.58L869.382 1.67969", stroke: color, "stroke-width": "3" }),
277
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M125.682 42.48C123.882 42.48 121.982 42.78 120.382 43.48C118.682 44.18 117.182 45.18 115.882 46.48C114.582 47.68 113.582 49.28 112.882 50.98C112.182 52.68 111.882 54.48 111.982 56.28C112.282 59.68 113.882 63.08 116.382 65.38C118.982 67.78 122.382 68.98 125.782 68.98C129.282 68.98 132.682 67.58 135.182 65.38C137.782 62.98 139.382 59.78 139.582 56.28C139.582 54.38 139.282 52.68 138.682 50.98C137.982 49.28 136.982 47.78 135.682 46.48C134.382 45.18 132.882 44.18 131.182 43.48C129.282 42.78 127.582 42.48 125.682 42.48Z", fill: color }),
278
+ h("path", { d: "M135.882 89.2798H115.582V187.58H135.882V89.2798Z", fill: color }),
279
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M231.481 104.18C238.781 93.4799 251.181 87.3799 266.281 87.3799C290.981 87.3799 307.581 103.28 307.381 127.08V187.48H286.781V132.38C286.781 116.38 278.281 107.18 263.381 107.18C248.481 107.18 237.981 117.68 237.981 132.68V187.48H217.281V132.38C217.281 116.38 208.781 107.18 193.881 107.18C178.981 107.18 168.481 117.68 168.481 132.68V187.48H147.981V89.3799H168.681V97.8799C178.081 88.8799 190.181 87.4799 197.081 87.4799C211.881 87.4799 224.381 93.5799 231.481 104.18Z", fill: color }),
280
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M370.781 87.48C358.581 87.48 347.981 91.38 339.981 98.38V89.28H319.481V226.08H339.981V177.78C347.881 185.08 358.581 188.78 370.781 188.78C398.781 188.78 419.881 166.88 419.881 138.08C419.981 109.28 398.781 87.48 370.781 87.48ZM368.881 169.58C351.481 169.58 338.881 156.38 338.881 138.28C338.881 120.38 351.381 106.98 368.881 106.98C386.281 106.98 398.881 120.08 398.881 138.28C398.881 156.48 386.381 169.58 368.881 169.58Z", fill: color }),
281
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M701.782 169.88C707.682 169.88 714.082 167.58 719.582 163.98L721.482 162.88L731.482 178.68L729.782 179.88C721.282 186.28 710.982 189.58 700.382 189.58C678.082 189.58 665.782 176.38 665.782 152.28V108.68H645.682V89.3799H665.782V59.8799H686.482V89.2798H725.682V108.48H686.482V151.88C686.482 163.38 691.982 169.88 701.782 169.88Z", fill: color }),
282
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M551.282 239.88C549.982 239.88 548.782 240.28 547.682 240.88C546.682 241.58 545.782 242.58 545.382 243.68C544.882 244.78 544.782 246.08 545.082 247.28C545.282 248.58 545.882 249.68 546.882 250.48C547.782 251.38 548.882 251.98 550.082 252.28C551.382 252.48 552.582 252.38 553.782 251.98C554.882 251.48 555.982 250.78 556.582 249.68C557.282 248.68 557.582 247.38 557.582 246.18C557.582 244.48 556.982 242.88 555.682 241.68C554.482 240.48 552.882 239.88 551.282 239.88Z", fill: color }),
283
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M586.182 210.78C592.282 210.78 597.582 213.08 601.082 217.18L601.482 217.68L596.282 223.08L595.782 222.58C594.482 221.18 593.082 220.18 591.382 219.48C589.682 218.78 587.882 218.38 586.082 218.48C578.882 218.48 573.682 224.08 573.682 231.58C573.682 239.18 578.882 244.78 586.082 244.78C589.782 244.68 593.282 243.18 595.882 240.58L596.382 240.08L601.382 245.68L600.982 246.08C597.182 250.18 591.982 252.18 586.082 252.18C574.082 252.18 565.382 243.58 565.382 231.58C565.582 219.48 574.182 210.78 586.182 210.78Z", fill: color }),
284
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M633.782 210.78C621.682 210.78 612.582 219.68 612.582 231.38C612.582 243.08 621.682 251.98 633.782 251.98C645.882 251.98 654.882 243.08 654.882 231.38C655.082 219.78 645.982 210.78 633.782 210.78ZM633.782 244.78C626.382 244.78 620.782 239.28 620.782 231.58C620.782 223.88 626.182 218.48 633.782 218.48C641.182 218.48 646.782 224.08 646.782 231.58C646.782 238.98 641.382 244.78 633.782 244.78Z", fill: color }),
285
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M723.982 228.78C723.982 222.18 720.382 218.28 714.082 218.28C707.682 218.28 703.382 222.78 702.982 228.98V252.18H695.082V228.68C695.082 222.08 691.482 218.18 685.182 218.18C680.082 218.18 674.482 221.48 674.482 228.88V252.08H666.582V211.38H674.482V214.78L676.682 213.28C679.582 211.38 683.082 210.48 686.582 210.48C692.082 210.48 696.782 212.48 699.882 216.08L700.882 217.28L701.882 216.08C704.782 212.48 709.582 210.48 715.182 210.48C725.082 210.48 731.982 217.08 731.982 226.38V251.88H724.082V228.68H723.982V228.78Z", fill: color }),
286
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M511.681 89.4797V98.7797C503.681 91.4797 493.181 87.6797 480.981 87.6797C452.981 87.6797 431.981 109.68 431.981 138.68C431.981 167.78 453.081 189.68 480.981 189.68C493.181 189.68 503.681 185.78 511.681 178.38V187.68H532.381V89.4797H511.681ZM482.881 169.88C465.481 169.88 452.781 156.58 452.781 138.48C452.781 120.48 465.281 106.98 482.881 106.98C500.481 106.98 512.781 120.08 512.781 138.48C512.781 156.68 500.181 169.88 482.881 169.88Z", fill: color }),
287
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M595.281 107.08C604.181 107.08 611.781 110.38 618.781 116.98L620.481 118.68L633.981 104.58L632.581 102.98C623.781 92.98 610.781 87.48 595.781 87.48C565.981 87.48 544.481 109.08 544.481 138.48C544.481 167.98 565.981 189.48 595.781 189.48C610.481 189.48 623.681 183.98 632.581 174.08L633.981 172.58L620.981 158.18L619.281 159.88C612.481 166.48 603.981 169.98 595.481 169.98C578.381 169.98 565.681 156.68 565.681 138.58C565.581 120.58 577.881 107.08 595.281 107.08Z", fill: color }),
288
+ h("path", { d: "M135.882 89.2798H115.582V187.58H135.882V89.2798Z", fill: color }),
289
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M231.481 104.18C238.781 93.4799 251.181 87.3799 266.281 87.3799C290.981 87.3799 307.581 103.28 307.381 127.08V187.48H286.781V132.38C286.781 116.38 278.281 107.18 263.381 107.18C248.481 107.18 237.981 117.68 237.981 132.68V187.48H217.281V132.38C217.281 116.38 208.781 107.18 193.881 107.18C178.981 107.18 168.481 117.68 168.481 132.68V187.48H147.981V89.3799H168.681V97.8799C178.081 88.8799 190.181 87.4799 197.081 87.4799C211.881 87.4799 224.381 93.5799 231.481 104.18Z", fill: color }),
290
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M370.781 87.48C358.581 87.48 347.981 91.38 339.981 98.38V89.28H319.481V226.08H339.981V177.78C347.881 185.08 358.581 188.78 370.781 188.78C398.781 188.78 419.881 166.88 419.881 138.08C419.981 109.28 398.781 87.48 370.781 87.48ZM368.881 169.58C351.481 169.58 338.881 156.38 338.881 138.28C338.881 120.38 351.381 106.98 368.881 106.98C386.281 106.98 398.881 120.08 398.881 138.28C398.881 156.48 386.381 169.58 368.881 169.58Z", fill: color }),
291
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M701.782 169.88C707.682 169.88 714.082 167.58 719.582 163.98L721.482 162.88L731.482 178.68L729.782 179.88C721.282 186.28 710.982 189.58 700.382 189.58C678.082 189.58 665.782 176.38 665.782 152.28V108.68H645.682V89.3799H665.782V59.8799H686.482V89.2798H725.682V108.48H686.482V151.88C686.482 163.38 691.982 169.88 701.782 169.88Z", fill: color }),
292
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M511.681 89.4797V98.7797C503.681 91.4797 493.181 87.6797 480.981 87.6797C452.981 87.6797 431.981 109.68 431.981 138.68C431.981 167.78 453.081 189.68 480.981 189.68C493.181 189.68 503.681 185.78 511.681 178.38V187.68H532.381V89.4797H511.681ZM482.881 169.88C465.481 169.88 452.781 156.58 452.781 138.48C452.781 120.48 465.281 106.98 482.881 106.98C500.481 106.98 512.781 120.08 512.781 138.48C512.781 156.68 500.181 169.88 482.881 169.88Z", fill: color }),
293
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M595.281 107.08C604.181 107.08 611.781 110.38 618.781 116.98L620.481 118.68L633.981 104.58L632.581 102.98C623.781 92.98 610.781 87.48 595.781 87.48C565.981 87.48 544.481 109.08 544.481 138.48C544.481 167.98 565.981 189.48 595.781 189.48C610.481 189.48 623.681 183.98 632.581 174.08L633.981 172.58L620.981 158.18L619.281 159.88C612.481 166.48 603.981 169.98 595.481 169.98C578.381 169.98 565.681 156.68 565.681 138.58C565.581 120.58 577.881 107.08 595.281 107.08Z", fill: color }),
294
+ h("path", { d: "M34.6815 112.78C40.6815 112.78 46.5815 114.18 51.8815 116.68C57.2815 119.18 62.0815 122.78 65.9815 127.28C67.9815 122.68 69.0815 117.78 69.0815 112.88C69.0815 108.38 68.1815 103.88 66.4815 99.8799C64.6815 95.6799 62.1815 91.9799 58.9815 88.8799C55.7815 85.7799 51.9815 83.2799 47.7815 81.4799C43.5815 79.7799 39.0815 78.8799 34.5815 78.8799C30.0815 78.8799 25.5815 79.6799 21.3815 81.4799C17.1815 83.1799 13.3815 85.7799 10.1815 88.8799C6.98154 91.9799 4.48154 95.7799 2.68154 99.8799C0.881541 104.08 0.081543 108.38 0.081543 112.88C0.181543 117.88 1.18154 122.78 3.18154 127.28C7.08154 122.68 11.8815 119.18 17.1815 116.68C22.7815 113.98 28.7815 112.68 34.6815 112.78Z", fill: color }),
295
+ h("path", { d: "M69.1817 153.48C69.1817 146.68 67.1817 140.18 63.2817 134.48C59.4817 128.88 54.0817 124.48 47.7817 121.88C41.4817 119.28 34.4817 118.68 27.7817 119.88C21.0817 121.28 14.8817 124.48 10.0817 129.28C5.28166 134.08 1.88166 140.08 0.681661 146.78C-0.718339 153.48 0.0816607 160.18 2.68166 166.48C5.28166 172.78 9.68166 178.08 15.4817 181.78C21.0817 185.58 27.7817 187.48 34.6817 187.48C43.7817 187.38 52.5817 183.88 59.0817 177.38C65.6817 170.98 69.1817 162.58 69.1817 153.48Z", fill: color }),
296
+ h("path", { d: "M69.1817 34.9799C69.1817 28.1799 67.1817 21.6799 63.2817 15.9799C59.4817 10.3799 54.1817 5.9799 47.7817 3.3799C41.4817 0.779901 34.4817 0.1799 27.7817 1.3799C21.0817 2.7799 14.8817 5.97986 10.0817 10.7799C5.28166 15.5799 1.88166 21.5799 0.681661 28.2799C-0.718339 34.9799 0.0816607 41.6799 2.68166 47.9799C5.28166 54.2799 9.68166 59.5799 15.4817 63.2799C21.0817 67.0799 27.7817 68.9799 34.6817 68.9799C43.8817 68.9799 52.6817 65.3799 59.1817 58.9799C65.5817 52.6799 69.1817 43.8799 69.1817 34.9799Z", fill: color }),
297
+ h("path", { d: "M962.664 203.95C953.044 203.95 945.244 201.285 939.264 195.955C933.284 190.495 930.294 183.41 930.294 174.7C930.294 165.08 933.739 157.605 940.629 152.275C947.649 146.945 957.464 144.28 970.074 144.28H993.864V138.43C993.864 129.72 991.589 123.09 987.039 118.54C982.619 113.86 976.184 111.52 967.734 111.52C962.014 111.52 956.749 112.885 951.939 115.615C947.129 118.345 943.229 122.18 940.239 127.12L933.999 120.295C937.639 114.575 942.384 110.22 948.234 107.23C954.214 104.11 960.974 102.55 968.514 102.55C979.694 102.55 988.404 105.605 994.644 111.715C1001.01 117.695 1004.2 126.015 1004.2 136.675V184.255C1004.2 188.805 1004.98 194.72 1006.54 202H997.569C996.399 199.14 995.554 194.07 995.034 186.79H994.644C990.874 192.25 986.259 196.475 980.799 199.465C975.339 202.455 969.294 203.95 962.664 203.95ZM962.664 195.175C968.124 195.175 973.259 194.07 978.069 191.86C982.879 189.52 986.714 186.465 989.574 182.695C992.434 178.795 993.864 174.7 993.864 170.41V152.665H969.489C960.389 152.665 953.239 154.615 948.039 158.515C942.969 162.415 940.434 167.81 940.434 174.7C940.434 180.68 942.514 185.62 946.674 189.52C950.834 193.29 956.164 195.175 962.664 195.175Z", fill: color }),
298
+ h("path", { d: "M1067.55 203.95C1055.07 203.95 1045.25 199.27 1038.1 189.91C1030.95 180.55 1027.38 167.745 1027.38 151.495C1027.38 136.415 1031.02 124.52 1038.3 115.81C1045.71 106.97 1055.72 102.55 1068.33 102.55C1074.7 102.55 1080.55 104.045 1085.88 107.035C1091.21 110.025 1095.5 114.25 1098.75 119.71H1099.14V57.3101H1109.67V178.21C1109.67 189.13 1109.86 197.06 1110.25 202H1100.89C1100.63 197.84 1100.5 192.12 1100.5 184.84H1100.11C1097.12 190.69 1092.7 195.37 1086.85 198.88C1081 202.26 1074.57 203.95 1067.55 203.95ZM1068.13 195.175C1077.23 195.175 1084.64 192.185 1090.36 186.205C1096.21 180.225 1099.14 172.49 1099.14 163V146.815C1099.14 135.895 1096.41 127.25 1090.95 120.88C1085.49 114.38 1078.08 111.13 1068.72 111.13C1059.1 111.13 1051.49 114.77 1045.9 122.05C1040.44 129.2 1037.71 139.145 1037.71 151.885C1037.71 165.275 1040.44 175.87 1045.9 183.67C1051.36 191.34 1058.77 195.175 1068.13 195.175Z", fill: color }),
299
+ h("path", { d: "M1208.57 104.5L1172.3 202H1161.96L1125.5 104.5H1136.61L1167.03 189.715L1197.45 104.5H1208.57Z", fill: color }),
300
+ h("path", { d: "M1261.51 203.95C1252.54 203.95 1244.61 201.87 1237.72 197.71C1230.96 193.55 1225.7 187.635 1221.93 179.965C1218.29 172.295 1216.47 163.39 1216.47 153.25C1216.47 143.11 1218.29 134.205 1221.93 126.535C1225.7 118.865 1230.96 112.95 1237.72 108.79C1244.61 104.63 1252.54 102.55 1261.51 102.55C1270.48 102.55 1278.35 104.63 1285.11 108.79C1292 112.95 1297.33 118.865 1301.1 126.535C1304.87 134.205 1306.75 143.11 1306.75 153.25C1306.75 163.39 1304.87 172.295 1301.1 179.965C1297.33 187.635 1292 193.55 1285.11 197.71C1278.35 201.87 1270.48 203.95 1261.51 203.95ZM1261.51 195.37C1268.4 195.37 1274.45 193.615 1279.65 190.105C1284.98 186.595 1289.07 181.655 1291.93 175.285C1294.79 168.915 1296.22 161.57 1296.22 153.25C1296.22 144.93 1294.79 137.585 1291.93 131.215C1289.07 124.845 1284.98 119.905 1279.65 116.395C1274.45 112.885 1268.4 111.13 1261.51 111.13C1254.75 111.13 1248.71 112.885 1243.38 116.395C1238.18 119.905 1234.15 124.845 1231.29 131.215C1228.43 137.585 1227 144.93 1227 153.25C1227 161.57 1228.43 168.915 1231.29 175.285C1234.15 181.655 1238.18 186.595 1243.38 190.105C1248.71 193.615 1254.75 195.37 1261.51 195.37Z", fill: color }),
301
+ h("path", { d: "M1366.03 203.95C1352.25 203.95 1341.52 199.53 1333.85 190.69C1326.31 181.72 1322.54 169.24 1322.54 153.25C1322.54 137.39 1326.38 124.975 1334.05 116.005C1341.72 107.035 1352.38 102.55 1366.03 102.55C1373.57 102.55 1380.26 104.11 1386.11 107.23C1391.96 110.22 1396.77 114.575 1400.54 120.295L1394.3 126.34C1391.31 121.66 1387.28 118.02 1382.21 115.42C1377.27 112.69 1371.88 111.325 1366.03 111.325C1355.76 111.325 1347.63 115.03 1341.65 122.44C1335.8 129.85 1332.88 140.12 1332.88 153.25C1332.88 166.38 1335.8 176.65 1341.65 184.06C1347.63 191.47 1355.76 195.175 1366.03 195.175C1371.88 195.175 1377.27 193.875 1382.21 191.275C1387.28 188.545 1391.31 184.84 1394.3 180.16L1400.54 186.205C1396.77 191.925 1391.96 196.345 1386.11 199.465C1380.26 202.455 1373.57 203.95 1366.03 203.95Z", fill: color }),
302
+ h("path", { d: "M1446.55 203.95C1436.93 203.95 1429.13 201.285 1423.15 195.955C1417.17 190.495 1414.18 183.41 1414.18 174.7C1414.18 165.08 1417.62 157.605 1424.51 152.275C1431.53 146.945 1441.35 144.28 1453.96 144.28H1477.75V138.43C1477.75 129.72 1475.47 123.09 1470.92 118.54C1466.5 113.86 1460.07 111.52 1451.62 111.52C1445.9 111.52 1440.63 112.885 1435.82 115.615C1431.01 118.345 1427.11 122.18 1424.12 127.12L1417.88 120.295C1421.52 114.575 1426.27 110.22 1432.12 107.23C1438.1 104.11 1444.86 102.55 1452.4 102.55C1463.58 102.55 1472.29 105.605 1478.53 111.715C1484.9 117.695 1488.08 126.015 1488.08 136.675V184.255C1488.08 188.805 1488.86 194.72 1490.42 202H1481.45C1480.28 199.14 1479.44 194.07 1478.92 186.79H1478.53C1474.76 192.25 1470.14 196.475 1464.68 199.465C1459.22 202.455 1453.18 203.95 1446.55 203.95ZM1446.55 195.175C1452.01 195.175 1457.14 194.07 1461.95 191.86C1466.76 189.52 1470.6 186.465 1473.46 182.695C1476.32 178.795 1477.75 174.7 1477.75 170.41V152.665H1453.37C1444.27 152.665 1437.12 154.615 1431.92 158.515C1426.85 162.415 1424.32 167.81 1424.32 174.7C1424.32 180.68 1426.4 185.62 1430.56 189.52C1434.72 193.29 1440.05 195.175 1446.55 195.175Z", fill: color }),
303
+ h("path", { d: "M1547.14 203.95C1539.08 203.95 1532.97 201.48 1528.81 196.54C1524.65 191.47 1522.57 184.19 1522.57 174.7V113.275H1505.02V104.5H1522.57V77.9801L1532.32 74.6651H1533.1V104.5H1560.59V113.275H1533.1V172.555C1533.1 180.355 1534.33 186.01 1536.8 189.52C1539.27 193.03 1543.17 194.785 1548.5 194.785C1553.83 194.785 1558.06 194.005 1561.18 192.445L1562.35 200.83C1558.19 202.91 1553.12 203.95 1547.14 203.95Z", fill: color }),
304
+ h("path", { d: "M1661.53 157.54H1589.77C1590.42 169.37 1593.54 178.535 1599.13 185.035C1604.85 191.535 1612.65 194.785 1622.53 194.785C1628.51 194.785 1633.97 193.485 1638.91 190.885C1643.98 188.285 1647.95 184.645 1650.81 179.965L1657.24 186.4C1653.34 192.12 1648.4 196.475 1642.42 199.465C1636.57 202.455 1629.94 203.95 1622.53 203.95C1609.01 203.95 1598.35 199.465 1590.55 190.495C1582.88 181.525 1579.05 169.175 1579.05 153.445C1579.05 137.585 1582.82 125.17 1590.36 116.2C1597.9 107.1 1608.23 102.55 1621.36 102.55C1633.84 102.55 1643.66 106.84 1650.81 115.42C1657.96 124 1661.53 135.895 1661.53 151.105V157.54ZM1651.39 147.4C1651.39 136.48 1648.66 127.77 1643.2 121.27C1637.74 114.77 1630.46 111.52 1621.36 111.52C1611.74 111.52 1604.2 114.77 1598.74 121.27C1593.28 127.77 1590.29 137.065 1589.77 149.155H1651.39V147.4Z", fill: color })));
514
305
  }
515
306
 
516
307
  const debug = browser("sq:useBigStat");
@@ -1399,371 +1190,124 @@ function useBigStat(props) {
1399
1190
  flexReverse,
1400
1191
  alignment,
1401
1192
  loading: false,
1193
+ statTextColor: props.statTextColor,
1194
+ statFontSize: props.statFontSize,
1195
+ descriptionTextColor: props.descriptionTextColor,
1196
+ descriptionFontSize: props.descriptionFontSize,
1197
+ statFontWeight: props.statFontWeight,
1402
1198
  },
1403
- label: "BAD PROP TYPE",
1404
- };
1405
- }
1406
- const result = re.exec(statType);
1407
- const queryName = result[1];
1408
- const statPath = StatPaths.find((pattern) => pattern.name === queryName);
1409
- // Get a list all possible keys in path
1410
- const keys = [];
1411
- const regex = pathToRegexp(statPath === null || statPath === void 0 ? void 0 : statPath.route, keys, {
1412
- strict: false,
1413
- sensitive: false,
1414
- end: true,
1415
- });
1416
- const allQueryArgs = regex.exec(statType);
1417
- // Retrieve all key values in order including undefined
1418
- const queryArgs = keys.map((_, i) => allQueryArgs[i + 1] ? decodeURIComponent(allQueryArgs[i + 1]) : undefined);
1419
- // remove query name from list
1420
- queryArgs.shift();
1421
- const label = queries[queryName].label;
1422
- const stat = (userIdent === null || userIdent === void 0 ? void 0 : userIdent.jwt) && queries[queryName].query(programId, locale, ...queryArgs);
1423
- debug("stat:", stat);
1424
- return {
1425
- props: {
1426
- value: stat === null || stat === void 0 ? void 0 : stat.value,
1427
- statvalue: (_a = stat === null || stat === void 0 ? void 0 : stat.statvalue) !== null && _a !== void 0 ? _a : LOADING,
1428
- loading: stat === null || stat === void 0 ? void 0 : stat.loading,
1429
- flexReverse,
1430
- alignment,
1431
- },
1432
- label,
1433
- };
1434
- }
1435
-
1436
- function useDemoBigStat(props) {
1437
- const { statType } = props;
1438
- const re = useMemo(() => StatPatterns.find((re) => re.exec(statType)), [statType]);
1439
- // triggers a re-render if the label is manually changed
1440
- useChildElements();
1441
- if (!(re === null || re === void 0 ? void 0 : re.exec(statType))) {
1442
- return {
1443
- props: {
1444
- value: 0,
1445
- statvalue: "!!!",
1446
- loading: false,
1447
- flexReverse: false,
1448
- alignment: "center",
1449
- },
1450
- label: "BAD PROP TYPE",
1451
- };
1452
- }
1453
- const result = re.exec(statType);
1454
- const queryName = result[1];
1455
- const label = queries[queryName].label;
1456
- return {
1457
- props: cjs({
1458
- statvalue: "12345",
1459
- value: 0,
1460
- flexReverse: false,
1461
- alignment: "center",
1462
- }, props.demoData || {}, { arrayMerge: (_, a) => a }),
1463
- label: label !== null && label !== void 0 ? label : "Demo Label",
1464
- };
1465
- }
1466
-
1467
- function StatContainerView(props, children) {
1468
- const divideSpace = () => {
1469
- const spaceValue = getComputedStyle(document.documentElement).getPropertyValue(`--sl-spacing-${props.space}`);
1470
- return `${Math.floor(parseInt(spaceValue) / 2)}rem`;
1471
- };
1472
- // Dependent on props, not feasiable to move out
1473
- const style = {
1474
- StatContainer: {
1475
- width: "100%",
1476
- display: props.display || "grid",
1477
- "grid-template-columns": "repeat(auto-fill, minmax(130px, auto))",
1478
- gap: divideSpace(),
1479
- // First set of styles applies when shadow DOM is disabled, second set applies when shadow DOM is enabled
1480
- "& > *": {
1481
- "border-right": "1px solid #EAEAEA",
1482
- "padding-right": divideSpace(),
1483
- },
1484
- "& > :last-child": {
1485
- "border-right": "none",
1486
- },
1487
- "& > ::slotted(*)": {
1488
- "border-right": "1px solid #EAEAEA",
1489
- "padding-right": divideSpace(),
1490
- height: "100%",
1491
- },
1492
- "& > ::slotted(*:last-child)": {
1493
- "border-right": "none",
1494
- },
1495
- "@media screen and (max-width: 430px)": {
1496
- "& > ::slotted(*)": {
1497
- borderRight: "none",
1498
- },
1499
- },
1500
- },
1501
- StatFrame: {
1502
- display: "flex",
1503
- },
1504
- BorderFix: {
1505
- "border-right": "1px solid transparent",
1506
- width: "0px",
1507
- "margin-left": "-1px",
1508
- },
1509
- };
1510
- const sheet = createStyleSheet(style);
1511
- const styleString = sheet.toString();
1512
- return (h("div", { class: sheet.classes.StatFrame, part: "sqm-base" },
1513
- h("div", { class: sheet.classes.StatContainer, part: "sqm-inner-container" },
1514
- h("style", { type: "text/css" }, styleString),
1515
- children),
1516
- h("div", { class: sheet.classes.BorderFix, part: "sqm-border" })));
1517
- }
1518
-
1519
- function PortalChangePasswordView(props) {
1520
- const { states, callbacks } = props;
1521
- const style = {
1522
- Dialog: {
1523
- padding: "0",
1524
- "&::part(close-button)": {
1525
- "margin-top": "var(--sl-spacing-medium)",
1526
- },
1527
- "&::part(body)": {
1528
- padding: "0 var(--sl-spacing-x-large) var(--sl-spacing-x-large) var(--sl-spacing-x-large)",
1529
- },
1530
- },
1531
- Error: {
1532
- "&::part(erroralert-base)": {
1533
- "margin-bottom": "15px",
1534
- },
1535
- },
1536
- Success: {
1537
- "&::part(successalert-base)": {
1538
- "margin-bottom": "15px",
1539
- },
1540
- },
1541
- InputContainer: {
1542
- "& > :not(:last-child)": {
1543
- "margin-bottom": "var(--sl-spacing-x-large)",
1544
- },
1545
- },
1546
- CancelButton: {
1547
- width: "25%",
1548
- margin: "var(--sl-spacing-large) auto",
1549
- },
1550
- PasswordField: {
1551
- marginBottom: "var(--sl-spacing-large) !important",
1552
- display: "block",
1553
- },
1554
- ChangePasswordButton: {
1555
- paddingTop: "var(--sl-spacing-x-large)",
1556
- },
1557
- };
1558
- const sheet = createStyleSheet(style);
1559
- const styleString = sheet.toString();
1560
- return (h("div", null,
1561
- h("style", { type: "text/css" }, styleString),
1562
- h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, "onSl-hide": () => callbacks.setOpen(false) },
1563
- h(PortalSectionView, Object.assign({}, {
1564
- labelMargin: "x-large",
1565
- padding: "none",
1566
- label: (h(TextSpanView, Object.assign({}, { type: "h2" }), states.content.modalChangePasswordHeader)),
1567
- content: (h(PortalContainerView, Object.assign({}, { direction: "column", padding: "none", gap: "32px" }),
1568
- states.error && (h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
1569
- h("div", { part: "erroralert-text" }, states.error))),
1570
- states.success && (h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
1571
- h("div", { part: "successalert-text" }, states.content.successMessage))),
1572
- h("sl-form", { "onSl-submit": callbacks.submit },
1573
- h("div", { class: sheet.classes.InputContainer },
1574
- h("sqm-password-field", { exportparts: "input-label: input-label", class: sheet.classes.PasswordField, fieldLabel: states.content.passwordFieldLabel, meetsRequirementsText: states.content.meetsRequirementsText, doesNotMeetRequirementsText: states.content.doesNotMeetRequirementsText, minErrorText: states.content.minErrorText, uppercaseErrorText: states.content.uppercaseErrorText, lowercaseErrorText: states.content.lowercaseErrorText, hasErrorText: states.content.hasErrorText }),
1575
- h("sl-input", { exportparts: "label: input-label, base: input-base", name: "/confirmPassword", label: states.content.confirmPasswordFieldLabel, required: true, togglePassword: true, disabled: states.loading, type: "password" })),
1576
- h(PortalContainerView, Object.assign({}, { direction: "row", padding: "none", gap: "20px" }),
1577
- h("sl-button", { class: sheet.classes.ChangePasswordButton, type: "primary", submit: true, loading: states.loading }, states.content.changePasswordButtonText),
1578
- h("sl-button", { class: sheet.classes.CancelButton, type: "text", onClick: () => callbacks.setOpen(false) }, states.content.cancelText))))),
1579
- }))),
1580
- h(PortalSectionView, Object.assign({}, {
1581
- labelMargin: "x-large",
1582
- padding: "xxx-large",
1583
- label: (h(TextSpanView, Object.assign({}, { type: "h2" }), states.content.portalChangePasswordHeader)),
1584
- content: (h("sl-button", { onClick: () => callbacks.setOpen(true) }, states.content.portalChangePasswordButtonText)),
1585
- }),
1586
- h("style", { type: "text/css" }, styleString))));
1587
- }
1588
-
1589
- const style$3 = {
1590
- Wrapper: { ...AuthWrapper, "max-width": "600px" },
1591
- Column: AuthColumn,
1592
- HostBlock: HostBlock,
1593
- ":host": {
1594
- margin: "0 auto",
1595
- width: "100%",
1596
- },
1597
- ButtonsContainer: AuthButtonsContainer,
1598
- ErrorStyle: ErrorStyles,
1599
- };
1600
- const vanillaStyle$1 = `
1601
- sqm-portal-register {
1602
- margin: 0 auto;
1603
- width: 100%;
1604
- display: block;
1605
- }
1606
-
1607
- :host{
1608
- display: block;
1609
- }
1610
-
1611
- :host([hidden]) {
1612
- display: none;
1613
- }
1614
- `;
1615
- const sheet$3 = createStyleSheet(style$3);
1616
- const styleString$3 = sheet$3.toString();
1617
- function PortalRegisterView(props) {
1618
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
1619
- const { states, refs, callbacks, content } = props;
1620
- if (states.error) {
1621
- window.scrollTo({ top: 0, left: 0, behavior: "smooth" });
1622
- }
1623
- return (h("div", { class: sheet$3.classes.Wrapper, part: "sqm-base" },
1624
- h("style", { type: "text/css" },
1625
- vanillaStyle$1,
1626
- styleString$3),
1627
- h(TextSpanView, { type: "h3" }, content.pageLabel),
1628
- h("sl-form", { class: sheet$3.classes.Column, "onSl-submit": callbacks.submit, ref: (el) => (refs.formRef.current = el), novalidate: true },
1629
- states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
1630
- h("div", { part: "erroralert-text" }, props.states.error))),
1631
- content.formData,
1632
- !states.hideInputs && (h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true, validationError: ({ value }) => {
1633
- if (!value) {
1634
- return content.requiredFieldErrorMessage;
1635
- }
1636
- // this matches shoelace validation, but could be better
1637
- if (!value.includes("@")) {
1638
- return content.invalidEmailErrorMessage;
1639
- }
1640
- } }, (((_b = (_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors) === null || _b === void 0 ? void 0 : _b.email) ? {
1641
- class: sheet$3.classes.ErrorStyle,
1642
- helpText: ((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.validationErrors) === null || _d === void 0 ? void 0 : _d.email) ||
1643
- content.requiredFieldErrorMessage,
1644
- }
1645
- : [])))),
1646
- !states.hideInputs && (h("sqm-password-field", { fieldLabel: content.passwordLabel, "disable-validation": states.disablePasswordValidation, meetsRequirementsText: content.meetsRequirementsText, doesNotMeetRequirementsText: content.doesNotMeetRequirementsText, minErrorText: content.minErrorText, uppercaseErrorText: content.uppercaseErrorText, lowercaseErrorText: content.lowercaseErrorText, hasErrorText: content.hasErrorText })),
1647
- content.passwordField,
1648
- !states.hideInputs && states.confirmPassword && (h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", type: "password", name: "/confirmPassword", label: content.confirmPasswordLabel, disabled: states.loading || ((_e = states.registrationFormState) === null || _e === void 0 ? void 0 : _e.disabled), required: true }, (((_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g.confirmPassword) ? {
1649
- value: (_j = (_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.initialData) === null || _j === void 0 ? void 0 : _j.confirmPassword,
1650
- }
1651
- : {}), (((_l = (_k = states.registrationFormState) === null || _k === void 0 ? void 0 : _k.validationErrors) === null || _l === void 0 ? void 0 : _l.confirmPassword) ? {
1652
- class: sheet$3.classes.ErrorStyle,
1653
- helpText: ((_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.validationErrors) === null || _o === void 0 ? void 0 : _o.confirmPassword) || content.requiredFieldErrorMessage,
1654
- }
1655
- : [])))),
1656
- content.terms,
1657
- h("div", { class: sheet$3.classes.ButtonsContainer },
1658
- h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
1659
- content.secondaryButton))));
1660
- }
1661
-
1662
- const style$4 = {
1663
- ErrorStyle: {
1664
- "&::part(control)": {
1665
- background: "var(--sl-color-danger-10)",
1666
- borderColor: "var(--sl-color-danger-500)",
1667
- outline: "var(--sl-color-danger-500)",
1668
- },
1669
- "&:host": {
1670
- "--focus-ring": "0 0 0 var(--sl-focus-ring-width) red !important",
1199
+ label: "BAD PROP TYPE",
1200
+ };
1201
+ }
1202
+ const result = re.exec(statType);
1203
+ const queryName = result[1];
1204
+ const statPath = StatPaths.find((pattern) => pattern.name === queryName);
1205
+ // Get a list all possible keys in path
1206
+ const keys = [];
1207
+ const regex = pathToRegexp(statPath === null || statPath === void 0 ? void 0 : statPath.route, keys, {
1208
+ strict: false,
1209
+ sensitive: false,
1210
+ end: true,
1211
+ });
1212
+ const allQueryArgs = regex.exec(statType);
1213
+ // Retrieve all key values in order including undefined
1214
+ const queryArgs = keys.map((_, i) => allQueryArgs[i + 1] ? decodeURIComponent(allQueryArgs[i + 1]) : undefined);
1215
+ // remove query name from list
1216
+ queryArgs.shift();
1217
+ const label = queries[queryName].label;
1218
+ const stat = (userIdent === null || userIdent === void 0 ? void 0 : userIdent.jwt) && queries[queryName].query(programId, locale, ...queryArgs);
1219
+ debug("stat:", stat);
1220
+ return {
1221
+ props: {
1222
+ value: stat === null || stat === void 0 ? void 0 : stat.value,
1223
+ statvalue: (_a = stat === null || stat === void 0 ? void 0 : stat.statvalue) !== null && _a !== void 0 ? _a : LOADING,
1224
+ loading: stat === null || stat === void 0 ? void 0 : stat.loading,
1225
+ flexReverse,
1226
+ alignment,
1227
+ statTextColor: props.statTextColor,
1228
+ statFontSize: props.statFontSize,
1229
+ descriptionTextColor: props.descriptionTextColor,
1230
+ descriptionFontSize: props.descriptionFontSize,
1231
+ statFontWeight: props.statFontWeight,
1671
1232
  },
1672
- },
1673
- ErrorMessageStyle: {
1674
- margin: 0,
1675
- marginTop: "5px",
1676
- color: "var(--sl-color-danger-500)",
1677
- fontSize: "var(--sl-input-help-text-font-size-medium)",
1678
- fontFamily: "var(--sl-font-sans)",
1679
- fontWeight: "var(--sl-font-weight-normal)",
1680
- },
1681
- FieldContainer: {
1682
- "margin-bottom": "var(--sl-spacing-large)",
1683
- },
1684
- };
1685
- const vanillaStyle$2 = `
1686
- :host {
1687
- margin: 0 auto;
1688
- width: 100%;
1689
- display: block;
1690
- }
1691
- sl-checkbox::part(label){
1692
- font-size: var(--sl-input-label-font-size-small);
1693
- font-weight: var(--sl-font-weight-normal);
1694
- line-height: 20px;
1695
- }
1696
- sl-checkbox::part(base){
1697
- align-items: start;
1233
+ label,
1234
+ };
1698
1235
  }
1699
- `;
1700
- jss.setup(create());
1701
- const sheet$4 = jss.createStyleSheet(style$4);
1702
- const styleString$4 = sheet$4.toString();
1703
- function CheckboxFieldView(props) {
1704
- var _b, _c;
1705
- const { states, content, callbacks } = props;
1706
- return (h("div", { class: sheet$4.classes.FieldContainer, part: "sqm-base" },
1707
- h("style", { type: "text/css" },
1708
- vanillaStyle$2,
1709
- styleString$4),
1710
- h("sl-checkbox", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.checkboxName}`, checked: states.checked, "onSl-change": (e) => {
1711
- e.target.value = e.target.checked;
1712
- callbacks.setChecked(e.target.value);
1713
- } }, (!content.checkboxOptional ? { required: false } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled), required: false }), intl.formatMessage({
1714
- id: content.checkboxName + "-message",
1715
- defaultMessage: content.checkboxLabel,
1716
- }, {
1717
- labelLink: (h("a", { href: content.checkboxLabelLink, target: "_blank" }, content.checkboxLabelLinkText || content.checkboxLabelLink)),
1718
- }))));
1236
+
1237
+ function useDemoBigStat(props) {
1238
+ const { statType } = props;
1239
+ const re = useMemo(() => StatPatterns.find((re) => re.exec(statType)), [statType]);
1240
+ // triggers a re-render if the label is manually changed
1241
+ useChildElements();
1242
+ if (!(re === null || re === void 0 ? void 0 : re.exec(statType))) {
1243
+ return {
1244
+ props: {
1245
+ value: 0,
1246
+ statvalue: "!!!",
1247
+ loading: false,
1248
+ flexReverse: props.flexReverse,
1249
+ alignment: props.alignment,
1250
+ statTextColor: props.statTextColor,
1251
+ statFontSize: props.statFontSize,
1252
+ descriptionTextColor: props.descriptionTextColor,
1253
+ descriptionFontSize: props.descriptionFontSize,
1254
+ },
1255
+ label: "BAD PROP TYPE",
1256
+ };
1257
+ }
1258
+ const result = re.exec(statType);
1259
+ const queryName = result[1];
1260
+ const label = queries[queryName].label;
1261
+ return {
1262
+ props: cjs({
1263
+ statvalue: "12345",
1264
+ value: 0,
1265
+ flexReverse: props.flexReverse,
1266
+ alignment: props.alignment,
1267
+ statTextColor: props.statTextColor,
1268
+ statFontSize: props.statFontSize,
1269
+ descriptionTextColor: props.descriptionTextColor,
1270
+ descriptionFontSize: props.descriptionFontSize,
1271
+ statFontWeight: props.statFontWeight,
1272
+ }, props.demoData || {}, { arrayMerge: (_, a) => a }),
1273
+ label: label !== null && label !== void 0 ? label : "Demo Label",
1274
+ };
1719
1275
  }
1720
1276
 
1721
- function ChangeMarktingView(props) {
1722
- const { states, callbacks } = props;
1723
- const { text, formState } = states;
1724
- const { error } = formState;
1277
+ function CardFeedView(props, children) {
1278
+ // Dependent on props, not feasiable to move out
1725
1279
  const style = {
1726
1280
  Container: {
1727
- display: "flex",
1728
- flexDirection: "column",
1729
- gap: "var(--sl-spacing-x-small)",
1730
- padding: "0 var(--sl-spacing-xxx-large) var(--sl-spacing-xxx-large)",
1731
- },
1732
- SubmitButton: { marginBottom: "var(--sl-spacing-medium)" },
1733
- Error: {
1734
- "&::part(erroralert-base)": {
1735
- "margin-bottom": "15px",
1736
- },
1737
- },
1738
- Success: {
1739
- "&::part(successalert-base)": {
1740
- "margin-bottom": "15px",
1281
+ columnGap: props.gap + "px",
1282
+ columnWidth: props.width + "px",
1283
+ "& > div": {
1284
+ marginBottom: "24px",
1741
1285
  },
1742
1286
  },
1743
1287
  };
1744
1288
  const sheet = createStyleSheet(style);
1745
1289
  const styleString = sheet.toString();
1746
- return (h("div", { class: sheet.classes.Container, part: "sqm-base" },
1747
- h("style", { type: "text/css" }, styleString),
1748
- h(TextSpanView, Object.assign({}, { type: "h2" }), text.emailPreferencesHeader),
1749
- h("sl-form", { "onSl-submit": callbacks.onSubmit },
1750
- h(CheckboxFieldView, { states: {
1751
- checked: states.formState.marketingEmailOptIn,
1752
- }, content: {
1753
- checkboxLabel: text.marketingCheckboxLabel,
1754
- checkboxName: "marketingEmailOptIn",
1755
- }, callbacks: {
1756
- setChecked: callbacks.setChecked,
1757
- } }),
1758
- h("sl-button", { class: sheet.classes.SubmitButton, type: "primary", submit: true, loading: states.loading, disabled: states.submitDisabled }, text.submitChangeButtonText),
1759
- error && (h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
1760
- h("div", { part: "erroralert-text" }, error))),
1761
- states.success && (h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
1762
- h("div", { part: "successalert-text" }, states.text.successMessage))))));
1290
+ const vanillaStyle = `
1291
+ :host{
1292
+ display: block;
1293
+ }
1294
+
1295
+ `;
1296
+ return (h("div", null,
1297
+ h("style", { type: "text/css" },
1298
+ styleString,
1299
+ vanillaStyle),
1300
+ h("div", { class: sheet.classes.Container, part: "sqm-base" }, children)));
1763
1301
  }
1764
1302
 
1765
- const style$5 = {
1303
+ const style$1 = {
1766
1304
  Description: {
1305
+ "& .icon": {
1306
+ color: "var(--sqm-text)",
1307
+ "&:hover": {
1308
+ color: "var(--sqm-accent-color-icon)",
1309
+ },
1310
+ },
1767
1311
  "& input[type=checkbox]": {
1768
1312
  display: "none",
1769
1313
  },
@@ -1774,7 +1318,7 @@ const style$5 = {
1774
1318
  position: "absolute",
1775
1319
  top: "var(--sl-spacing-medium)",
1776
1320
  right: "var(--sl-spacing-medium)",
1777
- color: "var(--sl-color-neutral-700)",
1321
+ color: "var(--sqm-text)",
1778
1322
  fontSize: "var(--sl-font-size-large)",
1779
1323
  "& :hover": {
1780
1324
  color: "var(--sl-color-primary-700)",
@@ -1801,16 +1345,16 @@ const style$5 = {
1801
1345
  },
1802
1346
  },
1803
1347
  };
1804
- const sheet$5 = createStyleSheet(style$5);
1805
- const styleString$5 = sheet$5.toString();
1348
+ const sheet$1 = createStyleSheet(style$1);
1349
+ const styleString$1 = sheet$1.toString();
1806
1350
  function Details(props) {
1807
1351
  const rid = Math.random().toString(36).slice(2);
1808
1352
  return (h("div", { style: { opacity: props.opacity } },
1809
- h("style", { type: "text/css" }, styleString$5),
1810
- h("span", { class: sheet$5.classes.Description },
1353
+ h("style", { type: "text/css" }, styleString$1),
1354
+ h("span", { class: sheet$1.classes.Description },
1811
1355
  h("input", { type: "checkbox", id: "details-" + rid }),
1812
1356
  h("label", { class: "details", htmlFor: "details-" + rid },
1813
- h("sl-icon", { exportparts: "base: chevron-icon", name: "chevron-down" })),
1357
+ h("sl-icon", { class: "icon", exportparts: "base: chevron-icon", name: "chevron-down" })),
1814
1358
  h("span", { class: "summary", "progress-bar": props.progressBar }, props.content.description))));
1815
1359
  }
1816
1360
 
@@ -1829,7 +1373,7 @@ const GreyGift = () => {
1829
1373
  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: "#828282" })));
1830
1374
  };
1831
1375
 
1832
- const style$6 = {
1376
+ const style$2 = {
1833
1377
  ProgressBar: {
1834
1378
  "& .progress-bar": {
1835
1379
  height: "0",
@@ -1876,7 +1420,8 @@ const style$6 = {
1876
1420
  width: "100%",
1877
1421
  height: "4px",
1878
1422
  borderRadius: "4px",
1879
- backgroundColor: "var(--sl-color-primary-300)",
1423
+ backgroundColor: "var(--sqm-accent-color-icon)",
1424
+ background: "red",
1880
1425
  },
1881
1426
  "& .progress": {
1882
1427
  display: "block",
@@ -1889,7 +1434,7 @@ const style$6 = {
1889
1434
  width: "12px",
1890
1435
  height: "12px",
1891
1436
  display: "flex",
1892
- backgroundColor: "var(--sl-color-primary-300)",
1437
+ backgroundColor: "var(--sqm-accent-color-icon)",
1893
1438
  borderRadius: "50%",
1894
1439
  position: "relative",
1895
1440
  left: "47%",
@@ -1941,14 +1486,14 @@ const style$6 = {
1941
1486
  },
1942
1487
  },
1943
1488
  };
1944
- const sheet$6 = createStyleSheet(style$6, { classNamePrefix: "sqm-prog-bar" });
1945
- const styleString$6 = sheet$6.toString();
1489
+ const sheet$2 = createStyleSheet(style$2, { classNamePrefix: "sqm-prog-bar" });
1490
+ const styleString$2 = sheet$2.toString();
1946
1491
  function ProgressBarView(props) {
1947
1492
  const { progress = 0, goal = 1, steps = false, progressBarUnit = "", repeatable = false, complete = false, expired = false, finite = 0, opacity = "1", } = props;
1948
1493
  let aggregate = buildProgressBar(repeatable, steps, props);
1949
1494
  const { columns, items } = aggregate;
1950
- return (h("div", { class: sheet$6.classes.ProgressBar, "data-expired": expired, "data-complete": complete, "data-steps": steps, "data-done": goal <= progress, style: { opacity: opacity } },
1951
- h("style", { type: "text/css" }, styleString$6),
1495
+ return (h("div", { class: sheet$2.classes.ProgressBar, "data-expired": expired, "data-complete": complete, "data-steps": steps, "data-done": goal <= progress, style: { opacity: opacity } },
1496
+ h("style", { type: "text/css" }, styleString$2),
1952
1497
  h("div", { class: (!Boolean(finite) && progress >= 2 * goal) ||
1953
1498
  (Boolean(finite) && progress > 2 * goal)
1954
1499
  ? "progress-bar repeatable-steps"
@@ -2198,206 +1743,192 @@ function addStepsRepeatable({ progress, goal, finite, expired, }) {
2198
1743
  items.push(h("div", { class: "empty" }, i + goal * (repetitions - 1)));
2199
1744
  }
2200
1745
  }
2201
- else {
2202
- items.push(h("div", { class: "filled" }));
2203
- items.push(h("div", { class: "progress" }, i + goal * (repetitions - 1)));
2204
- }
2205
- }
2206
- }
2207
- return { items, columns: columns.join(" ") };
2208
- }
2209
- function addLinear({ progress, goal, progressBarUnit, expired, }) {
2210
- const items = [];
2211
- let columns = "";
2212
- const ratio = progress / goal;
2213
- columns =
2214
- clamp(ratio, 0, 1) + "fr 0fr " + clamp(1 - ratio, 0, 1) + "fr 0fr 0fr";
2215
- items.push(h("div", { class: "filled" }));
2216
- items.push(h("div", { class: clamp(progress, 0, goal) == goal ? "progress top bg" : "progress top" }, clamp(progress, 0, goal) == goal
2217
- ? ""
2218
- : progressBarUnit + clamp(progress, 0, goal)));
2219
- items.push(h("div", { class: "remain" }));
2220
- items.push(h("div", { class: "progress bg" }, progressBarUnit + goal));
2221
- items.push(h("div", { class: "gift" }, clamp(progress, 0, goal) == goal ? (expired ? (h(GreyGift, null)) : (h(Gift, null))) : (h(GreyGift, null))));
2222
- return { items, columns };
2223
- }
2224
- function clamp(x, min, max) {
2225
- return Math.min(Math.max(x, min), max);
2226
- }
2227
-
2228
- const checkmark_circle = () => {
2229
- return (h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
2230
- 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" })));
2231
- };
2232
- const checkmark_filled = () => {
2233
- return (h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
2234
- h("circle", { cx: "10", cy: "10", r: "10", fill: "currentColor" }),
2235
- 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" })));
2236
- };
2237
- const arrow_left_right = () => {
2238
- return (h("svg", { width: 11, height: 12, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
2239
- 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" })));
2240
- };
2241
-
2242
- const style$7 = {
2243
- TaskCard: {
2244
- display: "inline-block",
2245
- width: "100%",
2246
- "& .main": {
2247
- position: "relative",
2248
- boxSizing: "border-box",
2249
- background: "var(--sl-color-neutral-0)",
2250
- border: "1px solid var(--sl-color-neutral-200)",
2251
- borderRadius: "var(--sl-border-radius-large)",
2252
- boxShadow: "1px 2px 4px rgba(211, 211, 211, 0.2)",
2253
- fontSize: "var(--sl-font-size-small)",
2254
- lineHeight: "var(--sl-line-height-dense)",
2255
- color: "var(--sqm-text)",
2256
- },
2257
- "& .main.complete": {
2258
- background: "var(--sl-color-primary-50)",
2259
- borderColor: "var(--sl-color-primary-500)",
2260
- },
2261
- "& .main.expired": {
2262
- color: "var(--sqm-text)",
2263
- background: "var(--sl-color-neutral-50)",
2264
- },
2265
- "& .title": {
2266
- fontSize: "var(--sl-font-size-medium)",
2267
- color: "var(--sqm-text)",
2268
- },
2269
- "& .container": {
2270
- margin: "var(--sl-spacing-medium)",
2271
- },
2272
- "& .container.subdued": {
2273
- opacity: "0.45",
2274
- },
2275
- "& .container > div": {
2276
- margin: "var(--sl-spacing-medium) 0",
2277
- },
2278
- },
2279
- NotStarted: {
2280
- fontSize: "var(--sl-font-size-small)",
2281
- padding: "var(--sl-spacing-medium)",
2282
- color: "var(--sl-color-primary-600)",
2283
- border: "1px solid var(--sl-color-neutral-200)",
2284
- borderRadius: "var(--sl-border-radius-large) var(--sl-border-radius-large) 0 0",
2285
- borderBottom: "none",
2286
- background: "var(--sl-color-primary-50)",
2287
- fontWeight: "var(--sl-font-weight-semibold)",
2288
- lineHeight: "var(--sl-line-height-dense)",
2289
- "& .icon": {
2290
- position: "relative",
2291
- top: "0.1em",
2292
- marginRight: "var(--sl-spacing-small)",
2293
- color: "var(--sl-color-primary-500)",
2294
- },
2295
- },
2296
- Ended: {
2297
- fontSize: "var(--sl-font-size-small)",
2298
- padding: "var(--sl-spacing-medium)",
2299
- color: "var(--sl-color-warning-600)",
2300
- border: "1px solid var(--sl-color-neutral-200)",
2301
- borderRadius: "var(--sl-border-radius-large) var(--sl-border-radius-large) 0 0",
2302
- borderBottom: "none",
2303
- background: "var(--sl-color-warning-50)",
2304
- fontWeight: "var(--sl-font-weight-semibold)",
2305
- lineHeight: "var(--sl-line-height-dense)",
2306
- "& .icon": {
2307
- position: "relative",
2308
- top: "0.1em",
2309
- marginRight: "var(--sl-spacing-small)",
2310
- color: "var(--sl-color-warning-500)",
2311
- },
2312
- },
2313
- Header: {
2314
- display: "flex",
2315
- "& .icon": {
2316
- position: "relative",
2317
- top: "5%",
2318
- alignSelf: "center",
2319
- lineHeight: "0",
2320
- color: "var(--sl-color-primary-400)",
2321
- fontSize: "var(--sl-font-size-large)",
2322
- marginRight: "var(--sl-spacing-x-small)",
2323
- },
2324
- "& .value": {
2325
- alignSelf: "center",
2326
- fontSize: "var(--sl-font-size-x-large)",
2327
- fontWeight: "var(--sl-font-weight-semibold)",
2328
- color: "var(--sqm-text)",
2329
- lineHeight: "100%",
2330
- marginRight: "var(--sl-spacing-xx-small)",
2331
- },
2332
- "& .text": {
2333
- alignSelf: "end",
2334
- textTransform: "uppercase",
2335
- fontSize: "var(--sl-font-size-x-small)",
2336
- color: "var(--sqm-text)",
2337
- lineHeight: "var(--sl-font-size-medium)",
2338
- marginRight: "var(--sl-spacing-xx-small)",
1746
+ else {
1747
+ items.push(h("div", { class: "filled" }));
1748
+ items.push(h("div", { class: "progress" }, i + goal * (repetitions - 1)));
1749
+ }
1750
+ }
1751
+ }
1752
+ return { items, columns: columns.join(" ") };
1753
+ }
1754
+ function addLinear({ progress, goal, progressBarUnit, expired, }) {
1755
+ const items = [];
1756
+ let columns = "";
1757
+ const ratio = progress / goal;
1758
+ columns =
1759
+ clamp(ratio, 0, 1) + "fr 0fr " + clamp(1 - ratio, 0, 1) + "fr 0fr 0fr";
1760
+ items.push(h("div", { class: "filled" }));
1761
+ items.push(h("div", { class: clamp(progress, 0, goal) == goal ? "progress top bg" : "progress top" }, clamp(progress, 0, goal) == goal
1762
+ ? ""
1763
+ : progressBarUnit + clamp(progress, 0, goal)));
1764
+ items.push(h("div", { class: "remain" }));
1765
+ items.push(h("div", { class: "progress bg" }, progressBarUnit + goal));
1766
+ items.push(h("div", { class: "gift" }, clamp(progress, 0, goal) == goal ? (expired ? (h(GreyGift, null)) : (h(Gift, null))) : (h(GreyGift, null))));
1767
+ return { items, columns };
1768
+ }
1769
+ function clamp(x, min, max) {
1770
+ return Math.min(Math.max(x, min), max);
1771
+ }
1772
+
1773
+ const checkmark_circle = () => {
1774
+ return (h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1775
+ 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" })));
1776
+ };
1777
+ const checkmark_filled = () => {
1778
+ return (h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1779
+ h("circle", { cx: "10", cy: "10", r: "10", fill: "currentColor" }),
1780
+ 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" })));
1781
+ };
1782
+ const arrow_left_right = () => {
1783
+ return (h("svg", { width: 11, height: 12, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1784
+ 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" })));
1785
+ };
1786
+
1787
+ function TaskCardView(props) {
1788
+ var _a, _b;
1789
+ const { callbacks, states, content } = props;
1790
+ console.log("buttonType ", content.buttonType);
1791
+ const style = {
1792
+ TaskCard: {
1793
+ display: "inline-block",
1794
+ width: "100%",
1795
+ "& .main": {
1796
+ position: "relative",
1797
+ boxSizing: "border-sizing",
1798
+ background: content.backgroundColor || "var(--sl-color-neutral-0)",
1799
+ border: `1px solid ${content.borderColor || "var(--sl-color-neutral-200)"}`,
1800
+ borderRadius: "var(--sl-border-radius-large)",
1801
+ boxShadow: "1px 2px 4px rgba(211, 211, 211, 0.2)",
1802
+ fontSize: "var(--sl-font-size-small)",
1803
+ lineHeight: "var(--sl-line-height-dense)",
1804
+ color: content.textColor || "var(--sqm-text)",
1805
+ },
1806
+ "& .main.complete": {
1807
+ background: "var(--sl-color-primary-50)",
1808
+ borderColor: "var(--sqm-accent-color-border)",
1809
+ },
1810
+ "& .main.expired": {
1811
+ color: content.textColor || "var(--sqm-text)",
1812
+ background: content.backgroundColor || "var(--sl-color-neutral-50)",
1813
+ },
1814
+ "& .title": {
1815
+ fontSize: "var(--sl-font-size-medium)",
1816
+ color: content.textColor || "var(--sqm-text)",
1817
+ },
1818
+ "& .container": {
1819
+ margin: "var(--sl-spacing-medium)",
1820
+ },
1821
+ "& .container.subdued": {
1822
+ opacity: "0.45",
1823
+ },
1824
+ "& .container > div": {
1825
+ margin: "var(--sl-spacing-medium) 0",
1826
+ },
2339
1827
  },
2340
- "& .end": {
2341
- color: "var(--sl-color-warning-500)",
1828
+ NotStarted: {
1829
+ fontSize: "var(--sl-font-size-small)",
1830
+ padding: "var(--sl-spacing-medium)",
1831
+ color: content.textColor || "var(--sl-color-primary-600)",
1832
+ border: `1px solid ${content.borderColor || "var(--sl-color-neutral-200)"}`,
1833
+ borderRadius: "var(--sl-border-radius-large) var(--sl-border-radius-large) 0 0",
1834
+ borderBottom: "none",
1835
+ background: content.backgroundColor || "var(--sl-color-primary-50)",
2342
1836
  fontWeight: "var(--sl-font-weight-semibold)",
2343
- marginBottom: "var(--sl-spacing-xx-small)",
2344
- },
2345
- "& .neutral": {
2346
- color: "var(--sl-color-neutral-400)",
2347
- },
2348
- },
2349
- Footer: {
2350
- "&[data-subdue] .success": {
2351
- color: "var(--sl-color-primary-300)",
2352
- },
2353
- "&[data-subdue] .neutral": {
2354
- color: "var(--sqm-text)",
2355
- },
2356
- display: "flex",
2357
- "& .icon": {
2358
- fontSize: "var(--sl-font-size-xx-small)",
2359
- marginRight: "var(--sl-spacing-xx-small)",
2360
- verticalAlign: "middle",
2361
- },
2362
- "& .text": {
2363
- marginTop: "auto",
2364
- verticalAlign: "text-bottom",
2365
- fontSize: "var(--sl-font-size-x-small)",
2366
- color: "var(--sqm-text)",
1837
+ lineHeight: "var(--sl-line-height-dense)",
1838
+ "& .icon": {
1839
+ position: "relative",
1840
+ top: "0.1em",
1841
+ marginRight: "var(--sl-spacing-small)",
1842
+ color: content.textColor || "var(--sqm-text)",
1843
+ },
2367
1844
  },
2368
- "& .success": {
2369
- color: "var(--sl-color-primary-500)",
1845
+ Ended: {
1846
+ fontSize: "var(--sl-font-size-small)",
1847
+ padding: "var(--sl-spacing-medium)",
1848
+ color: content.textColor || "var(--sl-color-warning-600)",
1849
+ border: `1px solid ${content.borderColor || "var(--sl-color-neutral-200)"}`,
1850
+ borderRadius: "var(--sl-border-radius-large) var(--sl-border-radius-large) 0 0",
1851
+ borderBottom: "none",
1852
+ background: content.backgroundColor || "var(--sl-color-warning-50)",
2370
1853
  fontWeight: "var(--sl-font-weight-semibold)",
1854
+ lineHeight: "var(--sl-line-height-dense)",
1855
+ "& .icon": {
1856
+ position: "relative",
1857
+ top: "0.1em",
1858
+ marginRight: "var(--sl-spacing-small)",
1859
+ color: content.textColor || "var(--sqm-text)",
1860
+ },
2371
1861
  },
2372
- "& .action": {
2373
- marginTop: "auto",
2374
- marginLeft: "auto",
2375
- "&::part(base)": {
2376
- color: "var(--sqm-text)",
1862
+ Header: {
1863
+ display: "flex",
1864
+ "& .icon": {
1865
+ position: "relative",
1866
+ top: "5%",
1867
+ alignSelf: "center",
1868
+ lineHeight: "0",
1869
+ color: "var(--sqm-accent-color-icon)",
1870
+ fontSize: "var(--sl-font-size-large)",
1871
+ marginRight: "var(--sl-spacing-x-small)",
1872
+ },
1873
+ "& .value": {
1874
+ alignSelf: "center",
1875
+ fontSize: "var(--sl-font-size-x-large)",
1876
+ fontWeight: "var(--sl-font-weight-semibold)",
1877
+ color: content.textColor || "var(--sqm-text)",
1878
+ lineHeight: "100%",
1879
+ marginRight: "var(--sl-spacing-xx-small)",
1880
+ },
1881
+ "& .text": {
1882
+ alignSelf: "end",
1883
+ textTransform: "uppercase",
1884
+ fontSize: "var(--sl-font-size-x-small)",
1885
+ color: content.textColor || "var(--sqm-text)",
1886
+ lineHeight: "var(--sl-font-size-medium)",
1887
+ marginRight: "var(--sl-spacing-xx-small)",
2377
1888
  },
2378
- "&.disabled::part(base)": {
2379
- border: "1px solid var(--sl-color-primary-400)",
2380
- background: "var(--sl-color-primary-400)",
1889
+ "& .end": {
1890
+ color: content.textColor || "var(--sl-color-warning-500)",
1891
+ fontWeight: "var(--sl-font-weight-semibold)",
1892
+ marginBottom: "var(--sl-spacing-xx-small)",
2381
1893
  },
2382
- "&.neutral::part(base)": {
2383
- border: "1px solid var(--sqm-text)",
2384
- background: "var(--sqm-text)",
1894
+ "& .neutral": {
1895
+ color: content.textColor || "var(--sl-color-neutral-400)",
2385
1896
  },
2386
1897
  },
2387
- "& .neutral": {
2388
- color: "var(--sqm-text)",
2389
- },
2390
- "& .datetime": {
2391
- display: "block",
2392
- marginTop: "var(--sl-spacing-xx-small)",
1898
+ Footer: {
1899
+ "&[data-subdue] .success": {
1900
+ color: content.textColor || "var(--sl-color-primary-300)",
1901
+ },
1902
+ "&[data-subdue] .neutral": {
1903
+ color: content.textColor || "var(--sqm-text)",
1904
+ },
1905
+ display: "flex",
1906
+ "& .icon": {
1907
+ fontSize: "var(--sl-font-size-xx-small)",
1908
+ marginRight: "var(--sl-spacing-xx-small)",
1909
+ verticalAlign: "middle",
1910
+ },
1911
+ "& .text": {
1912
+ marginTop: "auto",
1913
+ verticalAlign: "text-bottom",
1914
+ fontSize: "var(--sl-font-size-x-small)",
1915
+ color: content.textColor || "var(--sqm-text)",
1916
+ },
1917
+ "& .success": {
1918
+ color: content.textColor || "var(--sqm-text)",
1919
+ fontWeight: "var(--sl-font-weight-semibold)",
1920
+ },
1921
+ "& .neutral": {
1922
+ color: content.textColor || "var(--sqm-text)",
1923
+ },
1924
+ "& .datetime": {
1925
+ display: "block",
1926
+ marginTop: "var(--sl-spacing-xx-small)",
1927
+ },
2393
1928
  },
2394
- },
2395
- };
2396
- const sheet$7 = createStyleSheet(style$7);
2397
- const styleString$7 = sheet$7.toString();
2398
- function TaskCardView(props) {
2399
- var _a, _b;
2400
- const { callbacks, states, content } = props;
1929
+ };
1930
+ const sheet = createStyleSheet(style);
1931
+ const contentString = sheet.toString();
2401
1932
  const dateStart = content.rewardDuration &&
2402
1933
  luxon.DateTime.fromISO(content.rewardDuration.split("/")[0]);
2403
1934
  const dateEnd = content.rewardDuration &&
@@ -2430,11 +1961,11 @@ function TaskCardView(props) {
2430
1961
  }
2431
1962
 
2432
1963
  `;
2433
- return (h("div", { class: sheet$7.classes.TaskCard, part: "sqm-base" },
1964
+ return (h("div", { class: sheet.classes.TaskCard, part: "sqm-base" },
2434
1965
  h("style", { type: "text/css" },
2435
- styleString$7,
1966
+ contentString,
2436
1967
  vanillaStyle),
2437
- !states.loading && taskNotStarted && (h("div", { class: sheet$7.classes.NotStarted },
1968
+ !states.loading && taskNotStarted && (h("div", { class: sheet.classes.NotStarted },
2438
1969
  h("span", { class: "icon" },
2439
1970
  h("sl-icon", { name: "info-circle-fill" })),
2440
1971
  intl.formatMessage({
@@ -2445,7 +1976,7 @@ function TaskCardView(props) {
2445
1976
  .setLocale(luxonLocale(states.locale))
2446
1977
  .toLocaleString(luxon.DateTime.DATETIME_MED),
2447
1978
  }))),
2448
- !states.loading && taskEnded && (h("div", { class: sheet$7.classes.Ended },
1979
+ !states.loading && taskEnded && (h("div", { class: sheet.classes.Ended },
2449
1980
  h("span", { class: "icon" },
2450
1981
  h("sl-icon", { exportparts: "base: task-card-icon", name: "exclamation-triangle-fill" })),
2451
1982
  intl.formatMessage({
@@ -2465,7 +1996,7 @@ function TaskCardView(props) {
2465
1996
  ? "main complete"
2466
1997
  : "main" },
2467
1998
  h("div", { class: "container", part: "sqm-card-container", "data-subdue": taskComplete || taskUnavailable },
2468
- h("div", { class: sheet$7.classes.Header, style: { opacity: taskComplete || taskUnavailable ? "0.45" : "1" } }, states.loading ? (h("sl-skeleton", { style: { width: "22%", margin: "0" } })) : (h("div", null,
1999
+ h("div", { class: sheet.classes.Header, style: { opacity: taskComplete || taskUnavailable ? "0.45" : "1" } }, states.loading ? (h("sl-skeleton", { style: { width: "22%", margin: "0" } })) : (h("div", null,
2469
2000
  showComplete && (h("span", { class: taskUnavailable ? "icon neutral" : "icon" }, taskComplete ? checkmark_filled$1 : checkmark_circle$1)),
2470
2001
  h("span", { part: "sqm-value", class: "value" }, content.rewardAmount),
2471
2002
  h("span", { part: "sqm-unit", class: "text" }, content.rewardUnit)))),
@@ -2480,8 +2011,8 @@ function TaskCardView(props) {
2480
2011
  opacity: taskComplete || taskUnavailable ? "0.45" : "1",
2481
2012
  } }, content.cardTitle)),
2482
2013
  states.loading ? (h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.description && (h(Details, Object.assign({}, props, { opacity: taskComplete || taskUnavailable ? "0.45" : "1" })))),
2483
- content.showProgressBar && states.loading ? (h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.showProgressBar && (h(ProgressBarView, Object.assign({}, props.content, props.states, { opacity: taskComplete || taskUnavailable ? "0.45" : "1", complete: taskComplete, expired: taskUnavailable })))),
2484
- h("div", { class: sheet$7.classes.Footer, "data-subdue": taskComplete || taskUnavailable }, states.loading ? (h("sl-skeleton", { style: { width: "25%", marginLeft: "auto" } })) : (h("div", { style: { display: "contents" } },
2014
+ content.showProgressBar && states.loading ? (h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.showProgressBar && (h(ProgressBarView, Object.assign({}, props.content, props.states, { opacity: taskComplete || taskUnavailable ? "0.75" : "1", complete: taskComplete, expired: taskUnavailable })))),
2015
+ h("div", { class: sheet.classes.Footer, "data-subdue": taskComplete || taskUnavailable }, states.loading ? (h("sl-skeleton", { style: { width: "25%", marginLeft: "auto" } })) : (h("div", { style: { display: "contents" } },
2485
2016
  h("span", { class: "text" },
2486
2017
  content.repeatable && (h("div", null,
2487
2018
  h("span", { class: repetitions > 0
@@ -2510,118 +2041,407 @@ function TaskCardView(props) {
2510
2041
  .setLocale(luxonLocale(states.locale))
2511
2042
  .toLocaleString(luxon.DateTime.DATETIME_MED),
2512
2043
  })))),
2513
- content.hideButton ? ("") : (h("sl-button", { exportparts: "base: button", id: "sl-button", class: taskUnavailable
2514
- ? "action neutral"
2515
- : taskComplete
2516
- ? "action disabled"
2517
- : "action", type: "primary", size: "small", onClick: callbacks.onClick, loading: states.loadingEvent, disabled: taskComplete || taskUnavailable, style: {
2044
+ content.hideButton ? ("") : (h("sl-button", { exportparts: `base: ${content.buttonType || "primary"}button-base`, type: "primary", id: "sl-button", size: "small", onClick: callbacks.onClick, loading: states.loadingEvent, disabled: taskComplete || taskUnavailable, style: {
2518
2045
  opacity: taskComplete || taskUnavailable ? "0.45" : "1",
2519
2046
  } }, content.buttonText)))))))));
2520
2047
  }
2521
2048
 
2522
- function PoweredByImg({ color = "#A6A6A6", width = 120, height = 16, }) {
2523
- return (h("svg", { width: width, height: height, viewBox: "0 0 1662 254", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
2524
- h("path", { d: "M801.082 253.58L869.382 1.67969", stroke: color, "stroke-width": "3" }),
2525
- h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M125.682 42.48C123.882 42.48 121.982 42.78 120.382 43.48C118.682 44.18 117.182 45.18 115.882 46.48C114.582 47.68 113.582 49.28 112.882 50.98C112.182 52.68 111.882 54.48 111.982 56.28C112.282 59.68 113.882 63.08 116.382 65.38C118.982 67.78 122.382 68.98 125.782 68.98C129.282 68.98 132.682 67.58 135.182 65.38C137.782 62.98 139.382 59.78 139.582 56.28C139.582 54.38 139.282 52.68 138.682 50.98C137.982 49.28 136.982 47.78 135.682 46.48C134.382 45.18 132.882 44.18 131.182 43.48C129.282 42.78 127.582 42.48 125.682 42.48Z", fill: color }),
2526
- h("path", { d: "M135.882 89.2798H115.582V187.58H135.882V89.2798Z", fill: color }),
2527
- h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M231.481 104.18C238.781 93.4799 251.181 87.3799 266.281 87.3799C290.981 87.3799 307.581 103.28 307.381 127.08V187.48H286.781V132.38C286.781 116.38 278.281 107.18 263.381 107.18C248.481 107.18 237.981 117.68 237.981 132.68V187.48H217.281V132.38C217.281 116.38 208.781 107.18 193.881 107.18C178.981 107.18 168.481 117.68 168.481 132.68V187.48H147.981V89.3799H168.681V97.8799C178.081 88.8799 190.181 87.4799 197.081 87.4799C211.881 87.4799 224.381 93.5799 231.481 104.18Z", fill: color }),
2528
- h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M370.781 87.48C358.581 87.48 347.981 91.38 339.981 98.38V89.28H319.481V226.08H339.981V177.78C347.881 185.08 358.581 188.78 370.781 188.78C398.781 188.78 419.881 166.88 419.881 138.08C419.981 109.28 398.781 87.48 370.781 87.48ZM368.881 169.58C351.481 169.58 338.881 156.38 338.881 138.28C338.881 120.38 351.381 106.98 368.881 106.98C386.281 106.98 398.881 120.08 398.881 138.28C398.881 156.48 386.381 169.58 368.881 169.58Z", fill: color }),
2529
- h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M701.782 169.88C707.682 169.88 714.082 167.58 719.582 163.98L721.482 162.88L731.482 178.68L729.782 179.88C721.282 186.28 710.982 189.58 700.382 189.58C678.082 189.58 665.782 176.38 665.782 152.28V108.68H645.682V89.3799H665.782V59.8799H686.482V89.2798H725.682V108.48H686.482V151.88C686.482 163.38 691.982 169.88 701.782 169.88Z", fill: color }),
2530
- h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M551.282 239.88C549.982 239.88 548.782 240.28 547.682 240.88C546.682 241.58 545.782 242.58 545.382 243.68C544.882 244.78 544.782 246.08 545.082 247.28C545.282 248.58 545.882 249.68 546.882 250.48C547.782 251.38 548.882 251.98 550.082 252.28C551.382 252.48 552.582 252.38 553.782 251.98C554.882 251.48 555.982 250.78 556.582 249.68C557.282 248.68 557.582 247.38 557.582 246.18C557.582 244.48 556.982 242.88 555.682 241.68C554.482 240.48 552.882 239.88 551.282 239.88Z", fill: color }),
2531
- h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M586.182 210.78C592.282 210.78 597.582 213.08 601.082 217.18L601.482 217.68L596.282 223.08L595.782 222.58C594.482 221.18 593.082 220.18 591.382 219.48C589.682 218.78 587.882 218.38 586.082 218.48C578.882 218.48 573.682 224.08 573.682 231.58C573.682 239.18 578.882 244.78 586.082 244.78C589.782 244.68 593.282 243.18 595.882 240.58L596.382 240.08L601.382 245.68L600.982 246.08C597.182 250.18 591.982 252.18 586.082 252.18C574.082 252.18 565.382 243.58 565.382 231.58C565.582 219.48 574.182 210.78 586.182 210.78Z", fill: color }),
2532
- h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M633.782 210.78C621.682 210.78 612.582 219.68 612.582 231.38C612.582 243.08 621.682 251.98 633.782 251.98C645.882 251.98 654.882 243.08 654.882 231.38C655.082 219.78 645.982 210.78 633.782 210.78ZM633.782 244.78C626.382 244.78 620.782 239.28 620.782 231.58C620.782 223.88 626.182 218.48 633.782 218.48C641.182 218.48 646.782 224.08 646.782 231.58C646.782 238.98 641.382 244.78 633.782 244.78Z", fill: color }),
2533
- h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M723.982 228.78C723.982 222.18 720.382 218.28 714.082 218.28C707.682 218.28 703.382 222.78 702.982 228.98V252.18H695.082V228.68C695.082 222.08 691.482 218.18 685.182 218.18C680.082 218.18 674.482 221.48 674.482 228.88V252.08H666.582V211.38H674.482V214.78L676.682 213.28C679.582 211.38 683.082 210.48 686.582 210.48C692.082 210.48 696.782 212.48 699.882 216.08L700.882 217.28L701.882 216.08C704.782 212.48 709.582 210.48 715.182 210.48C725.082 210.48 731.982 217.08 731.982 226.38V251.88H724.082V228.68H723.982V228.78Z", fill: color }),
2534
- h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M511.681 89.4797V98.7797C503.681 91.4797 493.181 87.6797 480.981 87.6797C452.981 87.6797 431.981 109.68 431.981 138.68C431.981 167.78 453.081 189.68 480.981 189.68C493.181 189.68 503.681 185.78 511.681 178.38V187.68H532.381V89.4797H511.681ZM482.881 169.88C465.481 169.88 452.781 156.58 452.781 138.48C452.781 120.48 465.281 106.98 482.881 106.98C500.481 106.98 512.781 120.08 512.781 138.48C512.781 156.68 500.181 169.88 482.881 169.88Z", fill: color }),
2535
- h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M595.281 107.08C604.181 107.08 611.781 110.38 618.781 116.98L620.481 118.68L633.981 104.58L632.581 102.98C623.781 92.98 610.781 87.48 595.781 87.48C565.981 87.48 544.481 109.08 544.481 138.48C544.481 167.98 565.981 189.48 595.781 189.48C610.481 189.48 623.681 183.98 632.581 174.08L633.981 172.58L620.981 158.18L619.281 159.88C612.481 166.48 603.981 169.98 595.481 169.98C578.381 169.98 565.681 156.68 565.681 138.58C565.581 120.58 577.881 107.08 595.281 107.08Z", fill: color }),
2536
- h("path", { d: "M135.882 89.2798H115.582V187.58H135.882V89.2798Z", fill: color }),
2537
- h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M231.481 104.18C238.781 93.4799 251.181 87.3799 266.281 87.3799C290.981 87.3799 307.581 103.28 307.381 127.08V187.48H286.781V132.38C286.781 116.38 278.281 107.18 263.381 107.18C248.481 107.18 237.981 117.68 237.981 132.68V187.48H217.281V132.38C217.281 116.38 208.781 107.18 193.881 107.18C178.981 107.18 168.481 117.68 168.481 132.68V187.48H147.981V89.3799H168.681V97.8799C178.081 88.8799 190.181 87.4799 197.081 87.4799C211.881 87.4799 224.381 93.5799 231.481 104.18Z", fill: color }),
2538
- h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M370.781 87.48C358.581 87.48 347.981 91.38 339.981 98.38V89.28H319.481V226.08H339.981V177.78C347.881 185.08 358.581 188.78 370.781 188.78C398.781 188.78 419.881 166.88 419.881 138.08C419.981 109.28 398.781 87.48 370.781 87.48ZM368.881 169.58C351.481 169.58 338.881 156.38 338.881 138.28C338.881 120.38 351.381 106.98 368.881 106.98C386.281 106.98 398.881 120.08 398.881 138.28C398.881 156.48 386.381 169.58 368.881 169.58Z", fill: color }),
2539
- h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M701.782 169.88C707.682 169.88 714.082 167.58 719.582 163.98L721.482 162.88L731.482 178.68L729.782 179.88C721.282 186.28 710.982 189.58 700.382 189.58C678.082 189.58 665.782 176.38 665.782 152.28V108.68H645.682V89.3799H665.782V59.8799H686.482V89.2798H725.682V108.48H686.482V151.88C686.482 163.38 691.982 169.88 701.782 169.88Z", fill: color }),
2540
- h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M511.681 89.4797V98.7797C503.681 91.4797 493.181 87.6797 480.981 87.6797C452.981 87.6797 431.981 109.68 431.981 138.68C431.981 167.78 453.081 189.68 480.981 189.68C493.181 189.68 503.681 185.78 511.681 178.38V187.68H532.381V89.4797H511.681ZM482.881 169.88C465.481 169.88 452.781 156.58 452.781 138.48C452.781 120.48 465.281 106.98 482.881 106.98C500.481 106.98 512.781 120.08 512.781 138.48C512.781 156.68 500.181 169.88 482.881 169.88Z", fill: color }),
2541
- h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M595.281 107.08C604.181 107.08 611.781 110.38 618.781 116.98L620.481 118.68L633.981 104.58L632.581 102.98C623.781 92.98 610.781 87.48 595.781 87.48C565.981 87.48 544.481 109.08 544.481 138.48C544.481 167.98 565.981 189.48 595.781 189.48C610.481 189.48 623.681 183.98 632.581 174.08L633.981 172.58L620.981 158.18L619.281 159.88C612.481 166.48 603.981 169.98 595.481 169.98C578.381 169.98 565.681 156.68 565.681 138.58C565.581 120.58 577.881 107.08 595.281 107.08Z", fill: color }),
2542
- h("path", { d: "M34.6815 112.78C40.6815 112.78 46.5815 114.18 51.8815 116.68C57.2815 119.18 62.0815 122.78 65.9815 127.28C67.9815 122.68 69.0815 117.78 69.0815 112.88C69.0815 108.38 68.1815 103.88 66.4815 99.8799C64.6815 95.6799 62.1815 91.9799 58.9815 88.8799C55.7815 85.7799 51.9815 83.2799 47.7815 81.4799C43.5815 79.7799 39.0815 78.8799 34.5815 78.8799C30.0815 78.8799 25.5815 79.6799 21.3815 81.4799C17.1815 83.1799 13.3815 85.7799 10.1815 88.8799C6.98154 91.9799 4.48154 95.7799 2.68154 99.8799C0.881541 104.08 0.081543 108.38 0.081543 112.88C0.181543 117.88 1.18154 122.78 3.18154 127.28C7.08154 122.68 11.8815 119.18 17.1815 116.68C22.7815 113.98 28.7815 112.68 34.6815 112.78Z", fill: color }),
2543
- h("path", { d: "M69.1817 153.48C69.1817 146.68 67.1817 140.18 63.2817 134.48C59.4817 128.88 54.0817 124.48 47.7817 121.88C41.4817 119.28 34.4817 118.68 27.7817 119.88C21.0817 121.28 14.8817 124.48 10.0817 129.28C5.28166 134.08 1.88166 140.08 0.681661 146.78C-0.718339 153.48 0.0816607 160.18 2.68166 166.48C5.28166 172.78 9.68166 178.08 15.4817 181.78C21.0817 185.58 27.7817 187.48 34.6817 187.48C43.7817 187.38 52.5817 183.88 59.0817 177.38C65.6817 170.98 69.1817 162.58 69.1817 153.48Z", fill: color }),
2544
- h("path", { d: "M69.1817 34.9799C69.1817 28.1799 67.1817 21.6799 63.2817 15.9799C59.4817 10.3799 54.1817 5.9799 47.7817 3.3799C41.4817 0.779901 34.4817 0.1799 27.7817 1.3799C21.0817 2.7799 14.8817 5.97986 10.0817 10.7799C5.28166 15.5799 1.88166 21.5799 0.681661 28.2799C-0.718339 34.9799 0.0816607 41.6799 2.68166 47.9799C5.28166 54.2799 9.68166 59.5799 15.4817 63.2799C21.0817 67.0799 27.7817 68.9799 34.6817 68.9799C43.8817 68.9799 52.6817 65.3799 59.1817 58.9799C65.5817 52.6799 69.1817 43.8799 69.1817 34.9799Z", fill: color }),
2545
- h("path", { d: "M962.664 203.95C953.044 203.95 945.244 201.285 939.264 195.955C933.284 190.495 930.294 183.41 930.294 174.7C930.294 165.08 933.739 157.605 940.629 152.275C947.649 146.945 957.464 144.28 970.074 144.28H993.864V138.43C993.864 129.72 991.589 123.09 987.039 118.54C982.619 113.86 976.184 111.52 967.734 111.52C962.014 111.52 956.749 112.885 951.939 115.615C947.129 118.345 943.229 122.18 940.239 127.12L933.999 120.295C937.639 114.575 942.384 110.22 948.234 107.23C954.214 104.11 960.974 102.55 968.514 102.55C979.694 102.55 988.404 105.605 994.644 111.715C1001.01 117.695 1004.2 126.015 1004.2 136.675V184.255C1004.2 188.805 1004.98 194.72 1006.54 202H997.569C996.399 199.14 995.554 194.07 995.034 186.79H994.644C990.874 192.25 986.259 196.475 980.799 199.465C975.339 202.455 969.294 203.95 962.664 203.95ZM962.664 195.175C968.124 195.175 973.259 194.07 978.069 191.86C982.879 189.52 986.714 186.465 989.574 182.695C992.434 178.795 993.864 174.7 993.864 170.41V152.665H969.489C960.389 152.665 953.239 154.615 948.039 158.515C942.969 162.415 940.434 167.81 940.434 174.7C940.434 180.68 942.514 185.62 946.674 189.52C950.834 193.29 956.164 195.175 962.664 195.175Z", fill: color }),
2546
- h("path", { d: "M1067.55 203.95C1055.07 203.95 1045.25 199.27 1038.1 189.91C1030.95 180.55 1027.38 167.745 1027.38 151.495C1027.38 136.415 1031.02 124.52 1038.3 115.81C1045.71 106.97 1055.72 102.55 1068.33 102.55C1074.7 102.55 1080.55 104.045 1085.88 107.035C1091.21 110.025 1095.5 114.25 1098.75 119.71H1099.14V57.3101H1109.67V178.21C1109.67 189.13 1109.86 197.06 1110.25 202H1100.89C1100.63 197.84 1100.5 192.12 1100.5 184.84H1100.11C1097.12 190.69 1092.7 195.37 1086.85 198.88C1081 202.26 1074.57 203.95 1067.55 203.95ZM1068.13 195.175C1077.23 195.175 1084.64 192.185 1090.36 186.205C1096.21 180.225 1099.14 172.49 1099.14 163V146.815C1099.14 135.895 1096.41 127.25 1090.95 120.88C1085.49 114.38 1078.08 111.13 1068.72 111.13C1059.1 111.13 1051.49 114.77 1045.9 122.05C1040.44 129.2 1037.71 139.145 1037.71 151.885C1037.71 165.275 1040.44 175.87 1045.9 183.67C1051.36 191.34 1058.77 195.175 1068.13 195.175Z", fill: color }),
2547
- h("path", { d: "M1208.57 104.5L1172.3 202H1161.96L1125.5 104.5H1136.61L1167.03 189.715L1197.45 104.5H1208.57Z", fill: color }),
2548
- h("path", { d: "M1261.51 203.95C1252.54 203.95 1244.61 201.87 1237.72 197.71C1230.96 193.55 1225.7 187.635 1221.93 179.965C1218.29 172.295 1216.47 163.39 1216.47 153.25C1216.47 143.11 1218.29 134.205 1221.93 126.535C1225.7 118.865 1230.96 112.95 1237.72 108.79C1244.61 104.63 1252.54 102.55 1261.51 102.55C1270.48 102.55 1278.35 104.63 1285.11 108.79C1292 112.95 1297.33 118.865 1301.1 126.535C1304.87 134.205 1306.75 143.11 1306.75 153.25C1306.75 163.39 1304.87 172.295 1301.1 179.965C1297.33 187.635 1292 193.55 1285.11 197.71C1278.35 201.87 1270.48 203.95 1261.51 203.95ZM1261.51 195.37C1268.4 195.37 1274.45 193.615 1279.65 190.105C1284.98 186.595 1289.07 181.655 1291.93 175.285C1294.79 168.915 1296.22 161.57 1296.22 153.25C1296.22 144.93 1294.79 137.585 1291.93 131.215C1289.07 124.845 1284.98 119.905 1279.65 116.395C1274.45 112.885 1268.4 111.13 1261.51 111.13C1254.75 111.13 1248.71 112.885 1243.38 116.395C1238.18 119.905 1234.15 124.845 1231.29 131.215C1228.43 137.585 1227 144.93 1227 153.25C1227 161.57 1228.43 168.915 1231.29 175.285C1234.15 181.655 1238.18 186.595 1243.38 190.105C1248.71 193.615 1254.75 195.37 1261.51 195.37Z", fill: color }),
2549
- h("path", { d: "M1366.03 203.95C1352.25 203.95 1341.52 199.53 1333.85 190.69C1326.31 181.72 1322.54 169.24 1322.54 153.25C1322.54 137.39 1326.38 124.975 1334.05 116.005C1341.72 107.035 1352.38 102.55 1366.03 102.55C1373.57 102.55 1380.26 104.11 1386.11 107.23C1391.96 110.22 1396.77 114.575 1400.54 120.295L1394.3 126.34C1391.31 121.66 1387.28 118.02 1382.21 115.42C1377.27 112.69 1371.88 111.325 1366.03 111.325C1355.76 111.325 1347.63 115.03 1341.65 122.44C1335.8 129.85 1332.88 140.12 1332.88 153.25C1332.88 166.38 1335.8 176.65 1341.65 184.06C1347.63 191.47 1355.76 195.175 1366.03 195.175C1371.88 195.175 1377.27 193.875 1382.21 191.275C1387.28 188.545 1391.31 184.84 1394.3 180.16L1400.54 186.205C1396.77 191.925 1391.96 196.345 1386.11 199.465C1380.26 202.455 1373.57 203.95 1366.03 203.95Z", fill: color }),
2550
- h("path", { d: "M1446.55 203.95C1436.93 203.95 1429.13 201.285 1423.15 195.955C1417.17 190.495 1414.18 183.41 1414.18 174.7C1414.18 165.08 1417.62 157.605 1424.51 152.275C1431.53 146.945 1441.35 144.28 1453.96 144.28H1477.75V138.43C1477.75 129.72 1475.47 123.09 1470.92 118.54C1466.5 113.86 1460.07 111.52 1451.62 111.52C1445.9 111.52 1440.63 112.885 1435.82 115.615C1431.01 118.345 1427.11 122.18 1424.12 127.12L1417.88 120.295C1421.52 114.575 1426.27 110.22 1432.12 107.23C1438.1 104.11 1444.86 102.55 1452.4 102.55C1463.58 102.55 1472.29 105.605 1478.53 111.715C1484.9 117.695 1488.08 126.015 1488.08 136.675V184.255C1488.08 188.805 1488.86 194.72 1490.42 202H1481.45C1480.28 199.14 1479.44 194.07 1478.92 186.79H1478.53C1474.76 192.25 1470.14 196.475 1464.68 199.465C1459.22 202.455 1453.18 203.95 1446.55 203.95ZM1446.55 195.175C1452.01 195.175 1457.14 194.07 1461.95 191.86C1466.76 189.52 1470.6 186.465 1473.46 182.695C1476.32 178.795 1477.75 174.7 1477.75 170.41V152.665H1453.37C1444.27 152.665 1437.12 154.615 1431.92 158.515C1426.85 162.415 1424.32 167.81 1424.32 174.7C1424.32 180.68 1426.4 185.62 1430.56 189.52C1434.72 193.29 1440.05 195.175 1446.55 195.175Z", fill: color }),
2551
- h("path", { d: "M1547.14 203.95C1539.08 203.95 1532.97 201.48 1528.81 196.54C1524.65 191.47 1522.57 184.19 1522.57 174.7V113.275H1505.02V104.5H1522.57V77.9801L1532.32 74.6651H1533.1V104.5H1560.59V113.275H1533.1V172.555C1533.1 180.355 1534.33 186.01 1536.8 189.52C1539.27 193.03 1543.17 194.785 1548.5 194.785C1553.83 194.785 1558.06 194.005 1561.18 192.445L1562.35 200.83C1558.19 202.91 1553.12 203.95 1547.14 203.95Z", fill: color }),
2552
- h("path", { d: "M1661.53 157.54H1589.77C1590.42 169.37 1593.54 178.535 1599.13 185.035C1604.85 191.535 1612.65 194.785 1622.53 194.785C1628.51 194.785 1633.97 193.485 1638.91 190.885C1643.98 188.285 1647.95 184.645 1650.81 179.965L1657.24 186.4C1653.34 192.12 1648.4 196.475 1642.42 199.465C1636.57 202.455 1629.94 203.95 1622.53 203.95C1609.01 203.95 1598.35 199.465 1590.55 190.495C1582.88 181.525 1579.05 169.175 1579.05 153.445C1579.05 137.585 1582.82 125.17 1590.36 116.2C1597.9 107.1 1608.23 102.55 1621.36 102.55C1633.84 102.55 1643.66 106.84 1650.81 115.42C1657.96 124 1661.53 135.895 1661.53 151.105V157.54ZM1651.39 147.4C1651.39 136.48 1648.66 127.77 1643.2 121.27C1637.74 114.77 1630.46 111.52 1621.36 111.52C1611.74 111.52 1604.2 114.77 1598.74 121.27C1593.28 127.77 1590.29 137.065 1589.77 149.155H1651.39V147.4Z", fill: color })));
2049
+ const style$3 = {
2050
+ Wrapper: { ...AuthWrapper, "max-width": "600px" },
2051
+ Column: AuthColumn,
2052
+ HostBlock: HostBlock,
2053
+ ":host": {
2054
+ margin: "0 auto",
2055
+ width: "100%",
2056
+ },
2057
+ ButtonsContainer: AuthButtonsContainer,
2058
+ ErrorStyle: ErrorStyles,
2059
+ };
2060
+ const vanillaStyle = `
2061
+ sqm-portal-register {
2062
+ margin: 0 auto;
2063
+ width: 100%;
2064
+ display: block;
2065
+ }
2066
+
2067
+ :host{
2068
+ display: block;
2069
+ }
2070
+
2071
+ :host([hidden]) {
2072
+ display: none;
2073
+ }
2074
+ `;
2075
+ const sheet$3 = createStyleSheet(style$3);
2076
+ const styleString$3 = sheet$3.toString();
2077
+ function PortalRegisterView(props) {
2078
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
2079
+ const { states, refs, callbacks, content } = props;
2080
+ if (states.error) {
2081
+ window.scrollTo({ top: 0, left: 0, behavior: "smooth" });
2082
+ }
2083
+ return (h("div", { class: sheet$3.classes.Wrapper, part: "sqm-base" },
2084
+ h("style", { type: "text/css" },
2085
+ vanillaStyle,
2086
+ styleString$3),
2087
+ h(TextSpanView, { type: "h3" }, content.pageLabel),
2088
+ h("sl-form", { class: sheet$3.classes.Column, "onSl-submit": callbacks.submit, ref: (el) => (refs.formRef.current = el), novalidate: true },
2089
+ states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
2090
+ h("div", { part: "erroralert-text" }, props.states.error))),
2091
+ content.formData,
2092
+ !states.hideInputs && (h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true, validationError: ({ value }) => {
2093
+ if (!value) {
2094
+ return content.requiredFieldErrorMessage;
2095
+ }
2096
+ // this matches shoelace validation, but could be better
2097
+ if (!value.includes("@")) {
2098
+ return content.invalidEmailErrorMessage;
2099
+ }
2100
+ } }, (((_b = (_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors) === null || _b === void 0 ? void 0 : _b.email) ? {
2101
+ class: sheet$3.classes.ErrorStyle,
2102
+ helpText: ((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.validationErrors) === null || _d === void 0 ? void 0 : _d.email) ||
2103
+ content.requiredFieldErrorMessage,
2104
+ }
2105
+ : [])))),
2106
+ !states.hideInputs && (h("sqm-password-field", { fieldLabel: content.passwordLabel, "disable-validation": states.disablePasswordValidation, meetsRequirementsText: content.meetsRequirementsText, doesNotMeetRequirementsText: content.doesNotMeetRequirementsText, minErrorText: content.minErrorText, uppercaseErrorText: content.uppercaseErrorText, lowercaseErrorText: content.lowercaseErrorText, hasErrorText: content.hasErrorText })),
2107
+ content.passwordField,
2108
+ !states.hideInputs && states.confirmPassword && (h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", type: "password", name: "/confirmPassword", label: content.confirmPasswordLabel, disabled: states.loading || ((_e = states.registrationFormState) === null || _e === void 0 ? void 0 : _e.disabled), required: true }, (((_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g.confirmPassword) ? {
2109
+ value: (_j = (_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.initialData) === null || _j === void 0 ? void 0 : _j.confirmPassword,
2110
+ }
2111
+ : {}), (((_l = (_k = states.registrationFormState) === null || _k === void 0 ? void 0 : _k.validationErrors) === null || _l === void 0 ? void 0 : _l.confirmPassword) ? {
2112
+ class: sheet$3.classes.ErrorStyle,
2113
+ helpText: ((_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.validationErrors) === null || _o === void 0 ? void 0 : _o.confirmPassword) || content.requiredFieldErrorMessage,
2114
+ }
2115
+ : [])))),
2116
+ content.terms,
2117
+ h("div", { class: sheet$3.classes.ButtonsContainer },
2118
+ h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
2119
+ content.secondaryButton))));
2120
+ }
2121
+
2122
+ const style$4 = {
2123
+ ErrorStyle: {
2124
+ "&::part(control)": {
2125
+ background: "var(--sl-color-danger-10)",
2126
+ borderColor: "var(--sl-color-danger-500)",
2127
+ outline: "var(--sl-color-danger-500)",
2128
+ },
2129
+ "&:host": {
2130
+ "--focus-ring": "0 0 0 var(--sl-focus-ring-width) red !important",
2131
+ },
2132
+ },
2133
+ ErrorMessageStyle: {
2134
+ margin: 0,
2135
+ marginTop: "5px",
2136
+ color: "var(--sl-color-danger-500)",
2137
+ fontSize: "var(--sl-input-help-text-font-size-medium)",
2138
+ fontFamily: "var(--sl-font-sans)",
2139
+ fontWeight: "var(--sl-font-weight-normal)",
2140
+ },
2141
+ FieldContainer: {
2142
+ "margin-bottom": "var(--sl-spacing-large)",
2143
+ },
2144
+ };
2145
+ const vanillaStyle$1 = `
2146
+ :host {
2147
+ margin: 0 auto;
2148
+ width: 100%;
2149
+ display: block;
2150
+ }
2151
+ sl-checkbox::part(label){
2152
+ font-size: var(--sl-input-label-font-size-small);
2153
+ font-weight: var(--sl-font-weight-normal);
2154
+ line-height: 20px;
2155
+ }
2156
+ sl-checkbox::part(base){
2157
+ align-items: start;
2158
+ }
2159
+ `;
2160
+ jss.setup(create());
2161
+ const sheet$4 = jss.createStyleSheet(style$4);
2162
+ const styleString$4 = sheet$4.toString();
2163
+ function CheckboxFieldView(props) {
2164
+ var _b, _c;
2165
+ const { states, content, callbacks } = props;
2166
+ return (h("div", { class: sheet$4.classes.FieldContainer, part: "sqm-base" },
2167
+ h("style", { type: "text/css" },
2168
+ vanillaStyle$1,
2169
+ styleString$4),
2170
+ h("sl-checkbox", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.checkboxName}`, checked: states.checked, "onSl-change": (e) => {
2171
+ e.target.value = e.target.checked;
2172
+ callbacks.setChecked(e.target.value);
2173
+ } }, (!content.checkboxOptional ? { required: false } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled), required: false }), intl.formatMessage({
2174
+ id: content.checkboxName + "-message",
2175
+ defaultMessage: content.checkboxLabel,
2176
+ }, {
2177
+ labelLink: (h("a", { href: content.checkboxLabelLink, target: "_blank" }, content.checkboxLabelLinkText || content.checkboxLabelLink)),
2178
+ }))));
2553
2179
  }
2554
2180
 
2555
- const vanillaStyle$3 = `
2181
+ function CouponCodeView(props) {
2182
+ const error = !props.loading && props.error;
2183
+ const style = {
2184
+ HostBlock: HostBlock,
2185
+ couponCodeLabel: {
2186
+ margin: "var(--sl-spacing-x-small) 0",
2187
+ color: props.textColor || "var(--sqm-text-subdued)",
2188
+ fontSize: "var(--sl-font-size-small)",
2189
+ },
2190
+ };
2191
+ const vanillaStyle = `
2556
2192
  :host{
2557
- margin: 0 auto;
2193
+ display: block;
2558
2194
  width: 100%;
2559
2195
  }
2560
- a{
2561
- cursor:pointer;
2562
- color: inherit;
2563
- text-decoration: none;
2564
- }
2565
2196
  `;
2566
- function PortalFooterView(props) {
2197
+ const sheet = createStyleSheet(style);
2198
+ const styleString = sheet.toString();
2199
+ return (h("div", null,
2200
+ h("style", { type: "text/css" },
2201
+ styleString,
2202
+ vanillaStyle),
2203
+ h("p", { class: sheet.classes.couponCodeLabel, style: { textAlign: props.textAlign } }, props.couponCodeLabel),
2204
+ error ? (h("sqm-form-message", { type: props.errorType, exportparts: "erroralert-icon" },
2205
+ h("div", { part: "erroralert-text" }, props.errorText))) : (h(CopyTextView, Object.assign({}, props)))));
2206
+ }
2207
+
2208
+ const style$5 = {
2209
+ ErrorStyle: {
2210
+ "--sl-input-border-color": "var(--sl-color-danger-500)",
2211
+ "--sl-input-background-color": "var(--sl-color-danger-10)",
2212
+ "--sl-input-border-color-focus": "var(--sl-color-danger-500)",
2213
+ "--sl-input-border-color-hover": "var(--sl-color-danger-500)",
2214
+ },
2215
+ ErrorMessageStyle: {
2216
+ margin: 0,
2217
+ color: "var(--sl-color-danger-500)",
2218
+ fontSize: "var(--sl-input-help-text-font-size-medium)",
2219
+ },
2220
+ FieldContainer: {
2221
+ "margin-bottom": "var(--sl-spacing-large)",
2222
+ },
2223
+ };
2224
+ const vanillaStyle$2 = `
2225
+ :host {
2226
+ margin: 0 auto;
2227
+ width: 100%;
2228
+ display: block;
2229
+ }
2230
+ sl-select::part(label){
2231
+ font-size: var(--sl-input-label-font-size-small);
2232
+ font-weight: var(--sl-font-weight-semibold);
2233
+ }
2234
+ `;
2235
+ jss.setup(create());
2236
+ const sheet$5 = jss.createStyleSheet(style$5);
2237
+ const styleString$5 = sheet$5.toString();
2238
+ function DropdownFieldView(props) {
2239
+ var _a, _b, _c, _d, _e, _f, _g;
2240
+ const { states, content } = props;
2241
+ const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
2242
+ return (h("div", { class: sheet$5.classes.FieldContainer, part: "sqm-base" },
2243
+ h("style", { type: "text/css" },
2244
+ vanillaStyle$2,
2245
+ styleString$5),
2246
+ h("sl-select", Object.assign({ exportparts: "label: input-label, base: input-base", label: content.dropdownLabel, name: `/${content.dropdownName}` }, (!content.dropdownOptional ? { required: true } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e[content.dropdownName]) ? {
2247
+ value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.dropdownName],
2248
+ }
2249
+ : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) ? {
2250
+ class: sheet$5.classes.ErrorStyle,
2251
+ }
2252
+ : [])), content.selectOptions),
2253
+ (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) && (h("p", { class: sheet$5.classes.ErrorMessageStyle }, intl.formatMessage({
2254
+ id: `errorMessage-${content.dropdownName}`,
2255
+ defaultMessage: content.errorMessage,
2256
+ })))));
2257
+ }
2258
+
2259
+ const EditProfileView = (props) => {
2260
+ var _a, _b, _c, _d;
2261
+ const { states, callbacks } = props;
2262
+ const { text } = states;
2263
+ const { errors } = states.formState;
2264
+ if (states.showEdit) {
2265
+ return (h("div", { class: `CardWrapper ${!states.showEdit && "ShowEdit"}`, part: "sqm-base" },
2266
+ h("h2", { part: "sqm-header", style: {
2267
+ fontSize: "var(--sl-font-size-x-large)",
2268
+ margin: "0px",
2269
+ textAlign: "center",
2270
+ } }, text.editprofileheader),
2271
+ h("form", { class: "FormWrapper", onSubmit: callbacks.onSubmit },
2272
+ h("div", { class: "FormSection" },
2273
+ states.formState.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
2274
+ h("div", { part: "erroralert-text" }, states.formState.error))),
2275
+ h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: states.formState.firstName, onInput: callbacks.onChange, label: text.firstnametext, disabled: states.loading }, (errors.firstName && errors.firstName.status !== "valid"
2276
+ ? { class: "ErrorStyles", helpText: text.fieldEmptyText }
2277
+ : []), { id: "firstName", name: "firstName", error: errors.firstName && errors.firstName.status !== "valid"
2278
+ ? errors.firstName.message
2279
+ : undefined })),
2280
+ h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: states.formState.lastName, onInput: callbacks.onChange, label: text.lastnametext, disabled: states.loading, id: "lastName", name: "lastName" }, (errors.lastName && errors.lastName.status !== "valid"
2281
+ ? { class: "ErrorStyles", helpText: text.fieldEmptyText }
2282
+ : []), { error: errors.lastName && errors.lastName.status !== "valid"
2283
+ ? errors.lastName.message
2284
+ : undefined }))),
2285
+ text.showregion && states.formState.currentRegion && (h("sl-input", { exportparts: "label: input-label, base: input-base", disabled: true, value: states.formState.currentRegion, label: text.currentregiontext, id: "currentRegion", name: "currentRegion" })),
2286
+ h("div", { class: "ButtonWrapper" },
2287
+ h("sl-button", { type: "primary", loading: states.loading, disabled: states.submitDisabled, onClick: (e) => {
2288
+ callbacks.onSubmit(e);
2289
+ }, submit: true, exportparts: "base: primarybutton-base" }, text.updatetext),
2290
+ h("sl-button", { onClick: () => {
2291
+ callbacks.setShowEdit(false);
2292
+ }, exportparts: "base: secondarybutton-base" }, text.canceltext)))));
2293
+ }
2294
+ return (h("div", { class: `CardWrapper FormWrapper ${!states.showEdit && "ShowEdit"}`, part: "sqm-base" },
2295
+ h("div", { class: "FormSection" },
2296
+ h("h2", { part: "sqm-header", style: {
2297
+ fontSize: "var(--sl-font-size-x-large)",
2298
+ marginBottom: "0px",
2299
+ textAlign: "center",
2300
+ } }, text.editprofileheader),
2301
+ h("div", null,
2302
+ h("p", { style: { fontSize: "var(--sl-font-size-medium)" } }, (_a = states.user) === null || _a === void 0 ? void 0 :
2303
+ _a.firstName,
2304
+ " ", (_b = states.user) === null || _b === void 0 ? void 0 :
2305
+ _b.lastName),
2306
+ 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))),
2307
+ h("sl-button", { type: "primary", loading: states.loading, onClick: () => {
2308
+ callbacks.resetForm();
2309
+ callbacks.setShowEdit(true);
2310
+ }, exportparts: "base: primarybutton-base" }, text.editprofiletext)));
2311
+ };
2312
+
2313
+ function LeaderboardView(props) {
2314
+ var _a, _b, _c;
2315
+ const { states, data, elements } = props;
2316
+ const { styles } = states;
2567
2317
  const style = {
2568
- RowContainer: {
2569
- display: "flex",
2570
- "& > :not(:last-child)": {
2571
- "margin-right": "var(--sl-spacing-large)",
2318
+ Leaderboard: {
2319
+ "& table": {
2320
+ width: "100%",
2321
+ borderCollapse: "collapse",
2322
+ background: styles.background || "transparent",
2323
+ borderRadius: styles.borderRadius ? `${styles.borderRadius}px` : "0",
2572
2324
  },
2573
- },
2574
- Container: {
2575
- display: "flex",
2576
- "flex-direction": "column",
2577
- "align-items": "center",
2578
- "font-size": "var(--sl-font-size-small)",
2579
- color: "var(--sl-color-gray-600)",
2580
- "padding-top": `var(--sl-spacing-${props.paddingTop})`,
2581
- "padding-right": `var(--sl-spacing-${props.paddingRight})`,
2582
- "padding-bottom": `var(--sl-spacing-${props.paddingBottom})`,
2583
- "padding-left": `var(--sl-spacing-${props.paddingLeft})`,
2584
- "row-gap": `var(--sl-spacing-small)`,
2585
- "& a:hover": {
2586
- color: "var(--sl-color-gray-900)",
2325
+ "& th": {
2326
+ textAlign: "left",
2327
+ padding: "var(--sl-spacing-medium)",
2328
+ paddingTop: "0",
2329
+ fontSize: "var(--sl-font-size-medium)",
2330
+ fontWeight: "var(--sl-font-weight-semibold)",
2587
2331
  },
2588
- },
2589
- SupportText: {
2590
- textAlign: "center",
2591
- margin: 0,
2592
- },
2593
- PoweredByLink: {
2594
- color: "var(--sl-color-gray-400)",
2595
- "font-size": "var(--sl-font-size-small)",
2596
- display: "flex",
2597
- alignItems: "center",
2598
- svg: {
2599
- marginTop: "2px",
2600
- shapeRendering: "geometricprecision",
2332
+ "& tr:not(:first-child)": {
2333
+ borderTop: `1px solid ${styles.borderColor || "var(--sl-color-neutral-200)"}`,
2601
2334
  },
2602
- "&:hover, &:hover *": {
2603
- color: "var(--sl-color-gray-900)",
2335
+ "& td": {
2336
+ fontSize: "var(--sl-font-size-medium)",
2337
+ fontWeight: "var(--sl-font-weight-normal)",
2338
+ },
2339
+ "& .ellipses": {
2340
+ textAlign: "left",
2341
+ padding: "0",
2342
+ color: styles.textColor || "var(--sqm-text)",
2343
+ paddingLeft: "25%",
2344
+ },
2345
+ "& .highlight": {
2346
+ background: styles.viewingUserHighlightColor ||
2347
+ "var(--sqm-accent-color-background)",
2348
+ "& td, th": {
2349
+ color: styles.viewingUserHighlightTextColor || "var(--sqm-text)",
2350
+ },
2351
+ },
2352
+ "& td, th": {
2353
+ color: styles.textColor || "var(--sqm-text)",
2354
+ padding: "var(--sl-spacing-medium)",
2355
+ },
2356
+ "& .User": {
2357
+ width: "100%",
2358
+ },
2359
+ "& .Score": {
2360
+ width: "auto",
2361
+ whiteSpace: "nowrap",
2362
+ },
2363
+ "& .Rank": {
2364
+ whiteSpace: "nowrap",
2365
+ },
2366
+ "& .fullWidth": {
2367
+ width: "100%",
2604
2368
  },
2605
2369
  },
2606
2370
  };
2607
2371
  const sheet = createStyleSheet(style);
2608
2372
  const styleString = sheet.toString();
2609
- return (h("div", { class: sheet.classes.Container, part: "sqm-base" },
2373
+ const vanillaStyle = `
2374
+ :host{
2375
+ display: block;
2376
+ }
2377
+ `;
2378
+ if (states.isEssentials) {
2379
+ return (h("sqm-empty", { "empty-state-image": "https://res.cloudinary.com/saasquatch/image/upload/v1715360191/squatch-assets/Leaderboard_Not_Available.svg", "empty-state-header": "Leaderboards aren\u2019t available on your plan", "empty-state-text": "Contact {supportText} to upgrade your plan and start leveraging gamification in your program.", "support-text": "Support" }));
2380
+ }
2381
+ if (states.loading) {
2382
+ return (h("div", { class: sheet.classes.Leaderboard, style: { width: styles.width || "100%" } },
2383
+ h("style", { type: "text/css" },
2384
+ styleString,
2385
+ vanillaStyle),
2386
+ h("table", null, [...Array(10)].map(() => {
2387
+ return (h("tr", null,
2388
+ h("td", null,
2389
+ h("sl-skeleton", null))));
2390
+ }))));
2391
+ }
2392
+ if (!states.hasLeaders)
2393
+ return elements.empty;
2394
+ let userSeenFlag = false;
2395
+ const getUsersName = (user) => {
2396
+ if (!user.firstName && !user.lastInitial)
2397
+ return styles.anonymousUser;
2398
+ const { firstName, lastInitial } = user;
2399
+ if (firstName && lastInitial)
2400
+ return `${firstName} ${lastInitial}`;
2401
+ if (firstName || lastInitial)
2402
+ return firstName || lastInitial;
2403
+ return styles.anonymousUser;
2404
+ };
2405
+ const getRankCellText = (userRank, isViewingUsersRow) => {
2406
+ if (!userRank) {
2407
+ return styles.hideNames ? `${styles.viewingUserText}` : "-";
2408
+ }
2409
+ const viewingUserText = ` - ${styles.viewingUserText}`;
2410
+ return styles.rankSuffix
2411
+ ? intl.formatMessage({
2412
+ id: "rank",
2413
+ defaultMessage: styles.rankSuffix,
2414
+ }, {
2415
+ rank: userRank,
2416
+ }) + `${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`
2417
+ : `${userRank} ${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`;
2418
+ };
2419
+ return (h("div", { class: sheet.classes.Leaderboard, part: "sqm-base", style: { width: styles.width || "100%" } },
2610
2420
  h("style", { type: "text/css" },
2611
- vanillaStyle$3,
2612
- styleString),
2613
- h("div", { class: sheet.classes.RowContainer },
2614
- props.faqLink && (h("a", { target: "_blank", href: props.faqLink }, props.faqText)),
2615
- props.termsLink && (h("a", { target: "_blank", href: props.termsLink }, props.termsText))),
2616
- !props.hideSupportText && (h("p", { class: sheet.classes.SupportText }, intl.formatMessage({
2617
- id: "supportFooter",
2618
- defaultMessage: props.supportText,
2619
- }, {
2620
- email: (h("a", { target: "_blank", href: `mailto:${props.supportEmail}` }, props.supportEmail)),
2621
- }))),
2622
- !props.hidePoweredBy && (h("a", { class: sheet.classes.PoweredByLink, target: "_blank", href: props.poweredByLink },
2623
- "Powered by ",
2624
- h(PoweredByImg, { color: "currentColor" })))));
2421
+ styleString,
2422
+ vanillaStyle),
2423
+ h("table", { part: "sqm-table" },
2424
+ h("tr", null,
2425
+ styles.showRank && (h("th", { class: `Rank ${styles.hideNames ? "fullWidth" : ""}` }, styles.rankheading)),
2426
+ !styles.hideNames && h("th", { class: "User" }, styles.usersheading),
2427
+ h("th", { class: "Score" }, styles.statsheading)), (_a = data.leaderboard) === null || _a === void 0 ? void 0 :
2428
+ _a.map((user) => {
2429
+ var _a, _b;
2430
+ if (user.rowNumber === ((_a = data.viewerRank) === null || _a === void 0 ? void 0 : _a.rowNumber))
2431
+ userSeenFlag = true;
2432
+ const isViewingUsersRow = !styles.hideViewer && user.rowNumber === ((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rowNumber);
2433
+ return (h("tr", { class: isViewingUsersRow ? "highlight" : "" },
2434
+ styles.showRank && (h("td", { class: "Rank" }, getRankCellText(user.rank, isViewingUsersRow))),
2435
+ !styles.hideNames && h("td", { class: "User" }, getUsersName(user)),
2436
+ h("td", { class: "Score" }, user.textValue)));
2437
+ }),
2438
+ !userSeenFlag && !styles.hideViewer && (h("tr", null,
2439
+ h("td", { colSpan: 100, class: "ellipses" },
2440
+ h("sl-icon", { name: "three-dots", style: { verticalAlign: "middle" } })))),
2441
+ !userSeenFlag && !styles.hideViewer && (h("tr", { class: "highlight" },
2442
+ styles.showRank && (h("td", { class: "Rank" }, getRankCellText((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rank, true))),
2443
+ !styles.hideNames && (h("td", { class: "User" }, getUsersName(data.viewerRank || {}))),
2444
+ h("td", { class: "Score" }, ((_c = data.viewerRank) === null || _c === void 0 ? void 0 : _c.textValue) || "0"))))));
2625
2445
  }
2626
2446
 
2627
2447
  const paddingList = [
@@ -2752,35 +2572,44 @@ function HeroView(props) {
2752
2572
  h("div", { part: "sqm-two-col-secondary-col", class: `${sheet.classes.ColumnWrapper} ${sheet.classes.ColumnPadding}` }, content.secondaryColumn))) : (h("div", { part: "sqm-single-col", class: `${sheet.classes.SingleColumnContainer} ${sheet.classes.ColumnPadding}` }, content.primaryColumn))));
2753
2573
  }
2754
2574
 
2755
- function ReferralIframeView(props) {
2756
- const { states, data } = props;
2757
- const { content } = states;
2758
- // dependent on props
2759
- const style = {
2760
- Container: {
2761
- position: "relative",
2762
- width: content.iframeWidth,
2763
- height: content.iframeHeight,
2764
- },
2765
- IFrame: {
2766
- position: "absolute",
2767
- width: "100%",
2768
- height: "100%",
2769
- border: "0",
2770
- top: "0",
2771
- left: "0",
2772
- right: "0",
2773
- },
2774
- };
2775
- // JSS config
2776
- const sheet = createStyleSheet(style);
2777
- const styleString = sheet.toString();
2778
- return (h("div", { class: sheet.classes.Container },
2779
- h("style", { type: "text/css" }, styleString),
2780
- h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?rsCode=${data.shareCode}` })));
2575
+ const style$6 = {
2576
+ ErrorStyle: ErrorStyles,
2577
+ FieldContainer: {
2578
+ "margin-bottom": "var(--sl-spacing-large)",
2579
+ },
2580
+ };
2581
+ const vanillaStyle$3 = `
2582
+ :host {
2583
+ margin: 0 auto;
2584
+ width: 100%;
2585
+ display: block;
2586
+ }
2587
+ `;
2588
+ jss.setup(create());
2589
+ const sheet$6 = jss.createStyleSheet(style$6);
2590
+ const styleString$6 = sheet$6.toString();
2591
+ function InputFieldView(props) {
2592
+ var _a, _b, _c, _d, _e, _f, _g;
2593
+ const { states, content } = props;
2594
+ const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
2595
+ return (h("div", { class: sheet$6.classes.FieldContainer, part: "sqm-base" },
2596
+ h("style", { type: "text/css" },
2597
+ vanillaStyle$3,
2598
+ styleString$6),
2599
+ h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.fieldName}`, type: content.fieldType, label: content.fieldLabel }, (!content.fieldOptional ? { required: true } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e[content.fieldName]) ? {
2600
+ value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.fieldName],
2601
+ }
2602
+ : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]) ? {
2603
+ class: sheet$6.classes.ErrorStyle,
2604
+ helpText: intl.formatMessage({
2605
+ id: `errorMessage-${content.fieldName}`,
2606
+ defaultMessage: content.errorMessage || (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]),
2607
+ }),
2608
+ }
2609
+ : [])))));
2781
2610
  }
2782
2611
 
2783
- const style$8 = {
2612
+ const style$7 = {
2784
2613
  ErrorStyle: ErrorStyles,
2785
2614
  FieldsContainer: {
2786
2615
  "& sl-input": {
@@ -2795,26 +2624,51 @@ const vanillaStyle$4 = `
2795
2624
  display: block;
2796
2625
  }
2797
2626
 
2798
- sl-input::part(label){
2799
- font-size: var(--sl-input-label-font-size-small);
2627
+ *::part(input-label), *::part(select-label), *::part(textarea-label){
2628
+ font-size: var(--sqm-input-label-font-size, var(--sl-input-font-size-small));
2800
2629
  font-weight: var(--sl-font-weight-semibold);
2630
+ color: var(--sqm-input-label-color, var(--sqm-text), black);
2631
+ }
2632
+
2633
+ *::part(input-base), *::part(select-base), *::part(textarea-base){
2634
+ background-color: var(--sqm-input-background, #fff);
2635
+ border-radius: var(--sqm-input-border-radius, var(--sl-input-border-radius-large), 0.25rem);
2636
+ color: var(--sqm-input-color, white);
2637
+ border-width: var(--sqm-border-width, 1px);
2638
+ }
2639
+
2640
+ sl-input::part(base):focus,
2641
+ sl-select::part(form-control-wrapper):focus,
2642
+ sl-textare::part(textarea-label):focus {
2643
+ border-color: none;
2644
+ border: var(--sqm-input-focus-border, 1px solid var(--sl-input-border-color-focus));
2645
+ }
2646
+
2647
+ *::part(input-label):disabled, *::part(select-label):disabled, *::part(textarea-label):disabled{
2648
+ background: var(--sqm-input-disabled-background, #f5f5f5);
2649
+ color: var(--sqm-input-disabled-color, var(--sl-color-gray-600));
2650
+ }
2651
+
2652
+ sl-input {
2653
+ --sl-input-border-color-focus: var(--sqm-border-color-focus);
2801
2654
  }
2655
+
2802
2656
  `;
2803
- const sheet$8 = createStyleSheet(style$8);
2804
- const styleString$8 = sheet$8.toString();
2657
+ const sheet$7 = createStyleSheet(style$7);
2658
+ const styleString$7 = sheet$7.toString();
2805
2659
  function NameFieldsView(props) {
2806
2660
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
2807
2661
  const { states } = props;
2808
2662
  const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
2809
- return (h("div", { class: sheet$8.classes.FieldsContainer },
2663
+ return (h("div", { class: sheet$7.classes.FieldsContainer },
2810
2664
  h("style", { type: "text/css" },
2811
2665
  vanillaStyle$4,
2812
- styleString$8),
2666
+ styleString$7),
2813
2667
  h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: "/firstName", type: "text", label: states.content.firstNameLabel, required: true, disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e.firstName) ? {
2814
2668
  value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g.firstName,
2815
2669
  }
2816
2670
  : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) ? {
2817
- class: sheet$8.classes.ErrorStyle,
2671
+ class: sheet$7.classes.ErrorStyle,
2818
2672
  helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) || "Cannot be empty",
2819
2673
  }
2820
2674
  : []))),
@@ -2822,98 +2676,206 @@ function NameFieldsView(props) {
2822
2676
  value: (_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.initialData) === null || _o === void 0 ? void 0 : _o.lastName,
2823
2677
  }
2824
2678
  : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) ? {
2825
- class: sheet$8.classes.ErrorStyle,
2679
+ class: sheet$7.classes.ErrorStyle,
2826
2680
  helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) || "Cannot be empty",
2827
2681
  }
2828
2682
  : [])))));
2829
2683
  }
2830
2684
 
2831
- const style$9 = {
2832
- ErrorStyle: {
2833
- "--sl-input-border-color": "var(--sl-color-danger-500)",
2834
- "--sl-input-background-color": "var(--sl-color-danger-10)",
2835
- "--sl-input-border-color-focus": "var(--sl-color-danger-500)",
2836
- "--sl-input-border-color-hover": "var(--sl-color-danger-500)",
2837
- },
2838
- ErrorMessageStyle: {
2839
- margin: 0,
2840
- color: "var(--sl-color-danger-500)",
2841
- fontSize: "var(--sl-input-help-text-font-size-medium)",
2842
- },
2843
- FieldContainer: {
2844
- "margin-bottom": "var(--sl-spacing-large)",
2845
- },
2846
- };
2847
- const vanillaStyle$5 = `
2848
- :host {
2849
- margin: 0 auto;
2850
- width: 100%;
2851
- display: block;
2852
- }
2853
- sl-select::part(label){
2854
- font-size: var(--sl-input-label-font-size-small);
2855
- font-weight: var(--sl-font-weight-semibold);
2685
+ function ChangeMarktingView(props) {
2686
+ const { states, callbacks } = props;
2687
+ const { text, formState } = states;
2688
+ const { error } = formState;
2689
+ const style = {
2690
+ Container: {
2691
+ display: "flex",
2692
+ flexDirection: "column",
2693
+ gap: "var(--sl-spacing-x-small)",
2694
+ padding: "0 var(--sl-spacing-xxx-large) var(--sl-spacing-xxx-large)",
2695
+ },
2696
+ SubmitButton: { marginBottom: "var(--sl-spacing-medium)" },
2697
+ Error: {
2698
+ "&::part(erroralert-base)": {
2699
+ "margin-bottom": "15px",
2700
+ },
2701
+ },
2702
+ Success: {
2703
+ "&::part(successalert-base)": {
2704
+ "margin-bottom": "15px",
2705
+ },
2706
+ },
2707
+ };
2708
+ const sheet = createStyleSheet(style);
2709
+ const styleString = sheet.toString();
2710
+ return (h("div", { class: sheet.classes.Container, part: "sqm-base" },
2711
+ h("style", { type: "text/css" }, styleString),
2712
+ h(TextSpanView, Object.assign({}, { type: "h2" }), text.emailPreferencesHeader),
2713
+ h("sl-form", { "onSl-submit": callbacks.onSubmit },
2714
+ h(CheckboxFieldView, { states: {
2715
+ checked: states.formState.marketingEmailOptIn,
2716
+ }, content: {
2717
+ checkboxLabel: text.marketingCheckboxLabel,
2718
+ checkboxName: "marketingEmailOptIn",
2719
+ }, callbacks: {
2720
+ setChecked: callbacks.setChecked,
2721
+ } }),
2722
+ h("sl-button", { class: sheet.classes.SubmitButton, type: "primary", submit: true, loading: states.loading, disabled: states.submitDisabled }, text.submitChangeButtonText),
2723
+ error && (h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
2724
+ h("div", { part: "erroralert-text" }, error))),
2725
+ states.success && (h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
2726
+ h("div", { part: "successalert-text" }, states.text.successMessage))))));
2856
2727
  }
2728
+
2729
+ const vanillaStyle$5 = `
2730
+ :host{
2731
+ margin: 0 auto;
2732
+ width: 100%;
2733
+ }
2734
+ a{
2735
+ cursor:pointer;
2736
+ color: var(--sqm-text-subdued);
2737
+ text-decoration: none ;
2738
+ }
2857
2739
  `;
2858
- jss.setup(create());
2859
- const sheet$9 = jss.createStyleSheet(style$9);
2860
- const styleString$9 = sheet$9.toString();
2861
- function DropdownFieldView(props) {
2862
- var _a, _b, _c, _d, _e, _f, _g;
2863
- const { states, content } = props;
2864
- const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
2865
- return (h("div", { class: sheet$9.classes.FieldContainer, part: "sqm-base" },
2740
+ function PortalFooterView(props) {
2741
+ const style = {
2742
+ RowContainer: {
2743
+ display: "flex",
2744
+ "& > :not(:last-child)": {
2745
+ "margin-right": "var(--sl-spacing-large)",
2746
+ },
2747
+ },
2748
+ Container: {
2749
+ display: "flex",
2750
+ "flex-direction": "column",
2751
+ "align-items": "center",
2752
+ "font-size": "var(--sl-font-size-small)",
2753
+ color: "var(--sqm-text-subdued)",
2754
+ "padding-top": `var(--sl-spacing-${props.paddingTop})`,
2755
+ "padding-right": `var(--sl-spacing-${props.paddingRight})`,
2756
+ "padding-bottom": `var(--sl-spacing-${props.paddingBottom})`,
2757
+ "padding-left": `var(--sl-spacing-${props.paddingLeft})`,
2758
+ "row-gap": `var(--sl-spacing-small)`,
2759
+ "& a:hover": {
2760
+ color: "var(--sqm-text)",
2761
+ },
2762
+ },
2763
+ SupportText: {
2764
+ textAlign: "center",
2765
+ margin: 0,
2766
+ },
2767
+ PoweredByLink: {
2768
+ color: "var(--sqm-text-subdued)",
2769
+ "font-size": "var(--sl-font-size-small)",
2770
+ display: "flex",
2771
+ alignItems: "center",
2772
+ svg: {
2773
+ marginTop: "2px",
2774
+ shapeRendering: "geometricprecision",
2775
+ },
2776
+ "&:hover, &:hover *": {
2777
+ color: "var(--sqm-text)",
2778
+ },
2779
+ },
2780
+ };
2781
+ const sheet = createStyleSheet(style);
2782
+ const styleString = sheet.toString();
2783
+ return (h("div", { class: sheet.classes.Container, part: "sqm-base" },
2866
2784
  h("style", { type: "text/css" },
2867
2785
  vanillaStyle$5,
2868
- styleString$9),
2869
- h("sl-select", Object.assign({ exportparts: "label: input-label, base: input-base", label: content.dropdownLabel, name: `/${content.dropdownName}` }, (!content.dropdownOptional ? { required: true } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e[content.dropdownName]) ? {
2870
- value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.dropdownName],
2871
- }
2872
- : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) ? {
2873
- class: sheet$9.classes.ErrorStyle,
2874
- }
2875
- : [])), content.selectOptions),
2876
- (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) && (h("p", { class: sheet$9.classes.ErrorMessageStyle }, intl.formatMessage({
2877
- id: `errorMessage-${content.dropdownName}`,
2878
- defaultMessage: content.errorMessage,
2879
- })))));
2786
+ styleString),
2787
+ h("div", { class: sheet.classes.RowContainer },
2788
+ props.faqLink && (h("a", { target: "_blank", href: props.faqLink }, props.faqText)),
2789
+ props.termsLink && (h("a", { target: "_blank", href: props.termsLink }, props.termsText))),
2790
+ !props.hideSupportText && (h("p", { class: sheet.classes.SupportText }, intl.formatMessage({
2791
+ id: "supportFooter",
2792
+ defaultMessage: props.supportText,
2793
+ }, {
2794
+ email: (h("a", { target: "_blank", href: `mailto:${props.supportEmail}` }, props.supportEmail)),
2795
+ }))),
2796
+ !props.hidePoweredBy && (h("a", { class: sheet.classes.PoweredByLink, target: "_blank", href: props.poweredByLink },
2797
+ "Powered by ",
2798
+ h(PoweredByImg, { color: "currentColor" })))));
2799
+ }
2800
+
2801
+ function PortalFrameView(props, children) {
2802
+ const { data, notFullScreen, border } = props;
2803
+ const style = {
2804
+ HostBlock: HostBlock,
2805
+ Frame: {
2806
+ display: "flex",
2807
+ "flex-direction": "column",
2808
+ "box-sizing": "border-box",
2809
+ "&:nth-child(2)": {
2810
+ background: props.backgroundColor,
2811
+ },
2812
+ },
2813
+ FooterWrapper: {
2814
+ width: "100%",
2815
+ "max-width": "100%",
2816
+ padding: "var(--sl-spacing-medium) var(--sl-spacing-x-large)",
2817
+ background: props.headerAndFooterBackgroundColor,
2818
+ display: "flex",
2819
+ "justify-content": "flex-end",
2820
+ "align-items": "center",
2821
+ "box-sizing": "border-box",
2822
+ borderTop: border,
2823
+ "margin-top": "auto",
2824
+ },
2825
+ HeaderWrapper: {
2826
+ width: "100%",
2827
+ "max-width": "100%",
2828
+ "box-sizing": "border-box",
2829
+ display: "flex",
2830
+ "justify-content": "space-between",
2831
+ padding: "var(--sl-spacing-small) var(--sl-spacing-large)",
2832
+ "align-items": "center",
2833
+ borderBottom: border,
2834
+ background: props.headerAndFooterBackgroundColor,
2835
+ "@media screen and (max-width: 499px)": {
2836
+ "flex-direction": "row-reverse",
2837
+ "justify-content": "flex-end",
2838
+ padding: "0",
2839
+ },
2840
+ },
2841
+ };
2842
+ const sheet = createStyleSheet(style);
2843
+ const styleString = sheet.toString();
2844
+ return (h("div", { style: { minHeight: notFullScreen ? "100%" : "100vh" }, class: sheet.classes.Frame, part: "sqm-base" },
2845
+ h("style", { type: "text/css" }, styleString),
2846
+ h("div", { class: sheet.classes.HeaderWrapper, part: "sqm-header" },
2847
+ data.header,
2848
+ h("slot", { name: "sqm-navigation-menu" })),
2849
+ children,
2850
+ h("div", { class: sheet.classes.FooterWrapper, part: "sqm-footer" }, data.footer)));
2880
2851
  }
2881
2852
 
2882
- const style$a = {
2883
- ErrorStyle: ErrorStyles,
2884
- FieldContainer: {
2885
- "margin-bottom": "var(--sl-spacing-large)",
2886
- },
2887
- };
2888
- const vanillaStyle$6 = `
2889
- :host {
2890
- margin: 0 auto;
2891
- width: 100%;
2892
- display: block;
2893
- }
2894
- `;
2895
- jss.setup(create());
2896
- const sheet$a = jss.createStyleSheet(style$a);
2897
- const styleString$a = sheet$a.toString();
2898
- function InputFieldView(props) {
2899
- var _a, _b, _c, _d, _e, _f, _g;
2900
- const { states, content } = props;
2901
- const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
2902
- return (h("div", { class: sheet$a.classes.FieldContainer, part: "sqm-base" },
2903
- h("style", { type: "text/css" },
2904
- vanillaStyle$6,
2905
- styleString$a),
2906
- h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.fieldName}`, type: content.fieldType, label: content.fieldLabel }, (!content.fieldOptional ? { required: true } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e[content.fieldName]) ? {
2907
- value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.fieldName],
2908
- }
2909
- : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]) ? {
2910
- class: sheet$a.classes.ErrorStyle,
2911
- helpText: intl.formatMessage({
2912
- id: `errorMessage-${content.fieldName}`,
2913
- defaultMessage: content.errorMessage || (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]),
2914
- }),
2915
- }
2916
- : [])))));
2853
+ function ReferralIframeView(props) {
2854
+ const { states, data } = props;
2855
+ const { content } = states;
2856
+ // dependent on props
2857
+ const style = {
2858
+ Container: {
2859
+ position: "relative",
2860
+ width: content.iframeWidth,
2861
+ height: content.iframeHeight,
2862
+ },
2863
+ IFrame: {
2864
+ position: "absolute",
2865
+ width: "100%",
2866
+ height: "100%",
2867
+ border: "0",
2868
+ top: "0",
2869
+ left: "0",
2870
+ right: "0",
2871
+ },
2872
+ };
2873
+ // JSS config
2874
+ const sheet = createStyleSheet(style);
2875
+ const styleString = sheet.toString();
2876
+ return (h("div", { class: sheet.classes.Container },
2877
+ h("style", { type: "text/css" }, styleString),
2878
+ h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?rsCode=${data.shareCode}` })));
2917
2879
  }
2918
2880
 
2919
2881
  const CheckMark = () => (h("svg", { width: 12, height: 10, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
@@ -3002,7 +2964,7 @@ function ProgressBar({ stageCount, currentStage, }) {
3002
2964
  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 })))));
3003
2965
  }
3004
2966
 
3005
- const style$b = {
2967
+ const style$8 = {
3006
2968
  HostBlock: HostBlock,
3007
2969
  Container: {
3008
2970
  minWidth: "300px",
@@ -3353,8 +3315,8 @@ const style$b = {
3353
3315
  },
3354
3316
  };
3355
3317
  // JSS config
3356
- const sheet$b = createStyleSheet(style$b);
3357
- const styleString$b = sheet$b.toString();
3318
+ const sheet$8 = createStyleSheet(style$8);
3319
+ const styleString$8 = sheet$8.toString();
3358
3320
  const stageList = ["chooseReward", "chooseAmount", "confirmation", "success"];
3359
3321
  function RewardExchangeView(props) {
3360
3322
  const { states, data, callbacks, refs } = props;
@@ -3377,7 +3339,7 @@ function RewardExchangeView(props) {
3377
3339
  sourceUnit: item.sourceUnit,
3378
3340
  })));
3379
3341
  }
3380
- 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$b.classes.Select, value: states.selectedStep, "onSl-select": (e) => {
3342
+ 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$8.classes.Select, value: states.selectedStep, "onSl-select": (e) => {
3381
3343
  var _a, _b, _c, _d, _e;
3382
3344
  return callbacks.setExchangeState({
3383
3345
  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,
@@ -3385,7 +3347,7 @@ function RewardExchangeView(props) {
3385
3347
  });
3386
3348
  } }, (_c = item.steps) === null || _c === void 0 ? void 0 : _c.map((step) => {
3387
3349
  var _a, _b;
3388
- return (h("sl-menu-item", { value: step, disabled: !step.available, class: sheet$b.classes.SelectItem },
3350
+ return (h("sl-menu-item", { value: step, disabled: !step.available, class: sheet$8.classes.SelectItem },
3389
3351
  step.prettyDestinationValue,
3390
3352
  h("br", null),
3391
3353
  h("div", { class: "step-cost", slot: "suffix" },
@@ -3404,8 +3366,8 @@ function RewardExchangeView(props) {
3404
3366
  var _a;
3405
3367
  return [
3406
3368
  h("div", { part: "choose-reward-container" },
3407
- h("div", { class: sheet$b.classes.Title }, states.content.text.rewardTitle),
3408
- states.loading || states.queryError ? (loading()) : (h("div", { class: sheet$b.classes.Grid }, (_a = data.exchangeList) === null || _a === void 0 ? void 0 : _a.map((item) => {
3369
+ h("div", { class: sheet$8.classes.Title }, states.content.text.rewardTitle),
3370
+ states.loading || states.queryError ? (loading()) : (h("div", { class: sheet$8.classes.Grid }, (_a = data.exchangeList) === null || _a === void 0 ? void 0 : _a.map((item) => {
3409
3371
  var _a, _b, _c, _d, _e;
3410
3372
  const style = {
3411
3373
  boxShadow: item.key === (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.key)
@@ -3414,7 +3376,7 @@ function RewardExchangeView(props) {
3414
3376
  borderRadius: "4px",
3415
3377
  };
3416
3378
  return (h("div", { key: item.key, style: style },
3417
- h("sl-card", { exportparts: "base: exchange-card-container", class: sheet$b.classes.Card, style: {
3379
+ h("sl-card", { exportparts: "base: exchange-card-container", class: sheet$8.classes.Card, style: {
3418
3380
  cursor: item.unavailableReasonCode
3419
3381
  ? "not-allowed"
3420
3382
  : "pointer",
@@ -3431,14 +3393,14 @@ function RewardExchangeView(props) {
3431
3393
  ? "rgba(0, 0, 0, 0.05)"
3432
3394
  : "rgba(0, 0, 0, 0)",
3433
3395
  } },
3434
- h("div", { class: sheet$b.classes.Image, style: {
3396
+ h("div", { class: sheet$8.classes.Image, style: {
3435
3397
  opacity: item.unavailableReasonCode ? "0.5" : "1",
3436
3398
  } },
3437
3399
  h("img", { class: item.unavailableReasonCode
3438
3400
  ? "image subdued"
3439
3401
  : "image", src: (item === null || item === void 0 ? void 0 : item.imageUrl) ||
3440
3402
  getAssetPath("./assets/Reward-image.png") })),
3441
- h("div", { class: sheet$b.classes.TextArea, style: {
3403
+ h("div", { class: sheet$8.classes.TextArea, style: {
3442
3404
  opacity: item.unavailableReasonCode ? "0.5" : "1",
3443
3405
  } },
3444
3406
  h("div", { class: "title", style: {
@@ -3471,7 +3433,7 @@ function RewardExchangeView(props) {
3471
3433
  item.prettySourceMinValue,
3472
3434
  }))))))));
3473
3435
  }))),
3474
- h("div", { class: sheet$b.classes.Button },
3436
+ h("div", { class: sheet$8.classes.Button },
3475
3437
  h("sl-button", { exportparts: "base: primarybutton-base", class: "continue right", size: "large", onClick: () => callbacks.setStage("chooseAmount"), loading: states.loading, disabled: !states.selectedItem }, states.content.text.continueText))),
3476
3438
  ];
3477
3439
  }
@@ -3482,7 +3444,7 @@ function RewardExchangeView(props) {
3482
3444
  ? false
3483
3445
  : input && !states.amount;
3484
3446
  return (h("div", null,
3485
- h("div", { class: sheet$b.classes.ChooseAmount, part: "choose-amount-container" },
3447
+ h("div", { class: sheet$8.classes.ChooseAmount, part: "choose-amount-container" },
3486
3448
  h("div", { class: "wrapper" },
3487
3449
  h("img", { class: "image", src: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) ||
3488
3450
  getAssetPath("./assets/Reward-image.png") }),
@@ -3491,7 +3453,7 @@ function RewardExchangeView(props) {
3491
3453
  ((_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)),
3492
3454
  ((_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", null, input)),
3493
3455
  h("div", { class: "space" }))),
3494
- h("div", { class: sheet$b.classes.Button },
3456
+ h("div", { class: sheet$8.classes.Button },
3495
3457
  h("sl-button", { exportparts: "base: secondarybutton-base", class: "cancel", size: "large", type: "text", onClick: () => callbacks.resetState() }, states.content.text.cancelText),
3496
3458
  h("sl-button", { exportparts: "base: primarybutton-base", class: "continue", size: "large", onClick: () => callbacks.setStage("confirmation"), disabled: isDisabled }, states.content.text.continueToConfirmationText)))));
3497
3459
  }
@@ -3499,8 +3461,8 @@ function RewardExchangeView(props) {
3499
3461
  const cost = (selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettySourceValue) || selectedItem.prettySourceValue;
3500
3462
  const amount = selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettyDestinationValue;
3501
3463
  return (h("div", null,
3502
- h("div", { class: sheet$b.classes.Confirmation, part: "confirmation-container" },
3503
- h("div", { class: sheet$b.classes.Title }, states.content.text.redeemTitle),
3464
+ h("div", { class: sheet$8.classes.Confirmation, part: "confirmation-container" },
3465
+ h("div", { class: sheet$8.classes.Title }, states.content.text.redeemTitle),
3504
3466
  h("div", { class: "wrapper" },
3505
3467
  h("div", { class: "field" }, states.content.text.rewardNameTitle),
3506
3468
  h("div", { class: "reward-item-container" },
@@ -3515,13 +3477,13 @@ function RewardExchangeView(props) {
3515
3477
  h("div", { class: "wrapper top-border padding" },
3516
3478
  h("div", { class: "field" }, states.content.text.costTitle),
3517
3479
  h("div", { class: "value" }, cost)),
3518
- h("div", { class: sheet$b.classes.Button },
3480
+ h("div", { class: sheet$8.classes.Button },
3519
3481
  h("sl-button", { class: "cancel", type: "text", size: "large", onClick: () => callbacks.setStage("chooseAmount") }, states.content.text.backText),
3520
3482
  h("sl-button", { class: "continue", size: "large", loading: states.loading, onClick: callbacks.exchangeReward }, states.content.text.redeemText)))));
3521
3483
  }
3522
3484
  function success() {
3523
3485
  var _a, _b, _c, _d, _e, _f;
3524
- return (h("div", { class: sheet$b.classes.Success, part: "success-container" },
3486
+ return (h("div", { class: sheet$8.classes.Success, part: "success-container" },
3525
3487
  h(Gift$1, null),
3526
3488
  h(Confetti, null),
3527
3489
  h("div", { class: "title" }, (_a = states.content.text) === null || _a === void 0 ? void 0 : _a.rewardRedeemedText),
@@ -3536,7 +3498,7 @@ function RewardExchangeView(props) {
3536
3498
  (data === null || data === void 0 ? void 0 : data.fuelTankCode) && (h("div", { class: "promo" },
3537
3499
  states.content.text.promoCode,
3538
3500
  h(CopyTextView, { copyString: data.fuelTankCode, tooltiptext: (_f = states === null || states === void 0 ? void 0 : states.content) === null || _f === void 0 ? void 0 : _f.text.tooltipText, open: states.open, onClick: callbacks.copyFuelTankCode }))),
3539
- h("div", { class: sheet$b.classes.Button },
3501
+ h("div", { class: sheet$8.classes.Button },
3540
3502
  h("sl-button", { class: "continue center", type: "primary", size: "large", onClick: () => callbacks.resetState(true) }, states.content.text.doneText))));
3541
3503
  }
3542
3504
  const stages = {
@@ -3548,7 +3510,7 @@ function RewardExchangeView(props) {
3548
3510
  const currentStage = stages[states.redeemStage];
3549
3511
  function stageMap() {
3550
3512
  const stageNumber = stageList.indexOf(states.redeemStage);
3551
- return (h("div", { class: sheet$b.classes.ProgressBar },
3513
+ return (h("div", { class: sheet$8.classes.ProgressBar },
3552
3514
  h("div", { class: "text-area" }, Object.keys(stageProgressList).map((stage) => {
3553
3515
  if (stageList.indexOf(stage) <= stageNumber) {
3554
3516
  return h("span", { class: "text" }, stageProgressList[stage]);
@@ -3560,10 +3522,10 @@ function RewardExchangeView(props) {
3560
3522
  h(ProgressBar, { stageCount: 3, currentStage: stageNumber })));
3561
3523
  }
3562
3524
  function loading() {
3563
- return (h("div", { class: sheet$b.classes.Grid, part: "loading-container" }, [...Array(states.content.text.skeletonCardNum)].map(() => {
3525
+ return (h("div", { class: sheet$8.classes.Grid, part: "loading-container" }, [...Array(states.content.text.skeletonCardNum)].map(() => {
3564
3526
  return (h("div", null,
3565
- h("sl-card", { class: sheet$b.classes.Card },
3566
- h("div", { class: sheet$b.classes.CardLayout },
3527
+ h("sl-card", { class: sheet$8.classes.Card },
3528
+ h("div", { class: sheet$8.classes.CardLayout },
3567
3529
  h("div", null,
3568
3530
  h("sl-skeleton", { style: {
3569
3531
  width: "100px",
@@ -3595,12 +3557,12 @@ function RewardExchangeView(props) {
3595
3557
  if (!(refs === null || refs === void 0 ? void 0 : refs.canvasRef))
3596
3558
  return;
3597
3559
  refs.canvasRef.current = canvas;
3598
- }, id: "my-canvas", class: sheet$b.classes.Confetti }));
3560
+ }, id: "my-canvas", class: sheet$8.classes.Confetti }));
3599
3561
  }
3600
3562
  if (states.noExchangeOptions)
3601
3563
  return states.content.text.empty;
3602
- return (h("div", { class: sheet$b.classes.Container, part: "sqm-base" },
3603
- h("style", { type: "text/css" }, styleString$b),
3564
+ return (h("div", { class: sheet$8.classes.Container, part: "sqm-base" },
3565
+ h("style", { type: "text/css" }, styleString$8),
3604
3566
  h("div", null,
3605
3567
  stageMap(),
3606
3568
  states.exchangeError && errorMessage(),
@@ -3990,108 +3952,164 @@ const empty = {
3990
3952
  ...baseResponse(null, "chooseReward", null, null, false, false, null, true),
3991
3953
  };
3992
3954
 
3993
- function CardFeedView(props, children) {
3994
- // Dependent on props, not feasiable to move out
3995
- const style = {
3996
- Container: {
3997
- columnGap: props.gap + "px",
3998
- columnWidth: props.width + "px",
3999
- "& > div": {
4000
- marginBottom: "24px",
4001
- },
4002
- },
4003
- };
4004
- const sheet = createStyleSheet(style);
4005
- const styleString = sheet.toString();
4006
- const vanillaStyle = `
4007
- :host{
4008
- display: block;
3955
+ const MessageLinkQuery = dist.gql `
3956
+ query (
3957
+ $programId: ID
3958
+ $engagementMedium: UserEngagementMedium!
3959
+ $shareMedium: ReferralShareMedium!
3960
+ ) {
3961
+ viewer {
3962
+ ... on User {
3963
+ messageLink(
3964
+ programId: $programId
3965
+ engagementMedium: $engagementMedium
3966
+ shareMedium: $shareMedium
3967
+ )
3968
+ shareLink(programId: $programId, engagementMedium: $engagementMedium)
3969
+ }
4009
3970
  }
4010
-
4011
- `;
4012
- return (h("div", null,
4013
- h("style", { type: "text/css" },
4014
- styleString,
4015
- vanillaStyle),
4016
- h("div", { class: sheet.classes.Container, part: "sqm-base" }, children)));
4017
- }
4018
-
4019
- const style$c = {
4020
- HostBlock: HostBlock,
4021
- couponCodeLabel: {
4022
- margin: "var(--sl-spacing-x-small) 0",
4023
- color: "var(--sqm-text-subdued)",
4024
- fontSize: "var(--sl-font-size-small)",
4025
- },
4026
- };
4027
- const vanillaStyle$7 = `
4028
- :host{
4029
- display: block;
4030
- width: 100%;
4031
3971
  }
4032
3972
  `;
4033
- const sheet$c = createStyleSheet(style$c);
4034
- const styleString$c = sheet$c.toString();
4035
- function CouponCodeView(props) {
4036
- const error = !props.loading && props.error;
4037
- return (h("div", null,
4038
- h("style", { type: "text/css" },
4039
- styleString$c,
4040
- vanillaStyle$7),
4041
- h("p", { class: sheet$c.classes.couponCodeLabel, style: { textAlign: props.textAlign } }, props.couponCodeLabel),
4042
- error ? (h("sqm-form-message", { type: props.errorType, exportparts: "erroralert-icon" },
4043
- h("div", { part: "erroralert-text" }, props.errorText))) : (h(CopyTextView, Object.assign({}, props)))));
3973
+ function NativeShare(props, directLink, undefinedErrorText, unsupportedPlatformText) {
3974
+ const title = props.sharetitle || "Share title";
3975
+ const text = props.sharetext || "Share text";
3976
+ if (directLink === "undefined") {
3977
+ return alert(undefinedErrorText);
3978
+ }
3979
+ if (window.navigator.share) {
3980
+ window.navigator
3981
+ .share({
3982
+ title,
3983
+ text,
3984
+ url: directLink,
3985
+ })
3986
+ .catch((error) => console.error("Error on web share", error));
3987
+ }
3988
+ else {
3989
+ alert(unsupportedPlatformText);
3990
+ }
4044
3991
  }
4045
-
4046
- 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))})`}
4047
-
4048
- const colorScale = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
4049
- const lScale = [
4050
- 0.95,
4051
- 0.86,
4052
- 0.76,
4053
- 0.66,
4054
- 0.56,
4055
- 0.46,
4056
- 0.39,
4057
- 0.32,
4058
- 0.25,
4059
- 0.18,
4060
- 0.15,
4061
- ];
4062
- // https://github.com/ricokahler/color2k/blob/main/src/parseToRgba.ts
4063
- const hslaRegex = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i;
4064
- function niceParseToHsla(color) {
4065
- const normalizedColor = color.trim();
4066
- const hslaMatch = hslaRegex.exec(normalizedColor);
4067
- if (hslaMatch) {
4068
- const [h, s, l, a] = Array.from(hslaMatch).slice(1).map(parseFloat);
4069
- if (t(0, 100, s) !== s)
4070
- throw new n(color);
4071
- if (t(0, 100, l) !== l)
4072
- throw new n(color);
4073
- return [h, s / 100, l, a || 1];
3992
+ function FacebookShare(directLink, messageLink, errorText) {
3993
+ if (messageLink === "undefined" || directLink === "undefined") {
3994
+ return alert(errorText);
3995
+ }
3996
+ if (typeof SquatchAndroid.shareOnFacebook !== "undefined") {
3997
+ return SquatchAndroid.shareOnFacebook(directLink, messageLink);
3998
+ }
3999
+ else {
4000
+ return GenericShare(messageLink, errorText);
4074
4001
  }
4075
- // Warning -- converts to RGB first, so is lossy
4076
- return p(color);
4077
4002
  }
4078
- function generateScale(color, name = "primary") {
4079
- const [h, s, l, a] = niceParseToHsla(color);
4080
- return lScale
4081
- .map((l) => z(h, s, l, a))
4082
- .map((color, index) => {
4083
- return `--sl-color-${name}-${colorScale[index]}: ${color};\n`;
4084
- });
4003
+ function GenericShare(messageLink, errorText) {
4004
+ return messageLink ? (window.location.href = messageLink) : alert(errorText);
4085
4005
  }
4086
- /**
4087
- * Generated a Shoelace color scale css string from a base color
4088
- *
4089
- * @param color
4090
- * @param name
4091
- * @returns
4092
- */
4093
- function autoColorScaleCss(color, name = "primary") {
4094
- return generateScale(color, name).join("\n");
4006
+ function useShareButton(props) {
4007
+ var _a, _b, _c, _d;
4008
+ const { sharetitle, sharetext, medium } = props;
4009
+ const programId = props.programId ? props.programId : H();
4010
+ const user = J();
4011
+ const engagementMedium = B();
4012
+ const variables = {
4013
+ engagementMedium,
4014
+ programId: programId,
4015
+ shareMedium: medium.toUpperCase(),
4016
+ };
4017
+ const contextData = Fn(REFERRAL_CODES_NAMESPACE);
4018
+ const overrideData = contextData === null || contextData === void 0 ? void 0 : contextData[medium];
4019
+ // only queries if a programId is available
4020
+ const res = wn(MessageLinkQuery, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId || overrideData !== undefined);
4021
+ const [setCopied, copiedRes] = $e(SET_CODE_COPIED);
4022
+ const directLink = (overrideData === null || overrideData === void 0 ? void 0 : overrideData.shareLink) || ((_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);
4023
+ const environment = getEnvironmentSDK();
4024
+ const hide = (medium.toLocaleUpperCase() === "SMS" &&
4025
+ window.orientation === undefined) ||
4026
+ (medium.toLocaleUpperCase() === "DIRECT" && !window.navigator.share);
4027
+ const messageLink = (overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink) || ((_d = (_c = res.data) === null || _c === void 0 ? void 0 : _c.viewer) === null || _d === void 0 ? void 0 : _d.messageLink);
4028
+ async function onClick() {
4029
+ if (overrideData) {
4030
+ await setCopied({ referralCode: contextData.referralCode });
4031
+ contextData.refresh();
4032
+ }
4033
+ if (medium.toLocaleUpperCase() === "FACEBOOK" &&
4034
+ environment.type === "SquatchAndroid") {
4035
+ FacebookShare(directLink, messageLink, props.errorText);
4036
+ }
4037
+ else if (medium.toLocaleUpperCase() === "DIRECT") {
4038
+ NativeShare({ sharetitle, sharetext }, directLink, props.errorText, props.unsupportedPlatformText);
4039
+ }
4040
+ }
4041
+ const isPlainLink = !(medium.toLocaleUpperCase() === "FACEBOOK" &&
4042
+ environment.type === "SquatchAndroid") &&
4043
+ medium.toLocaleUpperCase() !== "DIRECT" &&
4044
+ messageLink;
4045
+ const userAgent = window.navigator.userAgent.toLowerCase(), safari = /safari/.test(userAgent), ios = /iphone|ipod|ipad/.test(userAgent);
4046
+ const openInSameTab = ios && !safari;
4047
+ return {
4048
+ ...props,
4049
+ loading: res.loading && !(overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink),
4050
+ messageLink,
4051
+ isPlainLink,
4052
+ onClick,
4053
+ openInSameTab,
4054
+ hide,
4055
+ };
4056
+ }
4057
+
4058
+ const MessageLinkQuery$1 = dist.gql `
4059
+ query ($programId: ID, $engagementMedium: UserEngagementMedium!) {
4060
+ user: viewer {
4061
+ ... on User {
4062
+ shareLink(
4063
+ programId: $programId
4064
+ engagementMedium: $engagementMedium
4065
+ shareMedium: DIRECT
4066
+ )
4067
+ }
4068
+ }
4069
+ }
4070
+ `;
4071
+ const WIDGET_ENGAGEMENT_EVENT = dist.gql `
4072
+ mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
4073
+ createUserAnalyticsEvent(eventMeta: $eventMeta)
4074
+ }
4075
+ `;
4076
+ function useShareLink(props) {
4077
+ var _a, _b;
4078
+ const { programId = H() } = props;
4079
+ const user = J();
4080
+ const engagementMedium = B();
4081
+ const contextData = Fn(REFERRAL_CODES_NAMESPACE);
4082
+ const { data } = wn(MessageLinkQuery$1, { programId, engagementMedium }, !(user === null || user === void 0 ? void 0 : user.jwt) || !!props.linkOverride || (contextData === null || contextData === void 0 ? void 0 : contextData.shareLink) !== undefined);
4083
+ const [sendLoadEvent] = $e(WIDGET_ENGAGEMENT_EVENT);
4084
+ const [setCopied, copiedRes] = $e(SET_CODE_COPIED);
4085
+ const copyString = (_b = ((contextData === null || contextData === void 0 ? void 0 : contextData.shareLink) || ((_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.shareLink))) !== null && _b !== void 0 ? _b :
4086
+ // Shown during loading
4087
+ "...";
4088
+ const [open, setOpen] = useState(false);
4089
+ async function onClick() {
4090
+ if (contextData) {
4091
+ await setCopied({ referralCode: contextData.referralCode });
4092
+ contextData.refresh();
4093
+ }
4094
+ // Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
4095
+ // Only if called from a user-initiated event
4096
+ navigator.clipboard.writeText(copyString);
4097
+ setOpen(true);
4098
+ setTimeout(() => setOpen(false), props.tooltiplifespan);
4099
+ sendLoadEvent({
4100
+ eventMeta: {
4101
+ programId,
4102
+ id: user === null || user === void 0 ? void 0 : user.id,
4103
+ accountId: user === null || user === void 0 ? void 0 : user.accountId,
4104
+ type: "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",
4105
+ meta: {
4106
+ engagementMedium,
4107
+ shareMedium: "DIRECT",
4108
+ },
4109
+ },
4110
+ });
4111
+ }
4112
+ return { ...props, onClick, open, copyString: copyString };
4095
4113
  }
4096
4114
 
4097
4115
  const map = new Map();
@@ -4128,4 +4146,4 @@ const ShadowViewAddon = ({ story }, children) => {
4128
4146
  h(TagName, { "stencilbook-shadow-view": randomInt })));
4129
4147
  };
4130
4148
 
4131
- export { loading as A, BigStatView as B, ChangeMarktingView as C, DropdownFieldView as D, EditProfileView as E, empty as F, rewardExchange as G, HeroView as H, InputFieldView as I, CardFeedView as J, CouponCodeView as K, LeaderboardView as L, ProgressBar as M, NameFieldsView as N, autoColorScaleCss as O, PortalFrameView as P, ShadowViewAddon as Q, ReferralIframeView as R, ShareButtonView as S, TaskCardView as T, useBigStat as U, withShadowView as V, demoRewardExchange as W, useShareButton as a, useDemoBigStat as b, StatContainerView as c, PortalChangePasswordView as d, PortalRegisterView as e, ProgressBarView as f, PoweredByImg as g, PortalFooterView as h, CheckboxFieldView as i, RewardExchangeView as j, rewardExchangeLongText as k, rewardExchangeSelected as l, chooseAmountFixed as m, chooseAmountFixedNoDescription as n, chooseAmountVariable as o, chooseAmountVariableNoDescription as p, chooseAmountVariableDisabled as q, rewardExchangeCustomErrorMsg as r, chooseAmountVariableUnavailable as s, confirmFixed as t, useShareLink as u, confirmVariable as v, redemptionError as w, queryError as x, success as y, successVariable as z };
4149
+ export { empty as A, BigStatView as B, CardFeedView as C, DropdownFieldView as D, EditProfileView as E, rewardExchange as F, useShareButton as G, HeroView as H, InputFieldView as I, useShareLink as J, ProgressBarView as K, LeaderboardView as L, ProgressBar as M, NameFieldsView as N, ShadowViewAddon as O, PortalChangePasswordView as P, useBigStat as Q, ReferralIframeView as R, StatContainerView as S, TaskCardView as T, withShadowView as U, demoRewardExchange as V, ShareButtonView as a, PoweredByImg as b, CheckboxFieldView as c, PortalRegisterView as d, CouponCodeView as e, ChangeMarktingView as f, PortalFooterView as g, PortalFrameView as h, RewardExchangeView as i, rewardExchangeLongText as j, rewardExchangeSelected as k, chooseAmountFixed as l, chooseAmountFixedNoDescription as m, chooseAmountVariable as n, chooseAmountVariableNoDescription as o, chooseAmountVariableDisabled as p, chooseAmountVariableUnavailable as q, rewardExchangeCustomErrorMsg as r, confirmFixed as s, confirmVariable as t, useDemoBigStat as u, redemptionError as v, queryError as w, success as x, successVariable as y, loading as z };