pb-sxp-ui 1.16.16 → 1.16.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/index.cjs +183 -132
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +183 -132
  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 +183 -132
  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 +39 -13
  17. package/es/core/components/SxpPageRender/VideoWidget/index.js +32 -45
  18. package/es/core/components/SxpPageRender/WaterFall/index.js +4 -3
  19. package/es/core/components/SxpPageRender/index.js +53 -37
  20. package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
  21. package/es/core/context/SxpDataSourceProvider.js +22 -6
  22. package/es/core/hooks/useEventReport.js +6 -5
  23. package/lib/core/components/DiyPortalPreview/VideoWidget.js +10 -8
  24. package/lib/core/components/SxpPageRender/LikeButton/index.js +17 -15
  25. package/lib/core/components/SxpPageRender/PictureGroup/index.d.ts +5 -0
  26. package/lib/core/components/SxpPageRender/PictureGroup/index.js +38 -12
  27. package/lib/core/components/SxpPageRender/VideoWidget/index.js +32 -45
  28. package/lib/core/components/SxpPageRender/WaterFall/index.js +4 -3
  29. package/lib/core/components/SxpPageRender/index.js +53 -37
  30. package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
  31. package/lib/core/context/SxpDataSourceProvider.js +22 -6
  32. package/lib/core/hooks/useEventReport.js +6 -5
  33. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -644,6 +644,7 @@ const DEFAULT_TAG = 'FOR U';
644
644
  const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isOpenConsent = false, isEditor = false, utmParameter, channelQueryList, data, dataList, isDiyH5, onUpdateSchema, onUpdateChannel }) => {
645
645
  var _a, _b, _c, _d, _e;
646
646
  const [rtcList, setRtcList] = React.useState([]);
647
+ const [firstRtcList, setFirstRtcList] = React.useState([]);
647
648
  const [tagList, setTagList] = React.useState([]);
648
649
  const [loading, setLoading] = React.useState(true);
649
650
  const [curReqInfo, setCurReqInfo] = React.useState({ rtc: '', requestId: '' });
@@ -737,7 +738,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
737
738
  }, [bffDataSource]);
738
739
  // bff API 请求方法
739
740
  const bffFetch = React.useCallback((path, options, isBota = true) => {
740
- var _a;
741
+ var _a, _b;
741
742
  if (!bffDataSource)
742
743
  return;
743
744
  const url = bffDataSource.url;
@@ -751,7 +752,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
751
752
  val.split('=')[1];
752
753
  });
753
754
  return window
754
- .fetch(`${url}/api/${path}`, Object.assign({ headers: Object.assign({ 'Content-Type': 'application/json', 'x-user-id': fakeUserId }, bffDataSource.headers), method: options.method, body: options.type === 'beacon' && isBota
755
+ .fetch(`${url}/api/${path}`, Object.assign({ headers: Object.assign({ 'Content-Type': 'application/json', 'x-user-id': fakeUserId, tenant_id: (_b = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _b === void 0 ? void 0 : _b['x-app-id'] }, bffDataSource.headers), method: options.method, body: options.type === 'beacon' && isBota
755
756
  ? JSON.stringify({
756
757
  body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
757
758
  })
@@ -995,6 +996,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
995
996
  if ((rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) === 0) {
996
997
  setRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
997
998
  setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
999
+ if (isDiyH5) {
1000
+ setFirstRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
1001
+ }
998
1002
  }
999
1003
  const isNotNullList = (_0 = (_z = result === null || result === void 0 ? void 0 : result.data) === null || _z === void 0 ? void 0 : _z.recList) === null || _0 === void 0 ? void 0 : _0.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
1000
1004
  if (isNotNullList) {
@@ -1034,12 +1038,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1034
1038
  if (rtcList.length <= 0) {
1035
1039
  return;
1036
1040
  }
1041
+ if (isDiyH5 && (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) > 0) {
1042
+ setRtcList(rtcList.concat(firstRtcList));
1043
+ setCacheRtcList(cacheRtcList.concat(firstRtcList));
1044
+ return;
1045
+ }
1037
1046
  const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
1038
1047
  const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_1 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _1 === void 0 ? void 0 : _1.itemId) && { productFilter: [(_2 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _2 === void 0 ? void 0 : _2.itemId] })), (((_3 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _3 === void 0 ? void 0 : _3.itemId) && { contentFilter: [(_4 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _4 === void 0 ? void 0 : _4.itemId] })), { themeTag: themeTag.current }), ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor && { pageNum })));
1039
1048
  setRtcList(rtcList.concat(getFilterRecList(data)));
1040
1049
  setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
1041
1050
  return data;
1042
- }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
1051
+ }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList, isDiyH5, firstRtcList]);
1043
1052
  const refreshFeSession = React.useCallback((enableReSid, event) => {
1044
1053
  var _a, _b, _c, _d, _e;
1045
1054
  let expire = false;
@@ -1266,7 +1275,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1266
1275
  }
1267
1276
  }), [bffFetch, utmVal]);
