@saasquatch/mint-components 1.5.0-65 → 1.5.0-69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{GenericTableView-c8f8f3fe.js → GenericTableView-65598160.js} +7 -3
- package/dist/cjs/{AutoColor-86984176.js → ShadowViewAddon-25f524e4.js} +182 -48
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/{sqm-brand_27.cjs.entry.js → sqm-brand_28.cjs.entry.js} +205 -19
- package/dist/cjs/sqm-image_4.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-portal-container-view-185b4bd0.js → sqm-portal-container-view-3bc23603.js} +2 -0
- package/dist/cjs/{sqm-portal-profile-view-04eaaac9.js → sqm-portal-profile-view-25537e0b.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-section-view-7ce92f61.js → sqm-portal-section-view-186a5f7e.js} +1 -1
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1 -1
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +9 -4
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +242 -175
- package/dist/collection/components/sqm-hero-image/sqm-hero-image.js +10 -4
- package/dist/collection/components/sqm-leaderboard/Leaderboard.stories.js +12 -1
- package/dist/collection/components/sqm-leaderboard/UseLeaderboard.stories.js +62 -8
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +3 -2
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.js +11 -9
- package/dist/collection/components/sqm-portal-container/sqm-portal-container-view.js +2 -0
- package/dist/collection/components/sqm-referral-card/sqm-referral-card-view.js +1 -0
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.js +4 -4
- package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +6 -1
- package/dist/collection/components/sqm-task-card/sqm-task-card.js +0 -1
- package/dist/collection/components/sqm-titled-section/TitledSection.stories.js +3 -3
- package/dist/collection/components/sqm-titled-section/sqm-portal-section-view.js +1 -1
- package/dist/collection/components/sqm-titled-section/sqm-titled-section.js +3 -3
- package/dist/collection/tables/GenericTableView.js +7 -3
- package/dist/esm/{GenericTableView-24f2dcb2.js → GenericTableView-2b700cd4.js} +7 -3
- package/dist/esm/{AutoColor-8f7bfd93.js → ShadowViewAddon-919cf983.js} +181 -50
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/{sqm-brand_27.entry.js → sqm-brand_28.entry.js} +191 -6
- package/dist/esm/sqm-image_4.entry.js +3 -3
- package/dist/esm/{sqm-portal-container-view-cf79ed90.js → sqm-portal-container-view-624563e6.js} +2 -0
- package/dist/esm/{sqm-portal-profile-view-827776f5.js → sqm-portal-profile-view-c0f86818.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +2 -2
- package/dist/esm/{sqm-portal-section-view-6649c4c6.js → sqm-portal-section-view-88a80af9.js} +1 -1
- package/dist/esm/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm/sqm-rewards-table_9.entry.js +9 -4
- package/dist/esm/sqm-stencilbook.entry.js +86 -19
- package/dist/esm-es5/{GenericTableView-24f2dcb2.js → GenericTableView-2b700cd4.js} +1 -1
- package/dist/esm-es5/ShadowViewAddon-919cf983.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-brand_28.entry.js +1 -0
- package/dist/esm-es5/sqm-image_4.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-container-view-624563e6.js +1 -0
- package/dist/esm-es5/{sqm-portal-profile-view-827776f5.js → sqm-portal-profile-view-c0f86818.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-section-view-88a80af9.js +1 -0
- package/dist/esm-es5/sqm-referral-table_11.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/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/{p-153aab3c.js → p-0505f964.js} +1 -1
- package/dist/mint-components/p-0a1d7ec0.js +1 -0
- package/dist/mint-components/p-187f520b.entry.js +86 -0
- package/dist/mint-components/p-1bc35369.system.js +1 -0
- package/dist/mint-components/{p-590f844d.system.entry.js → p-1d7902ec.system.entry.js} +1 -1
- package/dist/mint-components/p-25ca6445.entry.js +150 -0
- package/dist/mint-components/{p-b9da6be4.entry.js → p-31df3a21.entry.js} +1 -1
- package/dist/mint-components/{p-6f70d120.entry.js → p-3ea21dc2.entry.js} +1 -1
- package/dist/mint-components/p-4c8273dc.system.entry.js +1 -0
- package/dist/mint-components/p-53af4433.system.js +1 -0
- package/dist/mint-components/{p-dd3a8996.system.js → p-5619a993.system.js} +1 -1
- package/dist/mint-components/{p-26cb65ba.entry.js → p-5aa86d66.entry.js} +3 -3
- package/dist/mint-components/p-8d74871c.system.js +1 -1
- package/dist/mint-components/p-9a18d853.system.js +1 -0
- package/dist/mint-components/{p-a6e79fbb.system.js → p-9da7df73.system.js} +1 -1
- package/dist/mint-components/{p-b1c0403a.system.entry.js → p-b8f8422d.system.entry.js} +1 -1
- package/dist/mint-components/{p-0f064d3d.system.entry.js → p-ba7c209d.system.entry.js} +1 -1
- package/dist/mint-components/p-bad9dd35.entry.js +9 -0
- package/dist/mint-components/p-e08f5f8e.js +1 -0
- package/dist/mint-components/p-f5c176e4.js +30 -0
- package/dist/mint-components/{p-13cc779c.js → p-f890c414.js} +1 -1
- package/dist/mint-components/{p-c82e3063.system.entry.js → p-f9194201.system.entry.js} +1 -1
- package/dist/mint-components/p-f92a265b.system.entry.js +1 -0
- package/dist/types/components/sqm-hero-image/sqm-hero-image.d.ts +2 -2
- package/dist/types/components/sqm-leaderboard/Leaderboard.stories.d.ts +1 -0
- package/dist/types/components/sqm-leaderboard/UseLeaderboard.stories.d.ts +6 -0
- package/dist/types/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.d.ts +1 -1
- package/dist/types/components/sqm-titled-section/sqm-portal-section-view.d.ts +1 -1
- package/dist/types/components/sqm-titled-section/sqm-titled-section.d.ts +1 -1
- package/dist/types/components.d.ts +17 -17
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/sqm-leaderboard.cjs.entry.js +0 -102
- package/dist/cjs/useLeaderboard-9e950912.js +0 -230
- package/dist/esm/sqm-leaderboard.entry.js +0 -98
- package/dist/esm/useLeaderboard-b670847e.js +0 -225
- package/dist/esm-es5/AutoColor-8f7bfd93.js +0 -1
- package/dist/esm-es5/sqm-brand_27.entry.js +0 -1
- package/dist/esm-es5/sqm-leaderboard.entry.js +0 -1
- package/dist/esm-es5/sqm-portal-container-view-cf79ed90.js +0 -1
- package/dist/esm-es5/sqm-portal-section-view-6649c4c6.js +0 -1
- package/dist/esm-es5/useLeaderboard-b670847e.js +0 -1
- package/dist/mint-components/p-01edde1a.js +0 -32
- package/dist/mint-components/p-192f8fc8.system.js +0 -1
- package/dist/mint-components/p-30772880.system.entry.js +0 -1
- package/dist/mint-components/p-500c1068.system.entry.js +0 -1
- package/dist/mint-components/p-5cff9730.entry.js +0 -119
- package/dist/mint-components/p-73d800ed.js +0 -30
- package/dist/mint-components/p-8cafe119.entry.js +0 -1
- package/dist/mint-components/p-9051c043.system.js +0 -1
- package/dist/mint-components/p-b3c4a2aa.entry.js +0 -9
- package/dist/mint-components/p-b70c5c92.js +0 -1
- package/dist/mint-components/p-b7aad7fb.entry.js +0 -86
- package/dist/mint-components/p-c015e112.system.js +0 -1
- package/dist/mint-components/p-c2e84199.js +0 -1
- package/dist/mint-components/p-d4c74ebe.system.entry.js +0 -1
- package/dist/mint-components/p-e0be39d0.system.js +0 -1
|
@@ -8,15 +8,14 @@ import './insertcss-bcaf3818.js';
|
|
|
8
8
|
import './cjs-bdfb4486.js';
|
|
9
9
|
import './mixins-10353a39.js';
|
|
10
10
|
import { c as createStyleSheet } from './JSS-96eeab98.js';
|
|
11
|
-
import { G as GenericTableView } from './GenericTableView-
|
|
11
|
+
import { G as GenericTableView } from './GenericTableView-2b700cd4.js';
|
|
12
12
|
import { l as luxon } from './luxon-5fa22651.js';
|
|
13
|
-
import './utils-1d345130.js';
|
|
13
|
+
import { g as getProps } from './utils-1d345130.js';
|
|
14
14
|
import './sqm-text-span-view-7e61c95c.js';
|
|
15
15
|
import { A as AssetCardView } from './sqm-asset-card-view-f9ca5345.js';
|
|
16
16
|
import { B as BigStatView } from './sqm-big-stat-view-309f7c1f.js';
|
|
17
17
|
import { a as useBigStat, u as useDemoBigStat } from './useDemoBigStat-022e116d.js';
|
|
18
18
|
import { H as HeroView } from './sqm-hero-view-190bc812.js';
|
|
19
|
-
import { L as LeaderboardView, u as useLeaderboard, S as ShadowViewAddon } from './useLeaderboard-b670847e.js';
|
|
20
19
|
import { L as LeaderboardRankView } from './sqm-leaderboard-rank-view-da91f5f3.js';
|
|
21
20
|
import { N as NameFieldsView } from './sqm-name-fields-view-69b1583f.js';
|
|
22
21
|
import { N as NavigationSidebarView } from './sqm-navigation-sidebar-view-816558e3.js';
|
|
@@ -24,13 +23,13 @@ import { N as NavigationSidebarItemView } from './sqm-navigation-sidebar-item-vi
|
|
|
24
23
|
import { P as PortalEmailVerificationView } from './sqm-portal-email-verification-view-2c8bfca8.js';
|
|
25
24
|
import { a as PoweredByImg$1, P as PortalFooterView } from './sqm-portal-footer-view-a6c21fb9.js';
|
|
26
25
|
import { P as PortalForgotPasswordView } from './sqm-portal-forgot-password-view-fa088f83.js';
|
|
27
|
-
import { P as PortalContainerView } from './sqm-portal-container-view-
|
|
28
|
-
import { P as PortalProfileView } from './sqm-portal-profile-view-
|
|
26
|
+
import { P as PortalContainerView } from './sqm-portal-container-view-624563e6.js';
|
|
27
|
+
import { P as PortalProfileView } from './sqm-portal-profile-view-c0f86818.js';
|
|
29
28
|
import { P as PortalResetPasswordView } from './sqm-portal-reset-password-view-73e14282.js';
|
|
30
29
|
import { P as PortalVerifyEmailView } from './sqm-portal-verify-email-view-cbf1cfdc.js';
|
|
31
30
|
import { S as StatContainerView } from './sqm-stat-container-view-8a565c5a.js';
|
|
32
|
-
import { S as ShareButtonView, a as ShareLinkView, P as PortalFrameView, E as EditProfileView, u as useShareLink, b as useShareButton, c as PortalChangePasswordView, d as PortalLoginView, e as PortalRegisterView, T as TaskCardView, f as ProgressBarView, R as ReferralIframeView, g as RewardExchangeView, C as CardFeedView, h as autoColorScaleCss } from './
|
|
33
|
-
import { P as PortalSectionView } from './sqm-portal-section-view-
|
|
31
|
+
import { S as ShareButtonView, a as ShareLinkView, L as LeaderboardView, P as PortalFrameView, E as EditProfileView, u as useShareLink, b as useShareButton, c as PortalChangePasswordView, d as PortalLoginView, e as PortalRegisterView, T as TaskCardView, f as ProgressBarView, R as ReferralIframeView, g as RewardExchangeView, C as CardFeedView, h as autoColorScaleCss, i as ShadowViewAddon } from './ShadowViewAddon-919cf983.js';
|
|
32
|
+
import { P as PortalSectionView } from './sqm-portal-section-view-88a80af9.js';
|
|
34
33
|
|
|
35
34
|
/**
|
|
36
35
|
* lodash (Custom Build) <https://lodash.com/>
|
|
@@ -1697,7 +1696,7 @@ const defaultElements = {
|
|
|
1697
1696
|
empty: (h("slot", { name: "empty" },
|
|
1698
1697
|
h("sqm-portal-container", { padding: "xxxx-large", gap: "medium" },
|
|
1699
1698
|
h("sqm-image", { "image-url": "https://i.imgur.com/KPGnPF8.png", "max-width": "100px" }),
|
|
1700
|
-
h("sqm-titled-section", { "label-margin": "xxx-small", align: "center" },
|
|
1699
|
+
h("sqm-titled-section", { "label-margin": "xxx-small", "text-align": "center" },
|
|
1701
1700
|
h("sqm-text", { slot: "label" },
|
|
1702
1701
|
h("h3", null, "View your rank in the leaderboard")),
|
|
1703
1702
|
h("sqm-text", { slot: "content" }, "Be the first to refer a friend and reach the top of the leaderboard"))))),
|
|
@@ -1708,6 +1707,9 @@ const defaultElements = {
|
|
|
1708
1707
|
h("sl-skeleton", null))));
|
|
1709
1708
|
})))),
|
|
1710
1709
|
};
|
|
1710
|
+
const test = () => {
|
|
1711
|
+
return (h("sqm-leaderboard", { usersheading: "Referrer", statsheading: "Referrals", "rank-type": "rank", "leaderboard-type": "topStartedReferrers", rankheading: "Rank", "show-rank": "true" }));
|
|
1712
|
+
};
|
|
1711
1713
|
const Empty = () => {
|
|
1712
1714
|
const props = {
|
|
1713
1715
|
states: {
|
|
@@ -1720,6 +1722,14 @@ const Empty = () => {
|
|
|
1720
1722
|
data: {
|
|
1721
1723
|
rankType: "rowNumber",
|
|
1722
1724
|
leaderboard: [],
|
|
1725
|
+
showUser: true,
|
|
1726
|
+
userRank: {
|
|
1727
|
+
firstName: "Kutay",
|
|
1728
|
+
lastInitial: "C",
|
|
1729
|
+
value: 8,
|
|
1730
|
+
rowNumber: 11,
|
|
1731
|
+
rank: 23,
|
|
1732
|
+
},
|
|
1723
1733
|
},
|
|
1724
1734
|
elements: {
|
|
1725
1735
|
...defaultElements,
|
|
@@ -2294,6 +2304,7 @@ const UserEmpty = () => {
|
|
|
2294
2304
|
const Leaderboard = /*#__PURE__*/Object.freeze({
|
|
2295
2305
|
__proto__: null,
|
|
2296
2306
|
'default': Leaderboard_stories,
|
|
2307
|
+
test: test,
|
|
2297
2308
|
Empty: Empty,
|
|
2298
2309
|
Loading: Loading,
|
|
2299
2310
|
One: One,
|
|
@@ -3012,6 +3023,30 @@ function setupGraphQL$5() {
|
|
|
3012
3023
|
};
|
|
3013
3024
|
}, []);
|
|
3014
3025
|
}
|
|
3026
|
+
function setupOtherGraphQL() {
|
|
3027
|
+
const id = "sam+klip@saasquat.ch";
|
|
3028
|
+
const accountId = id;
|
|
3029
|
+
const programId = "klip-referral-program";
|
|
3030
|
+
const JWT = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6InNhbStrbGlwQHNhYXNxdWF0LmNoIiwiaWQiOiJzYW0ra2xpcEBzYWFzcXVhdC5jaCIsImVtYWlsIjoic2FtK2tsaXBAc2Fhc3F1YXQuY2giLCJsb2NhbGUiOiJlbiJ9fQ.a2nYYrSJ81FHXlCU-Sqp_-wquQizinHBhzwzULDzimg";
|
|
3031
|
+
//@ts-ignore
|
|
3032
|
+
window.widgetIdent = {
|
|
3033
|
+
tenantAlias: "test_a74miwdpofztj",
|
|
3034
|
+
appDomain: "https://staging.referralsaasquatch.com",
|
|
3035
|
+
programId,
|
|
3036
|
+
};
|
|
3037
|
+
useEffect(() => {
|
|
3038
|
+
Y({
|
|
3039
|
+
accountId,
|
|
3040
|
+
id,
|
|
3041
|
+
jwt: JWT,
|
|
3042
|
+
});
|
|
3043
|
+
return () => {
|
|
3044
|
+
window.widgetIdent = undefined;
|
|
3045
|
+
Y(undefined);
|
|
3046
|
+
};
|
|
3047
|
+
}, []);
|
|
3048
|
+
return { id, accountId };
|
|
3049
|
+
}
|
|
3015
3050
|
const View$1 = (overrideProps) => {
|
|
3016
3051
|
const props = {
|
|
3017
3052
|
leaderboardType: "topConvertedReferrers",
|
|
@@ -3020,14 +3055,13 @@ const View$1 = (overrideProps) => {
|
|
|
3020
3055
|
usersheading: "Top Referrers",
|
|
3021
3056
|
statsheading: "Completed Referrals",
|
|
3022
3057
|
interval: "",
|
|
3023
|
-
empty:
|
|
3024
|
-
loadingstate:
|
|
3058
|
+
// empty: <span>No Referrals</span>,
|
|
3059
|
+
// loadingstate: <span>Loading</span>,
|
|
3025
3060
|
...overrideProps,
|
|
3026
3061
|
};
|
|
3027
3062
|
const { leaderboardType, rankType } = props;
|
|
3028
3063
|
console.log(`View("${leaderboardType}") - CALLED`);
|
|
3029
|
-
|
|
3030
|
-
const { states, data, elements } = useLeaderboard(props);
|
|
3064
|
+
overrideProps.setup();
|
|
3031
3065
|
return (h("div", { style: { marginBottom: "20px" } },
|
|
3032
3066
|
h("sqm-divided-layout", { direction: "row" },
|
|
3033
3067
|
h("div", { style: { padding: "10px" } },
|
|
@@ -3036,27 +3070,59 @@ const View$1 = (overrideProps) => {
|
|
|
3036
3070
|
h("div", { style: { padding: "10px" } },
|
|
3037
3071
|
h("b", null, "Rank Type"),
|
|
3038
3072
|
h("pre", null, rankType))),
|
|
3039
|
-
h(
|
|
3073
|
+
h("sqm-leaderboard", Object.assign({}, getProps(props))),
|
|
3040
3074
|
h("hr", null)));
|
|
3041
3075
|
};
|
|
3042
3076
|
const TopConvertedReferrers = createHookStory(() => {
|
|
3043
|
-
|
|
3077
|
+
const setup = setupGraphQL$5;
|
|
3078
|
+
return [
|
|
3079
|
+
View$1({ setup }),
|
|
3080
|
+
View$1({ rankType: "rank", setup }),
|
|
3081
|
+
View$1({ rankType: "denseRank", setup }),
|
|
3082
|
+
];
|
|
3044
3083
|
});
|
|
3045
3084
|
const TopStartedReferrers = createHookStory(() => {
|
|
3085
|
+
const setup = setupGraphQL$5;
|
|
3086
|
+
return [
|
|
3087
|
+
View$1({
|
|
3088
|
+
leaderboardType: "topStartedReferrers",
|
|
3089
|
+
statsheading: "New Referrals",
|
|
3090
|
+
setup,
|
|
3091
|
+
}),
|
|
3092
|
+
View$1({
|
|
3093
|
+
leaderboardType: "topStartedReferrers",
|
|
3094
|
+
rankType: "rank",
|
|
3095
|
+
statsheading: "New Referrals",
|
|
3096
|
+
setup,
|
|
3097
|
+
}),
|
|
3098
|
+
View$1({
|
|
3099
|
+
leaderboardType: "topStartedReferrers",
|
|
3100
|
+
rankType: "denseRank",
|
|
3101
|
+
statsheading: "New Referrals",
|
|
3102
|
+
setup,
|
|
3103
|
+
}),
|
|
3104
|
+
];
|
|
3105
|
+
});
|
|
3106
|
+
const EmptyLeaderboard = createHookStory(() => {
|
|
3107
|
+
const setup = setupOtherGraphQL;
|
|
3046
3108
|
return [
|
|
3047
3109
|
View$1({
|
|
3048
3110
|
leaderboardType: "topStartedReferrers",
|
|
3049
3111
|
statsheading: "New Referrals",
|
|
3112
|
+
setup,
|
|
3050
3113
|
}),
|
|
3051
3114
|
View$1({
|
|
3052
3115
|
leaderboardType: "topStartedReferrers",
|
|
3053
3116
|
rankType: "rank",
|
|
3054
3117
|
statsheading: "New Referrals",
|
|
3118
|
+
setup,
|
|
3055
3119
|
}),
|
|
3056
3120
|
View$1({
|
|
3057
3121
|
leaderboardType: "topStartedReferrers",
|
|
3058
3122
|
rankType: "denseRank",
|
|
3059
3123
|
statsheading: "New Referrals",
|
|
3124
|
+
interval: "2022-02-11T08:00:00.000Z/2022-02-13T08:00:00.000Z",
|
|
3125
|
+
setup,
|
|
3060
3126
|
}),
|
|
3061
3127
|
];
|
|
3062
3128
|
});
|
|
@@ -3065,7 +3131,8 @@ const UseLeaderboard = /*#__PURE__*/Object.freeze({
|
|
|
3065
3131
|
__proto__: null,
|
|
3066
3132
|
'default': UseLeaderboard_stories,
|
|
3067
3133
|
TopConvertedReferrers: TopConvertedReferrers,
|
|
3068
|
-
TopStartedReferrers: TopStartedReferrers
|
|
3134
|
+
TopStartedReferrers: TopStartedReferrers,
|
|
3135
|
+
EmptyLeaderboard: EmptyLeaderboard
|
|
3069
3136
|
});
|
|
3070
3137
|
|
|
3071
3138
|
const FormMessage_stories = {
|
|
@@ -5834,7 +5901,7 @@ function cartesian(...args) {
|
|
|
5834
5901
|
return r;
|
|
5835
5902
|
}
|
|
5836
5903
|
|
|
5837
|
-
const scenarioTaskCard = "@author:derek\r\n@owner:kutay\r\nFeature: Task Card\r\n\r\n\t@motivating\r\n\tScenario: A header, body title and a CTA button are always displayed\r\n\t\tGiven the Task Card is configured with the following props\r\n\t\t\t| prop | value |\r\n\t\t\t| rewardAmount | \"40\" |\r\n\t\t\t| rewardUnit | \"Points\" |\r\n\t\t\t| cardTitle | Complete a survey |\r\n\t\t\t| buttonText | Take Survey |\r\n\t\tWhen a user views the Task Card\r\n\t\tThen they see \"40 Points\" as the heading\r\n\t\tAnd the \"40\" is bolded\r\n\t\tAnd they see \"Complete a survey\" bolded in the body\r\n\t\tAnd a details icon in the top right hand corner\r\n\t\tAnd a button with text \"Take Survey\" in the bottom right hand corner\r\n\t\tWhen they click the button\r\n\t\tThen they are redirected to \"example.com\" in a new window\r\n\r\n\t@motivating\r\n\tScenario Outline: A Task Card description can be included but is not required\r\n\t\tGiven a Task Card\r\n\t\tAnd it has <descriptionPropValue>\r\n\t\tWhen a user views the Task card\r\n\t\tThen they <maySee> a chevron icon in the top right\r\n\t\tWhen they attempt to click the chevron\r\n\t\tThen they <maySee> the card description\r\n\t\tExamples:\r\n\t\t\t| descriptionPropValue | maySee |\r\n\t\t\t| This is my task card description | see |\r\n\t\t\t| | don't see |\r\n\r\n\t@motivating\r\n\tScenario Outline: CTA links can open in a new tab or the same tab\r\n\t\tGiven a Task Card\r\n\t\tAnd it has <openNewTabPropValue>\r\n\t\tWhen a user views the Task card\r\n\t\tAnd they click on the CTA\r\n\t\tThen they are redirected to the CTA link in <tab>\r\n\t\tExamples:\r\n\t\t\t| openNewTabPropValue | tab |\r\n\t\t\t| true | a new tab |\r\n\t\t\t| false | the same tab |\r\n\t\t\t| N/A | the same tab |\r\n\r\n\t@minutae\r\n\tScenario: A loading state is displayed while the Task Card is loading\r\n\t\tGiven a Task Card component\r\n\t\tWhen a user views the Task Card\r\n\t\tThen a loading state is displayed\r\n\t\tWhen the Task Card has loaded\r\n\t\tThen the loading state disapears\r\n\r\n\t@motivating\r\n\tScenario Outline: The Progress Bar can be shown or hidden but is hidden by default\r\n\t\tGiven a Task Card\r\n\t\tAnd it has <showProgressBarPropValue>\r\n\t\tWhen a user views the Task Card\r\n\t\tThen the progress bar <mayBe> displayed\r\n\t\tExamples:\r\n\t\t\t| showProgressBarPropValue | mayBe |\r\n\t\t\t| true | is |\r\n\t\t\t| false | isn't |\r\n\t\t\t| N/A | isn't |\r\n\r\n\t@motivating\r\n\tScenario: Clicking the CTA Button can trigger an event to be sent and refresh the widget\r\n\t\tGiven a Task card\r\n\t\tAnd it is configured to send an \"test\" event\r\n\t\tWhen a user views the Task card\r\n\t\tAnd clicks on the CTA\r\n\t\tThen a \"test\" event is sent to SSQT on the users behalf\r\n\t\tAnd the contents of the widget the card is dislayed within are refreshed\r\n\r\n\t@motivating\r\n\tScenario Outline: Tasks can be repeatable or one-time only but are one-time only by default\r\n\t\tGiven a Task Card\r\n\t\tAnd it has <repeatablePropValue>\r\n\t\tAnd a user who has already completed the task\r\n\t\tWhen they view the Task Card\r\n\t\tThen they see a brand colour checkmark icon beside the card heading\r\n\t\tAnd the card <mayBe> brand colour\r\n\t\tAnd the CTA button <mayBe> disabled\r\n\t\tAnd the CTA button <mayBe> grey\r\n\t\tExamples:\r\n\t\t\t| repeatablePropValue | mayBe |\r\n\t\t\t| true | isn't |\r\n\t\t\t| false | is |\r\n\t\t\t| N/A | is |\r\n\r\n\t@motivating\r\n\tScenario Outline: Display duration hides or shows a task\r\n\t\tGiven a Task Card\r\n\t\tAnd it has a \"display-duration\" interval\r\n\t\tWhen a user views the Card on <day>\r\n\t\tThen card <mayBeHidden>\r\n\t\tExamples:\r\n\t\t\t| day | mayBeHidden |\r\n\t\t\t| a day before the interval | is hidden |\r\n\t\t\t| a day during the interval | is not hidden |\r\n\t\t\t| a day after the interval | is hidden |\r\n\r\n\t@motivating\r\n\tScenario: Task Expiries can be configured and disable the CTA after the expiry\r\n\t\tGiven a Task Card\r\n\t\tAnd it has an \"reward-duration\" interval\r\n\t\
|
|
5904
|
+
const scenarioTaskCard = "@author:derek\r\n@owner:kutay\r\nFeature: Task Card\r\n\r\n\t@motivating\r\n\tScenario: A header, body title and a CTA button are always displayed\r\n\t\tGiven the Task Card is configured with the following props\r\n\t\t\t| prop | value |\r\n\t\t\t| rewardAmount | \"40\" |\r\n\t\t\t| rewardUnit | \"Points\" |\r\n\t\t\t| cardTitle | Complete a survey |\r\n\t\t\t| buttonText | Take Survey |\r\n\t\tWhen a user views the Task Card\r\n\t\tThen they see \"40 Points\" as the heading\r\n\t\tAnd the \"40\" is bolded\r\n\t\tAnd they see \"Complete a survey\" bolded in the body\r\n\t\tAnd a details icon in the top right hand corner\r\n\t\tAnd a button with text \"Take Survey\" in the bottom right hand corner\r\n\t\tWhen they click the button\r\n\t\tThen they are redirected to \"example.com\" in a new window\r\n\r\n\t@motivating\r\n\tScenario Outline: A Task Card description can be included but is not required\r\n\t\tGiven a Task Card\r\n\t\tAnd it has <descriptionPropValue>\r\n\t\tWhen a user views the Task card\r\n\t\tThen they <maySee> a chevron icon in the top right\r\n\t\tWhen they attempt to click the chevron\r\n\t\tThen they <maySee> the card description\r\n\t\tExamples:\r\n\t\t\t| descriptionPropValue | maySee |\r\n\t\t\t| This is my task card description | see |\r\n\t\t\t| | don't see |\r\n\r\n\t@motivating\r\n\tScenario Outline: CTA links can open in a new tab or the same tab\r\n\t\tGiven a Task Card\r\n\t\tAnd it has <openNewTabPropValue>\r\n\t\tWhen a user views the Task card\r\n\t\tAnd they click on the CTA\r\n\t\tThen they are redirected to the CTA link in <tab>\r\n\t\tExamples:\r\n\t\t\t| openNewTabPropValue | tab |\r\n\t\t\t| true | a new tab |\r\n\t\t\t| false | the same tab |\r\n\t\t\t| N/A | the same tab |\r\n\r\n\t@minutae\r\n\tScenario: A loading state is displayed while the Task Card is loading\r\n\t\tGiven a Task Card component\r\n\t\tWhen a user views the Task Card\r\n\t\tThen a loading state is displayed\r\n\t\tWhen the Task Card has loaded\r\n\t\tThen the loading state disapears\r\n\r\n\t@motivating\r\n\tScenario Outline: The Progress Bar can be shown or hidden but is hidden by default\r\n\t\tGiven a Task Card\r\n\t\tAnd it has <showProgressBarPropValue>\r\n\t\tWhen a user views the Task Card\r\n\t\tThen the progress bar <mayBe> displayed\r\n\t\tExamples:\r\n\t\t\t| showProgressBarPropValue | mayBe |\r\n\t\t\t| true | is |\r\n\t\t\t| false | isn't |\r\n\t\t\t| N/A | isn't |\r\n\r\n\t@motivating\r\n\tScenario: Clicking the CTA Button can trigger an event to be sent and refresh the widget\r\n\t\tGiven a Task card\r\n\t\tAnd it is configured to send an \"test\" event\r\n\t\tWhen a user views the Task card\r\n\t\tAnd clicks on the CTA\r\n\t\tThen a \"test\" event is sent to SSQT on the users behalf\r\n\t\tAnd the contents of the widget the card is dislayed within are refreshed\r\n\r\n\t@motivating\r\n\tScenario Outline: Tasks can be repeatable or one-time only but are one-time only by default\r\n\t\tGiven a Task Card\r\n\t\tAnd it has <repeatablePropValue>\r\n\t\tAnd a user who has already completed the task\r\n\t\tWhen they view the Task Card\r\n\t\tThen they see a brand colour checkmark icon beside the card heading\r\n\t\tAnd the card <mayBe> brand colour\r\n\t\tAnd the CTA button <mayBe> disabled\r\n\t\tAnd the CTA button <mayBe> grey\r\n\t\tExamples:\r\n\t\t\t| repeatablePropValue | mayBe |\r\n\t\t\t| true | isn't |\r\n\t\t\t| false | is |\r\n\t\t\t| N/A | is |\r\n\r\n\t@motivating\r\n\tScenario Outline: Display duration hides or shows a task\r\n\t\tGiven a Task Card\r\n\t\tAnd it has a \"display-duration\" interval\r\n\t\tWhen a user views the Card on <day>\r\n\t\tThen card <mayBeHidden>\r\n\t\tExamples:\r\n\t\t\t| day | mayBeHidden |\r\n\t\t\t| a day before the interval | is hidden |\r\n\t\t\t| a day during the interval | is not hidden |\r\n\t\t\t| a day after the interval | is hidden |\r\n\r\n\t@motivating\r\n\tScenario: Task Expiries can be configured and disable the CTA after the expiry\r\n\t\tGiven a Task Card\r\n\t\tAnd it has an \"reward-duration\" interval\r\n\t\tWhen a user views the card on <day>\r\n\t\tThen the card <mayBeDisabled>\r\n\t\tAnd it <mayHaveAlert>\r\n\t\tAnd it <mayHaveExpiryText> on the bottom left hand side of the card\r\n\t\tExamples:\r\n\t\t\t| day | mayBeDisabled | mayHaveAlert | mayHaveExpiryText |\r\n\t\t\t| a day before the expiry interval | is disabled | has alert stating the month, date, year and time the task starts | doesn't have expiry text |\r\n\t\t\t| a day during the expiry interval | isn't disabled | doesn't have an alert | has the month, date, year and time the task expires |\r\n\t\t\t| a day after the expiry interval | is disabled | has alert stating the month, date, year and time the task expired | doesn't have expiry text |\r\n\r\n\t@minutae\r\n\tScenario Outline: Task expiry can be hidden or shown but is hidden by default\r\n\t\tGiven a Task Card\r\n\t\tAnd it is configured with an expiry duration interval\r\n\t\tAnd it has <showExpiryPropValue>\r\n\t\tWhen a user views the Task card during the interval\r\n\t\tThen the expiry <mayBe> shown in the bottom left hand corner\r\n\t\tAnd it is in form \"Month-Date-Year-Time\"\r\n\t\tExamples:\r\n\t\t\t| showExpiryPropValue | mayBe |\r\n\t\t\t| true | is |\r\n\t\t\t| false | isn't |\r\n\t\t\t| N/A | isn't |\r\n\r\n\t@motivating\r\n\tScenario Outline: Task Card dates support localization\r\n\t\tGiven a Task Card\r\n\t\tAnd it's configured with a expiry duration interval\r\n\t\tWhen a user with <locale> views the task card <atTime>\r\n\t\tThen they <seeDate> translated for <locale>\r\n\t\tExamples:\r\n\t\t\t| atTime | locale | seeDate |\r\n\t\t\t| before the interval | en | Task Start Date |\r\n\t\t\t| during the interval | en | Task End Date |\r\n\t\t\t| after the interval | en | Task Ended Date |\r\n\t\t\t| before the interval | fr | Task Start Date |\r\n\t\t\t| during the interval | fr | Task End Date |\r\n\t\t\t| after the interval | fr | Task Ended Date |\r\n\r\n\t@motivating\r\n\tScenario Outline: A task completion count is displayed for repeatable tasks\r\n\t\tGiven a Task Card\r\n\t\tAnd it is configured for a repeatable task\r\n\t\tAnd has it has <goalValue>\r\n\t\tAnd a user with <userGoalProgress>\r\n\t\tWhen the user views the task card\r\n\t\tThen they see a repeat icon\r\n\t\tAnd the <text> in the bottom left hand corner\r\n\t\tAnd the <text> is brand colour\r\n\t\tExamples:\r\n\t\t\t| goalValue | userGoalProgress | text |\r\n\t\t\t| 2 | 0 | Completed 0 times |\r\n\t\t\t| 2 | 1 | Completed 0 times |\r\n\t\t\t| 2 | 2 | Completed 1 times |\r\n\t\t\t| 2 | 4 | Completed 2 times |\r\n\r\n\t@motivating\r\n\tScenario Outline: The source of a user's progress can be a custom field or a program goal\r\n\t\tGiven a Task Card\r\n\t\tAnd it is configured <progressSourcePath>\r\n\t\tWhen a user views the Task card\r\n\t\tThen the value at <progressSourcePath> is used to benchmark their progress against the \"Goal Completion Count\"\r\n\t\tExamples:\r\n\t\t\t| progressSourcePath |\r\n\t\t\t| /customFields/activityCount |\r\n\t\t\t| /customFields/purchaseTotal |\r\n\t\t\t| /programGoals/count%2FComment-on-Article |\r\n\t\t\t| /programGoals/count/Referral-Started%2Freferrals |\r\n\r\n\t@motivating\r\n\tScenario Outline: The users completion of a goal is calculated by the Goal Completion Number\r\n\t\tGiven a Task Card\r\n\t\tAnd it is configured for <goalValue>\r\n\t\tAnd a user who has <progressValue>\r\n\t\tWhen they view the Task Card\r\n\t\tThen they are shown to have <progressValue> towards <goalValue>\r\n\t\tWhen their progress grows larger than <goalValue>\r\n\t\tThen the task is marked as completed\r\n\t\tExamples:\r\n\t\t\t| goalValue | progressValue |\r\n\t\t\t| 1 | 0 |\r\n\t\t\t| 10 | 9 |\r\n\t\t\t| 5 | 2 |\r\n\r\n\t@motivating\r\n\tScenario: The Goal Completion Number defaults to 1\r\n\t\tGiven a Task Card without a configured \"goal\" value\r\n\t\tAnd a user who has <progressValue>\r\n\t\tWhen they view the Task Card\r\n\t\tThen it <mayBe> marked as completed\r\n\t\tExamples:\r\n\t\t\t| progressValue | mayBe |\r\n\t\t\t| 0 | isn't |\r\n\t\t\t| 1 | is |\r\n\t\t\t| 2 | is |";
|
|
5838
5905
|
|
|
5839
5906
|
const scenarioProgressBar = "@author:kutay\r\n@owner:kutay\r\nFeature: Task Card Progress Bar\r\n\r\n\tScenario Outline: Progress Bar\r\n\t\tGiven a Task Card component\r\n\t\tAnd progress is <progress>\r\n\t\tAnd goal is <goal>\r\n\t\tThen I have <progressBar>\r\n\t\tAnd <progressBar> shows <progress> with <unit> above\r\n\t\tAnd gift icon has <color>\r\n\t\tAnd gift icon shows <goal> with <unit> below\r\n\t\tExamples:\r\n\t\t\t| progress | goal | progressBar | unit | color |\r\n\t\t\t| 0 | 500 | ●――――――――――――――――――🎁 | $ | no |\r\n\t\t\t| 100 | 500 | ―――――――――●―――――――――🎁 | $ | no |\r\n\t\t\t| 500 | 500 | ―――――――――――――――――――🎁 | $ | yes |\r\n\t\t\t| 650 | 500 | ―――――――――――――――――――🎁 | $ | yes |\r\n\t\t\t| 1200 | 500 | ―――――――――――――――――――🎁 | $ | yes |\r\n\r\n\tScenario Outline: Progress Bar Steps\r\n\t\tGiven a Task Card component\r\n\t\tAnd progress is <progress>\r\n\t\tAnd goal is <goal>\r\n\t\tAnd steps is enabled\r\n\t\tThen I have <progressBar>\r\n\t\tAnd <progressBar> has incrementing steps up to <goal>\r\n\t\tAnd gift icon has <color>\r\n\t\tAnd gift icon shows <goal> below\r\n\t\tExamples:\r\n\t\t\t| progress | goal | progressBar | color |\r\n\t\t\t| 0 | 5 | ―――○―――○―――○―――○―――🎁 | no |\r\n\t\t\t| 1 | 5 | ―――●―――○―――○―――○―――🎁 | no |\r\n\t\t\t| 5 | 5 | ―――○―――○―――○―――●―――🎁 | yes |\r\n\t\t\t| 7 | 5 | ―――○―――○―――○―――●―――🎁 | yes |\r\n\t\t\t| 12 | 5 | ―――○―――○―――○―――●―――🎁 | yes |\r\n\r\n\r\n\tScenario Outline: Progress Bar Repeatable\r\n\t\tGiven a Task Card component\r\n\t\tAnd progress is <progress>\r\n\t\tAnd goal is <goal>\r\n\t\tAnd it is repeatable\r\n\t\tThen I have <progressBar>\r\n\t\tAnd <progressBar> shows <progress> with <unit> above\r\n\t\tAnd first <icon1> is <color1> with <text1> displayed below\r\n\t\tAnd second <icon2> is <color2> with <text2> displayed below\r\n\t\tAnd third <icon3> is <color3> with <text3> displayed below\r\n\t\tExamples:\r\n\t\t\t| progress | goal | progressBar | unit | icon1 | color1 | text1 | icon2 | color2 | text 2 | icon3 | color3 | text 3 |\r\n\t\t\t| 250 | 500 | ――――●――――🎁―――――――🎁 | $ | NA | NA | NA | gift | greyscale | 500 | gift | greyscale | 1000 |\r\n\t\t\t| 500 | 500 | ―――――――――🎁―――――――🎁 | $ | NA | NA | NA | gift | colorful | 500 | gift | greyscale | 1000 |\r\n\t\t\t| 750 | 500 | ―――――――――🎁―――●―――🎁 | $ | NA | NA | NA | gift | colorful | 500 | gift | greyscale | 1000 |\r\n\t\t\t| 1000 | 500 | 🎁―――――――🎁―――――――🎁 | $ | gift | colorful | 500 | gift | colorful | 1000 | gift | greyscale | 1500 |\r\n\t\t\t| 1250 | 500 | 🎁―――――――🎁―――●―――🎁 | $ | gift | colorful | 500 | gift | colorful | 1000 | gift | greyscale | 1500 |\r\n\r\n\tScenario Outline: Progress Bar Steps Repeatable\r\n\t\tGiven a Task Card component\r\n\t\tAnd progress is <progress>\r\n\t\tAnd goal is <goal>\r\n\t\tAnd steps is enabled\r\n\t\tAnd it is repeatable\r\n\t\tThen I have <progressBar>\r\n\t\tAnd <progressBar> has incrementing steps up to <goal>\r\n\t\tAnd first <icon1> is <color1>\r\n\t\tAnd second <icon2> is <color2>\r\n\t\tAnd third <icon3> is <color3>\r\n\t\tExamples:\r\n\t\t\t| progress | goal | progressBar | icon1 | color1 | icon2 | color2 | icon3 | color3 |\r\n\t\t\t| 0 | 5 | ―――○―○―○―○―🎁―○―○―○―○―🎁 | NA | NA | gift | greyscale | gift | greyscale |\r\n\t\t\t| 1 | 5 | ―――●―○―○―○―🎁―○―○―○―○―🎁 | NA | NA | gift | greyscale | gift | greyscale |\r\n\t\t\t| 5 | 5 | ―――●―●―●―●―🎁―○―○―○―○―🎁 | NA | NA | gift | colorful | gift | greyscale |\r\n\t\t\t| 7 | 5 | ―――●―●―●―●―🎁―●―●―○―○―🎁 | NA | NA | gift | colorful | gift | greyscale |\r\n\t\t\t| 12 | 5 | 🎁―●―●―●―●―🎁―●―●―○―○―🎁 | gift | colorful | gift | colorful | gift | greyscale |";
|
|
5840
5907
|
|
|
@@ -11081,21 +11148,21 @@ const TitledSection_stories = {
|
|
|
11081
11148
|
title: "Components/Titled Section",
|
|
11082
11149
|
};
|
|
11083
11150
|
const AlignLeft = () => {
|
|
11084
|
-
return (h("sqm-titled-section", { align: "left" },
|
|
11151
|
+
return (h("sqm-titled-section", { "text-align": "left" },
|
|
11085
11152
|
h("sqm-text", { slot: "label" },
|
|
11086
11153
|
h("h3", null, "Earn more rewards")),
|
|
11087
11154
|
h("sqm-text", { slot: "content" },
|
|
11088
11155
|
h("p", null, "Get points while using Klip. Use those points to redeem rewards like one free month of Klip Enterprise or two plane tickets to anywhere in North America"))));
|
|
11089
11156
|
};
|
|
11090
11157
|
const AlignCenter = () => {
|
|
11091
|
-
return (h("sqm-titled-section", { align: "center" },
|
|
11158
|
+
return (h("sqm-titled-section", { "text-align": "center" },
|
|
11092
11159
|
h("sqm-text", { slot: "label" },
|
|
11093
11160
|
h("h3", null, "Earn more rewards")),
|
|
11094
11161
|
h("sqm-text", { slot: "content" },
|
|
11095
11162
|
h("p", null, "Get points while using Klip. Use those points to redeem rewards like one free month of Klip Enterprise or two plane tickets to anywhere in North America"))));
|
|
11096
11163
|
};
|
|
11097
11164
|
const AlignRight = () => {
|
|
11098
|
-
return (h("sqm-titled-section", { align: "right" },
|
|
11165
|
+
return (h("sqm-titled-section", { "text-align": "right" },
|
|
11099
11166
|
h("sqm-text", { slot: "label" },
|
|
11100
11167
|
h("h3", null, "Earn more rewards")),
|
|
11101
11168
|
h("sqm-text", { slot: "content" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var a,t=1,
|
|
1
|
+
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var a,t=1,l=arguments.length;t<l;t++){a=arguments[t];for(var s in a)if(Object.prototype.hasOwnProperty.call(a,s))e[s]=a[s]}return e};return __assign.apply(this,arguments)};import{h}from"./index-17b4da69.js";import{g as gap}from"./mixins-10353a39.js";import{c as createStyleSheet}from"./JSS-96eeab98.js";function GenericTableView(e){var a;var t=e.states,l=e.data,s=e.callbacks,r=e.elements;var n=r.columns,i=r.rows;var o=t.show;console.log(e);var d=l.hiddenColumns.split(",").map(Number);var p="@media (max-width: "+l.mdBreakpoint+"px)";var m="@media (min-width: "+(!Boolean(i.length)?l.mdBreakpoint:l.smBreakpoint)+"px) and (max-width: "+l.mdBreakpoint+"px)";var c={Table:(a={tableLayout:"fixed",width:"100%","& th":{paddingBottom:"var(--sl-spacing-small)",textAlign:"left",fontWeight:"var(--sl-font-weight-semibold)",overflowWrap:"anywhere"},"& tr":{},"& td":{borderTop:"1px solid var(--sl-color-neutral-200)",padding:"var(--sl-spacing-small)",paddingLeft:"0",overflow:"hidden",textOverflow:"ellipsis"}},a[p]={"& thead":{display:"none"},"& tr":{display:"block",background:"#FFFFFF",border:"1px solid var(--sl-color-neutral-200)",boxShadow:"0px 2px 4px rgba(0, 0, 0, 0.1)",borderRadius:"var(--sl-border-radius-medium)",padding:"var(--sl-spacing-medium)",fontSize:"var(--sl-font-size-small)",marginBottom:"var(--sl-spacing-large)"},"& td":{display:"grid",gridTemplateColumns:"0.5fr 0.5fr",borderTop:"none",padding:"0",marginBottom:"var(--sl-spacing-medium)","&:first-child":{textAlign:"left"},"&:before":{content:"attr(data-label)",whiteSpace:"nowrap"},"&:last-child":{marginBottom:"0"},"&.hidden:before":{content:"none"}}},a[m]={"& tbody":{display:"grid",gridTemplateColumns:"0.5fr 0.5fr",gap:"25px"}},a),ButtonContainer:__assign({display:"flex","justify-content":"flex-end","margin-top":"var(--sl-spacing-small)"},gap({direction:"row",size:"var(--sl-spacing-small)"})),ButtonDisabled:{"&::part(base)":{opacity:"0.25"}}};var b=createStyleSheet(c);var g=b.toString();return h("div",null,h("style",{type:"text/css"},g),h("table",{class:b.classes.Table},l.textOverrides.showLabels&&h("thead",null,h("tr",null,n===null||n===void 0?void 0:n.map((function(e){return h("th",null,e)})))),h("tbody",null,o==="loading"&&r.loadingElement,o==="empty"&&r.emptyElement,o==="rows"&&(i===null||i===void 0?void 0:i.map((function(e,a){return h("tr",{style:{borderTop:""+(!l.textOverrides.showLabels&&a===0?"none":"")},part:"table-row"},e===null||e===void 0?void 0:e.map((function(e,a){return h("td",{class:d.includes(a)?"hidden":"","data-label":n[a].$children$[0].$text$+":"},e)})))}))))),h("div",{class:b.classes.ButtonContainer,part:t.namespace+"-button-wrapper"},h("sl-button",{size:"small",disabled:!t.hasPrev,loading:o==="loading",onClick:s.prevPage,exportparts:"base: defaultbutton-base",class:!t.hasPrev?b.classes.ButtonDisabled:""},l.textOverrides.prevLabel),h("sl-button",{size:"small",loading:o==="loading",disabled:!t.hasNext,onClick:s.nextPage,exportparts:"base: defaultbutton-base",class:!t.hasNext?b.classes.ButtonDisabled:""},l.textOverrides.moreLabel)))}export{GenericTableView as G};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __makeTemplateObject=this&&this.__makeTemplateObject||function(e,t){if(Object.defineProperty){Object.defineProperty(e,"raw",{value:t})}else{e.raw=t}return e};var __extends=this&&this.__extends||function(){var e=function(t,a){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a))e[a]=t[a]};return e(t,a)};return function(t,a){e(t,a);function r(){this.constructor=t}t.prototype=a===null?Object.create(a):(r.prototype=a.prototype,new r)}}();var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,a=1,r=arguments.length;a<r;a++){t=arguments[a];for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s))e[s]=t[s]}return e};return __assign.apply(this,arguments)};var __spreadArrays=this&&this.__spreadArrays||function(){for(var e=0,t=0,a=arguments.length;t<a;t++)e+=arguments[t].length;for(var r=Array(e),s=0,t=0;t<a;t++)for(var i=arguments[t],l=0,n=i.length;l<n;l++,s++)r[s]=i[l];return r};import{h,c as Host,d as getAssetPath,g as getElement}from"./index-17b4da69.js";import{k as useState}from"./stencil-hooks.module-2f159754.js";import{i as intl}from"./global-58010a55.js";import{d as dist,M,n as ne,x,b as mn,D as De,f as D}from"./index.module-ec3dcc82.js";import{H as HostBlock,A as AuthWrapper,a as AuthColumn,b as AuthButtonsContainer,E as ErrorStyles}from"./mixins-10353a39.js";import{c as createStyleSheet}from"./JSS-96eeab98.js";import{l as luxon}from"./luxon-5fa22651.js";import{l as luxonLocale}from"./utils-1d345130.js";import{T as TextSpanView}from"./sqm-text-span-view-7e61c95c.js";import{P as PortalContainerView}from"./sqm-portal-container-view-624563e6.js";import{P as PortalSectionView}from"./sqm-portal-section-view-88a80af9.js";var medium={facebook:"#1877f2",twitter:"#1da1f2",email:"#666666",direct:"#00008B",linkedin:"#0077b5",sms:"#34DA50",fbmessenger:"#0084ff",whatsapp:"#25d366",linemessenger:"#00B300",pinterest:"#e60023"};var medium_text={facebook:"#fff",twitter:"#fff",email:"#fff",direct:"#fff",linkedin:"#fff",sms:"#fff",fbmessenger:"#fff",whatsapp:"#fff",linemessenger:"#fff",pinterest:"#fff"};var medium_icon={facebook:"facebook",twitter:"twitter",email:"envelope",direct:"send",linkedin:"linkedin",sms:"chat",fbmessenger:"messenger",whatsapp:"whatsapp",linemessenger:"line",pinterest:"pinterest"};function ShareButtonView(e,t){var a="\n *::part(base) {\n\t\t\t--sl-focus-ring-color-primary: "+(e.backgroundcolor?e.backgroundcolor:e.medium?medium[e.medium]:"")+"80!important;\n\n background: "+(e.backgroundcolor?e.backgroundcolor:e.medium?medium[e.medium]:"")+";\n color: "+(e.textcolor?e.textcolor:e.medium?medium_text[e.medium]:"")+";\n border-radius: "+(e.borderradius?e.borderradius+"px":"")+";\n }\n\n\t*::part(base):hover {\n\t\tborder-color: "+(e.backgroundcolor?e.backgroundcolor:e.medium?medium[e.medium]:"")+"D1!important;\n\t}\n\t\n\t*::part(base):focus {\n\t\tborder-color: "+(e.backgroundcolor?e.backgroundcolor:e.medium?medium[e.medium]:"")+"D1!important;\n\t}\n\n\t*::part(label) {\n\t\tposition: relative;\n\t\ttop: 2%;\n\t}\n ";var r={HostBlock:HostBlock,buttonStyle:{display:"flex",alignItems:"center",justifyContent:"center",lineHeight:"0"}};var s=createStyleSheet(r);var i=s.toString();return e.hide?h(Host,{style:{display:"none"}}):h("div",null,h("style",{type:"text/css"},i),h("style",{type:"text/css"},a),h("sl-button",{class:s.classes.buttonStyle,loading:e.loading,disabled:e.disabled,pill:e.pill,size:e.size,type:e.type,onClick:e.onClick,exportparts:"base: "+e.type+"sharebutton-base"},!e.hideicon&&h("sl-icon",{slot:e.iconslot||"prefix",name:e.icon?e.icon:medium_icon[e.medium],exportparts:"icon"}),!e.hidetext&&t))}var style={HostBlock:HostBlock,inputStyle:{"&::part(base)":{background:"white",opacity:"1",cursor:"pointer"}}};var sheet=createStyleSheet(style);var styleString=sheet.toString();function ShareLinkView(e){return h("div",null,h("style",{type:"text/css"},styleString),h("sl-tooltip",{trigger:"manual",content:e.tooltiptext,placement:"top-end",disabled:e.disabled,open:e.open},h("sl-input",{class:sheet.classes.inputStyle,exportparts:"label: input-label",value:e.shareString,readonly:true},h("sl-icon-button",{onClick:function(){var t;return(t=e.onClick)===null||t===void 0?void 0:t.call(e)},slot:"suffix",name:"files",disabled:e.disabled}))))}var style$1={Leaderboard:{"& table":{width:"100%",borderCollapse:"collapse"},"& th":{textAlign:"left",padding:"var(--sl-spacing-medium)",paddingTop:"0",fontSize:"var(--sl-font-size-medium)",fontWeight:"var(--sl-font-weight-semibold)"},"& tr:not(:first-child)":{borderTop:"1px solid var(--sl-color-neutral-200)"},"& td":{fontSize:"var(--sl-font-size-medium)",fontWeight:"var(--sl-font-weight-normal)"},"& .ellipses":{textAlign:"center",padding:"0",color:"var(--sl-color-neutral-500)"},"& .highlight":{background:"var(--sl-color-primary-50)"},"& td, th":{color:"var(--sl-color-gray-800)",padding:"var(--sl-spacing-medium)"},"& .User":{width:"100%"},"& .Score":{width:"auto",whiteSpace:"nowrap"}}};var sheet$1=createStyleSheet(style$1);var styleString$1=sheet$1.toString();var vanillaStyle="\n\t:host{\n\t\tdisplay: block;\n\t}\n";function LeaderboardView(e){var t,a,r,s,i,l,n,o,d,c,u;var p=e.states,v=e.data,g=e.elements;var m=p.styles;console.log("I AM THE LEADERBOARDS",e);if(p.loading)return h("div",{class:sheet$1.classes.Leaderboard},h("style",{type:"text/css"},styleString$1,vanillaStyle),g.loadingstate);var f=false;return h("div",{class:sheet$1.classes.Leaderboard},h("style",{type:"text/css"},styleString$1,vanillaStyle),h("table",null,h("tr",null,m.showRank&&h("th",{class:"Rank"},m.rankheading),h("th",{class:"User"},m.usersheading),h("th",{class:"Score"},m.statsheading)),!p.hasLeaders&&h("tr",null,h("td",{colSpan:100},g.empty)),(t=v.leaderboard)===null||t===void 0?void 0:t.map((function(e){var t,a;if(e.rowNumber===((t=v.userRank)===null||t===void 0?void 0:t.rowNumber))f=true;return h("tr",{class:e.rowNumber===((a=v.userRank)===null||a===void 0?void 0:a.rowNumber)?"highlight":""},m.showRank&&h("td",{class:"Rank"},e.rank),h("td",{class:"User"},e.firstName&&e.lastInitial?e.firstName+" "+e.lastInitial:e.firstName||e.lastInitial?e.firstName||e.lastInitial:m.anonymousUser||"Anonymous User"),h("td",{class:"Score"},e.value))})),p.hasLeaders&&!f&&v.showUser&&h("tr",null,h("td",{colSpan:100,class:"ellipses"},h("sl-icon",{name:"three-dots",style:{verticalAlign:"middle"}}))),p.hasLeaders&&!f&&v.showUser&&h("tr",{class:"highlight"},m.showRank&&h("td",{class:"Rank"},((a=v.userRank)===null||a===void 0?void 0:a.rank)||"-"),h("td",{class:"User"},((r=v.userRank)===null||r===void 0?void 0:r.firstName)&&((s=v.userRank)===null||s===void 0?void 0:s.lastInitial)?((i=v.userRank)===null||i===void 0?void 0:i.firstName)+" "+((l=v.userRank)===null||l===void 0?void 0:l.lastInitial):((n=v.userRank)===null||n===void 0?void 0:n.firstName)||((o=v.userRank)===null||o===void 0?void 0:o.lastInitial)?((d=v.userRank)===null||d===void 0?void 0:d.firstName)||((c=v.userRank)===null||c===void 0?void 0:c.lastInitial):m.anonymousUser||"Anonymous User"),h("td",{class:"Score"},((u=v.userRank)===null||u===void 0?void 0:u.value)||"0"))))}var style$2={HostBlock:HostBlock,":host":{"min-height":"100vh"},Frame:{"min-height":"100vh",display:"flex","flex-direction":"column","box-sizing":"border-box"},FooterWrapper:{width:"100%","max-width":"100%",padding:"var(--sl-spacing-medium) var(--sl-spacing-x-large)",background:"var(--sqm-footer-background)",display:"flex","justify-content":"flex-end","align-items":"center","box-sizing":"border-box","margin-top":"auto"},HeaderWrapper:{width:"100%","max-width":"100%","box-sizing":"border-box",display:"flex","justify-content":"space-between",padding:"var(--sl-spacing-small) var(--sl-spacing-large)","align-items":"center","background-color":"var(--sqm-header-background)","@media screen and (max-width: 499px)":{"flex-direction":"row-reverse","justify-content":"flex-end",padding:"0"}}};var sheet$2=createStyleSheet(style$2);var styleString$2=sheet$2.toString();function PortalFrameView(e,t){var a=e.data;return h("div",{class:sheet$2.classes.Frame},h("style",{type:"text/css"},styleString$2),h("div",{class:sheet$2.classes.HeaderWrapper},a.header,h("slot",{name:"sqm-navigation-menu"})),t,h("div",{class:sheet$2.classes.FooterWrapper},a.footer))}var EditProfileView=function(e){var t,a,r,s;var i=e.states,l=e.callbacks;var n=i.text;var o=i.formState.errors;if(i.showEdit){return h("div",{class:"CardWrapper "+(!i.showEdit&&"ShowEdit")},h("h2",{style:{fontSize:"var(--sl-font-size-x-large)",margin:"0px",textAlign:"center"}},n.editprofileheader),h("form",{class:"FormWrapper",onSubmit:l.onSubmit},h("div",{class:"FormSection"},i.formState.error&&h("sqm-form-message",{type:"error",exportparts:"erroralert-icon"},h("div",{part:"erroralert-text"},i.formState.error)),h("sl-input",Object.assign({exportparts:"label: input-label",value:i.formState.firstName,onInput:l.onChange,label:n.firstnametext,disabled:i.loading},o.firstName&&o.firstName.status!=="valid"?{class:"ErrorStyles",helpText:"Cannot be empty"}:[],{id:"firstName",name:"firstName",error:o.firstName&&o.firstName.status!=="valid"?o.firstName.message:undefined})),h("sl-input",Object.assign({exportparts:"label: input-label",value:i.formState.lastName,onInput:l.onChange,label:n.lastnametext,disabled:i.loading,id:"lastName",name:"lastName"},o.lastName&&o.lastName.status!=="valid"?{class:"ErrorStyles",helpText:"Cannot be empty"}:[],{error:o.lastName&&o.lastName.status!=="valid"?o.lastName.message:undefined}))),n.showregion&&i.formState.currentRegion&&h("sl-input",{exportparts:"label: input-label",disabled:true,value:i.formState.currentRegion,label:n.currentregiontext,id:"currentRegion",name:"currentRegion"}),h("div",{class:"ButtonWrapper"},h("sl-button",{onClick:function(){l.setShowEdit(false)},exportparts:"base: defaultbutton-base"},n.canceltext),h("sl-button",{type:"primary",loading:i.loading,disabled:i.submitDisabled,onClick:function(e){l.onSubmit(e)},submit:true,exportparts:"base: primarybutton-base"},n.updatetext))))}return h("div",{class:"CardWrapper FormWrapper "+(!i.showEdit&&"ShowEdit")},h("div",{class:"FormSection"},h("h2",{style:{fontSize:"var(--sl-font-size-x-large",marginBottom:"0px",textAlign:"center"}},n.editprofileheader),h("div",null,h("p",{style:{fontSize:"var(--sl-font-size-medium)"}},(t=i.user)===null||t===void 0?void 0:t.firstName," ",(a=i.user)===null||a===void 0?void 0:a.lastName),h("p",{style:{fontSize:"var(--sl-font-size-medium)"},title:(r=i.user)===null||r===void 0?void 0:r.email},(s=i.user)===null||s===void 0?void 0:s.email))),h("sl-button",{type:"primary",loading:i.loading,onClick:function(){l.resetForm();l.setShowEdit(true)},exportparts:"base: primarybutton-base"},n.editprofiletext))};var MessageLinkQuery=dist.gql(templateObject_1||(templateObject_1=__makeTemplateObject(["\n query ($programId: ID) {\n user: viewer {\n ... on User {\n shareLink(programId: $programId)\n }\n }\n }\n"],["\n query ($programId: ID) {\n user: viewer {\n ... on User {\n shareLink(programId: $programId)\n }\n }\n }\n"])));var WIDGET_ENGAGEMENT_EVENT=dist.gql(templateObject_2||(templateObject_2=__makeTemplateObject(["\n mutation loadEvent($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"],["\n mutation loadEvent($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"])));function useShareLink(e){var t,a;var r=e.programId,s=r===void 0?M():r;var i=ne();var l=x();var n=mn(MessageLinkQuery,{programId:s},!(i===null||i===void 0?void 0:i.jwt)).data;var o=De(WIDGET_ENGAGEMENT_EVENT)[0];var d=(a=(t=n===null||n===void 0?void 0:n.user)===null||t===void 0?void 0:t.shareLink)!==null&&a!==void 0?a:"...";var c=useState(false),u=c[0],p=c[1];function h(){navigator.clipboard.writeText(d);p(true);setTimeout((function(){return p(false)}),e.tooltiplifespan);o({eventMeta:{programId:s,id:i===null||i===void 0?void 0:i.id,accountId:i===null||i===void 0?void 0:i.accountId,type:"USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",meta:{engagementMedium:l,shareMedium:"DIRECT"}}})}return __assign(__assign({},e),{onClick:h,open:u,shareString:d})}var MessageLinkQuery$1=dist.gql(templateObject_3||(templateObject_3=__makeTemplateObject(["\n query (\n $programId: ID\n $engagementMedium: UserEngagementMedium!\n $shareMedium: ReferralShareMedium!\n ) {\n viewer {\n ... on User {\n messageLink(\n programId: $programId\n engagementMedium: $engagementMedium\n shareMedium: $shareMedium\n )\n shareLink(programId: $programId, engagementMedium: $engagementMedium)\n }\n }\n }\n"],["\n query (\n $programId: ID\n $engagementMedium: UserEngagementMedium!\n $shareMedium: ReferralShareMedium!\n ) {\n viewer {\n ... on User {\n messageLink(\n programId: $programId\n engagementMedium: $engagementMedium\n shareMedium: $shareMedium\n )\n shareLink(programId: $programId, engagementMedium: $engagementMedium)\n }\n }\n }\n"])));function NativeShare(e,t){var a=e.sharetitle||"Share title";var r=e.sharetext||"Share text";if(t==="undefined"){return alert("error: message link undefined!")}if(window.navigator.share){window.navigator.share({title:a,text:r,url:t}).catch((function(e){return console.error("Error on web share",e)}))}else{alert("Not on a supported device")}}function FacebookShare(e,t){var a,r;if(((r=(a=t.data)===null||a===void 0?void 0:a.viewer)===null||r===void 0?void 0:r.messageLink)==="undefined"||e==="undefined"){return alert("error: message link undefined!")}if(typeof SquatchAndroid.shareOnFacebook!=="undefined"){return SquatchAndroid.shareOnFacebook(e,t.data.viewer.messageLink)}else{return GenericShare(t)}}function GenericShare(e){var t,a;return((a=(t=e.data)===null||t===void 0?void 0:t.viewer)===null||a===void 0?void 0:a.messageLink)?window.open(e.data.viewer.messageLink):alert("error: message link undefined!")}function useShareButton(e){var t,a;var r=e.sharetitle,s=e.sharetext,i=e.medium;var l=e.programId?e.programId:M();var n=ne();var o={engagementMedium:x(),programId:l,shareMedium:i.toUpperCase()};var d=mn(MessageLinkQuery$1,o,!(n===null||n===void 0?void 0:n.jwt)||!l);var c=(a=(t=d===null||d===void 0?void 0:d.data)===null||t===void 0?void 0:t.viewer)===null||a===void 0?void 0:a.shareLink;var u=D();var p=i.toLocaleUpperCase()==="SMS"&&window.orientation===undefined||i.toLocaleUpperCase()==="DIRECT"&&!window.navigator.share;function h(){if(i.toLocaleUpperCase()==="FACEBOOK"&&u.type==="SquatchAndroid"){FacebookShare(c,d)}else if(i.toLocaleUpperCase()==="DIRECT"){NativeShare({sharetitle:r,sharetext:s},c)}else{GenericShare(d)}}return __assign(__assign({},e),{loading:d.loading,onClick:h,hide:p})}function PortalChangePasswordView(e){var t=e.states,a=e.callbacks;var r={Dialog:{padding:"0","&::part(close-button)":{"margin-top":"var(--sl-spacing-medium)"},"&::part(body)":{padding:"0 var(--sl-spacing-x-large) var(--sl-spacing-x-large) var(--sl-spacing-x-large)"}},Error:{"&::part(erroralert-base)":{"margin-bottom":"15px"}},Success:{"&::part(successalert-base)":{"margin-bottom":"15px"}},InputContainer:{"& > :not(:last-child)":{"margin-bottom":"var(--sl-spacing-x-large)"}},CancelButton:{width:"25%",margin:"var(--sl-spacing-large) auto"},PasswordField:{marginBottom:"var(--sl-spacing-large) !important",display:"block"},ChangePasswordButton:{paddingTop:"var(--sl-spacing-x-large)"}};var s=createStyleSheet(r);var i=s.toString();return h("div",null,h("style",{type:"text/css"},i),h("sl-dialog",{class:s.classes.Dialog,open:t.open,"onSl-hide":function(){return a.setOpen(false)}},h(PortalSectionView,Object.assign({},{labelMargin:"x-large",padding:"none",label:h(TextSpanView,Object.assign({},{type:"h2"}),t.content.modalChangePasswordHeader),content:h(PortalContainerView,Object.assign({},{direction:"column",padding:"none",gap:"32px"}),t.error&&h("sqm-form-message",{class:s.classes.Error,type:"error",exportparts:"erroralert-icon"},h("div",{part:"erroralert-text"},t.error)),t.success&&h("sqm-form-message",{class:s.classes.Success,type:"success",exportparts:"successalert-icon"},h("div",{part:"successalert-text"},t.content.successMessage)),h("sl-form",{"onSl-submit":a.submit},h("div",{class:s.classes.InputContainer},h("sqm-password-field",{exportparts:"input-label: input-label",class:s.classes.PasswordField,fieldLabel:t.content.passwordFieldLabel}),h("sl-input",{exportparts:"label: input-label",name:"/confirmPassword",label:t.content.confirmPasswordFieldLabel,required:true,togglePassword:true,disabled:t.loading,type:"password"})),h(PortalContainerView,Object.assign({},{direction:"row",padding:"none",gap:"20px"}),h("sl-button",{class:s.classes.ChangePasswordButton,type:"primary",submit:true,loading:t.loading},t.content.changePasswordButtonText),h("sl-button",{class:s.classes.CancelButton,type:"text",onClick:function(){return a.setOpen(false)}},t.content.cancelText))))}))),h(PortalSectionView,Object.assign({},{labelMargin:"x-large",padding:"xxx-large",label:h(TextSpanView,Object.assign({},{type:"h2"}),t.content.portalChangePasswordHeader),content:h("sl-button",{onClick:function(){return a.setOpen(true)}},t.content.portalChangePasswordButtonText)}),h("style",{type:"text/css"},i)))}var style$3={Wrapper:AuthWrapper,Column:AuthColumn,ForgotButtonContainer:{display:"inline",cursor:"pointer","font-size":"13px","font-weight":"600",color:"#AAAAAA",margin:"0"},ButtonsContainer:AuthButtonsContainer};var vanillaStyle$1="\n:host {\n display: block;\n}\n:host([hidden]): {\n display: none;\n}\n";var sheet$3=createStyleSheet(style$3);var styleString$3=sheet$3.toString();function PortalLoginView(e){var t=e.states,a=e.callbacks,r=e.content;return h("div",{class:sheet$3.classes.Wrapper},h("style",{type:"text/css"},vanillaStyle$1,styleString$3),h(TextSpanView,{type:"h3"},r.pageLabel),h("sl-form",{class:sheet$3.classes.Column,"onSl-submit":a.submit},e.states.error&&h("sqm-form-message",{type:"error",exportparts:"erroralert-icon"},h("div",{part:"erroralert-text"},e.states.error)),h("sl-input",{exportparts:"label: input-label",type:"email",name:"/email",label:r.emailLabel||"Email",disabled:t.loading,required:true}),h("div",null,h("sl-input",{exportparts:"label: input-label",type:"password",name:"/password",label:r.passwordLabel||"Password",disabled:t.loading,required:true}),h("div",{class:sheet$3.classes.ForgotButtonContainer},r.forgotPasswordButton)),h("div",{class:sheet$3.classes.ButtonsContainer},h("sl-button",{submit:true,loading:t.loading,exportparts:"base: primarybutton-base",type:"primary"},r.submitLabel||"Login"),r.secondaryButton)))}var style$4={Wrapper:__assign(__assign({},AuthWrapper),{"max-width":"600px"}),Column:AuthColumn,HostBlock:HostBlock,":host":{margin:"0 auto",width:"100%"},ButtonsContainer:AuthButtonsContainer,ErrorStyle:ErrorStyles};var vanillaStyle$2="\nsqm-portal-register {\n margin: 0 auto;\n width: 100%;\n display: block;\n}\n\n:host{\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n";var sheet$4=createStyleSheet(style$4);var styleString$4=sheet$4.toString();function PortalRegisterView(e){var t,a,r,s,i,l,n,o;var d=e.states,c=e.refs,u=e.callbacks,p=e.content;if(d.error){window.scrollTo({top:0,left:0,behavior:"smooth"})}return h("div",{class:sheet$4.classes.Wrapper},h("style",{type:"text/css"},vanillaStyle$2,styleString$4),h(TextSpanView,{type:"h3"},p.pageLabel),h("sl-form",{class:sheet$4.classes.Column,"onSl-submit":u.submit,ref:function(e){return c.formRef.current=e},novalidate:true},d.error&&h("sqm-form-message",{type:"error",exportparts:"erroralert-icon"},h("div",{part:"erroralert-text"},e.states.error)),p.formData,!d.hideInputs&&h("sl-input",Object.assign({exportparts:"label: input-label",type:"email",name:"/email",label:p.emailLabel||"Email",disabled:d.loading,required:true,validationError:function(e){var t=e.value;if(!t){return"Cannot be empty"}if(!t.includes("@")){return"Must be a valid email address"}}},((a=(t=d.validationState)===null||t===void 0?void 0:t.validationErrors)===null||a===void 0?void 0:a.email)?{class:sheet$4.classes.ErrorStyle,helpText:((s=(r=d.validationState)===null||r===void 0?void 0:r.validationErrors)===null||s===void 0?void 0:s.email)||"Cannot be empty"}:[])),!d.hideInputs&&h("sqm-password-field",{fieldLabel:p.passwordLabel,"enable-validation":d.enablePasswordValidation}),p.passwordField,!d.hideInputs&&d.confirmPassword&&h("sl-input",Object.assign({exportparts:"label: input-label",type:"password",name:"/confirmPassword",label:p.confirmPasswordLabel,disabled:d.loading,required:true},((l=(i=d.validationState)===null||i===void 0?void 0:i.validationErrors)===null||l===void 0?void 0:l.confirmPassword)?{class:sheet$4.classes.ErrorStyle,helpText:((o=(n=d.validationState)===null||n===void 0?void 0:n.validationErrors)===null||o===void 0?void 0:o.confirmPassword)||"Cannot be empty"}:[])),p.terms,h("div",{class:sheet$4.classes.ButtonsContainer},h("sl-button",{submit:true,loading:d.loading,exportparts:"base: primarybutton-base",type:"primary"},p.submitLabel||"Register"),p.secondaryButton)))}var style$5={Description:{"& input[type=checkbox]":{display:"none"},"& input:checked ~ .details":{transform:"rotate(-180deg)"},"& .details":{position:"absolute",top:"var(--sl-spacing-medium)",right:"var(--sl-spacing-medium)",color:"var(--sl-color-neutral-700)",fontSize:"var(--sl-font-size-large)","& :hover":{color:"var(--sl-color-primary-700)"},transformOrigin:"50% 37%",transition:"transform var(--sl-transition-medium) ease",cursor:"pointer"},"& input:checked ~ .summary":{transition:"all var(--sl-transition-medium) ease",maxHeight:"300px",marginBottom:"var(--sl-spacing-x-large)"},"& input:checked ~ .summary[progress-bar]":{marginBottom:"var(--sl-spacing-xx-large)"},"& .summary":{display:"block",overflow:"hidden",fontSize:"var(--sl-font-size-small)",maxHeight:"0px",transition:"all var(--sl-transition-fast) ease-out",marginBottom:"var(--sl-spacing-medium)"}}};var sheet$5=createStyleSheet(style$5);var styleString$5=sheet$5.toString();function Details(e){var t=Math.random().toString(36).slice(2);return h("div",null,h("style",{type:"text/css"},styleString$5),h("span",{class:sheet$5.classes.Description},h("input",{type:"checkbox",id:"details-"+t}),h("label",{class:"details",htmlFor:"details-"+t},h("sl-icon",{name:"chevron-down"})),h("span",{class:"summary","progress-bar":e.progressBar},e.content.description)))}var Gift=function(){return h("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M15 5H12.4508H9V16H13.5C14.0523 16 14.5 15.5523 14.5 15V9H15C15.5523 9 16 8.55228 16 8V6C16 5.44772 15.5523 5 15 5Z",fill:"#F2C94C"}),h("path",{d:"M1.5 9V15C1.5 15.5523 1.94772 16 2.5 16H7V5H4.64242H1C0.447715 5 0 5.44772 0 6V8C0 8.55228 0.447715 9 1 9H1.5Z",fill:"#F2C94C"}),h("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.5 9V10H14.5V9H1.5Z",fill:"#BE9720"}),h("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14 2.70949C14 3.59565 12.6694 4.93746 12 5H9V16H7.00179V5H4.58792C3.21247 4.70182 2 3.64537 2 2.52072C2 1.42474 2.47603 0.556701 3.34184 0.182041C4.16921 -0.175986 5.12452 0.0203328 5.87976 0.544666C6.80676 1.18825 7.32679 2.3963 7.79856 3.49226C7.83996 3.58845 7.88099 3.68378 7.9219 3.77778C7.96173 3.68865 8.00186 3.59793 8.0425 3.50608C8.50995 2.44948 9.04359 1.24325 9.9404 0.59563C10.7332 0.0231438 11.741 -0.193157 12.6121 0.198945C13.5129 0.604397 14 1.53453 14 2.70949ZM10.6123 1.5C11.0928 1.15305 11.668 1.09012 12.1597 1.5C12.5879 1.85694 12.6108 2.02497 12.6658 2.42926L12.6755 2.5C12.6755 3.09851 12.1597 4 11.6439 4C11.2785 4 10.9914 3.99691 10.7224 3.99402C10.2319 3.98875 9.80131 3.98412 9.06496 4C9.20533 3.72786 9.31743 3.46669 9.42434 3.21761C9.71026 2.55143 9.95907 1.97176 10.6123 1.5ZM4.93861 1.5C4.70607 1.33855 4.17281 1.4106 3.95166 1.5063C3.76894 1.58537 3.49602 1.82658 3.49602 2.52072C3.49602 3.19524 4.58792 3.77778 4.58792 3.77778C4.58792 3.77778 5.45441 4 7.00179 4C6.47506 2.69451 5.7289 2.04867 4.93861 1.5Z",fill:"#EB5757"}))};var style$6={ProgressBar:{"& .progress-bar":{height:"0",marginTop:"var(--sl-spacing-large)",marginBottom:"var(--sl-spacing-xxx-large)",marginRight:"var(--sl-spacing-x-small)",fontSize:"var(--sl-font-size-x-small)",display:"grid",lineHeight:"45px",userSelect:"none"},"&[data-steps]":{marginTop:"calc(-1*var(--sl-spacing-x-small))"},"&[data-steps] .progress-bar":{marginTop:"var(--sl-spacing-medium)"},"&[data-expired] .progress-bar":{filter:"grayscale(1)"},"& .progress-bar.repeatable-steps":{marginLeft:"var(--sl-spacing-x-small)"},"& .filled:after":{content:'""',display:"flex",width:"100%",height:"4px",borderRadius:"4px",backgroundColor:"var(--sl-color-primary-300)"},"& .progress":{display:"block",textAlign:"center",marginLeft:"-100px",marginRight:"-100px"},"& .progress::after":{content:'""',width:"12px",height:"12px",display:"flex",backgroundColor:"var(--sl-color-primary-300)",borderRadius:"50%",position:"relative",left:"47%",top:"-85%"},"& .progress.bg:after":{width:"0",height:"0",border:"none"},"& .progress.top":{position:"relative",top:"-40px"},"& .progress.top:after":{top:"-16%"},"& .empty":{display:"block",textAlign:"center",marginLeft:"-100px",marginRight:"-100px"},"& .empty::after":{content:'""',width:"12px",height:"12px",border:"2px solid #E0E0E0",margin:"-2px",display:"flex",backgroundColor:"white",borderRadius:"50%",position:"relative",left:"47%",top:"-85%"},"& .empty.bg:after":{width:"0",height:"0",border:"none"},"& .remain:after":{content:'""',display:"flex",width:"100%",height:"4px",borderRadius:"4px",backgroundColor:"#E0E0E0"},"& .gift.bw":{filter:"grayscale(100%)"},"& .gift.start":{transform:"scale(80%)",top:"-20px"},"& .gift":{textAlign:"center",marginLeft:"-100px",marginRight:"-100px",position:"relative",top:"-18px"}}};var sheet$6=createStyleSheet(style$6,{classNamePrefix:"sqm-prog-bar"});var styleString$6=sheet$6.toString();function ProgressBarView(e){var t;var a=e.progress,r=a===void 0?0:a,s=e.goal,i=s===void 0?1:s,l=e.steps,n=l===void 0?false:l,o=e.progressBarUnit,d=o===void 0?"":o,c=e.repeatable,u=c===void 0?false:c,p=e.expired,v=p===void 0?false:p,g=e.finite,m=g===void 0?0:g;var f=buildProgressBar(u,n,e);var x=f.columns,b=f.items;console.log("PROGRESS BAR PROPS "+((t=e===null||e===void 0?void 0:e.content)===null||t===void 0?void 0:t.cardTitle));console.log({props:e});return h("div",{class:sheet$6.classes.ProgressBar,"data-expired":v,"data-steps":n,"data-done":i<=r},h("style",{type:"text/css"},styleString$6),h("div",{class:!Boolean(m)&&r>=2*i||Boolean(m)&&r>2*i?"progress-bar repeatable-steps":"progress-bar",style:{gridTemplateColumns:x,marginLeft:r===0&&!n?"var(--sl-spacing-x-small)":""}},b))}function buildProgressBar(e,t,a){if(e){if(t){return addStepsRepeatable(a)}else{return addLinearRepeatable(a)}}else{if(t){return addSteps(a)}else{return addLinear(a)}}}function addSteps(e){var t=e.progress,a=e.goal;var r=[];var s=[];var i=1/a;for(var l=1;l<a;l++){s.push(i+"fr");s.push("0fr");if(l>t){r.push(h("div",{class:"remain"}));r.push(h("div",{class:"empty"},l))}else{r.push(h("div",{class:"filled"}));r.push(h("div",{class:"progress"},l))}}s.push(i+"fr");s.push("0fr");if(a<=t){s.push("0fr");r.push(h("div",{class:"filled"}));r.push(h("div",{class:"progress bg"},a));r.push(h("div",{class:"gift"},h(Gift,null)))}else{s.push("0fr");r.push(h("div",{class:"remain"}));r.push(h("div",{class:"empty bg"},a));r.push(h("div",{class:"gift bw"},h(Gift,null)))}return{items:r,columns:s.join(" ")}}function addLinearRepeatable(e){var t=e.progress,a=e.goal,r=e.progressBarUnit,s=e.finite;var i=Math.floor(t/a);var l=t%a/a*.5;var n=[];var o="";if(i==0){o=l+"fr 0fr "+(.5-l)+"fr 0fr 0fr 0.5fr 0fr 0fr";n.push(h("div",{class:"filled"}));n.push(h("div",{class:t==a?"progress top bg":"progress top"},r+t));n.push(h("div",{class:"remain"}));n.push(h("div",{class:"progress bg"},r+a));n.push(h("div",{class:t==a?"gift":"gift bw"},h(Gift,null)));n.push(h("div",{class:"remain"}));n.push(h("div",{class:"progress bg"},r+a*2));n.push(h("div",{class:"gift bw"},h(Gift,null)))}else if(i==1){o="0.5fr 0fr 0fr "+l+"fr 0fr "+(.5-l)+"fr 0fr 0fr";n.push(h("div",{class:"filled"}));n.push(h("div",{class:"progress bg"},r+a));n.push(h("div",{class:"gift"},h(Gift,null)));n.push(h("div",{class:"filled"}));n.push(h("div",{class:t==a?"progress top bg":"progress top"},t==a?"":r+t));n.push(h("div",{class:"remain"}));n.push(h("div",{class:"progress bg"},r+a*2));n.push(h("div",{class:"gift bw"},h(Gift,null)))}else if(s&&i>=s){if(i>2){n.push(h("div",{class:"progress bg"},r+a*(s-2)));n.push(h("div",{class:"gift start"},h(Gift,null)));o="0fr 0fr 0.5fr 0fr 0fr 0.5fr 0fr 0fr"}else{o="0.5fr 0fr 0fr 0.5fr 0fr 0fr"}n.push(h("div",{class:"filled"}));n.push(h("div",{class:"progress bg"},r+a*(s-1)));n.push(h("div",{class:"gift"},h(Gift,null)));n.push(h("div",{class:"filled"}));n.push(h("div",{class:"progress bg"},r+a*s));n.push(h("div",{class:"gift"},h(Gift,null)))}else{o="0fr 0fr 0.5fr 0fr 0fr "+l+"fr 0fr "+(.5-l)+"fr 0fr 0fr";n.push(h("div",{class:"progress bg"},r+a*(i-1)));n.push(h("div",{class:"gift start"},h(Gift,null)));n.push(h("div",{class:"filled"}));n.push(h("div",{class:"progress bg"},r+a*i));n.push(h("div",{class:"gift"},h(Gift,null)));n.push(h("div",{class:"filled"}));n.push(h("div",{class:t==a*i?"progress top bg":"progress top"},t==a*i?"":r+t));n.push(h("div",{class:"remain"}));n.push(h("div",{class:"progress bg"},r+a*(i+1)));n.push(h("div",{class:"gift bw"},h(Gift,null)))}return{items:n,columns:o}}function addStepsRepeatable(e){var t=e.progress,a=e.goal,r=e.finite;var s=[];var i=[];var l=Math.floor(t/a);if(l<2){var n=1/a;for(var o=1;o<a*2+1;o++){i.push(n+"fr");i.push("0fr");if(o>t){if(o==a){i.push("0fr");s.push(h("div",{class:"remain"}));s.push(h("div",{class:"empty bg"},a));s.push(h("div",{class:"gift bw"},h(Gift,null)))}else if(o==a*2){i.push("0fr");i.push("0fr");s.push(h("div",{class:"remain"}));s.push(h("div",{class:"empty bg"},a*2));s.push(h("div",{class:"gift bw"},h(Gift,null)))}else{s.push(h("div",{class:"remain"}));s.push(h("div",{class:"empty"},o))}}else if(o==a){i.push("0fr");s.push(h("div",{class:"filled"}));s.push(h("div",{class:"progress bg"},o));s.push(h("div",{class:"gift"},h(Gift,null)))}else{s.push(h("div",{class:"filled"}));s.push(h("div",{class:"progress"},o))}}}else if(r&&l>=r){var n=1/a;if(l>2){i.push("0fr");i.push("0fr");s.push(h("div",{class:"progress bg"},a*(r-2)));s.push(h("div",{class:"gift start"},h(Gift,null)))}for(var d=1;d<a*2+1;d++){i.push(n+"fr");i.push("0fr");if(d>t){if(d==a){i.push("0fr");s.push(h("div",{class:"remain"}));s.push(h("div",{class:"progress bg"},a*(r-1)));s.push(h("div",{class:"gift bw"},h(Gift,null)))}}else if(d==a){i.push("0fr");s.push(h("div",{class:"filled"}));s.push(h("div",{class:"progress bg"},a*(r-1)));s.push(h("div",{class:"gift"},h(Gift,null)))}else if(d==a*2){i.push("0fr");i.push("0fr");s.push(h("div",{class:"filled"}));s.push(h("div",{class:"progress bg"},a*r));s.push(h("div",{class:"gift"},h(Gift,null)))}else{s.push(h("div",{class:"filled"}));s.push(h("div",{class:"progress"},d+a*(r-2)))}}}else{var c=t%a+a;var n=1/a;i.push("0fr");i.push("0fr");s.push(h("div",{class:"progress bg"},a*(l-1)));s.push(h("div",{class:"gift start"},h(Gift,null)));for(var u=1;u<a*2+1;u++){i.push(n+"fr");i.push("0fr");if(u<=a){if(u==a){i.push("0fr");s.push(h("div",{class:"filled"}));s.push(h("div",{class:"progress bg"},u+a*(l-1)));s.push(h("div",{class:"gift"},h(Gift,null)))}else{s.push(h("div",{class:"filled"}));s.push(h("div",{class:"progress"},u+a*(l-1)))}}else if(u>c){if(u==a*2){i.push("0fr");i.push("0fr");s.push(h("div",{class:"remain"}));s.push(h("div",{class:"empty bg"},u+a*(l-1)));s.push(h("div",{class:"gift bw"},h(Gift,null)))}else{s.push(h("div",{class:"remain"}));s.push(h("div",{class:"empty"},u+a*(l-1)))}}else{s.push(h("div",{class:"filled"}));s.push(h("div",{class:"progress"},u+a*(l-1)))}}}return{items:s,columns:i.join(" ")}}function addLinear(e){var t=e.progress,a=e.goal,r=e.progressBarUnit;var s=[];var i="";var l=t/a;i=clamp(l,0,1)+"fr 0fr "+clamp(1-l,0,1)+"fr 0fr 0fr";s.push(h("div",{class:"filled"}));s.push(h("div",{class:clamp(t,0,a)==a?"progress top bg":"progress top"},clamp(t,0,a)==a?"":r+clamp(t,0,a)));s.push(h("div",{class:"remain"}));s.push(h("div",{class:"progress bg"},r+a));s.push(h("div",{class:clamp(t,0,a)==a?"gift":"gift bw"},h(Gift,null)));return{items:s,columns:i}}function clamp(e,t,a){return Math.min(Math.max(e,t),a)}var checkmark_circle=function(){return h("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.81818 10C1.81818 5.48131 5.48131 1.81818 10 1.81818C14.5187 1.81818 18.1818 5.48131 18.1818 10C18.1818 14.5187 14.5187 18.1818 10 18.1818C5.48131 18.1818 1.81818 14.5187 1.81818 10ZM10 0C4.47715 0 0 4.47715 0 10C0 15.5228 4.47715 20 10 20C15.5228 20 20 15.5228 20 10C20 4.47715 15.5228 0 10 0ZM15.7692 6.96189C16.1398 6.48683 16.0551 5.80132 15.58 5.43077C15.1049 5.06022 14.4194 5.14495 14.0489 5.62001L8.72994 12.4391L5.86229 9.5715C5.43627 9.14548 4.74554 9.14548 4.31952 9.5715C3.89349 9.99752 3.89349 10.6882 4.31952 11.1143L8.05976 14.8545C8.28083 15.0756 8.58613 15.1912 8.89818 15.172C9.21023 15.1528 9.49905 15.0006 9.69133 14.7541L15.7692 6.96189Z",fill:"currentColor"}))};var checkmark_filled=function(){return h("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("circle",{cx:"10",cy:"10",r:"10",fill:"currentColor"}),h("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.65 6.19231C15.0459 6.5011 15.1165 7.07236 14.8077 7.46825L9.74277 13.9617C9.58254 14.1672 9.34186 14.294 9.08182 14.31C8.82178 14.326 8.56736 14.2297 8.38314 14.0454L5.26627 10.9286C4.91124 10.5735 4.91124 9.99794 5.26627 9.64292C5.62129 9.2879 6.19689 9.2879 6.55191 9.64292L8.94162 12.0326L13.3741 6.35001C13.6828 5.95412 14.2541 5.88352 14.65 6.19231Z",fill:"white"}))};var arrow_left_right=function(){return h("svg",{width:11,height:12,fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.265 2.789a.346.346 0 000-.489L8.066.101a.346.346 0 10-.489.489l1.61 1.609H2.073a.691.691 0 00-.69.691v1.728a.346.346 0 00.69 0V2.89h7.114L7.577 4.5a.346.346 0 10.49.488l2.198-2.2zM.101 9.21a.346.346 0 000 .489l2.2 2.199a.346.346 0 00.488-.489l-1.61-1.609h7.114c.382 0 .691-.31.691-.691V7.382a.346.346 0 00-.691 0V9.11H1.18L2.789 7.5a.346.346 0 10-.489-.488l-2.199 2.2z",fill:"currentColor"}))};var style$7={TaskCard:{display:"inline-block",width:"100%","& .main":{position:"relative",boxSizing:"border-box",background:"var(--sl-color-neutral-0)",border:"1px solid var(--sl-color-neutral-200)",borderRadius:"var(--sl-border-radius-medium)",boxShadow:"1px 2px 4px rgba(211, 211, 211, 0.2)",fontSize:"var(--sl-font-size-small)",lineHeight:"var(--sl-line-height-dense)",color:"var(--sl-color-neutral-600)"},"& .main.complete":{background:"var(--sl-color-primary-50)",borderColor:"var(--sl-color-primary-500)"},"& .main.expired":{color:"var(--sl-color-neutral-600)",background:"var(--sl-color-neutral-50)"},"& .title":{fontSize:"var(--sl-font-size-medium)",color:"var(--sl-color-neutral-950)"},"& .container":{margin:"var(--sl-spacing-medium)"},"& .container.subdued":{opacity:"0.45"},"& .container > div":{margin:"var(--sl-spacing-medium) 0"}},NotStarted:{fontSize:"var(--sl-font-size-small)",padding:"var(--sl-spacing-medium)",color:"var(--sl-color-primary-600)",border:"1px solid var(--sl-color-neutral-200)",borderRadius:"var(--sl-border-radius-medium) var(--sl-border-radius-medium) 0 0",borderBottom:"none",background:"var(--sl-color-primary-50)",fontWeight:"var(--sl-font-weight-semibold)",lineHeight:"var(--sl-line-height-dense)","& .icon":{position:"relative",top:"0.1em",marginRight:"var(--sl-spacing-small)",color:"var(--sl-color-primary-500)"}},Ended:{fontSize:"var(--sl-font-size-small)",padding:"var(--sl-spacing-medium)",color:"var(--sl-color-warning-600)",border:"1px solid var(--sl-color-neutral-200)",borderRadius:"var(--sl-border-radius-medium) var(--sl-border-radius-medium) 0 0",borderBottom:"none",background:"var(--sl-color-warning-50)",fontWeight:"var(--sl-font-weight-semibold)",lineHeight:"var(--sl-line-height-dense)","& .icon":{position:"relative",top:"0.1em",marginRight:"var(--sl-spacing-small)",color:"var(--sl-color-warning-500)"}},Header:{display:"flex","& .icon":{position:"relative",top:"5%",alignSelf:"center",lineHeight:"0",color:"var(--sl-color-primary-400)",fontSize:"var(--sl-font-size-large)",marginRight:"var(--sl-spacing-x-small)"},"& .value":{alignSelf:"center",fontSize:"var(--sl-font-size-x-large)",fontWeight:"var(--sl-font-weight-semibold)",color:"var(--sl-color-neutral-950)",lineHeight:"100%",marginRight:"var(--sl-spacing-xx-small)"},"& .text":{alignSelf:"end",textTransform:"uppercase",fontSize:"var(--sl-font-size-x-small)",color:"var(--sl-color-neutral-950)",lineHeight:"var(--sl-font-size-medium)",marginRight:"var(--sl-spacing-xx-small)"},"& .end":{color:"var(--sl-color-warning-500)",fontWeight:"var(--sl-font-weight-semibold)",marginBottom:"var(--sl-spacing-xx-small)"},"& .neutral":{color:"var(--sl-color-neutral-400)"}},Footer:{display:"flex","& .icon":{fontSize:"var(--sl-font-size-xx-small)",marginRight:"var(--sl-spacing-xx-small)",verticalAlign:"middle"},"& .text":{marginTop:"auto",verticalAlign:"text-bottom",fontSize:"var(--sl-font-size-x-small)",color:"var(--sl-color-neutral-400)"},"& .success":{color:"var(--sl-color-primary-500)",fontWeight:"var(--sl-font-weight-semibold)"},"& .action":{marginTop:"auto",marginLeft:"auto","&::part(base)":{color:"var(--sl-color-neutral-0)",borderRadius:"var(--sl-border-radius-medium)"},"&.disabled::part(base)":{border:"1px solid var(--sl-color-primary-400)",background:"var(--sl-color-primary-400)"},"&.neutral::part(base)":{border:"1px solid var(--sl-color-neutral-400)",background:"var(--sl-color-neutral-400)"}},"& .neutral":{color:"var(--sl-color-neutral-400)"},"& .datetime":{display:"block",marginTop:"var(--sl-spacing-xx-small)",color:"var(--sl-color-neutral-400)"}}};var sheet$7=createStyleSheet(style$7);var styleString$7=sheet$7.toString();function TaskCardView(e){var t,a,r;console.log("TASK CARD PROPS "+((t=e===null||e===void 0?void 0:e.content)===null||t===void 0?void 0:t.cardTitle));console.log({props:e});var s=e.callbacks,i=e.states,l=e.content;var n=l.showExpiry&&luxon.DateTime.fromISO(l.rewardDuration.split("/")[0]);var o=l.showExpiry&&luxon.DateTime.fromISO(l.rewardDuration.split("/")[1]);var d=luxon.DateTime.now();if(l.displayDuration){var c=(a=l.displayDuration.split("/"))===null||a===void 0?void 0:a[0];var u=(r=l.displayDuration.split("/"))===null||r===void 0?void 0:r[1];var p=c?luxon.DateTime.fromISO(c):d;var v=u?luxon.DateTime.fromISO(u):d;console.log({displayDateStart:p,dateToday:d,displayDateEnd:v});if(d<p||d>v)return h("span",null)}var g=checkmark_circle();var m=checkmark_filled();var f=arrow_left_right();var x=i.progress>=l.goal;var b=l.showProgressBar?Math.floor(i.progress/l.goal):i.progress;var y=x&&l.repeatable===false||l.finite&&i.progress>=l.finite*l.goal;var w=l.showExpiry&&o<=d;var S=l.showExpiry&&d<=n;var k=w||S;var _="\n\t:host{\n\t\tdisplay: block;\n\t\tmargin-bottom: var(--sl-spacing-large);\n\t}\n ";return h("div",{class:sheet$7.classes.TaskCard},h("style",{type:"text/css"},styleString$7,_),!i.loading&&S&&h("div",{class:sheet$7.classes.NotStarted},h("span",{class:"icon"},h("sl-icon",{name:"info-circle-fill"})),intl.formatMessage({id:"startsOnMessage",defaultMessage:l.startsOnMessage},{startDate:n.setLocale(luxonLocale(i.locale)).toLocaleString(luxon.DateTime.DATETIME_MED)})),!i.loading&&w&&h("div",{class:sheet$7.classes.Ended},h("span",{class:"icon"},h("sl-icon",{name:"exclamation-triangle-fill"})),intl.formatMessage({id:"endedMessage",defaultMessage:l.endedMessage},{endDate:o.setLocale(luxonLocale(i.locale)).toLocaleString(luxon.DateTime.DATETIME_MED)})),h("div",{style:{borderRadius:k&&"0 0 var(--sl-border-radius-medium) var(--sl-border-radius-medium)"},class:k?"main expired":y?"main complete":"main"},h("div",{class:y||k?"container subdued":"container"},h("div",{class:sheet$7.classes.Header},i.loading?h("sl-skeleton",{style:{width:"22%",margin:"0"}}):h("div",null,x&&h("span",{class:k?"icon neutral":"icon"},y?m:g),h("span",{class:"value"},l.rewardAmount),h("span",{class:"text"},l.rewardUnit))),i.loading?h("sl-skeleton",{style:{width:"42%",margin:"var(--sl-spacing-medium) 0"}}):h("div",{class:"title",style:{marginBottom:!l.description?l.steps?"var(--sl-spacing-x-large)":l.showProgressBar?"var(--sl-spacing-xx-large)":"":""}},l.cardTitle),i.loading?h("sl-skeleton",{style:{margin:"var(--sl-spacing-medium) 0"}}):l.description&&h(Details,Object.assign({},e)),l.showProgressBar&&i.loading?h("sl-skeleton",{style:{margin:"var(--sl-spacing-medium) 0"}}):l.showProgressBar&&h(ProgressBarView,Object.assign({},e.content,e.states,{complete:y,expired:k})),h("div",{class:sheet$7.classes.Footer},i.loading?h("sl-skeleton",{style:{width:"25%",marginLeft:"auto"}}):h("div",{style:{display:"contents"}},h("span",{class:"text"},l.repeatable&&h("div",null,h("span",{class:b>0?k?"icon neutral":"icon success":"icon"},f),h("span",{class:b>0?k?"neutral":"success":""},intl.formatMessage({id:"completedMessage",defaultMessage:l.completedText},{finite:l.finite,count:l.finite?Math.min(b,l.finite):b}))),l.showExpiry&&!k&&h("span",{class:"datetime"},intl.formatMessage({id:"expiryMessage",defaultMessage:l.expiryMessage},{endDate:o.setLocale(luxonLocale(i.locale)).toLocaleString(luxon.DateTime.DATETIME_MED)}))),h("sl-button",{class:k?"action neutral":y?"action disabled":"action",type:"primary",size:"small",onClick:s.onClick,loading:i.loadingEvent,disabled:y||k},l.buttonText))))))}function ReferralIframeView(e){var t=e.states,a=e.data;var r=t.content;var s={Container:{position:"relative",width:r.iframeWidth,height:r.iframeHeight},IFrame:{position:"absolute",width:"100%",height:"100%",border:"0",top:"0",left:"0",right:"0"}};var i=createStyleSheet(s);var l=i.toString();return h("div",{class:i.classes.Container},h("style",{type:"text/css"},l),h("iframe",{class:i.classes.IFrame,src:r.iframeSrc+"?rsCode="+a.shareCode}))}var CheckMark=function(){return h("svg",{width:12,height:10,fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.58.23c.475.371.56 1.057.19 1.532L5.69 9.554a1.091 1.091 0 0 1-1.631.1L.32 5.915a1.09 1.09 0 1 1 1.542-1.542L4.73 7.239 10.049.42A1.09 1.09 0 0 1 11.58.23Z",fill:"#fff"}))};var CheckmarkFilled=function(){return h("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M0 9C0 4.02944 4.02944 0 9 0C13.9706 0 18 4.02944 18 9C18 13.9706 13.9706 18 9 18C4.02944 18 0 13.9706 0 9Z",fill:"currentColor"}),h("path",{d:"M5.68394 8.77046C5.28103 8.39273 4.64819 8.41315 4.27046 8.81606C3.89273 9.21897 3.91315 9.85181 4.31606 10.2295L5.68394 8.77046ZM7.66667 12L6.98273 12.7295C7.36738 13.0902 7.96595 13.0902 8.35061 12.7295L7.66667 12ZM13.6839 7.72954C14.0869 7.35181 14.1073 6.71897 13.7295 6.31606C13.3518 5.91315 12.719 5.89273 12.3161 6.27046L13.6839 7.72954ZM4.31606 10.2295L6.98273 12.7295L8.35061 11.2705L5.68394 8.77046L4.31606 10.2295ZM8.35061 12.7295L13.6839 7.72954L12.3161 6.27046L6.98273 11.2705L8.35061 12.7295Z",fill:"white"}))};var Gift$1=function(){return h("svg",{width:156,height:157,fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M40.18 126h83.663a3 3 0 0 0 3-3V73.966a3 3 0 0 0-3-3H40.18a3 3 0 0 0-3 3V123a3 3 0 0 0 3 3Z",fill:"#FFD34F"}),h("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M37.18 73.862v7.966h89.663v-7.966H37.18Z",fill:"#E9BB30"}),h("path",{d:"M133.039 74.224a2.18 2.18 0 0 0 2.187-2.172v-19.19c0-1.2-.98-2.172-2.187-2.172H31.347a2.18 2.18 0 0 0-2.187 2.172v19.19c0 1.2.98 2.172 2.187 2.172H133.04Z",fill:"#FFC000"}),h("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M123.287 35.172c0 6.056-9.155 15.226-13.76 15.654H88.888V126H75.141V50.826H58.534c-9.462-2.038-17.803-9.258-17.803-16.944 0-7.49 3.274-13.422 9.23-15.983 5.693-2.446 12.265-1.105 17.46 2.479 6.378 4.398 9.956 12.654 13.202 20.144.284.657.567 1.308.848 1.95.274-.608.55-1.228.83-1.856 3.216-7.22 6.887-15.464 13.057-19.89 5.454-3.913 12.387-5.39 18.38-2.711 6.197 2.77 9.549 9.127 9.549 17.157Zm-23.306-8.266c3.305-2.37 7.262-2.8 10.645 0 2.946 2.44 3.103 3.588 3.482 6.351l.067.483c0 4.09-3.549 10.252-7.097 10.252-2.515 0-4.489-.022-6.34-.041-3.375-.036-6.337-.068-11.403.04.966-1.86 1.737-3.644 2.473-5.346 1.967-4.553 3.678-8.515 8.173-11.739Zm-39.034 0c-1.6-1.103-5.268-.61-6.79.043-1.257.54-3.134 2.19-3.134 6.933 0 4.61 7.511 8.59 7.511 8.59s5.962 1.52 16.607 1.52c-3.624-8.922-8.757-13.336-14.194-17.086Z",fill:"#EB5757"}),h("path",{d:"M75.086 74.224h13.85v7.604h-13.85v-7.604Z",fill:"#DD4747"}),h("g",{filter:"url(#a)"},h("ellipse",{cx:82.008,cy:141.207,rx:36.813,ry:5.793,fill:"#E0DDDD","fill-opacity":.8})),h("path",{d:"M150.446 79.134a.5.5 0 0 1 .9 0l1.133 2.336c.05.102.132.184.234.233l2.344 1.122a.5.5 0 0 1 0 .902l-2.344 1.122a.503.503 0 0 0-.234.233l-1.133 2.336a.5.5 0 0 1-.9 0l-1.134-2.336a.499.499 0 0 0-.234-.233l-2.343-1.122a.5.5 0 0 1 0-.902l2.343-1.122a.499.499 0 0 0 .234-.233l1.134-2.336Z",fill:"#FAB6B6"}),h("path",{d:"M14.86 29.168a.5.5 0 0 1 .9 0l1.133 2.336a.5.5 0 0 0 .234.233l2.344 1.122a.5.5 0 0 1 0 .902l-2.344 1.122a.5.5 0 0 0-.234.233l-1.133 2.336a.5.5 0 0 1-.9 0l-1.134-2.336a.5.5 0 0 0-.234-.233l-2.343-1.122a.5.5 0 0 1 0-.902l2.344-1.122a.5.5 0 0 0 .233-.233l1.134-2.336Z",fill:"#F4EFBC"}),h("path",{d:"m125.382 0 .712 1.466 1.475.706-1.475.707-.712 1.466-.711-1.466-1.476-.707 1.476-.706.711-1.466Z",fill:"#FDA802"}),h("path",{d:"m2.187 103.552.711 1.466 1.476.706-1.476.707-.711 1.466-.711-1.466L0 105.724l1.476-.706.71-1.466Z",fill:"#E4599C"}),h("defs",null,h("filter",{id:"a",x:35.195,y:125.414,width:93.625,height:31.586,filterUnits:"userSpaceOnUse","color-interpolation-filters":"s-rGB"},h("feFlood",{"flood-opacity":0,result:"BackgroundImageFix"}),h("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),h("feGaussianBlur",{stdDeviation:5,result:"effect1_foregroundBlur_653_17907"}))))};function Dot(e){var t=e.active,a=e.completed,r=e.incomplete,s=e.stage;return h("div",{style:{display:"flex"}},h("div",{style:{backgroundColor:a?"var(--sl-color-success-500)":r?"var(--sl-color-neutral-200)":"var(--sl-color-neutral-0)",border:t?"1px solid var(--sl-color-success-500)":r?"1px solid var(--sl-color-neutral-200)":"1px solid var(--sl-color-success-500)",borderRadius:"50%",width:"23px",height:"23px",margin:"-11px",zIndex:"1",boxSizing:"content-box"}},a?h("div",{style:{top:"-10.5%",left:"23.5%",position:"relative"}},h(CheckMark,null)):h("div",{style:{color:t?"var(--sl-color-success-500)":"var(--sl-color-neutral-50)",width:"23px",lineHeight:"24px",textAlign:"center",position:"relative"}},s+1)))}function ProgressLine(e){var t=e.incomplete,a=t===void 0?false:t,r=e.active,s=r===void 0?false:r,i=e.invisible,l=i===void 0?false:i;return h("div",{style:{content:"''",flex:"0.5 0.5 0",height:"4px",borderRadius:"4px",background:a||s?"var(--sl-color-neutral-200)":"var(--sl-color-success-500)",position:"relative",bottom:"0",left:"0",display:"flex",justifyContent:"center",columnGap:"50px",marginRight:"-2px",boxSizing:"content-box",opacity:l?"0":"1"}})}function Progress(e){var t=e.active,a=e.completed,r=e.incomplete,s=e.stage;return[h(ProgressLine,{incomplete:r,invisible:s===0}),h(Dot,{active:t,completed:a,incomplete:r,stage:s}),h(ProgressLine,{incomplete:r,active:t,invisible:s===2})]}function ProgressBar(e){var t=e.stageCount,a=e.currentStage;return h("div",{style:{display:"flex",columnGap:"-2px"}},Array.from(Array(t).keys()).map((function(e){return h(Progress,{active:a===e,completed:a>e,incomplete:a<e,stage:e})})))}var stageList=["chooseReward","chooseAmount","confirmation","success"];function RewardExchangeView(e){var t=e.states,a=e.data,r=e.callbacks,s=e.refs;var i=t.selectedItem,l=t.selectedStep;var n={chooseReward:t.content.text.chooseRewardTitle,chooseAmount:t.content.text.chooseAmountTitle,confirmation:t.content.text.confirmationTitle};var o={HostBlock:HostBlock,Container:{minWidth:"300px",position:"relative"},FullImage:{objectFit:"contain",maxWidth:"100%",height:"250px",display:"flex",margin:"0 auto"},Select:{"&::part(label)":{color:"var(--sl-color-primary-500)"},"&::part(menu)":{maxHeight:"50vh"},"& sl-menu-item::part(checked-icon)":{top:"8px"},"& sl-menu-item::part(base)":{flexDirection:"column"},"& sl-menu-item::part(base):focus":{background:"transparent",color:"var(--sl-color-gray-700)"}},ProgressBar:{maxWidth:"350px",width:"100%",margin:"auto",marginBottom:"var(--sl-spacing-xxx-large)","& .text-area":{marginTop:"5px",display:"flex",justifyContent:"center",textAlign:"center",whiteSpace:"nowrap",marginBottom:"6px","& .text":{marginBottom:"var(--sl-spacing-x-small)",flex:"1 1 0"},"& .text.subdued":{color:"var(--sl-color-neutral-200)"}}},CardLayout:{display:"flex",width:"100%",borderRadius:"3px",background:"rgba(0, 0, 0, 0)"},Card:{display:"flex",userSelect:"none",height:"120px","&::part(base)":{boxShadow:"none",width:"100%"},"&::part(body)":{display:"flex",padding:0},"& .selected":{position:"relative",top:"-2%",left:"100%",color:"var(--sl-color-primary-500)",margin:"-9px"}},Image:{padding:"var(--sl-spacing-small)",minWidth:"96px",maxWidth:"96px","& .image":{width:"100%",height:"100%",objectFit:"contain",borderRadius:"4px"},"& .image.subdued":{filter:"brightness(0.95)",opacity:"0.5"}},Square:{width:"120px",height:"118px",borderRadius:"3px 0 0 3px","& .image":{width:"100%",height:"100%",objectFit:"contain",borderRadius:"inherit"}},TextArea:{textAlign:"left",padding:"var(--sl-spacing-small)",paddingLeft:"0","& .title":{fontSize:"var(--sl-font-size-medium)",lineHeight:"var(--sl-line-height-dense)",fontWeight:"600",color:"var(--sl-color-neutral-1000)",display:"-webkit-box","-webkit-line-clamp":"1","-webkit-box-orient":"vertical",overflow:"hidden"},"& .amount":{fontSize:"var(--sl-font-size-small)",lineHeight:"var(--sl-line-height-dense)",marginTop:"var(--sl-spacing-x-small)",color:"var(--sl-color-neutral-500)",display:"-webkit-box","-webkit-line-clamp":"1","-webkit-box-orient":"vertical",overflow:"hidden"},"& .error":{fontSize:"var(--sl-font-size-small)",lineHeight:"var(--sl-line-height-dense)",marginTop:"var(--sl-spacing-x-small)",fontWeight:"600",color:"var(--sl-color-warning-600)",display:"-webkit-box","-webkit-line-clamp":"1","-webkit-box-orient":"vertical",overflow:"hidden","& .icon":{position:"relative",top:"0.1em",marginRight:"var(--sl-spacing-xx-small)"}}},ChooseAmount:{display:"flex",alignItems:"center",justifyContent:"center",margin:"var(--sl-spacing-medium) 0","& .wrapper":{display:"flex",justifyContent:"center",alignItems:"center",gap:"var(--sl-spacing-xx-large)","@media (max-width: 799px)":{flexDirection:"column"}},"& .image":{width:"50%",objectFit:"contain",maxWidth:"100%",height:"250px",display:"flex","@media (max-width: 799px)":{width:"auto"}},"& .text":{width:"50%",maxWidth:"400px","@media (max-width: 799px)":{width:"auto",margin:"auto"}},"& .title":{fontSize:"var(--sl-font-size-large)",fontWeight:"var(--sl-font-weight-semibold)",color:"var(--sl-color-neutral-1000)"},"& .points":{fontSize:"var(--sl-font-size-large)",fontWeight:"var(--sl-font-weight-semibold)",color:"var(--sl-color-primary-500)"},"& .description":{fontSize:"var(--sl-font-size-medium)",fontWeight:"var(--sl-font-weight-normal)",color:"var(--sl-color-neutral-500)",margin:"var(--sl-spacing-medium) 0",lineHeight:"var(--sl-line-height-dense)",marginTop:"var(--sl-spacing-xx-small)"},"& .space":{marginBottom:"var(--sl-spacing-xxx-large)"},"& sl-menu-item[disabled]::part(label)":{color:"var(--sl-color-neutral-200)"},"& sl-menu-item[disabled]":{"& .step-cost":{color:"var(--sl-color-neutral-200)"}}},SelectItem:{display:"flex",flexDirection:"column","& > .step-cost":{color:"var(--sl-color-neutral-400)",height:"0",marginBottom:"5px"},"& > .step-value":{margin:"0"}},Success:{textAlign:"center","& .title":{fontSize:"var(--sl-font-size-large)",fontWeight:"var(--sl-font-weight-semibold)",color:"var(--sl-color-neutral-1000)"},"& .description":{color:"var(--sl-color-neutral-400)",width:"100%",maxWidth:"350px",margin:"0 auto",lineHeight:"var(--sl-line-height-dense)",marginBottom:"var(--sl-spacing-xx-large)",marginTop:"var(--sl-spacing-xx-small)"}},Grid:{display:"grid",justifyContent:"center",gap:"20px",gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))"},Confirmation:{maxWidth:"800px",margin:"auto","& .wrapper":{display:"flex","@media (max-width: 499px)":{flexDirection:"column"}},"& .reward-item-container":{"@media (max-width: 499px)":{display:"flex",flexDirection:"row-reverse",justifyContent:"flex-end",alignItems:"center"}},"& .reward-item-container .reward-title":{paddingBottom:"var(--sl-spacing-medium)",lineHeight:"20px","@media (max-width: 499px)":{paddingBottom:"none",paddingLeft:"var(--sl-spacing-small)"}},"& .padding":{padding:"var(--sl-spacing-medium) 0","@media (max-width: 499px)":{padding:"var(--sl-spacing-small) 0"}},"& .field":{width:"30%",textTransform:"uppercase",fontSize:"var(--sl-font-size-medium)",fontWeight:"var(--sl-font-weight-normal)",color:"var(--sl-color-neutral-400)",textAlign:"left",paddingRight:"var(--sl-spacing-xxx-large)","@media (max-width: 499px)":{width:"100%",paddingRight:"0",paddingBottom:"0"}},"& .value":{fontSize:"var(--sl-font-size-large)",fontWeight:"var(--sl-font-weight-semibold)"},"& .top-border":{borderTop:"1px solid var(--sl-color-neutral-200)"},"& .image":{width:"200px","@media (max-width: 499px)":{width:"100px"}}},Button:{display:"flex",flexWrap:"wrap-reverse",margin:"var(--sl-spacing-medium) 0","& .cancel":{marginLeft:"auto",marginRight:"var(--sl-spacing-medium)","&::part(base)":{fontWeight:"var(--sl-font-weight-normal)",color:"var(--sl-color-neutral-1000)"},"@media (max-width: 499px)":{width:"100%",marginRight:"0",marginTop:"var(--sl-spacing-small)"}},"& .continue":{"&::part(base)":{background:"var(--sl-color-primary-500)",borderColor:"var(--sl-color-primary-500)",fontWeight:"var(--sl-font-weight-normal)",color:"var(--sl-color-neutral-0)"},"@media (max-width: 499px)":{width:"100%"}},"& .continue.right":{marginLeft:"auto"},"& .continue.center":{margin:"0 auto"}},Confetti:{pointerEvents:"none",position:"absolute",width:"100%",height:"100%",top:"0%",left:"0%",zIndex:"1"}};var d=createStyleSheet(o);var c=d.toString();function u(){var e,a,s;var i=t.selectedItem;if(!i||(i===null||i===void 0?void 0:i.ruleType)==="FIXED_GLOBAL_REWARD")return h("span",null,i===null||i===void 0?void 0:i.prettySourceValue);if(!((e=i.steps)===null||e===void 0?void 0:e.length)){return h("p",null,intl.formatMessage({id:"notEnoughError",defaultMessage:t.content.text.notEnoughError},{sourceUnit:i.sourceUnit}))}console.log("SELECTED ITEM ",t.selectedStep);console.log("CALLBACKS ",r);return h("sl-select",{style:{width:"auto"},label:(a=t===null||t===void 0?void 0:t.content)===null||a===void 0?void 0:a.text.selectText,class:d.classes.Select,value:t.selectedStep,"onSl-select":function(e){var t,a,s,i,l;return r.setExchangeState({amount:(s=(a=(t=e.detail)===null||t===void 0?void 0:t.item)===null||a===void 0?void 0:a.value)===null||s===void 0?void 0:s.sourceValue,selectedStep:(l=(i=e.detail)===null||i===void 0?void 0:i.item)===null||l===void 0?void 0:l.value})}},(s=i.steps)===null||s===void 0?void 0:s.map((function(e){var a,r;console.log(i.steps);return h("sl-menu-item",{value:e.prettyDestinationValue,disabled:!e.available},e.prettyDestinationValue," ",h("br",null),e.unavailableReasonCode&&h("p",{style:{fontSize:"var(--sl-font-size-small)",color:"var(--sl-color-warning-500)",margin:"0"}},intl.formatMessage({id:"unavailableCode",defaultMessage:(r=(a=t.content)===null||a===void 0?void 0:a.text)===null||r===void 0?void 0:r.notAvailableError},{unavailableReasonCode:e.unavailableReasonCode,sourceUnit:i.sourceUnit,sourceValue:e.prettySourceValue||i.prettySourceMinValue})),h("div",{class:"step-cost",slot:"suffix"},e.prettySourceValue))})))}function p(){var e;return[h("div",null,h("h2",{style:{margin:"var(--sl-spacing-large) 0"}},t.content.text.rewardTitle),t.loading?y():h("div",{class:d.classes.Grid},(e=a.exchangeList)===null||e===void 0?void 0:e.map((function(e){var a,s,l,n,o;var c={boxShadow:e.key===(i===null||i===void 0?void 0:i.key)?"0 0 0 2px var(--sl-color-primary-500)":"none",borderRadius:"4px"};return h("div",{key:e.key,style:c},h("sl-card",{class:d.classes.Card,style:{cursor:e.unavailableReasonCode?"not-allowed":"pointer"},onClick:function(){return e.available&&r.setExchangeState({selectedItem:e})}},e.key===(i===null||i===void 0?void 0:i.key)&&h("div",{class:"selected"},h(CheckmarkFilled,null)),h("div",{style:{display:"flex",width:"100%",height:"120px",borderRadius:"3px",background:e.unavailableReasonCode?"rgba(0, 0, 0, 0.05)":"rgba(0, 0, 0, 0)"}},h("div",{class:d.classes.Image,style:{opacity:e.unavailableReasonCode?"0.5":"1"}},h("img",{class:e.unavailableReasonCode?"image subdued":"image",src:(e===null||e===void 0?void 0:e.imageUrl)||getAssetPath("./assets/placeholder.png")})),h("div",{class:d.classes.TextArea,style:{opacity:e.unavailableReasonCode?"0.5":"1"}},h("div",{class:"title",style:{"-webkit-line-clamp":e.unavailableReasonCode?"1":"2"}},(a=e.name)!==null&&a!==void 0?a:""),h("div",{class:"amount",style:{"-webkit-line-clamp":e.unavailableReasonCode?"1":"2"}},intl.formatMessage({id:"sourceAmountMessage",defaultMessage:(l=(s=t.content)===null||s===void 0?void 0:s.text)===null||l===void 0?void 0:l.sourceAmountMessage},{ruleType:e.ruleType,sourceValue:e.prettySourceValue,sourceMinValue:e.prettySourceMinValue,sourceMaxValue:e.prettySourceMaxValue})),e.unavailableReasonCode&&h("div",{class:"error"},h("sl-icon",{class:"icon",name:"exclamation-triangle-fill"}),intl.formatMessage({id:"unavailableCode",defaultMessage:(o=(n=t.content)===null||n===void 0?void 0:n.text)===null||o===void 0?void 0:o.notAvailableError},{unavailableReasonCode:e.unavailableReasonCode,sourceUnit:e.sourceUnit,sourceValue:e.prettySourceValue||e.prettySourceMinValue}))))))}))),h("div",{class:d.classes.Button},h("sl-button",{class:"continue right",size:"large",onClick:function(){return r.setStage("chooseAmount")},loading:t.loading,disabled:!t.selectedItem},t.content.text.continueText)))]}function v(){var e,a,s,l;var n=u();var o=((e=t.selectedItem)===null||e===void 0?void 0:e.ruleType)==="FIXED_GLOBAL_REWARD"?false:n&&!t.amount;return h("div",null,h("div",{class:d.classes.ChooseAmount},h("div",{class:"wrapper"},h("img",{class:"image",src:(i===null||i===void 0?void 0:i.imageUrl)||getAssetPath("./assets/placeholder.png")}),h("div",{class:"text"},h("div",{class:"title"},(a=i===null||i===void 0?void 0:i.name)!==null&&a!==void 0?a:""),((s=t.selectedItem)===null||s===void 0?void 0:s.ruleType)==="FIXED_GLOBAL_REWARD"?h("div",{class:"points"},n):h("div",{class:"description"},i===null||i===void 0?void 0:i.description),((l=t.selectedItem)===null||l===void 0?void 0:l.ruleType)==="FIXED_GLOBAL_REWARD"?h("div",{class:"description"},i===null||i===void 0?void 0:i.description):h("div",{class:"points"},n),h("div",{class:"space"}),h("div",{class:d.classes.Button},h("sl-button",{class:"cancel",size:"large",type:"text",onClick:function(){return r.resetState()}},t.content.text.cancelText),h("sl-button",{class:"continue",size:"large",onClick:function(){return r.setStage("confirmation")},disabled:o},t.content.text.continueToConfirmationText))))))}function g(){console.log(i);console.log(l);var e=(l===null||l===void 0?void 0:l.prettySourceValue)||i.prettySourceValue;var a=l===null||l===void 0?void 0:l.prettyDestinationValue;return h("div",null,h("h2",{style:{margin:"var(--sl-spacing-large) 0",textAlign:"center"}},t.content.text.redeemTitle),h("div",{class:d.classes.Confirmation},h("div",{class:"wrapper"},h("div",{class:"field"},t.content.text.rewardNameTitle),h("div",{class:"reward-item-container"},h("div",{class:"reward-title"},i.name),h("img",{class:"image",src:(i===null||i===void 0?void 0:i.imageUrl)||getAssetPath("./assets/placeholder.png")}))),h("div",{class:"wrapper padding"},h("div",{class:"field"})),a&&h("div",{class:"wrapper top-border padding"},h("div",{class:"field"},t.content.text.rewardAmountTitle),h("div",null,a)),h("div",{class:"wrapper top-border padding"},h("div",{class:"field"},t.content.text.costTitle),h("div",{class:"value"},e)),h("div",{class:d.classes.Button},h("sl-button",{class:"cancel",type:"text",size:"large",onClick:function(){return r.setStage("chooseAmount")}},t.content.text.backText),h("sl-button",{class:"continue",size:"large",loading:t.loading,onClick:r.exchangeReward},t.content.text.redeemText))))}function m(){var e,s,i,l,n;console.log("success");return h("div",{class:d.classes.Success},h(Gift$1,null),h(k,null),h("div",{class:"title"},t.content.text.rewardRedeemedText),h("div",{class:"description"},intl.formatMessage({id:"successMessage",defaultMessage:t.content.text.redemptionSuccessText},{sourceValue:(e=t.selectedItem.prettySourceValue)!==null&&e!==void 0?e:(s=t.selectedStep)===null||s===void 0?void 0:s.prettySourceValue,destinationValue:((i=t.selectedStep)===null||i===void 0?void 0:i.prettyDestinationValue)||((l=t.selectedItem)===null||l===void 0?void 0:l.name)||t.selectedItem.globalRewardKey})),(a===null||a===void 0?void 0:a.fuelTankCode)&&h("div",{style:{width:"40%",margin:"-30px auto var(--sl-spacing-xxx-large) auto",textAlign:"left",color:"var(--sl-color-neutral-700)"}},t.content.text.promoCode,h(ShareLinkView,{shareString:a.fuelTankCode,tooltiptext:(n=t===null||t===void 0?void 0:t.content)===null||n===void 0?void 0:n.text.toopTipText,open:t.open,onClick:r.copyFuelTankCode})),h("div",{class:d.classes.Button},h("sl-button",{class:"continue center",type:"primary",size:"large",onClick:function(){return r.resetState(true)}},t.content.text.doneText)))}var f={chooseReward:function(){return p()},chooseAmount:function(){return v()},confirmation:function(){return g()},success:function(){return m()}};var x=f[t.redeemStage];function b(){var e=stageList.indexOf(t.redeemStage);return h("div",{class:d.classes.ProgressBar},h("div",{class:"text-area"},Object.keys(n).map((function(t){if(stageList.indexOf(t)<=e){return h("span",{class:"text"},n[t])}else{return h("span",{class:"text subdued"},n[t])}}))),h(ProgressBar,{stageCount:3,currentStage:e}))}function y(){return h("div",{class:d.classes.Grid},__spreadArrays(Array(t.content.text.skeletonCardNum)).map((function(){return h("div",null,h("sl-card",{class:d.classes.Card},h("div",{class:d.classes.CardLayout},h("div",null,h("sl-skeleton",{style:{width:"100px",height:"100px",margin:"9px","--border-radius":"4px"}})),h("div",{style:{margin:"var(--sl-spacing-small) var(--sl-spacing-small) 0 0",width:"100%"}},h("sl-skeleton",{style:{marginBottom:"var(--sl-spacing-small)"}}),h("sl-skeleton",{style:{marginBottom:"var(--sl-spacing-small)"}}),h("sl-skeleton",{style:{width:"45%"}})))))})))}function w(){return h("sl-alert",{type:"danger",open:true},h("sl-icon",{slot:"icon",name:"exclamation-octagon"}),t.content.text.redemptionError)}function S(){return h("sl-alert",{type:"danger",open:true},h("sl-icon",{slot:"icon",name:"exclamation-octagon"}),t.content.text.queryError)}function k(){return h("canvas",{ref:function(e){if(!(s===null||s===void 0?void 0:s.canvasRef))return;s.canvasRef.current=e},id:"my-canvas",class:d.classes.Confetti})}return h("div",{class:d.classes.Container},h("style",{type:"text/css"},c),h("div",null,console.log(e),b(),t.exchangeError&&w(),t.queryError&&S(),x&&x(),t.redeemStage==="success"))}function CardFeedView(e,t){var a={Container:{columnGap:e.gap+"px",columnWidth:e.width+"px","& > div":{marginBottom:"24px"}}};var r=createStyleSheet(a);var s=r.toString();console.log(e);var i="\n :host{\n display: block; \n }\n\n ";return h("div",null,h("style",{type:"text/css"},s,i),h("div",{class:r.classes.Container},t))}function t(e,t,a){return Math.min(Math.max(e,a),t)}var n=function(e){__extends(t,e);function t(t){return e.call(this,'Failed to parse color: "'+t+'"')||this}return t}(Error);function r(e){if("string"!=typeof e)throw new n(e);if("transparent"===e.trim().toLowerCase())return[0,0,0,0];var r=e.trim();r=u.test(e)?function(e){var t=e.toLowerCase().trim(),a=o[function(e){var t=5381,a=e.length;for(;a;)t=33*t^e.charCodeAt(--a);return(t>>>0)%2341}(t)];if(!a)throw new n(e);return"#"+a}(e):e;var d=s.exec(r);if(d){var p=Array.from(d).slice(1);return __spreadArrays(p.slice(0,3).map((function(e){return parseInt(_(e,2),16)})),[parseInt(_(p[3]||"f",2),16)/255])}var h=i.exec(r);if(h){var v=Array.from(h).slice(1);return __spreadArrays(v.slice(0,3).map((function(e){return parseInt(e,16)})),[parseInt(v[3]||"ff",16)/255])}var g=a.exec(r);if(g){var m=Array.from(g).slice(1);return __spreadArrays(m.slice(0,3).map((function(e){return parseInt(e,10)})),[parseFloat(m[3]||"1")])}var f=c.exec(r);if(f){var x=Array.from(f).slice(1).map(parseFloat),b=x[0],y=x[1],w=x[2],S=x[3];if(t(0,100,y)!==y)throw new n(e);if(t(0,100,w)!==w)throw new n(e);return __spreadArrays(l(b,y,w),[S||1])}throw new n(e)}var e=function(e){return parseInt(e.replace(/_/g,""),36)},o="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((function(t,a){var r=e(a.substring(0,3)),s=e(a.substring(3)).toString(16);var i="";for(var l=0;l<6-s.length;l++)i+="0";return t[r]=""+i+s,t}),{}),_=function(e,t){return Array.from(Array(t)).map((function(){return e})).join("")},s=new RegExp("^#"+_("([a-f0-9])",3)+"([a-f0-9])?$","i"),i=new RegExp("^#"+_("([a-f0-9]{2})",3)+"([a-f0-9]{2})?$","i"),a=new RegExp("^rgba?\\(\\s*(\\d+)\\s*"+_(",\\s*(\\d+)\\s*",2)+"(?:,\\s*([\\d.]+))?\\s*\\)$","i"),c=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,u=/^[a-z]+$/i,f=function(e){return Math.round(255*e)},l=function(e,t,a){var r=a/100;if(0===t)return[r,r,r].map(f);var s=(e%360+360)%360/60,i=(1-Math.abs(2*r-1))*(t/100),l=i*(1-Math.abs(s%2-1));var n=0,o=0,d=0;s>=0&&s<1?(n=i,o=l):s>=1&&s<2?(n=l,o=i):s>=2&&s<3?(o=i,d=l):s>=3&&s<4?(o=l,d=i):s>=4&&s<5?(n=l,d=i):s>=5&&s<6&&(n=i,d=l);var c=r-i/2;return[n+c,o+c,d+c].map(f)};function p(e){var t=r(e).map((function(e,t){return 3===t?e:e/255})),a=t[0],s=t[1],i=t[2],l=t[3],n=Math.max(a,s,i),o=Math.min(a,s,i),d=(n+o)/2;if(n===o)return[0,0,d,l];var c=n-o;return[60*(a===n?(s-i)/c+(s<i?6:0):s===n?(i-a)/c+2:(a-s)/c+4),d>.5?c/(2-n-o):c/(n+o),d,l]}function z(e,a,r,s){return"hsla("+(e%360).toFixed()+", "+t(0,100,100*a).toFixed()+"%, "+t(0,100,100*r).toFixed()+"%, "+parseFloat(t(0,1,s).toFixed(3))+")"}var colorScale=[50,100,200,300,400,500,600,700,800,900,950];var lScale=[.95,.86,.76,.66,.56,.46,.39,.32,.25,.18,.15];var hslaRegex=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i;function niceParseToHsla(e){var a=e.trim();var r=hslaRegex.exec(a);if(r){var s=Array.from(r).slice(1).map(parseFloat),i=s[0],l=s[1],o=s[2],d=s[3];if(t(0,100,l)!==l)throw new n(e);if(t(0,100,o)!==o)throw new n(e);return[i,l/100,o,d||1]}return p(e)}function generateScale(e,t){if(t===void 0){t="primary"}var a=niceParseToHsla(e),r=a[0],s=a[1],i=a[2],l=a[3];return lScale.map((function(e){return z(r,s,e,l)})).map((function(e,a){return"--sl-color-"+t+"-"+colorScale[a]+": "+e+";\n"}))}function autoColorScaleCss(e,t){if(t===void 0){t="primary"}return generateScale(e,t).join("\n")}var map=new Map;function withShadowView(e){var t=getElement(e);var a=e["render"].bind(e);var r=function(){var e=t.getAttribute("stencilbook-shadow-view");if(e){var r=map.get(e);if(r){return r}}return a()};e["render"]=r}var ShadowViewAddon=function(e,t){var a=e.story;var r;var s=(r=a.parent.parameters)===null||r===void 0?void 0:r.tagname;if(!s)return t;var i=Math.round(Math.random()*1e5);map.set(i+"",t);var l="stencilbook-shawdow-view-"+i;return h(l,null,h(s,{"stencilbook-shadow-view":i}))};export{CardFeedView as C,EditProfileView as E,LeaderboardView as L,PortalFrameView as P,ReferralIframeView as R,ShareButtonView as S,TaskCardView as T,ShareLinkView as a,useShareButton as b,PortalChangePasswordView as c,PortalLoginView as d,PortalRegisterView as e,ProgressBarView as f,RewardExchangeView as g,autoColorScaleCss as h,ShadowViewAddon as i,useShareLink as u,withShadowView as w};var templateObject_1,templateObject_2,templateObject_3;
|