@saasquatch/mint-components 1.6.2-3 → 1.6.2-6
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/{esm/useValidationState-34e24357.js → cjs/AsYouType-6788393a.js} +2 -10
- package/dist/cjs/{ShadowViewAddon-1c9ca20c.js → ShadowViewAddon-33ae7c4f.js} +13 -6
- package/dist/cjs/{global-58e5d657.js → global-b3587dc9.js} +1 -1
- package/dist/cjs/{index.module-7eab8006.js → index.module-ff45cbf1.js} +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mint-components.cjs.js +2 -2
- package/dist/cjs/{re-render-111a3ebb.js → re-render-e5491a50.js} +1 -1
- package/dist/cjs/sqm-asset-card.cjs.entry.js +1 -1
- package/dist/cjs/sqm-big-stat_35.cjs.entry.js +19 -16
- package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +1 -1
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-navigation-sidebar-item-view-6020bdf9.js → sqm-navigation-sidebar-item-view-e8f500f9.js} +1 -1
- package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +2 -2
- package/dist/cjs/sqm-password-field.cjs.entry.js +13 -7
- package/dist/cjs/sqm-popup-container.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-email-verification-view-eebe6329.js → sqm-portal-email-verification-view-dd27bba3.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-portal-footer-view-531c12fe.js → sqm-portal-footer-view-93f8ec0e.js} +1 -1
- package/dist/cjs/sqm-portal-footer.cjs.entry.js +3 -3
- package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +1 -1
- package/dist/cjs/sqm-portal-logout.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-profile-view-d0818828.js → sqm-portal-profile-view-f9104d25.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +4 -4
- package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +1 -1
- package/dist/cjs/sqm-portal-registration-form.cjs.entry.js +70 -23
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +1 -1
- package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +1 -2
- package/dist/cjs/sqm-qa-tabs.cjs.entry.js +2 -2
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +5 -5
- package/dist/cjs/sqm-rewards-table-customer-note-column.cjs.entry.js +2 -2
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +5 -5
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +11 -8
- package/dist/cjs/sqm-tabs.cjs.entry.js +2 -2
- package/dist/cjs/{useChildElements-3a4087c1.js → useChildElements-658fefa1.js} +1 -1
- package/dist/cjs/{useReferralTable-a04fa0e5.js → useReferralTable-ae05b785.js} +3 -3
- package/dist/cjs/useRegistrationFormState-793a7958.js +23 -0
- package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +9 -2
- package/dist/collection/components/sqm-name-fields/sqm-name-fields.js +1 -1
- package/dist/collection/components/sqm-name-fields/useNameFields.js +3 -0
- package/dist/collection/components/sqm-password-field/PasswordField.stories.js +3 -0
- package/dist/collection/components/sqm-password-field/sqm-password-field-view.js +7 -4
- package/dist/collection/components/sqm-password-field/sqm-password-field.js +1 -0
- package/dist/collection/components/sqm-password-field/usePasswordField.js +5 -2
- package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form-view.js +16 -9
- package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form.js +1 -1
- package/dist/collection/components/sqm-portal-registration-form/usePortalRegistrationForm.js +52 -11
- package/dist/collection/components/sqm-portal-registration-form/useRegistrationFormState.js +8 -0
- package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +0 -1
- package/dist/{cjs/useValidationState-942d11da.js → esm/AsYouType-46f67d0d.js} +1 -15
- package/dist/esm/{ShadowViewAddon-77643eb3.js → ShadowViewAddon-7d94f9d6.js} +13 -6
- package/dist/esm/{global-79d68d1f.js → global-1e714a4d.js} +1 -1
- package/dist/esm/{index.module-8e654eb1.js → index.module-9cd4623b.js} +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mint-components.js +2 -2
- package/dist/esm/{re-render-cd65b629.js → re-render-d1b2a0de.js} +1 -1
- package/dist/esm/sqm-asset-card.entry.js +1 -1
- package/dist/esm/sqm-big-stat_35.entry.js +13 -10
- package/dist/esm/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm/sqm-leaderboard-rank.entry.js +2 -2
- package/dist/esm/{sqm-navigation-sidebar-item-view-52b5e3b9.js → sqm-navigation-sidebar-item-view-7e6199c2.js} +1 -1
- package/dist/esm/sqm-navigation-sidebar-item.entry.js +2 -2
- package/dist/esm/sqm-password-field.entry.js +13 -7
- package/dist/esm/sqm-popup-container.entry.js +1 -1
- package/dist/esm/{sqm-portal-email-verification-view-7dafea6c.js → sqm-portal-email-verification-view-ba08318b.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +3 -3
- package/dist/esm/{sqm-portal-footer-view-a857dd94.js → sqm-portal-footer-view-9bfd61b4.js} +1 -1
- package/dist/esm/sqm-portal-footer.entry.js +3 -3
- package/dist/esm/sqm-portal-forgot-password.entry.js +1 -1
- package/dist/esm/sqm-portal-logout.entry.js +1 -1
- package/dist/esm/{sqm-portal-profile-view-785773e9.js → sqm-portal-profile-view-0f8dd14f.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +4 -4
- package/dist/esm/sqm-portal-protected-route.entry.js +1 -1
- package/dist/esm/sqm-portal-registration-form.entry.js +68 -21
- package/dist/esm/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm/sqm-portal-verify-email.entry.js +1 -2
- package/dist/esm/sqm-qa-tabs.entry.js +2 -2
- package/dist/esm/sqm-referral-table_11.entry.js +5 -5
- package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +2 -2
- package/dist/esm/sqm-rewards-table_9.entry.js +5 -5
- package/dist/esm/sqm-stencilbook.entry.js +11 -8
- package/dist/esm/sqm-tabs.entry.js +2 -2
- package/dist/esm/{useChildElements-5a1262d5.js → useChildElements-e1a1d3d1.js} +1 -1
- package/dist/esm/{useReferralTable-6c14c78f.js → useReferralTable-68c0823f.js} +3 -3
- package/dist/esm/useRegistrationFormState-699c3e59.js +18 -0
- package/dist/esm-es5/AsYouType-46f67d0d.js +1 -0
- package/dist/esm-es5/{ShadowViewAddon-77643eb3.js → ShadowViewAddon-7d94f9d6.js} +1 -1
- package/dist/esm-es5/{global-79d68d1f.js → global-1e714a4d.js} +1 -1
- package/dist/esm-es5/{index.module-8e654eb1.js → index.module-9cd4623b.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/{re-render-cd65b629.js → re-render-d1b2a0de.js} +1 -1
- package/dist/esm-es5/sqm-asset-card.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_35.entry.js +1 -1
- package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar-item-view-7e6199c2.js +1 -0
- package/dist/esm-es5/sqm-navigation-sidebar-item.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-7dafea6c.js → sqm-portal-email-verification-view-ba08318b.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-footer-view-a857dd94.js → sqm-portal-footer-view-9bfd61b4.js} +1 -1
- package/dist/esm-es5/sqm-portal-footer.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-785773e9.js → sqm-portal-profile-view-0f8dd14f.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-qa-tabs.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.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-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-tabs.entry.js +1 -1
- package/dist/esm-es5/{useChildElements-5a1262d5.js → useChildElements-e1a1d3d1.js} +1 -1
- package/dist/esm-es5/{useReferralTable-6c14c78f.js → useReferralTable-68c0823f.js} +1 -1
- package/dist/esm-es5/useRegistrationFormState-699c3e59.js +1 -0
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/{p-d5be4f5e.entry.js → p-02e2eab4.entry.js} +2 -2
- package/dist/mint-components/{p-4b34c8b6.system.js → p-07b33645.system.js} +1 -1
- package/dist/mint-components/{p-dc2120a9.entry.js → p-08401205.entry.js} +2 -2
- package/dist/mint-components/p-08fc37fd.system.entry.js +1 -0
- package/dist/mint-components/{p-4cdef37c.system.entry.js → p-10fb0aae.system.entry.js} +1 -1
- package/dist/mint-components/{p-72435015.entry.js → p-1127f297.entry.js} +2 -2
- package/dist/mint-components/p-121cdc60.js +1 -0
- package/dist/mint-components/{p-2db3e574.entry.js → p-17aae439.entry.js} +1 -1
- package/dist/mint-components/{p-cd4ae408.system.entry.js → p-190e24e4.system.entry.js} +1 -1
- package/dist/mint-components/{p-1d11d313.entry.js → p-1ea13deb.entry.js} +12 -12
- package/dist/mint-components/{p-af290d9f.entry.js → p-1fed6a09.entry.js} +1 -1
- package/dist/mint-components/p-273b5c53.system.entry.js +1 -0
- package/dist/mint-components/{p-ad04fd37.js → p-2920efe6.js} +1 -1
- package/dist/mint-components/p-2ce5d3da.js +1 -0
- package/dist/mint-components/p-2d2f7abb.system.entry.js +1 -0
- package/dist/mint-components/{p-fd2e16a3.system.entry.js → p-2de1fadb.system.entry.js} +1 -1
- package/dist/mint-components/{p-b7b610d9.entry.js → p-32f481cb.entry.js} +1 -1
- package/dist/mint-components/{p-cbe1f72a.system.entry.js → p-33910ee5.system.entry.js} +1 -1
- package/dist/mint-components/{p-0049fc60.entry.js → p-36d50757.entry.js} +1 -1
- package/dist/mint-components/p-3fddd002.system.js +1 -0
- package/dist/mint-components/{p-201076d0.system.js → p-40c4165b.system.js} +1 -1
- package/dist/mint-components/{p-4587520e.entry.js → p-4f10205f.entry.js} +1 -1
- package/dist/mint-components/{p-60ae6839.js → p-4f965abe.js} +2 -2
- package/dist/mint-components/{p-0c6077a8.system.entry.js → p-4fdd8b02.system.entry.js} +1 -1
- package/dist/mint-components/{p-250e8ca9.system.entry.js → p-5337c953.system.entry.js} +1 -1
- package/dist/mint-components/p-56bf2c06.system.js +1 -0
- package/dist/mint-components/p-5c347c93.system.entry.js +1 -0
- package/dist/mint-components/{p-cfce9e5c.entry.js → p-5c7c925e.entry.js} +1 -1
- package/dist/mint-components/{p-f79a103c.system.entry.js → p-5d7de7cd.system.entry.js} +1 -1
- package/dist/mint-components/p-5ef24d6c.system.entry.js +1 -0
- package/dist/mint-components/p-69871506.js +1 -0
- package/dist/mint-components/{p-7ba78151.js → p-6c05b2d3.js} +1 -1
- package/dist/mint-components/{p-20f0c0cc.system.js → p-7536759d.system.js} +1 -1
- package/dist/mint-components/{p-c7eaa296.system.entry.js → p-75e425fa.system.entry.js} +1 -1
- package/dist/mint-components/{p-fb8715c9.system.entry.js → p-771b778b.system.entry.js} +1 -1
- package/dist/mint-components/{p-da02c4e6.system.js → p-78c568dc.system.js} +1 -1
- package/dist/mint-components/{p-b2ad0a75.system.entry.js → p-7eb9955b.system.entry.js} +1 -1
- package/dist/mint-components/{p-d8c1aa2f.entry.js → p-91cde020.entry.js} +1 -1
- package/dist/mint-components/p-92e8b7b5.entry.js +1 -0
- package/dist/mint-components/p-9d362d44.system.js +1 -0
- package/dist/mint-components/{p-5aedc3a5.system.js → p-9dd68a9c.system.js} +1 -1
- package/dist/mint-components/{p-45d161fe.entry.js → p-a16556fd.entry.js} +1 -1
- package/dist/mint-components/{p-4e89da81.js → p-a63204e2.js} +1 -1
- package/dist/mint-components/{p-5f2d84e2.js → p-a6bfbb4e.js} +2 -2
- package/dist/mint-components/{p-bdf8f103.js → p-a750f034.js} +1 -1
- package/dist/mint-components/p-a963e9d5.entry.js +9 -0
- package/dist/mint-components/{p-d3c61681.system.js → p-ab7ae098.system.js} +1 -1
- package/dist/mint-components/{p-12b08957.js → p-abc426c4.js} +1 -1
- package/dist/mint-components/p-abffc249.entry.js +13 -0
- package/dist/mint-components/p-ad67b111.system.entry.js +1 -0
- package/dist/mint-components/{p-72dd2010.system.entry.js → p-b5faa04d.system.entry.js} +1 -1
- package/dist/mint-components/{p-986000f9.system.entry.js → p-b7fc1ee1.system.entry.js} +1 -1
- package/dist/mint-components/{p-c14b8c38.entry.js → p-b96505f5.entry.js} +1 -1
- package/dist/mint-components/{p-27557cc8.entry.js → p-ba09e62f.entry.js} +1 -1
- package/dist/mint-components/{p-36ff7a62.entry.js → p-c911a062.entry.js} +1 -1
- package/dist/mint-components/{p-e647c594.entry.js → p-cbb61c41.entry.js} +1 -1
- package/dist/mint-components/{p-9c58002f.entry.js → p-cdf2914a.entry.js} +1 -1
- package/dist/mint-components/p-ce5a3693.system.js +1 -0
- package/dist/mint-components/{p-1670c8d5.system.entry.js → p-cf279181.system.entry.js} +1 -1
- package/dist/mint-components/{p-a94d07d9.system.js → p-d1712ae1.system.js} +1 -1
- package/dist/mint-components/p-de4f0622.entry.js +1 -0
- package/dist/mint-components/{p-1260d387.entry.js → p-e28f4762.entry.js} +1 -1
- package/dist/mint-components/{p-47aa639f.system.entry.js → p-e9fa325e.system.entry.js} +1 -1
- package/dist/mint-components/p-ec18b601.system.js +1 -0
- package/dist/mint-components/{p-c7514dbd.system.entry.js → p-ecf7bfc7.system.entry.js} +1 -1
- package/dist/mint-components/{p-d8f4703a.js → p-ee0c06b3.js} +1 -1
- package/dist/mint-components/{p-bc796bc0.system.js → p-efbc0ee0.system.js} +1 -1
- package/dist/mint-components/{p-4392ba94.js → p-fc8800c0.js} +1 -1
- package/dist/mint-components/{p-89841802.system.entry.js → p-fdc7e95e.system.entry.js} +1 -1
- package/dist/types/components/sqm-name-fields/sqm-name-fields-view.d.ts +2 -0
- package/dist/types/components/sqm-name-fields/useNameFields.d.ts +2 -0
- package/dist/types/components/sqm-password-field/sqm-password-field-view.d.ts +2 -0
- package/dist/types/components/sqm-password-field/sqm-password-field.d.ts +2 -0
- package/dist/types/components/sqm-portal-registration-form/sqm-portal-registration-form-view.d.ts +2 -0
- package/dist/types/components/sqm-portal-registration-form/usePortalRegistrationForm.d.ts +2 -0
- package/dist/types/components/sqm-portal-registration-form/useRegistrationFormState.d.ts +23 -0
- package/docs/docs.docx +0 -0
- package/package.json +2 -2
- package/dist/esm-es5/sqm-navigation-sidebar-item-view-52b5e3b9.js +0 -1
- package/dist/esm-es5/useValidationState-34e24357.js +0 -1
- package/dist/mint-components/p-00893b1e.system.entry.js +0 -1
- package/dist/mint-components/p-2e827a20.system.entry.js +0 -1
- package/dist/mint-components/p-458416a0.system.js +0 -1
- package/dist/mint-components/p-494c99f7.js +0 -1
- package/dist/mint-components/p-6d0a42f8.system.entry.js +0 -1
- package/dist/mint-components/p-9311fb68.entry.js +0 -1
- package/dist/mint-components/p-955ecee3.system.entry.js +0 -1
- package/dist/mint-components/p-a7895b97.system.entry.js +0 -1
- package/dist/mint-components/p-b670cff3.system.js +0 -1
- package/dist/mint-components/p-c6fc021c.js +0 -1
- package/dist/mint-components/p-c7bc2261.entry.js +0 -9
- package/dist/mint-components/p-d78b809c.system.js +0 -1
- package/dist/mint-components/p-e013289c.entry.js +0 -1
- package/dist/mint-components/p-e2fe2d6f.entry.js +0 -1
- package/dist/mint-components/p-e5d4a15d.system.js +0 -1
- package/dist/mint-components/p-f2efaa41.system.entry.js +0 -1
- package/docs/grapesjs.js +0 -54
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { P } from './index.module-8e654eb1.js';
|
|
1
|
+
'use strict';
|
|
3
2
|
|
|
4
3
|
// This file is a workaround for a bug in web browsers' "native"
|
|
5
4
|
// ES6 importing system which is uncapable of importing "*.json" files.
|
|
@@ -3872,11 +3871,4 @@ function AsYouType$1(country) {
|
|
|
3872
3871
|
AsYouType$1.prototype = Object.create(AsYouType.prototype, {});
|
|
3873
3872
|
AsYouType$1.prototype.constructor = AsYouType$1;
|
|
3874
3873
|
|
|
3875
|
-
|
|
3876
|
-
function useValidationState(formState) {
|
|
3877
|
-
const host = P();
|
|
3878
|
-
const [validationState, setValidationState] = y(host, FORM_VALIDATION_CONTEXT, formState);
|
|
3879
|
-
return { validationState, setValidationState };
|
|
3880
|
-
}
|
|
3881
|
-
|
|
3882
|
-
export { AsYouType$1 as A, FORM_VALIDATION_CONTEXT as F, useValidationState as u };
|
|
3874
|
+
exports.AsYouType = AsYouType$1;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
const index = require('./index-b0129cd6.js');
|
|
4
4
|
const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
|
|
5
|
-
const global = require('./global-
|
|
6
|
-
const index_module = require('./index.module-
|
|
5
|
+
const global = require('./global-b3587dc9.js');
|
|
6
|
+
const index_module = require('./index.module-ff45cbf1.js');
|
|
7
7
|
const cjs = require('./cjs-1066ec21.js');
|
|
8
8
|
const mixins = require('./mixins-fe9d4112.js');
|
|
9
9
|
const JSS = require('./JSS-97fd087e.js');
|
|
10
|
-
const useChildElements = require('./useChildElements-
|
|
10
|
+
const useChildElements = require('./useChildElements-658fefa1.js');
|
|
11
11
|
const luxon = require('./luxon-59ca7d19.js');
|
|
12
12
|
const utils = require('./utils-6847bc06.js');
|
|
13
13
|
const sqmTextSpanView = require('./sqm-text-span-view-2c7d94b5.js');
|
|
@@ -365,7 +365,7 @@ function useShareLink(props) {
|
|
|
365
365
|
const user = index_module.ae();
|
|
366
366
|
const engagementMedium = index_module.J();
|
|
367
367
|
const { data } = index_module.wn(MessageLinkQuery, { programId }, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
368
|
-
const [sendLoadEvent] = index_module
|
|
368
|
+
const [sendLoadEvent] = index_module.$e(WIDGET_ENGAGEMENT_EVENT);
|
|
369
369
|
const shareString = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.shareLink) !== null && _b !== void 0 ? _b :
|
|
370
370
|
// Shown during loading
|
|
371
371
|
"...";
|
|
@@ -2450,18 +2450,25 @@ sl-input::part(label){
|
|
|
2450
2450
|
const sheet$9 = JSS.createStyleSheet(style$9);
|
|
2451
2451
|
const styleString$9 = sheet$9.toString();
|
|
2452
2452
|
function NameFieldsView(props) {
|
|
2453
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
2453
2454
|
const { states } = props;
|
|
2454
2455
|
const validationErrors = states === null || states === void 0 ? void 0 : states.validationErrors;
|
|
2455
2456
|
return (index.h("div", { class: sheet$9.classes.FieldsContainer },
|
|
2456
2457
|
index.h("style", { type: "text/css" },
|
|
2457
2458
|
vanillaStyle$3,
|
|
2458
2459
|
styleString$9),
|
|
2459
|
-
index.h("sl-input", Object.assign({ exportparts: "label: input-label", name: "/firstName", type: "text", label: states.content.firstNameLabel, required: true }, ((
|
|
2460
|
+
index.h("sl-input", Object.assign({ exportparts: "label: input-label", name: "/firstName", type: "text", label: states.content.firstNameLabel, required: true, disabled: ((_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.loading) || ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.disabled) }, (((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.initialData) === null || _d === void 0 ? void 0 : _d.firstName) ? {
|
|
2461
|
+
value: (_f = (_e = states.registrationFormState) === null || _e === void 0 ? void 0 : _e.initialData) === null || _f === void 0 ? void 0 : _f.firstName,
|
|
2462
|
+
}
|
|
2463
|
+
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) ? {
|
|
2460
2464
|
class: sheet$9.classes.ErrorStyle,
|
|
2461
2465
|
helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) || "Cannot be empty",
|
|
2462
2466
|
}
|
|
2463
2467
|
: []))),
|
|
2464
|
-
index.h("sl-input", Object.assign({ exportparts: "label: input-label", name: "/lastName", type: "text", label: states.content.lastNameLabel, required: true }, ((
|
|
2468
|
+
index.h("sl-input", Object.assign({ exportparts: "label: input-label", name: "/lastName", type: "text", label: states.content.lastNameLabel, required: true, disabled: ((_g = states.registrationFormState) === null || _g === void 0 ? void 0 : _g.loading) || ((_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.disabled) }, (((_k = (_j = states.registrationFormState) === null || _j === void 0 ? void 0 : _j.initialData) === null || _k === void 0 ? void 0 : _k.lastName) ? {
|
|
2469
|
+
value: (_m = (_l = states.registrationFormState) === null || _l === void 0 ? void 0 : _l.initialData) === null || _m === void 0 ? void 0 : _m.lastName,
|
|
2470
|
+
}
|
|
2471
|
+
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) ? {
|
|
2465
2472
|
class: sheet$9.classes.ErrorStyle,
|
|
2466
2473
|
helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) || "Cannot be empty",
|
|
2467
2474
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
|
|
4
|
-
const index_module = require('./index.module-
|
|
4
|
+
const index_module = require('./index.module-ff45cbf1.js');
|
|
5
5
|
|
|
6
6
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
7
7
|
__assign = Object.assign || function(t) {
|
|
@@ -8137,8 +8137,9 @@ function parsePath(path) {
|
|
|
8137
8137
|
return parsedPath;
|
|
8138
8138
|
}
|
|
8139
8139
|
|
|
8140
|
-
var S,q={current:void 0};function P(){if(void 0===q.current)throw new Error("no implementation of useHost provided");return q.current()}function E(e){if(!e)throw new Error("Must supply an implementation");if("function"!=typeof e)throw new Error("implementation must be a function");q.current=e;}function D(){var e;window.squatchProgramId||(window.squatchProgramId=new stencilHooks_module.c({element:document.documentElement,initialState:(null==(e=window.widgetIdent)?void 0:e.programId)||void 0,contextName:"sq:program-id"}).start());}function M(){D();var n=P();return stencilHooks_module.h(n,"sq:program-id")}function A(e){D(),window.squatchProgramId.context=e;}function $(){return ($=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);}return e}).apply(this,arguments)}function k(e,n){return (k=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function j(e,n){return n||(n=e.slice(0)),e.raw=n,e}function x(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function R(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return x(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return "Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?x(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return (t=e[Symbol.iterator]()).next.bind(t)}var V=dist.gql(S||(S=j(["\n query {\n viewer {\n ... on User {\n locale\n }\n }\n }\n"])));function O(){!function(){var e,r=window.squatchLocale,a=ae();stencilHooks_module.useEffect(function(){if(!a&&r)return r.context=void 0;s({});},[a]);var o,i=tn(V),s=i[0],u=i[1].data,d=null==u||null==(e=u.viewer)?void 0:e.locale;r?d!==r.context&&(r.context=d):window.squatchLocale=new stencilHooks_module.c({element:document.documentElement,initialState:d||(null==(o=window.widgetIdent)?void 0:o.locale)||void 0,contextName:"sq:locale"}).start();}();var r=P();return stencilHooks_module.h(r,"sq:locale")}function N(e){var n=window.squatchLocale;n&&(n.context=e);}function H(){var e,n;return window.SquatchAndroid?{type:"SquatchAndroid",android:window.SquatchAndroid,widgetIdent:window.widgetIdent}:window.SquatchPortal?{type:"SquatchPortal",env:window.SquatchPortal}:window.SquatchAdmin?{type:"SquatchAdmin",adminSDK:window.SquatchAdmin}:window.widgetIdent&&"demo"!==(null==(e=window.widgetIdent)?void 0:e.env)?{type:"SquatchJS2",api:null==(n=window.frameElement)?void 0:n.squatchJsApi,widgetIdent:window.widgetIdent}:{type:"None"}}function L(){var e=H();return "None"===e.type||"SquatchAdmin"===e.type}function U(){var e=H();switch(e.type){case"SquatchAndroid":case"SquatchJS2":return e.widgetIdent.tenantAlias;case"SquatchAdmin":case"None":return "demo";case"SquatchPortal":return e.env.tenantAlias}}function W(){var e,n=H();switch(n.type){case"SquatchAndroid":case"SquatchJS2":return n.widgetIdent.appDomain;case"SquatchPortal":return (null==(e=n.env)?void 0:e.appDomain)||"https://app.referralsaasquatch.com";case"SquatchAdmin":case"None":return "https://app.referralsaasquatch.com"}}function J(){var e=H();switch(e.type){case"SquatchJS2":return e.widgetIdent.engagementMedium||"EMBED";case"SquatchAndroid":case"SquatchPortal":case"SquatchAdmin":case"None":return "EMBED"}}var _=1e3,T=60*_,Q=60*T,z=24*Q,G=function(e,n){n=n||{};var t=typeof e;if("string"===t&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var n=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(n){var t=parseFloat(n[1]);switch((n[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*t;case"weeks":case"week":case"w":return 6048e5*t;case"days":case"day":case"d":return t*z;case"hours":case"hour":case"hrs":case"hr":case"h":return t*Q;case"minutes":case"minute":case"mins":case"min":case"m":return t*T;case"seconds":case"second":case"secs":case"sec":case"s":return t*_;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}(e);if("number"===t&&isFinite(e))return n.long?function(e){var n=Math.abs(e);return n>=z?B(e,n,z,"day"):n>=Q?B(e,n,Q,"hour"):n>=T?B(e,n,T,"minute"):n>=_?B(e,n,_,"second"):e+" ms"}(e):function(e){var n=Math.abs(e);return n>=z?Math.round(e/z)+"d":n>=Q?Math.round(e/Q)+"h":n>=T?Math.round(e/T)+"m":n>=_?Math.round(e/_)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function B(e,n,t,r){var a=n>=1.5*t;return Math.round(e/t)+" "+r+(a?"s":"")}var K,Z=(function(e,n){n.formatArgs=function(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const t="color: "+this.color;n.splice(1,0,t,"color: inherit");let r=0,a=0;n[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(a=r));}),n.splice(a,0,t);},n.save=function(e){try{e?n.storage.setItem("debug",e):n.storage.removeItem("debug");}catch(e){}},n.load=function(){let e;try{e=n.storage.getItem("debug");}catch(e){}return !e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},n.useColors=function(){return !("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},n.storage=function(){try{return localStorage}catch(e){}}(),n.destroy=(()=>{let e=!1;return ()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));}})(),n.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],n.log=console.debug||console.log||(()=>{}),e.exports=function(e){function n(e){let r,a=null;function o(...e){if(!o.enabled)return;const t=o,a=Number(new Date);t.diff=a-(r||a),t.prev=r,t.curr=a,r=a,e[0]=n.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,a)=>{if("%%"===r)return "%";i++;const o=n.formatters[a];return "function"==typeof o&&(r=o.call(t,e[i]),e.splice(i,1),i--),r}),n.formatArgs.call(t,e),(t.log||n.log).apply(t,e);}return o.namespace=e,o.useColors=n.useColors(),o.color=n.selectColor(e),o.extend=t,o.destroy=n.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>null===a?n.enabled(e):a,set:e=>{a=e;}}),"function"==typeof n.init&&n.init(o),o}function t(e,t){const r=n(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return n.debug=n,n.default=n,n.coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){const e=[...n.names.map(r),...n.skips.map(r).map(e=>"-"+e)].join(",");return n.enable(""),e},n.enable=function(e){let t;n.save(e),n.names=[],n.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),a=r.length;for(t=0;t<a;t++)r[t]&&("-"===(e=r[t].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")));},n.enabled=function(e){if("*"===e[e.length-1])return !0;let t,r;for(t=0,r=n.skips.length;t<r;t++)if(n.skips[t].test(e))return !1;for(t=0,r=n.names.length;t<r;t++)if(n.names[t].test(e))return !0;return !1},n.humanize=G,n.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");},Object.keys(e).forEach(t=>{n[t]=e[t];}),n.names=[],n.skips=[],n.formatters={},n.selectColor=function(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]},n.enable(n.load()),n}(n);const{formatters:t}=e.exports;t.j=function(e){try{return JSON.stringify(e)}catch(e){return "[UnexpectedJSONParseError]: "+e.message}};}(K={exports:{}},K.exports),K.exports),X=Z("sq:user-identity");function Y(){window.squatchUserIdentity||(window.squatchUserIdentity=new stencilHooks_module.c({element:document.documentElement,initialState:ne(),contextName:"sq:user-identity"}).start());}function ee(e){if(e)try{var n,t,r=o(e),a=r.exp;if(function(e){return e.sub&&/.*:.*@.*:users/.test(e.sub)}(r)){var o$1=r.sub.match(/(.*):(.*)@(.*):users/);t=atob(o$1[1]),n=atob(o$1[2]);}else (function(e){return e.user&&e.user.id&&e.user.accountId})(r)&&(t=r.user.accountId,n=r.user.id);if(!n||!t)return;if(a&&Date.now()>=1e3*a)return;return {id:n,accountId:t,jwt:e}}catch(e){return}}function ne(){var e=H();switch(e.type){case"SquatchAndroid":case"SquatchJS2":return {id:e.widgetIdent.userId,accountId:e.widgetIdent.accountId,jwt:e.widgetIdent.token};case"SquatchPortal":var n=new URLSearchParams(document.location.search);if(n.has("jwt"))return ee(n.get("jwt"));var t=localStorage.getItem("sq:user-identity");if(!t)return;try{var r=JSON.parse(t),a=ee(r.jwt);return a?$({},r,a):void 0}catch(e){return}case"SquatchAdmin":case"None":return}}function te(e){Y();var n=window.squatchUserIdentity;equal(n.context,e)||(N(void 0),n.context=e),e&&"SquatchPortal"===H().type?localStorage.setItem("sq:user-identity",JSON.stringify(e)):e||(X("Deleting user from localStorage"),localStorage.removeItem("sq:user-identity"));}function re(){var e;return null==(e=ae())?void 0:e.jwt}function ae(){Y();var n=P(),t=stencilHooks_module.h(n,"sq:user-identity"),r=ee(null==t?void 0:t.jwt);return t&&!r?(te(void 0),void N(void 0)):t}var oe=function(){return (oe=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var a in n=arguments[t])Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a]);return e}).apply(this,arguments)},ie=new Map,se=new Map,ue=!0,de=!1;function ce(e){return e.replace(/[\s,]+/g," ").trim()}function le(e){var n,t,r,a=ce(e);if(!ie.has(a)){var o=parse(e,{experimentalFragmentVariables:de});if(!o||"Document"!==o.kind)throw new Error("Not a valid GraphQL document.");ie.set(a,function(e){var n=new Set(e.definitions);n.forEach(function(e){e.loc&&delete e.loc,Object.keys(e).forEach(function(t){var r=e[t];r&&"object"==typeof r&&n.add(r);});});var t=e.loc;return t&&(delete t.startToken,delete t.endToken),e}((n=o,t=new Set,r=[],n.definitions.forEach(function(e){if("FragmentDefinition"===e.kind){var n=e.name.value,a=ce((i=e.loc).source.body.substring(i.start,i.end)),o=se.get(n);o&&!o.has(a)?ue&&console.warn("Warning: fragment with name "+n+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||se.set(n,o=new Set),o.add(a),t.has(a)||(t.add(a),r.push(e));}else r.push(e);var i;}),oe(oe({},n),{definitions:r}))));}return ie.get(a)}function fe(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];"string"==typeof e&&(e=[e]);var r=e[0];return n.forEach(function(n,t){r+=n&&"Document"===n.kind?n.loc.source.body:n,r+=e[t+1];}),le(r)}var me,ve=fe;(me=fe||(fe={})).gql=ve,me.resetCaches=function(){ie.clear(),se.clear();},me.disableFragmentWarnings=function(){ue=!1;},me.enableExperimentalFragmentVariables=function(){de=!0;},me.disableExperimentalFragmentVariables=function(){de=!1;},fe.default=fe;var ge=fe;function pe(e,n){try{var t=e();}catch(e){return n(e)}return t&&t.then?t.then(void 0,n):t}var he=function(e){var n,t;function r(n,t){var r;(r=e.call(this,n,t)||this).subject=new Subject;var a=new Subject;return r.subject.pipe(bufferTime(200,void 0,10)).subscribe(function(e){try{if(!e.length)return Promise.resolve();for(var n,t=Ce(e),o=t.mergedQuery,i=t.mergedVariables,s=t.mergedQueryAddedEvents,u=R(t.unmergedQueryAddedEvents);!(n=u()).done;)a.next(n.value);return s.length?Promise.resolve(pe(function(){return Promise.resolve(r.superRequest(o,i)).then(function(e){Se(e,s);})},function(e){if(e instanceof types.ClientError){var n=function(){var n=e.response,t=n.data,r=n.errors;if(!t)return {v:Pe(s,e)};for(var a,o=Object.keys(t),i=[].concat(s),u=function(){var n=a.value,t=void 0;n.path.find(function(r,a,s){if(o.includes(r)){var u=be(r),d=i.findIndex(function(e){return e.id===u});if(-1===d)return !1;o.splice(a,1),t=i.splice(d,1)[0];var c=Ie(e.response.data,t);s[a]=we(s[a],u);var l=t.query,f=t.variables,v=$({},e.response,{errors:[n],data:c,path:s}),g=new types.ClientError(v,{query:"string"!=typeof l?print(l):l,variables:f});return qe(t,g),!0}return !1});},d=R(r);!(a=d()).done;)u();Se(t,i);}();if("object"==typeof n)return n.v}else Pe(s,e);})):Promise.resolve()}catch(e){return Promise.reject(e)}}),a.subscribe(function(e){try{var n=pe(function(){return Promise.resolve(r.superRequest(e.query,e.variables)).then(function(n){Fe(n,e);})},function(n){qe(e,n);});return Promise.resolve(n&&n.then?n.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}),r}t=e,(n=r).prototype=Object.create(t.prototype),n.prototype.constructor=n,k(n,t);var a=r.prototype;return a.superRequest=function(n,t){return e.prototype.request.call(this,n,t)},a.request=function(e,n){var t=this;return new Promise(function(r,a){var o={query:e,variables:n,id:ye(),resolve:r,reject:a};t.subject.next(o);})},r}(dist.GraphQLClient),ye=function(){return nanoid().replace(/[-_]/g,"")},we=function(e,n){return e.replace("_"+n,"")},be=function(e){var n=e.split("_");return n[n.length-1]},Ce=function(e){var n=[],t=[],r=e.reduce(function(e,r){var a=r.query,o=r.variables,i=r.id;try{var s="string"==typeof a?parse(a):a,u=s.definitions.find(function(e){return "FragmentDefinition"===e.kind}),d="string"==typeof a?a:print(a),c=/@/.test(d);if(u||c)return t.push(r),e;var l=function(e){return function(e,n){return e+"_"+n}(e,i)};return e=e.addN(s,[o],l,l),n.push(r),e}catch(n){return t.push(r),e}},w("BatchedQuery")),a=r.document,o=r.variables;return {mergedQuery:a&&print(a),mergedVariables:o,mergedQueryAddedEvents:n,unmergedQueryAddedEvents:t}},Ie=function(e,n){if(!e)return e;var t=Object.keys(e),r=n.id;return t.reduce(function(n,t){var a;return t.endsWith(r)&&(n=$({},n,((a={})[we(t,r)]=e[t],a))),n},{})},Fe=function(e,n){(0, n.resolve)(e);},Se=function(e,n){for(var t,r=R(n);!(t=r()).done;){var a=t.value,o=Ie(e,a);a.resolve(o);}},qe=function(e,n){(0, e.reject)(n);},Pe=function(e,n){for(var t,r=R(e);!(t=r()).done;)(0, t.value.reject)(n);},Ee="sq:graphql-client",De=src(function(e,n,t){return new he(e+"/api/v1/"+n+"/graphql",{headers:{Authorization:"Bearer "+(t||"")}})});function Me(e,n){switch(n.type){case"loading":return {data:void 0,errors:void 0,loading:!0};case"data":return {data:n.payload,errors:void 0,loading:!1};case"errors":return {data:void 0,errors:n.payload,loading:!1}}}function Ae(n,t){var o,i,s,u,d,c,l=(o=re(),i=W(),s=U(),u=De(i,s,o),d=P(),null!=(c=stencilHooks_module.h(d,"sq:graphql-client",{attempts:0}))?c:u),f=stencilHooks_module.useReducer(Me,t),m=f[1];return [f[0],useCallback.useCallback(function(e,t){void 0===t&&(t=!1);try{if(!l)return m({type:"errors",payload:new Error("No GraphQL client found")}),Promise.resolve();var r=function(r,a){try{var o=(t||m({type:"loading"}),Promise.resolve(l.request(n,e)).then(function(e){m({type:"data",payload:e});}));}catch(e){return a(e)}return o&&o.then?o.then(void 0,a):o}(0,function(e){m({type:"errors",payload:e});});return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},[l,n,m])]}var $e,ke={loading:!1,data:void 0,errors:void 0};function je(e){var n=Ae(e,ke);return [n[1],n[0]]}var xe,Re=ge($e||($e=j(["\n mutation AuthenticateWithEmailAndPassword(\n $email: String!\n $password: String!\n ) {\n authenticateManagedIdentityWithEmailAndPassword(\n authenticateManagedIdentityWithEmailAndPasswordInput: {\n email: $email\n password: $password\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function Ve(){var e=je(Re),n=e[0],r=e[1],a=r.loading,o$1=r.data,i=r.errors;return stencilHooks_module.useEffect(function(){if(null!=o$1&&o$1.authenticateManagedIdentityWithEmailAndPassword){var e=o$1.authenticateManagedIdentityWithEmailAndPassword,n=e.token,t=o(n).user;te({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.email,emailVerified:e.emailVerified,sessionData:e.sessionData}});}},[null==o$1?void 0:o$1.authenticateManagedIdentityWithEmailAndPassword]),[n,{loading:a,data:o$1,errors:i}]}var Oe,Ne=ge(xe||(xe=j(["\n mutation RegisterWithEmailAndPassword(\n $email: String!\n $password: String!\n $formData: RSJsonNode\n $redirectPath: String\n ) {\n registerManagedIdentityWithEmailAndPassword(\n registerManagedIdentityWithEmailAndPasswordInput: {\n email: $email\n password: $password\n formData: $formData\n redirectPath: $redirectPath\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function He(){var e=je(Ne),n=e[0],r=e[1],a=r.loading,o$1=r.data,i=r.errors;return stencilHooks_module.useEffect(function(){if(null!=o$1&&o$1.registerManagedIdentityWithEmailAndPassword){var e=o$1.registerManagedIdentityWithEmailAndPassword,n=e.token,t=o(n).user;te({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.email,emailVerified:e.emailVerified,sessionData:e.sessionData}});}},[null==o$1?void 0:o$1.registerManagedIdentityWithEmailAndPassword]),[n,{loading:a,data:o$1,errors:i}]}var Le,Ue=ge(Oe||(Oe=j(["\n mutation RegisterViaRegistrationForm(\n $key: String!\n $email: String!\n $password: String!\n $formData: RSJsonNode\n $redirectPath: String\n ) {\n submitForm(\n formSubmissionInput: {\n key: $key\n formData: {\n email: $email\n password: $password\n formData: $formData\n redirectPath: $redirectPath\n }\n }\n ) {\n results {\n ... on FormHandlerSubmissionResult {\n result\n formHandler {\n namespace\n }\n }\n ... on FormHandlerError {\n errorCode\n error\n errorType\n formHandler {\n name\n endpointUrl\n }\n }\n }\n }\n }\n"])));function We(){var e=je(Ue),n=e[0],r=e[1],a=r.loading,i=r.data,s=r.errors,u=stencilHooks_module.useState(null),d=u[0],l=u[1];return stencilHooks_module.useEffect(function(){var e,n=null==i||null==(e=i.submitForm)?void 0:e.results.find(function(e){return "identity"===e.formHandler.namespace});if(n&&n.result.results.length){var t=n.result.results[0];if(t.success){l(null);var r=t.data.token,a=o(r).user;te({jwt:r,id:a.id,accountId:a.accountId,managedIdentity:{email:t.data.email,emailVerified:t.data.emailVerified,sessionData:t.data.sessionData}});}else l(t.message);}},[null==i?void 0:i.submitForm]),[n,{loading:a,data:i,errors:s,formError:d}]}var Je,_e=ge(Le||(Le=j(["\n mutation ChangePassword($password: String!) {\n changeManagedIdentityPassword(\n changeManagedIdentityPasswordInput: { password: $password }\n ) {\n success\n }\n }\n"])));function Te(){var e=je(_e),n=e[1];return [e[0],{loading:n.loading,data:n.data,errors:n.errors}]}var Qe,ze=ge(Je||(Je=j(["\n mutation ResetPassword($oobCode: String!, $password: String!) {\n resetManagedIdentityPassword(\n resetManagedIdentityPasswordInput: {\n password: $password\n oobCode: $oobCode\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function Ge(){var e=je(ze),n=e[0],r=e[1],a=r.loading,o$1=r.data,i=r.errors;return stencilHooks_module.useEffect(function(){if(null!=o$1&&o$1.resetManagedIdentityPassword){var e=o$1.resetManagedIdentityPassword,n=e.token,t=o(n).user;te({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.email,emailVerified:e.emailVerified,sessionData:e.sessionData}});}},[null==o$1?void 0:o$1.resetManagedIdentityPassword]),[n,{loading:a,data:o$1,errors:i}]}var Be=ge(Qe||(Qe=j(["\n mutation VerifyPasswordResetCode($oobCode: String!) {\n verifyManagedIdentityPasswordResetCode(\n verifyManagedIdentityPasswordResetCodeInput: { oobCode: $oobCode }\n ) {\n success\n }\n }\n"])));function Ke(){return je(Be)}function Ze(){var e=P();return {refresh:useCallback.useCallback(function(){e.dispatchEvent(new CustomEvent("sq:refresh",{bubbles:!0,composed:!0,cancelable:!0,detail:{}}));},[e])}}function Xe(e){var n=e.skip,r=void 0!==n&&n,a=e.update,o=e.variables;stencilHooks_module.useEffect(function(){var e=function(e){!r&&a(o,!0);};return document.addEventListener("sq:refresh",e),function(){return document.removeEventListener("sq:refresh",e)}},function(e){var n=stencilHooks_module.useRef(e),t=stencilHooks_module.useRef(0);return equal(e,n.current)||(n.current=e,t.current+=1),stencilHooks_module.useMemo(function(){return n.current},[t.current])}([o,a,r]));}var Ye,en={loading:!1,data:void 0,errors:void 0},nn=Symbol();function tn(e){var n=Ae(e,en),t=n[0],r=n[1],a=stencilHooks_module.useRef(nn);return Xe({skip:a.current===nn,update:r,variables:a.current}),[r,$({},t,{refetch:function(e){a.current=e,r(e);}})]}var rn,an=ge(Ye||(Ye=j(["\n query ManagedIdentitySession {\n managedIdentitySession {\n email\n emailVerified\n sessionData\n }\n }\n"])));function on(){var e=ae(),n=tn(an),r=n[0],o=n[1],i=o.loading,s=o.data,u=o.errors,d=o.refetch;return stencilHooks_module.useEffect(function(){null!=s&&s.managedIdentitySession&&te($({},e,{managedIdentity:s.managedIdentitySession}));},[null==s?void 0:s.managedIdentitySession]),[useCallback.useCallback(function(){return r({})},[r]),{loading:i,data:s,errors:u,refetch:d}]}var sn,un=ge(rn||(rn=j(["\n mutation VerifyEmail($oobCode: String!) {\n verifyManagedIdentityEmail(\n verifyManagedIdentityEmailInput: { oobCode: $oobCode }\n ) {\n success\n }\n }\n"])));function dn(){var e,n=on()[0],r=je(un),a=r[0],o=r[1],i=o.loading,s=o.data,u=o.errors;return stencilHooks_module.useEffect(function(){var e;null!=s&&null!=(e=s.verifyManagedIdentityEmail)&&e.success&&n();},[null==s||null==(e=s.verifyManagedIdentityEmail)?void 0:e.success]),[a,{loading:i,data:s,errors:u}]}var cn,ln=ge(sn||(sn=j(["\n mutation RequestPasswordResetEmail(\n $email: String!\n $urlParams: RSJsonNode\n $redirectPath: String\n ) {\n requestManagedIdentityPasswordResetEmail(\n requestManagedIdentityPasswordResetEmailInput: {\n email: $email\n urlParams: $urlParams\n redirectPath: $redirectPath\n }\n ) {\n success\n }\n }\n"])));function fn(){return je(ln)}var mn=ge(cn||(cn=j(["\n mutation RequestVerificationEmail(\n $email: String!\n $urlParams: RSJsonNode\n $redirectPath: String\n ) {\n requestManagedIdentityVerificationEmail(\n requestManagedIdentityVerificationEmailInput: {\n email: $email\n urlParams: $urlParams\n redirectPath: $redirectPath\n }\n ) {\n success\n }\n }\n"])));function vn(){return je(mn)}function gn(e,n){var t=stencilHooks_module.useRef();return t.current&&equal(n,t.current.key)||(t.current={key:n,value:e()}),t.current.value}function pn(){return stencilHooks_module.useReducer(function(e){return e+1},0)}function hn(e){for(var n,t=R(Object.getOwnPropertyNames(e));!(n=t()).done;){var r=e[n.value];r&&"object"==typeof r&&hn(r);}return Object.freeze(e)}var yn={loading:!0,data:void 0,errors:void 0};function wn(e,n,t){var r=Ae(e,yn),a=r[0],o=r[1],i=pn(),s=i[1];return gn(function(){!t&&o(n);},[e,n,o,i[0],t]),Xe({skip:t,update:o,variables:n}),hn($({},a,{refetch:s}))}function bn(){return window.squatchHistory=window.squatchHistory||function(){switch(H().type){case"SquatchPortal":return createBrowserHistory();default:return createMemoryHistory()}}(),window.squatchHistory}var Cn,In={createHref:function(){var e;return (e=bn()).createHref.apply(e,[].slice.call(arguments))},push:function(){var e;return (e=bn()).push.apply(e,[].slice.call(arguments))},replace:function(){var e;return (e=bn()).replace.apply(e,[].slice.call(arguments))},go:function(){var e;return (e=bn()).go.apply(e,[].slice.call(arguments))},back:function(){return bn().back()},forward:function(){var e;return (e=bn()).forward.apply(e,[].slice.call(arguments))}};function Fn(){var e=pn()[1];return stencilHooks_module.useEffect(function(){return bn().listen(function(){e();})},[]),bn().location}function Sn(e){var n=stencilHooks_module.useState({limit:e.limit,offset:e.offset}),t=n[0],r=n[1],a=t.offset,i=t.limit,s=function(e,n){return e*n},u=function(e,n){return Math.ceil(e/n)||0};return {limit:i,setLimit:function(e){var n=u(a,e),o=s(e,n);r($({},t,{limit:e,offset:o}));},offset:a,setCurrentPage:function(e){var n=s(e,i);r(function(e){return $({},e,{offset:n})});},calculatePagination:function(e,n){var t=u(a,i),r=function(e,n){return Math.ceil(e/n)||0}(n,i),o=0===e?"0":e>1?a+1+"-"+(a+e):""+(a+1);return {currentPage:t,pageCount:r,rangeOnPage:o,pageProgress:o+" of "+n}}}}function qn(e,n,t,r,a){var o;void 0===r&&(r={}),void 0===a&&(a=!1);var i=Sn(t),s=i.limit,u=i.setLimit,d=i.setCurrentPage,c=i.calculatePagination,l=wn(e,$({limit:s,offset:i.offset},r),a),f=l.loading,m=l.errors,v=l.refetch,g=n(l.data),p=c((null==g||null==(o=g.data)?void 0:o.length)||0,(null==g?void 0:g.totalCount)||0);return {envelope:g,states:{errors:m,loading:f,limit:s,currentPage:p.currentPage,pageCount:p.pageCount,pageProgress:p.pageProgress},callbacks:{refetch:v,setLimit:u,setCurrentPage:d}}}var Mn,An,$n,kn=dist.gql(Cn||(Cn=j(["\n mutation ($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"])));var xn=Z("sq:useForm"),Rn=dist.gql(Mn||(Mn=j(["\n query ($key: String!) {\n form(key: $key) {\n schema\n initialData {\n initialData\n isEnabled\n isEnabledErrorMessage\n }\n }\n }\n"]))),Vn=dist.gql(An||(An=j(["\n mutation ($formSubmissionInput: FormSubmissionInput!) {\n submitForm(formSubmissionInput: $formSubmissionInput) {\n success\n results {\n ... on FormHandlerSubmissionResult {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n result\n }\n ... on FormHandlerError {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n errorType\n error\n errorCode\n }\n }\n }\n }\n"]))),On=dist.gql($n||($n=j(["\n query ($formValidationInput: FormValidationInput!) {\n validateForm(formValidationInput: $formValidationInput) {\n valid\n results {\n ... on FormHandlerValidationResult {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n result\n }\n ... on FormHandlerError {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n errorType\n error\n errorCode\n }\n }\n }\n }\n"])));
|
|
8140
|
+
var S,q={current:void 0};function P(){if(void 0===q.current)throw new Error("no implementation of useHost provided");return q.current()}function E(e){if(!e)throw new Error("Must supply an implementation");if("function"!=typeof e)throw new Error("implementation must be a function");q.current=e;}function D(){var e;window.squatchProgramId||(window.squatchProgramId=new stencilHooks_module.c({element:document.documentElement,initialState:(null==(e=window.widgetIdent)?void 0:e.programId)||void 0,contextName:"sq:program-id"}).start());}function M(){D();var n=P();return stencilHooks_module.h(n,"sq:program-id")}function A(e){D(),window.squatchProgramId.context=e;}function k(){return (k=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);}return e}).apply(this,arguments)}function j(e,n){return (j=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function $(e,n){return n||(n=e.slice(0)),e.raw=n,e}function x(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function R(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return x(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return "Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?x(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return (t=e[Symbol.iterator]()).next.bind(t)}var V=dist.gql(S||(S=$(["\n query {\n viewer {\n ... on User {\n locale\n }\n }\n }\n"])));function O(){!function(){var e,r=window.squatchLocale,a=ae();stencilHooks_module.useEffect(function(){if(!a&&r)return r.context=void 0;s({});},[a]);var o,i=tn(V),s=i[0],u=i[1].data,d=null==u||null==(e=u.viewer)?void 0:e.locale;r?d!==r.context&&(r.context=d):window.squatchLocale=new stencilHooks_module.c({element:document.documentElement,initialState:d||(null==(o=window.widgetIdent)?void 0:o.locale)||void 0,contextName:"sq:locale"}).start();}();var r=P();return stencilHooks_module.h(r,"sq:locale")}function N(e){var n=window.squatchLocale;n&&(n.context=e);}function H(){var e,n;return window.SquatchAndroid?{type:"SquatchAndroid",android:window.SquatchAndroid,widgetIdent:window.widgetIdent}:window.SquatchPortal?{type:"SquatchPortal",env:window.SquatchPortal}:window.SquatchAdmin?{type:"SquatchAdmin",adminSDK:window.SquatchAdmin}:window.widgetIdent&&"demo"!==(null==(e=window.widgetIdent)?void 0:e.env)?{type:"SquatchJS2",api:null==(n=window.frameElement)?void 0:n.squatchJsApi,widgetIdent:window.widgetIdent}:{type:"None"}}function L(){var e=H();return "None"===e.type||"SquatchAdmin"===e.type}function U(){var e=H();switch(e.type){case"SquatchAndroid":case"SquatchJS2":return e.widgetIdent.tenantAlias;case"SquatchAdmin":case"None":return "demo";case"SquatchPortal":return e.env.tenantAlias}}function W(){var e,n=H();switch(n.type){case"SquatchAndroid":case"SquatchJS2":return n.widgetIdent.appDomain;case"SquatchPortal":return (null==(e=n.env)?void 0:e.appDomain)||"https://app.referralsaasquatch.com";case"SquatchAdmin":case"None":return "https://app.referralsaasquatch.com"}}function J(){var e=H();switch(e.type){case"SquatchJS2":return e.widgetIdent.engagementMedium||"EMBED";case"SquatchAndroid":case"SquatchPortal":case"SquatchAdmin":case"None":return "EMBED"}}var _=1e3,T=60*_,Q=60*T,z=24*Q,G=function(e,n){n=n||{};var t=typeof e;if("string"===t&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var n=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(n){var t=parseFloat(n[1]);switch((n[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*t;case"weeks":case"week":case"w":return 6048e5*t;case"days":case"day":case"d":return t*z;case"hours":case"hour":case"hrs":case"hr":case"h":return t*Q;case"minutes":case"minute":case"mins":case"min":case"m":return t*T;case"seconds":case"second":case"secs":case"sec":case"s":return t*_;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}(e);if("number"===t&&isFinite(e))return n.long?function(e){var n=Math.abs(e);return n>=z?B(e,n,z,"day"):n>=Q?B(e,n,Q,"hour"):n>=T?B(e,n,T,"minute"):n>=_?B(e,n,_,"second"):e+" ms"}(e):function(e){var n=Math.abs(e);return n>=z?Math.round(e/z)+"d":n>=Q?Math.round(e/Q)+"h":n>=T?Math.round(e/T)+"m":n>=_?Math.round(e/_)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function B(e,n,t,r){var a=n>=1.5*t;return Math.round(e/t)+" "+r+(a?"s":"")}var K,Z=(function(e,n){n.formatArgs=function(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const t="color: "+this.color;n.splice(1,0,t,"color: inherit");let r=0,a=0;n[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(a=r));}),n.splice(a,0,t);},n.save=function(e){try{e?n.storage.setItem("debug",e):n.storage.removeItem("debug");}catch(e){}},n.load=function(){let e;try{e=n.storage.getItem("debug");}catch(e){}return !e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},n.useColors=function(){return !("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},n.storage=function(){try{return localStorage}catch(e){}}(),n.destroy=(()=>{let e=!1;return ()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));}})(),n.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],n.log=console.debug||console.log||(()=>{}),e.exports=function(e){function n(e){let r,a=null;function o(...e){if(!o.enabled)return;const t=o,a=Number(new Date);t.diff=a-(r||a),t.prev=r,t.curr=a,r=a,e[0]=n.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,a)=>{if("%%"===r)return "%";i++;const o=n.formatters[a];return "function"==typeof o&&(r=o.call(t,e[i]),e.splice(i,1),i--),r}),n.formatArgs.call(t,e),(t.log||n.log).apply(t,e);}return o.namespace=e,o.useColors=n.useColors(),o.color=n.selectColor(e),o.extend=t,o.destroy=n.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>null===a?n.enabled(e):a,set:e=>{a=e;}}),"function"==typeof n.init&&n.init(o),o}function t(e,t){const r=n(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return n.debug=n,n.default=n,n.coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){const e=[...n.names.map(r),...n.skips.map(r).map(e=>"-"+e)].join(",");return n.enable(""),e},n.enable=function(e){let t;n.save(e),n.names=[],n.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),a=r.length;for(t=0;t<a;t++)r[t]&&("-"===(e=r[t].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")));},n.enabled=function(e){if("*"===e[e.length-1])return !0;let t,r;for(t=0,r=n.skips.length;t<r;t++)if(n.skips[t].test(e))return !1;for(t=0,r=n.names.length;t<r;t++)if(n.names[t].test(e))return !0;return !1},n.humanize=G,n.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");},Object.keys(e).forEach(t=>{n[t]=e[t];}),n.names=[],n.skips=[],n.formatters={},n.selectColor=function(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]},n.enable(n.load()),n}(n);const{formatters:t}=e.exports;t.j=function(e){try{return JSON.stringify(e)}catch(e){return "[UnexpectedJSONParseError]: "+e.message}};}(K={exports:{}},K.exports),K.exports),X=Z("sq:user-identity");function Y(){window.squatchUserIdentity||(window.squatchUserIdentity=new stencilHooks_module.c({element:document.documentElement,initialState:ne(),contextName:"sq:user-identity"}).start());}function ee(e){if(e)try{var n,t,r=o(e),a=r.exp;if(function(e){return e.sub&&/.*:.*@.*:users/.test(e.sub)}(r)){var o$1=r.sub.match(/(.*):(.*)@(.*):users/);t=atob(o$1[1]),n=atob(o$1[2]);}else (function(e){return e.user&&e.user.id&&e.user.accountId})(r)&&(t=r.user.accountId,n=r.user.id);if(!n||!t)return;if(a&&Date.now()>=1e3*a)return;return {id:n,accountId:t,jwt:e}}catch(e){return}}function ne(){var e=H();switch(e.type){case"SquatchAndroid":case"SquatchJS2":return {id:e.widgetIdent.userId,accountId:e.widgetIdent.accountId,jwt:e.widgetIdent.token};case"SquatchPortal":var n=new URLSearchParams(document.location.search);if(n.has("jwt"))return ee(n.get("jwt"));var t=localStorage.getItem("sq:user-identity");if(!t)return;try{var r=JSON.parse(t),a=ee(r.jwt);return a?k({},r,a):void 0}catch(e){return}case"SquatchAdmin":case"None":return}}function te(e){Y();var n=window.squatchUserIdentity;equal(n.context,e)||(N(void 0),n.context=e),e&&"SquatchPortal"===H().type?localStorage.setItem("sq:user-identity",JSON.stringify(e)):e||(X("Deleting user from localStorage"),localStorage.removeItem("sq:user-identity"));}function re(){var e;return null==(e=ae())?void 0:e.jwt}function ae(){Y();var n=P(),t=stencilHooks_module.h(n,"sq:user-identity"),r=ee(null==t?void 0:t.jwt);return t&&!r?(te(void 0),void N(void 0)):t}var oe=function(){return (oe=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var a in n=arguments[t])Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a]);return e}).apply(this,arguments)},ie=new Map,se=new Map,ue=!0,de=!1;function ce(e){return e.replace(/[\s,]+/g," ").trim()}function le(e){var n,t,r,a=ce(e);if(!ie.has(a)){var o=parse(e,{experimentalFragmentVariables:de});if(!o||"Document"!==o.kind)throw new Error("Not a valid GraphQL document.");ie.set(a,function(e){var n=new Set(e.definitions);n.forEach(function(e){e.loc&&delete e.loc,Object.keys(e).forEach(function(t){var r=e[t];r&&"object"==typeof r&&n.add(r);});});var t=e.loc;return t&&(delete t.startToken,delete t.endToken),e}((n=o,t=new Set,r=[],n.definitions.forEach(function(e){if("FragmentDefinition"===e.kind){var n=e.name.value,a=ce((i=e.loc).source.body.substring(i.start,i.end)),o=se.get(n);o&&!o.has(a)?ue&&console.warn("Warning: fragment with name "+n+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||se.set(n,o=new Set),o.add(a),t.has(a)||(t.add(a),r.push(e));}else r.push(e);var i;}),oe(oe({},n),{definitions:r}))));}return ie.get(a)}function fe(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];"string"==typeof e&&(e=[e]);var r=e[0];return n.forEach(function(n,t){r+=n&&"Document"===n.kind?n.loc.source.body:n,r+=e[t+1];}),le(r)}var me,ve=fe;(me=fe||(fe={})).gql=ve,me.resetCaches=function(){ie.clear(),se.clear();},me.disableFragmentWarnings=function(){ue=!1;},me.enableExperimentalFragmentVariables=function(){de=!0;},me.disableExperimentalFragmentVariables=function(){de=!1;},fe.default=fe;var ge=fe;function pe(e,n){try{var t=e();}catch(e){return n(e)}return t&&t.then?t.then(void 0,n):t}var he=function(e){var n,t;function r(n,t){var r;(r=e.call(this,n,t)||this).subject=new Subject;var a=new Subject;return r.subject.pipe(bufferTime(200,void 0,10)).subscribe(function(e){try{if(!e.length)return Promise.resolve();for(var n,t=Ce(e),o=t.mergedQuery,i=t.mergedVariables,s=t.mergedQueryAddedEvents,u=R(t.unmergedQueryAddedEvents);!(n=u()).done;)a.next(n.value);return s.length?Promise.resolve(pe(function(){return Promise.resolve(r.superRequest(o,i)).then(function(e){Se(e,s);})},function(e){if(e instanceof types.ClientError){var n=function(){var n=e.response,t=n.data,r=n.errors;if(!t)return {v:Pe(s,e)};for(var a,o=Object.keys(t),i=[].concat(s),u=function(){var n=a.value,t=void 0;n.path.find(function(r,a,s){if(o.includes(r)){var u=be(r),d=i.findIndex(function(e){return e.id===u});if(-1===d)return !1;o.splice(a,1),t=i.splice(d,1)[0];var c=Ie(e.response.data,t);s[a]=we(s[a],u);var l=t.query,f=t.variables,v=k({},e.response,{errors:[n],data:c,path:s}),g=new types.ClientError(v,{query:"string"!=typeof l?print(l):l,variables:f});return qe(t,g),!0}return !1});},d=R(r);!(a=d()).done;)u();Se(t,i);}();if("object"==typeof n)return n.v}else Pe(s,e);})):Promise.resolve()}catch(e){return Promise.reject(e)}}),a.subscribe(function(e){try{var n=pe(function(){return Promise.resolve(r.superRequest(e.query,e.variables)).then(function(n){Fe(n,e);})},function(n){qe(e,n);});return Promise.resolve(n&&n.then?n.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}),r}t=e,(n=r).prototype=Object.create(t.prototype),n.prototype.constructor=n,j(n,t);var a=r.prototype;return a.superRequest=function(n,t){return e.prototype.request.call(this,n,t)},a.request=function(e,n){var t=this;return new Promise(function(r,a){var o={query:e,variables:n,id:ye(),resolve:r,reject:a};t.subject.next(o);})},r}(dist.GraphQLClient),ye=function(){return nanoid().replace(/[-_]/g,"")},we=function(e,n){return e.replace("_"+n,"")},be=function(e){var n=e.split("_");return n[n.length-1]},Ce=function(e){var n=[],t=[],r=e.reduce(function(e,r){var a=r.query,o=r.variables,i=r.id;try{var s="string"==typeof a?parse(a):a,u=s.definitions.find(function(e){return "FragmentDefinition"===e.kind}),d="string"==typeof a?a:print(a),c=/@/.test(d);if(u||c)return t.push(r),e;var l=function(e){return function(e,n){return e+"_"+n}(e,i)};return e=e.addN(s,[o],l,l),n.push(r),e}catch(n){return t.push(r),e}},w("BatchedQuery")),a=r.document,o=r.variables;return {mergedQuery:a&&print(a),mergedVariables:o,mergedQueryAddedEvents:n,unmergedQueryAddedEvents:t}},Ie=function(e,n){if(!e)return e;var t=Object.keys(e),r=n.id;return t.reduce(function(n,t){var a;return t.endsWith(r)&&(n=k({},n,((a={})[we(t,r)]=e[t],a))),n},{})},Fe=function(e,n){(0, n.resolve)(e);},Se=function(e,n){for(var t,r=R(n);!(t=r()).done;){var a=t.value,o=Ie(e,a);a.resolve(o);}},qe=function(e,n){(0, e.reject)(n);},Pe=function(e,n){for(var t,r=R(e);!(t=r()).done;)(0, t.value.reject)(n);},Ee="sq:graphql-client",De=src(function(e,n,t){return new he(e+"/api/v1/"+n+"/graphql",{headers:{Authorization:"Bearer "+(t||"")}})});function Me(e,n){switch(n.type){case"loading":return {data:void 0,errors:void 0,loading:!0};case"data":return {data:n.payload,errors:void 0,loading:!1};case"errors":return {data:void 0,errors:n.payload,loading:!1}}}function Ae(n,t){var o,i,s,u,d,c,l=(o=re(),i=W(),s=U(),u=De(i,s,o),d=P(),null!=(c=stencilHooks_module.h(d,"sq:graphql-client",{attempts:0}))?c:u),f=stencilHooks_module.useReducer(Me,t),m=f[1];return [f[0],useCallback.useCallback(function(e,t){void 0===t&&(t=!1);try{if(!l)return m({type:"errors",payload:new Error("No GraphQL client found")}),Promise.resolve();var r=function(r,a){try{var o=(t||m({type:"loading"}),Promise.resolve(l.request(n,e)).then(function(e){m({type:"data",payload:e});}));}catch(e){return a(e)}return o&&o.then?o.then(void 0,a):o}(0,function(e){m({type:"errors",payload:e});});return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},[l,n,m])]}var ke,je={loading:!1,data:void 0,errors:void 0};function $e(e){var n=Ae(e,je);return [n[1],n[0]]}var xe,Re=ge(ke||(ke=$(["\n mutation AuthenticateWithEmailAndPassword(\n $email: String!\n $password: String!\n ) {\n authenticateManagedIdentityWithEmailAndPassword(\n authenticateManagedIdentityWithEmailAndPasswordInput: {\n email: $email\n password: $password\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function Ve(){var e=$e(Re),n=e[0],r=e[1],a=r.loading,o$1=r.data,i=r.errors;return stencilHooks_module.useEffect(function(){if(null!=o$1&&o$1.authenticateManagedIdentityWithEmailAndPassword){var e=o$1.authenticateManagedIdentityWithEmailAndPassword,n=e.token,t=o(n).user;te({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.email,emailVerified:e.emailVerified,sessionData:e.sessionData}});}},[null==o$1?void 0:o$1.authenticateManagedIdentityWithEmailAndPassword]),[n,{loading:a,data:o$1,errors:i}]}var Oe,Ne=ge(xe||(xe=$(["\n mutation RegisterWithEmailAndPassword(\n $email: String!\n $password: String!\n $formData: RSJsonNode\n $redirectPath: String\n ) {\n registerManagedIdentityWithEmailAndPassword(\n registerManagedIdentityWithEmailAndPasswordInput: {\n email: $email\n password: $password\n formData: $formData\n redirectPath: $redirectPath\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function He(){var e=$e(Ne),n=e[0],r=e[1],a=r.loading,o$1=r.data,i=r.errors;return stencilHooks_module.useEffect(function(){if(null!=o$1&&o$1.registerManagedIdentityWithEmailAndPassword){var e=o$1.registerManagedIdentityWithEmailAndPassword,n=e.token,t=o(n).user;te({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.email,emailVerified:e.emailVerified,sessionData:e.sessionData}});}},[null==o$1?void 0:o$1.registerManagedIdentityWithEmailAndPassword]),[n,{loading:a,data:o$1,errors:i}]}var Le,Ue=ge(Oe||(Oe=$(["\n mutation RegisterViaRegistrationForm($key: String!, $formData: RSJsonNode!) {\n submitForm(formSubmissionInput: { key: $key, formData: $formData }) {\n results {\n ... on FormHandlerSubmissionResult {\n result\n formHandler {\n namespace\n }\n }\n ... on FormHandlerError {\n errorCode\n error\n errorType\n formHandler {\n name\n endpointUrl\n }\n }\n }\n }\n }\n"])));function We(){var e=$e(Ue),n=e[0],r=e[1],a=r.loading,i=r.data,s=r.errors,u=stencilHooks_module.useState(null),d=u[0],l=u[1];return stencilHooks_module.useEffect(function(){var e,n=null==i||null==(e=i.submitForm)?void 0:e.results.find(function(e){return "identity"===e.formHandler.namespace});if(n&&n.result.results.length){var t=n.result.results[0];if(t.success){l(null);var r=t.data.token,a=o(r).user;te({jwt:r,id:a.id,accountId:a.accountId,managedIdentity:{email:t.data.email,emailVerified:t.data.emailVerified,sessionData:t.data.sessionData}});}else l(t.message);}},[null==i?void 0:i.submitForm]),[n,{loading:a,data:i,errors:s,formError:d}]}var Je,_e=ge(Le||(Le=$(["\n mutation ChangePassword($password: String!) {\n changeManagedIdentityPassword(\n changeManagedIdentityPasswordInput: { password: $password }\n ) {\n success\n }\n }\n"])));function Te(){var e=$e(_e),n=e[1];return [e[0],{loading:n.loading,data:n.data,errors:n.errors}]}var Qe,ze=ge(Je||(Je=$(["\n mutation ResetPassword($oobCode: String!, $password: String!) {\n resetManagedIdentityPassword(\n resetManagedIdentityPasswordInput: {\n password: $password\n oobCode: $oobCode\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function Ge(){var e=$e(ze),n=e[0],r=e[1],a=r.loading,o$1=r.data,i=r.errors;return stencilHooks_module.useEffect(function(){if(null!=o$1&&o$1.resetManagedIdentityPassword){var e=o$1.resetManagedIdentityPassword,n=e.token,t=o(n).user;te({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.email,emailVerified:e.emailVerified,sessionData:e.sessionData}});}},[null==o$1?void 0:o$1.resetManagedIdentityPassword]),[n,{loading:a,data:o$1,errors:i}]}var Be=ge(Qe||(Qe=$(["\n mutation VerifyPasswordResetCode($oobCode: String!) {\n verifyManagedIdentityPasswordResetCode(\n verifyManagedIdentityPasswordResetCodeInput: { oobCode: $oobCode }\n ) {\n success\n }\n }\n"])));function Ke(){return $e(Be)}function Ze(){var e=P();return {refresh:useCallback.useCallback(function(){e.dispatchEvent(new CustomEvent("sq:refresh",{bubbles:!0,composed:!0,cancelable:!0,detail:{}}));},[e])}}function Xe(e){var n=e.skip,r=void 0!==n&&n,a=e.update,o=e.variables;stencilHooks_module.useEffect(function(){var e=function(e){!r&&a(o,!0);};return document.addEventListener("sq:refresh",e),function(){return document.removeEventListener("sq:refresh",e)}},function(e){var n=stencilHooks_module.useRef(e),t=stencilHooks_module.useRef(0);return equal(e,n.current)||(n.current=e,t.current+=1),stencilHooks_module.useMemo(function(){return n.current},[t.current])}([o,a,r]));}var Ye,en={loading:!1,data:void 0,errors:void 0},nn=Symbol();function tn(e){var n=Ae(e,en),t=n[0],r=n[1],a=stencilHooks_module.useRef(nn);return Xe({skip:a.current===nn,update:r,variables:a.current}),[r,k({},t,{refetch:function(e){a.current=e,r(e);}})]}var rn,an=ge(Ye||(Ye=$(["\n query ManagedIdentitySession {\n managedIdentitySession {\n email\n emailVerified\n sessionData\n }\n }\n"])));function on(){var e=ae(),n=tn(an),r=n[0],o=n[1],i=o.loading,s=o.data,u=o.errors,d=o.refetch;return stencilHooks_module.useEffect(function(){null!=s&&s.managedIdentitySession&&te(k({},e,{managedIdentity:s.managedIdentitySession}));},[null==s?void 0:s.managedIdentitySession]),[useCallback.useCallback(function(){return r({})},[r]),{loading:i,data:s,errors:u,refetch:d}]}var sn,un=ge(rn||(rn=$(["\n mutation VerifyEmail($oobCode: String!) {\n verifyManagedIdentityEmail(\n verifyManagedIdentityEmailInput: { oobCode: $oobCode }\n ) {\n success\n }\n }\n"])));function dn(){var e,n=on()[0],r=$e(un),a=r[0],o=r[1],i=o.loading,s=o.data,u=o.errors;return stencilHooks_module.useEffect(function(){var e;null!=s&&null!=(e=s.verifyManagedIdentityEmail)&&e.success&&n();},[null==s||null==(e=s.verifyManagedIdentityEmail)?void 0:e.success]),[a,{loading:i,data:s,errors:u}]}var cn,ln=ge(sn||(sn=$(["\n mutation RequestPasswordResetEmail(\n $email: String!\n $urlParams: RSJsonNode\n $redirectPath: String\n ) {\n requestManagedIdentityPasswordResetEmail(\n requestManagedIdentityPasswordResetEmailInput: {\n email: $email\n urlParams: $urlParams\n redirectPath: $redirectPath\n }\n ) {\n success\n }\n }\n"])));function fn(){return $e(ln)}var mn=ge(cn||(cn=$(["\n mutation RequestVerificationEmail(\n $email: String!\n $urlParams: RSJsonNode\n $redirectPath: String\n ) {\n requestManagedIdentityVerificationEmail(\n requestManagedIdentityVerificationEmailInput: {\n email: $email\n urlParams: $urlParams\n redirectPath: $redirectPath\n }\n ) {\n success\n }\n }\n"])));function vn(){return $e(mn)}function gn(e,n){var t=stencilHooks_module.useRef();return t.current&&equal(n,t.current.key)||(t.current={key:n,value:e()}),t.current.value}function pn(){return stencilHooks_module.useReducer(function(e){return e+1},0)}function hn(e){for(var n,t=R(Object.getOwnPropertyNames(e));!(n=t()).done;){var r=e[n.value];r&&"object"==typeof r&&hn(r);}return Object.freeze(e)}var yn={loading:!0,data:void 0,errors:void 0};function wn(e,n,t){var r=Ae(e,yn),a=r[0],o=r[1],i=pn(),s=i[1];return gn(function(){!t&&o(n);},[e,n,o,i[0],t]),Xe({skip:t,update:o,variables:n}),hn(k({},a,{refetch:s}))}function bn(){return window.squatchHistory=window.squatchHistory||function(){switch(H().type){case"SquatchPortal":return createBrowserHistory();default:return createMemoryHistory()}}(),window.squatchHistory}var Cn,In={createHref:function(){var e;return (e=bn()).createHref.apply(e,[].slice.call(arguments))},push:function(){var e;return (e=bn()).push.apply(e,[].slice.call(arguments))},replace:function(){var e;return (e=bn()).replace.apply(e,[].slice.call(arguments))},go:function(){var e;return (e=bn()).go.apply(e,[].slice.call(arguments))},back:function(){return bn().back()},forward:function(){var e;return (e=bn()).forward.apply(e,[].slice.call(arguments))}};function Fn(){var e=pn()[1];return stencilHooks_module.useEffect(function(){return bn().listen(function(){e();})},[]),bn().location}function Sn(e){var n=stencilHooks_module.useState({limit:e.limit,offset:e.offset}),t=n[0],r=n[1],a=t.offset,i=t.limit,s=function(e,n){return e*n},u=function(e,n){return Math.ceil(e/n)||0};return {limit:i,setLimit:function(e){var n=u(a,e),o=s(e,n);r(k({},t,{limit:e,offset:o}));},offset:a,setCurrentPage:function(e){var n=s(e,i);r(function(e){return k({},e,{offset:n})});},calculatePagination:function(e,n){var t=u(a,i),r=function(e,n){return Math.ceil(e/n)||0}(n,i),o=0===e?"0":e>1?a+1+"-"+(a+e):""+(a+1);return {currentPage:t,pageCount:r,rangeOnPage:o,pageProgress:o+" of "+n}}}}function qn(e,n,t,r,a){var o;void 0===r&&(r={}),void 0===a&&(a=!1);var i=Sn(t),s=i.limit,u=i.setLimit,d=i.setCurrentPage,c=i.calculatePagination,l=wn(e,k({limit:s,offset:i.offset},r),a),f=l.loading,m=l.errors,v=l.refetch,g=n(l.data),p=c((null==g||null==(o=g.data)?void 0:o.length)||0,(null==g?void 0:g.totalCount)||0);return {envelope:g,states:{errors:m,loading:f,limit:s,currentPage:p.currentPage,pageCount:p.pageCount,pageProgress:p.pageProgress},callbacks:{refetch:v,setLimit:u,setCurrentPage:d}}}var Mn,An,kn,jn=dist.gql(Cn||(Cn=$(["\n mutation ($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"])));var xn=Z("sq:useForm"),Rn=dist.gql(Mn||(Mn=$(["\n query ($key: String!) {\n form(key: $key) {\n schema\n initialData {\n initialData\n isEnabled\n isEnabledErrorMessage\n }\n }\n }\n"]))),Vn=dist.gql(An||(An=$(["\n mutation ($formSubmissionInput: FormSubmissionInput!) {\n submitForm(formSubmissionInput: $formSubmissionInput) {\n success\n results {\n ... on FormHandlerSubmissionResult {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n result\n }\n ... on FormHandlerError {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n errorType\n error\n errorCode\n }\n }\n }\n }\n"]))),On=dist.gql(kn||(kn=$(["\n query ($formValidationInput: FormValidationInput!) {\n validateForm(formValidationInput: $formValidationInput) {\n valid\n results {\n ... on FormHandlerValidationResult {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n result\n }\n ... on FormHandlerError {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n errorType\n error\n errorCode\n }\n }\n }\n }\n"])));
|
|
8141
8141
|
|
|
8142
|
+
exports.$e = $e;
|
|
8142
8143
|
exports.A = A;
|
|
8143
8144
|
exports.De = De;
|
|
8144
8145
|
exports.E = E;
|
|
@@ -8163,7 +8164,6 @@ exports.ae = ae;
|
|
|
8163
8164
|
exports.dist = dist;
|
|
8164
8165
|
exports.dn = dn;
|
|
8165
8166
|
exports.fn = fn;
|
|
8166
|
-
exports.je = je;
|
|
8167
8167
|
exports.memoize = memoize$1;
|
|
8168
8168
|
exports.pn = pn;
|
|
8169
8169
|
exports.qn = qn;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b0129cd6.js');
|
|
6
6
|
require('./stencil-hooks.module-87a1f4f7.js');
|
|
7
|
-
require('./global-
|
|
7
|
+
require('./global-b3587dc9.js');
|
|
8
8
|
require('./use-callback-e754042f.js');
|
|
9
|
-
require('./index.module-
|
|
9
|
+
require('./index.module-ff45cbf1.js');
|
|
10
10
|
require('./extends-08099afd.js');
|
|
11
11
|
|
|
12
12
|
/*
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
const index = require('./index-b0129cd6.js');
|
|
4
4
|
require('./stencil-hooks.module-87a1f4f7.js');
|
|
5
|
-
require('./global-
|
|
5
|
+
require('./global-b3587dc9.js');
|
|
6
6
|
require('./use-callback-e754042f.js');
|
|
7
|
-
require('./index.module-
|
|
7
|
+
require('./index.module-ff45cbf1.js');
|
|
8
8
|
require('./extends-08099afd.js');
|
|
9
9
|
|
|
10
10
|
/*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
|
|
4
|
-
const index_module = require('./index.module-
|
|
4
|
+
const index_module = require('./index.module-ff45cbf1.js');
|
|
5
5
|
|
|
6
6
|
const RENDER_EVENT = "sqm:request-rerender";
|
|
7
7
|
/**
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-b0129cd6.js');
|
|
6
6
|
const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
|
|
7
7
|
require('./use-callback-e754042f.js');
|
|
8
|
-
const index_module = require('./index.module-
|
|
8
|
+
const index_module = require('./index.module-ff45cbf1.js');
|
|
9
9
|
require('./extends-08099afd.js');
|
|
10
10
|
const cjs = require('./cjs-1066ec21.js');
|
|
11
11
|
require('./JSS-97fd087e.js');
|
|
@@ -4,22 +4,23 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b0129cd6.js');
|
|
6
6
|
const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
|
|
7
|
-
const global = require('./global-
|
|
7
|
+
const global = require('./global-b3587dc9.js');
|
|
8
8
|
const useCallback = require('./use-callback-e754042f.js');
|
|
9
|
-
const index_module = require('./index.module-
|
|
9
|
+
const index_module = require('./index.module-ff45cbf1.js');
|
|
10
10
|
require('./extends-08099afd.js');
|
|
11
11
|
const jsonpointer = require('./jsonpointer-11327262.js');
|
|
12
12
|
const cjs = require('./cjs-1066ec21.js');
|
|
13
13
|
require('./mixins-fe9d4112.js');
|
|
14
14
|
const JSS = require('./JSS-97fd087e.js');
|
|
15
|
-
const reRender = require('./re-render-
|
|
16
|
-
const useChildElements = require('./useChildElements-
|
|
15
|
+
const reRender = require('./re-render-e5491a50.js');
|
|
16
|
+
const useChildElements = require('./useChildElements-658fefa1.js');
|
|
17
17
|
require('./luxon-59ca7d19.js');
|
|
18
18
|
const utils = require('./utils-6847bc06.js');
|
|
19
19
|
require('./sqm-text-span-view-2c7d94b5.js');
|
|
20
20
|
require('./sqm-portal-container-view-840db620.js');
|
|
21
|
-
const
|
|
22
|
-
const
|
|
21
|
+
const AsYouType = require('./AsYouType-6788393a.js');
|
|
22
|
+
const useRegistrationFormState = require('./useRegistrationFormState-793a7958.js');
|
|
23
|
+
const ShadowViewAddon = require('./ShadowViewAddon-33ae7c4f.js');
|
|
23
24
|
require('./sqm-portal-section-view-854a3e9c.js');
|
|
24
25
|
|
|
25
26
|
const BigStat = class {
|
|
@@ -180,7 +181,7 @@ function RequiredPropsError({ missingProps, heading = "There was a problem loadi
|
|
|
180
181
|
}
|
|
181
182
|
|
|
182
183
|
function useCheckboxField() {
|
|
183
|
-
const validationState = stencilHooks_module.d(
|
|
184
|
+
const validationState = stencilHooks_module.d(useRegistrationFormState.FORM_VALIDATION_CONTEXT);
|
|
184
185
|
const [checked, setChecked] = stencilHooks_module.useState(false);
|
|
185
186
|
return {
|
|
186
187
|
states: {
|
|
@@ -322,7 +323,7 @@ const DividedLayout = class {
|
|
|
322
323
|
};
|
|
323
324
|
|
|
324
325
|
function useDropdownField() {
|
|
325
|
-
const validationState = stencilHooks_module.d(
|
|
326
|
+
const validationState = stencilHooks_module.d(useRegistrationFormState.FORM_VALIDATION_CONTEXT);
|
|
326
327
|
return {
|
|
327
328
|
states: {
|
|
328
329
|
validationErrors: validationState === null || validationState === void 0 ? void 0 : validationState.validationErrors,
|
|
@@ -427,7 +428,7 @@ function useEditProfile(props) {
|
|
|
427
428
|
const [userData, setUserData] = stencilHooks_module.useState(undefined);
|
|
428
429
|
const [formState, setFormState] = stencilHooks_module.useState(defaultFormState);
|
|
429
430
|
const userDataResponse = index_module.wn(GET_USER, {}, !(userIdent === null || userIdent === void 0 ? void 0 : userIdent.jwt));
|
|
430
|
-
const [upsertUser, upsertUserResponse] = index_module
|
|
431
|
+
const [upsertUser, upsertUserResponse] = index_module.$e(UPSERT_USER);
|
|
431
432
|
stencilHooks_module.useEffect(() => {
|
|
432
433
|
if ((upsertUserResponse === null || upsertUserResponse === void 0 ? void 0 : upsertUserResponse.loading) || !showEdit)
|
|
433
434
|
return;
|
|
@@ -813,7 +814,7 @@ const SqmHookStoryContainer = class {
|
|
|
813
814
|
};
|
|
814
815
|
|
|
815
816
|
function useInputField() {
|
|
816
|
-
const validationState = stencilHooks_module.d(
|
|
817
|
+
const validationState = stencilHooks_module.d(useRegistrationFormState.FORM_VALIDATION_CONTEXT);
|
|
817
818
|
return {
|
|
818
819
|
states: {
|
|
819
820
|
validationErrors: validationState === null || validationState === void 0 ? void 0 : validationState.validationErrors,
|
|
@@ -1105,10 +1106,12 @@ function useLeaderboardDemo(props) {
|
|
|
1105
1106
|
}
|
|
1106
1107
|
|
|
1107
1108
|
function useNameFields(props) {
|
|
1108
|
-
const
|
|
1109
|
+
const registrationFormState = stencilHooks_module.d(useRegistrationFormState.REGISTRATION_FORM_STATE_CONTEXT);
|
|
1110
|
+
const validationState = stencilHooks_module.d(useRegistrationFormState.FORM_VALIDATION_CONTEXT);
|
|
1109
1111
|
return {
|
|
1110
1112
|
states: {
|
|
1111
1113
|
validationErrors: validationState === null || validationState === void 0 ? void 0 : validationState.validationErrors,
|
|
1114
|
+
registrationFormState,
|
|
1112
1115
|
content: {
|
|
1113
1116
|
lastNameLabel: props.lastNameLabel,
|
|
1114
1117
|
firstNameLabel: props.firstNameLabel,
|
|
@@ -1542,7 +1545,7 @@ function useLoginDemo(props) {
|
|
|
1542
1545
|
function usePortalRegister(props) {
|
|
1543
1546
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1544
1547
|
const formRef = stencilHooks_module.useRef(null);
|
|
1545
|
-
const { validationState, setValidationState } =
|
|
1548
|
+
const { validationState, setValidationState } = useRegistrationFormState.useValidationState({});
|
|
1546
1549
|
const [request, { loading, errors, data }] = index_module.He();
|
|
1547
1550
|
const submit = async (event) => {
|
|
1548
1551
|
let formControls = event.target.getFormControls();
|
|
@@ -1602,7 +1605,7 @@ function usePortalRegister(props) {
|
|
|
1602
1605
|
const name = (_b = (_a = e.target) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.toLowerCase();
|
|
1603
1606
|
if (name !== "tel")
|
|
1604
1607
|
return;
|
|
1605
|
-
const asYouType = new
|
|
1608
|
+
const asYouType = new AsYouType.AsYouType("US");
|
|
1606
1609
|
e.target.value = asYouType.input(e.target.value);
|
|
1607
1610
|
}, []);
|
|
1608
1611
|
stencilHooks_module.useEffect(() => {
|
|
@@ -2743,7 +2746,7 @@ function useRewardExchangeList(props) {
|
|
|
2743
2746
|
const [open, setOpen] = stencilHooks_module.useState(false);
|
|
2744
2747
|
const { selectedItem, selectedStep, redeemStage, amount, exchangeError } = exchangeState;
|
|
2745
2748
|
const user = index_module.ae();
|
|
2746
|
-
const [exchange, { data: exchangeResponse, loading: exchangeLoading, errors },] = index_module
|
|
2749
|
+
const [exchange, { data: exchangeResponse, loading: exchangeLoading, errors },] = index_module.$e(EXCHANGE);
|
|
2747
2750
|
const { data, loading, refetch, errors: queryError, } = index_module.wn(GET_EXCHANGE_LIST, {}, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
2748
2751
|
stencilHooks_module.useEffect(() => {
|
|
2749
2752
|
var _a, _b;
|
|
@@ -3327,7 +3330,7 @@ function useShareCode(props) {
|
|
|
3327
3330
|
const user = index_module.ae();
|
|
3328
3331
|
const engagementMedium = index_module.J();
|
|
3329
3332
|
const { data } = index_module.wn(MessageLinkQuery, { programId }, !(user === null || user === void 0 ? void 0 : user.jwt));
|
|
3330
|
-
const [sendLoadEvent] = index_module
|
|
3333
|
+
const [sendLoadEvent] = index_module.$e(WIDGET_ENGAGEMENT_EVENT);
|
|
3331
3334
|
const shareString = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.referralCode) !== null && _b !== void 0 ? _b :
|
|
3332
3335
|
// Shown during loading
|
|
3333
3336
|
"...";
|
|
@@ -3497,7 +3500,7 @@ const SEND_EVENT = index_module.dist.gql `
|
|
|
3497
3500
|
function useTaskCard(props) {
|
|
3498
3501
|
const user = index_module.ae();
|
|
3499
3502
|
const locale = index_module.O();
|
|
3500
|
-
const [sendUserEvent, { data, loading: loadingEvent }] = index_module
|
|
3503
|
+
const [sendUserEvent, { data, loading: loadingEvent }] = index_module.$e(SEND_EVENT);
|
|
3501
3504
|
const { refresh } = index_module.Ze();
|
|
3502
3505
|
stencilHooks_module.useEffect(() => {
|
|
3503
3506
|
if (data) {
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-b0129cd6.js');
|
|
6
6
|
const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
|
|
7
7
|
require('./use-callback-e754042f.js');
|
|
8
|
-
const index_module = require('./index.module-
|
|
8
|
+
const index_module = require('./index.module-ff45cbf1.js');
|
|
9
9
|
require('./extends-08099afd.js');
|
|
10
10
|
|
|
11
11
|
async function useGraphQLClientProvider({ domain }) {
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b0129cd6.js');
|
|
6
6
|
const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
|
|
7
|
-
const global = require('./global-
|
|
7
|
+
const global = require('./global-b3587dc9.js');
|
|
8
8
|
require('./use-callback-e754042f.js');
|
|
9
|
-
const index_module = require('./index.module-
|
|
9
|
+
const index_module = require('./index.module-ff45cbf1.js');
|
|
10
10
|
require('./extends-08099afd.js');
|
|
11
11
|
const cjs = require('./cjs-1066ec21.js');
|
|
12
12
|
const sqmLeaderboardRankView = require('./sqm-leaderboard-rank-view-5a3d4a88.js');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index-b0129cd6.js');
|
|
4
|
-
const index_module = require('./index.module-
|
|
4
|
+
const index_module = require('./index.module-ff45cbf1.js');
|
|
5
5
|
const mixins = require('./mixins-fe9d4112.js');
|
|
6
6
|
const JSS = require('./JSS-97fd087e.js');
|
|
7
7
|
|
|
@@ -5,13 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-b0129cd6.js');
|
|
6
6
|
const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
|
|
7
7
|
require('./use-callback-e754042f.js');
|
|
8
|
-
const index_module = require('./index.module-
|
|
8
|
+
const index_module = require('./index.module-ff45cbf1.js');
|
|
9
9
|
require('./extends-08099afd.js');
|
|
10
10
|
const cjs = require('./cjs-1066ec21.js');
|
|
11
11
|
require('./mixins-fe9d4112.js');
|
|
12
12
|
require('./JSS-97fd087e.js');
|
|
13
13
|
const utils = require('./utils-6847bc06.js');
|
|
14
|
-
const sqmNavigationSidebarItemView = require('./sqm-navigation-sidebar-item-view-
|
|
14
|
+
const sqmNavigationSidebarItemView = require('./sqm-navigation-sidebar-item-view-e8f500f9.js');
|
|
15
15
|
|
|
16
16
|
function useNavigationSidebarItem(props) {
|
|
17
17
|
const currentPage = index_module.Fn();
|
|
@@ -5,11 +5,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-b0129cd6.js');
|
|
6
6
|
const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
|
|
7
7
|
require('./use-callback-e754042f.js');
|
|
8
|
-
const index_module = require('./index.module-
|
|
8
|
+
const index_module = require('./index.module-ff45cbf1.js');
|
|
9
9
|
require('./extends-08099afd.js');
|
|
10
10
|
const cjs = require('./cjs-1066ec21.js');
|
|
11
11
|
const mixins = require('./mixins-fe9d4112.js');
|
|
12
12
|
const JSS = require('./JSS-97fd087e.js');
|
|
13
|
+
const useRegistrationFormState = require('./useRegistrationFormState-793a7958.js');
|
|
13
14
|
|
|
14
15
|
var constants = {
|
|
15
16
|
error: {
|
|
@@ -487,27 +488,30 @@ const vanillaStyle = `
|
|
|
487
488
|
const sheet$1 = JSS.createStyleSheet(style$1);
|
|
488
489
|
const styleString$1 = sheet$1.toString();
|
|
489
490
|
function PortalResetPasswordView(props) {
|
|
490
|
-
var _a, _b;
|
|
491
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
491
492
|
const { states, callbacks } = props;
|
|
492
493
|
return (index.h("div", { class: sheet$1.classes.InputContainer },
|
|
493
494
|
index.h("style", { type: "text/css" },
|
|
494
495
|
vanillaStyle,
|
|
495
496
|
styleString$1),
|
|
496
|
-
index.h("sl-input", Object.assign({ exportparts: "label: input-label", type: "password", name: "/password", label: states.content.fieldLabel || "Password", required: true, validationError: ({ value }) => {
|
|
497
|
+
index.h("sl-input", Object.assign({ exportparts: "label: input-label", type: "password", name: "/password", label: states.content.fieldLabel || "Password", required: true, disabled: ((_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.loading) || ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.disabled), validationError: ({ value }) => {
|
|
497
498
|
if (!value) {
|
|
498
499
|
return "Cannot be empty";
|
|
499
500
|
}
|
|
500
|
-
} }, (((
|
|
501
|
+
} }, (((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.initialData) === null || _d === void 0 ? void 0 : _d.password) ? {
|
|
502
|
+
value: (_f = (_e = states.registrationFormState) === null || _e === void 0 ? void 0 : _e.initialData) === null || _f === void 0 ? void 0 : _f.password,
|
|
503
|
+
}
|
|
504
|
+
: {}), (((_g = states.validationErrors) === null || _g === void 0 ? void 0 : _g.password) ? {
|
|
501
505
|
class: sheet$1.classes.ErrorStyle,
|
|
502
|
-
helpText: ((
|
|
506
|
+
helpText: ((_h = states.validationErrors) === null || _h === void 0 ? void 0 : _h.password) || "Cannot be empty",
|
|
503
507
|
}
|
|
504
508
|
: []), { onInput: (input) => states.enableValidation && callbacks.onInput(input) })),
|
|
505
509
|
states.dynamicValidation));
|
|
506
510
|
}
|
|
507
511
|
|
|
508
|
-
const CONTEXT_NAME = "sq:validation-state";
|
|
509
512
|
function usePasswordField(props) {
|
|
510
|
-
const validationState = stencilHooks_module.d(
|
|
513
|
+
const validationState = stencilHooks_module.d(useRegistrationFormState.FORM_VALIDATION_CONTEXT);
|
|
514
|
+
const registrationFormState = stencilHooks_module.d(useRegistrationFormState.REGISTRATION_FORM_STATE_CONTEXT);
|
|
511
515
|
const [dynamicValidation, setDynamicValidation] = stencilHooks_module.useState("");
|
|
512
516
|
function onInput(input) {
|
|
513
517
|
const validation = validateNewPassword(input.target.value);
|
|
@@ -517,6 +521,7 @@ function usePasswordField(props) {
|
|
|
517
521
|
states: {
|
|
518
522
|
enableValidation: props.enableValidation,
|
|
519
523
|
dynamicValidation,
|
|
524
|
+
registrationFormState,
|
|
520
525
|
validationErrors: validationState === null || validationState === void 0 ? void 0 : validationState.validationErrors,
|
|
521
526
|
content: {
|
|
522
527
|
fieldLabel: props.fieldLabel,
|
|
@@ -571,6 +576,7 @@ function usePasswordFieldDemo(props) {
|
|
|
571
576
|
enableValidation: true,
|
|
572
577
|
dynamicValidation,
|
|
573
578
|
validationErrors: ((_f = (_e = props === null || props === void 0 ? void 0 : props.demoData) === null || _e === void 0 ? void 0 : _e.states) === null || _f === void 0 ? void 0 : _f.validationErrors) || {},
|
|
579
|
+
registrationFormState: {},
|
|
574
580
|
content: {
|
|
575
581
|
fieldLabel: "Password",
|
|
576
582
|
},
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-b0129cd6.js');
|
|
6
6
|
const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
|
|
7
7
|
require('./use-callback-e754042f.js');
|
|
8
|
-
const index_module = require('./index.module-
|
|
8
|
+
const index_module = require('./index.module-ff45cbf1.js');
|
|
9
9
|
require('./extends-08099afd.js');
|
|
10
10
|
const utils = require('./utils-6847bc06.js');
|
|
11
11
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index-b0129cd6.js');
|
|
4
|
-
const global = require('./global-
|
|
4
|
+
const global = require('./global-b3587dc9.js');
|
|
5
5
|
const mixins = require('./mixins-fe9d4112.js');
|
|
6
6
|
const JSS = require('./JSS-97fd087e.js');
|
|
7
7
|
const sqmTextSpanView = require('./sqm-text-span-view-2c7d94b5.js');
|
|
@@ -4,15 +4,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b0129cd6.js');
|
|
6
6
|
const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
|
|
7
|
-
require('./global-
|
|
7
|
+
require('./global-b3587dc9.js');
|
|
8
8
|
require('./use-callback-e754042f.js');
|
|
9
|
-
const index_module = require('./index.module-
|
|
9
|
+
const index_module = require('./index.module-ff45cbf1.js');
|
|
10
10
|
require('./extends-08099afd.js');
|
|
11
11
|
const cjs = require('./cjs-1066ec21.js');
|
|
12
12
|
require('./mixins-fe9d4112.js');
|
|
13
13
|
require('./JSS-97fd087e.js');
|
|
14
14
|
require('./sqm-text-span-view-2c7d94b5.js');
|
|
15
|
-
const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-
|
|
15
|
+
const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-dd27bba3.js');
|
|
16
16
|
|
|
17
17
|
function usePortalEmailVerification(props) {
|
|
18
18
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index-b0129cd6.js');
|
|
4
|
-
const global = require('./global-
|
|
4
|
+
const global = require('./global-b3587dc9.js');
|
|
5
5
|
const JSS = require('./JSS-97fd087e.js');
|
|
6
6
|
|
|
7
7
|
function PoweredByImg({ color = "#A6A6A6", width = 190, height = 29, }) {
|
|
@@ -4,13 +4,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b0129cd6.js');
|
|
6
6
|
const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
|
|
7
|
-
require('./global-
|
|
7
|
+
require('./global-b3587dc9.js');
|
|
8
8
|
require('./use-callback-e754042f.js');
|
|
9
|
-
require('./index.module-
|
|
9
|
+
require('./index.module-ff45cbf1.js');
|
|
10
10
|
require('./extends-08099afd.js');
|
|
11
11
|
require('./JSS-97fd087e.js');
|
|
12
12
|
const utils = require('./utils-6847bc06.js');
|
|
13
|
-
const sqmPortalFooterView = require('./sqm-portal-footer-view-
|
|
13
|
+
const sqmPortalFooterView = require('./sqm-portal-footer-view-93f8ec0e.js');
|
|
14
14
|
|
|
15
15
|
const PortalFooter = class {
|
|
16
16
|
constructor(hostRef) {
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-b0129cd6.js');
|
|
6
6
|
const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
|
|
7
7
|
require('./use-callback-e754042f.js');
|
|
8
|
-
const index_module = require('./index.module-
|
|
8
|
+
const index_module = require('./index.module-ff45cbf1.js');
|
|
9
9
|
require('./extends-08099afd.js');
|
|
10
10
|
const jsonpointer = require('./jsonpointer-11327262.js');
|
|
11
11
|
const cjs = require('./cjs-1066ec21.js');
|