1268
1277
  const ctaEvent = React.useCallback((eventInfo, rec, product, position) => {
1269
- 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;
1278
+ 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;
1270
1279
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
1271
1280
  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);
1272
1281
  let fromKName = '';
@@ -1284,7 +1293,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1284
1293
  }
1285
1294
  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;
1286
1295
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1287
- 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 })
1296
+ 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 })
1288
1297
  });
1289
1298
  }, [bffEventReport, isFromHashtag]);
1290
1299
  const h5EnterLink = React.useCallback(() => {
@@ -1386,6 +1395,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1386
1395
  }
1387
1396
  setRtcList(list);
1388
1397
  setCacheRtcList(list);
1398
+ if (isDiyH5) {
1399
+ setFirstRtcList(list);
1400
+ }
1389
1401
  bffGetTagList(curData !== null && curData !== void 0 ? curData : finalPageData);
1390
1402
  if (channel) {
1391
1403
  const item = list === null || list === void 0 ? void 0 : list[0];
@@ -1421,6 +1433,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1421
1433
  }
1422
1434
  setRtcList(list);
1423
1435
  setCacheRtcList(list);
1436
+ if (isDiyH5) {
1437
+ setFirstRtcList(list);
1438
+ }
1424
1439
  }
1425
1440
  })
1426
1441
  .finally(() => {
@@ -1484,7 +1499,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1484
1499
  refreshFeSession,
1485
1500
  getAccount,
1486
1501
  accountSonsent,
1487
- isDiyH5
1502
+ isDiyH5,
1503
+ firstRtcList
1488
1504
  } }, isShowConsent ? (React.createElement(Consent$4, Object.assign({}, (_e = (_d = (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.item) === null || _e === void 0 ? void 0 : _e.props))) : (render({
1489
1505
  rtcList,
1490
1506
  mutateLike: bffMutateLike,
@@ -1945,14 +1961,14 @@ var settingRender$f = [
1945
1961
  * @Author: binruan@chatlabs.com
1946
1962
  * @Date: 2024-03-12 10:59:06
1947
1963
  * @LastEditors: binruan@chatlabs.com
1948
- * @LastEditTime: 2024-11-28 11:17:16
1964
+ * @LastEditTime: 2025-05-09 15:30:59
1949
1965
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1950
1966
  *
1951
1967
  */
1952
1968
  function useEventReport() {
1953
1969
  const { bffEventReport, popupDetailData, isFromHashtag, eventTimeList, setEventTimeList } = useSxpDataSource();
1954
1970
  const jumpToWeb = React.useCallback((e, data, product, cta, position, traceInfo) => {
1955
- 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;
1971
+ 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;
1956
1972
  const i = eventTimeList === null || eventTimeList === void 0 ? void 0 : eventTimeList.findIndex((item) => item.target === (e === null || e === void 0 ? void 0 : e.target));
1957
1973
  if (i !== -1) {
1958
1974
  return;
@@ -1985,11 +2001,11 @@ function useEventReport() {
1985
2001
  contentFormat = 'image';
1986
2002
  }
1987
2003
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1988
- 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 }))
2004
+ 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 }))
1989
2005
  });
1990
2006
  }, [bffEventReport, popupDetailData, isFromHashtag, eventTimeList]);
