@platform-x/hcltechx-mfe-wrapper 1.0.0

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 (54) hide show
  1. package/BrightcovePlayer-B2Rrij5a.mjs +177 -0
  2. package/ChallengeDetailComponent-QSflL_pe.mjs +89 -0
  3. package/CommonContentComponent-D8PuLEle.mjs +78 -0
  4. package/DailyMotion-Pq0OS_nv.mjs +136 -0
  5. package/EngagementHomeComponent-CO2rSsxl.mjs +91 -0
  6. package/EventDetailComponent-DMKfvnfx.mjs +84 -0
  7. package/EventList-BM7sWeX5.mjs +22503 -0
  8. package/EventListComponent-SpgarpPb.mjs +82 -0
  9. package/Facebook-DVoDyq2n.mjs +121 -0
  10. package/FilePlayer-TBmUK03G.mjs +202 -0
  11. package/Kaltura-CLaSL9Gw.mjs +121 -0
  12. package/Mixcloud-BIUEG_vf.mjs +113 -0
  13. package/Mux-D2H0Zcnl.mjs +165 -0
  14. package/Preview-CqNeXEJq.mjs +127 -0
  15. package/RecentCarousel-DsRr-cur.mjs +243 -0
  16. package/Share-BTinEfR4.mjs +2243 -0
  17. package/SoundCloud-CL3-ElQD.mjs +123 -0
  18. package/Streamable-B6PCkCf3.mjs +115 -0
  19. package/Twitch-T-goXjKL.mjs +117 -0
  20. package/Vidyard-D8-XmjAR.mjs +113 -0
  21. package/Vimeo-jej0FY4O.mjs +146 -0
  22. package/Wistia-CPzm8ZXT.mjs +124 -0
  23. package/YouTube-VNohNZKu.mjs +176 -0
  24. package/index-BTIxC-e5.mjs +20 -0
  25. package/index-Dluh6sv-.mjs +7333 -0
  26. package/index.d.ts +2 -0
  27. package/index.mjs +10 -0
  28. package/lib/Components/EventDetails/EventDetailComponent.d.ts +1 -0
  29. package/lib/Components/EventDetails/index.d.ts +2 -0
  30. package/lib/Components/EventList/EventListComponent.d.ts +2 -0
  31. package/lib/Components/EventList/index.d.ts +2 -0
  32. package/lib/Components/FallBackPage/FallBackPage.d.ts +2 -0
  33. package/lib/Components/Loader/Loader.d.ts +2 -0
  34. package/lib/contentType-wrapper.d.ts +12 -0
  35. package/lib/contentTypes/Components/ChallengeDetailComponent.d.ts +2 -0
  36. package/lib/contentTypes/Components/CommonContentComponent.d.ts +4 -0
  37. package/lib/contentTypes/Components/EventDetailComponent.d.ts +2 -0
  38. package/lib/contentTypes/index.d.ts +2 -0
  39. package/lib/prelems/Components/EngagementHomeComponent.d.ts +2 -0
  40. package/lib/prelems/Components/EventListComponent.d.ts +10 -0
  41. package/lib/prelems/index.d.ts +2 -0
  42. package/lib/prelems-wrapper.d.ts +9 -0
  43. package/lib/services/ApiConfig.d.ts +1 -0
  44. package/lib/services/fetchApi.d.ts +11 -0
  45. package/lib/services/fetchQueries.d.ts +7 -0
  46. package/lib/services/mutateApi.d.ts +7 -0
  47. package/lib/services/mutateQueries.d.ts +4 -0
  48. package/lib/utils/Mapping.d.ts +7 -0
  49. package/lib/utils/componentMapping.d.ts +11 -0
  50. package/lib/utils/constants.d.ts +10 -0
  51. package/lib/utils/types.d.ts +32 -0
  52. package/mutateApi-DOEWbC_3.mjs +37 -0
  53. package/package.json +25 -0
  54. package/style.css +1 -0
