pb-sxp-ui 1.16.9 → 1.16.10

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 +166 -131
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +166 -131
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +6 -6
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +6 -6
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +166 -131
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +6 -6
  12. package/dist/pb-ui.min.js.map +1 -1
  13. package/es/core/components/DiyPortalPreview/VideoWidget.js +10 -8
  14. package/es/core/components/SxpPageRender/LikeButton/index.js +17 -15
  15. package/es/core/components/SxpPageRender/PictureGroup/index.d.ts +5 -0
  16. package/es/core/components/SxpPageRender/PictureGroup/index.js +42 -13
  17. package/es/core/components/SxpPageRender/VideoWidget/index.js +34 -44
  18. package/es/core/components/SxpPageRender/WaterFall/index.js +4 -3
  19. package/es/core/components/SxpPageRender/index.js +47 -36
  20. package/es/core/context/SxpDataSourceProvider.js +6 -7
  21. package/es/core/hooks/useEventReport.js +6 -5
  22. package/lib/core/components/DiyPortalPreview/VideoWidget.js +10 -8
  23. package/lib/core/components/SxpPageRender/LikeButton/index.js +17 -15
  24. package/lib/core/components/SxpPageRender/PictureGroup/index.d.ts +5 -0
  25. package/lib/core/components/SxpPageRender/PictureGroup/index.js +41 -12
  26. package/lib/core/components/SxpPageRender/VideoWidget/index.js +34 -44
  27. package/lib/core/components/SxpPageRender/WaterFall/index.js +4 -3
  28. package/lib/core/components/SxpPageRender/index.js +47 -36
  29. package/lib/core/context/SxpDataSourceProvider.js +6 -7
  30. package/lib/core/hooks/useEventReport.js +6 -5
  31. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -817,15 +817,14 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
817
817
  if (!(query === null || query === void 0 ? void 0 : query.hashTag))
818
818
  setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
819
819
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
820
- let list = [];
821
- list = list.concat((_s = (_r = (_q = (_p = result === null || result === void 0 ? void 0 : result.data) === null || _p === void 0 ? void 0 : _p.recList) === null || _q === void 0 ? void 0 : _q.filter) === null || _r === void 0 ? void 0 : _r.call(_q, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _s !== void 0 ? _s : []);
822
- const isNotNullList = (_u = (_t = result === null || result === void 0 ? void 0 : result.data) === null || _t === void 0 ? void 0 : _t.recList) === null || _u === void 0 ? void 0 : _u.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
820
+ const isNotNullList = (_q = (_p = result === null || result === void 0 ? void 0 : result.data) === null || _p === void 0 ? void 0 : _p.recList) === null || _q === void 0 ? void 0 : _q.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
823
821
  if (!isNotNullList) {
824
822
  setIsNoMoreData(true);
825
823
  }
826
- return Object.assign(Object.assign({}, result.data), { recList: list });
827
824
  }
828
- return result === null || result === void 0 ? void 0 : result.data;
825
+ let list = [];
826
+ list = list.concat((_u = (_t = (_s = (_r = result === null || result === void 0 ? void 0 : result.data) === null || _r === void 0 ? void 0 : _r.recList) === null || _s === void 0 ? void 0 : _s.filter) === null || _t === void 0 ? void 0 : _t.call(_s, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _u !== void 0 ? _u : []);
827
+ return Object.assign(Object.assign({}, result.data), { recList: list });
829
828
  }), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList, channel, chatlabsId, bffFetchAdmin]);
830
829
  const loadVideos = useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
831
830
  var _1, _2, _3, _4;
@@ -1064,7 +1063,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1064
1063
  }
1065
1064
  }), [bffFetch, utmVal]);
1066
1065
  const ctaEvent = useCallback((eventInfo, rec, product, position) => {
1067
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
1066
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14;
1068
1067
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
1069
1068
  const isProd = ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) || (((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProducts) && ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProducts) === null || _d === void 0 ? void 0 : _d.length) > 0);
1070
1069
  let fromKName = '';
@@ -1082,7 +1081,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1082
1081
  }
