pb-sxp-ui 1.16.6 → 1.16.8

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