@saasquatch/mint-components 1.15.0-45 → 1.15.0-46

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 (270) hide show
  1. package/dist/cjs/{ShadowViewAddon-bebbd4d0.js → ShadowViewAddon-85d2eed4.js} +1056 -1056
  2. package/dist/cjs/{extractProps-e9c55ba8.js → extractProps-fd93ba62.js} +0 -14
  3. package/dist/cjs/{global-242743b1.js → global-2298fc8b.js} +58 -73
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/mint-components.cjs.js +2 -2
  6. package/dist/cjs/{sqm-banking-info-form_10.cjs.entry.js → sqm-banking-info-form_17.cjs.entry.js} +1902 -213
  7. package/dist/cjs/sqm-big-stat_42.cjs.entry.js +3 -3
  8. package/dist/cjs/sqm-email-verification.cjs.entry.js +1 -1
  9. package/dist/cjs/sqm-empty_4.cjs.entry.js +1 -1
  10. package/dist/cjs/sqm-invoice-table-view-90b2433f.js +2038 -0
  11. package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +1 -1
  12. package/dist/cjs/sqm-pagination_3.cjs.entry.js +1 -1
  13. package/dist/cjs/{sqm-portal-email-verification-view-38bfdda4.js → sqm-portal-email-verification-view-0a93a148.js} +1 -1
  14. package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +2 -2
  15. package/dist/cjs/{sqm-portal-profile-view-036d355e.js → sqm-portal-profile-view-44a83439.js} +1 -1
  16. package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
  17. package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1 -1
  18. package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +5 -3
  19. package/dist/cjs/sqm-stencilbook.cjs.entry.js +13992 -15287
  20. package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +3 -11
  21. package/dist/cjs/sqm-widget-verification.cjs.entry.js +7 -17
  22. package/dist/cjs/{usePayoutStatus-3cca69e5.js → usePayoutStatus-f26f0467.js} +5 -8
  23. package/dist/collection/components/sqm-instant-access-registration/sqm-instant-access-registration.js +1 -1
  24. package/dist/collection/components/sqm-invoice-table/columns/sqm-invoice-table-data-column.js +1 -1
  25. package/dist/collection/components/sqm-invoice-table/columns/sqm-invoice-table-date-column.js +2 -3
  26. package/dist/collection/components/sqm-invoice-table/columns/sqm-invoice-table-download-column.js +1 -2
  27. package/dist/collection/components/sqm-invoice-table/sqm-invoice-table.js +1 -1
  28. package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.js +3 -3
  29. package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +2 -2
  30. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +4 -6
  31. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-status-cell.js +2 -2
  32. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-column.js +1 -1
  33. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-date-column.js +2 -2
  34. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.js +2 -2
  35. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-status-column.js +2 -2
  36. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-user-column.js +2 -2
  37. package/dist/collection/components/sqm-referral-table/sqm-referral-table.js +1 -2
  38. package/dist/collection/components/sqm-referred-registration/sqm-referred-registration.js +1 -1
  39. package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +1 -1
  40. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-reward-cell.js +3 -5
  41. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.js +3 -5
  42. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +9 -11
  43. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.js +2 -2
  44. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-note-column.js +3 -3
  45. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.js +2 -2
  46. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.js +3 -3
  47. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.js +2 -2
  48. package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +1 -1
  49. package/dist/collection/components/sqm-share-button/sqm-share-button.js +3 -3
  50. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +78 -78
  51. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +2 -2
  52. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-controller.js +5 -39
  53. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +7 -42
  54. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +8 -12
  55. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +1 -1
  56. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +2 -2
  57. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +1 -1
  58. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +1 -1
  59. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.js +1 -1
  60. package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +2 -2
  61. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js +2 -2
  62. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +2 -2
  63. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +2 -2
  64. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +1 -26
  65. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/usePayoutDetailsCard.js +2 -2
  66. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +5 -8
  67. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +28 -77
  68. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +1 -1
  69. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +4 -19
  70. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +3 -3
  71. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +5 -6
  72. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +10 -10
  73. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +3 -3
  74. package/dist/collection/global/styles.js +58 -73
  75. package/dist/collection/global/styles.ts +40 -48
  76. package/dist/esm/{ShadowViewAddon-b439f9c5.js → ShadowViewAddon-d59ef625.js} +1059 -1059
  77. package/dist/esm/{extractProps-54064fb0.js → extractProps-ae1afbb3.js} +1 -14
  78. package/dist/esm/{global-f33bb903.js → global-2da1dcec.js} +58 -73
  79. package/dist/esm/loader.js +2 -2
  80. package/dist/esm/mint-components.js +2 -2
  81. package/dist/esm/{sqm-banking-info-form_10.entry.js → sqm-banking-info-form_17.entry.js} +1819 -137
  82. package/dist/esm/sqm-big-stat_42.entry.js +3 -3
  83. package/dist/esm/sqm-email-verification.entry.js +1 -1
  84. package/dist/esm/sqm-empty_4.entry.js +1 -1
  85. package/dist/esm/sqm-invoice-table-view-df370e4a.js +2022 -0
  86. package/dist/esm/sqm-leaderboard-rank.entry.js +1 -1
  87. package/dist/esm/sqm-pagination_3.entry.js +1 -1
  88. package/dist/esm/{sqm-portal-email-verification-view-e8661ca9.js → sqm-portal-email-verification-view-e38ec8cc.js} +1 -1
  89. package/dist/esm/sqm-portal-email-verification.entry.js +2 -2
  90. package/dist/esm/{sqm-portal-profile-view-70e1a345.js → sqm-portal-profile-view-e594d1ee.js} +1 -1
  91. package/dist/esm/sqm-portal-profile.entry.js +2 -2
  92. package/dist/esm/sqm-referral-table_11.entry.js +1 -1
  93. package/dist/esm/sqm-rewards-table_9.entry.js +5 -3
  94. package/dist/esm/sqm-stencilbook.entry.js +14017 -15312
  95. package/dist/esm/sqm-widget-verification-controller.entry.js +4 -12
  96. package/dist/esm/sqm-widget-verification.entry.js +7 -17
  97. package/dist/esm/{usePayoutStatus-e92a6e43.js → usePayoutStatus-3768c8c3.js} +5 -8
  98. package/dist/esm-es5/ShadowViewAddon-d59ef625.js +1 -0
  99. package/dist/esm-es5/extractProps-ae1afbb3.js +1 -0
  100. package/dist/esm-es5/{global-f33bb903.js → global-2da1dcec.js} +4 -4
  101. package/dist/esm-es5/loader.js +1 -1
  102. package/dist/esm-es5/mint-components.js +1 -1
  103. package/dist/esm-es5/sqm-banking-info-form_17.entry.js +1 -0
  104. package/dist/esm-es5/sqm-big-stat_42.entry.js +1 -1
  105. package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
  106. package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
  107. package/dist/esm-es5/sqm-invoice-table-view-df370e4a.js +1 -0
  108. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  109. package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
  110. package/dist/esm-es5/{sqm-portal-email-verification-view-e8661ca9.js → sqm-portal-email-verification-view-e38ec8cc.js} +1 -1
  111. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  112. package/dist/esm-es5/{sqm-portal-profile-view-70e1a345.js → sqm-portal-profile-view-e594d1ee.js} +1 -1
  113. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  114. package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
  115. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
  116. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  117. package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
  118. package/dist/esm-es5/sqm-widget-verification.entry.js +1 -1
  119. package/dist/esm-es5/{usePayoutStatus-e92a6e43.js → usePayoutStatus-3768c8c3.js} +2 -2
  120. package/dist/mint-components/global/styles.ts +40 -48
  121. package/dist/mint-components/mint-components.esm.js +1 -1
  122. package/dist/mint-components/mint-components.js +1 -1
  123. package/dist/mint-components/{p-b55e454d.entry.js → p-0019d57c.entry.js} +1 -1
  124. package/dist/mint-components/p-04cc08e7.system.entry.js +1 -0
  125. package/dist/mint-components/p-097a255f.js +1 -0
  126. package/dist/mint-components/p-15ad1e97.entry.js +16 -0
  127. package/dist/mint-components/p-16c55bb4.entry.js +205 -0
  128. package/dist/mint-components/{p-95ff58b2.system.entry.js → p-232996b5.system.entry.js} +1 -1
  129. package/dist/mint-components/p-26468242.js +1 -0
  130. package/dist/mint-components/{p-283848df.system.entry.js → p-28aed7f7.system.entry.js} +1 -1
  131. package/dist/mint-components/p-31b8f0ca.system.js +1 -0
  132. package/dist/mint-components/{p-a341ce23.js → p-3466bfaa.js} +2 -2
  133. package/dist/mint-components/{p-227aa136.entry.js → p-4ce7e3b1.entry.js} +1 -1
  134. package/dist/mint-components/{p-2d730bef.system.entry.js → p-5125ec72.system.entry.js} +1 -1
  135. package/dist/mint-components/{p-a44b7a52.system.js → p-5efed40f.system.js} +2 -2
  136. package/dist/mint-components/p-62d924e6.system.entry.js +1 -0
  137. package/dist/mint-components/p-6bcac9ed.system.entry.js +1 -0
  138. package/dist/mint-components/{p-44435060.entry.js → p-73069eba.entry.js} +1 -1
  139. package/dist/mint-components/{p-1f8d3b1a.entry.js → p-761ee9ea.entry.js} +2 -2
  140. package/dist/mint-components/{p-7cbbca72.entry.js → p-7953c3da.entry.js} +1 -1
  141. package/dist/mint-components/{p-9d48280a.js → p-7aba33e1.js} +1 -1
  142. package/dist/mint-components/{p-5a48bf9d.system.js → p-7ae3ec51.system.js} +1 -1
  143. package/dist/mint-components/p-7b97c0f4.system.entry.js +1 -0
  144. package/dist/mint-components/{p-c7878ec7.system.js → p-7daa731c.system.js} +1 -1
  145. package/dist/mint-components/{p-28e4b275.system.entry.js → p-7dac5a58.system.entry.js} +1 -1
  146. package/dist/mint-components/{p-e8422f7b.entry.js → p-836d3ec7.entry.js} +2 -2
  147. package/dist/mint-components/{p-5dd09973.system.entry.js → p-9fcc7901.system.entry.js} +1 -1
  148. package/dist/mint-components/{p-059ad130.system.entry.js → p-a121e5a1.system.entry.js} +1 -1
  149. package/dist/mint-components/p-a8645c1b.system.js +1 -0
  150. package/dist/mint-components/{p-a348f9b9.js → p-b090bbd2.js} +1 -1
  151. package/dist/mint-components/p-bfe08ca4.system.js +1 -0
  152. package/dist/mint-components/p-c53bd5bd.entry.js +9 -0
  153. package/dist/mint-components/{p-3bdccbc9.system.entry.js → p-cc5f9775.system.entry.js} +1 -1
  154. package/dist/mint-components/{p-10849094.system.js → p-d49373b7.system.js} +1 -1
  155. package/dist/mint-components/{p-6d23f01a.entry.js → p-d4e49019.entry.js} +2 -2
  156. package/dist/mint-components/{p-7aef9c53.entry.js → p-e1e96de9.entry.js} +1 -1
  157. package/dist/mint-components/p-e53c3c6e.system.js +1 -0
  158. package/dist/mint-components/{p-538fe844.system.entry.js → p-e70d8201.system.entry.js} +1 -1
  159. package/dist/mint-components/{p-c2e3f0f0.entry.js → p-f2c48bc8.entry.js} +1 -1
  160. package/dist/mint-components/p-f3558ef0.js +394 -0
  161. package/dist/mint-components/{p-24d6cfcd.js → p-f3a52eb6.js} +1 -1
  162. package/dist/mint-components/p-f66ccd51.entry.js +1 -0
  163. package/dist/mint-components/{p-4cfd562e.system.entry.js → p-fad1752b.system.entry.js} +1 -1
  164. package/dist/types/components/sqm-instant-access-registration/sqm-instant-access-registration.d.ts +1 -1
  165. package/dist/types/components/sqm-invoice-table/columns/InvoiceTableColumn.d.ts +0 -1
  166. package/dist/types/components/sqm-invoice-table/columns/sqm-invoice-table-data-column.d.ts +20 -0
  167. package/dist/types/components/sqm-invoice-table/columns/sqm-invoice-table-date-column.d.ts +1 -2
  168. package/dist/types/components/sqm-invoice-table/columns/sqm-invoice-table-download-column.d.ts +0 -1
  169. package/dist/types/components/sqm-invoice-table/mockInvoiceData.d.ts +0 -1
  170. package/dist/types/components/sqm-invoice-table/sqm-invoice-table.d.ts +60 -0
  171. package/dist/types/components/sqm-leaderboard/sqm-leaderboard.d.ts +3 -3
  172. package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.d.ts +0 -1
  173. package/dist/types/components/sqm-referral-table/cells/sqm-referral-table-status-cell.d.ts +7 -0
  174. package/dist/types/components/sqm-referral-table/columns/ReferralTableColumn.d.ts +0 -1
  175. package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-column.d.ts +16 -0
  176. package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-date-column.d.ts +43 -0
  177. package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.d.ts +71 -0
  178. package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-status-column.d.ts +43 -0
  179. package/dist/types/components/sqm-referral-table/columns/sqm-referral-table-user-column.d.ts +31 -0
  180. package/dist/types/components/sqm-referral-table/sqm-referral-table.d.ts +0 -1
  181. package/dist/types/components/sqm-referred-registration/sqm-referred-registration.d.ts +1 -1
  182. package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-reward-cell.d.ts +8 -0
  183. package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.d.ts +11 -0
  184. package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.d.ts +24 -0
  185. package/dist/types/components/sqm-rewards-table/columns/RewardTableColumn.d.ts +0 -1
  186. package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.d.ts +31 -0
  187. package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-note-column.d.ts +20 -0
  188. package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.d.ts +32 -0
  189. package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.d.ts +50 -0
  190. package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.d.ts +104 -0
  191. package/dist/types/components/sqm-rewards-table/mockRewardData.d.ts +0 -1
  192. package/dist/types/components/sqm-rewards-table/mockTaxData.d.ts +0 -1
  193. package/dist/types/components/sqm-rewards-table/sqm-rewards-table.d.ts +48 -0
  194. package/dist/types/components/sqm-share-button/sqm-share-button.d.ts +3 -3
  195. package/dist/types/components/sqm-stencilbook/Themes.d.ts +16 -0
  196. package/dist/types/components/sqm-widget-verification/sqm-widget-verification-controller.d.ts +0 -5
  197. package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +1 -6
  198. package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +1 -0
  199. package/dist/types/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.d.ts +1 -1
  200. package/dist/types/components/tax-and-cash/sqm-docusign-form/useDocusignForm.d.ts +2 -2
  201. package/dist/types/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.d.ts +0 -4
  202. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +1 -1
  203. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +4 -10
  204. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.d.ts +1 -1
  205. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +1 -1
  206. package/dist/types/components/tax-and-cash/sqm-user-info-form/small-views/IndirectTaxDetailsView.d.ts +1 -1
  207. package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +1 -1
  208. package/dist/types/components/tax-and-cash/utils.d.ts +1 -1
  209. package/dist/types/components.d.ts +22 -66
  210. package/dist/types/global/android.d.ts +7 -0
  211. package/dist/types/global/demo.d.ts +2 -0
  212. package/dist/types/global/styles.d.ts +1 -2
  213. package/dist/types/saasquatch.d.ts +50 -106
  214. package/dist/types/stories/features.d.ts +4 -0
  215. package/dist/types/stories/templates.d.ts +4 -0
  216. package/docs/docs.docx +0 -0
  217. package/docs/raisins.json +1 -1
  218. package/grapesjs/grapesjs.js +1 -1
  219. package/package.json +1 -2
  220. package/shoelace/assets/icons/twitter-x.svg +4 -0
  221. package/dist/cjs/IndirectTaxDetailsView-81f1ce92.js +0 -646
  222. package/dist/cjs/data-68a42a7b.js +0 -137
  223. package/dist/cjs/sqm-code-verification.cjs.entry.js +0 -342
  224. package/dist/cjs/sqm-invoice-table-data-cell_5.cjs.entry.js +0 -84
  225. package/dist/cjs/sqm-tax-and-cash.cjs.entry.js +0 -1220
  226. package/dist/cjs/utils-a6957c85.js +0 -105
  227. package/dist/collection/utils/parseStates.js +0 -12
  228. package/dist/esm/IndirectTaxDetailsView-89731480.js +0 -639
  229. package/dist/esm/data-ce8ed0ae.js +0 -121
  230. package/dist/esm/sqm-code-verification.entry.js +0 -338
  231. package/dist/esm/sqm-invoice-table-data-cell_5.entry.js +0 -76
  232. package/dist/esm/sqm-tax-and-cash.entry.js +0 -1216
  233. package/dist/esm/utils-79d81bca.js +0 -97
  234. package/dist/esm-es5/IndirectTaxDetailsView-89731480.js +0 -1
  235. package/dist/esm-es5/ShadowViewAddon-b439f9c5.js +0 -1
  236. package/dist/esm-es5/data-ce8ed0ae.js +0 -1
  237. package/dist/esm-es5/extractProps-54064fb0.js +0 -1
  238. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +0 -1
  239. package/dist/esm-es5/sqm-code-verification.entry.js +0 -1
  240. package/dist/esm-es5/sqm-invoice-table-data-cell_5.entry.js +0 -1
  241. package/dist/esm-es5/sqm-tax-and-cash.entry.js +0 -1
  242. package/dist/esm-es5/utils-79d81bca.js +0 -1
  243. package/dist/mint-components/p-0768fe1d.system.js +0 -1
  244. package/dist/mint-components/p-0797a946.js +0 -1
  245. package/dist/mint-components/p-169c8564.system.js +0 -1
  246. package/dist/mint-components/p-1e79befd.entry.js +0 -1
  247. package/dist/mint-components/p-2378a0dd.entry.js +0 -16
  248. package/dist/mint-components/p-3206d0a4.js +0 -103
  249. package/dist/mint-components/p-6a4582eb.system.entry.js +0 -1
  250. package/dist/mint-components/p-6f323a9f.entry.js +0 -11
  251. package/dist/mint-components/p-7274fe6e.js +0 -1
  252. package/dist/mint-components/p-7813a75a.js +0 -1
  253. package/dist/mint-components/p-7dc10820.system.js +0 -1
  254. package/dist/mint-components/p-8c126ccb.system.entry.js +0 -1
  255. package/dist/mint-components/p-901358ee.system.entry.js +0 -1
  256. package/dist/mint-components/p-9481740a.system.entry.js +0 -1
  257. package/dist/mint-components/p-a39c3535.system.entry.js +0 -1
  258. package/dist/mint-components/p-a86635aa.system.entry.js +0 -1
  259. package/dist/mint-components/p-ae0636bb.system.js +0 -1
  260. package/dist/mint-components/p-c25b0ff4.js +0 -394
  261. package/dist/mint-components/p-e228b351.system.js +0 -1
  262. package/dist/mint-components/p-e524056f.entry.js +0 -1
  263. package/dist/mint-components/p-e55aafe9.system.js +0 -1
  264. package/dist/mint-components/p-ee17ee0b.entry.js +0 -1
  265. package/dist/mint-components/p-f2ebbbe3.system.entry.js +0 -1
  266. package/dist/mint-components/p-fba00613.entry.js +0 -93
  267. package/dist/mint-components/p-fd2ee10c.entry.js +0 -9
  268. package/dist/types/utils/parseStates.d.ts +0 -1
  269. /package/dist/collection/components/tax-and-cash/{data.js → sqm-tax-and-cash/data.js} +0 -0
  270. /package/dist/types/components/tax-and-cash/{data.d.ts → sqm-tax-and-cash/data.d.ts} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { h, c as Host, d as getAssetPath, g as getElement } from './index-b3a06de8.js';
