pb-sxp-ui 1.0.71 → 1.0.72

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 (31) hide show
  1. package/dist/index.cjs +111 -82
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +111 -82
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +3 -3
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +3 -3
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +115 -85
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +3 -3
  12. package/dist/pb-ui.min.js.map +1 -1
  13. package/es/core/components/DiyPortalPreview/VideoWidget.js +15 -16
  14. package/es/core/components/DiyPortalPreview/index.js +8 -8
  15. package/es/core/components/SxpPageCore/index.js +2 -2
  16. package/es/core/components/SxpPageRender/FormatImage.js +2 -1
  17. package/es/core/components/SxpPageRender/LikeButton/index.js +11 -11
  18. package/es/core/components/SxpPageRender/VideoWidget/index.js +13 -13
  19. package/es/core/components/SxpPageRender/index.js +32 -26
  20. package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
  21. package/es/core/context/SxpDataSourceProvider.js +3 -3
  22. package/lib/core/components/DiyPortalPreview/VideoWidget.js +15 -16
  23. package/lib/core/components/DiyPortalPreview/index.js +8 -8
  24. package/lib/core/components/SxpPageCore/index.js +2 -2
  25. package/lib/core/components/SxpPageRender/FormatImage.js +1 -0
  26. package/lib/core/components/SxpPageRender/LikeButton/index.js +11 -11
  27. package/lib/core/components/SxpPageRender/VideoWidget/index.js +13 -13
  28. package/lib/core/components/SxpPageRender/index.js +32 -26
  29. package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
  30. package/lib/core/context/SxpDataSourceProvider.js +3 -3
  31. package/package.json +1 -2
package/dist/index.cjs CHANGED
@@ -10,7 +10,6 @@ var qs = require('qs');
10
10
  var EventEmitter = require('eventemitter3');
11
11
  var css = require('@emotion/css');
12
12
  var ReactDOM = require('react-dom');
13
- var Hls = require('hls.js');
14
13
 
15
14
  function _interopNamespaceDefault(e) {
16
15
  var n = Object.create(null);
@@ -446,7 +445,7 @@ var DataSourceType;
446
445
  DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
447
446
  })(DataSourceType || (DataSourceType = {}));
448
447
  const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