1991
2007
  const productView = React.useCallback((data, product, cta, viewTime, position) => {
1992
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
2008
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
1993
2009
  let fromKName = '';
1994
2010
  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))) {
1995
2011
  fromKName = 'pdpPage';
@@ -2008,8 +2024,9 @@ function useEventReport() {
2008
2024
  contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
2009
2025
  position: position + '',
2010
2026
  contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
2027
+ 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 : '',
2011
2028
  ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
2012
- 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 : '',
2029
+ 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 : '',
2013
2030
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
2014
2031
  eventSubject: 'productView',
2015
2032
  eventDescription: 'User browsed the product'
@@ -15824,7 +15841,7 @@ function WaterfallList(_a) {
15824
15841
  * @Author: binruan@chatlabs.com
15825
15842
  * @Date: 2024-01-10 10:58:24
15826
15843
  * @LastEditors: binruan@chatlabs.com
15827
- * @LastEditTime: 2025-02-28 10:00:31
15844
+ * @LastEditTime: 2025-05-09 15:30:41
15828
15845
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
15829
15846
  *
15830
15847
  */
@@ -15862,7 +15879,7 @@ const WaterFall = (props) => {
15862
15879
  }
15863
15880
  }, [waterFallData]);
15864
15881
  const reportTagsView = React.useCallback(() => {
15865
- var _a, _b, _c, _d, _e, _f;
15882
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
15866
15883
  const rec = recData === null || recData === void 0 ? void 0 : recData.rec;
15867
15884
  if (!rec)
15868
15885
  return;
@@ -15882,9 +15899,10 @@ const WaterFall = (props) => {
15882
15899
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
15883
15900
  eventInfo: {
15884
15901
  contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
15902
+ 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 : '',
15885
15903
  position: cacheActiveIndex + '',
15886
- contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
15887
- traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
15904
+ contentTags: JSON.stringify((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.tags),
15905
+ traceInfo: (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.traceInfo,
15888
15906
  hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
15889
15907
  fromKName,
15890
15908
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
@@ -17966,7 +17984,7 @@ const LikeButton = (_a) => {
17966
17984
  const likeIcon = useIconLink(defaultLikeIconPath$2);
17967
17985
  const unlikeIcon = useIconLink(defaultUnLikeIconPath$2);
17968
17986
  const handleClick = lodash.debounce(() => __awaiter(void 0, void 0, void 0, function* () {
17969
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
17987
+ 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;
17970
17988
  if (state) {
17971
17989
  // 先设置状态
17972
17990
  setState(false);
@@ -17976,11 +17994,12 @@ const LikeButton = (_a) => {
17976
17994
  eventSubject: 'favoriteContentCanceled',
17977
17995
  eventDescription: 'This content was unfavorite by the user',
17978
17996
  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 : '',
17979
- 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 : '',
17980
- 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 : []),
17997
+ 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 : '',
17998
+ 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 : '',
17999
+ 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 : []),
17981
18000
  position: position + '',
17982
- contentFormat: ((_m = recData === null || recData === void 0 ? void 0 : recData.video) === null || _m === void 0 ? void 0 : _m.url) ? 'video' : 'image',
17983
- traceInfo: (_o = recData === null || recData === void 0 ? void 0 : recData.video) === null || _o === void 0 ? void 0 : _o.traceInfo
18001
+ contentFormat: ((_q = recData === null || recData === void 0 ? void 0 : recData.video) === null || _q === void 0 ? void 0 : _q.url) ? 'video' : 'image',
18002
+ traceInfo: (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.traceInfo
17984
18003
  }
17985
18004
  });
17986
18005
  // 如果接口调用失败,则回滚状态
@@ -17988,40 +18007,41 @@ const LikeButton = (_a) => {
17988
18007
  setState(true);
17989
18008
  }
17990
18009
  else {
17991
- const nRtcList = (_p = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18010
+ const nRtcList = (_s = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
17992
18011
  if (index === position) {
17993
18012
  item.isCollected = false;
17994
18013
  }
17995
18014
  return item;
17996
- })) !== null && _p !== void 0 ? _p : [];
18015
+ })) !== null && _s !== void 0 ? _s : [];
17997
18016
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
17998
18017
  }
17999
18018
  }
18000
18019
  else {
18001
18020
  setState(true);
18002
- const result = (_q = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _q !== void 0 ? _q : false;
18021
+ const result = (_t = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _t !== void 0 ? _t : false;
18003
18022
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18004
18023
  eventInfo: {
18005
18024
  eventSubject: 'favoriteContent',
18006
18025
  eventDescription: 'This content was favorite by the user',
18007
- 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 : '',
18008
- 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 : '',
18009
- 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 : []),
18026
+ 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 : '',
18027
+ 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 : '',
18028
+ 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 : '',
18029
+ 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 : []),
18010
18030
  position: position + '',
18011
- contentFormat: ((_x = recData === null || recData === void 0 ? void 0 : recData.video) === null || _x === void 0 ? void 0 : _x.url) ? 'video' : 'image',
18012
- traceInfo: (_y = recData === null || recData === void 0 ? void 0 : recData.video) === null || _y === void 0 ? void 0 : _y.traceInfo
18031
+ contentFormat: ((_3 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _3 === void 0 ? void 0 : _3.url) ? 'video' : 'image',
18032
+ traceInfo: (_4 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _4 === void 0 ? void 0 : _4.traceInfo
18013
18033
  }
18014
18034
  });
18015
18035
  if (!result) {
18016
18036
  setState(false);
18017
18037
  }
18018
18038
  else {
18019
- const nRtcList = (_z = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18039
+ const nRtcList = (_5 = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18020
18040
  if (index === position) {
18021
18041
  item.isCollected = true;
18022
18042
  }
18023
18043
  return item;
18024
- })) !== null && _z !== void 0 ? _z : [];
18044
+ })) !== null && _5 !== void 0 ? _5 : [];
18025
18045
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
18026
18046
  }
18027
18047
  }