2
- import { b as browser, u as useMemo, k as useState } from './stencil-hooks.module-20ad2b5f.js';
3
- import { i as intl } from './global-f33bb903.js';
4
- import { H, L, J, d as dist, w as wn, F as Fn, $ as $e, B, g as getEnvironmentSDK } from './index.module-d49ae5e7.js';
2
+ import { k as useState, b as browser, u as useMemo } from './stencil-hooks.module-20ad2b5f.js';
3
+ import { i as intl } from './global-2da1dcec.js';
4
+ import { d as dist, H, J, F as Fn, w as wn, $ as $e, B, g as getEnvironmentSDK, L } from './index.module-d49ae5e7.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';
@@ -15,48 +15,6 @@ import { p as pathToRegexp } from './index-ffa26b43.js';
15
15
  import { a as isValidColor, b as isMobile } from './utilities-6341d9fd.js';
16
16
  import { a as PortalSectionView, P as PortalContainerView } from './sqm-portal-container-view-f0b1ccfc.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
-
60
18
  const medium = {
61
19
  facebook: { color: "#1877f2", text: "#fff", icon: "facebook" },
62
20
  twitter: { color: "#000000", text: "#fff", icon: "twitter-x" },
@@ -133,190 +91,461 @@ function ShareButtonView(props, children) {
133
91
  !props.hidetext && children)));
