@platform-x/hcltechx-mfe-wrapper 1.0.16 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/{ArticleVodListComponent-DKUN3thC.mjs → ArticleVodListComponent-BhC9fcBK.mjs} +2 -2
  2. package/ChallengeDetailComponent-a2-1SXW4.mjs +130 -0
  3. package/{ChallengeSliderComponent-CeD1p3L6.mjs → ChallengeSliderComponent-Rs05SYDh.mjs} +3 -3
  4. package/{CommonContentComponent-DPPrx3bD.mjs → CommonContentComponent-DMYED0gU.mjs} +27 -32
  5. package/{DailyMotion-fLexJPDN.mjs → DailyMotion-_hNQmRIk.mjs} +4 -4
  6. package/{EngagementHomeComponent-BNU8QZsQ.mjs → EngagementHomeComponent-BdOJMzso.mjs} +5 -4
  7. package/{EventDetailComponent-Dbdse5St.mjs → EventDetailComponent-Dv5P99jT.mjs} +8 -8
  8. package/EventListComponent-Dchsfqzz.mjs +82 -0
  9. package/{Facebook-B5dHT-pV.mjs → Facebook-Brr6zTj8.mjs} +4 -4
  10. package/{FilePlayer-DvM19mlx.mjs → FilePlayer-hyVP7MCn.mjs} +11 -11
  11. package/{IndividualChallengeComponent-CS58zTFF.mjs → IndividualChallengeComponent-B_T7b3Ur.mjs} +56 -51
  12. package/{Kaltura-D6RVtBip.mjs → Kaltura-Dm0iFq0_.mjs} +5 -5
  13. package/Mapping-jqmNMEpL.mjs +31 -0
  14. package/{Mixcloud-CAXby0Wn.mjs → Mixcloud-BxCqkqBI.mjs} +5 -5
  15. package/{Mux-mczERHRU.mjs → Mux-EuvXxP57.mjs} +7 -7
  16. package/PageComponent-rF8u6X9M.mjs +97 -0
  17. package/{Preview-DovVCnK6.mjs → Preview-Cn_VJga7.mjs} +6 -6
  18. package/{RecentCarousel-C_fm1uG1.mjs → RecentCarousel-CTKvh3_T.mjs} +17 -17
  19. package/{Share-CuYAlNkA.mjs → Share-vHOqy5cA.mjs} +538 -663
  20. package/{SoundCloud-YLqZjHKm.mjs → SoundCloud-BXf1CmYj.mjs} +2 -2
  21. package/{Streamable-BGnFDdbJ.mjs → Streamable-CRhFsgCM.mjs} +7 -7
  22. package/ToggleButton-BjTEhXO6.mjs +60508 -0
  23. package/{Twitch-FDSz8d9g.mjs → Twitch-C8vuPU3L.mjs} +4 -4
  24. package/{Vidyard-DoM-iNK7.mjs → Vidyard-BI-z_7aH.mjs} +14 -14
  25. package/{Vimeo-BAZx0mgo.mjs → Vimeo-Cg66sfnT.mjs} +2 -2
  26. package/{Wistia-D0CtAbcg.mjs → Wistia-CFM3uvZW.mjs} +5 -5
  27. package/{YouTube-AKeQPHRd.mjs → YouTube-HRwM8_Rt.mjs} +4 -4
  28. package/{index-BW7MAuY_.mjs → index-BBX-vK5Q.mjs} +1502 -1550
  29. package/index-JLQT9i3x.mjs +62 -0
  30. package/index.mjs +1 -1
  31. package/lib/Pages/PageComponent.d.ts +2 -0
  32. package/lib/Pages/PrelemBuilder.d.ts +8 -0
  33. package/lib/services/fetchQueries.d.ts +1 -1
  34. package/lib/utils/Mapping.d.ts +20 -0
  35. package/lib/utils/componentMapping.d.ts +1 -0
  36. package/lib/utils/constants.d.ts +24 -0
  37. package/lib/utils/helper.d.ts +34 -0
  38. package/{mutateApi-UtIkY8_8.mjs → mutateApi-C3NgPEmY.mjs} +1 -1
  39. package/package.json +1 -1
  40. package/style.css +1 -1
  41. package/ChallengeDetailComponent-C6lsSLpA.mjs +0 -107
  42. package/EventList-BYF03nEh.mjs +0 -220136
  43. package/EventListComponent-BJ3sTQ_I.mjs +0 -79
  44. package/index-B0kXOAse.mjs +0 -19
  45. package/lib/Components/EventDetails/EventDetailComponent.d.ts +0 -1
  46. package/lib/Components/EventDetails/index.d.ts +0 -2
  47. package/lib/Components/EventList/EventListComponent.d.ts +0 -2
  48. package/lib/Components/EventList/index.d.ts +0 -2