@@ -18058,7 +18078,7 @@ const mountVideoPlayerAtNode = (() => {
18058
18078
  const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activeIndex, videoPostConfig, videoPlayIcon, loopPlay, swiperRef }, ref) => {
18059
18079
  var _a, _b;
18060
18080
  const [isPauseVideo, setIsPauseVideo] = React.useState(false);
18061
- const { bffEventReport, sxpParameter, waterFallData, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
18081
+ const { bffEventReport, sxpParameter, firstRtcList, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
18062
18082
  const videoStartTime = React.useRef(0);
18063
18083
  const [isLoadFinish, setIsLoadFinish] = React.useState(false);
18064
18084
  const { isActive } = useSwiperSlide();
@@ -18124,6 +18144,23 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18124
18144
  return;
18125
18145
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
18126
18146
  }, [videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18147
+ const handleEnd = () => {
18148
+ var _a, _b, _c, _d, _e, _f;
18149
+ if (!videoRef.current)
18150
+ return;
18151
+ if (isDiyH5) {
18152
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.pause();
18153
+ if (!loopPlayRef.current)
18154
+ return;
18155
+ if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
18156
+ const i = (_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.activeIndex;
18157
+ (_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(i + 1);
18158
+ }
18159
+ }
18160
+ else {
18161
+ (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.play();
18162
+ }
18163
+ };
18127
18164
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
18128
18165
  const handlePlaying = React.useCallback(() => {
18129
18166
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
@@ -18132,7 +18169,7 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18132
18169
  setIsLoadFinish(true);
18133
18170
  }, []);
18134
18171
  const handleStartPlay = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
18135
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18172
+ var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
18136
18173
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
18137
18174
  return;
18138
18175
  setIsPauseVideo(false);
@@ -18143,16 +18180,11 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18143
18180
  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);
18144
18181
  const playType = (isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) ? '0' : '1';
18145
18182
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18146
- 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) + '' }))
18183
+ 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) + '' }))
18147
18184
  });
18148
18185
  isFirstPlayRef.current = false;
18149
18186
  }
18150
18187
  }), [bffEventReport, data, index, isFirstPlayRef, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18151
- const setCurrentTimeByStartTime = React.useCallback(() => {
18152
- if (isDiyH5) {
18153
- videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
18154
- }
18155
- }, []);
18156
18188
  const handLoadeddata = React.useCallback(() => {
18157
18189
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || firstFrameSrc || !blur)
18158
18190
  return;
@@ -18177,13 +18209,12 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18177
18209
  const handleLoadedmetadata = React.useCallback(() => {
18178
18210
  if (!videoRef.current)
18179
18211
  return;
18180
- setCurrentTimeByStartTime();
18181
18212
  loadedTimeRef.current = new Date();
18182
18213
  handleStartPlay();
18183
18214
  handLoadeddata();
18184
18215
  }, [videoRef.current, handLoadeddata, handleStartPlay]);
18185
18216
  const handleClickVideo = React.useCallback((type) => () => {
18186
- var _a, _b, _c, _d, _e, _f;
18217
+ var _a, _b, _c, _d, _e;
18187
18218
  if (!videoRef.current)
18188
18219
  return;
18189
18220
  if (!isLoadFinish)
@@ -18204,20 +18235,17 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18204
18235
  break;
18205
18236
  default:
18206
18237
  if (isPause) {
18207
- 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)) {
18208
- videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
18209
- }
18210
- (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
18238
+ (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
18211
18239
  }
18212
18240
  else {
18213
- (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
18241
+ (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.pause();
18214
18242
  }
18215
18243
  setIsPauseVideo(!isPause);
18216
18244
  break;
18217
18245
  }
18218
18246
  }, [isLoadFinish, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18219
18247
  const handlePause = React.useCallback(() => {
18220
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
18248
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
18221
18249
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
18222
18250
  return;
18223
18251
  if (activeIndex !== index)
@@ -18233,14 +18261,15 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18233
18261
  eventSubject: 'playOverVideo',
18234
18262
  eventDescription: 'User finished playing the video',
18235
18263
  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 : '',
18236
- 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 : '',
18264
+ 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 : '',
18265
+ 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 : '',
18237
18266
  endTime: videoCurrentTime,
18238
18267
  videoDuration,
18239
18268
  playDuration,
18240
- 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 : []),
18269
+ 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 : []),
18241
18270
  position: index + '',
18242
18271
  contentFormat: 'video',
18243
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
18272
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
18244
18273
  }
18245
18274
  });
18246
18275
  }
@@ -18248,27 +18277,8 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18248
18277
  const handleWaiting = React.useCallback(() => {
18249
18278
  setWaiting(true);
18250
18279
  }, []);
18251
- const handleTimeUpload = () => {
18252
- if (!videoRef.current || !isDiyH5)
18253
- return;
18254
- setTimeout(() => {
18255
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
18256
- 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)) {
18257
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
18258
- if (!loopPlayRef.current)
18259
- return;
18260
- if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
18261
- (_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);
18262
- }
18263
- else {
18264
- 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;
18265
- (_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);
18266
- }
18267
- }
18268
- });
18269
- };
18270
18280
  React.useEffect(() => {
18271
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18281
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18272
18282
  if (!isActive)
18273
18283
  return;
18274
18284
  const videoSrc = videoUrl;
@@ -18289,7 +18299,6 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18289
18299
  hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
18290
18300
  hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
18291
18301
  var _a;
18292
- setCurrentTimeByStartTime();
18293
18302
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
18294
18303
  });