134
92
  }
135
93
 
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
94
+ function LeaderboardView(props) {
95
+ var _a, _b, _c;
96
+ const { states, data, elements } = props;
97
+ const { styles } = states;
148
98
  const style = {
149
- StatContainer: {
150
- width: "100%",
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(),
99
+ Leaderboard: {
100
+ "& table": {
101
+ width: "100%",
102
+ borderCollapse: "collapse",
103
+ background: styles.background || "transparent",
104
+ borderRadius: styles.borderRadius ? `${styles.borderRadius}px` : "0",
163
105
  },
164
- "& > :last-child": {
165
- "border-right": "none",
106
+ "& th": {
107
+ textAlign: "left",
108
+ padding: "var(--sl-spacing-medium)",
109
+ paddingTop: "0",
110
+ fontSize: "var(--sl-font-size-medium)",
111
+ fontWeight: "var(--sl-font-weight-semibold)",
166
112
  },
167
- "& > ::slotted(*)": {
168
- "border-right": props.hideBorder
169
- ? "none"
170
- : "1px solid var(--sqm-text-subdued)",
171
- "padding-right": divideSpace(),
113
+ "& tr:not(:first-child)": {
114
+ borderTop: `var(--sqm-bordr-thickness) solid ${styles.borderColor || "var(--sqm-border-color)"}`,
172
115
  },
173
- "& > ::slotted(*:last-child)": {
174
- "border-right": "none",
116
+ "& td": {
117
+ fontSize: "var(--sl-font-size-medium)",
118
+ fontWeight: "var(--sl-font-weight-normal)",
175
119
  },
176
- "@media screen and (max-width: 430px)": {
177
- "& > ::slotted(*)": {
178
- borderRight: "none",
179
- },
120
+ "& .ellipses": {
121
+ textAlign: "left",
122
+ padding: "0",
123
+ color: styles.textColor || "var(--sqm-text)",
124
+ paddingLeft: "25%",
180
125
  },
181
- },
182
- StatFrame: {
183
- display: "flex",
184
- },
185
- BorderFix: {
186
- "border-right": "1px solid transparent",
187
- width: "0px",
188
- "margin-left": "-1px",
189
- },
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: {
204
- padding: "0",
205
- "&::part(panel)": {
206
- background: "var(--sqm-portal-background)",
207
- borderRadius: "var(--sqm-border-radius-normal, var(--sl-border-radius-medium))",
126
+ "& .highlight": {
127
+ background: styles.viewingUserHighlightColor ||
128
+ "var(--sqm-accent-color-background)",
129
+ "& td, th": {
130
+ color: styles.viewingUserHighlightTextColor || "var(--sqm-text)",
131
+ },
208
132
  },
209
- "&::part(close-button)": {
210
- "margin-top": "var(--sl-spacing-medium)",
133
+ "& td, th": {
134
+ color: styles.textColor || "var(--sqm-text)",
135
+ padding: "var(--sl-spacing-medium)",
211
136
  },
212
- "&::part(body)": {
213
- padding: "0 var(--sl-spacing-x-large) var(--sl-spacing-x-large) var(--sl-spacing-x-large)",
137
+ "& .User": {
138
+ width: "100%",
214
139
  },
215
- },
216
- Error: {
217
- "&::part(erroralert-base)": {
218
- "margin-bottom": "15px",
140
+ "& .Score": {
141
+ width: "auto",
142
+ whiteSpace: "nowrap",
219
143
  },
220
- },
221
- Success: {
222
- "&::part(successalert-base)": {
223
- "margin-bottom": "15px",
144
+ "& .Rank": {
145
+ whiteSpace: "nowrap",
224
146
  },
225
- },
226
- InputContainer: {
227
- "& > :not(:last-child)": {
228
- "margin-bottom": "var(--sl-spacing-x-large)",
147
+ "& .fullWidth": {
148
+ width: "100%",
229
149
  },
230
150
  },
231
- CancelButton: {
232
- margin: "var(--sl-spacing-large) auto",
233
- width: "100%",
234
- },
235
- PasswordField: {
236
- marginBottom: "var(--sl-spacing-large) !important",
237
- display: "block",
238
- },
239
- ChangePasswordButton: {
240
- paddingTop: "var(--sl-spacing-x-large)",
241
- },
242
151
  };
243
152
  const sheet = createStyleSheet(style);
244
153
  const styleString = sheet.toString();
245
- return (h("div", null,
246
- h("style", { type: "text/css" }, styleString),
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: "secondary", 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", { type: "primary", exportparts: "base: primarybutton-base", onClick: () => callbacks.setOpen(true) }, states.content.portalChangePasswordButtonText)),
270
- }),
271
- h("style", { type: "text/css" }, styleString))));
272
- }
273
-
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 })));
305
- }
306
-
307
- const debug = browser("sq:useBigStat");
308
- const LOADING = "...";
309
- const debugQuery = (query, variables, getStat) => {
310
- const res = wn(query, variables);
311
- if (!(res === null || res === void 0 ? void 0 : res.data) && !res.loading) {
312
- console.error("issue getting stat:", res);
154
+ const vanillaStyle = `
155
+ :host{
156
+ display: block;
313
157
  }
314
- const stat = getStat(res);
315
- return { ...stat, loading: res.loading };
316
- };
317
- const referralsCountQuery = (programId,
318
- // locale
319
- _, status) => {
158
+ `;
159
+ if (states.isEssentials) {
160
+ 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" }));
161
+ }
162
+ if (states.loading) {
163
+ return (h("div", { class: sheet.classes.Leaderboard, style: { width: styles.width || "100%" } },
164
+ h("style", { type: "text/css" },
165
+ styleString,
166
+ vanillaStyle),
167
+ h("table", null, [...Array(10)].map(() => {
168
+ return (h("tr", null,
169
+ h("td", null,
170
+ h("sl-skeleton", null))));
171
+ }))));
172
+ }
173
+ if (!states.hasLeaders)
174
+ return elements.empty;
175
+ let userSeenFlag = false;
176
+ const getUsersName = (user) => {
177
+ if (!user.firstName && !user.lastInitial)
178
+ return styles.anonymousUser;
179
+ const { firstName, lastInitial } = user;
180
+ if (firstName && lastInitial)
181
+ return `${firstName} ${lastInitial}`;
182
+ if (firstName || lastInitial)
183
+ return firstName || lastInitial;
184
+ return styles.anonymousUser;
185
+ };
186
+ const getRankCellText = (userRank, isViewingUsersRow) => {
187
+ if (!userRank) {
188
+ return styles.hideNames ? `${styles.viewingUserText}` : "-";
189
+ }
190
+ const viewingUserText = ` - ${styles.viewingUserText}`;
191
+ return styles.rankSuffix
192
+ ? intl.formatMessage({
193
+ id: "rank",
194
+ defaultMessage: styles.rankSuffix,
195
+ }, {
196
+ rank: userRank,
197
+ }) + `${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`
198
+ : `${userRank} ${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`;
199
+ };
200
+ return (h("div", { class: sheet.classes.Leaderboard, part: "sqm-base", style: { width: styles.width || "100%" } },
201
+ h("style", { type: "text/css" },
202
+ styleString,
203
+ vanillaStyle),
204
+ h("table", { part: "sqm-table" },
205
+ h("tr", null,
206
+ styles.showRank && (h("th", { class: `Rank ${styles.hideNames ? "fullWidth" : ""}` }, styles.rankheading)),
207
+ !styles.hideNames && h("th", { class: "User" }, styles.usersheading),
208
+ h("th", { class: "Score" }, styles.statsheading)), (_a = data.leaderboard) === null || _a === void 0 ? void 0 :
209
+ _a.map((user) => {
210
+ var _a, _b;
211
+ if (user.rowNumber === ((_a = data.viewerRank) === null || _a === void 0 ? void 0 : _a.rowNumber))
212
+ userSeenFlag = true;
213
+ const isViewingUsersRow = !styles.hideViewer && user.rowNumber === ((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rowNumber);
214
+ return (h("tr", { class: isViewingUsersRow ? "highlight" : "" },
215
+ styles.showRank && (h("td", { class: "Rank" }, getRankCellText(user.rank, isViewingUsersRow))),
216
+ !styles.hideNames && h("td", { class: "User" }, getUsersName(user)),
217
+ h("td", { class: "Score" }, user.textValue)));
218
+ }),
219
+ !userSeenFlag && !styles.hideViewer && (h("tr", null,
220
+ h("td", { colSpan: 100, class: "ellipses" },
221
+ h("sl-icon", { name: "three-dots", style: { verticalAlign: "middle" } })))),
222
+ !userSeenFlag && !styles.hideViewer && (h("tr", { class: "highlight" },
223
+ styles.showRank && (h("td", { class: "Rank" }, getRankCellText((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rank, true))),
224
+ !styles.hideNames && (h("td", { class: "User" }, getUsersName(data.viewerRank || {}))),
225
+ h("td", { class: "Score" }, ((_c = data.viewerRank) === null || _c === void 0 ? void 0 : _c.textValue) || "0"))))));
226
+ }
227
+
228
+ function BigStatView(props) {
229
+ const { statvalue, flexReverse, alignment, statTextColor, statFontSize, descriptionTextColor, descriptionFontSize, statFontWeight, } = props;
230
+ // Dependent on props, not feasible to move out
231
+ const style = {
232
+ Container: {
233
+ display: "flex",
234
+ // height: "inherit",
235
+ // "justify-content": "space-between",
236
+ "flex-direction": `${flexReverse ? "column-reverse" : "column"}`,
237
+ "align-items": `${alignment === "left"
238
+ ? "flex-start"
239
+ : alignment === "right"
240
+ ? "flex-end"
241
+ : "center"}`,
242
+ },
243
+ Stat: {
244
+ "font-size": statFontSize
245
+ ? `${statFontSize}px`
246
+ : "var(--sl-font-size-xx-large)",
247
+ "text-align": alignment,
248
+ color: statTextColor || "var(--sqm-text)",
249
+ lineHeight: "35px",
250
+ fontWeight: statFontWeight || "var(--sl-font-weight-normal)",
251
+ },
252
+ Description: {
253
+ "font-size": descriptionFontSize
254
+ ? `${descriptionFontSize}px`
255
+ : "var(--sl-font-size-small)",
256
+ "font-weight": "var(--sl-font-weight-normal)",
257
+ color: descriptionTextColor || "var(--sqm-text)",
258
+ "text-align": alignment,
259
+ lineHeight: "20px",
260
+ },
261
+ };
262
+ const sheet = createStyleSheet(style);
263
+ const styleString = sheet.toString();
264
+ return (h("div", { part: "stat-wrapper", class: sheet.classes.Container },
265
+ h("style", { type: "text/css" }, styleString),
266
+ h("div", { part: "stat-value", class: sheet.classes.Stat }, statvalue),
267
+ h("div", { part: "stat-description", class: sheet.classes.Description }, props.labelSlot)));
268
+ }
269
+
270
+ function PortalFrameView(props, children) {
271
+ const { data, notFullScreen, border } = props;
272
+ const style = {
273
+ HostBlock: HostBlock,
274
+ Frame: {
275
+ display: "flex",
276
+ "flex-direction": "column",
277
+ "box-sizing": "border-box",
278
+ "&:nth-child(2)": {
279
+ background: props.backgroundColor,
280
+ },
281
+ },
282
+ FooterWrapper: {
283
+ width: "100%",
284
+ "max-width": "100%",
285
+ padding: "var(--sl-spacing-medium) var(--sl-spacing-x-large)",
286
+ background: props.headerAndFooterBackgroundColor,
287
+ display: "flex",
288
+ "justify-content": "flex-end",
289
+ "align-items": "center",
290
+ "box-sizing": "border-box",
291
+ borderTop: border,
292
+ "margin-top": "auto",
293
+ },
294
+ HeaderWrapper: {
295
+ width: "100%",
296
+ "max-width": "100%",
297
+ "box-sizing": "border-box",
298
+ display: "flex",
299
+ "justify-content": "space-between",
300
+ padding: "var(--sl-spacing-small) var(--sl-spacing-large)",
301
+ "align-items": "center",
302
+ borderBottom: border,
303
+ background: props.headerAndFooterBackgroundColor,
304
+ "@media screen and (max-width: 499px)": {
305
+ "flex-direction": "row-reverse",
306
+ "justify-content": "flex-end",
307
+ padding: "0",
308
+ },
309
+ },
310
+ };
311
+ const sheet = createStyleSheet(style);
312
+ const styleString = sheet.toString();
313
+ return (h("div", { style: { minHeight: notFullScreen ? "100%" : "100vh" }, class: sheet.classes.Frame, part: "sqm-base" },
314
+ h("style", { type: "text/css" }, styleString),
315
+ h("div", { class: sheet.classes.HeaderWrapper, part: "sqm-header" },
316
+ data.header,
317
+ h("slot", { name: "sqm-navigation-menu" })),
318
+ children,
319
+ h("div", { class: sheet.classes.FooterWrapper, part: "sqm-footer" }, data.footer)));
320
+ }
321
+
322
+ const EditProfileView = (props) => {
323
+ var _a, _b, _c, _d;
324
+ const { states, callbacks } = props;
325
+ const { text } = states;
326
+ const { errors } = states.formState;
327
+ if (states.showEdit) {
328
+ return (h("div", { class: `CardWrapper ${!states.showEdit && "ShowEdit"}`, part: "sqm-base" },
329
+ h("h2", { part: "sqm-header", style: {
330
+ fontSize: "var(--sl-font-size-x-large)",
331
+ margin: "0px",
332
+ textAlign: "center",
333
+ } }, text.editprofileheader),
334
+ h("form", { class: "FormWrapper", onSubmit: callbacks.onSubmit },
335
+ h("div", { class: "FormSection" },
336
+ states.formState.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
337
+ h("div", { part: "erroralert-text" }, states.formState.error))),
338
+ 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"
339
+ ? { class: "ErrorStyles", helpText: text.fieldEmptyText }
340
+ : []), { id: "firstName", name: "firstName", error: errors.firstName && errors.firstName.status !== "valid"
341
+ ? errors.firstName.message
342
+ : undefined })),
343
+ 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"
344
+ ? { class: "ErrorStyles", helpText: text.fieldEmptyText }
345
+ : []), { error: errors.lastName && errors.lastName.status !== "valid"
346
+ ? errors.lastName.message
347
+ : undefined }))),
348
+ 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" })),
349
+ h("div", { class: "ButtonWrapper" },
350
+ h("sl-button", { type: "primary", loading: states.loading, disabled: states.submitDisabled, onClick: (e) => {
351
+ callbacks.onSubmit(e);
352
+ }, submit: true, exportparts: "base: primarybutton-base" }, text.updatetext),
353
+ h("sl-button", { onClick: () => {
354
+ callbacks.setShowEdit(false);
355
+ }, type: "secondary", exportparts: "base: secondarybutton-base" }, text.canceltext)))));
356
+ }
357
+ return (h("div", { class: `CardWrapper FormWrapper ${!states.showEdit && "ShowEdit"}`, part: "sqm-base" },
358
+ h("div", { class: "FormSection" },
359
+ h("h2", { part: "sqm-header", style: {
360
+ fontSize: "var(--sl-font-size-x-large)",
361
+ marginBottom: "0px",
362
+ textAlign: "center",
363
+ } }, text.editprofileheader),
364
+ h("div", null,
365
+ h("p", { style: { fontSize: "var(--sl-font-size-medium)" } }, (_a = states.user) === null || _a === void 0 ? void 0 :
366
+ _a.firstName,
367
+ " ", (_b = states.user) === null || _b === void 0 ? void 0 :
368
+ _b.lastName),
369
+ 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))),
370
+ h("sl-button", { type: "primary", loading: states.loading, onClick: () => {
371
+ callbacks.resetForm();
372
+ callbacks.setShowEdit(true);
373
+ }, exportparts: "base: primarybutton-base" }, text.editprofiletext)));
374
+ };
375
+
376
+ const MessageLinkQuery = dist.gql `
377
+ query ($programId: ID, $engagementMedium: UserEngagementMedium!) {
378
+ user: viewer {
379
+ ... on User {
380
+ shareLink(
381
+ programId: $programId
382
+ engagementMedium: $engagementMedium
383
+ shareMedium: DIRECT
384
+ )
385
+ }
386
+ }
387
+ }
388
+ `;
389
+ const WIDGET_ENGAGEMENT_EVENT = dist.gql `
390
+ mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
391
+ createUserAnalyticsEvent(eventMeta: $eventMeta)
392
+ }
393
+ `;
394
+ function useShareLink(props) {
395
+ var _a, _b;
396
+ const { programId = H() } = props;
397
+ const user = J();
398
+ const engagementMedium = B();
399
+ const contextData = Fn(REFERRAL_CODES_NAMESPACE);
400
+ 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);
401
+ const [sendLoadEvent] = $e(WIDGET_ENGAGEMENT_EVENT);
402
+ const [setCopied, copiedRes] = $e(SET_CODE_COPIED);
403
+ 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 :
404
+ // Shown during loading
405
+ "...";
406
+ const [open, setOpen] = useState(false);
407
+ async function onClick() {
408
+ if (contextData) {
409
+ await setCopied({ referralCode: contextData.referralCode });
410
+ contextData.refresh();
411
+ }
412
+ // Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
413
+ // Only if called from a user-initiated event
414
+ navigator.clipboard.writeText(copyString);
415
+ setOpen(true);
416
+ setTimeout(() => setOpen(false), props.tooltiplifespan);
417
+ sendLoadEvent({
418
+ eventMeta: {
419
+ programId,
420
+ id: user === null || user === void 0 ? void 0 : user.id,
421
+ accountId: user === null || user === void 0 ? void 0 : user.accountId,
422
+ type: "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",
423
+ meta: {
424
+ engagementMedium,
425
+ shareMedium: "DIRECT",
426
+ },
427
+ },
428
+ });
429
+ }
430
+ return { ...props, onClick, open, copyString: copyString };
431
+ }
432
+
433
+ const MessageLinkQuery$1 = dist.gql `
434
+ query (
435
+ $programId: ID
436
+ $engagementMedium: UserEngagementMedium!
437
+ $shareMedium: ReferralShareMedium!
438
+ ) {
439
+ viewer {
440
+ ... on User {
441
+ messageLink(
442
+ programId: $programId
443
+ engagementMedium: $engagementMedium
444
+ shareMedium: $shareMedium
445
+ )
446
+ shareLink(programId: $programId, engagementMedium: $engagementMedium)
447
+ }
448
+ }
449
+ }
450
+ `;
451
+ function NativeShare(props, directLink, undefinedErrorText, unsupportedPlatformText) {
452
+ const title = props.sharetitle || "Share title";
453
+ const text = props.sharetext || "Share text";
454
+ if (directLink === "undefined") {
455
+ return alert(undefinedErrorText);
456
+ }
457
+ if (window.navigator.share) {
458
+ window.navigator
459
+ .share({
460
+ title,
461
+ text,
462
+ url: directLink,
463
+ })
464
+ .catch((error) => console.error("Error on web share", error));
465
+ }
466
+ else {
467
+ alert(unsupportedPlatformText);
468
+ }
469
+ }
470
+ function FacebookShare(directLink, messageLink, errorText) {
471
+ if (messageLink === "undefined" || directLink === "undefined") {
472
+ return alert(errorText);
473
+ }
474
+ if (typeof SquatchAndroid.shareOnFacebook !== "undefined") {
475
+ return SquatchAndroid.shareOnFacebook(directLink, messageLink);
476
+ }
477
+ else {
478
+ return GenericShare(messageLink, errorText);
479
+ }
480
+ }
481
+ function GenericShare(messageLink, errorText) {
482
+ return messageLink ? (window.location.href = messageLink) : alert(errorText);
483
+ }
484
+ function useShareButton(props) {
485
+ var _a, _b, _c, _d;
486
+ const { sharetitle, sharetext, medium } = props;
487
+ const programId = props.programId ? props.programId : H();
488
+ const user = J();
489
+ const engagementMedium = B();
490
+ const variables = {
491
+ engagementMedium,
492
+ programId: programId,
493
+ shareMedium: medium.toUpperCase(),
494
+ };
495
+ const contextData = Fn(REFERRAL_CODES_NAMESPACE);
496
+ const overrideData = contextData === null || contextData === void 0 ? void 0 : contextData[medium];
497
+ // only queries if a programId is available
498
+ const res = wn(MessageLinkQuery$1, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId || overrideData !== undefined);
499
+ const [setCopied, copiedRes] = $e(SET_CODE_COPIED);
500
+ 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);
501
+ const environment = getEnvironmentSDK();
502
+ const hide = (medium.toLocaleUpperCase() === "SMS" &&
503
+ window.orientation === undefined) ||
504
+ (medium.toLocaleUpperCase() === "DIRECT" && !window.navigator.share);
505
+ 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);
506
+ async function onClick() {
507
+ if (overrideData) {
508
+ await setCopied({ referralCode: contextData.referralCode });
509
+ contextData.refresh();
510
+ }
511
+ if (medium.toLocaleUpperCase() === "FACEBOOK" &&
512
+ environment.type === "SquatchAndroid") {
513
+ FacebookShare(directLink, messageLink, props.errorText);
514
+ }
515
+ else if (medium.toLocaleUpperCase() === "DIRECT") {
516
+ NativeShare({ sharetitle, sharetext }, directLink, props.errorText, props.unsupportedPlatformText);
517
+ }
518
+ }
519
+ const isPlainLink = !(medium.toLocaleUpperCase() === "FACEBOOK" &&
520
+ environment.type === "SquatchAndroid") &&
521
+ medium.toLocaleUpperCase() !== "DIRECT" &&
522
+ messageLink;
523
+ const userAgent = window.navigator.userAgent.toLowerCase(), safari = /safari/.test(userAgent), ios = /iphone|ipod|ipad/.test(userAgent);
524
+ const openInSameTab = ios && !safari;
525
+ return {
526
+ ...props,
527
+ loading: res.loading && !(overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink),
528
+ messageLink,
529
+ isPlainLink,
530
+ onClick,
531
+ openInSameTab,
532
+ hide,
533
+ };
534
+ }
535
+
536
+ const debug = browser("sq:useBigStat");
537
+ const LOADING = "...";
538
+ const debugQuery = (query, variables, getStat) => {
539
+ const res = wn(query, variables);
540
+ if (!(res === null || res === void 0 ? void 0 : res.data) && !res.loading) {
541
+ console.error("issue getting stat:", res);
542
+ }
543
+ const stat = getStat(res);
544
+ return { ...stat, loading: res.loading };
545
+ };
546
+ const referralsCountQuery = (programId,
547
+ // locale
548
+ _, status) => {
320
549
  const programFilter = programId === "classic"
321
550
  ? { programId_exists: false }
322
551
  : { programId_eq: programId };
@@ -1230,77 +1459,365 @@ function useBigStat(props) {
1230
1459
  descriptionFontSize: props.descriptionFontSize,
1231
1460
  statFontWeight: props.statFontWeight,
1232
1461
  },
1233
- label,
1462
+ label,
1463
+ };
1464
+ }
1465
+
1466
+ function useDemoBigStat(props) {
1467
+ const { statType } = props;
1468
+ const re = useMemo(() => StatPatterns.find((re) => re.exec(statType)), [statType]);
1469
+ // triggers a re-render if the label is manually changed
1470
+ useChildElements();
1471
+ if (!(re === null || re === void 0 ? void 0 : re.exec(statType))) {
1472
+ return {
1473
+ props: {
1474
+ value: 0,
1475
+ statvalue: "!!!",
1476
+ loading: false,
1477
+ flexReverse: props.flexReverse,
1478
+ alignment: props.alignment,
1479
+ statTextColor: props.statTextColor,
1480
+ statFontSize: props.statFontSize,
1481
+ descriptionTextColor: props.descriptionTextColor,
1482
+ descriptionFontSize: props.descriptionFontSize,
1483
+ },
1484
+ label: "BAD PROP TYPE",
1485
+ };
1486
+ }
1487
+ const result = re.exec(statType);
1488
+ const queryName = result[1];
1489
+ const label = queries[queryName].label;
1490
+ return {
1491
+ props: cjs({
1492
+ statvalue: "12345",
1493
+ value: 0,
1494
+ flexReverse: props.flexReverse,
1495
+ alignment: props.alignment,
1496
+ statTextColor: props.statTextColor,
1497
+ statFontSize: props.statFontSize,
1498
+ descriptionTextColor: props.descriptionTextColor,
1499
+ descriptionFontSize: props.descriptionFontSize,
1500
+ statFontWeight: props.statFontWeight,
1501
+ }, props.demoData || {}, { arrayMerge: (_, a) => a }),
1502
+ label: label !== null && label !== void 0 ? label : "Demo Label",
1503
+ };
1504
+ }
1505
+
1506
+ function StatContainerView(props, children) {
1507
+ const divideSpace = () => {
1508
+ const spaceValue = getComputedStyle(document.documentElement).getPropertyValue(`--sl-spacing-${props.space}`);
1509
+ return `${Math.floor(parseInt(spaceValue) / 2)}rem`;
1510
+ };
1511
+ // take alignment variable and convert it to CSS flexbox alignment
1512
+ const alignment = props.alignment === "center"
1513
+ ? "center"
1514
+ : props.alignment === "right"
1515
+ ? "flex-end"
1516
+ : "flex-start";
1517
+ // Dependent on props, not feasible to move out
1518
+ const style = {
1519
+ StatContainer: {
1520
+ width: "100%",
1521
+ display: "flex",
1522
+ flexWrap: "wrap",
1523
+ alignItems: "center",
1524
+ justifyContent: alignment,
1525
+ flexDirection: "row",
1526
+ gap: `var(--sl-spacing-${props.gap})`,
1527
+ // Apply border styles conditionally based on the hideBorder prop
1528
+ "& > *": {
1529
+ "border-right": props.hideBorder
1530
+ ? "none"
1531
+ : "1px solid var(--sqm-text-subdued)",
1532
+ "padding-right": divideSpace(),
1533
+ },
1534
+ "& > :last-child": {
1535
+ "border-right": "none",
1536
+ },
1537
+ "& > ::slotted(*)": {
1538
+ "border-right": props.hideBorder
1539
+ ? "none"
1540
+ : "1px solid var(--sqm-text-subdued)",
1541
+ "padding-right": divideSpace(),
1542
+ },
1543
+ "& > ::slotted(*:last-child)": {
1544
+ "border-right": "none",
1545
+ },
1546
+ "@media screen and (max-width: 430px)": {
1547
+ "& > ::slotted(*)": {
1548
+ borderRight: "none",
1549
+ },
1550
+ },
1551
+ },
1552
+ StatFrame: {
1553
+ display: "flex",
1554
+ },
1555
+ BorderFix: {
1556
+ "border-right": "1px solid transparent",
1557
+ width: "0px",
1558
+ "margin-left": "-1px",
1559
+ },
1560
+ };
1561
+ const sheet = createStyleSheet(style);
1562
+ const styleString = sheet.toString();
1563
+ return (h("div", { class: sheet.classes.StatFrame, part: "sqm-base" },
1564
+ h("div", { class: sheet.classes.StatContainer, part: "sqm-inner-container" },
1565
+ h("style", { type: "text/css" }, styleString),
1566
+ children),
1567
+ h("div", { class: sheet.classes.BorderFix, part: "sqm-border" })));
1568
+ }
1569
+
1570
+ function PortalChangePasswordView(props) {
1571
+ const { states, callbacks } = props;
1572
+ const style = {
1573
+ Dialog: {
1574
+ padding: "0",
1575
+ "&::part(panel)": {
1576
+ background: "var(--sqm-portal-background)",
1577
+ borderRadius: "var(--sqm-border-radius-normal, var(--sl-border-radius-medium))",
1578
+ },
1579
+ "&::part(close-button)": {
1580
+ "margin-top": "var(--sl-spacing-medium)",
1581
+ },
1582
+ "&::part(body)": {
1583
+ padding: "0 var(--sl-spacing-x-large) var(--sl-spacing-x-large) var(--sl-spacing-x-large)",
1584
+ },
1585
+ },
1586
+ Error: {
1587
+ "&::part(erroralert-base)": {
1588
+ "margin-bottom": "15px",
1589
+ },
1590
+ },
1591
+ Success: {
1592
+ "&::part(successalert-base)": {
1593
+ "margin-bottom": "15px",
1594
+ },
1595
+ },
1596
+ InputContainer: {
1597
+ "& > :not(:last-child)": {
1598
+ "margin-bottom": "var(--sl-spacing-x-large)",
1599
+ },
1600
+ },
1601
+ CancelButton: {
1602
+ margin: "var(--sl-spacing-large) auto",
1603
+ width: "100%",
1604
+ },
1605
+ PasswordField: {
1606
+ marginBottom: "var(--sl-spacing-large) !important",
1607
+ display: "block",
1608
+ },
1609
+ ChangePasswordButton: {
1610
+ paddingTop: "var(--sl-spacing-x-large)",
1611
+ },
1234
1612
  };
1613
+ const sheet = createStyleSheet(style);
1614
+ const styleString = sheet.toString();
1615
+ return (h("div", null,
1616
+ h("style", { type: "text/css" }, styleString),
1617
+ h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, "onSl-hide": () => callbacks.setOpen(false) },
1618
+ h(PortalSectionView, Object.assign({}, {
1619
+ labelMargin: "x-large",
1620
+ padding: "none",
1621
+ label: (h(TextSpanView, Object.assign({}, { type: "h2" }), states.content.modalChangePasswordHeader)),
1622
+ content: (h(PortalContainerView, Object.assign({}, { direction: "column", padding: "none", gap: "32px" }),
1623
+ states.error && (h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
1624
+ h("div", { part: "erroralert-text" }, states.error))),
1625
+ states.success && (h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
1626
+ h("div", { part: "successalert-text" }, states.content.successMessage))),
1627
+ h("sl-form", { "onSl-submit": callbacks.submit },
1628
+ h("div", { class: sheet.classes.InputContainer },
1629
+ 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 }),
1630
+ 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" })),
1631
+ h(PortalContainerView, Object.assign({}, { direction: "row", padding: "none", gap: "20px" }),
1632
+ h("sl-button", { class: sheet.classes.ChangePasswordButton, type: "primary", exportparts: "base: primarybutton-base", submit: true, loading: states.loading }, states.content.changePasswordButtonText),
1633
+ h("sl-button", { class: sheet.classes.CancelButton, type: "secondary", exportparts: "base: secondarybutton-base", onClick: () => callbacks.setOpen(false) }, states.content.cancelText))))),
1634
+ }))),
1635
+ h(PortalSectionView, Object.assign({}, {
1636
+ labelMargin: "x-large",
1637
+ padding: "xxx-large",
1638
+ label: (h(TextSpanView, Object.assign({}, { type: "h2" }), states.content.portalChangePasswordHeader)),
1639
+ content: (h("sl-button", { type: "primary", exportparts: "base: primarybutton-base", onClick: () => callbacks.setOpen(true) }, states.content.portalChangePasswordButtonText)),
1640
+ }),
1641
+ h("style", { type: "text/css" }, styleString))));
1235
1642
  }