@@ -0,0 +1,165 @@
1
+ import { g as P } from "./index-Dluh6sv-.mjs";
2
+ import g from "react";
3
+ import { p as E } from "./EventList-BM7sWeX5.mjs";
4
+ function b(r, e) {
5
+ for (var t = 0; t < e.length; t++) {
6
+ const i = e[t];
7
+ if (typeof i != "string" && !Array.isArray(i)) {
8
+ for (const s in i)
9
+ if (s !== "default" && !(s in r)) {
10
+ const o = Object.getOwnPropertyDescriptor(i, s);
11
+ o && Object.defineProperty(r, s, o.get ? o : {
12
+ enumerable: !0,
13
+ get: () => i[s]
14
+ });
15
+ }
16
+ }
17
+ }
18
+ return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }));
19
+ }
20
+ var _ = Object.create, a = Object.defineProperty, L = Object.getOwnPropertyDescriptor, k = Object.getOwnPropertyNames, I = Object.getPrototypeOf, O = Object.prototype.hasOwnProperty, M = (r, e, t) => e in r ? a(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, x = (r, e) => {
21
+ for (var t in e)
22
+ a(r, t, { get: e[t], enumerable: !0 });
23
+ }, v = (r, e, t, i) => {
24
+ if (e && typeof e == "object" || typeof e == "function")
25
+ for (let s of k(e))
26
+ !O.call(r, s) && s !== t && a(r, s, { get: () => e[s], enumerable: !(i = L(e, s)) || i.enumerable });
27
+ return r;
28
+ }, R = (r, e, t) => (t = r != null ? _(I(r)) : {}, v(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ !r || !r.__esModule ? a(t, "default", { value: r, enumerable: !0 }) : t,
34
+ r
35
+ )), w = (r) => v(a({}, "__esModule", { value: !0 }), r), n = (r, e, t) => (M(r, typeof e != "symbol" ? e + "" : e, t), t), m = {};
36
+ x(m, {
37
+ default: () => l
38
+ });
39
+ var y = w(m), f = R(g), p = E;
40
+ const D = "https://cdn.jsdelivr.net/npm/@mux/mux-player@VERSION/dist/mux-player.mjs";
41
+ class l extends f.Component {
42
+ constructor() {
43
+ super(...arguments), n(this, "onReady", (...e) => this.props.onReady(...e)), n(this, "onPlay", (...e) => this.props.onPlay(...e)), n(this, "onBuffer", (...e) => this.props.onBuffer(...e)), n(this, "onBufferEnd", (...e) => this.props.onBufferEnd(...e)), n(this, "onPause", (...e) => this.props.onPause(...e)), n(this, "onEnded", (...e) => this.props.onEnded(...e)), n(this, "onError", (...e) => this.props.onError(...e)), n(this, "onPlayBackRateChange", (e) => this.props.onPlaybackRateChange(e.target.playbackRate)), n(this, "onEnablePIP", (...e) => this.props.onEnablePIP(...e)), n(this, "onSeek", (e) => {
44
+ this.props.onSeek(e.target.currentTime);
45
+ }), n(this, "onDurationChange", () => {
46
+ const e = this.getDuration();
47
+ this.props.onDuration(e);
48
+ }), n(this, "mute", () => {
49
+ this.player.muted = !0;
50
+ }), n(this, "unmute", () => {
51
+ this.player.muted = !1;
52
+ }), n(this, "ref", (e) => {
53
+ this.player = e;
54
+ });
55
+ }
56
+ componentDidMount() {
57
+ this.props.onMount && this.props.onMount(this), this.addListeners(this.player);
58
+ const e = this.getPlaybackId(this.props.url);
59
+ e && (this.player.playbackId = e);
60
+ }
61
+ componentWillUnmount() {
62
+ this.player.playbackId = null, this.removeListeners(this.player);
63
+ }
64
+ addListeners(e) {
65
+ const { playsinline: t } = this.props;
66
+ e.addEventListener("play", this.onPlay), e.addEventListener("waiting", this.onBuffer), e.addEventListener("playing", this.onBufferEnd), e.addEventListener("pause", this.onPause), e.addEventListener("seeked", this.onSeek), e.addEventListener("ended", this.onEnded), e.addEventListener("error", this.onError), e.addEventListener("ratechange", this.onPlayBackRateChange), e.addEventListener("enterpictureinpicture", this.onEnablePIP), e.addEventListener("leavepictureinpicture", this.onDisablePIP), e.addEventListener("webkitpresentationmodechanged", this.onPresentationModeChange), e.addEventListener("canplay", this.onReady), t && e.setAttribute("playsinline", "");
67
+ }
68
+ removeListeners(e) {
69
+ e.removeEventListener("canplay", this.onReady), e.removeEventListener("play", this.onPlay), e.removeEventListener("waiting", this.onBuffer), e.removeEventListener("playing", this.onBufferEnd), e.removeEventListener("pause", this.onPause), e.removeEventListener("seeked", this.onSeek), e.removeEventListener("ended", this.onEnded), e.removeEventListener("error", this.onError), e.removeEventListener("ratechange", this.onPlayBackRateChange), e.removeEventListener("enterpictureinpicture", this.onEnablePIP), e.removeEventListener("leavepictureinpicture", this.onDisablePIP), e.removeEventListener("canplay", this.onReady);
70
+ }
71
+ async load(e) {
72
+ var t;
73
+ const { onError: i, config: s } = this.props;
74
+ if (!((t = globalThis.customElements) != null && t.get("mux-player")))
75
+ try {
76
+ await import(
77
+ /* webpackIgnore: true */
78
+ `${D.replace("VERSION", s.version)}`
79
+ ), this.props.onLoaded();
80
+ } catch (u) {
81
+ i(u);
82
+ }
83
+ const [, o] = e.match(p.MATCH_URL_MUX);
84
+ this.player.playbackId = o;
85
+ }
86
+ play() {
87
+ const e = this.player.play();
88
+ e && e.catch(this.props.onError);
89
+ }
90
+ pause() {
91
+ this.player.pause();
92
+ }
93
+ stop() {
94
+ this.player.playbackId = null;
95
+ }
96
+ seekTo(e, t = !0) {
97
+ this.player.currentTime = e, t || this.pause();
98
+ }
99
+ setVolume(e) {
100
+ this.player.volume = e;
101
+ }
102
+ enablePIP() {
103
+ this.player.requestPictureInPicture && document.pictureInPictureElement !== this.player && this.player.requestPictureInPicture();
104
+ }
105
+ disablePIP() {
106
+ document.exitPictureInPicture && document.pictureInPictureElement === this.player && document.exitPictureInPicture();
107
+ }
108
+ setPlaybackRate(e) {
109
+ try {
110
+ this.player.playbackRate = e;
111
+ } catch (t) {
112
+ this.props.onError(t);
113
+ }
114
+ }
115
+ getDuration() {
116
+ if (!this.player)
117
+ return null;
118
+ const { duration: e, seekable: t } = this.player;
119
+ return e === 1 / 0 && t.length > 0 ? t.end(t.length - 1) : e;
120
+ }
121
+ getCurrentTime() {
122
+ return this.player ? this.player.currentTime : null;
123
+ }
124
+ getSecondsLoaded() {
125
+ if (!this.player)
126
+ return null;
127
+ const { buffered: e } = this.player;
128
+ if (e.length === 0)
129
+ return 0;
130
+ const t = e.end(e.length - 1), i = this.getDuration();
131
+ return t > i ? i : t;
132
+ }
133
+ getPlaybackId(e) {
134
+ const [, t] = e.match(p.MATCH_URL_MUX);
135
+ return t;
136
+ }
137
+ render() {
138
+ const { url: e, playing: t, loop: i, controls: s, muted: o, config: u, width: h, height: c } = this.props, d = {
139
+ width: h === "auto" ? h : "100%",
140
+ height: c === "auto" ? c : "100%"
141
+ };
142
+ return s === !1 && (d["--controls"] = "none"), /* @__PURE__ */ f.default.createElement(
143
+ "mux-player",
144
+ {
145
+ ref: this.ref,
146
+ "playback-id": this.getPlaybackId(e),
147
+ style: d,
148
+ preload: "auto",
149
+ autoPlay: t || void 0,
150
+ muted: o ? "" : void 0,
151
+ loop: i ? "" : void 0,
152
+ ...u.attributes
153
+ }
154
+ );
155
+ }
156
+ }
157
+ n(l, "displayName", "Mux");
158
+ n(l, "canPlay", p.canPlay.mux);
159
+ const j = /* @__PURE__ */ P(y), T = /* @__PURE__ */ b({
160
+ __proto__: null,
161
+ default: j
162
+ }, [y]);
163
+ export {
164
+ T as M
165
+ };
@@ -0,0 +1,127 @@
1
+ import { g as y } from "./index-Dluh6sv-.mjs";
2
+ import v from "react";
3
+ function w(r, e) {
4
+ for (var t = 0; t < e.length; t++) {
5
+ const n = e[t];
6
+ if (typeof n != "string" && !Array.isArray(n)) {
7
+ for (const a in n)
8
+ if (a !== "default" && !(a in r)) {
9
+ const o = Object.getOwnPropertyDescriptor(n, a);
10
+ o && Object.defineProperty(r, a, o.get ? o : {
11
+ enumerable: !0,
12
+ get: () => n[a]
13
+ });
14
+ }
15
+ }
16
+ }
17
+ return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }));
18
+ }
19
+ var P = Object.create, s = Object.defineProperty, O = Object.getOwnPropertyDescriptor, x = Object.getOwnPropertyNames, I = Object.getPrototypeOf, j = Object.prototype.hasOwnProperty, S = (r, e, t) => e in r ? s(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, E = (r, e) => {
20
+ for (var t in e)
21
+ s(r, t, { get: e[t], enumerable: !0 });
22
+ }, _ = (r, e, t, n) => {
23
+ if (e && typeof e == "object" || typeof e == "function")
24
+ for (let a of x(e))
25
+ !j.call(r, a) && a !== t && s(r, a, { get: () => e[a], enumerable: !(n = O(e, a)) || n.enumerable });
26
+ return r;
27
+ }, C = (r, e, t) => (t = r != null ? P(I(r)) : {}, _(
28
+ // If the importer is in node compatibility mode or this is not an ESM
29
+ // file that has been converted to a CommonJS file using a Babel-
30
+ // compatible transform (i.e. "__esModule" has not been set), then set
31
+ // "default" to the CommonJS "module.exports" for node compatibility.
32
+ !r || !r.__esModule ? s(t, "default", { value: r, enumerable: !0 }) : t,
33
+ r
34
+ )), N = (r) => _(s({}, "__esModule", { value: !0 }), r), p = (r, e, t) => (S(r, typeof e != "symbol" ? e + "" : e, t), t), g = {};
35
+ E(g, {
36
+ default: () => k
37
+ });
38
+ var m = N(g), i = C(v);
39
+ const u = "64px", d = {};
40
+ class k extends i.Component {
41
+ constructor() {
42
+ super(...arguments), p(this, "mounted", !1), p(this, "state", {
43
+ image: null
44
+ }), p(this, "handleKeyPress", (e) => {
45
+ (e.key === "Enter" || e.key === " ") && this.props.onClick();
46
+ });
47
+ }
48
+ componentDidMount() {
49
+ this.mounted = !0, this.fetchImage(this.props);
50
+ }
51
+ componentDidUpdate(e) {
52
+ const { url: t, light: n } = this.props;
53
+ (e.url !== t || e.light !== n) && this.fetchImage(this.props);
54
+ }
55
+ componentWillUnmount() {
56
+ this.mounted = !1;
57
+ }
58
+ fetchImage({ url: e, light: t, oEmbedUrl: n }) {
59
+ if (!i.default.isValidElement(t)) {
60
+ if (typeof t == "string") {
61
+ this.setState({ image: t });
62
+ return;
63
+ }
64
+ if (d[e]) {
65
+ this.setState({ image: d[e] });
66
+ return;
67
+ }
68
+ return this.setState({ image: null }), window.fetch(n.replace("{url}", e)).then((a) => a.json()).then((a) => {
69
+ if (a.thumbnail_url && this.mounted) {
70
+ const o = a.thumbnail_url.replace("height=100", "height=480").replace("-d_295x166", "-d_640");
71
+ this.setState({ image: o }), d[e] = o;
72
+ }
73
+ });
74
+ }
75
+ }
76
+ render() {
77
+ const { light: e, onClick: t, playIcon: n, previewTabIndex: a, previewAriaLabel: o } = this.props, { image: f } = this.state, l = i.default.isValidElement(e), h = {
78
+ display: "flex",
79
+ alignItems: "center",
80
+ justifyContent: "center"
81
+ }, c = {
82
+ preview: {
83
+ width: "100%",
84
+ height: "100%",
85
+ backgroundImage: f && !l ? `url(${f})` : void 0,
86
+ backgroundSize: "cover",
87
+ backgroundPosition: "center",
88
+ cursor: "pointer",
89
+ ...h
90
+ },
91
+ shadow: {
92
+ background: "radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",
93
+ borderRadius: u,
94
+ width: u,
95
+ height: u,
96
+ position: l ? "absolute" : void 0,
97
+ ...h
98
+ },
99
+ playIcon: {
100
+ borderStyle: "solid",
101
+ borderWidth: "16px 0 16px 26px",
102
+ borderColor: "transparent transparent transparent white",
103
+ marginLeft: "7px"
104
+ }
105
+ }, b = /* @__PURE__ */ i.default.createElement("div", { style: c.shadow, className: "react-player__shadow" }, /* @__PURE__ */ i.default.createElement("div", { style: c.playIcon, className: "react-player__play-icon" }));
106
+ return /* @__PURE__ */ i.default.createElement(
107
+ "div",
108
+ {
109
+ style: c.preview,
110
+ className: "react-player__preview",
111
+ onClick: t,
112
+ tabIndex: a,
113
+ onKeyPress: this.handleKeyPress,
114
+ ...o ? { "aria-label": o } : {}
115
+ },
116
+ l ? e : null,
117
+ n || b
118
+ );
119
+ }
120
+ }
121
+ const D = /* @__PURE__ */ y(m), K = /* @__PURE__ */ w({
122
+ __proto__: null,
123
+ default: D
124
+ }, [m]);
125
+ export {
126
+ K as P
127
+ };
@@ -0,0 +1,243 @@
1
+ import M, { jsxs as n, jsx as t } from "react/jsx-runtime";
2
+ import { r as V, i as $, e as y, j as z, k as P, l as j, m as _, n as q, o as F, q as O, s as U, t as B, v as Z } from "./EventList-BM7sWeX5.mjs";
3
+ import { Box as i, Typography as h, CardMedia as Y, Link as G } from "@mui/material";
4
+ import J, { useState as K, useEffect as Q } from "react";
5
+ import { makeStyles as A } from "@mui/styles";
6
+ import "./index-Dluh6sv-.mjs";
7
+ import "react-dom";
8
+ import "@mui/system";
9
+ const ee = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.94738%2015.2632C5.94738%2015.6992%206.30083%2016.0526%206.73683%2016.0526H13.0526C13.4886%2016.0526%2013.8421%2015.6992%2013.8421%2015.2632V15.2632C13.8421%2014.8272%2013.4886%2014.4737%2013.0526%2014.4737H6.73683C6.30083%2014.4737%205.94738%2014.8272%205.94738%2015.2632V15.2632ZM5.94738%2011.0526C5.94738%2011.4886%206.30083%2011.8421%206.73683%2011.8421H13.0526C13.4886%2011.8421%2013.8421%2011.4886%2013.8421%2011.0526V11.0526C13.8421%2010.6166%2013.4886%2010.2632%2013.0526%2010.2632H6.73683C6.30083%2010.2632%205.94738%2010.6166%205.94738%2011.0526V11.0526ZM3.90285%2020C3.37113%2020%202.92105%2019.8158%202.55263%2019.4474C2.18421%2019.0789%202%2018.6289%202%2018.0972V1.90285C2%201.37113%202.18421%200.921055%202.55263%200.552633C2.92105%200.184211%203.37113%200%203.90285%200H12.2632L17.7895%205.52628V18.0972C17.7895%2018.6289%2017.6053%2019.0789%2017.2368%2019.4474C16.8684%2019.8158%2016.4183%2020%2015.8866%2020H3.90285ZM12.4737%206.31575C11.9214%206.31575%2011.4737%205.86804%2011.4737%205.31575V1.57893H3.90285C3.82186%201.57893%203.74763%201.61266%203.68014%201.68014C3.61266%201.74763%203.57892%201.82186%203.57892%201.90285V18.0972C3.57892%2018.1781%203.61266%2018.2524%203.68014%2018.3199C3.74763%2018.3873%203.82186%2018.4211%203.90285%2018.4211H15.8866C15.9676%2018.4211%2016.0418%2018.3873%2016.1093%2018.3199C16.1768%2018.2524%2016.2105%2018.1781%2016.2105%2018.0972V6.31575H12.4737Z'%20fill='%2314142B'/%3e%3c/svg%3e";
10
+ var f = {}, re = $;
11
+ Object.defineProperty(f, "__esModule", {
12
+ value: !0
13
+ });
14
+ var T = f.default = void 0, ae = re(V()), te = M, oe = (0, ae.default)(/* @__PURE__ */ (0, te.jsx)("path", {
15
+ d: "m10.8 15.9 4.67-3.5c.27-.2.27-.6 0-.8L10.8 8.1c-.33-.25-.8-.01-.8.4v7c0 .41.47.65.8.4zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"
16
+ }), "PlayCircleOutlineRounded");
17
+ T = f.default = oe;
18
+ const ie = A(() => {
19
+ const a = y();
20
+ return {
21
+ recentCardsWrapper: {
22
+ "&.recentCardsBg": {
23
+ width: "100%",
24
+ overflow: "hidden",
25
+ [a.breakpoints.up("xs")]: {
26
+ marginBottom: 0
27
+ },
28
+ "& .PX-TopHeading": {
29
+ padding: "15px",
30
+ background: "#9964DD",
31
+ borderTopRightRadius: a.borderRadius.value,
32
+ borderTopLeftRadius: a.borderRadius.value,
33
+ "& h5": {
34
+ margin: 0,
35
+ color: "#fff"
36
+ }
37
+ },
38
+ "& .PX-CardBox": {
39
+ border: "1px solid #D1D1D1",
40
+ paddingBottom: "15px",
41
+ borderTop: "0",
42
+ borderBottomRightRadius: a.borderRadius.value,
43
+ borderBottomLeftRadius: a.borderRadius.value,
44
+ "& .PX-InnerBox": {
45
+ padding: "15px",
46
+ borderTop: "0",
47
+ borderBottomRightRadius: a.borderRadius.value,
48
+ borderBottomLeftRadius: a.borderRadius.value,
49
+ overflowY: "auto",
50
+ maxHeight: "700px",
51
+ "& .PX-CardWp.Platform-x-Box-root.css-0": {
52
+ display: "flex",
53
+ border: "1px solid #E8E8E8",
54
+ padding: "10px",
55
+ borderRadius: a.borderRadius.value,
56
+ marginBottom: "10px",
57
+ "& .PX-MediaWp": {
58
+ minWidth: "160px",
59
+ minHeight: "108px",
60
+ marginRight: "15px",
61
+ maxWidth: "160px",
62
+ maxHeight: "108px",
63
+ position: "relative",
64
+ [a.breakpoints.down("lg")]: {
65
+ minWidth: "90px",
66
+ marginRight: "10px",
67
+ maxWidth: "90px"
68
+ },
69
+ [a.breakpoints.down("em")]: {
70
+ minWidth: "150px",
71
+ marginRight: "10px",
72
+ maxWidth: "150px"
73
+ },
74
+ [a.breakpoints.down("em")]: {
75
+ minWidth: "90px",
76
+ marginRight: "10px",
77
+ maxWidth: "90px"
78
+ },
79
+ "& picture": {
80
+ height: "100%",
81
+ "& img": {
82
+ width: "100%",
83
+ height: "100%",
84
+ objectFit: "cover",
85
+ borderRadius: "5px"
86
+ }
87
+ },
88
+ "& .PX-MidIcon": {
89
+ position: "absolute",
90
+ top: "0",
91
+ left: "0",
92
+ right: "0",
93
+ bottom: "0",
94
+ margin: "auto",
95
+ width: "34px",
96
+ height: "34px",
97
+ display: "none",
98
+ alignItems: "center",
99
+ justifyContent: "center",
100
+ filter: "invert(1)"
101
+ }
102
+ },
103
+ "& .PX-CardRightContent": {
104
+ "& p": {
105
+ margin: 0
106
+ },
107
+ "& .title": {
108
+ display: "-webkit-box",
109
+ WebkitBoxOrient: "vertical",
110
+ WebkitLineClamp: "3",
111
+ overflow: "hidden",
112
+ margin: "7px 0",
113
+ height: "57px"
114
+ },
115
+ "& .readmoreCta": {
116
+ display: "inline-flex",
117
+ alignItems: "center",
118
+ color: a.palette.prelemType3.CARDS.VARIANT1.TITLE,
119
+ textDecoration: "none",
120
+ "& h6": {
121
+ color: a.palette.prelemType3.CARDS.VARIANT1.TITLE,
122
+ display: "inline-block",
123
+ margin: 0
124
+ },
125
+ "& svg": {
126
+ fontSize: "18px",
127
+ marginLeft: "8px"
128
+ }
129
+ }
130
+ }
131
+ }
132
+ }
133
+ }
134
+ }
135
+ }
136
+ };
137
+ }), he = ({ isVideoLandingPage: a, data: v, secondaryArgs: o }) => {
138
+ const W = o == null ? void 0 : o.platform, I = ie(), { t: b } = z(), { gcpUrl: l, bucketName: s } = o, [X, k] = K([]), E = (e) => {
139
+ var r, p;
140
+ if (typeof window < "u") {
141
+ const c = e == null ? void 0 : e.current_page_url, d = (e == null ? void 0 : e.content_type.toLowerCase()) === "vod" ? "video" : "article";
142
+ (r = o == null ? void 0 : o.prelemBaseEndpoint) != null && r.language ? window.open(`/${(p = o == null ? void 0 : o.prelemBaseEndpoint) == null ? void 0 : p.language}/${d}${c}`) : window.open(`/${d}${c}`);
143
+ }
144
+ }, L = (e) => {
145
+ W !== "isAuthoring" && E(e);
146
+ }, N = {
147
+ dotPosition: "outside",
148
+ arrows: !1,
149
+ animationType: "slideIn",
150
+ itemsPerRow: {
151
+ lg: 3,
152
+ md: 3,
153
+ sm: 2,
154
+ xs: 1
155
+ }
156
+ }, R = () => {
157
+ const e = U(v, N.itemsPerRow);
158
+ e && k(e);
159
+ }, S = Z(R, 100);
160
+ Q(() => {
161
+ R();
162
+ const e = () => {
163
+ S();
164
+ };
165
+ return window.addEventListener("resize", e), () => {
166
+ window.removeEventListener("resize", e);
167
+ };
168
+ }, [v]);
169
+ const g = (e) => {
170
+ e.target.src !== B && (e.target.onerror = null, e.target.src = B);
171
+ };
172
+ return /* @__PURE__ */ n(i, { className: `${I.recentCardsWrapper} recentCardsBg`, children: [
173
+ /* @__PURE__ */ t(i, { className: "PX-TopHeading", children: /* @__PURE__ */ t(h, { variant: "h5medium", children: b(a ? "related_videos" : "related_articles") }) }),
174
+ /* @__PURE__ */ t(i, { className: "PX-CardBox", children: /* @__PURE__ */ t(i, { className: "PX-InnerBox", children: X.map(
175
+ (e) => e == null ? void 0 : e.map((r, p) => {
176
+ const { original_image: c = {}, thumbnail: d } = r, { original_image_relative_path: w, ext: H } = c;
177
+ let x, u;
178
+ return (r == null ? void 0 : r.content_type.toLowerCase()) === "vod" ? (x = P(l, s, j(d)), u = P(l, s, d)) : (x = _(
179
+ l,
180
+ s,
181
+ w,
182
+ "webp"
183
+ ), u = _(
184
+ l,
185
+ s,
186
+ w || d,
187
+ H
188
+ )), /* @__PURE__ */ n(i, { className: "PX-CardWp", "data-testid": "enable-vod-play", children: [
189
+ /* @__PURE__ */ n(i, { className: "PX-MediaWp", children: [
190
+ /* @__PURE__ */ n(Y, { component: "picture", children: [
191
+ q.map(({ breakpoint: m }, D) => /* @__PURE__ */ n(J.Fragment, { children: [
192
+ /* @__PURE__ */ t(
193
+ "source",
194
+ {
195
+ onError: (C) => {
196
+ g(C);
197
+ },
198
+ media: `(min-width:${m}px)`,
199
+ srcSet: x
200
+ }
201
+ ),
202
+ /* @__PURE__ */ t(
203
+ "source",
204
+ {
205
+ onError: (C) => {
206
+ g(C);
207
+ },
208
+ media: `(min-width:${m}px)`,
209
+ srcSet: u
210
+ }
211
+ )
212
+ ] }, D)),
213
+ /* @__PURE__ */ t(
214
+ "img",
215
+ {
216
+ loading: "lazy",
217
+ alt: "cropped-img",
218
+ src: u,
219
+ onError: (m) => {
220
+ g(m);
221
+ },
222
+ className: "PX-CardImage"
223
+ }
224
+ )
225
+ ] }),
226
+ (r == null ? void 0 : r.content_type.toLowerCase()) === "vod" ? /* @__PURE__ */ t(i, { className: "PX-MidIcon", children: /* @__PURE__ */ t(T, { sx: { color: "white", fontSize: "40px" } }) }) : /* @__PURE__ */ t(i, { className: "PX-MidIcon", children: /* @__PURE__ */ t("img", { alt: "", src: ee }) })
227
+ ] }),
228
+ /* @__PURE__ */ n(i, { className: "PX-CardRightContent", children: [
229
+ /* @__PURE__ */ t(h, { variant: "h7regular", children: F((r == null ? void 0 : r.publishedDate) || (r == null ? void 0 : r.published_date)) }),
230
+ /* @__PURE__ */ t(h, { variant: "h6medium", className: "title", children: r == null ? void 0 : r.title }),
231
+ /* @__PURE__ */ n(G, { href: "", onClick: () => L(r), className: "readmoreCta", children: [
232
+ /* @__PURE__ */ t(h, { variant: "h6regular", children: "Read more" }),
233
+ /* @__PURE__ */ t(O, {})
234
+ ] })
235
+ ] })
236
+ ] }, p);
237
+ })
238
+ ) }) })
239
+ ] });
240
+ };
241
+ export {
242
+ he as default
243
+ };