18295
18304
  }
@@ -18303,12 +18312,11 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18303
18312
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('play', handleStartPlay);
18304
18313
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
18305
18314
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.addEventListener('pause', handlePause);
18306
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handlePlay);
18315
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handleEnd);
18307
18316
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
18308
18317
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
18309
- (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.addEventListener('timeupdate', handleTimeUpload);
18310
18318
  return () => {
18311
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18319
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18312
18320
  const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
18313
18321
  if (!isPause)
18314
18322
  handlePause();
@@ -18320,10 +18328,9 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18320
18328
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('play', handleStartPlay);
18321
18329
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('playing', handlePlaying);
18322
18330
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('pause', handlePause);
18323
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handlePlay);
18331
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handleEnd);
18324
18332
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('canplay', handlePlay);
18325
18333
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.removeEventListener('waiting', handleWaiting);
18326
- (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.removeEventListener('timeupdate', handleTimeUpload);
18327
18334
  };
18328
18335
  }, [isActive]);
18329
18336
  React.useEffect(() => {
@@ -18534,19 +18541,45 @@ const Picture = (props) => {
18534
18541
  }, onLoad: onShowFirstImage }))));
18535
18542
  };
18536
18543
 
18537
- const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig }) => {
18544
+ const PictureGroup$4 = React.forwardRef(({ imgUrls, data, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig, swiperRef }, ref) => {
18538
18545
  var _a, _b;
18539
18546
  const { isActive } = useSwiperSlide();
18540
- const { sxpParameter, openHashtag } = useSxpDataSource();
18547
+ const { firstRtcList, openHashtag, isDiyH5 } = useSxpDataSource();
18541
18548
  const [isLoad, setIsLoad] = React.useState(false);
18542
18549
  const [imgInfo, setImgInfo] = React.useState();
18543
18550
  const [swiperActiveIndex, setSwiperActiveIndex] = React.useState(0);
18544
- const swiperRef = React.useRef();
18551
+ const imgsSwiperRef = React.useRef();
18545
18552
  const isFirstPlayRef = React.useRef(true);
18553
+ const loopPlayRef = React.useRef(true);
18546
18554
  const initTime = new Date();
18555
+ React.useImperativeHandle(ref, () => {
18556
+ return {
18557
+ setLoopPlay(v) {
18558
+ loopPlayRef.current = v;
18559
+ }
18560
+ };
18561
+ });
18562
+ React.useEffect(() => {
18563
+ let timerId;
18564
+ if (isLoad && isActive && isDiyH5) {
18565
+ timerId = setTimeout(() => {
18566
+ var _a, _b, _c, _d;
18567
+ if (!loopPlayRef.current)
18568
+ return;
18569
+ if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
18570
+ const i = (_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.activeIndex;
18571
+ (_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.slideTo(i + 1);
18572
+ }
18573
+ }, 3000);
18574
+ }
18575
+ return () => {
18576
+ if (timerId)
18577
+ clearTimeout(timerId);
18578
+ };
18579
+ }, [isLoad, isActive, isDiyH5, index, swiperRef, firstRtcList]);
18547
18580
  React.useEffect(() => {
18548
18581
  if (isLoad && isActive) {
18549
- (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.start();
18582
+ (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.start();
18550
18583
  if (openHashtag) {
18551
18584
  onViewImageEndEvent(rec);
18552
18585
  }
@@ -18556,7 +18589,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
18556
18589
  }
18557
18590
  }
18558
18591
  else {
18559
- (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.stop();
18592
+ (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.stop();
18560
18593
  }
18561
18594
  }, [rec, isActive, onViewImageEndEvent, openHashtag, index, onViewImageStartEvent, isLoad, imgInfo]);
18562
18595
  const showFirstImageFn = React.useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
@@ -18583,13 +18616,13 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
18583
18616
  };
18584
18617
  }, [isActive, imgInfo]);
18585
18618
  const handleMouseEnter = React.useCallback(() => {
18586
- if (swiperRef.current && swiperRef.current.swiper && isAlly) {
18587
- swiperRef.current.swiper.autoplay.stop();
18619
+ if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
18620
+ imgsSwiperRef.current.swiper.autoplay.stop();
18588
18621
  }
18589
18622
  }, []);
18590
18623
  const handleMouseLeave = React.useCallback(() => {
18591
- if (swiperRef.current && swiperRef.current.swiper && isAlly) {
18592
- swiperRef.current.swiper.autoplay.start();
18624
+ if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
18625
+ imgsSwiperRef.current.swiper.autoplay.start();
18593
18626
  }
18594
18627
  }, []);
18595
18628
  const handleSlideChange = React.useCallback((swiper) => {
@@ -18610,7 +18643,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
18610
18643
  enabled: true
18611
18644
  }
18612
18645
  }
18613
- : {}), { loop: true, ref: swiperRef, onSlideChange: handleSlideChange, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': {
18646
+ : {}), { loop: true, ref: imgsSwiperRef, onSlideChange: handleSlideChange, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': {
18614
18647
  bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
18615
18648
  fontSize: '14px'
18616
18649
  } }, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor) && {
@@ -18627,7 +18660,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
18627
18660
  return (React.createElement(SwiperSlide, { key: srcKey, "aria-hidden": srcKey !== swiperActiveIndex },
18628
18661
  React.createElement(Picture, { src: !isLoad && srcKey > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
18629
18662
  }))));
18630
- };
18663
+ });
18631
18664
  var PictureGroup$5 = React.memo(PictureGroup$4);