1236
1643
 
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
- };
1644
+ const style$1 = {
1645
+ Wrapper: { ...AuthWrapper, "max-width": "600px" },
1646
+ Column: AuthColumn,
1647
+ HostBlock: HostBlock,
1648
+ ":host": {
1649
+ margin: "0 auto",
1650
+ width: "100%",
1651
+ },
1652
+ ButtonsContainer: AuthButtonsContainer,
1653
+ ErrorStyle: ErrorStyles,
1654
+ };
1655
+ const vanillaStyle = `
1656
+ sqm-portal-register {
1657
+ margin: 0 auto;
1658
+ width: 100%;
1659
+ display: block;
1660
+ }
1661
+
1662
+ :host{
1663
+ display: block;
1664
+ }
1665
+
1666
+ :host([hidden]) {
1667
+ display: none;
1668
+ }
1669
+ `;
1670
+ const sheet$1 = createStyleSheet(style$1);
1671
+ const styleString$1 = sheet$1.toString();
1672
+ function PortalRegisterView(props) {
1673
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
1674
+ const { states, refs, callbacks, content } = props;
1675
+ if (states.error) {
1676
+ window.scrollTo({ top: 0, left: 0, behavior: "smooth" });
1257
1677
  }
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
- };
1678
+ return (h("div", { class: sheet$1.classes.Wrapper, part: "sqm-base" },
1679
+ h("style", { type: "text/css" },
1680
+ vanillaStyle,
1681
+ styleString$1),
1682
+ h(TextSpanView, { type: "h3" }, content.pageLabel),
1683
+ h("sl-form", { class: sheet$1.classes.Column, "onSl-submit": callbacks.submit, ref: (el) => (refs.formRef.current = el), novalidate: true },
1684
+ states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
1685
+ h("div", { part: "erroralert-text" }, props.states.error))),
1686
+ content.formData,
1687
+ !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 }) => {
1688
+ if (!value) {
1689
+ return content.requiredFieldErrorMessage;
1690
+ }
1691
+ // this matches shoelace validation, but could be better
1692
+ if (!value.includes("@")) {
1693
+ return content.invalidEmailErrorMessage;
1694
+ }
1695
+ } }, (((_b = (_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors) === null || _b === void 0 ? void 0 : _b.email) ? {
1696
+ class: sheet$1.classes.ErrorStyle,
1697
+ helpText: ((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.validationErrors) === null || _d === void 0 ? void 0 : _d.email) ||
1698
+ content.requiredFieldErrorMessage,
1699
+ }
1700
+ : [])))),
1701
+ !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 })),
1702
+ content.passwordField,
1703
+ !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) ? {
1704
+ value: (_j = (_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.initialData) === null || _j === void 0 ? void 0 : _j.confirmPassword,
1705
+ }
1706
+ : {}), (((_l = (_k = states.registrationFormState) === null || _k === void 0 ? void 0 : _k.validationErrors) === null || _l === void 0 ? void 0 : _l.confirmPassword) ? {
1707
+ class: sheet$1.classes.ErrorStyle,
1708
+ helpText: ((_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.validationErrors) === null || _o === void 0 ? void 0 : _o.confirmPassword) || content.requiredFieldErrorMessage,
1709
+ }
1710
+ : [])))),
1711
+ content.terms,
1712
+ h("div", { class: sheet$1.classes.ButtonsContainer },
1713
+ h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
1714
+ content.secondaryButton))));
1275
1715
  }
