@saasquatch/mint-components 1.12.0-6 → 1.12.0-8
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.
- package/dist/cjs/{ShadowViewAddon-13173901.js → ShadowViewAddon-040cffad.js} +38 -36
- package/dist/cjs/{global-e4ebdbcc.js → global-c3637175.js} +10 -161
- package/dist/cjs/{index.module-236d0403.js → index.module-b8d9d0ba.js} +228 -1392
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{luxon-20eafbd9.js → luxon-05098e19.js} +1 -1
- package/dist/cjs/mint-components.cjs.js +4 -4
- package/dist/cjs/{mockRewardData-3c470512.js → mockRewardData-4258e067.js} +1 -1
- package/dist/cjs/{re-render-5de6631a.js → re-render-5bde3d2e.js} +2 -2
- package/dist/cjs/sqm-asset-card.cjs.entry.js +3 -3
- package/dist/cjs/sqm-banking-info-form_16.cjs.entry.js +414 -415
- package/dist/cjs/sqm-big-stat_39.cjs.entry.js +113 -72
- package/dist/cjs/sqm-close-button.cjs.entry.js +3 -3
- package/dist/cjs/sqm-code-verification.cjs.entry.js +6 -7
- package/dist/cjs/sqm-context-router.cjs.entry.js +3 -3
- package/dist/cjs/sqm-email-verification.cjs.entry.js +24 -25
- package/dist/cjs/sqm-empty_4.cjs.entry.js +6 -6
- package/dist/cjs/sqm-form-message.cjs.entry.js +2 -2
- package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +3 -3
- package/dist/cjs/sqm-header-logo.cjs.entry.js +2 -2
- package/dist/cjs/sqm-instant-access-registration.cjs.entry.js +6 -6
- package/dist/cjs/{sqm-invoice-table-view-e530775f.js → sqm-invoice-table-view-5d3a2d35.js} +1 -1
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +8 -9
- package/dist/cjs/sqm-logout-current-user.cjs.entry.js +7 -8
- package/dist/cjs/{sqm-navigation-sidebar-item-view-fc865ecf.js → sqm-navigation-sidebar-item-view-a2135064.js} +1 -1
- package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +4 -4
- package/dist/cjs/sqm-navigation-sidebar.cjs.entry.js +3 -3
- package/dist/cjs/sqm-password-field.cjs.entry.js +4 -4
- package/dist/cjs/sqm-popup-container.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-portal-email-verification-view-4bc2760b.js → sqm-portal-email-verification-view-050dbe0f.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +5 -5
- package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +4 -4
- package/dist/cjs/sqm-portal-logout.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-portal-profile-view-cbab7c80.js → sqm-portal-profile-view-d97086bc.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +11 -12
- package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +3 -3
- package/dist/cjs/sqm-portal-registration-form.cjs.entry.js +6 -7
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +4 -4
- package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +3 -3
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +16 -17
- package/dist/cjs/sqm-referred-registration.cjs.entry.js +6 -6
- package/dist/cjs/sqm-rewards-table-customer-note-cell.cjs.entry.js +2 -2
- package/dist/cjs/sqm-rewards-table-customer-note-column.cjs.entry.js +4 -4
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +61 -62
- package/dist/cjs/sqm-scroll.cjs.entry.js +2 -2
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +17 -15
- package/dist/cjs/sqm-tab.cjs.entry.js +4 -4
- package/dist/cjs/sqm-tabs.cjs.entry.js +5 -5
- package/dist/cjs/sqm-text-span.cjs.entry.js +2 -2
- package/dist/cjs/sqm-widget-verification-internal.cjs.entry.js +16 -15
- package/dist/cjs/sqm-widget-verification.cjs.entry.js +3 -3
- package/dist/cjs/{stencil-hooks.module-a5a04d8a.js → stencil-hooks.module-72742a0b.js} +4 -1
- package/dist/cjs/{useChildElements-23beb180.js → useChildElements-410d2435.js} +2 -2
- package/dist/cjs/{useInstantAccessRegistration-7c125c00.js → useInstantAccessRegistration-ccf81eae.js} +3 -3
- package/dist/cjs/{useReferralTable-54d0ba70.js → useReferralTable-824ac152.js} +13 -14
- package/dist/cjs/{useRegistrationFormState-e7e820d0.js → useRegistrationFormState-f9ce55be.js} +2 -2
- package/dist/cjs/{useVerificationEmail-35aea294.js → useVerificationEmail-6aacdb71.js} +7 -8
- package/dist/cjs/{utilities-ac5b5f2c.js → utilities-f7de6c04.js} +2 -2
- package/dist/collection/components/sqm-big-stat/useBigStat.js +6 -3
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-internal.js +8 -7
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.js +2 -0
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +21 -3
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +80 -1
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +12 -4
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +2 -2
- package/dist/esm/{ShadowViewAddon-72e231a5.js → ShadowViewAddon-69b61037.js} +12 -10
- package/dist/esm/{global-adae7650.js → global-6306a9b8.js} +10 -161
- package/dist/esm/{index.module-c0eb7dc2.js → index.module-6c840c4e.js} +222 -1389
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{luxon-63e24900.js → luxon-7600be8d.js} +1 -1
- package/dist/esm/mint-components.js +4 -4
- package/dist/esm/{mockRewardData-e6b763d1.js → mockRewardData-0eb6e778.js} +1 -1
- package/dist/esm/{re-render-5882a144.js → re-render-1bcfd0de.js} +2 -2
- package/dist/esm/sqm-asset-card.entry.js +2 -2
- package/dist/esm/sqm-banking-info-form_16.entry.js +11 -12
- package/dist/esm/sqm-big-stat_39.entry.js +58 -17
- package/dist/esm/sqm-close-button.entry.js +2 -2
- package/dist/esm/sqm-code-verification.entry.js +4 -5
- package/dist/esm/sqm-context-router.entry.js +2 -2
- package/dist/esm/sqm-email-verification.entry.js +3 -4
- package/dist/esm/sqm-empty_4.entry.js +3 -3
- package/dist/esm/sqm-form-message.entry.js +1 -1
- package/dist/esm/sqm-graphql-client-provider.entry.js +2 -2
- package/dist/esm/sqm-header-logo.entry.js +1 -1
- package/dist/esm/sqm-instant-access-registration.entry.js +5 -5
- package/dist/esm/{sqm-invoice-table-view-22bb7240.js → sqm-invoice-table-view-e9075c0b.js} +1 -1
- package/dist/esm/sqm-leaderboard-rank.entry.js +3 -4
- package/dist/esm/sqm-logout-current-user.entry.js +2 -3
- package/dist/esm/{sqm-navigation-sidebar-item-view-4715e546.js → sqm-navigation-sidebar-item-view-f8e78810.js} +1 -1
- package/dist/esm/sqm-navigation-sidebar-item.entry.js +3 -3
- package/dist/esm/sqm-navigation-sidebar.entry.js +2 -2
- package/dist/esm/sqm-password-field.entry.js +3 -3
- package/dist/esm/sqm-popup-container.entry.js +2 -2
- package/dist/esm/{sqm-portal-email-verification-view-598eb9a7.js → sqm-portal-email-verification-view-c6ac5430.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +4 -4
- package/dist/esm/sqm-portal-forgot-password.entry.js +3 -3
- package/dist/esm/sqm-portal-logout.entry.js +2 -2
- package/dist/esm/{sqm-portal-profile-view-a0f6ad48.js → sqm-portal-profile-view-15ddbec8.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +5 -6
- package/dist/esm/sqm-portal-protected-route.entry.js +2 -2
- package/dist/esm/sqm-portal-registration-form.entry.js +4 -5
- package/dist/esm/sqm-portal-reset-password.entry.js +3 -3
- package/dist/esm/sqm-portal-verify-email.entry.js +2 -2
- package/dist/esm/sqm-referral-table_11.entry.js +8 -9
- package/dist/esm/sqm-referred-registration.entry.js +5 -5
- package/dist/esm/sqm-rewards-table-customer-note-cell.entry.js +1 -1
- package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +3 -3
- package/dist/esm/sqm-rewards-table_9.entry.js +8 -9
- package/dist/esm/sqm-scroll.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +15 -13
- package/dist/esm/sqm-tab.entry.js +3 -3
- package/dist/esm/sqm-tabs.entry.js +4 -4
- package/dist/esm/sqm-text-span.entry.js +1 -1
- package/dist/esm/sqm-widget-verification-internal.entry.js +10 -9
- package/dist/esm/sqm-widget-verification.entry.js +2 -2
- package/dist/esm/{stencil-hooks.module-3c7f7c90.js → stencil-hooks.module-ac12ca1c.js} +1 -1
- package/dist/esm/{useChildElements-fe94b660.js → useChildElements-fc84e640.js} +2 -2
- package/dist/esm/{useInstantAccessRegistration-670c1b98.js → useInstantAccessRegistration-8b0a4556.js} +3 -3
- package/dist/esm/{useReferralTable-52008143.js → useReferralTable-f6ffa103.js} +4 -5
- package/dist/esm/{useRegistrationFormState-4cfd1a8d.js → useRegistrationFormState-849e27f7.js} +2 -2
- package/dist/esm/{useVerificationEmail-02b78bd7.js → useVerificationEmail-c32696ba.js} +2 -3
- package/dist/esm/{utilities-98445452.js → utilities-443732be.js} +2 -2
- package/dist/esm-es5/ShadowViewAddon-69b61037.js +1 -0
- package/dist/esm-es5/global-6306a9b8.js +285 -0
- package/dist/esm-es5/index.module-6c840c4e.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{luxon-63e24900.js → luxon-7600be8d.js} +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/{mockRewardData-e6b763d1.js → mockRewardData-0eb6e778.js} +1 -1
- package/dist/esm-es5/{re-render-5882a144.js → re-render-1bcfd0de.js} +1 -1
- package/dist/esm-es5/sqm-asset-card.entry.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_39.entry.js +1 -1
- package/dist/esm-es5/sqm-close-button.entry.js +1 -1
- package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-context-router.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/sqm-form-message.entry.js +1 -1
- package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm-es5/sqm-header-logo.entry.js +1 -1
- package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
- package/dist/esm-es5/{sqm-invoice-table-view-22bb7240.js → sqm-invoice-table-view-e9075c0b.js} +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/sqm-logout-current-user.entry.js +1 -1
- package/dist/esm-es5/{sqm-navigation-sidebar-item-view-4715e546.js → sqm-navigation-sidebar-item-view-f8e78810.js} +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
- package/dist/esm-es5/sqm-password-field.entry.js +1 -1
- package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-email-verification-view-598eb9a7.js → sqm-portal-email-verification-view-c6ac5430.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-forgot-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-a0f6ad48.js → sqm-portal-profile-view-15ddbec8.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-registration-form.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-referred-registration.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table-customer-note-cell.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table-customer-note-column.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-scroll.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-tab.entry.js +1 -1
- package/dist/esm-es5/sqm-tabs.entry.js +1 -1
- package/dist/esm-es5/sqm-text-span.entry.js +1 -1
- package/dist/esm-es5/sqm-widget-verification-internal.entry.js +1 -1
- package/dist/esm-es5/sqm-widget-verification.entry.js +1 -1
- package/dist/esm-es5/{stencil-hooks.module-3c7f7c90.js → stencil-hooks.module-ac12ca1c.js} +1 -1
- package/dist/esm-es5/useChildElements-fc84e640.js +1 -0
- package/dist/esm-es5/{useInstantAccessRegistration-670c1b98.js → useInstantAccessRegistration-8b0a4556.js} +1 -1
- package/dist/esm-es5/useReferralTable-f6ffa103.js +1 -0
- package/dist/esm-es5/useRegistrationFormState-849e27f7.js +1 -0
- package/dist/esm-es5/useVerificationEmail-c32696ba.js +1 -0
- package/dist/esm-es5/{utilities-98445452.js → utilities-443732be.js} +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/{p-0ecb3019.js → p-0121e044.js} +1 -1
- package/dist/mint-components/p-012daf3c.entry.js +1 -0
- package/dist/mint-components/{p-1e40967f.entry.js → p-03dbe2ce.entry.js} +1 -1
- package/dist/mint-components/{p-65a449de.js → p-04348a9b.js} +1 -1
- package/dist/mint-components/{p-14488d1c.system.entry.js → p-04ced592.system.entry.js} +1 -1
- package/dist/mint-components/{p-78a831e0.system.entry.js → p-0527d90b.system.entry.js} +1 -1
- package/dist/mint-components/p-0893073b.entry.js +1 -0
- package/dist/mint-components/p-0c9ad5f3.system.entry.js +1 -0
- package/dist/mint-components/p-11d1b212.js +1 -0
- package/dist/mint-components/p-1649ee1e.entry.js +240 -0
- package/dist/mint-components/p-1712a9fd.entry.js +11 -0
- package/dist/mint-components/{p-cdd04337.entry.js → p-178d2d2e.entry.js} +1 -1
- package/dist/mint-components/{p-ee328054.entry.js → p-1b861be5.entry.js} +1 -1
- package/dist/mint-components/{p-4209cd94.js → p-1d27da33.js} +4 -4
- package/dist/mint-components/p-1e616d45.system.js +1 -0
- package/dist/mint-components/{p-5a2fd8e0.system.entry.js → p-1f7d7524.system.entry.js} +1 -1
- package/dist/mint-components/{p-f0fba496.system.entry.js → p-22425c71.system.entry.js} +1 -1
- package/dist/mint-components/{p-9223640e.js → p-251e7567.js} +1 -1
- package/dist/mint-components/{p-1602bf01.js → p-2816bf6a.js} +1 -1
- package/dist/mint-components/p-2868f475.entry.js +1 -0
- package/dist/mint-components/{p-0979f82e.system.js → p-2a414b2e.system.js} +2 -2
- package/dist/mint-components/p-36e9296e.system.entry.js +1 -0
- package/dist/mint-components/{p-cb45d0a8.system.js → p-370a1a73.system.js} +1 -1
- package/dist/mint-components/p-3925bcd6.entry.js +13 -0
- package/dist/mint-components/p-39e412e8.system.entry.js +1 -0
- package/dist/mint-components/{p-45d0b48a.system.entry.js → p-3e7ec0f3.system.entry.js} +1 -1
- package/dist/mint-components/{p-423821b9.system.js → p-43621f12.system.js} +1 -1
- package/dist/mint-components/p-4364001c.entry.js +12 -0
- package/dist/mint-components/{p-6a70d2d6.entry.js → p-4671e644.entry.js} +1 -1
- package/dist/mint-components/{p-f338ef55.system.js → p-4babe350.system.js} +1 -1
- package/dist/mint-components/{p-34a87e67.system.js → p-4e373c3d.system.js} +1 -1
- package/dist/mint-components/{p-ab89b44a.system.js → p-4eae91a9.system.js} +1 -1
- package/dist/mint-components/{p-ab7322f0.system.entry.js → p-51d53165.system.entry.js} +1 -1
- package/dist/mint-components/{p-4c0b7768.entry.js → p-5291891c.entry.js} +3 -3
- package/dist/mint-components/{p-0aebee07.entry.js → p-54ffae13.entry.js} +11 -11
- package/dist/mint-components/{p-34dab223.system.entry.js → p-59818690.system.entry.js} +1 -1
- package/dist/mint-components/p-5a23b560.system.entry.js +1 -0
- package/dist/mint-components/{p-00ec17d4.system.js → p-5becb2ff.system.js} +1 -1
- package/dist/mint-components/{p-a1f0d8ba.system.entry.js → p-5fba1a04.system.entry.js} +1 -1
- package/dist/mint-components/p-63ac51e1.system.entry.js +1 -0
- package/dist/mint-components/p-64491210.system.entry.js +1 -0
- package/dist/mint-components/{p-def70672.js → p-68747d88.js} +1 -1
- package/dist/mint-components/{p-95af445c.system.entry.js → p-6afb4f48.system.entry.js} +1 -1
- package/dist/mint-components/{p-cafebf8a.entry.js → p-6c928c7d.entry.js} +1 -1
- package/dist/mint-components/{p-657b290b.entry.js → p-76392386.entry.js} +1 -1
- package/dist/mint-components/p-7dd1ff31.system.entry.js +1 -0
- package/dist/mint-components/{p-d0c4f3bf.system.entry.js → p-83c9f37b.system.entry.js} +1 -1
- package/dist/mint-components/{p-cdcd825e.entry.js → p-84b25a46.entry.js} +1 -1
- package/dist/mint-components/{p-2b5b2586.system.js → p-8690f682.system.js} +1 -1
- package/dist/mint-components/{p-14beec1b.system.entry.js → p-88aac6a9.system.entry.js} +1 -1
- package/dist/mint-components/{p-45d6cde6.system.entry.js → p-88bf51b7.system.entry.js} +1 -1
- package/dist/mint-components/p-8d554a89.system.js +1 -0
- package/dist/mint-components/p-93576222.system.js +1 -0
- package/dist/mint-components/{p-d2a925d5.entry.js → p-94454880.entry.js} +1 -1
- package/dist/mint-components/{p-3ba349a3.entry.js → p-947fe79b.entry.js} +1 -1
- package/dist/mint-components/{p-ca423ca2.system.entry.js → p-9596e97c.system.entry.js} +1 -1
- package/dist/mint-components/p-974070c4.system.entry.js +1 -0
- package/dist/mint-components/p-99c15c5e.entry.js +1 -0
- package/dist/mint-components/{p-c293f586.system.entry.js → p-9cdbd1ac.system.entry.js} +1 -1
- package/dist/mint-components/{p-56b37aeb.entry.js → p-9d34f4f0.entry.js} +3 -3
- package/dist/mint-components/{p-64acc813.entry.js → p-9e0230c3.entry.js} +1 -1
- package/dist/mint-components/{p-8ccb4267.js → p-9eae245f.js} +30 -27
- package/dist/mint-components/{p-70886c65.system.entry.js → p-9ec008cb.system.entry.js} +1 -1
- package/dist/mint-components/p-a4282d02.system.entry.js +1 -0
- package/dist/mint-components/{p-a2e1af83.entry.js → p-a45b03d2.entry.js} +1 -1
- package/dist/mint-components/{p-15e01e7a.entry.js → p-a85f57bb.entry.js} +1 -1
- package/dist/mint-components/{p-dce3d296.system.js → p-ac51940e.system.js} +1 -1
- package/dist/mint-components/{p-d39da925.entry.js → p-b1e8a802.entry.js} +1 -1
- package/dist/mint-components/p-b3b5b4b7.system.entry.js +1 -0
- package/dist/mint-components/{p-3da2b3cf.system.entry.js → p-bc826117.system.entry.js} +1 -1
- package/dist/mint-components/p-bdd6bb13.js +1 -0
- package/dist/mint-components/{p-3c46b3de.system.entry.js → p-be1ae1ed.system.entry.js} +1 -1
- package/dist/mint-components/{p-cadb8dba.entry.js → p-bee1e573.entry.js} +1 -1
- package/dist/mint-components/{p-18cd88c4.system.entry.js → p-c1f4fb6d.system.entry.js} +1 -1
- package/dist/mint-components/{p-7507d72b.js → p-c3b37bbf.js} +1 -1
- package/dist/mint-components/{p-ac69b460.system.entry.js → p-c3babfa4.system.entry.js} +1 -1
- package/dist/mint-components/{p-e373b78a.entry.js → p-c510fb88.entry.js} +1 -1
- package/dist/mint-components/p-c8878e79.entry.js +1 -0
- package/dist/mint-components/p-c92a743e.entry.js +1 -0
- package/dist/mint-components/p-c9fb6102.entry.js +1 -0
- package/dist/mint-components/{p-e05ff098.system.js → p-ca809fdd.system.js} +1 -1
- package/dist/mint-components/p-cb433855.system.entry.js +1 -0
- package/dist/mint-components/{p-06c561ea.system.js → p-cd44de66.system.js} +1 -1
- package/dist/mint-components/{p-e5299352.system.js → p-ce9e7c98.system.js} +1 -1
- package/dist/mint-components/p-d238372a.system.entry.js +1 -0
- package/dist/mint-components/p-d35d8c06.entry.js +11 -0
- package/dist/mint-components/p-d468925f.entry.js +1 -0
- package/dist/mint-components/{p-7666cd3d.js → p-d7806f31.js} +6 -6
- package/dist/mint-components/{p-0db003f7.js → p-d83b0cf3.js} +153 -153
- package/dist/mint-components/{p-5c602e84.entry.js → p-dd0d79bf.entry.js} +1 -1
- package/dist/mint-components/p-def516b8.system.js +1 -0
- package/dist/mint-components/p-e01ac27c.system.js +1 -0
- package/dist/mint-components/{p-611a30f0.js → p-e0e7635a.js} +1 -1
- package/dist/mint-components/p-e12d3414.system.entry.js +1 -0
- package/dist/mint-components/p-e45a8501.system.entry.js +1 -0
- package/dist/mint-components/{p-816fb64f.system.entry.js → p-ead27698.system.entry.js} +1 -1
- package/dist/mint-components/{p-7ab14d4b.system.entry.js → p-f0806232.system.entry.js} +1 -1
- package/dist/mint-components/{p-48704504.js → p-f3053c61.js} +1 -1
- package/dist/mint-components/p-f340214f.entry.js +25 -0
- package/dist/mint-components/p-f36e33ff.entry.js +13 -0
- package/dist/mint-components/p-f450654b.system.entry.js +1 -0
- package/dist/mint-components/p-f4cbbe47.entry.js +1 -0
- package/dist/mint-components/p-f531a5c9.system.entry.js +1 -0
- package/dist/mint-components/{p-4a43ffbd.js → p-f55060db.js} +1 -1
- package/dist/mint-components/{p-b14a77e8.system.entry.js → p-f56348dc.system.entry.js} +1 -1
- package/dist/mint-components/p-f655a7df.js +1 -0
- package/dist/mint-components/{p-79097c07.entry.js → p-fbdf0738.entry.js} +1 -1
- package/dist/mint-components/{p-fda3d0ca.system.js → p-fc422446.system.js} +22 -22
- package/dist/mint-components/p-fd21ae8f.entry.js +1 -0
- package/dist/mint-components/{p-1b24bb52.js → p-fd2c5407.js} +1 -1
- package/dist/mint-components/{p-126a4f24.entry.js → p-fffc3590.entry.js} +2 -2
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +7 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +12 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +5 -0
- package/dist/types/components.d.ts +24 -0
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/index-56d1fa5b.js +0 -2227
- package/dist/esm/index-0c7b14c5.js +0 -2225
- package/dist/esm-es5/ShadowViewAddon-72e231a5.js +0 -1
- package/dist/esm-es5/global-adae7650.js +0 -285
- package/dist/esm-es5/index-0c7b14c5.js +0 -1
- package/dist/esm-es5/index.module-c0eb7dc2.js +0 -53
- package/dist/esm-es5/useChildElements-fe94b660.js +0 -1
- package/dist/esm-es5/useReferralTable-52008143.js +0 -1
- package/dist/esm-es5/useRegistrationFormState-4cfd1a8d.js +0 -1
- package/dist/esm-es5/useVerificationEmail-02b78bd7.js +0 -1
- package/dist/mint-components/p-0078bc76.system.js +0 -53
- package/dist/mint-components/p-116c1809.entry.js +0 -11
- package/dist/mint-components/p-1f02e20b.entry.js +0 -1
- package/dist/mint-components/p-253c87e1.system.entry.js +0 -1
- package/dist/mint-components/p-2632464d.entry.js +0 -1
- package/dist/mint-components/p-28450e40.system.entry.js +0 -1
- package/dist/mint-components/p-286190c4.system.entry.js +0 -1
- package/dist/mint-components/p-414b3b6c.system.entry.js +0 -1
- package/dist/mint-components/p-4185f6f5.system.entry.js +0 -1
- package/dist/mint-components/p-4606b096.entry.js +0 -12
- package/dist/mint-components/p-46a5718f.system.entry.js +0 -1
- package/dist/mint-components/p-4986a616.entry.js +0 -240
- package/dist/mint-components/p-52241ba9.system.js +0 -1
- package/dist/mint-components/p-556753b2.js +0 -42
- package/dist/mint-components/p-55dcb6ff.system.js +0 -1
- package/dist/mint-components/p-65de8fb2.js +0 -1
- package/dist/mint-components/p-696e634f.system.entry.js +0 -1
- package/dist/mint-components/p-6fbfd683.js +0 -1
- package/dist/mint-components/p-71b8adf7.system.js +0 -1
- package/dist/mint-components/p-7c4c727c.system.entry.js +0 -1
- package/dist/mint-components/p-858a87ce.entry.js +0 -1
- package/dist/mint-components/p-87bf9880.entry.js +0 -25
- package/dist/mint-components/p-89669879.system.js +0 -1
- package/dist/mint-components/p-8a7d2170.system.entry.js +0 -1
- package/dist/mint-components/p-8b7d2f44.entry.js +0 -1
- package/dist/mint-components/p-8defb972.system.entry.js +0 -1
- package/dist/mint-components/p-9cdaa099.entry.js +0 -1
- package/dist/mint-components/p-a5eedbe2.system.entry.js +0 -1
- package/dist/mint-components/p-a60ec391.system.entry.js +0 -1
- package/dist/mint-components/p-a80c8f5c.system.js +0 -1
- package/dist/mint-components/p-b28df069.js +0 -1
- package/dist/mint-components/p-b4771476.entry.js +0 -1
- package/dist/mint-components/p-c9ca8473.system.entry.js +0 -1
- package/dist/mint-components/p-cac64545.system.entry.js +0 -1
- package/dist/mint-components/p-d3293ac3.entry.js +0 -11
- package/dist/mint-components/p-d7b701a7.entry.js +0 -1
- package/dist/mint-components/p-e4c3817a.system.entry.js +0 -1
- package/dist/mint-components/p-e7797040.entry.js +0 -1
- package/dist/mint-components/p-e82eec3c.entry.js +0 -13
- package/dist/mint-components/p-e8bfd924.system.entry.js +0 -1
- package/dist/mint-components/p-e8fcaaa2.entry.js +0 -13
- package/dist/mint-components/p-ef49d744.entry.js +0 -1
- package/dist/mint-components/p-f5f0fc0e.entry.js +0 -1
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import{r as e,h as t,c as r}from"./p-64c3217a.js";import{n as s,f as a,k as n,i as o,u as i,m as l,b as c,j as d}from"./p-fd2c5407.js";import{i as u}from"./p-d83b0cf3.js";import{i as h,T as m,d as p,K as v,z as g,c as f,E as b,n as y,Q as x,w,x as k,g as C,q as E,W as I,U as S,b as R,r as T,j as q}from"./p-bdd6bb13.js";import{j as M}from"./p-e7e129ac.js";import{c as _}from"./p-c1086930.js";import"./p-02be1a88.js";import{c as N}from"./p-cef45012.js";import{a as A}from"./p-04348a9b.js";import{u as P}from"./p-c3b37bbf.js";import"./p-251e7567.js";import{g as D,a as L,s as V}from"./p-9ec99ced.js";import"./p-5d0c9424.js";import{p as F}from"./p-8d363802.js";import{R as $,u as O}from"./p-f655a7df.js";import{i as j}from"./p-0121e044.js";import{A as U}from"./p-121cdc60.js";import{b as B,V as z,B as H,Q as W,K as G,j as Z,M as K,D as Y,E as X,H as Q,I as J,W as ee,L as te,N as re,d as se,i as ae,P as ne,e as oe,f as ie,R as le,X as ce,k as de,a as ue,S as he,C as me,u as pe,c as ve,T as ge}from"./p-9eae245f.js";import"./p-c7fd9e16.js";const fe=class{constructor(t){e(this,t),this.flexReverse=!1,this.ignored=!0,s(this)}disconnectedCallback(){}render(){var e;const{props:r,label:s}=h()?B(this):z(this),a=!!(null===(e=m().innerHTML)||void 0===e?void 0:e.trim()),n=t("slot",{name:"label"},a?t("slot",null):s);return t(H,Object.assign({},r,{labelSlot:n}))}},be=class{constructor(t){e(this,t),s(this)}disconnectedCallback(){}render(){var e,s;const n=null!==(e=function(e){if(e)try{return W(e)}catch{}}(this.brandColor))&&void 0!==e?e:"",o=(null!==(s=this.brandFont)&&void 0!==s?s:"Nunito Sans").trim()||void 0;a((()=>{if(!o)return;const e=document.createElement("link");return e.setAttribute("href",function(...e){return`https://fonts.googleapis.com/css2?${e.map((e=>`family=${encodeURIComponent(e)}`)).join("&")}`}(o)),e.setAttribute("rel","stylesheet"),document.head.appendChild(e),()=>document.head.removeChild(e)}),[o]);const i=null!=o?o:"";return t(r,null,t("style",null,`\n\n :host{\n display: contents;\n }\n /* \n Selects any element placed inside a slot\n - resets css variable inheritence for fonts\n \n */\n ::slotted(*) {\n --sl-font-sans: "${i}", arial;\n --sl-input-font-family: "${i}", arial;\n --sl-tooltip-font-family: "${i}", arial;\n font-family: "${i}", arial;\n\t\t\t\n ${n}\n\n --sl-focus-ring-color-primary: var(--sl-color-primary-100);\n --sl-input-border-color-focus: var(--sl-color-primary-500);\n --sl-color-primary-hue: var(--sl-color-primary-500);\n }`),t("slot",null))}},ye=class{constructor(t){e(this,t),this.ignored=!0,this.width=347,this.gap=24,s(this)}disconnectedCallback(){}render(){return t(G,Object.assign({},D(this)),t("slot",null))}},xe=N({IconStyle:{display:"block",position:"absolute",top:"23px"},DivStyle:{marginLeft:"28px"},Details:{marginLeft:"28px"},Heading:{display:"inline-block"},Children:{display:"none"}}),we=xe.toString();function ke({missingProps:e,heading:r="There was a problem loading this section",subheading:s="There was a technical problem that prevented this section from loading. Please contact us with the link to this page.",description:a="Error occured while loading <{tagName}>. Values for the following attributes are missing:"},o){if(!e)return!1;const i=m(),[l,c]=n(!1);return t("sl-alert",{type:"danger",open:!0},t("style",{type:"text/css"},we),t("div",{slot:"icon",class:xe.classes.IconStyle},t("sl-icon",{name:"exclamation-octagon"})),t("div",{class:xe.classes.DivStyle},t("h2",{class:xe.classes.Heading},u.formatMessage({id:"error-heading",defaultMessage:r})),t("p",null,u.formatMessage({id:"error-subheading",defaultMessage:s}))),t("details",{class:xe.classes.Details},t("summary",{onClick:()=>c(!l)},l?"Less":"More"," details"),t("p",null,u.formatMessage({id:"error-description",defaultMessage:a},{tagName:i.tagName.toLowerCase()})),t("ul",null,e.map((e=>t("li",null,t("strong",null,e.attribute)))))),t("div",{class:xe.classes.Children},o))}const Ce=class{constructor(t){e(this,t),this.ignored=!0,this.checkboxLabel="By signing up you agree to the {labelLink}",this.checkboxLabelLink="https://example.com",this.checkboxLabelLinkText="Terms and Conditions",this.errorMessage="Must be checked",this.checkboxOptional=!1,s(this)}disconnectedCallback(){}render(){const e=L([{attribute:"checkbox-name",value:this.checkboxName}]);if(!h()&&e)return t(ke,{missingProps:e,heading:"An error occured while loading this form",subheading:"A technical problem prevented this checkbox field from loading. Please contact us with the link to this page.",description:"Values for the following attributes are missing:"});const r={...D(this)},{states:s,callbacks:i}=h()?_({states:{registrationFormState:{},checked:!1},callbacks:{setChecked:()=>{}}},this.demoData||{},{arrayMerge:(e,t)=>t}):function(e){var t;const r=o($),[s,i]=n(!1);return a((()=>{var t,s;(null===(t=null==r?void 0:r.initialData)||void 0===t?void 0:t[e.checkboxName])&&i(!!(null===(s=null==r?void 0:r.initialData)||void 0===s?void 0:s[e.checkboxName]))}),[null===(t=null==r?void 0:r.initialData)||void 0===t?void 0:t[e.checkboxName]]),{states:{registrationFormState:r,checked:s},callbacks:{setChecked:i}}}(this);return t(Z,{states:s,content:r,callbacks:i})}},Ee=p.gql`
|
|
2
|
+
query fuelTankRewardsQuery($programId: ID!) {
|
|
3
|
+
user: viewer {
|
|
4
|
+
... on User {
|
|
5
|
+
instantAccessRewards(
|
|
6
|
+
filter: { type_eq: FUELTANK, programId_eq: $programId }
|
|
7
|
+
) {
|
|
8
|
+
data {
|
|
9
|
+
fuelTankCode
|
|
10
|
+
fuelTankType
|
|
11
|
+
statuses
|
|
12
|
+
dateGiven
|
|
13
|
+
dateExpires
|
|
14
|
+
dateRedeemed
|
|
15
|
+
dateCancelled
|
|
16
|
+
dateScheduledFor
|
|
17
|
+
datePendingForUnhandledError
|
|
18
|
+
}
|
|
19
|
+
count
|
|
20
|
+
totalCount
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
`,Ie=p.gql`
|
|
26
|
+
mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
|
|
27
|
+
createUserAnalyticsEvent(eventMeta: $eventMeta)
|
|
28
|
+
}
|
|
29
|
+
`,Se=class{constructor(t){e(this,t),this.tooltiptext="Copied to Clipboard",this.tooltiplifespan=1e3,this.textAlign="left",this.copyButtonLabel="Copy Coupon",this.buttonStyle="icon",this.couponCodeLabel="Your coupon code:",this.cancelledErrorText="This code has been cancelled. Please reach out to the Support team for help resolving this issue.",this.redeemedErrorText="Looks like you’ve already redeemed this code.",this.expiredErrorText="Looks like this code has expired. Please reach out to the Support team for help resolving this issue.",this.fullfillmentErrorText="We couldn't fetch your code. Please try again later or reach out to the Support team for help resolving this issue.",this.pendingErrorText="Your code will be available on {unpendDate}. Mark your calendar and come back then to redeem your reward!",this.genericErrorText="We couldn't fetch your code. Please try again later or reach out to the Support team for help resolving this issue.",this.couponCodePlaceholder="...",s(this)}disconnectedCallback(){}render(){const e=D(this),r=h()?function(e){const[t,r]=n(!1),s="THANKSJANE125uv125";return _({copyString:s,tooltiptext:e.tooltiptext,textAlign:e.textAlign,buttonStyle:e.buttonStyle,copyButtonLabel:e.copyButtonLabel,error:!1,couponCodePlaceholder:e.couponCodePlaceholder,couponCodeLabel:e.couponCodeLabel,open:t,onClick:()=>{navigator.clipboard.writeText(s),r(!0),setTimeout((()=>r(!1)),e.tooltiplifespan)}},e.demoData||{},{arrayMerge:(e,t)=>t})}(e):function(e){var t,r,s;const a=v(),o=g(),i=y(),[l]=f(Ie),{data:c,loading:d}=b(Ee,{programId:o},!(null==a?void 0:a.jwt)),u=null===(s=null===(r=null===(t=null==c?void 0:c.user)||void 0===t?void 0:t.instantAccessRewards)||void 0===r?void 0:r.data)||void 0===s?void 0:s[0],h=(e=>{if(!e||!e.statuses)return"ERROR";const t=e.statuses[e.statuses.length-1];return"PENDING"===t&&null===e.dateScheduledFor?"EMPTY_TANK":t})(u),m="PENDING"===h&&u.dateScheduledFor?new Date(u.dateScheduledFor).toLocaleDateString("default",{day:"numeric",month:"long",year:"numeric"}):void 0,p=(null==u?void 0:u.fuelTankCode)||"...",[x,w]=n(!1),k=(t=>{switch(t){case"CANCELLED":return e.cancelledErrorText;case"EXPIRED":return e.expiredErrorText;case"EMPTY_TANK":return e.fullfillmentErrorText;case"PENDING":return e.pendingErrorText.replace("{unpendDate}",m);case"REDEEMED":return e.redeemedErrorText;case"AVAILABLE":return"";default:return e.genericErrorText}})(h),C=(e=>{switch(e){case"EXPIRED":case"EMPTY_TANK":case"CANCELLED":case"ERROR":return"warning";case"PENDING":return"info";case"REDEEMED":return"success";default:return}})(h),E="AVAILABLE"!==h;return{...e,onClick:function(){navigator.clipboard.writeText(p),w(!0),setTimeout((()=>w(!1)),e.tooltiplifespan),l({eventMeta:{programId:o,id:null==a?void 0:a.id,accountId:null==a?void 0:a.accountId,type:"USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",meta:{engagementMedium:i,shareMedium:"DIRECT"}}})},open:x,copyString:p,error:E,errorText:k,dateAvailable:m,loading:d,errorType:C}}(e);return t(K,Object.assign({},r))}};function Re(e,r){const s=()=>"row"===e.direction?{"border-right":e.dividerStyle||"1px solid #EAEAEA"}:{"border-bottom":e.dividerStyle||"1px solid #EAEAEA"},a={LayoutContainer:{display:"contents","& > :not(:last-child)":{...s()},"& > ::slotted(*:not(:last-child))":{...s()}}},n=`\n display: flex;\n flex: 1;\n box-sizing: border-box;\n flex-direction: ${e.direction};\n background-color: var(--sqm-content-background);\n overflow-x: clip;\n ${"column"===e.direction?"width: 100%; max-width: var(--sqm-portal-main-width);":""}\n ${null!==e.contentAreaWidth?`max-width: ${e.contentAreaWidth} !important;`:""}\n `,o=`\n :host{\n ${n}\n }\n @media screen and (max-width: 570px) {\n :host {\n display: flex;\n flex-direction: column;\n }\n }\n sqm-divided-layout {\n ${n}\n }\n `,i=N(a),l=i.toString();return t("div",{class:i.classes.LayoutContainer,part:"sqm-base"},t("style",{type:"text/css"},o,l),r)}const Te=class{constructor(t){e(this,t),this.dividerStyle="1px solid #EAEAEA",s(this)}disconnectedCallback(){}render(){return t(Re,Object.assign({},D(this)),t("slot",null))}},qe=class{constructor(t){e(this,t),this.ignored=!0,this.dropdownLabel="Select an option",this.errorMessage="Select an option",this.dropdownOptional=!1,s(this)}disconnectedCallback(){}render(){const e=L([{attribute:"dropdown-name",value:this.dropdownName}]);if(!h()&&e)return t(ke,{missingProps:e,heading:"An error occured while loading this form",subheading:"A technical problem prevented this drop down field from loading. Please contact us with the link to this page.",description:"Values for the following attributes are missing:"},t("slot",null));const r={...D(this),selectOptions:t("slot",null)},{states:s}=h()?_({states:{registrationFormState:{}}},this.demoData||{},{arrayMerge:(e,t)=>t}):{states:{registrationFormState:o($)}};return t(Y,{states:s,content:r})}},Me=p.gql`
|
|
30
|
+
query {
|
|
31
|
+
viewer {
|
|
32
|
+
... on User {
|
|
33
|
+
id
|
|
34
|
+
accountId
|
|
35
|
+
firstName
|
|
36
|
+
lastName
|
|
37
|
+
email
|
|
38
|
+
countryCode
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
`,_e=p.gql`
|
|
43
|
+
mutation (
|
|
44
|
+
$id: String!
|
|
45
|
+
$accountId: String!
|
|
46
|
+
$firstName: String!
|
|
47
|
+
$lastName: String!
|
|
48
|
+
) {
|
|
49
|
+
upsertUser(
|
|
50
|
+
userInput: {
|
|
51
|
+
id: $id
|
|
52
|
+
accountId: $accountId
|
|
53
|
+
firstName: $firstName
|
|
54
|
+
lastName: $lastName
|
|
55
|
+
}
|
|
56
|
+
) {
|
|
57
|
+
firstName
|
|
58
|
+
lastName
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
`,Ne={currentRegion:"",firstName:"",lastName:"",errors:{},error:""},Ae=class{constructor(t){e(this,t),this.ignored=!0,this.networkErrorMessage="Network request failed.",this.fieldEmptyText="Cannot be empty",this.formErrorText="Please correct the errors below to update your profile.",s(this)}disconnectedCallback(){}render(){const e=h()?function(e){return _({states:{loading:!1,submitDisabled:!1,formState:{currentRegion:"Canada",firstName:"Bill",lastName:"Bob",errors:{},error:"An error string"},user:{firstName:"Bill",lastName:"Bob",email:"billbob@example.com"},showEdit:!1,text:{editprofileheader:e.editprofileheader?e.editprofileheader:"Edit Profile",editprofiletext:e.editprofiletext?e.editprofiletext:"Update your profile.",firstnametext:e.firstnametext?e.firstnametext:"First Name",lastnametext:e.lastnametext?e.lastnametext:"Last Name",canceltext:e.canceltext?e.canceltext:"Cancel",updatetext:e.updatetext?e.updatetext:"Update",currentregiontext:e.currentregiontext?e.currentregiontext:"Region",showregion:!0,fieldEmptyText:e.fieldEmptyText}},callbacks:{onSubmit:e=>{console.log(e)},resetForm:()=>{console.log("reset")},onChange:()=>{console.log("change")},setShowEdit:e=>{console.log(e)}}},e.demoData||{},{arrayMerge:(e,t)=>t})}(D(this)):function(e){const t=v(),[r,s]=n(!1),[o,i]=n(""),[l,c]=n(void 0),[d,h]=n(Ne),m=b(Me,{},!(null==t?void 0:t.jwt)),[p,g]=f(_e);return a((()=>{!(null==g?void 0:g.loading)&&r&&((null==g?void 0:g.errors)?h((e=>{var t,r,s;return{...e,error:null===(s=null===(r=null===(t=null==g?void 0:g.errors)||void 0===t?void 0:t.response)||void 0===r?void 0:r.errors)||void 0===s?void 0:s[0].message}})):(c((e=>{var t;return{...e,...null===(t=null==g?void 0:g.data)||void 0===t?void 0:t.upsertUser}})),s(!1)))}),[null==g?void 0:g.loading]),a((()=>{c((e=>{var t;return{...e,...null===(t=null==m?void 0:m.data)||void 0===t?void 0:t.viewer}}))}),[null==m?void 0:m.data]),a((()=>{var t;(null===(t=null==g?void 0:g.errors)||void 0===t?void 0:t.message)&&h((t=>({...t,error:e.networkErrorMessage})))}),[null==g?void 0:g.errors]),{states:{loading:(null==m?void 0:m.loading)||g.loading,submitDisabled:!1,formState:d,user:l,showEdit:r,text:{editprofileheader:e.editprofileheader,editprofiletext:e.editprofiletext,firstnametext:e.firstnametext,lastnametext:e.lastnametext,canceltext:e.canceltext,updatetext:e.updatetext,currentregiontext:e.currentregiontext,showregion:e.showregion,fieldEmptyText:e.fieldEmptyText}},callbacks:{onSubmit:()=>{if(d.firstName&&d.lastName)return p({id:null==t?void 0:t.id,accountId:null==t?void 0:t.accountId,firstName:d.firstName,lastName:d.lastName}),void h((e=>({...e,errors:{}})));const r={};d.firstName||(r.firstName={message:e.fieldEmptyText}),d.lastName||(r.lastName={message:e.fieldEmptyText}),j(r)||h((t=>({...t,error:e.formErrorText}))),h((e=>({...e,errors:r})))},resetForm:()=>{var e,t,r,s,a,n;const o=(null===(t=null===(e=null==m?void 0:m.data)||void 0===e?void 0:e.viewer)||void 0===t?void 0:t.countryCode)?u.formatDisplayName(m.data.viewer.countryCode,{type:"region"}):"";c({...null===(r=m.data)||void 0===r?void 0:r.viewer,...null===(s=g.data)||void 0===s?void 0:s.upsertUser}),h({...Ne,...null===(a=m.data)||void 0===a?void 0:a.viewer,...null===(n=g.data)||void 0===n?void 0:n.upsertUser,currentRegion:o})},onChange:e=>{const{name:t,value:r}=e.target;h((e=>({...e,[t]:r})))},setShowEdit:s}}}(D(this));return t(X,Object.assign({},e))}};Ae.style=".ErrorStyles::part(base){background:var(--sl-color-danger-10);border-color:var(--sl-color-danger-500);outline:var(--sl-color-danger-500)}.ErrorStyles:host{--something-random:red;--focus-ring:0 0 0 var(--sl-focus-ring-width) red !important}.ErrorStyles::part(input){color:var(--sl-color-danger-500)}.ErrorStyles::part(input):-webkit-autofill,.ErrorStyles::part(input):-webkit-autofill:hover,.ErrorStyles::part(input):-webkit-autofill:focus,.ErrorStyles::part(input):-webkit-autofill:active{-webkit-box-shadow:0 0 0 var(--sl-input-height-large) var(--sl-input-background-color-hover) inset !important;box-shadow:0 0 0 var(--sl-input-height-large) var(--sl-input-background-color-hover) inset !important;-webkit-text-fill-color:var(--sl-color-danger-500)}.ErrorStyles::part(help-text){color:var(--sl-color-danger-500)}:host{display:block}:host([hidden]){display:none}.FormWrapper>:not(:first-child){margin-top:54px}.FormSection{width:100%}.FormSection>:not(:first-child){margin-top:16px}.ButtonWrapper{display:-ms-flexbox;display:flex;margin-top:24px;-ms-flex-pack:end;justify-content:flex-end}.ButtonWrapper>:not(:first-child){margin-left:var(--sl-font-size-x-small)}.CardWrapper{-webkit-box-sizing:border-box;box-sizing:border-box;background:var(--sl-color-white);padding:40px 30px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between}@media screen and (max-width: 499px){.CardWrapper{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}}@media screen and (max-width: 880px){.CardWrapper.ShowEdit{-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}}";const Pe=class{constructor(t){e(this,t),this.columns=1,this.minHeight=200,this.background="var(--sl-color-gray-50)",this.paddingSize="large",this.wrapDirection="wrap",s(this)}disconnectedCallback(){}render(){const e={states:{...D(this)},content:{primaryColumn:t("slot",null),secondaryColumn:t("slot",{name:"secondary-column"})}};return t(Q,Object.assign({},e))}};function De(e,r){const s=Boolean((e.header||e.description||e.buttonText)&&"overlay"===e.layout),a=N({Container:{position:"relative","&:before":{content:s?'""':"",width:"100%",height:"100%",position:"absolute",background:e.overlayColor||"var(--sl-color-primary-900)",opacity:e.overlayOpacity}},Image:{display:"block",width:"100%",height:"100%",objectFit:"cover"},Background:{backgroundImage:`url(${e.imageUrl})`,backgroundSize:"cover",backgroundPosition:e.imagePos||"center",display:"flex",justifyContent:"center",alignItems:"center"},Overlay:{zIndex:"1",padding:"calc(var(--sl-spacing-"+e.paddingText+") + var(--sl-spacing-"+e.paddingImage+"))",textAlign:"center",color:e.textColor||"var(--sl-color-neutral-0)",lineHeight:"var(--sl-line-height-dense)","@media (max-width: 599px)":{padding:"var(--sl-spacing-"+e.paddingText+")"}},Column:{display:"flex",background:e.backgroundColor||"",flexDirection:"right"===e.imagePos?"row-reverse":"row",lineHeight:"var(--sl-line-height-dense)",color:e.textColor||"var(--sl-color-neutral-900)","& .image-area":{width:e.imagePercentage?e.imagePercentage+"%":"50%",padding:"var(--sl-spacing-"+e.paddingImage+")",boxSizing:"border-box",display:"flex",justifyContent:"center",alignItems:"center","@media (max-width: 599px)":{width:"100%"}},"& .text-area":{width:e.imagePercentage?100-e.imagePercentage+"%":"50%",padding:"var(--sl-spacing-"+e.paddingText+")",alignSelf:"center",boxSizing:"border-box","@media (max-width: 599px)":{width:"100%",textAlign:"center",padding:"calc(0.5*var(--sl-spacing-"+e.paddingText+"))"}},"@media (max-width: 599px)":{flexDirection:"bottom"===e.imageMobilePos?"column-reverse":"column"}},Header:{fontSize:"var(--sl-font-size-xxx-large)",fontWeight:"var(--sl-font-weight-bold)","@media (max-width: 599px)":{fontSize:"var(--sl-font-size-xx-large)"}},Description:{fontSize:"var(--sl-font-size-x-large)",margin:"var(--sl-spacing-small) 0","@media (max-width: 599px)":{fontSize:"var(--sl-font-size-large)"}},Button:{marginTop:"var(--sl-spacing-medium)","&::part(base)":{padding:"0 var(--sl-spacing-x-large)"},"@media (max-width: 599px)":{width:"100%"}}}),n=a.toString();return t("div",{class:a.classes.Container,part:"sqm-base"},t("style",{type:"text/css"},"\n :host{\n display: block;\n }",n),"overlay"===e.layout&&t("div",{class:a.classes.Background},t("div",{class:a.classes.Overlay,part:"sqm-overlay"},e.header&&t("div",{class:a.classes.Header},e.header),e.description&&t("div",{class:a.classes.Description},e.description),e.buttonText&&t("sl-button",{class:a.classes.Button,type:"primary",onClick:()=>e.buttonNewTab?window.open(e.buttonLink):window.open(e.buttonLink,"_parent")},e.buttonText),r&&r)),"columns"===e.layout&&t("div",null,t("div",{class:a.classes.Column},t("div",{class:"image-area"},t("img",{class:a.classes.Image,src:e.imageUrl,part:"sqm-columns-image"})),t("div",{class:"text-area",part:"sqm-columns-text-area"},e.header&&t("div",{class:a.classes.Header,part:"sqm-columns-header"},e.header),e.description&&t("div",{class:a.classes.Description,part:"sqm-columns-description"},e.description),e.buttonText&&t("sl-button",{exportparts:"base: sqm-hero-image-button",class:a.classes.Button,type:"primary",onClick:()=>e.buttonNewTab?window.open(e.buttonLink):window.open(e.buttonLink,"_parent")},e.buttonText)))))}const Le=class{constructor(t){e(this,t),this.overlayOpacity="0.75",this.layout="overlay",this.imagePercentage=50,this.imagePos="center",this.imageMobilePos="top",this.buttonNewTab=!1,this.paddingText="xxxx-large",this.paddingImage="none",s(this)}disconnectedCallback(){}render(){return t(De,Object.assign({},D(this)),t("slot",null))}},Ve=class{constructor(t){e(this,t),this.ignored=!0,s(this)}disconnectedCallback(){}render(){return t(this.hookStory,null)}};function Fe(e){const r=N({Container:{display:"flex",width:"100%",justifyContent:e.alignment||"center",background:e.backgroundColor||""},Image:{minHeight:e.minHeight||"100%",width:e.width||"100%",maxWidth:"max-content",objectFit:"cover"}}),s=r.toString();return t("div",null,t("style",{type:"text/css"},s,"\n :host{\n display: block; \n }\n "),t("div",{class:r.classes.Container,part:"sqm-base"},t("img",{part:"sqm-image",src:e.imageUrl,class:r.classes.Image})))}const $e=class{constructor(t){e(this,t),this.alignment="center"}render(){return t(Fe,Object.assign({},D(this)))}},Oe=class{constructor(t){e(this,t),this.ignored=!0,this.fieldType="text",this.errorMessage="Cannot be empty",this.fieldOptional=!1,s(this)}disconnectedCallback(){}render(){const e={...D(this)},r=L([{attribute:"field-name",value:this.fieldName}]);if(!h()&&r)return t(ke,{missingProps:r,heading:"An error occured while loading this form",subheading:"A technical problem prevented this input field from loading. Please contact us with the link to this page.",description:"Values for the following attributes are missing:"});const{states:s}=h()?_({states:{registrationFormState:{}}},this.demoData||{},{arrayMerge:(e,t)=>t}):{states:{registrationFormState:o($)}};return t(J,{states:s,content:e})}},je=p.gql`
|
|
62
|
+
query (
|
|
63
|
+
$type: String!
|
|
64
|
+
$filter: UserLeaderboardFilterInput
|
|
65
|
+
$locale: RSLocale
|
|
66
|
+
$limit: Int!
|
|
67
|
+
) {
|
|
68
|
+
userLeaderboard(type: $type, filter: $filter) {
|
|
69
|
+
dateModified
|
|
70
|
+
rows(limit: $limit) {
|
|
71
|
+
textValue(locale: $locale)
|
|
72
|
+
firstName
|
|
73
|
+
lastInitial
|
|
74
|
+
rank {
|
|
75
|
+
rank
|
|
76
|
+
denseRank
|
|
77
|
+
rowNumber
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
`,Ue=p.gql`
|
|
83
|
+
query (
|
|
84
|
+
$type: String!
|
|
85
|
+
$filter: UserLeaderboardFilterInput
|
|
86
|
+
$locale: RSLocale
|
|
87
|
+
$limit: Int!
|
|
88
|
+
) {
|
|
89
|
+
userLeaderboard(type: $type, filter: $filter) {
|
|
90
|
+
dateModified
|
|
91
|
+
rows(limit: $limit) {
|
|
92
|
+
textValue(locale: $locale)
|
|
93
|
+
rank {
|
|
94
|
+
rank
|
|
95
|
+
denseRank
|
|
96
|
+
rowNumber
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
`,Be=p.gql`
|
|
102
|
+
query (
|
|
103
|
+
$type: String!
|
|
104
|
+
$filter: UserLeaderboardFilterInput
|
|
105
|
+
$locale: RSLocale
|
|
106
|
+
) {
|
|
107
|
+
viewer {
|
|
108
|
+
... on User {
|
|
109
|
+
firstName
|
|
110
|
+
lastInitial
|
|
111
|
+
leaderboardRank(type: $type, filter: $filter) {
|
|
112
|
+
textValue(locale: $locale)
|
|
113
|
+
rank
|
|
114
|
+
denseRank
|
|
115
|
+
rowNumber
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
`,ze=p.gql`
|
|
121
|
+
query (
|
|
122
|
+
$type: String!
|
|
123
|
+
$filter: UserLeaderboardFilterInput
|
|
124
|
+
$locale: RSLocale
|
|
125
|
+
) {
|
|
126
|
+
viewer {
|
|
127
|
+
... on User {
|
|
128
|
+
leaderboardRank(type: $type, filter: $filter) {
|
|
129
|
+
textValue(locale: $locale)
|
|
130
|
+
rank
|
|
131
|
+
denseRank
|
|
132
|
+
rowNumber
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
`,He=class{constructor(t){e(this,t),this.width="100%",this.hideViewer=!1,this.viewingUserText="You",this.hideNames=!1,this.anonymousUser="Anonymous User",this.maxRows=10,this.ignored=!0,s(this),ee(this)}disconnectedCallback(){}render(){const e={empty:t(We,null),usersheading:this.usersheading,statsheading:this.statsheading,rankheading:this.rankheading,rankType:this.rankType,leaderboardType:this.leaderboardType,maxRows:this.maxRows,programId:this.programId,anonymousUser:this.anonymousUser,interval:this.interval,hideViewer:this.hideViewer,viewingUserText:this.viewingUserText,hideNames:this.hideNames,showRank:this.showRank,rankSuffix:this.rankSuffix,width:this.width},r={...e,demoData:this.demoData},s=h()?function(e){var r,s;const a=(null===(s=null===(r=e.demoData)||void 0===r?void 0:r.data)||void 0===s?void 0:s.leaderboard)||[{firstName:"Viktor",lastInitial:"V",textValue:"82",rank:1,rowNumber:1},{firstName:"MF",lastInitial:"D",textValue:"73",rank:2,rowNumber:2},{firstName:"Freddie",lastInitial:"G",textValue:"64",rank:3,rowNumber:3},{firstName:"Benny",lastInitial:"B",textValue:"55",rank:4,rowNumber:4},{textValue:"46",rank:5,rowNumber:5}];return _({states:{loading:!1,hasLeaders:!0,isEssentials:!1,styles:{usersheading:e.usersheading?e.usersheading:"Top referrers",statsheading:e.statsheading?e.statsheading:"New customers",rankheading:e.rankheading?e.rankheading:"Rank",anonymousUser:e.anonymousUser?e.anonymousUser:"Anonymous User",showRank:e.showRank,hideViewer:e.hideViewer,viewingUserText:e.viewingUserText,hideNames:e.hideNames,rankSuffix:e.rankSuffix,width:e.width}},data:{rankType:"rowNumber",leaderboard:a},elements:{empty:t(We,null)}},e.demoData||{},{arrayMerge:(e,t)=>t})}(r):function(e){var t,r,s,a,n,o,l,c,d,u;const h=g(),m=null!==(t=e.programId)&&void 0!==t?t:h,p=v(),f=x(),y=m?{type:e.leaderboardType,filter:{programId_eq:m}}:{type:e.leaderboardType,filter:{}};e.interval&&(y.filter.interval=e.interval),f&&(y.locale=f),e.maxRows>0&&(y.limit=e.maxRows);const{data:w,loading:k,errors:C}=b(e.hideNames?Ue:je,y,!(null==p?void 0:p.jwt),{batch:!1}),{data:E}=b(e.hideNames?ze:Be,y,!(null==p?void 0:p.jwt)),I=null==(T=null===(r=null==w?void 0:w.userLeaderboard)||void 0===r?void 0:r.rows)?void 0:T.flatMap((t=>{var r,s;return{textValue:t.textValue,firstName:t.firstName,lastInitial:t.lastInitial,rank:null===(r=t.rank)||void 0===r?void 0:r[e.rankType],rowNumber:null===(s=t.rank)||void 0===s?void 0:s.rowNumber}})),S=null==I?void 0:I.sort((function(e,t){return e.rank-t.rank})),R={textValue:null===(a=null===(s=null==E?void 0:E.viewer)||void 0===s?void 0:s.leaderboardRank)||void 0===a?void 0:a.textValue,firstName:null===(n=null==E?void 0:E.viewer)||void 0===n?void 0:n.firstName,lastInitial:null===(o=null==E?void 0:E.viewer)||void 0===o?void 0:o.lastInitial,rank:null===(c=null===(l=null==E?void 0:E.viewer)||void 0===l?void 0:l.leaderboardRank)||void 0===c?void 0:c[e.rankType],rowNumber:null===(u=null===(d=null==E?void 0:E.viewer)||void 0===d?void 0:d.leaderboardRank)||void 0===u?void 0:u.rowNumber};var T;return{states:{loading:k,isEssentials:i((()=>{var e,t;return!!(null===(t=null===(e=null==C?void 0:C.response)||void 0===e?void 0:e.errors)||void 0===t?void 0:t.find((e=>{var t,r;return 403===(null===(r=null===(t=null==e?void 0:e.extensions)||void 0===t?void 0:t.apiError)||void 0===r?void 0:r.statusCode)})))}),[C]),hasLeaders:(null==S?void 0:S.length)>0,styles:e},data:{leaderboard:S,rankType:e.rankType,viewerRank:R},elements:{empty:e.empty}}}(e);return t(te,Object.assign({},s))}};function We(){return t("slot",{name:"empty"},t("sqm-empty",{"empty-state-image":"https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png","empty-state-header":"View your rank in the leaderboard","empty-state-text":"Be the first to refer a friend and reach the top of the leaderboard"}))}const Ge=N({Container:{display:"contents"},Link:{textDecoration:"none",color:"inherit"}}),Ze=Ge.toString();function Ke(e){const{onClick:r,buttonText:s}=e;return t("span",{class:Ge.classes.Container,part:"sqm-base"},t("style",{type:"text/css"},Ze,"\n:host{\n display: inline; \n}\n"),t("sl-button",{onClick:r,type:"primary",exportparts:"base: primarybutton-base"},t("a",{class:Ge.classes.Link,part:"sqm-link"},s)))}const Ye=class{constructor(t){e(this,t),this.openInNewTab=!1,this.buttonText="Click here"}render(){return t(Ke,Object.assign({},{...D(this),onClick:()=>{window.open(this.link,this.openInNewTab?"_blank":"_parent")}}))}},Xe=class{constructor(t){e(this,t),this.ignored=!0,this.firstNameLabel="First Name",this.lastNameLabel="Last Name",s(this)}disconnectedCallback(){}render(){const{states:e}=h()?_({states:{validationErrors:[],content:{firstNameLabel:this.firstNameLabel,lastNameLabel:this.lastNameLabel}}},this.demoData||{},{arrayMerge:(e,t)=>t}):function(e){return{states:{registrationFormState:o($),content:{lastNameLabel:e.lastNameLabel,firstNameLabel:e.firstNameLabel}}}}(this);return t(re,{states:e})}};function Qe(e){const{states:r}=e,{styles:s}=r;return r.includeDropdown?t("sl-dropdown",{style:"margin-bottom: var(--sl-spacing-large)"},t("sl-button",{slot:"trigger",caret:!0,onClick:e.callbacks.rerender,exportparts:"base: dropdownbutton-base"},s.menuLabel),t("sl-menu",{ref:t=>{void 0===e.ref.current&&(e.ref.current=t,e.callbacks.rerender())}},t("slot",null))):""}const Je=class{constructor(t){e(this,t),this.ignored=!0,s(this)}disconnectedCallback(){}render(){const e=h()?function(e){return _({states:{includeDropdown:!0,styles:{...e,menuLabel:"Menu"}},callbacks:{rerender:()=>{}},ref:{current:void 0}},e.demoData||{},{arrayMerge:(e,t)=>t})}(D(this)):function(e){const t=l(),[,r]=w(),s=v();return a((()=>{var e;null===(e=t.current)||void 0===e||e.addEventListener("sl-select",(e=>function(e){k.push(e.detail.item.value)}(e)))}),[t.current]),{states:{includeDropdown:void 0!==((null==s?void 0:s.id)||(null==s?void 0:s.accountId)||(null==s?void 0:s.jwt)),styles:{menuLabel:e.menuLabel}},callbacks:{rerender:r},ref:t}}(D(this));return t(r,{slot:"sqm-navigation-menu"},t(Qe,Object.assign({},e)))}};Je.style=":host{display:block}:host([hidden]){display:none}.HeaderWrapper{width:100%;max-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:var(--sl-spacing-small) var(--sl-spacing-large);-ms-flex-align:center;align-items:center;background-color:var(--sqm-header-background)}@media screen and (max-width: 499px){.HeaderWrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-pack:end;justify-content:flex-end;padding:0 var(--sl-spacing-x-small)}}";const et=N({Wrapper:{maxWidth:"200px"},PayoutButtonDescription:{color:"var(--sl-color-neutral-500)",fontSize:"var(--sl-font-size-small)",margin:"0"}}),tt=et.toString();function rt(e){const{text:r,states:s}=e;return s.payoutSettingsComplete?t("div",{part:"sqm-base",class:et.classes.Wrapper},t("style",{type:"text/css"},tt),t("sqm-scroll",{"scroll-tag-name":"sqm-tabs","button-text":r.payoutButtonText,"scroll-animation":"smooth"}),t("p",{class:et.classes.PayoutButtonDescription},r.payoutButtonDescription)):t("div",null)}const st=class{constructor(t){e(this,t),this.payoutButtonText="Payouts & Tax Settings",this.payoutButtonDescription="Check your payout settings to see when you’ll get paid out next",this.ignored=!0,s(this)}disconnectedCallback(){}getTextProps(){return D(this)}render(){const e=function(e){return _({states:{payoutSettingsComplete:!1},text:e.getTextProps()},e.demoData||{},{arrayMerge:(e,t)=>t})}(this);return t(rt,Object.assign({},e))}},at=N({SkeletonOne:{width:"50%",height:"16px"},AlertDescriptionText:{margin:"0",marginBottom:"var(--sl-spacing-small)"},ErrorAlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-red-100)",borderTop:"none"},"& sl-icon::part(base)":{color:"var(--sl-color-danger-500)"}},WarningAlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-yellow-100)",borderTop:"none"},"& sl-icon::part(base)":{color:"var(--sl-color-danger-500)"}},InfoAlertContainer:{"&::part(base)":{backgroundColor:"var(--sl-color-sky-100)",borderTop:"none"},"& sl-icon::part(base)":{color:"var(--sl-color-blue-500)"}}}),nt=at.toString();function ot(e){var r,s,a,n,o;const{text:i,states:l,data:c,callbacks:d}=e;if(l.loading)return t("sl-skeleton",{class:at.classes.SkeletonOne});if("DONE"===l.status)return t("div",null);function u(e){if(l.error)return{header:i.errorHeader,description:i.errorDescription,buttonText:null,alertType:"critical",icon:"exclamation-triangle",class:at.classes.ErrorAlertContainer};switch(e){case"INFORMATION_REQUIRED":return{header:i.informationRequiredHeader,description:i.informationRequiredDescription,buttonText:i.informationRequiredButtonText,alertType:"info",icon:"info-circle",class:at.classes.InfoAlertContainer};case"VERIFICATION_NEEDED":return{header:i.verificationRequiredHeader,description:i.verificationRequiredDescription,buttonText:i.verificationRequiredButtonText,alertType:"warning",icon:"exclamation-triangle",class:at.classes.WarningAlertContainer};case"HOLD":return{header:i.holdHeader,description:i.holdDescription,buttonText:null,alertType:"warning",icon:"exclamation-triangle",class:at.classes.WarningAlertContainer};default:return}}return t("div",{part:"sqm-base"},t("style",{type:"text/css"},nt),t("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:null===(r=u(l.status))||void 0===r?void 0:r.alertType,class:null===(s=u(l.status))||void 0===s?void 0:s.class,open:!0},t("sl-icon",{slot:"icon",name:null===(a=u(l.status))||void 0===a?void 0:a.icon}),t("strong",null,null===(n=u(l.status))||void 0===n?void 0:n.header),t("p",{class:at.classes.AlertDescriptionText},null===(o=u(l.status))||void 0===o?void 0:o.description),function(e){switch(e){case"INFORMATION_REQUIRED":return"SquatchJS2"===c.type?t("sqm-scroll",{"scroll-tag-name":"sqm-tabs","button-text":i.informationRequiredButtonText,"scroll-animation":"smooth"}):t("sl-button","SquatchPortal"===c.type?{type:"default",onClick:d.onTermsClick}:{type:"default"},i.informationRequiredButtonText);case"VERIFICATION_NEEDED":return t("sl-button",{type:"default",loading:l.loading,onClick:()=>d.onClick},i.verificationRequiredButtonText);default:return}}(l.status)),t("sl-dialog",{open:l.showVerifyIdentity,"onSl-hide":d.onCancel},"AL: TODO add IFRAME URL"))}const it=p.gql`
|
|
138
|
+
query getUserStatus {
|
|
139
|
+
user: viewer {
|
|
140
|
+
... on User {
|
|
141
|
+
id
|
|
142
|
+
impactConnection {
|
|
143
|
+
connected
|
|
144
|
+
publisher {
|
|
145
|
+
id
|
|
146
|
+
payoutsAccount {
|
|
147
|
+
hold
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
`,lt=class{constructor(t){e(this,t),this.informationRequiredHeader="Payout and tax information required",this.informationRequiredDescription="Submit your banking details and tax documents to receive your rewards.",this.informationRequiredButtonText="Payouts & Tax Settings",this.verificationRequiredHeader="Verify your identity",this.verificationRequiredDescription="Complete your verification to start receiving your cash rewards. It should only take a few minutes verify.",this.verificationRequiredButtonText="Start Verification",this.holdHeader="Your payouts and account are on hold",this.holdDescription="Please check your inbox for an email from our referral provider, impact.com. It contains details on how to resolve this issue. If you need further assistance, feel free to reach out to {support email}.",this.termsUrl="https://terms.advocate.impact.com/PayoutTermsAndConditions.html",this.errorHeader="Could not determine payout status.",this.errorDescription="There was an error with determining your payout status.",s(this)}disconnectedCallback(){}getTextProps(){return D(this)}render(){const e=h()?function(e){return _({states:{error:!1,status:"INFORMATION_REQUIRED",loading:!1,showVerifyIdentity:!1},data:{type:"SquatchAdmin"},text:e.getTextProps(),callbacks:{onTermsClick:()=>{},onClick:()=>console.log("show"),onCancel:()=>console.log("hide")}},e.demoData||{},{arrayMerge:(e,t)=>t})}(this):function(e){const{type:t}=C(),{loading:r,data:s,errors:o,refetch:i}=b(it,{}),[l,c]=n(void 0),[d,u]=n(!1);return a((()=>{if(!s)return;const e=function(e){var t,r;const s=null===(r=null===(t=e.user.impactConnection)||void 0===t?void 0:t.publisher)||void 0===r?void 0:r.payoutsAccount;return s?s.hold?"HOLD":s.verified?"DONE":"VERIFICATION_NEEDED":"INFORMATION_REQUIRED"}(s);c(e)}),[s]),a((()=>{const e=()=>i();return window.addEventListener("sqm:tax-form-updated",e),()=>window.removeEventListener("sqm:tax-form-updated",e)}),[]),{states:{loading:r,status:l,showVerifyIdentity:d,error:!!o},data:{type:t},text:e.getTextProps(),callbacks:{onTermsClick:()=>window.open(e.termsUrl,"_blank").focus(),onClick:()=>u(!0),onCancel:()=>u(!1)}}}(this);return console.log({props:e}),t(ot,Object.assign({},e))}},ct=class{constructor(t){e(this,t),this.ignored=!0,this.modalChangePasswordHeader="Change Password",this.cancelText="Cancel",this.changePasswordButtonText="Change Password",this.passwordFieldLabel="New Password",this.confirmPasswordFieldLabel="Confirm New Password",this.successMessage="Your password has been updated.",this.portalChangePasswordHeader="Password",this.portalChangePasswordButtonText="Change your password...",this.meetsRequirementsText="Password has met all requirements",this.doesNotMeetRequirementsText="Password must meet the following requirements:",this.minErrorText="be a minimum of 8 characters",this.uppercaseErrorText="contain at least 1 uppercase character",this.lowercaseErrorText="contain at least 1 lowercase character",this.nonMatchingPasswordErrorText="contain at least 1 lowercase character",this.invalidSessionErrorText="Please log in again to change your password.",this.hasErrorText="contain at least 1 number or symbol",s(this)}disconnectedCallback(){}render(){const{states:e,callbacks:r}=h()?function(e){const[t,r]=n(!1);return _({states:{open:t,error:"",content:{modalChangePasswordHeader:e.modalChangePasswordHeader,cancelText:e.cancelText,changePasswordButtonText:e.changePasswordButtonText,passwordFieldLabel:e.passwordFieldLabel,confirmPasswordFieldLabel:e.confirmPasswordFieldLabel,successMessage:e.successMessage,portalChangePasswordHeader:e.portalChangePasswordHeader,portalChangePasswordButtonText:e.portalChangePasswordButtonText,meetsRequirementsText:e.meetsRequirementsText,doesNotMeetRequirementsText:e.doesNotMeetRequirementsText,minErrorText:e.minErrorText,uppercaseErrorText:e.uppercaseErrorText,lowercaseErrorText:e.lowercaseErrorText,hasErrorText:e.hasErrorText}},callbacks:{setOpen:e=>r(e),submit:e=>console.log("Submit",e)}},e.demoData||{},{arrayMerge:(e,t)=>t})}(this):function(e){var t,r,s,a,o,i,l;const[c,{loading:d,errors:u}]=E(),[h,m]=n(!1),[p,g]=n(""),[f,b]=n(!1),y=v();return{states:{open:h,loading:d,success:f,error:p||(null===(a=null===(s=null===(r=null===(t=null==u?void 0:u.response)||void 0===t?void 0:t.errors)||void 0===r?void 0:r[0])||void 0===s?void 0:s.extensions)||void 0===a?void 0:a.message)||(null===(l=null===(i=null===(o=null==u?void 0:u.response)||void 0===o?void 0:o.errors)||void 0===i?void 0:i[0])||void 0===l?void 0:l.message),content:{modalChangePasswordHeader:e.modalChangePasswordHeader,cancelText:e.cancelText,changePasswordButtonText:e.changePasswordButtonText,passwordFieldLabel:e.passwordFieldLabel,confirmPasswordFieldLabel:e.confirmPasswordFieldLabel,successMessage:e.successMessage,portalChangePasswordHeader:e.portalChangePasswordHeader,portalChangePasswordButtonText:e.portalChangePasswordButtonText,meetsRequirementsText:e.meetsRequirementsText,doesNotMeetRequirementsText:e.doesNotMeetRequirementsText,minErrorText:e.minErrorText,uppercaseErrorText:e.uppercaseErrorText,lowercaseErrorText:e.lowercaseErrorText,hasErrorText:e.hasErrorText}},data:{},callbacks:{setOpen:m,submit:async t=>{var r,s;b(!1);const a=null===(r=t.detail)||void 0===r?void 0:r.formData;if(null==a||a.forEach(((e,t)=>{M.set(a,t,e)})),!(null==y?void 0:y.jwt))return void g(e.invalidSessionErrorText);if(a.password!==a.confirmPassword)return void g(e.nonMatchingPasswordErrorText);g("");const n={password:a.password},o=await c(n);o instanceof Error||!(null===(s=o.changeManagedIdentityPassword)||void 0===s?void 0:s.success)||b(!0)}}}}(this);return t(se,{states:e,callbacks:r})}},dt=class{constructor(t){e(this,t),this.ignored=!0,this.hideSupportText=!1,this.supportEmail="support@example.com",this.supportText="For program support, contact {email}",this.hidePoweredBy=!1,this.poweredByLink="https://impact.com/advocate/",this.paddingTop="large",this.paddingRight="large",this.paddingBottom="large",this.paddingLeft="large",s(this)}disconnectedCallback(){}render(){return t(ae,Object.assign({},D(this)))}static get assetsDirs(){return["../../assets"]}},ut=class{constructor(t){e(this,t),this.ignored=!0,this.notFullScreen=!1,s(this)}disconnectedCallback(){}render(){const e=t("slot",{name:"footer"}),r=t("slot",{name:"header"}),s=h()?function(e,r,s){return _({notFullScreen:!0,data:{footer:e||t("span",null,"example@example.com"),header:r||t("div",{style:{display:"flex",flexDirection:"column"}},t("span",{style:{fontSize:"var(--sl-font-size-large)",fontWeight:"bold"}},"Portal Header"),t("span",{style:{fontSize:"var(--sl-font-size-small)"}},"A description for the portal"))},callbacks:{rerender:()=>{}}},s.demoData||{},{arrayMerge:(e,t)=>t})}(e,r,this):function(e,t){const[,r]=w();return{data:{footer:e,header:t},callbacks:{rerender:r}}}(e,r);return t(ne,Object.assign({},s),t("slot",null))}},ht=class{constructor(t){e(this,t),this.ignored=!0,this.nextPage="/",this.emailLabel="Email",this.passwordLabel="Password",this.submitLabel="Sign In",this.forgotPasswordPath="/forgotPassword",this.forgotPasswordLabel="Forgot Password?",this.registerLabel="Register",this.registerPath="/register",this.pageLabel="Sign in to your account",this.networkErrorMessage="An error occurred while logging you in. Please refresh the page and try again.",s(this)}disconnectedCallback(){}render(){const{states:e,callbacks:r}=h()?_({states:{error:"",loading:!1,forgotPasswordPath:"/forgotPassword",registerPath:"/register"},callbacks:{submit:async()=>{console.log("submit")}}},this.demoData||{},{arrayMerge:(e,t)=>t}):function(e){var t,r,s,a,o,i,l;const[c,{loading:d,errors:u}]=I(),[h,m]=n(""),p=new URLSearchParams(k.location.search),v=p.get("nextPage");return{states:{loading:d,error:(null===(a=null===(s=null===(r=null===(t=null==u?void 0:u.response)||void 0===t?void 0:t.errors)||void 0===r?void 0:r[0])||void 0===s?void 0:s.extensions)||void 0===a?void 0:a.message)||(null===(l=null===(i=null===(o=null==u?void 0:u.response)||void 0===o?void 0:o.errors)||void 0===i?void 0:i[0])||void 0===l?void 0:l.message)||h,registerPath:e.registerPath,forgotPasswordPath:e.forgotPasswordPath},callbacks:{submit:async t=>{var r,s;m("");let a=t.detail.formData;null==a||a.forEach(((e,t)=>{M.set(a,t,e)}));const n={email:a.email,password:a.password},o=await c(n);if(o instanceof Error)((null==o?void 0:o.message)||(null===(r=null==o?void 0:o.response)||void 0===r?void 0:r.error))&&m(e.networkErrorMessage);else if(null===(s=o.authenticateManagedIdentityWithEmailAndPassword)||void 0===s?void 0:s.token){p.delete("nextPage");const t=V(v||e.nextPage);k.push(t.href)}}}}}(this),s={forgotPasswordButton:t("slot",{name:"forgotPassword"},t("a",{onClick:()=>k.push(e.forgotPasswordPath)},this.forgotPasswordLabel)),secondaryButton:t("slot",{name:"secondaryButton"},t("sl-button",{type:"text",disabled:e.loading,onClick:()=>k.push(e.registerPath)},this.registerLabel)),emailLabel:this.emailLabel,passwordLabel:this.passwordLabel,submitLabel:this.submitLabel,pageLabel:this.pageLabel};return t(oe,{states:e,callbacks:r,content:s})}},mt=class{constructor(t){e(this,t),this.ignored=!0,this.nextPage="/",this.redirectPath="/verifyEmail",this.emailLabel="Email",this.passwordLabel="Password",this.submitLabel="Register",this.loginLabel="Sign in",this.confirmPasswordLabel="Confirm Password",this.confirmPassword=!1,this.disablePasswordValidation=!1,this.hideInputs=!1,this.pageLabel="Register",this.loginPath="/login",this.requiredFieldErrorMessage="Cannot be empty",this.networkErrorMessage="Network request failed.",this.passwordMismatchErrorMessage="Passwords do not match.",this.invalidEmailErrorMessage="Must be a valid email address",this.meetsRequirementsText="Password has met all requirements",this.doesNotMeetRequirementsText="Password must meet the following requirements:",this.minErrorText="be a minimum of 8 characters",this.uppercaseErrorText="contain at least 1 uppercase character",this.lowercaseErrorText="contain at least 1 lowercase character",this.hasErrorText="contain at least 1 number or symbol",s(this)}disconnectedCallback(){}render(){const{states:e,callbacks:r,refs:s}=h()?_({states:{error:"",loading:!1,confirmPassword:(n=this).confirmPassword,hideInputs:n.hideInputs||!1,customPasswordField:!1,loginPath:n.loginPath,disablePasswordValidation:n.disablePasswordValidation},callbacks:{submit:async()=>{console.log("submit")},inputFunction:()=>{}},refs:{formRef:{}}},n.demoData||{},{arrayMerge:(e,t)=>t}):function(e){var t,r,s,n,o,i,c,d,u;const h=l(null),{registrationFormState:m,setRegistrationFormState:p}=O({}),[v,{loading:g,errors:f}]=S();a((()=>{if(!h.current)return;const e=h.current;return e.addEventListener("sl-input",b),()=>{e.removeEventListener("sl-input",b)}}),[h.current]);const b=R((e=>{var t,r;if("tel"!==(null===(r=null===(t=e.target)||void 0===t?void 0:t.type)||void 0===r?void 0:r.toLowerCase()))return;const s=new U("US");e.target.value=s.input(e.target.value)}),[]);let y="";return y=(null===(t=null==f?void 0:f.response)||void 0===t?void 0:t.error)||(null==f?void 0:f.message)&&!(null===(r=null==f?void 0:f.response)||void 0===r?void 0:r.errors.length)?e.networkErrorMessage:(null===(i=null===(o=null===(n=null===(s=null==f?void 0:f.response)||void 0===s?void 0:s.errors)||void 0===n?void 0:n[0])||void 0===o?void 0:o.extensions)||void 0===i?void 0:i.message)||(null===(u=null===(d=null===(c=null==f?void 0:f.response)||void 0===c?void 0:c.errors)||void 0===d?void 0:d[0])||void 0===u?void 0:u.message)||(null==m?void 0:m.error),{states:{loading:g,error:y,registrationFormState:m,confirmPassword:e.confirmPassword,hideInputs:e.hideInputs,loginPath:e.loginPath,disablePasswordValidation:e.disablePasswordValidation},callbacks:{submit:async t=>{var r;let s=t.target.getFormControls(),a={},n={};if(null==s||s.forEach((t=>{if(!t.name)return;const r=t.name,s=t.value;if(M.set(a,r,s),t.required&&!s&&M.set(n,r,e.requiredFieldErrorMessage),"function"==typeof t.validationError){const e=(0,t.validationError)({control:t,key:r,value:s});e&&M.set(n,r,e)}})),(e.confirmPassword||a.confirmPassword)&&a.password!==a.confirmPassword&&(n={...n,confirmPassword:e.passwordMismatchErrorMessage}),Object.keys(n).length)return void p({loading:!1,error:"",validationErrors:n});p({loading:!0,error:"",validationErrors:{}});const{email:o,password:i}=a;delete a.email,delete a.password,delete a.confirmPassword,a={...a};const l={email:o,password:i,formData:a,redirectPath:e.redirectPath};try{const t=await v(l);if(t instanceof Error)throw t;p({loading:!1,error:"",validationErrors:{}}),(null===(r=t.registerManagedIdentityWithEmailAndPassword)||void 0===r?void 0:r.token)&&k.push(e.nextPage)}catch(t){p({loading:!1,error:e.networkErrorMessage,validationErrors:{}})}},inputFunction:b},refs:{formRef:h}}}(this);var n;const o={formData:t("slot",{name:"formData"}),secondaryButton:t("slot",{name:"secondaryButton"},t("sl-button",{type:"text",disabled:e.loading,onClick:()=>k.push(e.loginPath)},this.loginLabel)),terms:t("slot",{name:"terms"}),emailLabel:this.emailLabel,passwordLabel:this.passwordLabel,submitLabel:this.submitLabel,pageLabel:this.pageLabel,confirmPasswordLabel:this.confirmPasswordLabel,invalidEmailErrorMessage:this.invalidEmailErrorMessage,requiredFieldErrorMessage:this.requiredFieldErrorMessage,meetsRequirementsText:this.meetsRequirementsText,doesNotMeetRequirementsText:this.doesNotMeetRequirementsText,minErrorText:this.minErrorText,uppercaseErrorText:this.uppercaseErrorText,lowercaseErrorText:this.lowercaseErrorText,hasErrorText:this.hasErrorText};return t(ie,{states:e,callbacks:r,content:o,refs:s})}};function pt(e,r){const s=N({Container:{color:e.textColor||"var(--sl-color-neutral-900)",background:e.backgroundColor||""},Header:{fontSize:"var(--sl-font-size-x-large)",fontWeight:"var(--sl-font-weight-bold)",lineHeight:"var(--sl-line-height-dense)",marginBottom:"var(--sl-spacing-large)",textAlign:"center"},Grid:{display:"flex",flexDirection:"row",gap:"var(--sl-spacing-large)","@media (max-width: 499px)":{flexDirection:"column"}}}),a=s.toString();return t("div",{class:s.classes.Container,part:"sqm-base"},t("style",{type:"text/css"},a,"\n ::slotted(*){\n display: flex;\n width: 100%;\n }\n @media (max-width: 499px) {\n ::slotted(*){\n display: block;\n }\n }"),t("div",{class:s.classes.Header},t("div",{class:s.classes.Header,part:"sqm-header"},e.header)),t("div",{class:s.classes.Grid,part:"sqm-grid-container"},r))}const vt=class{constructor(t){e(this,t),this.ignored=!0,s(this)}disconnectedCallback(){}render(){return t(pt,Object.assign({},D(this)),t("slot",null))}};function gt(e){const r=N({Container:{display:"flex",flexDirection:"column",width:"100%",padding:"var(--sl-spacing-x-large)",lineHeight:"var(--sl-line-height-dense)",color:e.textColor||"var(--sl-color-neutral-900)",background:e.backgroundColor||"var(--sl-color-primary-50)","@media (max-width: 499px)":{flexDirection:"row",width:"auto",paddingBottom:"var(--sl-spacing-large)"}},Text:{"@media (max-width: 499px)":{marginLeft:"var(--sl-spacing-large)"}},Header:{fontSize:"var(--sl-font-size-large)",fontWeight:"var(--sl-font-weight-bold)",marginTop:"var(--sl-spacing-x-large)","@media (max-width: 499px)":{margin:"0"}},Description:{fontSize:"var(--sl-font-size-medium)",marginTop:"var(--sl-spacing-small)","@media (max-width: 499px)":{marginTop:"var(--sl-spacing-x-small)"}},Media:{width:"64px",height:"64px",borderRadius:"100%",objectFit:"cover",userSelect:"none",background:"#FFF",color:"var(--sl-color-primary-300)",fontSize:"26px",textAlign:"center",lineHeight:"72px"}}),s=r.toString();return t("div",{class:r.classes.Container,part:"sqm-base"},t("style",{type:"text/css"},s),t("div",null,e.imageUrl?t("img",{class:r.classes.Media,src:e.imageUrl,part:"sqm-media"}):t("div",{class:r.classes.Media,part:"sqm-media"},t("sl-icon",{name:e.icon}))),t("div",{class:r.classes.Text},t("div",{class:r.classes.Header,part:"sqm-header"},e.header),t("div",{class:r.classes.Description,part:"sqm-description"},e.description)))}const ft=class{constructor(t){e(this,t),s(this)}disconnectedCallback(){}render(){return t(gt,Object.assign({},D(this)))}},bt=c("sq:useProgramMenu"),yt=class{constructor(t){e(this,t),this.ignored=!0,s(this)}disconnectedCallback(){}render(){const{data:e,ref:s}=function(e){const t=g(),r=m();bt({programId:t,props:e});const s=l(),[,n]=w();return a((()=>{var e;null===(e=s.current)||void 0===e||e.addEventListener("sl-select",(e=>{r.dispatchEvent(new CustomEvent("sq:update-program-id",{detail:e.detail.item.value,bubbles:!0,composed:!0}))}))}),[s.current]),{data:{programId:t},callbacks:{rerender:n},ref:s}}(D(this));return t(r,{style:{display:"contents"}},t("sl-select",{style:{paddingBottom:"var(--sl-spacing-large)"},value:e.programId,ref:e=>s.current=e},t("slot",null)))}},xt=N({Container:{borderRadius:"var(--sl-border-radius-large)",color:"var(--sl-color-neutral-900)",background:"var(--sl-color-neutral-0)",display:"flex",flexDirection:"column",rowGap:"var(--sl-spacing-large)"},EndContainer:{display:"flex",flexDirection:"column",alignItems:"center"},ColumnContainer:{"& p":{margin:"0"},display:"grid",gridAutoColumns:"minmax(0, 1fr)",gridAutoFlow:"column",gap:"calc(2 * var(--sl-spacing-medium))","@media (max-width: 499px)":{gridAutoFlow:"unset",gridAutoColumns:"unset",gridTemplateColumns:"1fr",border:"none"}}}),wt=xt.toString();function kt(e){return t("div",{part:"sqm-base",class:xt.classes.Container,style:{border:e.hideBorder?"none":"1px solid var(--sl-color-neutral-300)","padding-top":`var(--sl-spacing-${e.paddingTop})`,"padding-right":`var(--sl-spacing-${e.paddingRight})`,"padding-bottom":`var(--sl-spacing-${e.paddingBottom})`,"padding-left":`var(--sl-spacing-${e.paddingLeft})`,backgroundColor:e.backgroundColor,maxWidth:e.limitWidth?"600px":"none",margin:e.limitWidth?"auto":"none"}},t("style",{type:"text/css"},wt,"\n :host{\n display: block; \n }\n "),e.hasHeader&&t("div",{class:xt.classes.EndContainer},e.slots.header),t("div",{part:"sqm-column-container",class:xt.classes.ColumnContainer,style:{alignItems:e.verticalAlignment}},e.slots.left,e.slots.right),e.hasFooter&&t("div",{class:xt.classes.EndContainer},e.slots.footer))}const Ct=class{constructor(t){e(this,t),this.ignored=!0,this.verticalAlignment="start",this.hideBorder=!1,this.paddingTop="large",this.paddingRight="large",this.paddingBottom="large",this.paddingLeft="large",this.backgroundColor="#ffffff",this.limitWidth=!1,s(this)}disconnectedCallback(){}render(){const e={left:t("slot",{name:"left"}),right:t("slot",{name:"right"}),header:t("slot",{name:"header"}),footer:t("slot",{name:"footer"})},r=P(),s=r.findIndex((e=>"header"===e.slot))>-1,a=r.findIndex((e=>"footer"===e.slot))>-1;return t(kt,Object.assign({},D(this),{slots:e,hasHeader:s,hasFooter:a}),t("slot",null))}},Et=p.gql`
|
|
155
|
+
query getUser($programId: ID) {
|
|
156
|
+
viewer {
|
|
157
|
+
... on User {
|
|
158
|
+
referralCode(programId: $programId)
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
`,It=class{constructor(t){e(this,t),this.ignored=!0,this.iframeHeight="100%",this.iframeWidth="100%",s(this)}disconnectedCallback(){}render(){const e=L([{attribute:"iframe-src",value:this.iframeSrc}]);if(e)return t(ke,{missingProps:e,heading:"An error occured while loading this page",subheading:"A technical problem prevented this iframe from loading. Please contact us with the link to this page.",description:"Values for the following attributes are missing:"});const{states:s,data:a}=h()?(n=D(this),_({states:{content:{iframeSrc:"https://example.com",...n}},data:{shareCode:"SHARECODE123"}},n.demoData||{},{arrayMerge:(e,t)=>t})):function(e){var t;const r=g(),s=v(),{data:a}=b(Et,{programId:r},!(null==s?void 0:s.jwt)||!r);return{states:{content:e},data:{shareCode:null===(t=null==a?void 0:a.viewer)||void 0===t?void 0:t.referralCode}}}(D(this));var n;return t(r,{style:{display:"contents"}},t(le,{data:a,states:s}))}};var St={};!function e(t,r,s,a){var n=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL);function o(){}function i(e){var s=r.exports.Promise,a=void 0!==s?s:t.Promise;return"function"==typeof a?new a(e):(e(o,o),null)}var l,c,d,u,h,m,p,v,g=(d=Math.floor(1e3/60),u={},h=0,"function"==typeof requestAnimationFrame&&"function"==typeof cancelAnimationFrame?(l=function(e){var t=Math.random();return u[t]=requestAnimationFrame((function r(s){h===s||h+d-1<s?(h=s,delete u[t],e()):u[t]=requestAnimationFrame(r)})),t},c=function(e){u[e]&&cancelAnimationFrame(u[e])}):(l=function(e){return setTimeout(e,d)},c=function(e){return clearTimeout(e)}),{frame:l,cancel:c}),f=(v={},function(){if(m)return m;if(!s&&n){var t=["var CONFETTI, SIZE = {}, module = {};","("+e.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join("\n");try{m=new Worker(URL.createObjectURL(new Blob([t])))}catch(e){return void 0!==typeof console&&"function"==typeof console.warn&&console.warn("🎊 Could not load worker",e),null}!function(e){function t(t,r){e.postMessage({options:t||{},callback:r})}e.init=function(t){var r=t.transferControlToOffscreen();e.postMessage({canvas:r},[r])},e.fire=function(r,s,a){if(p)return t(r,null),p;var n=Math.random().toString(36).slice(2);return p=i((function(s){function o(t){t.data.callback===n&&(delete v[n],e.removeEventListener("message",o),p=null,a(),s())}e.addEventListener("message",o),t(r,n),v[n]=o.bind(null,{data:{callback:n}})}))},e.reset=function(){for(var t in e.postMessage({reset:!0}),v)v[t](),delete v[t]}}(m)}return m}),b={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function y(e,t,r){return function(e,t){return t?t(e):e}(e&&null!=e[t]?e[t]:b[t],r)}function x(e){return e<0?0:Math.floor(e)}function w(e){return parseInt(e,16)}function k(e){return e.map(C)}function C(e){var t=String(e).replace(/[^0-9a-f]/gi,"");return t.length<6&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),{r:w(t.substring(0,2)),g:w(t.substring(2,4)),b:w(t.substring(4,6))}}function E(e){e.width=document.documentElement.clientWidth,e.height=document.documentElement.clientHeight}function I(e){var t=e.getBoundingClientRect();e.width=t.width,e.height=t.height}function S(e,r){var o,l=!e,c=!!y(r||{},"resize"),d=y(r,"disableForReducedMotion",Boolean),u=n&&y(r||{},"useWorker")?f():null,h=l?E:I,m=!(!e||!u||!e.__confetti_initialized),p="function"==typeof matchMedia&&matchMedia("(prefers-reduced-motion)").matches;function v(t,r,n){for(var l,c,d,u,m=y(t,"particleCount",x),p=y(t,"angle",Number),v=y(t,"spread",Number),f=y(t,"startVelocity",Number),b=y(t,"decay",Number),w=y(t,"gravity",Number),C=y(t,"drift",Number),E=y(t,"colors",k),I=y(t,"ticks",Number),S=y(t,"shapes"),R=y(t,"scalar"),T=function(e){var t=y(e,"origin",Object);return t.x=y(t,"x",Number),t.y=y(t,"y",Number),t}(t),q=m,M=[],_=e.width*T.x,N=e.height*T.y;q--;)M.push((void 0,void 0,c=(l={x:_,y:N,angle:p,spread:v,startVelocity:f,color:E[q%E.length],shape:S[(0,u=S.length,Math.floor(Math.random()*(u-0))+0)],ticks:I,decay:b,gravity:w,drift:C,scalar:R}).angle*(Math.PI/180),d=l.spread*(Math.PI/180),{x:l.x,y:l.y,wobble:10*Math.random(),velocity:.5*l.startVelocity+Math.random()*l.startVelocity,angle2D:-c+(.5*d-Math.random()*d),tiltAngle:Math.random()*Math.PI,color:l.color,shape:l.shape,tick:0,totalTicks:l.ticks,decay:l.decay,drift:l.drift,random:Math.random()+5,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:3*l.gravity,ovalScalar:.6,scalar:l.scalar}));return o?o.addFettis(M):(o=function(e,t,r,n,o){var l,c,d=t.slice(),u=e.getContext("2d"),h=i((function(t){function i(){l=c=null,u.clearRect(0,0,n.width,n.height),o(),t()}l=g.frame((function t(){!s||n.width===a.width&&n.height===a.height||(n.width=e.width=a.width,n.height=e.height=a.height),n.width||n.height||(r(e),n.width=e.width,n.height=e.height),u.clearRect(0,0,n.width,n.height),(d=d.filter((function(e){return function(e,t){t.x+=Math.cos(t.angle2D)*t.velocity+t.drift,t.y+=Math.sin(t.angle2D)*t.velocity+t.gravity,t.wobble+=.1,t.velocity*=t.decay,t.tiltAngle+=.1,t.tiltSin=Math.sin(t.tiltAngle),t.tiltCos=Math.cos(t.tiltAngle),t.random=Math.random()+5,t.wobbleX=t.x+10*t.scalar*Math.cos(t.wobble),t.wobbleY=t.y+10*t.scalar*Math.sin(t.wobble);var r=t.tick++/t.totalTicks,s=t.x+t.random*t.tiltCos,a=t.y+t.random*t.tiltSin,n=t.wobbleX+t.random*t.tiltCos,o=t.wobbleY+t.random*t.tiltSin;return e.fillStyle="rgba("+t.color.r+", "+t.color.g+", "+t.color.b+", "+(1-r)+")",e.beginPath(),"circle"===t.shape?e.ellipse?e.ellipse(t.x,t.y,Math.abs(n-s)*t.ovalScalar,Math.abs(o-a)*t.ovalScalar,Math.PI/10*t.wobble,0,2*Math.PI):function(e,t,r,s,a,n,o,i){e.save(),e.translate(t,r),e.rotate(n),e.scale(s,a),e.arc(0,0,1,0,i,void 0),e.restore()}(e,t.x,t.y,Math.abs(n-s)*t.ovalScalar,Math.abs(o-a)*t.ovalScalar,Math.PI/10*t.wobble,0,2*Math.PI):(e.moveTo(Math.floor(t.x),Math.floor(t.y)),e.lineTo(Math.floor(t.wobbleX),Math.floor(a)),e.lineTo(Math.floor(n),Math.floor(o)),e.lineTo(Math.floor(s),Math.floor(t.wobbleY))),e.closePath(),e.fill(),t.tick<t.totalTicks}(u,e)}))).length?l=g.frame(t):i()})),c=i}));return{addFettis:function(e){return d=d.concat(e),h},canvas:e,promise:h,reset:function(){l&&g.cancel(l),c&&c()}}}(e,M,h,r,n)).promise}function b(r){var s=d||y(r,"disableForReducedMotion",Boolean),a=y(r,"zIndex",Number);if(s&&p)return i((function(e){e()}));l&&o?e=o.canvas:l&&!e&&(e=function(e){var t=document.createElement("canvas");return t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.pointerEvents="none",t.style.zIndex=e,t}(a),document.body.appendChild(e)),c&&!m&&h(e);var n={width:e.width,height:e.height};function g(){if(u){var t={getBoundingClientRect:function(){if(!l)return e.getBoundingClientRect()}};return h(t),void u.postMessage({resize:{width:t.width,height:t.height}})}n.width=n.height=null}function f(){o=null,c&&t.removeEventListener("resize",g),l&&e&&(document.body.removeChild(e),e=null,m=!1)}return u&&!m&&u.init(e),m=!0,u&&(e.__confetti_initialized=!0),c&&t.addEventListener("resize",g,!1),u?u.fire(r,n,f):v(r,n,f)}return b.reset=function(){u&&u.reset(),o&&o.reset()},b}r.exports=S(null,{useWorker:!0,resize:!0}),r.exports.create=S}(function(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:this||{}}(),St,!1);const Rt=St.exports,Tt=p.gql`
|
|
163
|
+
query getExchangeList {
|
|
164
|
+
viewer {
|
|
165
|
+
... on User {
|
|
166
|
+
visibleRewardExchangeItems(limit: 20, offset: 0) {
|
|
167
|
+
data {
|
|
168
|
+
key
|
|
169
|
+
name
|
|
170
|
+
description
|
|
171
|
+
imageUrl
|
|
172
|
+
available
|
|
173
|
+
unavailableReasonCode
|
|
174
|
+
ruleType
|
|
175
|
+
sourceUnit
|
|
176
|
+
sourceValue
|
|
177
|
+
prettySourceValue
|
|
178
|
+
sourceMinValue
|
|
179
|
+
prettySourceMinValue
|
|
180
|
+
sourceMaxValue
|
|
181
|
+
prettySourceMaxValue
|
|
182
|
+
destinationMinValue
|
|
183
|
+
prettyDestinationMinValue
|
|
184
|
+
destinationMaxValue
|
|
185
|
+
prettyDestinationMaxValue
|
|
186
|
+
globalRewardKey
|
|
187
|
+
destinationUnit
|
|
188
|
+
steps {
|
|
189
|
+
sourceValue
|
|
190
|
+
prettySourceValue
|
|
191
|
+
destinationValue
|
|
192
|
+
prettyDestinationValue
|
|
193
|
+
available
|
|
194
|
+
globalRewardKey
|
|
195
|
+
unavailableReasonCode
|
|
196
|
+
rewardInput
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
totalCount
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
`,qt=p.gql`
|
|
205
|
+
mutation exchange($exchangeRewardInput: ExchangeRewardInput!) {
|
|
206
|
+
exchangeReward(exchangeRewardInput: $exchangeRewardInput) {
|
|
207
|
+
reward {
|
|
208
|
+
id
|
|
209
|
+
fuelTankCode
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
`,Mt=class{constructor(t){e(this,t),this.ignored=!0,this.notAvailableError="{unavailableReasonCode, select, US_TAX {US Tax limit} INSUFFICIENT_REDEEMABLE_CREDIT {{sourceValue} required} AVAILABILITY_PREDICATE {Not available} other {{unavailableReasonCode}} }",this.chooseRewardTitle="Rewards",this.chooseAmountTitle="Select",this.confirmationTitle="Confirm",this.rewardTitle="Choose a reward",this.cancelText="Cancel",this.backText="Back",this.continueText="Continue",this.continueToConfirmationText="Continue to confirmation",this.redeemText="Redeem",this.redeemTitle="Confirm and redeem",this.redemptionSuccessText="Redeemed {sourceValue} for {destinationValue}",this.sourceAmountMessage="{ruleType, select, FIXED_GLOBAL_REWARD {{sourceValue}} other {{sourceMinValue} to {sourceMaxValue}}}",this.tooltipText="Copied",this.doneText="Done",this.selectText="Select amount to receive",this.queryError="Unable to load reward exchange list. Please try again",this.redemptionError="An error occured trying to redeem this reward. Please try again",this.notEnoughError="Not enough {sourceUnit} to redeem for this reward",this.rewardRedeemedText="Reward redeemed",this.promoCode="Promo Code",this.skeletonCardNum=8,this.rewardNameTitle="Reward",this.rewardAmountTitle="Reward Amount",this.costTitle="Cost to Redeem",s(this)}disconnectedCallback(){}render(){const e={...D(this),empty:t(_t,null)},{states:s,data:o,callbacks:i,refs:c}=h()?function(e){return _({states:{content:{text:e},redeemStage:"chooseReward",amount:0,selectedStep:void 0,selectedItem:void 0,open:!1,exchangeError:!1,queryError:!1,loading:!1,noExchangeOptions:!1,empty:_t()},data:{shareCode:"SHARECODE123",exchangeList:ce.data.exchangeList},callbacks:{exchangeReward:()=>{},setExchangeState:()=>{},setStage:()=>{},resetState:()=>{},copyFuelTankCode:()=>{}},refs:{canvasRef:{}}},e.demoData||{},{arrayMerge:(e,t)=>t})}(e):function(e){var t,r,s,o,i;const[c,u]=d(((e,t)=>({...e,...t})),{selectedItem:void 0,selectedStep:void 0,redeemStage:"chooseReward",amount:0,exchangeError:!1}),[h,m]=n(!1),{selectedItem:p,selectedStep:g,redeemStage:y,amount:x,exchangeError:w}=c,k=v(),[C,{data:E,loading:I,errors:S}]=f(qt),{data:R,loading:q,refetch:M,errors:_}=b(Tt,{},!(null==k?void 0:k.jwt));a((()=>{var e,t;(null===(t=null===(e=null==E?void 0:E.exchangeReward)||void 0===e?void 0:e.reward)||void 0===t?void 0:t.id)&&u({redeemStage:"success",exchangeError:!1}),S&&u({exchangeError:!0})}),[E,S]);const N=l();a((()=>{if(!N.current)return;const e=N.current;e.confetti=e.confetti||Rt.create(e,{resize:!0}),e.confetti()}),[N.current]);const{refresh:A}=T();return{states:{content:{text:e},selectedItem:p,redeemStage:y,amount:x,selectedStep:g,exchangeError:w,queryError:!!_,loading:q||I,open:h,noExchangeOptions:0===(null===(t=null==R?void 0:R.viewer)||void 0===t?void 0:t.visibleRewardExchangeItems.totalCount)},data:{exchangeList:null===(s=null===(r=null==R?void 0:R.viewer)||void 0===r?void 0:r.visibleRewardExchangeItems)||void 0===s?void 0:s.data,fuelTankCode:null===(i=null===(o=null==E?void 0:E.exchangeReward)||void 0===o?void 0:o.reward)||void 0===i?void 0:i.fuelTankCode},callbacks:{exchangeReward:async function(){if(!p)return;let e={accountId:null==k?void 0:k.accountId,userId:k.id};switch(p.ruleType){case"FIXED_GLOBAL_REWARD":e={...e,redeemCreditInput:{amount:p.sourceValue,unit:p.sourceUnit},globalRewardKey:p.globalRewardKey};break;case"STEPPED_FIXED_GLOBAL_REWARD":e={...e,redeemCreditInput:{amount:g.sourceValue,unit:p.sourceUnit},globalRewardKey:g.globalRewardKey};break;case"VARIABLE_GLOBAL_REWARD":e={...e,redeemCreditInput:{amount:x,unit:p.sourceUnit},globalRewardKey:p.globalRewardKey,rewardInput:g.rewardInput};break;case"VARIABLE_CREDIT_REWARD":e={...e,redeemCreditInput:{amount:x,unit:p.sourceUnit},rewardInput:{type:"CREDIT",unit:p.destinationUnit,assignedCredit:g.destinationValue}};break;default:e={...e,...g.rewardInput}}await C({exchangeRewardInput:e}),A()},setExchangeState:u,setStage:function(e){u({redeemStage:e})},resetState:e=>{e&&M(),u({amount:0,selectedStep:void 0,selectedItem:void 0,exchangeError:!1,redeemStage:"chooseReward"})},copyFuelTankCode:function(){var e,t;navigator.clipboard.writeText(null===(t=null===(e=null==E?void 0:E.exchangeReward)||void 0===e?void 0:e.reward)||void 0===t?void 0:t.fuelTankCode),m(!0),setTimeout((()=>m(!1)),1e3)}},refs:{canvasRef:N}}}(e);return t(r,{style:{display:"contents"}},t(de,{states:s,data:o,callbacks:i,refs:c}))}static get assetsDirs(){return["assets"]}};function _t(){return t("slot",{name:"empty"},t("sqm-empty",{emptyStateImage:"https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_exchange2.png",emptyStateHeader:"Redeem rewards",emptyStateText:"Use your points to redeem rewards once they become available"}))}const Nt=c("sq:useRouter");function At(e,t){if(e)return F(e).exec(t)}const Pt=class{constructor(t){e(this,t),this.ignored=!0,s(this)}disconnectedCallback(){}render(){const{callbacks:e}=function(){const e=q(),t=m(),[r,s]=n(void 0),[o,i]=n(void 0),l=e.pathname;return a((()=>{const e=t.querySelectorAll("sqm-route");Array.from(e).forEach((e=>{const t=document.createElement("template");t.setAttribute("path",e.path),t.innerHTML=e.innerHTML,e.parentNode.appendChild(t),e.parentNode.removeChild(e)}))}),[]),a((()=>{var e,t;if(!o||!r)return void Nt("DOM not ready for navigation rendering on:",l);const s=r.querySelectorAll("template"),a=Array.from(s).find((e=>{var t,r,s;if(null===(s=At(null===(r=null===(t=e.attributes)||void 0===t?void 0:t.path)||void 0===r?void 0:r.nodeValue,l))||void 0===s?void 0:s.length)return e})),n=null===(t=null===(e=null==a?void 0:a.attributes)||void 0===e?void 0:e.path)||void 0===t?void 0:t.nodeValue;if(Nt({containerDatasetPage:o.dataset.page,templatePath:n,page:l}),!a)return Nt("No matching page found for ",l,", so render nothing"),o.innerHTML="",void(o.dataset.page=l);Nt("Page updated to ",l,a),At(n,o.dataset.page)?Nt("don't rerender"):a&&(o.innerHTML=a.innerHTML,o.dataset.page=l)}),[r,o,l]),{callbacks:{setSlot:s,setContainer:i}}}();return t(r,null,t("div",{ref:e.setSlot,style:{display:"none"}},t("slot",null)),t("div",{style:{display:"contents"},ref:e.setContainer}))}};Pt.style="sqm-router{display:contents}";const Dt=class{constructor(t){e(this,t),this.type="default",this.iconslot="prefix",this.hideicon=!1,this.hidetext=!1,this.undefinedLinkText="Error: message link undefined!",this.unsupportedPlatformText="Error: not on a supported device",s(this)}disconnectedCallback(){}render(){const e=D(this),r=h()?function(e){return _({...e,loading:!1,hide:!1,onClick:()=>{}},e.demoData||{},{arrayMerge:(e,t)=>t})}(e):ue(e);return t(he,Object.assign({},r),t("slot",null))}};Dt.style=":host{display:block}:host([hidden]){display:none}sl-button{display:block}";const Lt=p.gql`
|
|
214
|
+
query ($programId: ID) {
|
|
215
|
+
user: viewer {
|
|
216
|
+
... on User {
|
|
217
|
+
referralCode(programId: $programId)
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
`,Vt=p.gql`
|
|
222
|
+
mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
|
|
223
|
+
createUserAnalyticsEvent(eventMeta: $eventMeta)
|
|
224
|
+
}
|
|
225
|
+
`,Ft=class{constructor(t){e(this,t),this.tooltiptext="Copied to Clipboard",this.tooltiplifespan=1e3,this.textAlign="left",this.copyButtonLabel="Copy Code",this.buttonStyle="icon",s(this)}disconnectedCallback(){}render(){const e=D(this),r=h()?function(e){const[t,r]=n(!1),s="SHARECODE001";return _({copyString:s,tooltiptext:e.tooltiptext,textAlign:e.textAlign,copyButtonLabel:e.copyButtonLabel,buttonStyle:e.buttonStyle,rewardStatus:"AVAILABLE",open:t,onClick:()=>{navigator.clipboard.writeText(s),r(!0),setTimeout((()=>r(!1)),e.tooltiplifespan)}},e.demoData||{},{arrayMerge:(e,t)=>t})}(e):function(e){var t,r;const{programId:s=g()}=e,a=v(),o=y(),{data:i}=b(Lt,{programId:s},!(null==a?void 0:a.jwt)),[l]=f(Vt),c=null!==(r=null===(t=null==i?void 0:i.user)||void 0===t?void 0:t.referralCode)&&void 0!==r?r:"...",[d,u]=n(!1);return{...e,onClick:function(){navigator.clipboard.writeText(c),u(!0),setTimeout((()=>u(!1)),e.tooltiplifespan),l({eventMeta:{programId:s,id:null==a?void 0:a.id,accountId:null==a?void 0:a.accountId,type:"USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",meta:{engagementMedium:o,shareMedium:"DIRECT"}}})},open:d,copyString:c}}(e);return t(me,Object.assign({},r))}},$t=class{constructor(t){e(this,t),this.tooltiptext="Copied to Clipboard",this.tooltiplifespan=1e3,this.textAlign="left",this.copyButtonLabel="Copy Link",this.buttonStyle="icon",s(this)}disconnectedCallback(){}render(){const e=D(this),r=h()?function(e){const[t,r]=n(!1),s="https://www.example.com/sharelink/abc";return _({copyString:s,tooltiptext:e.tooltiptext,textAlign:e.textAlign,buttonStyle:e.buttonStyle,copyButtonLabel:e.copyButtonLabel,rewardStatus:"AVAILABLE",open:t,onClick:()=>{navigator.clipboard.writeText(s),r(!0),setTimeout((()=>r(!1)),e.tooltiplifespan)}},e.demoData||{},{arrayMerge:(e,t)=>t})}(e):pe(e);return t(me,Object.assign({},r))}},Ot=class{constructor(t){e(this,t),this.ignored=!0,this.space="xxx-large",this.display="grid",s(this)}disconnectedCallback(){}render(){return t(ve,Object.assign({},D(this)),t("slot",null))}},jt=p.gql`
|
|
226
|
+
mutation taskCardEvent($userEventInput: UserEventInput!) {
|
|
227
|
+
logUserEvent(userEventInput: $userEventInput) {
|
|
228
|
+
userId
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
`,Ut=class{constructor(t){e(this,t),this.ignored=!0,this.rewardAmount="0",this.rewardUnit="Points",this.cardTitle="Title Text",this.description="",this.repeatable=!1,this.finite=0,this.showProgressBar=!1,this.goal=1,this.steps=!1,this.progressBarUnit="",this.expiryMessage="Ends {endDate}",this.startsOnMessage="Starts {startDate}",this.endedMessage="Ended {endDate}",this.completedText="Completed {finite, select, 0 {{count, plural, =1 {{count} time} other {{count} times}}} other {{count}/{finite} times}}",this.buttonText="Complete Action",this.openNewTab=!1,this.hideButton=!1,s(this)}disconnectedCallback(){}render(){const{props:e}=h()?B(this):z({...D(this),programId:this.programId}),{value:r,loading:s}=e,{states:n,callbacks:o}=h()?function(e){return _({states:{loadingEvent:!1,locale:"en"},callbacks:{sendEvent:e=>console.log(e),onClick:()=>console.log("clicked")}},e.demoData||{},{arrayMerge:(e,t)=>t})}(this):function(e){const t=v(),r=x(),[s,{data:n,loading:o}]=f(jt),{refresh:i}=T();function l(){e.openNewTab?window.open(e.buttonLink):window.open(e.buttonLink,"_parent")}function c(e){s({userEventInput:{userId:null==t?void 0:t.id,accountId:null==t?void 0:t.accountId,events:[{key:e,fields:{}}]}})}return a((()=>{n&&(i(),l())}),[n]),{states:{loadingEvent:o,locale:r},callbacks:{sendEvent:c,onClick:function(){e.eventKey?c(e.eventKey):l()}}}}(this);return t(ge,{callbacks:o,states:{loading:s,loadingEvent:n.loadingEvent,progress:r,locale:n.locale},content:{...D(this)}})}},Bt=class{constructor(t){e(this,t),this.ignored=!0,this.icon="gift",s(this)}disconnectedCallback(){}render(){return P().forEach((e=>{try{e.setIcon(this.icon)}catch{}})),t("div",null,t("style",{type:"text/css"},"\n\t\t:host{\n\t\t\tdisplay: block; \n\t\t}\n\n\t\t::slotted(*:not(:only-child):not(:last-child)) {\n\t\t\tmargin-bottom: var(--sl-spacing-xx-large);\n\t\t}\n\t"),t("slot",null))}},zt=()=>t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M22.5 7.5H18.6761H13.5V24H20.75C21.3023 24 21.75 23.5523 21.75 23V22.5V13.5H22.5H23C23.5523 13.5 24 13.0523 24 12.5V12V9V8.5C24 7.94772 23.5523 7.5 23 7.5H22.5Z",fill:"#F2C94C"}),t("path",{d:"M2.25 22.5V23C2.25 23.5523 2.69772 24 3.25 24H10.5V7.5H6.96363H1.5H1C0.447715 7.5 0 7.94772 0 8.5V9V12V12.5C0 13.0523 0.447715 13.5 1 13.5H1.5H2.25V22.5Z",fill:"#F2C94C"}),t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.25 13.5V15H21.75V13.5H2.25Z",fill:"#BE9720"}),t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M21 4.06424C21 5.39348 19.0041 7.4062 18 7.5H13.5V24H10.5027V7.5H6.88188C4.8187 7.05273 3 5.46806 3 3.78109C3 2.1371 3.71404 0.835051 5.01276 0.273062C6.25382 -0.26398 7.68678 0.0304991 8.81964 0.817C10.2101 1.78237 10.9902 3.59446 11.6978 5.2384C11.7599 5.38268 11.8215 5.52566 11.8828 5.66667C11.9426 5.53298 12.0028 5.3969 12.0638 5.25912C12.7649 3.67422 13.5654 1.86488 14.9106 0.893444C16.0997 0.0347157 17.6114 -0.289736 18.9181 0.298417C20.2693 0.906596 21 2.3018 21 4.06424ZM15.9185 2.25C16.6392 1.72957 17.502 1.63518 18.2396 2.25C18.8819 2.78542 18.9162 3.03745 18.9987 3.64389L19.0133 3.75C19.0133 4.64776 18.2396 6 17.4659 6C16.9177 6 16.4871 5.99537 16.0836 5.99103C15.3479 5.98312 14.702 5.97618 13.5974 6C13.808 5.59179 13.9761 5.20003 14.1365 4.82641C14.5654 3.82715 14.9386 2.95763 15.9185 2.25ZM7.40792 2.25C7.05911 2.00783 6.25921 2.11591 5.92748 2.25945C5.65341 2.37805 5.24403 2.73987 5.24403 3.78109C5.24403 4.79286 6.88188 5.66667 6.88188 5.66667C6.88188 5.66667 8.18161 6 10.5027 6C9.71258 4.04177 8.59336 3.073 7.40792 2.25Z",fill:"#EB5757"})),Ht=()=>t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("circle",{cx:"12",cy:"12",r:"9",fill:"currentColor",stroke:"currentColor","stroke-width":"2"})),Wt=N({TimelineReward:{color:"var(--sl-color-neutral-900)",lineHeight:"var(--sl-line-height-dense)","& .container":{display:"flex"},"& .line":{display:"none",color:"transparent",userSelect:"none",background:"var(--sl-color-primary-300)",width:"4px",borderRadius:"4px",margin:"-2px",position:"relative",left:"12px",top:"34px"},"& .step":{display:"flex"},"& .icon":{position:"relative",top:"4px",zIndex:"1",color:"var(--sl-color-primary-300)",marginRight:"var(--sl-spacing-large)"},"& .reward":{marginRight:"var(--sl-spacing-x-small)",fontSize:"var(--sl-font-size-x-large)",fontWeight:"var(--sl-font-weight-semibold)"},"& .unit":{textTransform:"uppercase",fontSize:"var(--sl-font-size-small)"},"& .description":{fontSize:"var(--sl-font-size-medium)"}}}),Gt=Wt.toString();function Zt(e){var r;const s=null!==(r=e.icon)&&void 0!==r?r:e.iconState;return t("div",{class:Wt.classes.TimelineReward,part:"sqm-base"},t("style",{type:"text/css"},Gt,"\n\t:host{\n\t\tdisplay: block; \n\t}\n\n\t:host(:not(:last-of-type)) .line {\n\t\tdisplay: block; \n\t}\n\t"),t("div",{class:"container",part:"sqm-entry-container"},t("div",{class:"line"},"/"),t("div",{class:"step"},"gift"===s&&t("div",{class:"icon"},t(zt,null)),"circle"===s&&t("div",{class:"icon"},t(Ht,null)),t("div",null,t("div",null,t("span",{class:"reward",part:"sqm-reward"},e.reward),t("span",{class:"unit",part:"sqm-unit"},e.unit)),t("div",{class:"description",part:"sqm-description"},e.desc)))))}const Kt=class{constructor(t){e(this,t),this.ignored=!0,this.iconState="gift",s(this)}async setIcon(e){this.iconState=e}disconnectedCallback(){}render(){return A([this.reward]),t(Zt,Object.assign({},D(this)))}};function Yt(e){return t(r,null,e.loading?e.loadingText:e.username)}const Xt=p.gql`
|
|
232
|
+
query getUserName {
|
|
233
|
+
viewer {
|
|
234
|
+
... on User {
|
|
235
|
+
firstName
|
|
236
|
+
lastName
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
`,Qt=class{constructor(t){e(this,t),this.ignored=!0,this.fallback="Anonymous User",this.loadingText="...",s(this)}disconnectedCallback(){}render(){const e=h()?function(e){return _({loading:!1,loadingText:"...",username:"John Smith"},e.demoData||{},{arrayMerge:(e,t)=>t})}(this):function(e){var t,r,s,a,n,o,i,l;const c=v(),d=b(Xt,{},!(null==c?void 0:c.jwt)),u=(null===(r=null===(t=d.data)||void 0===t?void 0:t.viewer)||void 0===r?void 0:r.firstName)||(null===(a=null===(s=d.data)||void 0===s?void 0:s.viewer)||void 0===a?void 0:a.lastName)?`${null===(o=null===(n=d.data)||void 0===n?void 0:n.viewer)||void 0===o?void 0:o.firstName} ${null===(l=null===(i=d.data)||void 0===i?void 0:i.viewer)||void 0===l?void 0:l.lastName}`:e.fallback;return{loadingText:e.loadingText,loading:d.loading,username:u}}(this);return t(Yt,Object.assign({},e))}};export{fe as sqm_big_stat,be as sqm_brand,ye as sqm_card_feed,Ce as sqm_checkbox_field,Se as sqm_coupon_code,Te as sqm_divided_layout,qe as sqm_dropdown_field,Ae as sqm_edit_profile,Pe as sqm_hero,Le as sqm_hero_image,Ve as sqm_hook_story_container,$e as sqm_image,Oe as sqm_input_field,He as sqm_leaderboard,Ye as sqm_link_button,Xe as sqm_name_fields,Je as sqm_navigation_menu,st as sqm_payout_button_scroll,lt as sqm_payout_status_alert,ct as sqm_portal_change_password,dt as sqm_portal_footer,ut as sqm_portal_frame,ht as sqm_portal_login,mt as sqm_portal_register,vt as sqm_program_explainer,ft as sqm_program_explainer_step,yt as sqm_program_menu,Ct as sqm_referral_card,It as sqm_referral_iframe,Mt as sqm_reward_exchange_list,Pt as sqm_router,Dt as sqm_share_button,Ft as sqm_share_code,$t as sqm_share_link,Ot as sqm_stat_container,Ut as sqm_task_card,Bt as sqm_timeline,Kt as sqm_timeline_entry,Qt as sqm_user_name}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{h as e,r as s}from"./p-64c3217a.js";import{l as t,k as i,f as a,n as r}from"./p-fd2c5407.js";import{i as n}from"./p-d83b0cf3.js";import{d as o,M as l,D as c,i as d,S as p}from"./p-bdd6bb13.js";import{c as m}from"./p-c1086930.js";import{E as u}from"./p-02be1a88.js";import{c as f}from"./p-cef45012.js";import{g as h}from"./p-9ec99ced.js";import{T as y}from"./p-5d0c9424.js";import{a as g,S as x,V as v}from"./p-39840341.js";import{u as b}from"./p-d7806f31.js";const C=f({Wrapper:{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-medium)",maxWidth:"515px"},HeaderContainer:{display:"flex",flexDirection:"column"},InputsContainer:{display:"flex",gap:"var(--sl-spacing-medium)",position:"relative",flexDirection:"column"},CodeInputContainer:{display:"flex",gap:"var(--sl-spacing-medium)"},CodeInput:{maxWidth:"40px","&::part(input)":{margin:"0",padding:"0 var(--sl-input-spacing-small)",fontSize:"var(--sl-font-size-large)"}},CodeInputError:{...u,maxWidth:"40px","&::part(input)":{margin:"0",padding:"0 var(--sl-input-spacing-small)",fontSize:"var(--sl-font-size-large)"}},ErrorText:{color:"var(--sl-color-danger-500)",fontSize:"var(--sl-font-size-small)",margin:"0"},ContinueButton:{width:"100%",maxWidth:"100px"},FooterContainer:{display:"flex",flexDirection:"column"},SkeletonOne:{width:"50%",height:"16px"},SkeletonTwo:{width:"30%",height:"34px"},SkeletonThree:{width:"15%",height:"24px"}}),k=C.toString();function E(s){const{states:t,refs:i,callbacks:a,text:r}=s,o=n.formatMessage({id:"resendCodeText",defaultMessage:r.resendCodeText},{resendCodeLink:e("a",{href:"",style:{textDecoration:"none"},onClick:e=>{e.preventDefault(),a.resendEmail()}},r.resendCodeLabel)}),l=n.formatMessage({id:"codeResentSuccessfully",defaultMessage:r.codeResentSuccessfullyText},{email:t.email}),c=t.verifyFailed?C.classes.CodeInputError:C.classes.CodeInput;return e("div",{part:"sqm-base"},e("style",{type:"text/css"},"\n:host {\n display: block;\n}\n:host([hidden]): {\n display: none;\n}\n\n\n",k),e("div",{class:C.classes.Wrapper},e("div",{class:C.classes.HeaderContainer},e(y,{type:"p"},n.formatMessage({id:"emailHeaderText",defaultMessage:t.verifyFailed?r.reverifyCodeHeaderText:r.verifyCodeHeaderText},{email:t.email}))),t.emailResent&&e("sqm-form-message",{type:"success",exportparts:"successalert-icon"},e("b",null,l)),e("div",{class:C.classes.InputsContainer},e("div",{ref:i.codeWrapperRef,class:C.classes.CodeInputContainer},e("sl-input",{class:c,name:"code"}),e("sl-input",{class:c,name:"code"}),e("sl-input",{class:c,name:"code"}),e("sl-input",{class:c,name:"code"}),e("sl-input",{class:c,name:"code"}),e("sl-input",{class:c,name:"code"})),t.verifyFailed&&e("p",{class:C.classes.ErrorText},r.invalidCodeText),e("sl-button",{class:C.classes.ContinueButton,onClick:a.submitCode,disabled:t.loading||t.initialiseLoading,loading:t.loading||t.initialiseLoading,exportparts:"base: primarybutton-base",type:"primary"},r.verifyText)),e("div",{class:C.classes.FooterContainer},e(y,{type:"p"},o))))}o.gql`
|
|
2
|
+
mutation submitImpactPublisherEmail2FACode(
|
|
3
|
+
$user: UserIdInput!
|
|
4
|
+
$code: String!
|
|
5
|
+
) {
|
|
6
|
+
submitImpactPublisherEmail2FACode(user: $user, code: $code) {
|
|
7
|
+
verifiedEmail
|
|
8
|
+
accessKey
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
`;const j=class{constructor(e){s(this,e),this.verifyCodeHeaderText="Enter the code sent to {email} from our referral provider, impact.com.",this.reverifyCodeHeaderText="Enter the code sent to {email} from our referral provider, impact.com.",this.resendCodeText="Didn't receive your code? {resendCodeLink}",this.resendCodeLabel="Resend code",this.codeResentSuccessfullyText="Another code has been sent to {email}",this.invalidCodeText="Please check your code and try again. If you’re still having trouble, try resending your code.",this.verifyText="Verify",this.networkErrorMessage="An error occurred while verifying your email. Please refresh the page and try again.",r(this)}disconnectedCallback(){}getTextProps(){return h(this)}render(){const s=d()?function(e){const[s,t]=i(!1),a=p(v);return m({states:{loading:!1,email:"test@example.com",emailResent:s,resendError:!0,verifyFailed:!0},refs:{codeWrapperRef:()=>{}},callbacks:{resendEmail:async()=>t(!0),submitCode:async()=>a(!0)},text:e.getTextProps()},e.demoData||{},{arrayMerge:(e,s)=>s})}(this):function(e){t();const[s,r]=l(x),n=c(g),[o,d]=i(!1),[p,m]=i(!1),[u,f]=i(null),[h,y]=i(!1),[v,C]=i(!1),{initialized:k,send:[E,{loading:j,errors:w}],verify:[I,{loading:S,errors:T}]}=b();a((()=>{if(!u)return;const e=u.querySelectorAll("sl-input"),s=Array.from(e).map((e=>e.shadowRoot.querySelector('input[name="code"]')));s.forEach(((e,t)=>{e.addEventListener("focus",(e=>{e.target.select()})),e.addEventListener("keydown",(e=>{"Backspace"===e.key&&""===e.target.value&&s[Math.max(0,t-1)].focus()})),e.addEventListener("input",(e=>{const i=e.data;if(i)if(t!==s.length-1){if(i.length>1){const a=i.slice(1);e.target.value=i.slice(0,1),s[t+1].dispatchEvent(new InputEvent("input",{inputType:"insertFromPaste",data:a}))}s[t+1].focus()}else e.target.value=i.slice(-1)}))}))}),[u]);const z=async()=>{k&&(await E()?(o&&m(!0),d(!0)):C(!0))};return a((()=>{k&&(n?d(!0):z())}),[k]),{refs:{codeWrapperRef:f},states:{email:n,emailResent:p,resendError:w||T,initialiseLoading:!k,loading:j||S,verifyFailed:!!h},callbacks:{resendEmail:z,submitCode:async()=>{const s=u.querySelectorAll("sl-input"),t=Array.from(s).map((e=>e.shadowRoot.querySelector('input[name="code"]')));if(t.find((e=>!e.value)))return void y(!0);let i="";if(t.forEach((e=>{i=`${i}${e.value}`})),!k)return;y(!1);const a=await I(i);(null==a?void 0:a.success)?(e.onVerification(a.accessKey),r(!1),y(!1)):y(!0)}},text:e.getTextProps()}}(this);return e(E,Object.assign({},s))}};export{j as sqm_code_verification}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,h as t,c as i}from"./p-64c3217a.js";import{
|
|
1
|
+
import{r as s,h as t,c as i}from"./p-64c3217a.js";import{n as r}from"./p-fd2c5407.js";const h=class{constructor(t){s(this,t),this.nextPage="/",this.height=60,r(this)}disconnectedCallback(){}render(){return t(i,null,t("a",{href:this.nextPage,part:"sqm-link"},t("img",{style:{height:`${null==this?void 0:this.height}px`},src:null==this?void 0:this.imageUrl})))}};export{h as sqm_header_logo}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,h as t}from"./p-64c3217a.js";import{
|
|
1
|
+
import{r as s,h as t}from"./p-64c3217a.js";import{n as o,k as r,f as c}from"./p-fd2c5407.js";import{j as n,z as a}from"./p-bdd6bb13.js";import{N as i}from"./p-ac1bf045.js";const e=class{constructor(t){s(this,t),this.ignored=!0,o(this)}disconnectedCallback(){}render(){const s=function(){const s=n(),t=a(),[o,i]=r(!1);return c((()=>{i(!1)}),[s.pathname,t]),{checked:o,onClick:function(s){i(s.target.checked)}}}();return t(i,Object.assign({},s),t("slot",null))}};export{e as sqm_navigation_sidebar}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as e}from"./p-64c3217a.js";import{b as a,
|
|
1
|
+
import{h as e}from"./p-64c3217a.js";import{b as a,j as r,f as t}from"./p-fd2c5407.js";import{d,K as l,z as o,Q as n,E as s,O as i}from"./p-bdd6bb13.js";import{u}from"./p-04348a9b.js";import{u as c}from"./p-c3b37bbf.js";const m=a("sq:useReferralTable"),f=d.gql`
|
|
2
2
|
query getReferrals(
|
|
3
3
|
$programId: ID
|
|
4
4
|
$rewardFilter: RewardFilterInput
|
|
@@ -66,7 +66,7 @@ import{h as e}from"./p-64c3217a.js";import{b as a,h as r,d as t}from"./p-1b24bb5
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
`,p=
|
|
69
|
+
`,p=d.gql`
|
|
70
70
|
query getReferrals(
|
|
71
71
|
$limit: Int!
|
|
72
72
|
$offset: Int!
|
|
@@ -202,7 +202,7 @@ import{h as e}from"./p-64c3217a.js";import{b as a,h as r,d as t}from"./p-1b24bb5
|
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
`,g=
|
|
205
|
+
`,g=d.gql`
|
|
206
206
|
query getImpactTax {
|
|
207
207
|
viewer {
|
|
208
208
|
... on User {
|
|
@@ -230,4 +230,4 @@ import{h as e}from"./p-64c3217a.js";import{b as a,h as r,d as t}from"./p-1b24bb5
|
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
`;function v(a,
|
|
233
|
+
`;function v(a,d,m){var v,y,R,b;const h=l(),C=o(),I=null!==(v=a.programId)&&void 0!==v?v:C,F=I?"classic"===I?{programId_exists:!1}:{programId_eq:I}:{},T={userId_eq:null==h?void 0:h.id,accountId_eq:null==h?void 0:h.accountId},[$,S]=r(((e,a)=>({...e,...a})),{columns:[],rows:[],loading:!1,page:0}),k=n(),{data:x,loading:M}=s(f,{programId:"classic"===I?null:I,rewardFilter:T,locale:k},!a.showReferrer||!(null==h?void 0:h.jwt)),E=null===(y=null==x?void 0:x.viewer)||void 0===y?void 0:y.referredByReferral,P=a.showReferrer&&!!(null==E?void 0:E.dateReferralStarted),{data:q,loading:U}=s(g,{},!(null==h?void 0:h.jwt)),D=null===(R=null==q?void 0:q.viewer)||void 0===R?void 0:R.impactConnection,{envelope:N,states:_,callbacks:j}=i(p,(e=>{var a;return null===(a=null==e?void 0:e.viewer)||void 0===a?void 0:a.referrals}),{limit:a.perPage,offset:0},{referralFilter:F,rewardFilter:T,locale:k},a.showReferrer&&M&&!x||!(null==h?void 0:h.jwt));t((()=>{0===_.currentPage&&P&&j.setLimit(a.perPage-1)}),[P]),t((()=>{a.showReferrer&&P?(j.setLimit(a.perPage-1),j.setCurrentPage(0)):(j.setLimit(a.perPage),j.setCurrentPage(0))}),[a.showReferrer]);const K=u(),L=null==N?void 0:N.data,V=c();t((()=>{S({loading:!0}),N&&async function(a){const r=a.filter((e=>"loading"!==e.slot&&"empty"!==e.slot)),t=null==r?void 0:r.map((async e=>w(e,(()=>e.renderLabel()))));let d;if(P&&0===_.currentPage){const a=null==r?void 0:r.map((async a=>w(a,(()=>a.renderReferrerCell(E,k,e)))));d=await Promise.all(a)}const l=null==L?void 0:L.map((async a=>{const t=null==r?void 0:r.map((async r=>w(r,(()=>r.renderCell(a,{locale:k,taxConnection:D},e)))));return await Promise.all(t)})),o=l&&[d,...await Promise.all(l)].filter((e=>e));S({rows:o});const n=t&&await Promise.all(t);S({columns:n,loading:!1,page:_.currentPage})}(V)}),[N,V,K]);const B=!(null===(b=null==$?void 0:$.rows)||void 0===b?void 0:b.length)&&!(null==L?void 0:L.length);return{states:{hasNext:_.currentPage<_.pageCount-1,hasPrev:_.currentPage>0,show:_.loading||$.loading||U?"loading":B?"empty":"rows",namespace:"sqm-referral-table"},data:{textOverrides:{showLabels:!a.hideLabels,prevLabel:a.prevLabel,moreLabel:a.moreLabel},hiddenColumns:a.hiddenColumns,smBreakpoint:a.smBreakpoint,mdBreakpoint:a.mdBreakpoint},elements:{columns:$.columns,rows:$.rows,emptyElement:d,loadingElement:m},callbacks:{nextPage:()=>{0===_.currentPage&&P&&j.setLimit(a.perPage),j.setCurrentPage(_.currentPage+1)},prevPage:()=>{1===_.currentPage&&P&&j.setLimit(a.perPage-1),j.setCurrentPage(_.currentPage-1)}}}}function y(e){try{return JSON.stringify(e)}catch(e){return"An unknown error"}}async function w(a,r){const t=a.tagName.toLowerCase();let d;await customElements.whenDefined(t);try{d=r()}catch(a){return"renderReferrerCell"===r.name?m("column does not have a renderReferrerCell method."):m("label promise failed",a),m("label promise failed",a),e("span",null)}try{return await d}catch(a){m("Error rendering label",a);const r=y(a);return e("details",null,e("summary",null,"Error"),r)}}export{y as g,w as t,v as u}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __makeTemplateObject=this&&this.__makeTemplateObject||function(e,n){if(Object.defineProperty){Object.defineProperty(e,"raw",{value:n})}else{e.raw=n}return e};var __awaiter=this&&this.__awaiter||function(e,n,r,t){function i(e){return e instanceof r?e:new r((function(n){n(e)}))}return new(r||(r=Promise))((function(r,a){function u(e){try{o(t.next(e))}catch(e){a(e)}}function s(e){try{o(t["throw"](e))}catch(e){a(e)}}function o(e){e.done?r(e.value):i(e.value).then(u,s)}o((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},t,i,a,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(e){return function(n){return o([e,n])}}function o(u){if(t)throw new TypeError("Generator is already executing.");while(r)try{if(t=1,i&&(a=u[0]&2?i["return"]:u[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;if(i=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:r.label++;return{value:u[1],done:false};case 5:r.label++;i=u[1];u=[0];continue;case 7:u=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1];a=u;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(u);break}if(a[2])r.ops.pop();r.trys.pop();continue}u=n.call(e,r)}catch(e){u=[6,e];i=0}finally{t=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};System.register(["./p-2a414b2e.system.js","./p-93576222.system.js"],(function(e){"use strict";var n,r,t,i,a,u;return{setters:[function(e){n=e.k;r=e.f},function(e){t=e.d;i=e.K;a=e.o;u=e.c}],execute:function(){e("u",m);var s=t.gql(__makeTemplateObject(["\n query userLookup {\n viewer {\n ... on User {\n id\n accountId\n email\n impactConnection {\n user {\n id\n email\n }\n }\n }\n }\n }\n"],["\n query userLookup {\n viewer {\n ... on User {\n id\n accountId\n email\n impactConnection {\n user {\n id\n email\n }\n }\n }\n }\n }\n"]));var o=t.gql(__makeTemplateObject(["\n mutation requestUserEmailVerification($user: UserIdInput!) {\n requestUserEmailVerification(user: $user) {\n success\n }\n }\n"],["\n mutation requestUserEmailVerification($user: UserIdInput!) {\n requestUserEmailVerification(user: $user) {\n success\n }\n }\n"]));var c=t.gql(__makeTemplateObject(["\n mutation requestImpactPublisherEmail2FA($user: UserIdInput!) {\n requestImpactPublisherEmail2FA(user: $user) {\n success\n }\n }\n"],["\n mutation requestImpactPublisherEmail2FA($user: UserIdInput!) {\n requestImpactPublisherEmail2FA(user: $user) {\n success\n }\n }\n"]));var l=t.gql(__makeTemplateObject(["\n mutation verifyUserEmail($user: UserIdInput!, $code: String!) {\n verifyUserEmail(user: $user, code: $code) {\n id\n accountId\n email\n emailVerified\n }\n }\n"],["\n mutation verifyUserEmail($user: UserIdInput!, $code: String!) {\n verifyUserEmail(user: $user, code: $code) {\n id\n accountId\n email\n emailVerified\n }\n }\n"]));var d=t.gql(__makeTemplateObject(["\n mutation submitImpactPublisherEmail2FACode(\n $user: UserIdInput!\n $code: String!\n ) {\n submitImpactPublisherEmail2FACode(user: $user, code: $code) {\n verifiedEmail\n accessKey\n }\n }\n"],["\n mutation submitImpactPublisherEmail2FACode(\n $user: UserIdInput!\n $code: String!\n ) {\n submitImpactPublisherEmail2FACode(user: $user, code: $code) {\n verifiedEmail\n accessKey\n }\n }\n"]));function m(){var e=this;var t=i();var m=n({participant:false,impact:false}),f=m[0],p=m[1];var v=a(s)[0];var h=u(o),b=h[0],y=h[1],I=y.loading,_=y.errors;var w=u(c),E=w[0],g=w[1],$=g.loading,U=g.errors;var q=I||$;var k=_||U;var P=u(l),j=P[0],C=P[1],A=C.loading,F=C.errors;var O=u(d),T=O[0],S=O[1],V=S.loading,x=S.errors;var K=A||V;var L=F||x;var z=n(false),G=z[0],B=z[1];var D=function(){return __awaiter(e,void 0,void 0,(function(){var e,n,r,t,i,a;return __generator(this,(function(u){switch(u.label){case 0:u.trys.push([0,2,,3]);return[4,v({})];case 1:i=u.sent();if(!i||i instanceof Error)throw new Error;p({participant:!!((e=i===null||i===void 0?void 0:i.viewer)===null||e===void 0?void 0:e.email),impact:!!((t=(r=(n=i===null||i===void 0?void 0:i.viewer)===null||n===void 0?void 0:n.impactConnection)===null||r===void 0?void 0:r.user)===null||t===void 0?void 0:t.email)});B(true);return[3,3];case 2:a=u.sent();console.error("Could not initialise verification",a);return[3,3];case 3:return[2]}}))}))};var H=function(){return __awaiter(e,void 0,void 0,(function(){var e,n,r,i;return __generator(this,(function(a){switch(a.label){case 0:e=null;if(!G)return[2,e];if(!f.participant&&!f.impact)return[2,e];a.label=1;case 1:a.trys.push([1,3,4,5]);n=f.impact?E:b;return[4,n({user:{id:t.id,accountId:t.accountId}})];case 2:r=a.sent();if(r instanceof Error||!r)throw new Error;e=f.impact?r.requestImpactPublisherEmail2FA:r.requestUserEmailVerification;return[3,5];case 3:i=a.sent();console.error("Could not send verification email",i);return[3,5];case 4:return[2,e];case 5:return[2]}}))}))};var J=function(n){return __awaiter(e,void 0,void 0,(function(){var e,r,i,a,u;return __generator(this,(function(s){switch(s.label){case 0:r=null;if(!G)return[2,r];if(!f.participant&&!f.impact)return[2,r];s.label=1;case 1:s.trys.push([1,3,4,5]);i=f.impact?T:j;return[4,i({user:{id:t.id,accountId:t.accountId},code:n})];case 2:a=s.sent();if(a instanceof Error||!a)throw new Error;r={success:true,accessKey:f.impact?(e=a.submitImpactPublisherEmail2FACode)===null||e===void 0?void 0:e.accessKey:undefined};return[3,5];case 3:u=s.sent();console.error("Could not verify email",u);return[3,5];case 4:return[2,r];case 5:return[2]}}))}))};r((function(){if(!G)D()}),[]);return{initialized:G,send:[H,{loading:q,errors:k}],verify:[J,{loading:K,errors:L}]}}}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-ff17b3a4.system.js","./p-
|
|
1
|
+
System.register(["./p-ff17b3a4.system.js","./p-2a414b2e.system.js","./p-93576222.system.js","./p-f6934a55.system.js","./p-1a673057.system.js","./p-c5577dd7.system.js"],(function(t){"use strict";var n,e,s,o,i;return{setters:[function(t){n=t.r;e=t.h},function(t){s=t.n},function(t){o=t.g},function(){},function(){},function(t){i=t.C}],execute:function(){var c=t("sqm_close_button",function(){function t(t){n(this,t);this.color="#000000";s(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){var t;var n=o();var s=n.type==="SquatchJS2"&&((t=n.widgetIdent)===null||t===void 0?void 0:t.engagementMedium)==="POPUP";if(!s)return e("div",{style:{display:"none"}});var c=function(){var t,e;if(n.type==="SquatchJS2"){(e=(t=n.api).close)===null||e===void 0?void 0:e.call(t)}};return e(i,{onClick:c,color:this.color})};return t}())}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(t){for(var e,i=1,s=arguments.length;i<s;i++){e=arguments[i];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]}return t};return __assign.apply(this,arguments)};System.register(["./p-ff17b3a4.system.js","./p-
|
|
1
|
+
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(t){for(var e,i=1,s=arguments.length;i<s;i++){e=arguments[i];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]}return t};return __assign.apply(this,arguments)};System.register(["./p-ff17b3a4.system.js","./p-2a414b2e.system.js","./p-93576222.system.js","./p-4bd679a7.system.js","./p-f6934a55.system.js","./p-1a673057.system.js","./p-6333265f.system.js","./p-ac51940e.system.js"],(function(t){"use strict";var e,i,s,r,n,a,o,l,u,c,d;return{setters:[function(t){e=t.h;i=t.r},function(t){s=t.i;r=t.k;n=t.n},function(t){a=t.i},function(t){o=t.c},function(t){l=t.E},function(t){u=t.c},function(t){c=t.g},function(t){d=t.R}],execute:function(){var p={error:{length:"Length should be a valid positive number",password:"Password should be a valid string"},regex:{digits:"(\\d.*)",letters:"([a-zA-Z].*)",symbols:"([`~\\!@#\\$%\\^\\&\\*\\(\\)\\-_\\=\\+\\[\\{\\}\\]\\\\|;:\\'\",<.>\\/\\?€£¥₹§±].*)",spaces:"([\\s].*)"}};var v=p.regex;function h(t,e){if(e&&e>1){var i=parseInt(e,10);return new RegExp(t+"{"+i+",}").test(this.password)===this.positive}return new RegExp(t).test(this.password)===this.positive}var f={not:function t(e){this.positive=false;if(e){return h.call(this,e)}return true},has:function t(e){this.positive=true;if(e){return h.call(this,e)}return true},is:function t(){this.positive=true;return true},min:function t(e){return this.password.length>=e},max:function t(e){return this.password.length<=e},digits:function t(e){return h.call(this,v.digits,e)},letters:function t(e){return h.call(this,v.letters,e)},uppercase:function t(e){if(e&&e>1){var i=0;var s=0;while(s<e&&i<this.password.length){var r=this.password.charAt(i);if(r!==r.toLowerCase()){s++}i++}return s===e===this.positive}return this.password!==this.password.toLowerCase()===this.positive},lowercase:function t(e){if(e&&e>1){var i=0;var s=0;while(s<e&&i<this.password.length){var r=this.password.charAt(i);if(r!==r.toUpperCase()){s++}i++}return s===e===this.positive}return this.password!==this.password.toUpperCase()===this.positive},symbols:function t(e){return h.call(this,v.symbols,e)},spaces:function t(e){return h.call(this,v.spaces,e)},oneOf:function t(e){return e.indexOf(this.password)>=0===this.positive}};var m=p.error;function g(t){var e=Number(t);if(isNaN(e)||!Number.isInteger(e)||e<1){throw new Error(m.length)}}function w(t){return f[t.method].apply(this,t.arguments)}function y(t,e){this.properties.push({method:t,arguments:e});return this}var b=function(){function t(){this.properties=[]}t.prototype.validate=function(t,e){var i=this;this.list=Boolean(e&&e.list);this.password=String(t);this.positive=true;if(this.list){return this.properties.reduce((function(t,e){if(!w.call(i,e)){return t.concat(e.method)}return t}),[])}return this.properties.every(w.bind(this))};t.prototype.letters=function(t){t&&g(t);return y.call(this,"letters",arguments)};t.prototype.digits=function(t){t&&g(t);return y.call(this,"digits",arguments)};t.prototype.symbols=function(t){t&&g(t);return y.call(this,"symbols",arguments)};t.prototype.min=function(t){g(t);return y.call(this,"min",arguments)};t.prototype.max=function(t){g(t);return y.call(this,"max",arguments)};t.prototype.lowercase=function(t){t&&g(t);return y.call(this,"lowercase",arguments)};t.prototype.uppercase=function(t){t&&g(t);return y.call(this,"uppercase",arguments)};t.prototype.spaces=function(t){t&&g(t);return y.call(this,"spaces",arguments)};t.prototype.has=function(){return y.call(this,"has",arguments)};t.prototype.not=function(){return y.call(this,"not",arguments)};t.prototype.is=function(){return y.call(this,"is",arguments)};t.prototype.oneOf=function(){return y.call(this,"oneOf",arguments)};return t}();var x=b;var L=(new x).is().min(8).has().uppercase().has().lowercase().has(/([\d`~\!@#\$%\^\&\*\(\)\-_\=\+\[\{\}\]\\\|;:'",<.>\/\?€£¥₹§±].*){1,}/);var V=function(t,e){var i=L.validate(t,{list:true});var s=j(i,t,e);return s};var C=function(){return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},e("path",{d:"M6 0C2.688 0 0 2.688 0 6C0 9.312 2.688 12 6 12C9.312 12 12 9.312 12 6C12 2.688 9.312 0 6 0ZM4.8 9L1.8 6L2.646 5.154L4.8 7.302L9.354 2.748L10.2 3.6L4.8 9Z",fill:"#259053"}))};var _=function(){return e("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{d:"M6 0C2.688 0 0 2.688 0 6C0 9.312 2.688 12 6 12C9.312 12 12 9.312 12 6C12 2.688 9.312 0 6 0ZM6 10.8C3.354 10.8 1.2 8.646 1.2 6C1.2 3.354 3.354 1.2 6 1.2C8.646 1.2 10.8 3.354 10.8 6C10.8 8.646 8.646 10.8 6 10.8ZM8.754 3.348L4.8 7.302L3.246 5.754L2.4 6.6L4.8 9L9.6 4.2L8.754 3.348Z",fill:"#555555"}))};var E={display:"flex",alignItems:"center",fontSize:"var(--sl-font-size-small)","& > :not(:last-child)":{"margin-right":"var(--sl-spacing-x-small)"}};var S={Base:{fontSize:"var(--sl-font-size-small)"},ValidationList:{"list-style-type":"none",paddingRight:"var(--sl-spacing-large)",margin:"var(--sl-spacing-small) 0 var(--sl-spacing-x-large)","& > :not(:last-child)":{"margin-bottom":"var(--sl-spacing-xx-small)"},"& *":{"line-height":"var(--sl-line-height-dense)"}},ValidationItemValid:__assign(__assign({},E),{color:"var(--sl-color-success-600)"}),ValidationItemInvalid:__assign({},E)};var I=u(S);var T=I.toString();var j=function(t,i,s){var r={min:s.minErrorText,uppercase:s.uppercaseErrorText,lowercase:s.lowercaseErrorText,has:s.hasErrorText};if(!t.length&&i)return e("div",{class:I.classes.ValidationItemValid,style:{paddingBottom:"var(--sl-spacing-x-large)"}},e("style",{type:"text/css"},T),e(C,null)," ",e("span",null,s.meetsRequirementsText));return e("div",{class:I.classes.Base},e("style",{type:"text/css"},T),s.doesNotMeetRequirementsText,e("ul",{class:I.classes.ValidationList},Object.keys(r).map((function(i){return t.includes(i)?e("li",{class:I.classes.ValidationItemInvalid},e(_,null)," ",e("span",null,r[i])):e("li",{class:I.classes.ValidationItemValid},e(C,null)," ",e("span",null,r[i]))}))))};var k={InputContainer:{"& > :not(:last-child)":{"margin-bottom":"20px"}},ErrorStyle:l};var q="\n:host {\n margin: 0 auto;\n width: 100%;\n display: block;\n}\n:host([hidden]): {\n display: none;\n}\n";var D=u(k);var F=D.toString();function O(t){var i,s,r,n,a,o,l,u,c,d;var p=t.states,v=t.callbacks;return e("div",{class:D.classes.InputContainer,part:"sqm-base"},e("style",{type:"text/css"},q,F),e("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",type:"password",name:"/password",label:p.content.fieldLabel||"Password",required:true,disabled:((i=p.registrationFormState)===null||i===void 0?void 0:i.loading)||((s=p.registrationFormState)===null||s===void 0?void 0:s.disabled),validationError:function(t){var e=t.value;if(!e){return"Cannot be empty"}}},((n=(r=p.registrationFormState)===null||r===void 0?void 0:r.initialData)===null||n===void 0?void 0:n.password)?{value:(o=(a=p.registrationFormState)===null||a===void 0?void 0:a.initialData)===null||o===void 0?void 0:o.password}:{},((u=(l=p.registrationFormState)===null||l===void 0?void 0:l.validationErrors)===null||u===void 0?void 0:u.password)?{class:D.classes.ErrorStyle,helpText:((d=(c=p.registrationFormState)===null||c===void 0?void 0:c.validationErrors)===null||d===void 0?void 0:d.password)||"Cannot be empty"}:[],{onInput:function(t){return p.enableValidation&&v.onInput(t)}})),p.dynamicValidation)}function M(t){var e=s(d);var i=r(""),n=i[0],a=i[1];function o(e){var i=V(e.target.value,t);a(i)}return{states:{enableValidation:!t.disableValidation,dynamicValidation:n,registrationFormState:e,content:{fieldLabel:t.fieldLabel}},callbacks:{onInput:o}}}var R=t("sqm_password_field",function(){function t(t){i(this,t);this.ignored=true;this.fieldLabel="Password";this.disableValidation=false;this.meetsRequirementsText="Password has met all requirements";this.doesNotMeetRequirementsText="Password must meet the following requirements:";this.minErrorText="be a minimum of 8 characters";this.uppercaseErrorText="contain at least 1 uppercase character";this.lowercaseErrorText="contain at least 1 lowercase character";this.hasErrorText="contain at least 1 number or symbol";n(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){var t=a()?B(c(this)):M(c(this)),i=t.states,s=t.callbacks;return e(O,{states:i,callbacks:s})};return t}());function B(t){var e,i,s,n,a,l,u;var c=r(""),d=c[0],p=c[1];var v=r(""),h=v[0],f=v[1];if(t.demoData&&h!=((e=t===null||t===void 0?void 0:t.demoData)===null||e===void 0?void 0:e.initValue)){var m=V(((i=t===null||t===void 0?void 0:t.demoData)===null||i===void 0?void 0:i.initValue)||"",t);p(((s=t===null||t===void 0?void 0:t.demoData)===null||s===void 0?void 0:s.initValue)===""?"":m);f((n=t===null||t===void 0?void 0:t.demoData)===null||n===void 0?void 0:n.initValue)}function g(e){var i=V(e.target.value,t);p(i)}return o({states:{enableValidation:!t.disableValidation,dynamicValidation:d,registrationFormState:((l=(a=t===null||t===void 0?void 0:t.demoData)===null||a===void 0?void 0:a.states)===null||l===void 0?void 0:l.registrationFormState)||{},content:{fieldLabel:t.fieldLabel}},callbacks:{onInput:g}},((u=t===null||t===void 0?void 0:t.demoData)===null||u===void 0?void 0:u.states)||{},{arrayMerge:function(t,e){return e}})}}}}));
|