18632
18665
 
18633
18666
  /*
@@ -18907,7 +18940,7 @@ var NavBack$1 = React.memo(NavBack);
18907
18940
  * @Author: binruan@chatlabs.com
18908
18941
  * @Date: 2024-03-20 10:27:31
18909
18942
  * @LastEditors: binruan@chatlabs.com
18910
- * @LastEditTime: 2025-05-09 15:51:40
18943
+ * @LastEditTime: 2025-05-12 14:26:15
18911
18944
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
18912
18945
  *
18913
18946
  */
@@ -18927,6 +18960,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18927
18960
  const skipLinkRef = React.useRef(false);
18928
18961
  const [pageNum, setPageNum] = React.useState(2);
18929
18962
  const videoWidgetRef = React.useRef(null);
18963
+ const pictureGroupRef = React.useRef(null);
18930
18964
  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();
18931
18965
  const { backMainFeed, productView, jumpToWeb } = useEventReport();
18932
18966
  const isShowFingerTip = React.useMemo(() => {
@@ -18974,7 +19008,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18974
19008
  (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
18975
19009
  }, [data, ctaType, swiperRef]);
18976
19010
  const handleSessionCompleted = React.useCallback((fk) => {
18977
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
19011
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
18978
19012
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
18979
19013
  let fromKName = '';
18980
19014
  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))) {
@@ -19001,12 +19035,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19001
19035
  eventSubject: 'sessionCompleted',
19002
19036
  eventDescription: 'Session completed',
19003
19037
  contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
19004
- productId: (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.itemId,
19038
+ 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 : '',
19039
+ productId: (_r = item === null || item === void 0 ? void 0 : item.product) === null || _r === void 0 ? void 0 : _r.itemId,
19005
19040
  position: activeIndex + '',
19006
19041
  fromKName: fk || fromKName,
19007
19042
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
19008
- 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 : '',
19009
- 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 : ''
19043
+ 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 : '',
19044
+ 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 : ''
19010
19045
  }
19011
19046
  });
19012
19047
  }, [data, bffEventReport, activeIndex, popupDetailData, tempMap, isFromHashtag, curTime]);
@@ -19065,8 +19100,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19065
19100
  refreshFeSession
19066
19101
  ]);
19067
19102
  const handleSessionExpire = React.useCallback(lodash.debounce(() => {
19068
- var _a;
19103
+ var _a, _b;
19069
19104
  (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
19105
+ (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
19070
19106
  refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(false, handleSessionCompleted);
19071
19107
  }, 1000), [handleSessionCompleted, refreshFeSession]);
19072
19108
  React.useEffect(() => {
@@ -19136,18 +19172,18 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19136
19172
  return null;
19137
19173
  }, [globalConfig, activeIndex, visList]);
19138
19174
  const renderContent = React.useCallback((rec, index) => {
19139
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
19175
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
19140
19176
  if (rec === 'organic menu') {
19141
19177
  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)));
19142
19178
  }
19143
- if ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.url) {
19179
+ 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)) {
19144
19180
  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 })));
19145
19181
  }
19146
- if ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.imgUrls) {
19147
- 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 }));
19182
+ if ((_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.imgUrls) {
19183
+ 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 })));
19148
19184
  }