1276
1716
 
1277
- function CardFeedView(props, children) {
1278
- // Dependent on props, not feasiable to move out
1717
+ const style$2 = {
1718
+ ErrorStyle: {
1719
+ "&::part(control)": {
1720
+ background: "var(--sl-color-danger-10)",
1721
+ borderColor: "var(--sl-color-danger-500)",
1722
+ outline: "var(--sl-color-danger-500)",
1723
+ },
1724
+ "&:host": {
1725
+ "--focus-ring": "0 0 0 var(--sl-focus-ring-width) red !important",
1726
+ },
1727
+ },
1728
+ ErrorMessageStyle: {
1729
+ margin: 0,
1730
+ marginTop: "5px",
1731
+ color: "var(--sl-color-danger-500)",
1732
+ fontSize: "var(--sl-input-help-text-font-size-medium)",
1733
+ fontFamily: "var(--sl-font-sans)",
1734
+ fontWeight: "var(--sl-font-weight-normal)",
1735
+ },
1736
+ FieldContainer: {
1737
+ "margin-bottom": "var(--sl-spacing-large)",
1738
+ },
1739
+ };
1740
+ const vanillaStyle$1 = `
1741
+ :host {
1742
+ margin: 0 auto;
1743
+ width: 100%;
1744
+ display: block;
1745
+ }
1746
+ sl-checkbox::part(label){
1747
+ font-size: var(--sl-input-label-font-size-small);
1748
+ font-weight: var(--sl-font-weight-normal);
1749
+ line-height: 20px;
1750
+ }
1751
+ sl-checkbox::part(base){
1752
+ align-items: start;
1753
+ }
1754
+ `;
1755
+ jss.setup(create());
1756
+ const sheet$2 = jss.createStyleSheet(style$2);
1757
+ const styleString$2 = sheet$2.toString();
1758
+ function CheckboxFieldView(props) {
1759
+ var _b, _c;
1760
+ const { states, content, callbacks } = props;
1761
+ return (h("div", { class: sheet$2.classes.FieldContainer, part: "sqm-base" },
1762
+ h("style", { type: "text/css" },
1763
+ vanillaStyle$1,
1764
+ styleString$2),
1765
+ h("sl-checkbox", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.checkboxName}`, checked: states.checked, "onSl-change": (e) => {
1766
+ e.target.value = e.target.checked;
1767
+ callbacks.setChecked(e.target.value);
1768
+ } }, (!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({
1769
+ id: content.checkboxName + "-message",
1770
+ defaultMessage: content.checkboxLabel,
1771
+ }, {
1772
+ labelLink: (h("a", { href: content.checkboxLabelLink, target: "_blank" }, content.checkboxLabelLinkText || content.checkboxLabelLink)),
1773
+ }))));
1774
+ }
1775
+
1776
+ function ChangeMarktingView(props) {
1777
+ const { states, callbacks } = props;
1778
+ const { text, formState } = states;
1779
+ const { error } = formState;
1279
1780
  const style = {
1280
1781
  Container: {
1281
- columnGap: props.gap + "px",
1282
- columnWidth: props.width + "px",
1283
- "& > div": {
1284
- marginBottom: "24px",
1782
+ display: "flex",
1783
+ flexDirection: "column",
1784
+ gap: "var(--sl-spacing-x-small)",
1785
+ padding: "0 var(--sl-spacing-xxx-large) var(--sl-spacing-xxx-large)",
1786
+ },
1787
+ SubmitButton: { marginBottom: "var(--sl-spacing-medium)" },
1788
+ Error: {
1789
+ "&::part(erroralert-base)": {
1790
+ "margin-bottom": "15px",
1791
+ },
1792
+ },
1793
+ Success: {
1794
+ "&::part(successalert-base)": {
1795
+ "margin-bottom": "15px",
1285
1796
  },
1286
1797
  },
1287
1798
  };
1288
1799
  const sheet = createStyleSheet(style);
1289
1800
  const styleString = sheet.toString();
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)));
1801
+ return (h("div", { class: sheet.classes.Container, part: "sqm-base" },
1802
+ h("style", { type: "text/css" }, styleString),
1803
+ h(TextSpanView, Object.assign({}, { type: "h2" }), text.emailPreferencesHeader),
1804
+ h("sl-form", { "onSl-submit": callbacks.onSubmit },
1805
+ h(CheckboxFieldView, { states: {
1806
+ checked: states.formState.marketingEmailOptIn,
1807
+ }, content: {
1808
+ checkboxLabel: text.marketingCheckboxLabel,
1809
+ checkboxName: "marketingEmailOptIn",
1810
+ }, callbacks: {
1811
+ setChecked: callbacks.setChecked,
1812
+ } }),
1813
+ h("sl-button", { class: sheet.classes.SubmitButton, type: "primary", submit: true, loading: states.loading, disabled: states.submitDisabled }, text.submitChangeButtonText),
1814
+ error && (h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
1815
+ h("div", { part: "erroralert-text" }, error))),
1816
+ states.success && (h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
1817
+ h("div", { part: "successalert-text" }, states.text.successMessage))))));
1301
1818
  }
1302
1819
 
1303
- const style$1 = {
1820
+ const style$3 = {
1304
1821
  Description: {
1305
1822
  "& .icon": {
1306
1823
  color: "var(--sqm-text)",
@@ -1345,13 +1862,13 @@ const style$1 = {
1345
1862
  },
1346
1863
  },
1347
1864
  };
1348
- const sheet$1 = createStyleSheet(style$1);
1349
- const styleString$1 = sheet$1.toString();
1865
+ const sheet$3 = createStyleSheet(style$3);
1866
+ const styleString$3 = sheet$3.toString();
1350
1867
  function Details(props) {
1351
1868
  const rid = Math.random().toString(36).slice(2);
1352
1869
  return (h("div", { style: { opacity: props.opacity } },
1353
- h("style", { type: "text/css" }, styleString$1),
1354
- h("span", { class: sheet$1.classes.Description },
1870
+ h("style", { type: "text/css" }, styleString$3),
1871
+ h("span", { class: sheet$3.classes.Description },
1355
1872
  h("input", { type: "checkbox", id: "details-" + rid }),
1356
1873
  h("label", { class: "details", htmlFor: "details-" + rid },
1357
1874
  h("sl-icon", { class: "icon", exportparts: "base: chevron-icon", name: "chevron-down" })),
@@ -1373,7 +1890,7 @@ const GreyGift = () => {
1373
1890
  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" })));
1374
1891
  };
1375
1892
 
1376
- const style$2 = {
1893
+ const style$4 = {
1377
1894
  ProgressBar: {
1378
1895
  "& .progress-bar": {
1379
1896
  height: "0",
@@ -1486,14 +2003,14 @@ const style$2 = {
1486
2003
  },
1487
2004
  },
1488
2005
  };
1489
- const sheet$2 = createStyleSheet(style$2, { classNamePrefix: "sqm-prog-bar" });
1490
- const styleString$2 = sheet$2.toString();
2006
+ const sheet$4 = createStyleSheet(style$4, { classNamePrefix: "sqm-prog-bar" });
2007
+ const styleString$4 = sheet$4.toString();
1491
2008
  function ProgressBarView(props) {
1492
2009
  const { progress = 0, goal = 1, steps = false, progressBarUnit = "", repeatable = false, complete = false, expired = false, finite = 0, opacity = "1", } = props;
1493
2010
  let aggregate = buildProgressBar(repeatable, steps, props);
1494
2011
  const { columns, items } = aggregate;
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),
2012
+ return (h("div", { class: sheet$4.classes.ProgressBar, "data-expired": expired, "data-complete": complete, "data-steps": steps, "data-done": goal <= progress, style: { opacity: opacity } },
2013
+ h("style", { type: "text/css" }, styleString$4),
1497
2014
  h("div", { class: (!Boolean(finite) && progress >= 2 * goal) ||
1498
2015
  (Boolean(finite) && progress > 2 * goal)
1499
2016
  ? "progress-bar repeatable-steps"
@@ -2046,402 +2563,109 @@ function TaskCardView(props) {
2046
2563
  } }, content.buttonText)))))))));
2047
2564
  }
2048
2565
 
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
- }))));
2179
- }
2180
-
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 = `
2192
- :host{
2193
- display: block;
2194
- width: 100%;
2195
- }
2196
- `;
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
- }, type: "secondary", 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
- };
2566
+ function PoweredByImg({ color = "#A6A6A6", width = 120, height = 16, }) {
2567
+ return (h("svg", { width: width, height: height, viewBox: "0 0 1662 254", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
2568
+ h("path", { d: "M801.082 253.58L869.382 1.67969", stroke: color, "stroke-width": "3" }),
2569
+ 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 }),
2570
+ h("path", { d: "M135.882 89.2798H115.582V187.58H135.882V89.2798Z", fill: color }),
2571
+ 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 }),
2572
+ 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 }),
2573
+ 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 }),
2574
+ 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 }),
2575
+ 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 }),
2576
+ 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 }),
2577
+ 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 }),
2578
+ 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 }),
2579
+ 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 }),
2580
+ h("path", { d: "M135.882 89.2798H115.582V187.58H135.882V89.2798Z", fill: color }),
2581
+ 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 }),
2582
+ 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 }),
2583
+ 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 }),
2584
+ 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 }),
2585
+ 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 }),
2586
+ 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 }),
2587
+ 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 }),
2588
+ 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 }),
2589
+ 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 }),
2590
+ 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 }),
2591
+ h("path", { d: "M1208.57 104.5L1172.3 202H1161.96L1125.5 104.5H1136.61L1167.03 189.715L1197.45 104.5H1208.57Z", fill: color }),
2592
+ 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 }),
2593
+ 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 }),
2594
+ 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 }),
2595
+ 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 }),
2596
+ 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 })));
2597
+ }
2312
2598
 
2313
- function LeaderboardView(props) {
2314
- var _a, _b, _c;
2315
- const { states, data, elements } = props;
2316
- const { styles } = states;
2599
+ const vanillaStyle$2 = `
2600
+ :host{
2601
+ margin: 0 auto;
2602
+ width: 100%;
2603
+ }
2604
+ a{
2605
+ cursor:pointer;
2606
+ color: var(--sqm-text-subdued);
2607
+ text-decoration: none ;
2608
+ }
2609
+ `;
2610
+ function PortalFooterView(props) {
2317
2611
  const style = {
2318
- Leaderboard: {
2319
- "& table": {
2320
- width: "100%",
2321
- borderCollapse: "collapse",
2322
- background: styles.background || "transparent",
2323
- borderRadius: styles.borderRadius ? `${styles.borderRadius}px` : "0",
2324
- },
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)",
2331
- },
2332
- "& tr:not(:first-child)": {
2333
- borderTop: `var(--sqm-bordr-thickness) solid ${styles.borderColor || "var(--sqm-border-color)"}`,
2334
- },
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%",
2612
+ RowContainer: {
2613
+ display: "flex",
2614
+ "& > :not(:last-child)": {
2615
+ "margin-right": "var(--sl-spacing-large)",
2358
2616
  },
2359
- "& .Score": {
2360
- width: "auto",
2361
- whiteSpace: "nowrap",
2617
+ },
2618
+ Container: {
2619
+ display: "flex",
2620
+ "flex-direction": "column",
2621
+ "align-items": "center",
2622
+ "font-size": "var(--sl-font-size-small)",
2623
+ color: "var(--sqm-text-subdued)",
2624
+ "padding-top": `var(--sl-spacing-${props.paddingTop})`,
2625
+ "padding-right": `var(--sl-spacing-${props.paddingRight})`,
2626
+ "padding-bottom": `var(--sl-spacing-${props.paddingBottom})`,
2627
+ "padding-left": `var(--sl-spacing-${props.paddingLeft})`,
2628
+ "row-gap": `var(--sl-spacing-small)`,
2629
+ "& a:hover": {
2630
+ color: "var(--sqm-text)",
2362
2631
  },
2363
- "& .Rank": {
2364
- whiteSpace: "nowrap",
2632
+ },
2633
+ SupportText: {
2634
+ textAlign: "center",
2635
+ margin: 0,
2636
+ },
2637
+ PoweredByLink: {
2638
+ color: "var(--sqm-text-subdued)",
2639
+ "font-size": "var(--sl-font-size-small)",
2640
+ display: "flex",
2641
+ alignItems: "center",
2642
+ svg: {
2643
+ marginTop: "2px",
2644
+ shapeRendering: "geometricprecision",
2365
2645
  },
2366
- "& .fullWidth": {
2367
- width: "100%",
2646
+ "&:hover, &:hover *": {
2647
+ color: "var(--sqm-text)",
2368
2648
  },
2369
2649
  },
2370
2650
  };
2371
2651
  const sheet = createStyleSheet(style);
2372
2652
  const styleString = sheet.toString();
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%" } },
2653
+ return (h("div", { class: sheet.classes.Container, part: "sqm-base" },
2420
2654
  h("style", { type: "text/css" },
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"))))));
2655
+ vanillaStyle$2,
2656
+ styleString),
2657
+ h("div", { class: sheet.classes.RowContainer },
2658
+ props.faqLink && (h("a", { target: "_blank", href: props.faqLink }, props.faqText)),
2659
+ props.termsLink && (h("a", { target: "_blank", href: props.termsLink }, props.termsText))),
2660
+ !props.hideSupportText && (h("p", { class: sheet.classes.SupportText }, intl.formatMessage({
2661
+ id: "supportFooter",
2662
+ defaultMessage: props.supportText,
2663
+ }, {
2664
+ email: (h("a", { target: "_blank", href: `mailto:${props.supportEmail}` }, props.supportEmail)),
2665
+ }))),
2666
+ !props.hidePoweredBy && (h("a", { class: sheet.classes.PoweredByLink, target: "_blank", href: props.poweredByLink },
2667
+ "Powered by ",
2668
+ h(PoweredByImg, { color: "currentColor" })))));
2445
2669
  }
2446
2670
 
2447
2671
  const paddingList = [
@@ -2562,54 +2786,45 @@ function HeroView(props) {
2562
2786
  }
2563
2787
 
2564
2788
  `;
2565
- // NOTE: Spacing on the columns is controlled on the slots itself. For example using inline styling
2566
- return (h("div", { class: sheet.classes.Container, part: "sqm-base" },
2567
- h("style", { type: "text/css" },
2568
- vanillaStyle,
2569
- styleString),
2570
- states.columns == 2 ? (h("div", { class: sheet.classes.TwoColumnContainer, part: "sqm-two-col-container" },
2571
- h("div", { part: "sqm-two-col-primary-col", class: `${sheet.classes.ColumnWrapper} ${sheet.classes.ColumnPadding}` }, content.primaryColumn),
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))));
2573
- }
2574
-
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
- : [])))));
2789
+ // NOTE: Spacing on the columns is controlled on the slots itself. For example using inline styling
2790
+ return (h("div", { class: sheet.classes.Container, part: "sqm-base" },
2791
+ h("style", { type: "text/css" },
2792
+ vanillaStyle,
2793
+ styleString),
2794
+ states.columns == 2 ? (h("div", { class: sheet.classes.TwoColumnContainer, part: "sqm-two-col-container" },
2795
+ h("div", { part: "sqm-two-col-primary-col", class: `${sheet.classes.ColumnWrapper} ${sheet.classes.ColumnPadding}` }, content.primaryColumn),
2796
+ 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))));
2610
2797
  }