449
- const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false }) => {
448
+ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, isShowTag = true }) => {
450
449
  const [rtcList, setRtcList] = React.useState([]);
451
450
  const [tagList, setTagList] = React.useState([]);
452
451
  const [loading, setLoading] = React.useState(false);
@@ -608,7 +607,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
608
607
  // 获取 Tag
609
608
  const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
610
609
  var _h, _j, _k, _l, _m;
611
- if (!utmVal)
610
+ if (!utmVal || !isShowTag)
612
611
  return;
613
612
  try {
614
613
  const val = (_k = (_j = (_h = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _h === void 0 ? void 0 : _h.filter((val) => {
@@ -621,7 +620,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
621
620
  catch (e) {
622
621
  console.log('e', e);
623
622
  }
624
- }), [bffFetch, utmVal]);
623
+ }), [bffFetch, utmVal, isShowTag]);
625
624
  const ctaEvent = React.useCallback((eventInfo, rec, product, position) => {
626
625
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
627
626
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
@@ -8447,7 +8446,7 @@ var ExpandableText$1 = React.memo(ExpandableText);
8447
8446
  * @Author: binruan@chatlabs.com
8448
8447
  * @Date: 2024-03-20 10:27:31
8449
8448
  * @LastEditors: binruan@chatlabs.com
8450
- * @LastEditTime: 2024-04-19 14:12:55
8449
+ * @LastEditTime: 2024-05-20 15:53:04
8451
8450
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FormatImage.tsx
8452
8451
  *
8453
8452
  */
@@ -8462,6 +8461,30 @@ const FormatImage = React.forwardRef((props, ref) => {
8462
8461
  React.useEffect(() => {
8463
8462
  setImgSrc(src);
8464
8463
  }, [src]);
8464
+ React.useRef(null);
8465
+ // useEffect(() => {
8466
+ // let observer: any = null;
8467
+ // const { current } = imgRef;
8468
+ // if (current) {
8469
+ // observer = new IntersectionObserver(
8470
+ // (entries) => {
8471
+ // entries.forEach((entry) => {
8472
+ // if (entry.isIntersecting) {
8473
+ // setImgSrc(src);
8474
+ // observer.unobserve(current);
8475
+ // }
8476
+ // });
8477
+ // },
8478
+ // { threshold: 0.1 } // 触发阈值,可根据需要调整
8479
+ // );
8480
+ // observer.observe(current);
8481
+ // }
8482
+ // return () => {
8483
+ // if (observer && current) {
8484
+ // observer.unobserve(current);
8485
+ // }
8486
+ // };
8487
+ // }, [src]);
8465
8488
  return (React.createElement(React.Fragment, null, (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (React.createElement("picture", null,
8466
8489
  React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
8467
8490
  React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
@@ -12242,17 +12265,17 @@ const LikeButton = (_a) => {
12242
12265
  if (state) {
12243
12266
  // 先设置状态
12244
12267
  setState(false);
12245
- const result = (_d = (yield (mutateUnlike === null || mutateUnlike === void 0 ? void 0 : mutateUnlike({ videoItemId: (_c = (_b = recData.video) === null || _b === void 0 ? void 0 : _b.itemId) !== null && _c !== void 0 ? _c : '' })))) !== null && _d !== void 0 ? _d : false;
12268
+ const result = (_d = (yield (mutateUnlike === null || mutateUnlike === void 0 ? void 0 : mutateUnlike({ videoItemId: (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.itemId) !== null && _c !== void 0 ? _c : '' })))) !== null && _d !== void 0 ? _d : false;
12246
12269
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
12247
12270
  eventInfo: {
12248
12271
  eventSubject: 'favoriteContentCanceled',
12249
12272
  eventDescription: 'This content was unfavorite by the user',
12250
- contentId: (_f = (_e = recData.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
12251
- contentName: (_h = (_g = recData.video) === null || _g === void 0 ? void 0 : _g.title) !== null && _h !== void 0 ? _h : '',
12252
- contentTags: JSON.stringify((_k = (_j = recData.video) === null || _j === void 0 ? void 0 : _j.tags) !== null && _k !== void 0 ? _k : []),
12273
+ contentId: (_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
12274
+ contentName: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.title) !== null && _h !== void 0 ? _h : '',
12275
+ contentTags: JSON.stringify((_k = (_j = recData === null || recData === void 0 ? void 0 : recData.video) === null || _j === void 0 ? void 0 : _j.tags) !== null && _k !== void 0 ? _k : []),
12253
12276
  position: position + '',
12254
- contentFormat: ((_l = recData.video) === null || _l === void 0 ? void 0 : _l.url) ? 'video' : 'image',
12255
- traceInfo: (_m = recData.video) === null || _m === void 0 ? void 0 : _m.traceInfo
12277
+ contentFormat: ((_l = recData === null || recData === void 0 ? void 0 : recData.video) === null || _l === void 0 ? void 0 : _l.url) ? 'video' : 'image',
12278
+ traceInfo: (_m = recData === null || recData === void 0 ? void 0 : recData.video) === null || _m === void 0 ? void 0 : _m.traceInfo
12256
12279
  }
12257
12280
  });
12258
12281
  // 如果接口调用失败,则回滚状态
@@ -12267,12 +12290,12 @@ const LikeButton = (_a) => {
12267
12290
  eventInfo: {
12268
12291
  eventSubject: 'favoriteContent',
12269
12292
  eventDescription: 'This content was favorite by the user',
12270
- contentId: (_q = (_p = recData.video) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : '',
12271
- contentName: (_s = (_r = recData.video) === null || _r === void 0 ? void 0 : _r.title) !== null && _s !== void 0 ? _s : '',
12272
- contentTags: JSON.stringify((_u = (_t = recData.video) === null || _t === void 0 ? void 0 : _t.tags) !== null && _u !== void 0 ? _u : []),
12293
+ contentId: (_q = (_p = recData === null || recData === void 0 ? void 0 : recData.video) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : '',
12294
+ contentName: (_s = (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.title) !== null && _s !== void 0 ? _s : '',
12295
+ contentTags: JSON.stringify((_u = (_t = recData === null || recData === void 0 ? void 0 : recData.video) === null || _t === void 0 ? void 0 : _t.tags) !== null && _u !== void 0 ? _u : []),
12273
12296
  position: position + '',
12274
- contentFormat: ((_v = recData.video) === null || _v === void 0 ? void 0 : _v.url) ? 'video' : 'image',
12275
- traceInfo: (_w = recData.video) === null || _w === void 0 ? void 0 : _w.traceInfo
12297
+ contentFormat: ((_v = recData === null || recData === void 0 ? void 0 : recData.video) === null || _v === void 0 ? void 0 : _v.url) ? 'video' : 'image',
12298
+ traceInfo: (_w = recData === null || recData === void 0 ? void 0 : recData.video) === null || _w === void 0 ? void 0 : _w.traceInfo
12276
12299
  }
12277
12300
  });
12278
12301
  if (!result) {
@@ -12350,15 +12373,15 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12350
12373
  eventInfo: {
12351
12374
  eventSubject: 'playVideo',
12352
12375
  eventDescription: 'User played the video',
12353
- contentId: (_d = (_c = item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
12354
- contentName: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.title) !== null && _f !== void 0 ? _f : '',
12376
+ contentId: (_d = (_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
12377
+ contentName: (_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.title) !== null && _f !== void 0 ? _f : '',
12355
12378
  playType,
12356
12379
  startTime: videoCurrentTime,
12357
12380
  videoDuration,
12358
- contentTags: JSON.stringify((_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.tags) !== null && _h !== void 0 ? _h : []),
12381
+ contentTags: JSON.stringify((_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.tags) !== null && _h !== void 0 ? _h : []),
12359
12382
  position: index + '',
12360
12383
  contentFormat: 'video',
12361
- traceInfo: (_j = item.video) === null || _j === void 0 ? void 0 : _j.traceInfo
12384
+ traceInfo: (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.traceInfo
12362
12385
  }
12363
12386
  });
12364
12387
  setIsFirstPlay(false);
@@ -12448,15 +12471,15 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12448
12471
  eventInfo: {
12449
12472
  eventSubject: 'playOverVideo',
12450
12473
  eventDescription: 'User finished playing the video',
12451
- contentId: (_d = (_c = item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
12452
- contentName: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.title) !== null && _f !== void 0 ? _f : '',
12474
+ contentId: (_d = (_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
12475
+ contentName: (_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.title) !== null && _f !== void 0 ? _f : '',
12453
12476
  endTime: videoCurrentTime,
12454
12477
  videoDuration,
12455
12478
  playDuration,
12456
- contentTags: JSON.stringify((_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.tags) !== null && _h !== void 0 ? _h : []),
12479
+ contentTags: JSON.stringify((_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.tags) !== null && _h !== void 0 ? _h : []),
12457
12480
  position: index + '',
12458
12481
  contentFormat: 'video',
12459
- traceInfo: (_j = item.video) === null || _j === void 0 ? void 0 : _j.traceInfo
12482
+ traceInfo: (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.traceInfo
12460
12483
  }
12461
12484
  });
12462
12485
  }
@@ -12464,9 +12487,10 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12464
12487
  React.useEffect(() => {
12465
12488
  if (!isActive || !videoRef)
12466
12489
  return;
12467
- const videoSrc = rec.video.url;
12490
+ const videoSrc = rec === null || rec === void 0 ? void 0 : rec.video.url;
12468
12491
  if (!videoSrc)
12469
12492
  return;
12493
+ videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
12470
12494
  setIsPauseVideo(false);
12471
12495
  const videoPlayerWrapperNode = document.querySelector(`#${videoId}`);
12472
12496
  const dom = document.querySelector('#player-container-id');
@@ -12474,7 +12498,6 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12474
12498
  if (!dom && !dom2)
12475
12499
  return;
12476
12500
  videoPlayerWrapperNode === null || videoPlayerWrapperNode === void 0 ? void 0 : videoPlayerWrapperNode.appendChild(dom || dom2);
12477
- videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
12478
12501
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadedmetadata', handleLoadedmetadata);
12479
12502
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadeddata', handLoadeddata);
12480
12503
  // videoRef?.on('canplay', handleCanplay);
@@ -12555,10 +12578,10 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12555
12578
  window.removeEventListener('beforeunload', handleBeforeUnload);
12556
12579
  };
12557
12580
  }, [activeIndex, index, rec, videoRef, handleClickVideo, isPauseVideo]);
12558
- if (!rec.video) {
12581
+ if (!(rec === null || rec === void 0 ? void 0 : rec.video)) {
12559
12582
  return null;
12560
12583
  }
12561
- return (React.createElement(React.Fragment, null, blur ? (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: Object.assign({ position: 'relative', width: '100%', height, overflow: 'hidden' }, bgStyle) },
12584
+ return (React.createElement(React.Fragment, null, blur ? (React.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, onClick: handleClickVideo(), style: Object.assign({ position: 'relative', width: '100%', height, overflow: 'hidden' }, bgStyle) },
12562
12585
  !isBgColor && (React.createElement(FormatImage$1, { src: blurBgSrc, style: Object.assign({ height: '100%', width: '100%', objectFit: 'cover' }, blurStyle) })),
12563
12586
  React.createElement("canvas", { ref: canvasRef, style: { display: 'none' } }),
12564
12587
  React.createElement("div", { style: {
@@ -12573,7 +12596,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12573
12596
  React.createElement("div", { style: { position: 'relative', width: '100%', height: '100%' } },
12574
12597
  React.createElement("div", { className: 'n-full-screen', ref: videoEleRef, id: videoId, style: { width: '100%', height: '100%' } }),
12575
12598
  React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON }))),
12576
- renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec.video.itemId, style: {
12599
+ renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, style: {
12577
12600
  position: 'relative',
12578
12601
  width: '100%',
12579
12602
  height,
@@ -12930,7 +12953,7 @@ var Tagbar$1 = React.memo(Tagbar);
12930
12953
  * @Author: binruan@chatlabs.com
12931
12954
  * @Date: 2024-01-15 19:03:09
12932
12955
  * @LastEditors: binruan@chatlabs.com
12933
- * @LastEditTime: 2024-05-23 10:41:27
12956
+ * @LastEditTime: 2024-05-24 16:32:06
12934
12957
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12935
12958
  *
12936
12959
  */
@@ -12990,23 +13013,29 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12990
13013
  };
12991
13014
  const firstRef = React.useRef();
12992
13015
  React.useEffect(() => {
12993
- if (!firstRef.current && !videoRef) {
13016
+ var _a, _b, _c;
13017
+ if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
12994
13018
  firstRef.current = true;
12995
13019
  const player = TCPlayer('player-container-id', {
12996
13020
  licenseUrl, // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
12997
13021
  controls: false,
12998
- autoplay: false,
12999
13022
  loop: false,
13023
+ autoplay: true,
13000
13024
  muted: true,
13001
13025
  preload: 'auto',
13002
13026
  posterImage: false,
13003
- bigPlayButton: true
13027
+ bigPlayButton: true,
13028
+ sources: [
13029
+ {
13030
+ src: (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data[0]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.url) !== null && _c !== void 0 ? _c : ''
13031
+ }
13032
+ ]
13004
13033
  });
13005
13034
  player === null || player === void 0 ? void 0 : player.ready(() => {
13006
13035
  setVideoRef(player);
13007
13036
  });
13008
13037
  }
13009
- }, [videoRef, licenseUrl]);
13038
+ }, [videoRef, licenseUrl, data]);
13010
13039
  React.useEffect(() => {
13011
13040
  if (!isInit)
13012
13041
  handleH5EnterLink();
@@ -13061,7 +13090,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13061
13090
  if (popupDetailData && (((_b = (_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
13062
13091
  fromKName = 'pdpPage';
13063
13092
  }
13064
- else if (popupDetailData && (tempMap === null || tempMap === void 0 ? void 0 : tempMap[(_f = (_e = (_d = item.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : ''].item.type) === 'Appoint') {
13093
+ else if (popupDetailData && (tempMap === null || tempMap === void 0 ? void 0 : tempMap[(_f = (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : ''].item.type) === 'Appoint') {
13065
13094
  fromKName = 'formPage';
13066
13095
  }
13067
13096
  else if (isFromHashtag) {
@@ -13086,7 +13115,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13086
13115
  position: activeIndex + '',
13087
13116
  fromKName,
13088
13117
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
13089
- ctatId: (_q = (_p = (_o = item.video) === null || _o === void 0 ? void 0 : _o.bindCta) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : ''
13118
+ ctatId: (_q = (_p = (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.bindCta) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : ''
13090
13119
  }
13091
13120
  });
13092
13121
  }
@@ -13124,11 +13153,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13124
13153
  }, [globalConfig]);
13125
13154
  const renderContent = React.useCallback((rec, index) => {
13126
13155
  var _a, _b, _c, _d;
13127
- if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
13156
+ if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
13128
13157
  return (React.createElement(VideoWidget$3, { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, videoRef: videoRef }));
13129
13158
  }
13130
- if ((_b = rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
13131
- return (React.createElement(PictureGroup$3, { key: rec.video.itemId, imgUrls: rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onReportViewImageEnd: handleReportViewImageEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
13159
+ if ((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
13160
+ return (React.createElement(PictureGroup$3, { key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, imgUrls: rec === null || rec === void 0 ? void 0 : rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onReportViewImageEnd: handleReportViewImageEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
13132
13161
  }
13133
13162
  if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _c === void 0 ? void 0 : _c.length) > 0) {
13134
13163
  return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, idx) => {
@@ -13169,16 +13198,16 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13169
13198
  }, [isShowMore]);
13170
13199
  const renderBottom = React.useCallback((rec, index) => {
13171
13200
  var _a, _b, _c, _d, _e, _f, _g;
13172
- if (rec.video) {
13201
+ if (rec === null || rec === void 0 ? void 0 : rec.video) {
13173
13202
  return (React.createElement(React.Fragment, null,
13174
- ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
13203
+ ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
13175
13204
  React.createElement("div", { className: 'clc-sxp-bottom' },
13176
13205
  React.createElement(Nudge, { nudge: nudge }),
13177
13206
  (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (React.createElement("div", { className: 'clc-sxp-bottom-card' },
13178
13207
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
13179
13208
  React.createElement("div", null,
13180
- React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
13181
- React.createElement(Hashtag$1, { index: activeIndex, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle })))));
13209
+ React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
13210
+ React.createElement(Hashtag$1, { index: activeIndex, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle })))));
13182
13211
  }
13183
13212
  return null;
13184
13213
  }, [
@@ -13202,7 +13231,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13202
13231
  if (waterFallData && top < 40) {
13203
13232
  top += 40;
13204
13233
  }
13205
- if (rec.video) {
13234
+ if (rec === null || rec === void 0 ? void 0 : rec.video) {
13206
13235
  return (React.createElement(LikeButton$1, { key: rec.position, activeIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIcon, unActicveIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unlikeIcon, active: rec.isCollected, recData: rec, className: 'clc-sxp-like-button', style: {
13207
13236
  [(_b = globalConfig.likeIconXPosit) !== null && _b !== void 0 ? _b : 'right']: (_c = globalConfig.likeIconX) !== null && _c !== void 0 ? _c : 0,
13208
13237
  [(_d = globalConfig.likeIconYPosit) !== null && _d !== void 0 ? _d : 'bottom']: top
@@ -13212,21 +13241,21 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13212
13241
  }, [globalConfig, waterFallData]);
13213
13242
  const handleReportViewImageEnd = (item) => {
13214
13243
  var _a, _b, _c, _d, _e, _f;
13215
- if (!((_a = item.video) === null || _a === void 0 ? void 0 : _a.url) && ((_b = item.video) === null || _b === void 0 ? void 0 : _b.imgUrls)) {
13244
+ if (!((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.url) && ((_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.imgUrls)) {
13216
13245
  const endTime = Date.now();
13217
13246
  const duration = (endTime - viewImageStartTime.current) / 1000;
13218
13247
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
13219
13248
  eventInfo: {
13220
13249
  eventSubject: 'viewImageCarouselEnd',
13221
13250
  eventDescription: 'User end view the image carousel',
13222
- contentId: (_d = (_c = item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
13223
- contentName: (_e = item.video.title) !== null && _e !== void 0 ? _e : '',
13251
+ contentId: (_d = (_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
13252
+ contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
13224
13253
  imageEndTime: `${endTime}`,
13225
13254
  playDuration: `${duration}`,
13226
- contentTags: JSON.stringify((_f = item.video.tags) !== null && _f !== void 0 ? _f : []),
13255
+ contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
13227
13256
  position: activeIndex + '',
13228
13257
  contentFormat: 'image',
13229
- traceInfo: item.video.traceInfo
13258
+ traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
13230
13259
  }
13231
13260
  });
13232
13261
  }
@@ -13242,8 +13271,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13242
13271
  eventInfo: {
13243
13272
  eventSubject: 'scrollDown',
13244
13273
  eventDescription: 'User scroll down',
13245
- contentId: (_b = (_a = item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '',
13246
- productId: (_d = (_c = item.product) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
13274
+ contentId: (_b = (_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '',
13275
+ productId: (_d = (_c = item === null || item === void 0 ? void 0 : item.product) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
13247
13276
  requestId: null
13248
13277
  }
13249
13278
  });
@@ -13255,7 +13284,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13255
13284
  eventInfo: {
13256
13285
  eventSubject: 'scrollUp',
13257
13286
  eventDescription: 'User scroll up',
13258
- contentId: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
13287
+ contentId: (_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
13259
13288
  productId: (_h = (_g = item.product) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
13260
13289
  requestId: null
13261
13290
  }
@@ -13294,13 +13323,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13294
13323
  eventInfo: {
13295
13324
  eventSubject: 'viewImageCarouselStart',
13296
13325
  eventDescription: 'User start view the image carousel',
13297
- contentId: (_d = (_c = item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
13298
- contentName: (_e = item.video.title) !== null && _e !== void 0 ? _e : '',
13326
+ contentId: (_d = (_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
13327
+ contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
13299
13328
  imageStartTime: `${startTime}`,
13300
- contentTags: JSON.stringify((_f = item.video.tags) !== null && _f !== void 0 ? _f : []),
13329
+ contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
13301
13330
  position: activeIndex + '',
13302
13331
  contentFormat: 'image',
13303
- traceInfo: item.video.traceInfo
13332
+ traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
13304
13333
  }
13305
13334
  });
13306
13335
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
@@ -13446,15 +13475,15 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
13446
13475
  eventInfo: {
13447
13476
  eventSubject: 'playVideo',
13448
13477
  eventDescription: 'User played the video',
13449
- contentId: (_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
13450
- contentName: (_k = (_j = item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
13478
+ contentId: (_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
13479
+ contentName: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
13451
13480
  playType,
13452
13481
  startTime: videoCurrentTime,
13453
13482
  videoDuration,
13454
- contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
13483
+ contentTags: JSON.stringify((_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
13455
13484
  position: index + '',
13456
13485
  contentFormat: 'video',
13457
- traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
13486
+ traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
13458
13487
  }
13459
13488
  });
13460
13489
  setIsFirstPlay(false);
@@ -13503,15 +13532,15 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
13503
13532
  eventInfo: {
13504
13533
  eventSubject: 'playOverVideo',
13505
13534
  eventDescription: 'User finished playing the video',
13506
- contentId: (_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
13507
- contentName: (_k = (_j = item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
13535
+ contentId: (_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
13536
+ contentName: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
13508
13537
  endTime: videoCurrentTime,
13509
13538
  videoDuration,
13510
13539
  playDuration,
13511
- contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
13540
+ contentTags: JSON.stringify((_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
13512
13541
  position: index + '',
13513
13542
  contentFormat: 'video',
13514
- traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
13543
+ traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
13515
13544
  }
13516
13545
  });
13517
13546
  }
@@ -13548,10 +13577,10 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
13548
13577
  return;
13549
13578
  setIsPauseVideo(false);
13550
13579
  if (!videoRef.current.src) {
13551
- const videoSrc = rec.video.url;
13580
+ const videoSrc = rec === null || rec === void 0 ? void 0 : rec.video.url;
13552
13581
  if (videoSrc.includes('.m3u8')) {
13553
- if (Hls.isSupported()) {
13554
- const hls = new Hls();
13582
+ if (typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.Hls.isSupported())) {
13583
+ const hls = new window.Hls();
13555
13584
  hls.loadSource(videoSrc);
13556
13585
  hls.attachMedia(videoRef.current);
13557
13586
  }
@@ -13579,7 +13608,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
13579
13608
  (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('playing', handlePlaying);
13580
13609
  (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('loadeddata', handLoadeddata);
13581
13610
  };
13582
- }, [handleLoadedMetadata, handlePlaying, rec.video, handLoadeddata]);
13611
+ }, [handleLoadedMetadata, handlePlaying, rec === null || rec === void 0 ? void 0 : rec.video, handLoadeddata]);
13583
13612
  const renderPoster = React.useMemo(() => {
13584
13613
  if (!(sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image) || isLoadFinish) {
13585
13614
  return null;
@@ -13606,10 +13635,10 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
13606
13635
  }
13607
13636
  : {};
13608
13637
  }, [blur]);
13609
- if (!rec.video) {
13638
+ if (!(rec === null || rec === void 0 ? void 0 : rec.video)) {
13610
13639
  return null;
13611
13640
  }
13612
- return (React.createElement(React.Fragment, null, blur ? (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: {
13641
+ return (React.createElement(React.Fragment, null, blur ? (React.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, onClick: handleClickVideo(), style: {
13613
13642
  position: 'relative',
13614
13643
  width,
13615
13644
  height,
@@ -13634,7 +13663,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
13634
13663
  objectFit: 'contain'
13635
13664
  } }),
13636
13665
  React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON }))),
13637
- renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: {
13666
+ renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, onClick: handleClickVideo(), style: {
13638
13667
  position: 'relative',
13639
13668
  width,
13640
13669
  height,
@@ -13665,11 +13694,11 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
13665
13694
  }, [globalConfig, containerHeight, tagList]);
13666
13695
  const renderContent = (rec, index) => {
13667
13696
  var _a, _b, _c, _d;
13668
- if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
13697
+ if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
13669
13698
  return (React.createElement(VideoWidget$1, { rec: rec, index: index, muted: true, width: containerWidth, data: data !== null && data !== void 0 ? data : [], height: height, activeIndex: index, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost }));
13670
13699
  }
13671
- if ((_b = rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
13672
- return (React.createElement(PictureGroup$1, { key: rec.video.itemId, imgUrls: rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
13700
+ if ((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
13701
+ return (React.createElement(PictureGroup$1, { key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, imgUrls: rec === null || rec === void 0 ? void 0 : rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
13673
13702
  }
13674
13703
  if (rec.product) {
13675
13704
  if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _c === void 0 ? void 0 : _c.length) > 0) {
@@ -13703,15 +13732,15 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
13703
13732
  };
13704
13733
  const renderBottom = (rec, index) => {
13705
13734
  var _a, _b, _c, _d, _e, _f, _g;
13706
- if (rec.video) {
13735
+ if (rec === null || rec === void 0 ? void 0 : rec.video) {
13707
13736
  return (React.createElement(React.Fragment, null,
13708
- ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
13737
+ ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.title) && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
13709
13738
  React.createElement("div", { className: 'clc-sxp-bottom' },
13710
13739
  React.createElement(Nudge, { nudge: nudge }),
13711
13740
  CTA(rec, index),
13712
13741
  React.createElement("div", null,
13713
- React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }) })),
13714
- React.createElement(Hashtag$1, { index: index, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))));
13742
+ React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }) })),
13743
+ React.createElement(Hashtag$1, { index: index, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))));
13715
13744
  }
13716
13745
  return null;
13717
13746
  };
@@ -13725,7 +13754,7 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
13725
13754
  if (top < 40) {
13726
13755
  top += 40;
13727
13756
  }
13728
- if (rec.video) {
13757
+ if (rec === null || rec === void 0 ? void 0 : rec.video) {
13729
13758
  return (React.createElement(LikeButton$1, { key: rec.position, activeIcon: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIcon) !== null && _b !== void 0 ? _b : likeIcon, unActicveIcon: (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unlikeIcon) !== null && _c !== void 0 ? _c : unlikeIcon, position: index, active: rec.isCollected, recData: rec, className: 'clc-sxp-like-button', style: {
13730
13759
  top,
13731
13760
  right: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _d !== void 0 ? _d : 0
@@ -13837,7 +13866,7 @@ const Popup = () => {
13837
13866
  * @Author: binruan@chatlabs.com
13838
13867
  * @Date: 2024-01-15 19:03:09
13839
13868
  * @LastEditors: binruan@chatlabs.com
13840
- * @LastEditTime: 2024-05-06 17:26:37
13869
+ * @LastEditTime: 2024-05-17 18:41:05
13841
13870
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
13842
13871
  *
13843
13872
  */
@@ -13854,14 +13883,14 @@ Object.values(_materials_).forEach((v) => {
13854
13883
  RESOLVER[v.extend.type] = v;
13855
13884
  });
13856
13885
  const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
13857
- var _a, _b, _c, _d, _e, _f;
13886
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
13858
13887
  const utmVal = React.useMemo(() => {
13859
13888
  var _a;
13860
13889
  const searchParams = (location === null || location === void 0 ? void 0 : location.search) ? (_a = location === null || location === void 0 ? void 0 : location.search) === null || _a === void 0 ? void 0 : _a.replace('?', '') : '';
13861
13890
  return searchParams;
13862
13891
  }, []);
13863
13892
  return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
13864
- React.createElement(SxpDataSourceProvider$1, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, render: ({ rtcList, tagList }) => {
13893
+ React.createElement(SxpDataSourceProvider$1, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, isShowTag: (_j = (_h = (_g = data === null || data === void 0 ? void 0 : data.data) === null || _g === void 0 ? void 0 : _g.sxpPageConf) === null || _h === void 0 ? void 0 : _h.globalConfig) === null || _j === void 0 ? void 0 : _j.isShowTag, render: ({ rtcList, tagList }) => {
13865
13894
  var _a;
13866
13895
  return (React.createElement(React.Fragment, null,
13867
13896
  React.createElement(SxpPageRender, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER, licenseUrl: licenseUrl })),