19149
- 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) {
19150
- return (_k = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _k === void 0 ? void 0 : _k.map((value, idx) => {
19185
+ 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) {
19186
+ return (_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _m === void 0 ? void 0 : _m.map((value, idx) => {
19151
19187
  var _a, _b, _c, _d, _e, _f, _g, _h;
19152
19188
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
19153
19189
  const Component = withBindDataSource(t);
@@ -19185,7 +19221,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19185
19221
  };
19186
19222
  }, [isShowMore]);
19187
19223
  const renderBottom = React.useCallback((rec, index) => {
19188
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
19224
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
19189
19225
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
19190
19226
  let cta = null;
19191
19227
  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) {
@@ -19194,24 +19230,27 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19194
19230
  else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
19195
19231
  cta = '商品CTA';
19196
19232
  }
19233
+ 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)) {
19234
+ cta = '服务CTA';
19235
+ }
19197
19236
  else {
19198
- 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;
19237
+ 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;
19199
19238
  }
19200
19239
  const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
19201
19240
  const isNineProduct = (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.nineProductEnable) &&
19202
19241
  index === ((rtcList === null || rtcList === void 0 ? void 0 : rtcList[0]) === 'organic menu' ? 2 : 1) &&
19203
- ((_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));
19242
+ ((_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));
19204
19243
  return (React.createElement(React.Fragment, null,
19205
19244
  isNineProduct && (React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value, isNineProduct: isNineProduct })),
19206
- ((_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' }),
19207
- 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` } },
19245
+ ((_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' }),
19246
+ 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` } },
19208
19247
  React.createElement(Nudge, { nudge: nudge }),
19209
19248
  ((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' },
19210
19249
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value }))) : null,
19211
19250
  React.createElement("div", null,
19212
- 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 }),
19251
+ 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 }),
19213
19252
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex, value: value }),
19214
- 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) }))),
19253
+ 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) }))),
19215
19254
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex, value: value })));
19216
19255
  }
19217
19256
  return null;
@@ -19250,7 +19289,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19250
19289
  return null;
19251
19290
  }, [globalConfig, waterFallData]);
19252
19291
  const handleViewImageStartEnd = (item) => {
19253
- var _a, _b, _c, _d, _e, _f;
19292
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
19254
19293
  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)) {
19255
19294
  const endTime = Date.now();
19256
19295
  const duration = viewImageStartTime.current === 0 ? 0 : (endTime - viewImageStartTime.current) / 1000;
@@ -19259,10 +19298,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19259
19298
  eventSubject: 'viewImageCarouselEnd',
19260
19299
  eventDescription: 'User end view the image carousel',
19261
19300
  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 : '',
19262
- contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
19301
+ 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 : '',
19302
+ contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19263
19303
  imageEndTime: `${endTime}`,
19264
19304
  playDuration: `${duration}`,
19265
- contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
19305
+ contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19266
19306
  position: activeIndex + '',
19267
19307
  contentFormat: 'image',
19268
19308
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
@@ -19271,7 +19311,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19271
19311
  }
19272
19312
  };
19273
19313
  const handleSlideSkip = (item, position) => {
19274
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
19314
+ 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;
19275
19315
  if (isPreview || waterFallData)
19276
19316
  return;
19277
19317
  const t = new Date() - curTime.current;
@@ -19297,7 +19337,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19297
19337
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
19298
19338
  position: position + '',
19299
19339
  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 : '',
19300
- 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 : '',
19340
+ 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 : '',
19341
+ 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 : '',
19301
19342
  contentFormat
19302
19343
  }
19303
19344
  });
@@ -19307,7 +19348,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19307
19348
  }
19308
19349
  };
19309
19350
  const handleScrollEvent = (swiper) => {
19310
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
19351
+ 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;
19311
19352
  const item = data[swiper.previousIndex];
19312
19353
  if (!item)
19313
19354
  return;
@@ -19324,11 +19365,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19324
19365
  eventSubject: 'scrollDown',
19325
19366
  eventDescription: 'User scroll down',
19326
19367
  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 : '',
19327
- 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 : '',
19368
+ 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 : '',
19369
+ 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 : '',
19328
19370
  requestId: null,
19329
- 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 : '',
19371
+ 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 : '',
19330
19372
  contentFormat,
19331
- position: ((_m = swiper.previousIndex) !== null && _m !== void 0 ? _m : 0) + ''
19373
+ position: ((_q = swiper.previousIndex) !== null && _q !== void 0 ? _q : 0) + ''
19332
19374
  }
19333
19375
  });