2611
2798
 
2612
- const style$7 = {
2799
+ function ReferralIframeView(props) {
2800
+ const { states, data } = props;
2801
+ const { content } = states;
2802
+ // dependent on props
2803
+ const style = {
2804
+ Container: {
2805
+ position: "relative",
2806
+ width: content.iframeWidth,
2807
+ height: content.iframeHeight,
2808
+ },
2809
+ IFrame: {
2810
+ position: "absolute",
2811
+ width: "100%",
2812
+ height: "100%",
2813
+ border: "0",
2814
+ top: "0",
2815
+ left: "0",
2816
+ right: "0",
2817
+ },
2818
+ };
2819
+ // JSS config
2820
+ const sheet = createStyleSheet(style);
2821
+ const styleString = sheet.toString();
2822
+ return (h("div", { class: sheet.classes.Container },
2823
+ h("style", { type: "text/css" }, styleString),
2824
+ h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?rsCode=${data.shareCode}` })));
2825
+ }
2826
+
2827
+ const style$5 = {
2613
2828
  ErrorStyle: ErrorStyles,
2614
2829
  FieldsContainer: {
2615
2830
  "& sl-input": {
@@ -2617,7 +2832,7 @@ const style$7 = {
2617
2832
  },
2618
2833
  },
2619
2834
  };
2620
- const vanillaStyle$4 = `
2835
+ const vanillaStyle$3 = `
2621
2836
  :host {
2622
2837
  margin: 0 auto;
2623
2838
  width: 100%;
@@ -2634,7 +2849,7 @@ const vanillaStyle$4 = `
2634
2849
  background-color: var(--sqm-input-background, #fff);
2635
2850
  border-radius: var(--sqm-input-border-radius, var(--sl-input-border-radius-large), 0.25rem);
2636
2851
  color: var(--sqm-input-color, white);
2637
- border-width: var(--sqm-border-thickness, 1px);
2852
+ border-width: var(--sqm-border-width, 1px);
2638
2853
  }
2639
2854
 
2640
2855
  sl-input::part(base):focus,
@@ -2654,21 +2869,21 @@ sl-input {
2654
2869
  }
2655
2870
 
2656
2871
  `;
2657
- const sheet$7 = createStyleSheet(style$7);
2658
- const styleString$7 = sheet$7.toString();
2872
+ const sheet$5 = createStyleSheet(style$5);
2873
+ const styleString$5 = sheet$5.toString();
2659
2874
  function NameFieldsView(props) {
2660
2875
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
2661
2876
  const { states } = props;
2662
2877
  const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
2663
- return (h("div", { class: sheet$7.classes.FieldsContainer },
2878
+ return (h("div", { class: sheet$5.classes.FieldsContainer },
2664
2879
  h("style", { type: "text/css" },
2665
- vanillaStyle$4,
2666
- styleString$7),
2880
+ vanillaStyle$3,
2881
+ styleString$5),
2667
2882
  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) ? {
2668
2883
  value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g.firstName,
2669
2884
  }
2670
2885
  : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) ? {
2671
- class: sheet$7.classes.ErrorStyle,
2886
+ class: sheet$5.classes.ErrorStyle,
2672
2887
  helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) || "Cannot be empty",
2673
2888
  }
2674
2889
  : []))),
@@ -2676,206 +2891,98 @@ function NameFieldsView(props) {
2676
2891
  value: (_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.initialData) === null || _o === void 0 ? void 0 : _o.lastName,
2677
2892
  }
2678
2893
  : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) ? {
2679
- class: sheet$7.classes.ErrorStyle,
2894
+ class: sheet$5.classes.ErrorStyle,
2680
2895
  helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) || "Cannot be empty",
2681
2896
  }
2682
2897
  : [])))));
2683
2898
  }
2684
2899
 
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))))));
2900
+ const style$6 = {
2901
+ ErrorStyle: {
2902
+ "--sl-input-border-color": "var(--sl-color-danger-500)",
2903
+ "--sl-input-background-color": "var(--sl-color-danger-10)",
2904
+ "--sl-input-border-color-focus": "var(--sl-color-danger-500)",
2905
+ "--sl-input-border-color-hover": "var(--sl-color-danger-500)",
2906
+ },
2907
+ ErrorMessageStyle: {
2908
+ margin: 0,
2909
+ color: "var(--sl-color-danger-500)",
2910
+ fontSize: "var(--sl-input-help-text-font-size-medium)",
2911
+ },
2912
+ FieldContainer: {
2913
+ "margin-bottom": "var(--sl-spacing-large)",
2914
+ },
2915
+ };
2916
+ const vanillaStyle$4 = `
2917
+ :host {
2918
+ margin: 0 auto;
2919
+ width: 100%;
2920
+ display: block;
2921
+ }
2922
+ sl-select::part(label){
2923
+ font-size: var(--sl-input-label-font-size-small);
2924
+ font-weight: var(--sl-font-weight-semibold);
2727
2925
  }
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
- }
2739
2926
  `;
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" },
2927
+ jss.setup(create());
2928
+ const sheet$6 = jss.createStyleSheet(style$6);
2929
+ const styleString$6 = sheet$6.toString();
2930
+ function DropdownFieldView(props) {
2931
+ var _a, _b, _c, _d, _e, _f, _g;
2932
+ const { states, content } = props;
2933
+ const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
2934
+ return (h("div", { class: sheet$6.classes.FieldContainer, part: "sqm-base" },
2784
2935
  h("style", { type: "text/css" },
2785
- vanillaStyle$5,
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)));
2936
+ vanillaStyle$4,
2937
+ styleString$6),
2938
+ 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]) ? {
2939
+ value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.dropdownName],
2940
+ }
2941
+ : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) ? {
2942
+ class: sheet$6.classes.ErrorStyle,
2943
+ }
2944
+ : [])), content.selectOptions),
2945
+ (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) && (h("p", { class: sheet$6.classes.ErrorMessageStyle }, intl.formatMessage({
2946
+ id: `errorMessage-${content.dropdownName}`,
2947
+ defaultMessage: content.errorMessage,
2948
+ })))));
2851
2949
  }
2852
2950
 
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}` })));
2951
+ const style$7 = {
2952
+ ErrorStyle: ErrorStyles,
2953
+ FieldContainer: {
2954
+ "margin-bottom": "var(--sl-spacing-large)",
2955
+ },
2956
+ };
2957
+ const vanillaStyle$5 = `
2958
+ :host {
2959
+ margin: 0 auto;
2960
+ width: 100%;
2961
+ display: block;
2962
+ }
2963
+ `;
2964
+ jss.setup(create());
2965
+ const sheet$7 = jss.createStyleSheet(style$7);
2966
+ const styleString$7 = sheet$7.toString();
2967
+ function InputFieldView(props) {
2968
+ var _a, _b, _c, _d, _e, _f, _g;
2969
+ const { states, content } = props;
2970
+ const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
2971
+ return (h("div", { class: sheet$7.classes.FieldContainer, part: "sqm-base" },
2972
+ h("style", { type: "text/css" },
2973
+ vanillaStyle$5,
2974
+ styleString$7),
2975
+ 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]) ? {
2976
+ value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.fieldName],
2977
+ }
2978
+ : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]) ? {
2979
+ class: sheet$7.classes.ErrorStyle,
2980
+ helpText: intl.formatMessage({
2981
+ id: `errorMessage-${content.fieldName}`,
2982
+ defaultMessage: content.errorMessage || (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]),
2983
+ }),
2984
+ }
2985
+ : [])))));
2879
2986
  }