1083
1082
  const contentTags = (_p = (_m = (_h = product === null || product === void 0 ? void 0 : product.tags) !== null && _h !== void 0 ? _h : (_l = (_k = (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : (_q = rec === null || rec === void 0 ? void 0 : rec.product) === null || _q === void 0 ? void 0 : _q.tags;
1084
1083
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1085
- eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_r = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _r !== void 0 ? _r : '', ctaName: (_s = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _s !== void 0 ? _s : '', contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_u = (_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_10 = (_7 = (_2 = (_y = (_v = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _v !== void 0 ? _v : (_x = (_w = rec === null || rec === void 0 ? void 0 : rec.video) === null || _w === void 0 ? void 0 : _w.bindCta) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_1 = (_0 = (_z = rec === null || rec === void 0 ? void 0 : rec.video) === null || _z === void 0 ? void 0 : _z.bindProduct) === null || _0 === void 0 ? void 0 : _0.bindCta) === null || _1 === void 0 ? void 0 : _1.traceInfo) !== null && _2 !== void 0 ? _2 : (_6 = (_5 = (_4 = (_3 = rec === null || rec === void 0 ? void 0 : rec.video) === null || _3 === void 0 ? void 0 : _3.bindProducts) === null || _4 === void 0 ? void 0 : _4[0]) === null || _5 === void 0 ? void 0 : _5.bindCta) === null || _6 === void 0 ? void 0 : _6.traceInfo) !== null && _7 !== void 0 ? _7 : (_9 = (_8 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _8 === void 0 ? void 0 : _8.bindCta) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : '', fromKName, fromKPage: (_11 = location === null || location === void 0 ? void 0 : location.href) !== null && _11 !== void 0 ? _11 : '', contentFormat })
1084
+ eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_r = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _r !== void 0 ? _r : '', ctaName: (_s = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _s !== void 0 ? _s : '', contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_u = (_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '', sceneId: (_x = (_w = (_v = rec === null || rec === void 0 ? void 0 : rec.video) === null || _v === void 0 ? void 0 : _v.scene) === null || _w === void 0 ? void 0 : _w.sceneId) !== null && _x !== void 0 ? _x : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_13 = (_10 = (_5 = (_1 = (_y = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _y !== void 0 ? _y : (_0 = (_z = rec === null || rec === void 0 ? void 0 : rec.video) === null || _z === void 0 ? void 0 : _z.bindCta) === null || _0 === void 0 ? void 0 : _0.traceInfo) !== null && _1 !== void 0 ? _1 : (_4 = (_3 = (_2 = rec === null || rec === void 0 ? void 0 : rec.video) === null || _2 === void 0 ? void 0 : _2.bindProduct) === null || _3 === void 0 ? void 0 : _3.bindCta) === null || _4 === void 0 ? void 0 : _4.traceInfo) !== null && _5 !== void 0 ? _5 : (_9 = (_8 = (_7 = (_6 = rec === null || rec === void 0 ? void 0 : rec.video) === null || _6 === void 0 ? void 0 : _6.bindProducts) === null || _7 === void 0 ? void 0 : _7[0]) === null || _8 === void 0 ? void 0 : _8.bindCta) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : (_12 = (_11 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _11 === void 0 ? void 0 : _11.bindCta) === null || _12 === void 0 ? void 0 : _12.traceInfo) !== null && _13 !== void 0 ? _13 : '', fromKName, fromKPage: (_14 = location === null || location === void 0 ? void 0 : location.href) !== null && _14 !== void 0 ? _14 : '', contentFormat })
1086
1085
  });
1087
1086
  }, [bffEventReport, isFromHashtag]);
1088
1087
  const h5EnterLink = useCallback(() => {
@@ -1743,14 +1742,14 @@ var settingRender$f = [
1743
1742
  * @Author: binruan@chatlabs.com
1744
1743
  * @Date: 2024-03-12 10:59:06
1745
1744
  * @LastEditors: binruan@chatlabs.com
1746
- * @LastEditTime: 2024-11-28 11:17:16
1745
+ * @LastEditTime: 2025-05-09 15:30:59
1747
1746
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1748
1747
  *
1749
1748
  */
1750
1749
  function useEventReport() {
1751
1750
  const { bffEventReport, popupDetailData, isFromHashtag, eventTimeList, setEventTimeList } = useSxpDataSource();
1752
1751
  const jumpToWeb = useCallback((e, data, product, cta, position, traceInfo) => {
1753
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13;
1752
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16;
1754
1753
  const i = eventTimeList === null || eventTimeList === void 0 ? void 0 : eventTimeList.findIndex((item) => item.target === (e === null || e === void 0 ? void 0 : e.target));
1755
1754
  if (i !== -1) {
1756
1755
  return;
@@ -1783,11 +1782,11 @@ function useEventReport() {
1783
1782
  contentFormat = 'image';
1784
1783
  }
1785
1784
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1786
- eventInfo: Object.assign({ eventSubject: 'jumpToWeb', eventDescription: 'User jumped to website', productId: (_v = product === null || product === void 0 ? void 0 : product.itemId) !== null && _v !== void 0 ? _v : '', productName: (_w = product === null || product === void 0 ? void 0 : product.title) !== null && _w !== void 0 ? _w : '', price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0', productCollection: (_x = product === null || product === void 0 ? void 0 : product.collection) !== null && _x !== void 0 ? _x : '', fromKName, fromKPage: location === null || location === void 0 ? void 0 : location.href, contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.itemId) !== null && _z !== void 0 ? _z : '', ctatId: (_0 = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _0 !== void 0 ? _0 : '', traceInfo: (_13 = (_10 = (_8 = (_4 = (_1 = traceInfo !== null && traceInfo !== void 0 ? traceInfo : product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _1 !== void 0 ? _1 : (_3 = (_2 = data === null || data === void 0 ? void 0 : data.video) === null || _2 === void 0 ? void 0 : _2.bindProduct) === null || _3 === void 0 ? void 0 : _3.traceInfo) !== null && _4 !== void 0 ? _4 : (_7 = (_6 = (_5 = data === null || data === void 0 ? void 0 : data.video) === null || _5 === void 0 ? void 0 : _5.bindProducts) === null || _6 === void 0 ? void 0 : _6[0]) === null || _7 === void 0 ? void 0 : _7.traceInfo) !== null && _8 !== void 0 ? _8 : (_9 = data === null || data === void 0 ? void 0 : data.product) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : (_12 = (_11 = data === null || data === void 0 ? void 0 : data.video) === null || _11 === void 0 ? void 0 : _11.bindCta) === null || _12 === void 0 ? void 0 : _12.traceInfo) !== null && _13 !== void 0 ? _13 : '' }, (contentFormat && { contentFormat }))
1785
+ eventInfo: Object.assign({ eventSubject: 'jumpToWeb', eventDescription: 'User jumped to website', productId: (_v = product === null || product === void 0 ? void 0 : product.itemId) !== null && _v !== void 0 ? _v : '', productName: (_w = product === null || product === void 0 ? void 0 : product.title) !== null && _w !== void 0 ? _w : '', price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0', productCollection: (_x = product === null || product === void 0 ? void 0 : product.collection) !== null && _x !== void 0 ? _x : '', fromKName, fromKPage: location === null || location === void 0 ? void 0 : location.href, contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.itemId) !== null && _z !== void 0 ? _z : '', sceneId: (_2 = (_1 = (_0 = data === null || data === void 0 ? void 0 : data.video) === null || _0 === void 0 ? void 0 : _0.scene) === null || _1 === void 0 ? void 0 : _1.sceneId) !== null && _2 !== void 0 ? _2 : '', ctatId: (_3 = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _3 !== void 0 ? _3 : '', traceInfo: (_16 = (_13 = (_11 = (_7 = (_4 = traceInfo !== null && traceInfo !== void 0 ? traceInfo : product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _4 !== void 0 ? _4 : (_6 = (_5 = data === null || data === void 0 ? void 0 : data.video) === null || _5 === void 0 ? void 0 : _5.bindProduct) === null || _6 === void 0 ? void 0 : _6.traceInfo) !== null && _7 !== void 0 ? _7 : (_10 = (_9 = (_8 = data === null || data === void 0 ? void 0 : data.video) === null || _8 === void 0 ? void 0 : _8.bindProducts) === null || _9 === void 0 ? void 0 : _9[0]) === null || _10 === void 0 ? void 0 : _10.traceInfo) !== null && _11 !== void 0 ? _11 : (_12 = data === null || data === void 0 ? void 0 : data.product) === null || _12 === void 0 ? void 0 : _12.traceInfo) !== null && _13 !== void 0 ? _13 : (_15 = (_14 = data === null || data === void 0 ? void 0 : data.video) === null || _14 === void 0 ? void 0 : _14.bindCta) === null || _15 === void 0 ? void 0 : _15.traceInfo) !== null && _16 !== void 0 ? _16 : '' }, (contentFormat && { contentFormat }))
1787
1786
  });
1788
1787
  }, [bffEventReport, popupDetailData, isFromHashtag, eventTimeList]);
1789
1788
  const productView = useCallback((data, product, cta, viewTime, position) => {
1790
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
1789
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
1791
1790
  let fromKName = '';
1792
1791
  if (popupDetailData && (((_b = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
1793
1792
  fromKName = 'pdpPage';
@@ -1806,8 +1805,9 @@ function useEventReport() {
1806
1805
  contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
1807
1806
  position: position + '',
1808
1807
  contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
1808
+ sceneId: (_g = (_f = (_e = data === null || data === void 0 ? void 0 : data.video) === null || _e === void 0 ? void 0 : _e.scene) === null || _f === void 0 ? void 0 : _f.sceneId) !== null && _g !== void 0 ? _g : '',
1809
1809
  ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
1810
- traceInfo: (_p = (_m = (_h = (_e = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _e !== void 0 ? _e : (_g = (_f = data === null || data === void 0 ? void 0 : data.video) === null || _f === void 0 ? void 0 : _f.bindProduct) === null || _g === void 0 ? void 0 : _g.traceInfo) !== null && _h !== void 0 ? _h : (_l = (_k = (_j = data === null || data === void 0 ? void 0 : data.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.traceInfo) !== null && _m !== void 0 ? _m : (_o = data === null || data === void 0 ? void 0 : data.product) === null || _o === void 0 ? void 0 : _o.traceInfo) !== null && _p !== void 0 ? _p : '',
1810
+ traceInfo: (_s = (_q = (_l = (_h = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _h !== void 0 ? _h : (_k = (_j = data === null || data === void 0 ? void 0 : data.video) === null || _j === void 0 ? void 0 : _j.bindProduct) === null || _k === void 0 ? void 0 : _k.traceInfo) !== null && _l !== void 0 ? _l : (_p = (_o = (_m = data === null || data === void 0 ? void 0 : data.video) === null || _m === void 0 ? void 0 : _m.bindProducts) === null || _o === void 0 ? void 0 : _o[0]) === null || _p === void 0 ? void 0 : _p.traceInfo) !== null && _q !== void 0 ? _q : (_r = data === null || data === void 0 ? void 0 : data.product) === null || _r === void 0 ? void 0 : _r.traceInfo) !== null && _s !== void 0 ? _s : '',
1811
1811
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
1812
1812
  eventSubject: 'productView',
1813
1813
  eventDescription: 'User browsed the product'
@@ -15610,7 +15610,7 @@ function WaterfallList(_a) {
15610
15610
  * @Author: binruan@chatlabs.com
15611
15611
  * @Date: 2024-01-10 10:58:24
15612
15612
  * @LastEditors: binruan@chatlabs.com
15613
- * @LastEditTime: 2025-02-28 10:00:31
15613
+ * @LastEditTime: 2025-05-09 15:30:41
15614
15614
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
15615
15615
  *
15616
15616
  */
@@ -15648,7 +15648,7 @@ const WaterFall = (props) => {
15648
15648
  }
15649
15649
  }, [waterFallData]);
15650
15650
  const reportTagsView = useCallback(() => {
15651
- var _a, _b, _c, _d, _e, _f;
15651
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
15652
15652
  const rec = recData === null || recData === void 0 ? void 0 : recData.rec;
15653
15653
  if (!rec)
15654
15654
  return;
@@ -15668,9 +15668,10 @@ const WaterFall = (props) => {
15668
15668
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
15669
15669
  eventInfo: {
15670
15670
  contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
15671
+ sceneId: (_g = (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.scene) === null || _f === void 0 ? void 0 : _f.sceneId) !== null && _g !== void 0 ? _g : '',
15671
15672
  position: cacheActiveIndex + '',
15672
- contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
15673
- traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
15673
+ contentTags: JSON.stringify((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.tags),
15674
+ traceInfo: (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.traceInfo,
15674
15675
  hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
15675
15676
  fromKName,
15676
15677
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
@@ -17752,7 +17753,7 @@ const LikeButton = (_a) => {
17752
17753
  const likeIcon = useIconLink(defaultLikeIconPath$2);
17753
17754
  const unlikeIcon = useIconLink(defaultUnLikeIconPath$2);
17754
17755
  const handleClick = debounce(() => __awaiter(void 0, void 0, void 0, function* () {
17755
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
17756
+ var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
17756
17757
  if (state) {
17757
17758
  // 先设置状态
17758
17759
  setState(false);
@@ -17762,11 +17763,12 @@ const LikeButton = (_a) => {
17762
17763
  eventSubject: 'favoriteContentCanceled',
17763
17764
  eventDescription: 'This content was unfavorite by the user',
17764
17765
  contentId: (_g = (_f = recData === null || recData === void 0 ? void 0 : recData.video) === null || _f === void 0 ? void 0 : _f.itemId) !== null && _g !== void 0 ? _g : '',
17765
- contentName: (_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.title) !== null && _j !== void 0 ? _j : '',
17766
- contentTags: JSON.stringify((_l = (_k = recData === null || recData === void 0 ? void 0 : recData.video) === null || _k === void 0 ? void 0 : _k.tags) !== null && _l !== void 0 ? _l : []),
17766
+ sceneId: (_k = (_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.scene) === null || _j === void 0 ? void 0 : _j.sceneId) !== null && _k !== void 0 ? _k : '',
17767
+ contentName: (_m = (_l = recData === null || recData === void 0 ? void 0 : recData.video) === null || _l === void 0 ? void 0 : _l.title) !== null && _m !== void 0 ? _m : '',
17768
+ contentTags: JSON.stringify((_p = (_o = recData === null || recData === void 0 ? void 0 : recData.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : []),
17767
17769
  position: position + '',
17768
- contentFormat: ((_m = recData === null || recData === void 0 ? void 0 : recData.video) === null || _m === void 0 ? void 0 : _m.url) ? 'video' : 'image',
17769
- traceInfo: (_o = recData === null || recData === void 0 ? void 0 : recData.video) === null || _o === void 0 ? void 0 : _o.traceInfo
17770
+ contentFormat: ((_q = recData === null || recData === void 0 ? void 0 : recData.video) === null || _q === void 0 ? void 0 : _q.url) ? 'video' : 'image',
17771
+ traceInfo: (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.traceInfo
17770
17772
  }
17771
17773
  });
17772
17774
  // 如果接口调用失败,则回滚状态
@@ -17774,40 +17776,41 @@ const LikeButton = (_a) => {
17774
17776
  setState(true);
17775
17777
  }
17776
17778
  else {
17777
- const nRtcList = (_p = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
17779
+ const nRtcList = (_s = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
17778
17780
  if (index === position) {
17779
17781
  item.isCollected = false;
17780
17782
  }
17781
17783
  return item;
17782
- })) !== null && _p !== void 0 ? _p : [];
17784
+ })) !== null && _s !== void 0 ? _s : [];
17783
17785
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
17784
17786
  }
17785
17787
  }
17786
17788
  else {
17787
17789
  setState(true);
17788
- const result = (_q = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _q !== void 0 ? _q : false;
17790
+ const result = (_t = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _t !== void 0 ? _t : false;
17789
17791
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
17790
17792
  eventInfo: {
17791
17793
  eventSubject: 'favoriteContent',
17792
17794
  eventDescription: 'This content was favorite by the user',
17793
- contentId: (_s = (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.itemId) !== null && _s !== void 0 ? _s : '',
17794
- contentName: (_u = (_t = recData === null || recData === void 0 ? void 0 : recData.video) === null || _t === void 0 ? void 0 : _t.title) !== null && _u !== void 0 ? _u : '',
17795
- contentTags: JSON.stringify((_w = (_v = recData === null || recData === void 0 ? void 0 : recData.video) === null || _v === void 0 ? void 0 : _v.tags) !== null && _w !== void 0 ? _w : []),
17795
+ contentId: (_v = (_u = recData === null || recData === void 0 ? void 0 : recData.video) === null || _u === void 0 ? void 0 : _u.itemId) !== null && _v !== void 0 ? _v : '',
17796
+ sceneId: (_y = (_x = (_w = recData === null || recData === void 0 ? void 0 : recData.video) === null || _w === void 0 ? void 0 : _w.scene) === null || _x === void 0 ? void 0 : _x.sceneId) !== null && _y !== void 0 ? _y : '',
17797
+ contentName: (_0 = (_z = recData === null || recData === void 0 ? void 0 : recData.video) === null || _z === void 0 ? void 0 : _z.title) !== null && _0 !== void 0 ? _0 : '',
17798
+ contentTags: JSON.stringify((_2 = (_1 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _1 === void 0 ? void 0 : _1.tags) !== null && _2 !== void 0 ? _2 : []),
17796
17799
  position: position + '',
17797
- contentFormat: ((_x = recData === null || recData === void 0 ? void 0 : recData.video) === null || _x === void 0 ? void 0 : _x.url) ? 'video' : 'image',
17798
- traceInfo: (_y = recData === null || recData === void 0 ? void 0 : recData.video) === null || _y === void 0 ? void 0 : _y.traceInfo
17800
+ contentFormat: ((_3 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _3 === void 0 ? void 0 : _3.url) ? 'video' : 'image',
17801
+ traceInfo: (_4 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _4 === void 0 ? void 0 : _4.traceInfo
17799
17802
  }
17800
17803
  });
17801
17804
  if (!result) {
17802
17805
  setState(false);
17803
17806
  }
17804
17807
  else {
17805
- const nRtcList = (_z = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
17808
+ const nRtcList = (_5 = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
17806
17809
  if (index === position) {
17807
17810
  item.isCollected = true;
17808
17811
  }
17809
17812
  return item;
17810
- })) !== null && _z !== void 0 ? _z : [];
17813
+ })) !== null && _5 !== void 0 ? _5 : [];
17811
17814
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
17812
17815
  }
17813
17816
  }
@@ -17910,6 +17913,26 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
17910
17913
  return;
17911
17914
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
17912
17915
  }, [videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
17916
+ const handleEnd = () => {
17917
+ var _a, _b, _c, _d, _e, _f, _g, _h;
17918
+ if (!videoRef.current)
17919
+ return;
17920
+ if (isDiyH5) {
17921
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.pause();
17922
+ if (!loopPlayRef.current)
17923
+ return;
17924
+ if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
17925
+ (_c = (_b = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _b === void 0 ? void 0 : _b.swiper) === null || _c === void 0 ? void 0 : _c.slideTo(0);
17926
+ }
17927
+ else {
17928
+ const i = (_e = (_d = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _d === void 0 ? void 0 : _d.swiper) === null || _e === void 0 ? void 0 : _e.activeIndex;
17929
+ (_g = (_f = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _f === void 0 ? void 0 : _f.swiper) === null || _g === void 0 ? void 0 : _g.slideTo(i + 1);
17930
+ }
17931
+ }
17932
+ else {
17933
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.play();
17934
+ }
17935
+ };
17913
17936
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
17914
17937
  const handlePlaying = useCallback(() => {
17915
17938
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
@@ -17918,7 +17941,7 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
17918
17941
  setIsLoadFinish(true);
17919
17942
  }, []);
17920
17943
  const handleStartPlay = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
17921
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
17944
+ var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
17922
17945
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
17923
17946
  return;
17924
17947
  setIsPauseVideo(false);
@@ -17929,16 +17952,11 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
17929
17952
  const videoCurrentTime = ((_h = (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.currentTime) !== null && _h !== void 0 ? _h : 0).toFixed(2);
17930
17953
  const playType = (isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) ? '0' : '1';
17931
17954
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
17932
- eventInfo: Object.assign({ eventSubject: 'playVideo', eventDescription: 'User played the video', contentId: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.itemId) !== null && _k !== void 0 ? _k : '', contentName: (_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.title) !== null && _m !== void 0 ? _m : '', playType, startTime: videoCurrentTime, videoDuration, contentTags: JSON.stringify((_p = (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : []), position: index + '', contentFormat: 'video', traceInfo: (_q = item === null || item === void 0 ? void 0 : item.video) === null || _q === void 0 ? void 0 : _q.traceInfo }, ((isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) && { loadTime: (loadedTimeRef === null || loadedTimeRef === void 0 ? void 0 : loadedTimeRef.current) - (initTimeRef === null || initTimeRef === void 0 ? void 0 : initTimeRef.current) + '' }))
17955
+ eventInfo: Object.assign({ eventSubject: 'playVideo', eventDescription: 'User played the video', contentId: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.itemId) !== null && _k !== void 0 ? _k : '', sceneId: (_o = (_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.scene) === null || _m === void 0 ? void 0 : _m.sceneId) !== null && _o !== void 0 ? _o : '', contentName: (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.title) !== null && _q !== void 0 ? _q : '', playType, startTime: videoCurrentTime, videoDuration, contentTags: JSON.stringify((_s = (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.tags) !== null && _s !== void 0 ? _s : []), position: index + '', contentFormat: 'video', traceInfo: (_t = item === null || item === void 0 ? void 0 : item.video) === null || _t === void 0 ? void 0 : _t.traceInfo }, ((isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) && { loadTime: (loadedTimeRef === null || loadedTimeRef === void 0 ? void 0 : loadedTimeRef.current) - (initTimeRef === null || initTimeRef === void 0 ? void 0 : initTimeRef.current) + '' }))
17933
17956
  });
17934
17957
  isFirstPlayRef.current = false;
17935
17958
  }
17936
17959
  }), [bffEventReport, data, index, isFirstPlayRef, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
17937
- const setCurrentTimeByStartTime = useCallback(() => {
17938
- if (isDiyH5) {
17939
- videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
17940
- }
17941
- }, []);
17942
17960
  const handLoadeddata = useCallback(() => {
17943
17961
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || firstFrameSrc || !blur)
17944
17962
  return;
@@ -17963,13 +17981,12 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
17963
17981
  const handleLoadedmetadata = useCallback(() => {
17964
17982
  if (!videoRef.current)
17965
17983
  return;
17966
- setCurrentTimeByStartTime();
17967
17984
  loadedTimeRef.current = new Date();
17968
17985
  handleStartPlay();
17969
17986
  handLoadeddata();
17970
17987
  }, [videoRef.current, handLoadeddata, handleStartPlay]);
17971
17988
  const handleClickVideo = useCallback((type) => () => {
17972
- var _a, _b, _c, _d, _e, _f;
17989
+ var _a, _b, _c, _d, _e;
17973
17990
  if (!videoRef.current)
17974
17991
  return;
17975
17992
  if (!isLoadFinish)
@@ -17990,20 +18007,17 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
17990
18007
  break;
17991
18008
  default:
17992
18009
  if (isPause) {
17993
- if (isDiyH5 && Math.round((_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.currentTime) >= (scene === null || scene === void 0 ? void 0 : scene.endTime)) {
17994
- videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
17995
- }
17996
- (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
18010
+ (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
17997
18011
  }
17998
18012
  else {
17999
- (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
18013
+ (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.pause();
18000
18014
  }
18001
18015
  setIsPauseVideo(!isPause);
18002
18016
  break;
18003
18017
  }
18004
18018
  }, [isLoadFinish, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18005
18019
  const handlePause = useCallback(() => {
18006
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
18020
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
18007
18021
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
18008
18022
  return;
18009
18023
  if (activeIndex !== index)
@@ -18019,14 +18033,15 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18019
18033
  eventSubject: 'playOverVideo',
18020
18034
  eventDescription: 'User finished playing the video',
18021
18035
  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 : '',
18022
- 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 : '',
18036
+ sceneId: (_l = (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.scene) === null || _k === void 0 ? void 0 : _k.sceneId) !== null && _l !== void 0 ? _l : '',
18037
+ contentName: (_o = (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.title) !== null && _o !== void 0 ? _o : '',
18023
18038
  endTime: videoCurrentTime,
18024
18039
  videoDuration,
18025
18040
  playDuration,
18026
- 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 : []),
18041
+ contentTags: JSON.stringify((_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.tags) !== null && _q !== void 0 ? _q : []),
18027
18042
  position: index + '',
18028
18043
  contentFormat: 'video',
18029
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
18044
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
18030
18045
  }
18031
18046
  });
18032
18047
  }
@@ -18034,27 +18049,8 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18034
18049
  const handleWaiting = useCallback(() => {
18035
18050
  setWaiting(true);
18036
18051
  }, []);
18037
- const handleTimeUpload = () => {
18038
- if (!videoRef.current || !isDiyH5)
18039
- return;
18040
- setTimeout(() => {
18041
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
18042
- if (Math.round((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.currentTime) >= ((_b = scene === null || scene === void 0 ? void 0 : scene.endTime) !== null && _b !== void 0 ? _b : 0)) {
18043
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
18044
- if (!loopPlayRef.current)
18045
- return;
18046
- if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
18047
- (_e = (_d = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _d === void 0 ? void 0 : _d.swiper) === null || _e === void 0 ? void 0 : _e.slideTo(0);
18048
- }
18049
- else {
18050
- const i = (_g = (_f = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _f === void 0 ? void 0 : _f.swiper) === null || _g === void 0 ? void 0 : _g.activeIndex;
18051
- (_j = (_h = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _h === void 0 ? void 0 : _h.swiper) === null || _j === void 0 ? void 0 : _j.slideTo(i + 1);
18052
- }
18053
- }
18054
- });
18055
- };
18056
18052
  useEffect(() => {
18057
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18053
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18058
18054
  if (!isActive)
18059
18055
  return;
18060
18056
  const videoSrc = videoUrl;
@@ -18075,7 +18071,6 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18075
18071
  hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
18076
18072
  hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
18077
18073
  var _a;
18078
- setCurrentTimeByStartTime();
18079
18074
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
18080
18075
  });
18081
18076
  }
@@ -18089,12 +18084,11 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18089
18084
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('play', handleStartPlay);
18090
18085
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
18091
18086
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.addEventListener('pause', handlePause);
18092
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handlePlay);
18087
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handleEnd);
18093
18088
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
18094
18089
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
18095
- (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.addEventListener('timeupdate', handleTimeUpload);
18096
18090
  return () => {
18097
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18091
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18098
18092
  const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
18099
18093
  if (!isPause)
18100
18094
  handlePause();
@@ -18106,10 +18100,9 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18106
18100
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('play', handleStartPlay);
18107
18101
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('playing', handlePlaying);
18108
18102
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('pause', handlePause);
18109
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handlePlay);
18103
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handleEnd);
18110
18104
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('canplay', handlePlay);
18111
18105
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.removeEventListener('waiting', handleWaiting);
18112
- (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.removeEventListener('timeupdate', handleTimeUpload);
18113
18106
  };
18114
18107
  }, [isActive]);
18115
18108
  useEffect(() => {
@@ -18320,19 +18313,48 @@ const Picture = (props) => {
18320
18313
  }, onLoad: onShowFirstImage }))));
18321
18314
  };
18322
18315
 
18323
- const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig }) => {
18316
+ const PictureGroup$4 = forwardRef(({ imgUrls, data, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig, swiperRef }, ref) => {
18324
18317
  var _a, _b;
18325
18318
  const { isActive } = useSwiperSlide();
18326
- const { sxpParameter, openHashtag } = useSxpDataSource();
18319
+ const { sxpParameter, openHashtag, isDiyH5 } = useSxpDataSource();
18327
18320
  const [isLoad, setIsLoad] = useState(false);
18328
18321
  const [imgInfo, setImgInfo] = useState();
18329
18322
  const [swiperActiveIndex, setSwiperActiveIndex] = useState(0);
18330
- const swiperRef = useRef();
18323
+ const imgsSwiperRef = useRef();
18331
18324
  const isFirstPlayRef = useRef(true);
18325
+ const loopPlayRef = useRef(true);
18332
18326
  const initTime = new Date();
18327
+ useImperativeHandle(ref, () => {
18328
+ return {
18329
+ setLoopPlay(v) {
18330
+ loopPlayRef.current = v;
18331
+ }
18332
+ };
18333
+ });
18334
+ useEffect(() => {
18335
+ let timerId;
18336
+ if (isLoad && isActive && isDiyH5) {
18337
+ timerId = setTimeout(() => {
18338
+ var _a, _b, _c, _d, _e, _f;
18339
+ if (!loopPlayRef.current)
18340
+ return;
18341
+ if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
18342
+ (_b = (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) === null || _b === void 0 ? void 0 : _b.slideTo(0);
18343
+ }
18344
+ else {
18345
+ const i = (_d = (_c = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper) === null || _d === void 0 ? void 0 : _d.activeIndex;
18346
+ (_f = (_e = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _e === void 0 ? void 0 : _e.swiper) === null || _f === void 0 ? void 0 : _f.slideTo(i + 1);
18347
+ }
18348
+ }, 3000);
18349
+ }
18350
+ return () => {
18351
+ if (timerId)
18352
+ clearTimeout(timerId);
18353
+ };
18354
+ }, [isLoad, isActive, isDiyH5, data, index, swiperRef]);
18333
18355
  useEffect(() => {
18334
18356
  if (isLoad && isActive) {
18335
- (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.start();
18357
+ (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.start();
18336
18358
  if (openHashtag) {
18337
18359
  onViewImageEndEvent(rec);
18338
18360
  }
@@ -18342,7 +18364,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
18342
18364
  }
18343
18365
  }
18344
18366
  else {
18345
- (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.stop();
18367
+ (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.stop();
18346
18368
  }
18347
18369
  }, [rec, isActive, onViewImageEndEvent, openHashtag, index, onViewImageStartEvent, isLoad, imgInfo]);
18348
18370
  const showFirstImageFn = useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
@@ -18369,13 +18391,13 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
18369
18391
  };
18370
18392
  }, [isActive, imgInfo]);
18371
18393
  const handleMouseEnter = useCallback(() => {
18372
- if (swiperRef.current && swiperRef.current.swiper && isAlly) {
18373
- swiperRef.current.swiper.autoplay.stop();
18394
+ if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
18395
+ imgsSwiperRef.current.swiper.autoplay.stop();
18374
18396
  }
18375
18397
  }, []);
18376
18398
  const handleMouseLeave = useCallback(() => {
18377
- if (swiperRef.current && swiperRef.current.swiper && isAlly) {
18378
- swiperRef.current.swiper.autoplay.start();
18399
+ if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
18400
+ imgsSwiperRef.current.swiper.autoplay.start();
18379
18401
  }
18380
18402
  }, []);
18381
18403
  const handleSlideChange = useCallback((swiper) => {
@@ -18396,7 +18418,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
18396
18418
  enabled: true
18397
18419
  }
18398
18420
  }
18399
- : {}), { loop: true, ref: swiperRef, onSlideChange: handleSlideChange, className: css(Object.assign(Object.assign({ '.swiper-pagination': {
18421
+ : {}), { loop: true, ref: imgsSwiperRef, onSlideChange: handleSlideChange, className: css(Object.assign(Object.assign({ '.swiper-pagination': {
18400
18422
  bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
18401
18423
  fontSize: '14px'
18402
18424
  } }, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor) && {
@@ -18413,7 +18435,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
18413
18435
  return (React.createElement(SwiperSlide, { key: srcKey, "aria-hidden": srcKey !== swiperActiveIndex },
18414
18436
  React.createElement(Picture, { src: !isLoad && srcKey > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
18415
18437
  }))));
18416
- };
18438
+ });
18417
18439
  var PictureGroup$5 = memo(PictureGroup$4);
18418
18440
 
18419
18441
  /*
@@ -18693,7 +18715,7 @@ var NavBack$1 = memo(NavBack);
18693
18715
  * @Author: binruan@chatlabs.com
18694
18716
  * @Date: 2024-03-20 10:27:31
18695
18717
  * @LastEditors: binruan@chatlabs.com
18696
- * @LastEditTime: 2025-05-09 15:51:40
18718
+ * @LastEditTime: 2025-05-12 14:26:15
18697
18719
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
18698
18720
  *
18699
18721
  */
@@ -18713,6 +18735,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18713
18735
  const skipLinkRef = useRef(false);
18714
18736
  const [pageNum, setPageNum] = useState(2);
18715
18737
  const videoWidgetRef = useRef(null);
18738
+ const pictureGroupRef = useRef(null);
18716
18739
  const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview, isEditor, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, isNoMoreData, channel, refreshFeSession, isDiyH5 } = useSxpDataSource();
18717
18740
  const { backMainFeed, productView, jumpToWeb } = useEventReport();
18718
18741
  const isShowFingerTip = useMemo(() => {
@@ -18760,7 +18783,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18760
18783
  (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
18761
18784
  }, [data, ctaType, swiperRef]);
18762
18785
  const handleSessionCompleted = useCallback((fk) => {
18763
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
18786
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
18764
18787
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
18765
18788
  let fromKName = '';
18766
18789
  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))) {
@@ -18787,12 +18810,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18787
18810
  eventSubject: 'sessionCompleted',
18788
18811
  eventDescription: 'Session completed',
18789
18812
  contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
18790
- productId: (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.itemId,
18813
+ sceneId: (_q = (_p = (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.scene) === null || _p === void 0 ? void 0 : _p.sceneId) !== null && _q !== void 0 ? _q : '',
18814
+ productId: (_r = item === null || item === void 0 ? void 0 : item.product) === null || _r === void 0 ? void 0 : _r.itemId,
18791
18815
  position: activeIndex + '',
18792
18816
  fromKName: fk || fromKName,
18793
18817
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
18794
- ctatId: (_r = (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.bindCta) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
18795
- traceInfo: (_v = (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : (_u = item === null || item === void 0 ? void 0 : item.product) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : ''
18818
+ ctatId: (_u = (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.bindCta) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '',
18819
+ traceInfo: (_y = (_w = (_v = item === null || item === void 0 ? void 0 : item.video) === null || _v === void 0 ? void 0 : _v.traceInfo) !== null && _w !== void 0 ? _w : (_x = item === null || item === void 0 ? void 0 : item.product) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : ''
18796
18820
  }
18797
18821
  });
18798
18822
  }, [data, bffEventReport, activeIndex, popupDetailData, tempMap, isFromHashtag, curTime]);
@@ -18851,8 +18875,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18851
18875
  refreshFeSession
18852
18876
  ]);
18853
18877
  const handleSessionExpire = useCallback(debounce(() => {
18854
- var _a;
18878
+ var _a, _b;
18855
18879
  (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
18880
+ (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
18856
18881
  refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(false, handleSessionCompleted);
18857
18882
  }, 1000), [handleSessionCompleted, refreshFeSession]);
18858
18883
  useEffect(() => {
@@ -18922,18 +18947,18 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18922
18947
  return null;
18923
18948
  }, [globalConfig, activeIndex, visList]);
18924
18949
  const renderContent = useCallback((rec, index) => {
18925
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18950
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
18926
18951
  if (rec === 'organic menu') {
18927
18952
  return (React.createElement(MultiPosts$2, Object.assign({ recData: data === null || data === void 0 ? void 0 : data[1] }, (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props, (_f = (_e = (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.item) === null || _f === void 0 ? void 0 : _f.event)));
18928
18953
  }
18929
- if ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.url) {
18954
+ if (((_h = (_g = rec.video) === null || _g === void 0 ? void 0 : _g.scene) === null || _h === void 0 ? void 0 : _h.mediaUrl) || ((_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.url)) {
18930
18955
  return (React.createElement(VideoWidget$5, Object.assign({ key: isReload }, (activeIndex === index && { ref: videoWidgetRef }), { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, videoPlayIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPlayIcon, loopPlay: true, swiperRef: swiperRef })));
18931
18956
  }
18932
- if ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.imgUrls) {
18933
- return (React.createElement(PictureGroup$5, { 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, onViewImageEndEvent: handleViewImageStartEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
18957
+ if ((_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.imgUrls) {
18958
+ return (React.createElement(PictureGroup$5, Object.assign({ data: data }, (activeIndex === index && { ref: pictureGroupRef }), { 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, onViewImageEndEvent: handleViewImageStartEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost, swiperRef: swiperRef })));
18934
18959
  }
18935
- if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_j = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _j === void 0 ? void 0 : _j.length) > 0) {
18936
- return (_k = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _k === void 0 ? void 0 : _k.map((value, idx) => {
18960
+ if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_l = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _l === void 0 ? void 0 : _l.length) > 0) {
18961
+ return (_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _m === void 0 ? void 0 : _m.map((value, idx) => {
18937
18962
  var _a, _b, _c, _d, _e, _f, _g, _h;
18938
18963
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
18939
18964
  const Component = withBindDataSource(t);
@@ -18971,7 +18996,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18971
18996
  };
18972
18997
  }, [isShowMore]);
18973
18998
  const renderBottom = useCallback((rec, index) => {
18974
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18999
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
18975
19000
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
18976
19001
  let cta = null;
18977
19002
  if ((_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) {
@@ -18980,24 +19005,27 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18980
19005
  else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
18981
19006
  cta = '商品CTA';
18982
19007
  }
19008
+ else if (tempMap && ((_d = Object.keys(tempMap)) === null || _d === void 0 ? void 0 : _d.includes('服务CTA')) && ((_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta) === null || _f === void 0 ? void 0 : _f.itemId)) {
19009
+ cta = '服务CTA';
19010
+ }
18983
19011
  else {
18984
- cta = (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
19012
+ cta = (_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindCta) === null || _h === void 0 ? void 0 : _h.itemId;
18985
19013
  }
18986
19014
  const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
18987
19015
  const isNineProduct = (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.nineProductEnable) &&
18988
19016
  index === ((rtcList === null || rtcList === void 0 ? void 0 : rtcList[0]) === 'organic menu' ? 2 : 1) &&
18989
- ((_f = ['MultiCommodity', 'MultiCommodityDiro', 'MultiCommodityDiroNew']) === null || _f === void 0 ? void 0 : _f.includes((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.type));
19017
+ ((_j = ['MultiCommodity', 'MultiCommodityDiro', 'MultiCommodityDiroNew']) === null || _j === void 0 ? void 0 : _j.includes((_k = value === null || value === void 0 ? void 0 : value.item) === null || _k === void 0 ? void 0 : _k.type));
18990
19018
  return (React.createElement(React.Fragment, null,
18991
19019
  isNineProduct && (React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value, isNineProduct: isNineProduct })),
18992
- ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
18993
- React.createElement("div", { className: 'clc-sxp-bottom', style: { marginBottom: `${(_j = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _j !== void 0 ? _j : 40}px` } },
19020
+ ((_l = rec === null || rec === void 0 ? void 0 : rec.video) === null || _l === void 0 ? void 0 : _l.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
19021
+ React.createElement("div", { className: 'clc-sxp-bottom', style: { marginBottom: `${(_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _m !== void 0 ? _m : 40}px` } },
18994
19022
  React.createElement(Nudge, { nudge: nudge }),
18995
19023
  ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) && !isNineProduct ? (React.createElement("div", { className: 'clc-sxp-bottom-card' },
18996
19024
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value }))) : null,
18997
19025
  React.createElement("div", null,
18998
- 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: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.title) !== null && _l !== void 0 ? _l : '', 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 }),
19026
+ 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: (_p = (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.title) !== null && _p !== void 0 ? _p : '', 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 }),
18999
19027
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex, value: value }),
19000
- React.createElement(Hashtag$1, { index: activeIndex, tags: (_o = (_m = rec === null || rec === void 0 ? void 0 : rec.video) === null || _m === void 0 ? void 0 : _m.hashTags) !== null && _o !== void 0 ? _o : [], itemId: (_p = rec === null || rec === void 0 ? void 0 : rec.video) === null || _p === void 0 ? void 0 : _p.itemId, itemType: ((_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle, hashTagRightMargin: containerWidth - (hashTagRightMargin !== null && hashTagRightMargin !== void 0 ? hashTagRightMargin : 0) }))),
19028
+ React.createElement(Hashtag$1, { index: activeIndex, tags: (_r = (_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.hashTags) !== null && _r !== void 0 ? _r : [], itemId: (_s = rec === null || rec === void 0 ? void 0 : rec.video) === null || _s === void 0 ? void 0 : _s.itemId, itemType: ((_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle, hashTagRightMargin: containerWidth - (hashTagRightMargin !== null && hashTagRightMargin !== void 0 ? hashTagRightMargin : 0) }))),
19001
19029
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex, value: value })));
19002
19030
  }
19003
19031
  return null;
@@ -19036,7 +19064,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19036
19064
  return null;
19037
19065
  }, [globalConfig, waterFallData]);
19038
19066
  const handleViewImageStartEnd = (item) => {
19039
- var _a, _b, _c, _d, _e, _f;
19067
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
19040
19068
  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)) {
19041
19069
  const endTime = Date.now();
19042
19070
  const duration = viewImageStartTime.current === 0 ? 0 : (endTime - viewImageStartTime.current) / 1000;
@@ -19045,10 +19073,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19045
19073
  eventSubject: 'viewImageCarouselEnd',
19046
19074
  eventDescription: 'User end view the image carousel',
19047
19075
  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 : '',
19048
- contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
19076
+ sceneId: (_g = (_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.scene) === null || _f === void 0 ? void 0 : _f.sceneId) !== null && _g !== void 0 ? _g : '',
19077
+ contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19049
19078
  imageEndTime: `${endTime}`,
19050
19079
  playDuration: `${duration}`,
19051
- contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
19080
+ contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19052
19081
  position: activeIndex + '',
19053
19082
  contentFormat: 'image',
19054
19083
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
@@ -19057,7 +19086,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19057
19086
  }
19058
19087
  };
19059
19088
  const handleSlideSkip = (item, position) => {
19060
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
19089
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
19061
19090
  if (isPreview || waterFallData)
19062
19091
  return;
19063
19092
  const t = new Date() - curTime.current;
@@ -19083,7 +19112,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19083
19112
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
19084
19113
  position: position + '',
19085
19114
  contentId: (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.itemId) !== null && _t !== void 0 ? _t : '',
19086
- traceInfo: (_x = (_v = (_u = item === null || item === void 0 ? void 0 : item.video) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : (_w = item === null || item === void 0 ? void 0 : item.product) === null || _w === void 0 ? void 0 : _w.traceInfo) !== null && _x !== void 0 ? _x : '',
19115
+ sceneId: (_w = (_v = (_u = item === null || item === void 0 ? void 0 : item.video) === null || _u === void 0 ? void 0 : _u.scene) === null || _v === void 0 ? void 0 : _v.sceneId) !== null && _w !== void 0 ? _w : '',
19116
+ traceInfo: (_0 = (_y = (_x = item === null || item === void 0 ? void 0 : item.video) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_z = item === null || item === void 0 ? void 0 : item.product) === null || _z === void 0 ? void 0 : _z.traceInfo) !== null && _0 !== void 0 ? _0 : '',
19087
19117
  contentFormat
19088
19118
  }
19089
19119
  });
@@ -19093,7 +19123,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19093
19123
  }
19094
19124
  };
19095
19125
  const handleScrollEvent = (swiper) => {
19096
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
19126
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
19097
19127
  const item = data[swiper.previousIndex];
19098
19128
  if (!item)
19099
19129
  return;
@@ -19110,11 +19140,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19110
19140
  eventSubject: 'scrollDown',
19111
19141
  eventDescription: 'User scroll down',
19112
19142
  contentId: (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.itemId) !== null && _e !== void 0 ? _e : '',
19113
- productId: (_g = (_f = item === null || item === void 0 ? void 0 : item.product) === null || _f === void 0 ? void 0 : _f.itemId) !== null && _g !== void 0 ? _g : '',
19143
+ sceneId: (_h = (_g = (_f = item === null || item === void 0 ? void 0 : item.video) === null || _f === void 0 ? void 0 : _f.scene) === null || _g === void 0 ? void 0 : _g.sceneId) !== null && _h !== void 0 ? _h : '',
19144
+ productId: (_k = (_j = item === null || item === void 0 ? void 0 : item.product) === null || _j === void 0 ? void 0 : _j.itemId) !== null && _k !== void 0 ? _k : '',
19114
19145
  requestId: null,
19115
- traceInfo: (_l = (_j = (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.traceInfo) !== null && _j !== void 0 ? _j : (_k = item === null || item === void 0 ? void 0 : item.product) === null || _k === void 0 ? void 0 : _k.traceInfo) !== null && _l !== void 0 ? _l : '',
19146
+ traceInfo: (_p = (_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.traceInfo) !== null && _m !== void 0 ? _m : (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.traceInfo) !== null && _p !== void 0 ? _p : '',
19116
19147
  contentFormat,
19117
- position: ((_m = swiper.previousIndex) !== null && _m !== void 0 ? _m : 0) + ''
19148
+ position: ((_q = swiper.previousIndex) !== null && _q !== void 0 ? _q : 0) + ''
19118
19149
  }
19119
19150
  });
19120
19151
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19126,12 +19157,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19126
19157
  eventInfo: {
19127
19158
  eventSubject: 'scrollUp',
19128
19159
  eventDescription: 'User scroll up',
19129
- contentId: (_p = (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.itemId) !== null && _p !== void 0 ? _p : '',
19130
- productId: (_r = (_q = item.product) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
19160
+ contentId: (_s = (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.itemId) !== null && _s !== void 0 ? _s : '',
19161
+ sceneId: (_v = (_u = (_t = item === null || item === void 0 ? void 0 : item.video) === null || _t === void 0 ? void 0 : _t.scene) === null || _u === void 0 ? void 0 : _u.sceneId) !== null && _v !== void 0 ? _v : '',
19162
+ productId: (_x = (_w = item.product) === null || _w === void 0 ? void 0 : _w.itemId) !== null && _x !== void 0 ? _x : '',
19131
19163
  requestId: null,
19132
- traceInfo: (_v = (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : (_u = item === null || item === void 0 ? void 0 : item.product) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : '',
19164
+ traceInfo: (_1 = (_z = (_y = item === null || item === void 0 ? void 0 : item.video) === null || _y === void 0 ? void 0 : _y.traceInfo) !== null && _z !== void 0 ? _z : (_0 = item === null || item === void 0 ? void 0 : item.product) === null || _0 === void 0 ? void 0 : _0.traceInfo) !== null && _1 !== void 0 ? _1 : '',
19133
19165
  contentFormat,
19134
- position: ((_w = swiper.previousIndex) !== null && _w !== void 0 ? _w : 0) + ''
19166
+ position: ((_2 = swiper.previousIndex) !== null && _2 !== void 0 ? _2 : 0) + ''
19135
19167
  }
19136
19168
  });
19137
19169
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19157,7 +19189,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19157
19189
  }
19158
19190
  }, [openHashtag, data, activeIndex]);
19159
19191
  const handleViewImageStartEvent = (activeIndex, imgInfo, enableCapi) => {
19160
- var _a, _b, _c, _d, _e, _f, _g, _h;
19192
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
19161
19193
  const item = data[activeIndex];
19162
19194
  // 如果是图片集则上报事件
19163
19195
  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)) {
@@ -19168,9 +19200,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19168
19200
  eventSubject: 'viewImageCarouselStart',
19169
19201
  eventDescription: 'User start view the image carousel',
19170
19202
  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 : '',
19171
- contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
19203
+ sceneId: (_g = (_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.scene) === null || _f === void 0 ? void 0 : _f.sceneId) !== null && _g !== void 0 ? _g : '',
19204
+ contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19172
19205
  imageStartTime: `${startTime}`,
19173
- contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
19206
+ contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19174
19207
  position: activeIndex + '',
19175
19208
  contentFormat: 'image',
19176
19209
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo,
@@ -19180,11 +19213,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19180
19213
  if (enableCapi) {
19181
19214
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19182
19215
  eventName: 'ViewContent',
19183
- product: (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.bindProduct
19216
+ product: (_k = item === null || item === void 0 ? void 0 : item.video) === null || _k === void 0 ? void 0 : _k.bindProduct
19184
19217
  });
19185
19218
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19186
19219
  eventName: 'PageView',
19187
- product: (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProduct
19220
+ product: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.bindProduct
19188
19221
  });
19189
19222
  }
19190
19223
  }
@@ -19337,7 +19370,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19337
19370
  }, []);
19338
19371
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
19339
19372
  const handlePlaying = useCallback(() => {
19340
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
19373
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
19341
19374
  setIsPauseVideo(false);
19342
19375
  const item = data[index];
19343
19376
  if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
@@ -19350,14 +19383,15 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19350
19383
  eventSubject: 'playVideo',
19351
19384
  eventDescription: 'User played the video',
19352
19385
  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 : '',
19353
- 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 : '',
19386
+ sceneId: (_l = (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.scene) === null || _k === void 0 ? void 0 : _k.sceneId) !== null && _l !== void 0 ? _l : '',
19387
+ contentName: (_o = (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.title) !== null && _o !== void 0 ? _o : '',
19354
19388
  playType,
19355
19389
  startTime: videoCurrentTime,
19356
19390
  videoDuration,
19357
- 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 : []),
19391
+ contentTags: JSON.stringify((_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.tags) !== null && _q !== void 0 ? _q : []),
19358
19392
  position: index + '',
19359
19393
  contentFormat: 'video',
19360
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
19394
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
19361
19395
  }
19362
19396
  });
19363
19397
  setIsFirstPlay(false);
@@ -19396,7 +19430,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19396
19430
  }
19397
19431
  }, [isLoadFinish]);
19398
19432
  const onPause = useCallback(() => {
19399
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
19433
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
19400
19434
  const item = data[index];
19401
19435
  const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
19402
19436
  const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
@@ -19407,14 +19441,15 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19407
19441
  eventSubject: 'playOverVideo',
19408
19442
  eventDescription: 'User finished playing the video',
19409
19443
  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 : '',
19410
- 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 : '',
19444
+ sceneId: (_l = (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.scene) === null || _k === void 0 ? void 0 : _k.sceneId) !== null && _l !== void 0 ? _l : '',
19445
+ contentName: (_o = (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.title) !== null && _o !== void 0 ? _o : '',
19411
19446
  endTime: videoCurrentTime,
19412
19447
  videoDuration,
19413
19448
  playDuration,
19414
- 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 : []),
19449
+ contentTags: JSON.stringify((_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.tags) !== null && _q !== void 0 ? _q : []),
19415
19450
  position: index + '',
19416
19451
  contentFormat: 'video',
19417
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
19452
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
19418
19453
  }
19419
19454
  });
19420
19455
  }