19334
19376
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19340,12 +19382,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19340
19382
  eventInfo: {
19341
19383
  eventSubject: 'scrollUp',
19342
19384
  eventDescription: 'User scroll up',
19343
- 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 : '',
19344
- productId: (_r = (_q = item.product) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
19385
+ 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 : '',
19386
+ 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 : '',
19387
+ productId: (_x = (_w = item.product) === null || _w === void 0 ? void 0 : _w.itemId) !== null && _x !== void 0 ? _x : '',
19345
19388
  requestId: null,
19346
- 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 : '',
19389
+ 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 : '',
19347
19390
  contentFormat,
19348
- position: ((_w = swiper.previousIndex) !== null && _w !== void 0 ? _w : 0) + ''
19391
+ position: ((_2 = swiper.previousIndex) !== null && _2 !== void 0 ? _2 : 0) + ''
19349
19392
  }
19350
19393
  });
19351
19394
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19371,7 +19414,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19371
19414
  }
19372
19415
  }, [openHashtag, data, activeIndex]);
19373
19416
  const handleViewImageStartEvent = (activeIndex, imgInfo, enableCapi) => {
19374
- var _a, _b, _c, _d, _e, _f, _g, _h;
19417
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
19375
19418
  const item = data[activeIndex];
19376
19419
  // 如果是图片集则上报事件
19377
19420
  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)) {
@@ -19382,9 +19425,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19382
19425
  eventSubject: 'viewImageCarouselStart',
19383
19426
  eventDescription: 'User start view the image carousel',
19384
19427
  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 : '',
19385
- contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
19428
+ 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 : '',
19429
+ contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19386
19430
  imageStartTime: `${startTime}`,
19387
- contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
19431
+ contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19388
19432
  position: activeIndex + '',
19389
19433
  contentFormat: 'image',
19390
19434
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo,
@@ -19394,11 +19438,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19394
19438
  if (enableCapi) {
19395
19439
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19396
19440
  eventName: 'ViewContent',
19397
- product: (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.bindProduct
19441
+ product: (_k = item === null || item === void 0 ? void 0 : item.video) === null || _k === void 0 ? void 0 : _k.bindProduct
19398
19442
  });
19399
19443
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19400
19444
  eventName: 'PageView',
19401
- product: (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProduct
19445
+ product: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.bindProduct
19402
19446
  });
19403
19447
  }
19404
19448
  }
@@ -19490,15 +19534,20 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19490
19534
  swiperRef.current.swiper.allowTouchMove = true;
19491
19535
  }, 500);
19492
19536
  }, onActiveIndexChange: (swiper) => {
19537
+ var _a, _b;
19493
19538
  setActiveIndex(swiper.activeIndex);
19494
19539
  if (openHashtag)
19495
19540
  return;
19496
19541
  // 处理上滑下滑事件
19497
19542
  handleScrollEvent(swiper);
19498
- if (waterFallData || isEditor || isDiyH5)
19543
+ if (waterFallData || isEditor)
19499
19544
  return;
19500
19545
  if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
19501
19546
  if (!isLoadMore) {
19547
+ if (isDiyH5) {
19548
+ (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
19549
+ (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
19550
+ }
19502
19551
  setIsLoadMore(true);
19503
19552
  loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(pageNum).then((res) => {
19504
19553
  var _a;
@@ -19551,7 +19600,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19551
19600
  }, []);
19552
19601
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
19553
19602
  const handlePlaying = React.useCallback(() => {
19554
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
19603
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
19555
19604
  setIsPauseVideo(false);
19556
19605
  const item = data[index];
19557
19606
  if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
@@ -19564,14 +19613,15 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19564
19613
  eventSubject: 'playVideo',
19565
19614
  eventDescription: 'User played the video',
19566
19615
  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 : '',
19567
- 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 : '',
19616
+ 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 : '',
19617
+ 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 : '',
19568
19618
  playType,
19569
19619
  startTime: videoCurrentTime,
19570
19620
  videoDuration,
19571
- 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 : []),
19621
+ 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 : []),
19572
19622
  position: index + '',
19573
19623
  contentFormat: 'video',
19574
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
19624
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
19575
19625
  }
19576
19626
  });
19577
19627
  setIsFirstPlay(false);
@@ -19610,7 +19660,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19610
19660
  }
19611
19661
  }, [isLoadFinish]);
19612
19662
  const onPause = React.useCallback(() => {
19613
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
19663
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
19614
19664
  const item = data[index];
19615
19665
  const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
19616
19666
  const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
@@ -19621,14 +19671,15 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19621
19671
  eventSubject: 'playOverVideo',
19622
19672
  eventDescription: 'User finished playing the video',
19623
19673
  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 : '',
19624
- 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 : '',
19674
+ 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 : '',
19675
+ 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 : '',
19625
19676
  endTime: videoCurrentTime,
19626
19677
  videoDuration,
19627
19678
  playDuration,
19628
- 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 : []),
19679
+ 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 : []),
19629
19680
  position: index + '',
19630
19681
  contentFormat: 'video',
19631
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
19682
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
19632
19683
  }
19633
19684
  });
19634
19685
  }