2880
2987
 
2881
2988
  const CheckMark = () => (h("svg", { width: 12, height: 10, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
@@ -3952,164 +4059,57 @@ const empty = {
3952
4059
  ...baseResponse(null, "chooseReward", null, null, false, false, null, true),
3953
4060
  };
3954
4061
 
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
- }
3970
- }
3971
- }
3972
- `;
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
- }
3991
- }
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);
4001
- }
4002
- }
4003
- function GenericShare(messageLink, errorText) {
4004
- return messageLink ? (window.location.href = messageLink) : alert(errorText);
4005
- }
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(),
4062
+ function CardFeedView(props, children) {
4063
+ // Dependent on props, not feasiable to move out
4064
+ const style = {
4065
+ Container: {
4066
+ columnGap: props.gap + "px",
4067
+ columnWidth: props.width + "px",
4068
+ "& > div": {
4069
+ marginBottom: "24px",
4070
+ },
4071
+ },
4016
4072
  };
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);
4073
+ const sheet = createStyleSheet(style);
4074
+ const styleString = sheet.toString();
4075
+ const vanillaStyle = `
4076
+ :host{
4077
+ display: block;
4039
4078
  }
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
- };
4079
+
4080
+ `;
4081
+ return (h("div", null,
4082
+ h("style", { type: "text/css" },
4083
+ styleString,
4084
+ vanillaStyle),
4085
+ h("div", { class: sheet.classes.Container, part: "sqm-base" }, children)));
4056
4086
  }
4057
4087
 
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)
4088
+ function CouponCodeView(props) {
4089
+ const error = !props.loading && props.error;
4090
+ const style = {
4091
+ HostBlock: HostBlock,
4092
+ couponCodeLabel: {
4093
+ margin: "var(--sl-spacing-x-small) 0",
4094
+ color: props.textColor || "var(--sqm-text-subdued)",
4095
+ fontSize: "var(--sl-font-size-small)",
4096
+ },
4097
+ };
4098
+ const vanillaStyle = `
4099
+ :host{
4100
+ display: block;
4101
+ width: 100%;
4074
4102
  }
4075
4103
  `;
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 };
4104
+ const sheet = createStyleSheet(style);
4105
+ const styleString = sheet.toString();
4106
+ return (h("div", null,
4107
+ h("style", { type: "text/css" },
4108
+ styleString,
4109
+ vanillaStyle),
4110
+ h("p", { class: sheet.classes.couponCodeLabel, style: { textAlign: props.textAlign } }, props.couponCodeLabel),
4111
+ error ? (h("sqm-form-message", { type: props.errorType, exportparts: "erroralert-icon" },
4112
+ h("div", { part: "erroralert-text" }, props.errorText))) : (h(CopyTextView, Object.assign({}, props)))));
4113
4113
  }
4114
4114
 
4115
4115
  const map = new Map();
@@ -4146,4 +4146,4 @@ const ShadowViewAddon = ({ story }, children) => {
4146
4146
  h(TagName, { "stencilbook-shadow-view": randomInt })));
4147
4147
  };
4148
4148
 
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 };
4149
+ 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, ShadowViewAddon as O, PortalFrameView as P, useBigStat as Q, ReferralIframeView as R, ShareButtonView as S, TaskCardView as T, withShadowView as U, demoRewardExchange as V, 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 };