@@ -1,7 +1,7 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { b as p } from "./EventList-BYF03nEh.mjs";
2
+ import { A as p } from "./ToggleButton-BjTEhXO6.mjs";
3
3
  import "react";
4
- import "./index-BW7MAuY_.mjs";
4
+ import "./index-BBX-vK5Q.mjs";
5
5
  import "react-dom";
6
6
  const f = ({
7
7
  data: t,
@@ -0,0 +1,130 @@
1
+ import { jsx as F } from "react/jsx-runtime";
2
+ import { b as K } from "./ToggleButton-BjTEhXO6.mjs";
3
+ import { useState as f, useEffect as M } from "react";
4
+ import { s as a, f as u } from "./index-BBX-vK5Q.mjs";
5
+ import { m as N } from "./mutateApi-C3NgPEmY.mjs";
6
+ import "react-dom";
7
+ const Z = (L) => {
8
+ const {
9
+ pageData: t = {},
10
+ secondaryArgs: P,
11
+ prelemAnalyticsProp: E,
12
+ prelemAuthoringHelper: D,
13
+ userId: y
14
+ } = L || {}, {
15
+ prelemBaseEndpoint: { language: m, site_host: d }
16
+ } = P, [C, c] = f(!1), [v, I] = f(!1), [w, B] = f(0), [S, G] = f(0), [T, j] = f([]), [b, A] = f(!1), [k, U] = f({}), h = localStorage.getItem("userId") || y, x = async (i) => {
17
+ var n, s, l, o;
18
+ if (!h) {
19
+ a("User ID is not available. Please log in.");
20
+ return;
21
+ }
22
+ try {
23
+ c(!0);
24
+ const r = {
25
+ input: {
26
+ ...i,
27
+ userId: h
28
+ }
29
+ }, e = await N.joinChallenge(r, m, d);
30
+ ((n = e == null ? void 0 : e.errors) == null ? void 0 : n.length) > 0 ? a((s = e == null ? void 0 : e.errors[0]) == null ? void 0 : s.message) : (o = (l = e == null ? void 0 : e.data) == null ? void 0 : l.community_joinChallenge) != null && o.id ? (I(!0), _(), A(!0)) : console.error("Join Challenge API failed");
31
+ } catch (r) {
32
+ console.error("Error in Join Challenge API:", r);
33
+ } finally {
34
+ c(!1);
35
+ }
36
+ }, _ = async () => {
37
+ var i, n, s, l;
38
+ if (!h) {
39
+ a("User ID is not available. Please log in.");
40
+ return;
41
+ }
42
+ try {
43
+ c(!0);
44
+ const o = {
45
+ challenge_id: t == null ? void 0 : t.page,
46
+ user_id: y
47
+ }, r = await u.getChallengeDetails(o, m, d);
48
+ if (((i = r == null ? void 0 : r.errors) == null ? void 0 : i.length) > 0)
49
+ a((n = r == null ? void 0 : r.errors[0]) == null ? void 0 : n.message);
50
+ else if ((s = r == null ? void 0 : r.data) != null && s.community_challengesDetail) {
51
+ const {
52
+ total_participant: e,
53
+ is_joined: g,
54
+ user_steps: z = 0
55
+ } = (l = r == null ? void 0 : r.data) == null ? void 0 : l.community_challengesDetail;
56
+ I(g), B(e), G(z);
57
+ } else
58
+ console.error("GetEventDetails API failed");
59
+ } catch (o) {
60
+ console.error("Error in GetEventDetails API:", o);
61
+ } finally {
62
+ c(!1);
63
+ }
64
+ }, H = async () => {
65
+ var i, n, s, l, o;
66
+ try {
67
+ c(!0);
68
+ const r = {
69
+ challenge_id: t == null ? void 0 : t.page,
70
+ user_id: localStorage.getItem("userId")
71
+ }, e = await u.getLeaderBoardList(r, m, d);
72
+ if (((i = e == null ? void 0 : e.errors) == null ? void 0 : i.length) > 0)
73
+ a((n = e == null ? void 0 : e.errors[0]) == null ? void 0 : n.message);
74
+ else if ((l = (s = e == null ? void 0 : e.data) == null ? void 0 : s.community_getLeaderBoardList) != null && l.records) {
75
+ const { records: g } = (o = e == null ? void 0 : e.data) == null ? void 0 : o.community_getLeaderBoardList;
76
+ j(g);
77
+ } else
78
+ console.error("GetLeaderBoardList API failed");
79
+ } catch (r) {
80
+ console.error("Error in GetLeaderBoardList API:", r);
81
+ } finally {
82
+ c(!1);
83
+ }
84
+ }, J = async (i = "") => {
85
+ var n, s, l, o;
86
+ try {
87
+ c(!0);
88
+ const r = {
89
+ date: i,
90
+ user_id: h
91
+ }, e = await u.fetchPersonalTracker(r, m, d);
92
+ if (((n = e == null ? void 0 : e.errors) == null ? void 0 : n.length) > 0)
93
+ a((s = e == null ? void 0 : e.errors[0]) == null ? void 0 : s.message);
94
+ else if ((l = e == null ? void 0 : e.data) != null && l.community_fetchPersonalTracker) {
95
+ const { device_info: g } = (o = e == null ? void 0 : e.data) == null ? void 0 : o.community_fetchPersonalTracker;
96
+ U(g);
97
+ } else
98
+ console.error("GetPersonalData API failed"), a("GetPersonalData API failed");
99
+ } catch (r) {
100
+ a("Something went wrong !"), console.error("Error in GetPersonalData API:", r), a("Error in GetPersonalData API");
101
+ } finally {
102
+ c(!1);
103
+ }
104
+ }, q = {
105
+ joinChallenge: x,
106
+ loading: C,
107
+ isEnrolled: v,
108
+ enrolledParticipants: w,
109
+ userAchieved: S,
110
+ leaderBoardList: T,
111
+ showPopup: b,
112
+ setShowPopup: A,
113
+ deviceInfo: k
114
+ };
115
+ return M(() => {
116
+ t != null && t.page && (_(), H(), J());
117
+ }, [t]), /* @__PURE__ */ F(
118
+ K,
119
+ {
120
+ content: t,
121
+ analytics: E,
122
+ authoringHelper: D,
123
+ secondaryArgs: P,
124
+ challengeDetails: q
125
+ }
126
+ );
127
+ };
128
+ export {
129
+ Z as default
130
+ };
@@ -1,8 +1,8 @@
1
1
  import { jsx as z } from "react/jsx-runtime";
2
- import { f as D, c as F } from "./EventList-BYF03nEh.mjs";
2
+ import { f as D, C as F } from "./ToggleButton-BjTEhXO6.mjs";
3
3
  import { useState as d, useEffect as J } from "react";
4
- import { f as p, s as a, a as K } from "./index-BW7MAuY_.mjs";
5
- import { m as N } from "./mutateApi-UtIkY8_8.mjs";
4
+ import { f as p, s as a, a as K } from "./index-BBX-vK5Q.mjs";
5
+ import { m as N } from "./mutateApi-C3NgPEmY.mjs";
6
6
  import "react-dom";
7
7
  const Z = (I) => {
8
8
  var S, P, A;
@@ -1,39 +1,34 @@
1
1
  import { jsx as O } from "react/jsx-runtime";
2
- import j, { memo as x, useState as g, useEffect as z } from "react";
3
- import { F as J, f as N, s as w } from "./index-BW7MAuY_.mjs";
4
- import { m as $ } from "./mutateApi-UtIkY8_8.mjs";
2
+ import j, { memo as x, useState as g, useEffect as J } from "react";
3
+ import { F as M, f as N, s as w } from "./index-BBX-vK5Q.mjs";
4
+ import { m as $ } from "./mutateApi-C3NgPEmY.mjs";
5
+ import { M as T } from "./Mapping-jqmNMEpL.mjs";
5
6
  import "react-dom";
6
- const A = {
7
- Article: "Article",
8
- Quiz: "Quiz",
9
- Poll: "Poll",
10
- Event: "Event",
11
- Vod: "Vod"
12
- }, c = {};
13
- Object.keys(A).forEach((l) => (c[l] = j.lazy(
14
- () => import("./index-B0kXOAse.mjs").then((t) => ({
15
- default: t[A[l]]
7
+ const c = {};
8
+ Object.keys(T).forEach((l) => (c[l] = j.lazy(
9
+ () => import("./index-JLQT9i3x.mjs").then((t) => ({
10
+ default: t[T[l]]
16
11
  }))
17
12
  ), c));
18
13
  const B = (l) => {
19
- var y, a, h, _, C, S;
20
- const { pageData: t = {}, secondaryArgs: m = {}, filters: P, relativePath: v = "" } = l || {}, E = c[(t == null ? void 0 : t.content_type) || (t == null ? void 0 : t.tag_name)] || J, T = {
14
+ var a, y, h, _, C, S;
15
+ const { pageData: t = {}, secondaryArgs: m = {}, filters: b, relativePath: A = "" } = l || {}, I = c[(t == null ? void 0 : t.content_type) || (t == null ? void 0 : t.tag_name)] || M, P = {
21
16
  pageId: t == null ? void 0 : t.page,
22
17
  pageTitle: t == null ? void 0 : t.title,
23
18
  pageDesc: t == null ? void 0 : t.description,
24
- pageTags: (a = (y = t == null ? void 0 : t.settings) == null ? void 0 : y.keywords) == null ? void 0 : a.join(", "),
19
+ pageTags: (y = (a = t == null ? void 0 : t.settings) == null ? void 0 : a.keywords) == null ? void 0 : y.join(", "),
25
20
  isAuthoring: !1,
26
21
  isSeoEnabled: (h = t == null ? void 0 : t.settings) == null ? void 0 : h.seo_blockIndexing,
27
22
  isAnalyticsEnabled: t == null ? void 0 : t.analytics_enable
28
- }, b = {
23
+ }, v = {
29
24
  isModalShow: !0
30
- }, [u, n] = g(!1), [I, k] = g([]), {
31
- prelemBaseEndpoint: { site_host: d, language: f }
25
+ }, [f, n] = g(!1), [E, k] = g([]), {
26
+ prelemBaseEndpoint: { site_host: u, language: d }
32
27
  } = m, p = async () => {
33
28
  var o, s;
34
29
  try {
35
- u || n(!0);
36
- const e = await N.fetchPoll({ title: t.document_path }, f, d);
30
+ f || n(!0);
31
+ const e = await N.fetchPoll({ title: t.document_path }, d, u);
37
32
  k((s = (o = e.data) == null ? void 0 : o.users_fetchContent) == null ? void 0 : s.options), n(!1);
38
33
  } catch (e) {
39
34
  n(!1), w(`${e}`);
@@ -46,7 +41,7 @@ const B = (l) => {
46
41
  input: {
47
42
  pollInfo: { ...o, start_date: "" }
48
43
  }
49
- }, i = await $.savePoll(e, f, d);
44
+ }, i = await $.savePoll(e, d, u);
50
45
  if (n(!1), (s = i == null ? void 0 : i.data) != null && s.users_saveContent) {
51
46
  const r = JSON.parse(localStorage.getItem("TakenPoles") || "[]");
52
47
  r != null && r.includes(t.page) || localStorage.setItem("TakenPoles", JSON.stringify([...r, t.page])), p();
@@ -55,24 +50,24 @@ const B = (l) => {
55
50
  n(!1), w(`${e}`);
56
51
  }
57
52
  };
58
- return z(() => {
53
+ return J(() => {
59
54
  const o = JSON.parse(localStorage.getItem("TakenPoles") || "[]");
60
55
  o != null && o.includes(t == null ? void 0 : t.page) && p();
61
56
  }, []), /* @__PURE__ */ O(
62
- E,
57
+ I,
63
58
  {
64
59
  content: t,
65
- analytics: T,
66
- authoringHelper: b,
60
+ analytics: P,
61
+ authoringHelper: v,
67
62
  secondaryArgs: m,
68
- results: ((_ = t == null ? void 0 : t.content_type) == null ? void 0 : _.toLowerCase()) === "poll" ? I : void 0,
63
+ results: ((_ = t == null ? void 0 : t.content_type) == null ? void 0 : _.toLowerCase()) === "poll" ? E : void 0,
69
64
  onSubmit: ((C = t == null ? void 0 : t.content_type) == null ? void 0 : C.toLowerCase()) === "poll" ? (o) => L(o) : void 0,
70
- showLoading: ((S = t == null ? void 0 : t.content_type) == null ? void 0 : S.toLowerCase()) === "poll" ? u : void 0,
71
- filters: P,
72
- relativePath: v
65
+ showLoading: ((S = t == null ? void 0 : t.content_type) == null ? void 0 : S.toLowerCase()) === "poll" ? f : void 0,
66
+ filters: b,
67
+ relativePath: A
73
68
  }
74
69
  );
75
- }, R = x(B);
70
+ }, K = x(B);
76
71
  export {
77
- R as default
72
+ K as default
78
73
  };
@@ -1,6 +1,6 @@
1
- import { g as P } from "./index-BW7MAuY_.mjs";
1
+ import { m as P } from "./index-BBX-vK5Q.mjs";
2
2
  import v from "react";
3
- import { u as D, p as O } from "./EventList-BYF03nEh.mjs";
3
+ import { y as D, z as O } from "./ToggleButton-BjTEhXO6.mjs";
4
4
  function b(t, e) {
5
5
  for (var r = 0; r < e.length; r++) {
6
6
  const o = e[r];
@@ -127,10 +127,10 @@ class p extends c.Component {
127
127
  n(p, "displayName", "DailyMotion");
128
128
  n(p, "canPlay", f.canPlay.dailymotion);
129
129
  n(p, "loopOnEnded", !0);
130
- const K = /* @__PURE__ */ P(_), F = /* @__PURE__ */ b({
130
+ const K = /* @__PURE__ */ P(_), z = /* @__PURE__ */ b({
131
131
  __proto__: null,
132
132
  default: K
133
133
  }, [_]);
134
134
  export {
135
- F as D
135
+ z as D
136
136
  };
@@ -1,8 +1,8 @@
1
1
  import { jsx as z } from "react/jsx-runtime";
2
- import { f as F, d as J } from "./EventList-BYF03nEh.mjs";
2
+ import { f as F, a as J } from "./ToggleButton-BjTEhXO6.mjs";
3
3
  import { useState as l, useEffect as K } from "react";
4
- import { f as E, s, a as N } from "./index-BW7MAuY_.mjs";
5
- import { m as O } from "./mutateApi-UtIkY8_8.mjs";
4
+ import { f as E, s, a as N } from "./index-BBX-vK5Q.mjs";
5
+ import { m as O } from "./mutateApi-C3NgPEmY.mjs";
6
6
  import "react-dom";
7
7
  const v = async (w, g, y, D = "", t = "wellnessevent") => {
8
8
  var f, d, o, r;
@@ -90,7 +90,8 @@ const v = async (w, g, y, D = "", t = "wellnessevent") => {
90
90
  eventData: x,
91
91
  articleVodData: d,
92
92
  filters: a,
93
- relativePath: f
93
+ relativePath: f,
94
+ userId: t
94
95
  }
95
96
  );
96
97
  };
@@ -1,8 +1,8 @@
1
1
  import { jsx as U } from "react/jsx-runtime";
2
- import { E as V } from "./EventList-BYF03nEh.mjs";
2
+ import { c as V } from "./ToggleButton-BjTEhXO6.mjs";
3
3
  import { useState as a, useEffect as p } from "react";
4
- import { f as q, s as d, a as I } from "./index-BW7MAuY_.mjs";
5
- import { m as z } from "./mutateApi-UtIkY8_8.mjs";
4
+ import { f as q, s as d, a as I } from "./index-BBX-vK5Q.mjs";
5
+ import { m as z } from "./mutateApi-C3NgPEmY.mjs";
6
6
  import "react-dom";
7
7
  const Z = (h) => {
8
8
  const {
@@ -15,7 +15,7 @@ const Z = (h) => {
15
15
  relativePath: j = ""
16
16
  } = h || {}, {
17
17
  prelemBaseEndpoint: { language: v, site_host: _ }
18
- } = g, [T, m] = a(!1), [k, E] = a(!1), [L, b] = a(0), f = localStorage.getItem("userId") || P, [x, D] = a(""), [G, H] = a(!1), J = {
18
+ } = g, [T, m] = a(!1), [k, y] = a(!1), [L, b] = a(0), f = localStorage.getItem("userId") || P, [x, D] = a(""), [G, H] = a(!1), J = {
19
19
  joinEvent: async (u) => {
20
20
  var r, s, i, o, l, c;
21
21
  if (!f) {
@@ -30,7 +30,7 @@ const Z = (h) => {
30
30
  userId: f
31
31
  }
32
32
  }, e = await z.joinEvent(n, v, _);
33
- ((r = e == null ? void 0 : e.errors) == null ? void 0 : r.length) > 0 ? d((s = e == null ? void 0 : e.errors[0]) == null ? void 0 : s.message) : (o = (i = e == null ? void 0 : e.data) == null ? void 0 : i.community_userRegistration) != null && o.id ? (I((c = (l = e == null ? void 0 : e.data) == null ? void 0 : l.community_userRegistration) == null ? void 0 : c.message), E(!0), y()) : console.error("Join Event API failed");
33
+ ((r = e == null ? void 0 : e.errors) == null ? void 0 : r.length) > 0 ? d((s = e == null ? void 0 : e.errors[0]) == null ? void 0 : s.message) : (o = (i = e == null ? void 0 : e.data) == null ? void 0 : i.community_userRegistration) != null && o.id ? (I((c = (l = e == null ? void 0 : e.data) == null ? void 0 : l.community_userRegistration) == null ? void 0 : c.message), y(!0), E()) : console.error("Join Event API failed");
34
34
  } catch (n) {
35
35
  console.error("Error in Join Event API:", n);
36
36
  } finally {
@@ -42,7 +42,7 @@ const Z = (h) => {
42
42
  registeredParticipants: L,
43
43
  meetingLink: x,
44
44
  isStarted: G
45
- }, y = async () => {
45
+ }, E = async () => {
46
46
  var u, r, s, i, o, l, c;
47
47
  try {
48
48
  m(!0);
@@ -67,7 +67,7 @@ const Z = (h) => {
67
67
  meeting_link: C = "",
68
68
  is_started: M = !1
69
69
  } = (o = e == null ? void 0 : e.data) == null ? void 0 : o.community_eventDetails;
70
- I((c = (l = e == null ? void 0 : e.data) == null ? void 0 : l.community_eventDetails) == null ? void 0 : c.message), E(B), b(O), D(C), H(M);
70
+ I((c = (l = e == null ? void 0 : e.data) == null ? void 0 : l.community_eventDetails) == null ? void 0 : c.message), y(B), b(O), D(C), H(M);
71
71
  } else
72
72
  console.error("GetEventDetails API failed");
73
73
  } catch (n) {
@@ -77,7 +77,7 @@ const Z = (h) => {
77
77
  }
78
78
  };
79
79
  return p(() => {
80
- t != null && t.page && y();
80
+ t != null && t.page && E();
81
81
  }, [t]), /* @__PURE__ */ U(
82
82
  V,
83
83
  {
@@ -0,0 +1,82 @@
1
+ import { jsx as x } from "react/jsx-runtime";
2
+ import { E as U } from "./ToggleButton-BjTEhXO6.mjs";
3
+ import { useState as c, useEffect as j } from "react";
4
+ import { s as a, f as B, a as H } from "./index-BBX-vK5Q.mjs";
5
+ import { m as q } from "./mutateApi-C3NgPEmY.mjs";
6
+ import "react-dom";
7
+ const O = ({
8
+ data: h,
9
+ prelemAnalyticsProp: p,
10
+ prelemAuthoringHelper: P,
11
+ secondaryArgs: m,
12
+ userId: f,
13
+ filters: y,
14
+ relativePath: I
15
+ }) => {
16
+ const [S, w] = c({}), [_, v] = c({}), [D, E] = c({}), [T, u] = c(!1), {
17
+ prelemBaseEndpoint: { language: g, site_host: d }
18
+ } = m, r = localStorage.getItem("userId") || f, G = async (l, t, i) => {
19
+ var n, o;
20
+ if (!r) {
21
+ a("User ID is not available. Please log in.");
22
+ return;
23
+ }
24
+ try {
25
+ const e = {
26
+ input: { activity_type: i, target: l.toString(), action: t },
27
+ user_id: r
28
+ }, s = await q.setPersonalGoal(e, g, d);
29
+ ((o = (n = s == null ? void 0 : s.data) == null ? void 0 : n.community_setPersonalGoal) == null ? void 0 : o.message) === "Created Successfully!!!" && t === "goal" ? H("Goal updated successfully!") : t !== "entry" && a("Something went wrong, please try after sometime !");
30
+ } catch (e) {
31
+ console.error("Error in update goal API:", e), a("Something went wrong, please try after sometime !");
32
+ }
33
+ }, C = async () => {
34
+ var l, t, i, n;
35
+ if (!r) {
36
+ a("User ID is not available. Please log in.");
37
+ return;
38
+ }
39
+ try {
40
+ u(!0);
41
+ const o = {
42
+ date: "",
43
+ user_id: r
44
+ }, e = await B.fetchPersonalTracker(o, g, d);
45
+ if (((l = e == null ? void 0 : e.errors) == null ? void 0 : l.length) > 0)
46
+ a((t = e == null ? void 0 : e.errors[0]) == null ? void 0 : t.message);
47
+ else if ((i = e == null ? void 0 : e.data) != null && i.community_fetchPersonalTracker) {
48
+ const { steps: s, calories: k, distance: L, individual_challenge_info: b } = (n = e == null ? void 0 : e.data) == null ? void 0 : n.community_fetchPersonalTracker;
49
+ E(s), w(b), v({ calories: k, distance: L });
50
+ } else
51
+ console.error("GetPersonalData API failed");
52
+ } catch (o) {
53
+ a("Something went wrong !"), console.error("Error in GetPersonalData API:", o);
54
+ } finally {
55
+ u(!1);
56
+ }
57
+ }, A = {
58
+ stepsData: D,
59
+ loading: T,
60
+ updateGoals: G
61
+ };
62
+ return j(() => {
63
+ C();
64
+ }, []), /* @__PURE__ */ x(
65
+ U,
66
+ {
67
+ content: h,
68
+ analytics: p,
69
+ authoringHelper: P,
70
+ secondaryArgs: m,
71
+ stepsDetails: A,
72
+ filters: y,
73
+ relativePath: I,
74
+ individual_challenge_info: S,
75
+ commonInfo: _,
76
+ userId: f
77
+ }
78
+ );
79
+ };
80
+ export {
81
+ O as default
82
+ };
@@ -1,6 +1,6 @@
1
- import { g as _ } from "./index-BW7MAuY_.mjs";
2
- import g from "react";
3
- import { u as P, p as m } from "./EventList-BYF03nEh.mjs";
1
+ import { m as _ } from "./index-BBX-vK5Q.mjs";
2
+ import m from "react";
3
+ import { y as P, z as g } from "./ToggleButton-BjTEhXO6.mjs";
4
4
  function v(t, e) {
5
5
  for (var r = 0; r < e.length; r++) {
6
6
  const o = e[r];
@@ -36,7 +36,7 @@ var O = Object.create, i = Object.defineProperty, D = Object.getOwnPropertyDescr
36
36
  k(b, {
37
37
  default: () => l
38
38
  });
39
- var d = F(b), u = w(g), n = P, L = m;
39
+ var d = F(b), u = w(m), n = P, L = g;
40
40
  const c = "https://connect.facebook.net/en_US/sdk.js", f = "FB", y = "fbAsyncInit", M = "facebook-player-";
41
41
  class l extends u.Component {
42
42
  constructor() {
@@ -1,6 +1,6 @@
1
- import { g as b } from "./index-BW7MAuY_.mjs";
1
+ import { m as b } from "./index-BBX-vK5Q.mjs";
2
2
  import _ from "react";
3
- import { u as O, p as A } from "./EventList-BYF03nEh.mjs";
3
+ import { y as O, z as A } from "./ToggleButton-BjTEhXO6.mjs";
4
4
  function R(s, e) {
5
5
  for (var t = 0; t < e.length; t++) {
6
6
  const i = e[t];
@@ -20,24 +20,24 @@ function R(s, e) {
20
20
  var I = Object.create, u = Object.defineProperty, D = Object.getOwnPropertyDescriptor, w = Object.getOwnPropertyNames, M = Object.getPrototypeOf, k = Object.prototype.hasOwnProperty, U = (s, e, t) => e in s ? u(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, N = (s, e) => {
21
21
  for (var t in e)
22
22
  u(s, t, { get: e[t], enumerable: !0 });
23
- }, m = (s, e, t, i) => {
23
+ }, v = (s, e, t, i) => {
24
24
  if (e && typeof e == "object" || typeof e == "function")
25
25
  for (let n of w(e))
26
26
  !k.call(s, n) && n !== t && u(s, n, { get: () => e[n], enumerable: !(i = D(e, n)) || i.enumerable });
27
27
  return s;
28
- }, j = (s, e, t) => (t = s != null ? I(M(s)) : {}, m(
28
+ }, j = (s, e, t) => (t = s != null ? I(M(s)) : {}, v(
29
29
  // If the importer is in node compatibility mode or this is not an ESM
30
30
  // file that has been converted to a CommonJS file using a Babel-
31
31
  // compatible transform (i.e. "__esModule" has not been set), then set
32
32
  // "default" to the CommonJS "module.exports" for node compatibility.
33
33
  !s || !s.__esModule ? u(t, "default", { value: s, enumerable: !0 }) : t,
34
34
  s
35
- )), H = (s) => m(u({}, "__esModule", { value: !0 }), s), r = (s, e, t) => (U(s, typeof e != "symbol" ? e + "" : e, t), t), E = {};
35
+ )), H = (s) => v(u({}, "__esModule", { value: !0 }), s), r = (s, e, t) => (U(s, typeof e != "symbol" ? e + "" : e, t), t), E = {};
36
36
  N(E, {
37
37
  default: () => P
38
38
  });
39
39
  var g = H(E), d = j(_), a = O, c = A;
40
- const y = typeof navigator < "u", F = y && navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1, v = y && (/iPad|iPhone|iPod/.test(navigator.userAgent) || F) && !window.MSStream, V = y && /^((?!chrome|android).)*safari/i.test(navigator.userAgent) && !window.MSStream, T = "https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js", C = "Hls", B = "https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js", x = "dashjs", K = "https://cdn.jsdelivr.net/npm/flv.js@VERSION/dist/flv.min.js", G = "flvjs", X = /www\.dropbox\.com\/.+/, f = /https:\/\/watch\.cloudflarestream\.com\/([a-z0-9]+)/, W = "https://videodelivery.net/{id}/manifest/video.m3u8";
40
+ const y = typeof navigator < "u", F = y && navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1, m = y && (/iPad|iPhone|iPod/.test(navigator.userAgent) || F) && !window.MSStream, V = y && /^((?!chrome|android).)*safari/i.test(navigator.userAgent) && !window.MSStream, T = "https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js", C = "Hls", B = "https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js", x = "dashjs", K = "https://cdn.jsdelivr.net/npm/flv.js@VERSION/dist/flv.min.js", G = "flvjs", X = /www\.dropbox\.com\/.+/, f = /https:\/\/watch\.cloudflarestream\.com\/([a-z0-9]+)/, z = "https://videodelivery.net/{id}/manifest/video.m3u8";
41
41
  class P extends d.Component {
42
42
  constructor() {
43
43
  super(...arguments), r(this, "onReady", (...e) => this.props.onReady(...e)), r(this, "onPlay", (...e) => this.props.onPlay(...e)), r(this, "onBuffer", (...e) => this.props.onBuffer(...e)), r(this, "onBufferEnd", (...e) => this.props.onBufferEnd(...e)), r(this, "onPause", (...e) => this.props.onPause(...e)), r(this, "onEnded", (...e) => this.props.onEnded(...e)), r(this, "onError", (...e) => this.props.onError(...e)), r(this, "onPlayBackRateChange", (e) => this.props.onPlaybackRateChange(e.target.playbackRate)), r(this, "onEnablePIP", (...e) => this.props.onEnablePIP(...e)), r(this, "onDisablePIP", (e) => {
@@ -61,7 +61,7 @@ class P extends d.Component {
61
61
  componentDidMount() {
62
62
  this.props.onMount && this.props.onMount(this), this.addListeners(this.player);
63
63
  const e = this.getSource(this.props.url);
64
- e && (this.player.src = e), (v || this.props.config.forceDisableHls) && this.player.load();
64
+ e && (this.player.src = e), (m || this.props.config.forceDisableHls) && this.player.load();
65
65
  }
66
66
  componentDidUpdate(e) {
67
67
  this.shouldUseAudio(this.props) !== this.shouldUseAudio(e) && (this.removeListeners(this.prevPlayer, e.url), this.addListeners(this.player)), this.props.url !== e.url && !(0, a.isMediaStream)(this.props.url) && !(this.props.url instanceof Array) && (this.player.srcObject = null);
@@ -80,7 +80,7 @@ class P extends d.Component {
80
80
  return e.config.forceVideo || e.config.attributes.poster ? !1 : c.AUDIO_EXTENSIONS.test(e.url) || e.config.forceAudio;
81
81
  }
82
82
  shouldUseHLS(e) {
83
- return V && this.props.config.forceSafariHLS || this.props.config.forceHLS ? !0 : v || this.props.config.forceDisableHls ? !1 : c.HLS_EXTENSIONS.test(e) || f.test(e);
83
+ return V && this.props.config.forceSafariHLS || this.props.config.forceHLS ? !0 : m || this.props.config.forceDisableHls ? !1 : c.HLS_EXTENSIONS.test(e) || f.test(e);
84
84
  }
85
85
  shouldUseDASH(e) {
86
86
  return c.DASH_EXTENSIONS.test(e) || this.props.config.forceDASH;
@@ -97,7 +97,7 @@ class P extends d.Component {
97
97
  this.props.onError(h, p, this.hls, o);
98
98
  }), f.test(e)) {
99
99
  const h = e.match(f)[1];
100
- this.hls.loadSource(W.replace("{id}", h));
100
+ this.hls.loadSource(z.replace("{id}", h));
101
101
  } else
102
102
  this.hls.loadSource(e);
103
103
  this.hls.attachMedia(this.player), this.props.onLoaded();
@@ -193,9 +193,9 @@ class P extends d.Component {
193
193
  }
194
194
  r(P, "displayName", "FilePlayer");
195
195
  r(P, "canPlay", c.canPlay.file);
196
- const z = /* @__PURE__ */ b(g), Y = /* @__PURE__ */ R({
196
+ const W = /* @__PURE__ */ b(g), Y = /* @__PURE__ */ R({
197
197
  __proto__: null,
198
- default: z
198
+ default: W
199
199
  }, [g]);
200
200
  export {
201
201
  Y as F