pb-sxp-ui 1.16.15 → 1.16.17

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 +235 -162
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +235 -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 +235 -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 +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 +70 -33
  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 +70 -33
  32. package/lib/core/hooks/useEventReport.js +6 -5
  33. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -622,6 +622,7 @@ const DEFAULT_TAG = 'FOR U';
622
622
  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 }) => {
623
623
  var _a, _b, _c, _d, _e;
624
624
  const [rtcList, setRtcList] = useState([]);
625
+ const [firstRtcList, setFirstRtcList] = useState([]);
625
626
  const [tagList, setTagList] = useState([]);
626
627
  const [loading, setLoading] = useState(true);
627
628
  const [curReqInfo, setCurReqInfo] = useState({ rtc: '', requestId: '' });
@@ -728,6 +729,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
728
729
  val.split('=')[0];
729
730
  val.split('=')[1];
730
731
  });
732
+ options.body = Object.assign(Object.assign({}, options.body), { tenant_id: fakeUserId });
731
733
  return window
732
734
  .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
733
735
  ? JSON.stringify({
@@ -761,18 +763,18 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
761
763
  set(value) {
762
764
  // 继续正常设置 src
763
765
  originalSrcDescriptor.set.call(this, value);
764
- img.onload = function () {
765
- // 检查是否是目标 URL
766
- if (value.includes('https://www.facebook.com/privacy_sandbox/pixel/register/trigger/')) {
767
- // 解析 URL 参数
768
- const url = new URL(value);
769
- const params = Object.fromEntries(url.searchParams.entries());
770
- bffCollectEvent({
771
- eventName: params === null || params === void 0 ? void 0 : params.ev,
772
- eventSource: 'Meta Pixel'
773
- });
774
- }
775
- };
766
+ // img.onload = function () {
767
+ // 检查是否是目标 URL
768
+ if (value.includes('https://www.facebook.com/privacy_sandbox/pixel/register/trigger/')) {
769
+ // 解析 URL 参数
770
+ const url = new URL(value);
771
+ const params = Object.fromEntries(url.searchParams.entries());
772
+ bffCollectEvent({
773
+ eventName: params === null || params === void 0 ? void 0 : params.ev,
774
+ eventSource: 'Meta Pixel'
775
+ });
776
+ // }
777
+ }
776
778
  },
777
779
  get() {
778
780
  return originalSrcDescriptor.get.call(this);
@@ -812,25 +814,23 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
812
814
  var _a, _b;
813
815
  try {
814
816
  const parsedData = yield parseBeaconData(data);
815
- if (success) {
816
- // 使用你的自定义上报方法
817
- if (urlString.includes('https://tr.snapchat.com/p')) {
818
- (_b = (_a = parsedData === null || parsedData === void 0 ? void 0 : parsedData.req) === null || _a === void 0 ? void 0 : _a.forEach) === null || _b === void 0 ? void 0 : _b.call(_a, (item) => {
819
- var _a, _b;
820
- if ((_a = item === null || item === void 0 ? void 0 : item.t) === null || _a === void 0 ? void 0 : _a.ev) {
821
- bffCollectEvent({
822
- eventName: (_b = item === null || item === void 0 ? void 0 : item.t) === null || _b === void 0 ? void 0 : _b.ev,
823
- eventSource: 'Snapchat Pixel'
824
- });
825
- }
826
- });
827
- }
828
- else if (urlString.includes('https://analytics.tiktok.com/api/v2/pixel') && (parsedData === null || parsedData === void 0 ? void 0 : parsedData.event)) {
829
- bffCollectEvent({
830
- eventName: parsedData.event,
831
- eventSource: 'TikTok Pixel'
832
- });
833
- }
817
+ // 使用你的自定义上报方法
818
+ if (urlString.includes('https://tr.snapchat.com/p')) {
819
+ (_b = (_a = parsedData === null || parsedData === void 0 ? void 0 : parsedData.req) === null || _a === void 0 ? void 0 : _a.forEach) === null || _b === void 0 ? void 0 : _b.call(_a, (item) => {
820
+ var _a, _b;
821
+ if ((_a = item === null || item === void 0 ? void 0 : item.t) === null || _a === void 0 ? void 0 : _a.ev) {
822
+ bffCollectEvent({
823
+ eventName: (_b = item === null || item === void 0 ? void 0 : item.t) === null || _b === void 0 ? void 0 : _b.ev,
824
+ eventSource: 'Snapchat Pixel'
825
+ });
826
+ }
827
+ });
828
+ }
829
+ else if (urlString.includes('https://analytics.tiktok.com/api/v2/pixel') && (parsedData === null || parsedData === void 0 ? void 0 : parsedData.event)) {
830
+ bffCollectEvent({
831
+ eventName: parsedData.event,
832
+ eventSource: 'TikTok Pixel'
833
+ });
834
834
  }
835
835
  }
836
836
  catch (error) {
@@ -852,6 +852,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
852
852
  window.fetch = function (input, init) {
853
853
  var arguments_1 = arguments;
854
854
  return __awaiter(this, void 0, void 0, function* () {
855
+ var _a;
855
856
  // 安全获取 URL 字符串
856
857
  let url;
857
858
  try {
@@ -872,17 +873,39 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
872
873
  // 检查是否是 GA4 收集端点
873
874
  try {
874
875
  // 1. 先执行原始请求
875
- const response = yield _originalFetch.apply(this, arguments_1);
876
+ const response = _originalFetch.apply(this, arguments_1);
876
877
  // 2. 检查请求是否成功 (HTTP 200-299)
877
878
  // 安全解析 URL
878
879
  const urlObj = new URL(url);
879
880
  const params = Object.fromEntries(urlObj.searchParams.entries());
881
+ const body = (_a = arguments_1[1]) === null || _a === void 0 ? void 0 : _a.body;
880
882
  if (params === null || params === void 0 ? void 0 : params.en) {
881
883
  bffCollectEvent({
882
884
  eventName: params === null || params === void 0 ? void 0 : params.en,
883
885
  eventSource: 'Google Analytics'
884
886
  });
885
887
  }
888
+ else if (body) {
889
+ function extractAllEnValuesSplit(queryString) {
890
+ if (typeof queryString !== 'string') {
891
+ return [];
892
+ }
893
+ const matches = [];
894
+ const regex = /en=([^&\r\n]*)/g;
895
+ let match;
896
+ while ((match = regex.exec(queryString)) !== null) {
897
+ matches.push(decodeURIComponent(match[1]));
898
+ }
899
+ return matches;
900
+ }
901
+ const enValues = extractAllEnValuesSplit(body);
902
+ enValues === null || enValues === void 0 ? void 0 : enValues.forEach((en) => {
903
+ bffCollectEvent({
904
+ eventName: en,
905
+ eventSource: 'Google Analytics'
906
+ });
907
+ });
908
+ }
886
909
  return response;
887
910
  }
888
911
  catch (error) {
@@ -952,6 +975,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
952
975
  if ((rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) === 0) {
953
976
  setRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
954
977
  setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
978
+ if (isDiyH5) {
979
+ setFirstRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
980
+ }
955
981
  }
956
982
  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));
957
983
  if (isNotNullList) {
@@ -991,12 +1017,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
991
1017
  if (rtcList.length <= 0) {
992
1018
  return;
993
1019
  }
1020
+ if (isDiyH5 && (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) > 0) {
1021
+ setRtcList(rtcList.concat(firstRtcList));
1022
+ setCacheRtcList(cacheRtcList.concat(firstRtcList));
1023
+ return;
1024
+ }
994
1025
  const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
995
1026
  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 })));
996
1027
  setRtcList(rtcList.concat(getFilterRecList(data)));
997
1028
  setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
998
1029
  return data;
999
- }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
1030
+ }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList, isDiyH5, firstRtcList]);
1000
1031
  const refreshFeSession = useCallback((enableReSid, event) => {
1001
1032
  var _a, _b, _c, _d, _e;
1002
1033
  let expire = false;
@@ -1223,7 +1254,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1223
1254
  }
1224
1255
  }), [bffFetch, utmVal]);
1225
1256
  const ctaEvent = useCallback((eventInfo, rec, product, position) => {
1226
- 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;
1257
+ 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;
1227
1258
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
1228
1259
  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);
1229
1260
  let fromKName = '';
@@ -1241,7 +1272,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1241
1272
  }
1242
1273
  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;
1243
1274
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1244
- 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 })
1275
+ 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 })
1245
1276
  });
1246
1277
  }, [bffEventReport, isFromHashtag]);
1247
1278
  const h5EnterLink = useCallback(() => {
@@ -1343,6 +1374,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1343
1374
  }
1344
1375
  setRtcList(list);
1345
1376
  setCacheRtcList(list);
1377
+ if (isDiyH5) {
1378
+ setFirstRtcList(list);
1379
+ }
1346
1380
  bffGetTagList(curData !== null && curData !== void 0 ? curData : finalPageData);
1347
1381
  if (channel) {
1348
1382
  const item = list === null || list === void 0 ? void 0 : list[0];
@@ -1378,6 +1412,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1378
1412
  }
1379
1413
  setRtcList(list);
1380
1414
  setCacheRtcList(list);
1415
+ if (isDiyH5) {
1416
+ setFirstRtcList(list);
1417
+ }
1381
1418
  }
1382
1419
  })
1383
1420
  .finally(() => {
@@ -1441,7 +1478,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1441
1478
  refreshFeSession,
1442
1479
  getAccount,
1443
1480
  accountSonsent,
1444
- isDiyH5
1481
+ isDiyH5,
1482
+ firstRtcList
1445
1483
  } }, 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({
1446
1484
  rtcList,
1447
1485
  mutateLike: bffMutateLike,
@@ -1902,14 +1940,14 @@ var settingRender$f = [
1902
1940
  * @Author: binruan@chatlabs.com
1903
1941
  * @Date: 2024-03-12 10:59:06
1904
1942
  * @LastEditors: binruan@chatlabs.com
1905
- * @LastEditTime: 2024-11-28 11:17:16
1943
+ * @LastEditTime: 2025-05-09 15:30:59
1906
1944
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1907
1945
  *
1908
1946
  */
1909
1947
  function useEventReport() {
1910
1948
  const { bffEventReport, popupDetailData, isFromHashtag, eventTimeList, setEventTimeList } = useSxpDataSource();
1911
1949
  const jumpToWeb = useCallback((e, data, product, cta, position, traceInfo) => {
1912
- 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;
1950
+ 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;
1913
1951
  const i = eventTimeList === null || eventTimeList === void 0 ? void 0 : eventTimeList.findIndex((item) => item.target === (e === null || e === void 0 ? void 0 : e.target));
1914
1952
  if (i !== -1) {
1915
1953
  return;
@@ -1942,11 +1980,11 @@ function useEventReport() {
1942
1980
  contentFormat = 'image';
1943
1981
  }
1944
1982
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1945
- 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 }))
1983
+ 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 }))
1946
1984
  });
1947
1985
  }, [bffEventReport, popupDetailData, isFromHashtag, eventTimeList]);
1948
1986
  const productView = useCallback((data, product, cta, viewTime, position) => {
1949
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
1987
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
1950
1988
  let fromKName = '';
1951
1989
  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))) {
1952
1990
  fromKName = 'pdpPage';
@@ -1965,8 +2003,9 @@ function useEventReport() {
1965
2003
  contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
1966
2004
  position: position + '',
1967
2005
  contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
2006
+ 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 : '',
1968
2007
  ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
1969
- 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 : '',
2008
+ 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 : '',
1970
2009
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
1971
2010
  eventSubject: 'productView',
1972
2011
  eventDescription: 'User browsed the product'
@@ -15781,7 +15820,7 @@ function WaterfallList(_a) {
15781
15820
  * @Author: binruan@chatlabs.com
15782
15821
  * @Date: 2024-01-10 10:58:24
15783
15822
  * @LastEditors: binruan@chatlabs.com
15784
- * @LastEditTime: 2025-02-28 10:00:31
15823
+ * @LastEditTime: 2025-05-09 15:30:41
15785
15824
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
15786
15825
  *
15787
15826
  */
@@ -15819,7 +15858,7 @@ const WaterFall = (props) => {
15819
15858
  }
15820
15859
  }, [waterFallData]);
15821
15860
  const reportTagsView = useCallback(() => {
15822
- var _a, _b, _c, _d, _e, _f;
15861
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
15823
15862
  const rec = recData === null || recData === void 0 ? void 0 : recData.rec;
15824
15863
  if (!rec)
15825
15864
  return;
@@ -15839,9 +15878,10 @@ const WaterFall = (props) => {
15839
15878
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
15840
15879
  eventInfo: {
15841
15880
  contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
15881
+ 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 : '',
15842
15882
  position: cacheActiveIndex + '',
15843
- contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
15844
- traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
15883
+ contentTags: JSON.stringify((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.tags),
15884
+ traceInfo: (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.traceInfo,
15845
15885
  hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
15846
15886
  fromKName,
15847
15887
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
@@ -17923,7 +17963,7 @@ const LikeButton = (_a) => {
17923
17963
  const likeIcon = useIconLink(defaultLikeIconPath$2);
17924
17964
  const unlikeIcon = useIconLink(defaultUnLikeIconPath$2);
17925
17965
  const handleClick = debounce(() => __awaiter(void 0, void 0, void 0, function* () {
17926
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
17966
+ 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;
17927
17967
  if (state) {
17928
17968
  // 先设置状态
17929
17969
  setState(false);
@@ -17933,11 +17973,12 @@ const LikeButton = (_a) => {
17933
17973
  eventSubject: 'favoriteContentCanceled',
17934
17974
  eventDescription: 'This content was unfavorite by the user',
17935
17975
  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 : '',
17936
- 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 : '',
17937
- 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 : []),
17976
+ 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 : '',
17977
+ 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 : '',
17978
+ 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 : []),
17938
17979
  position: position + '',
17939
- contentFormat: ((_m = recData === null || recData === void 0 ? void 0 : recData.video) === null || _m === void 0 ? void 0 : _m.url) ? 'video' : 'image',
17940
- traceInfo: (_o = recData === null || recData === void 0 ? void 0 : recData.video) === null || _o === void 0 ? void 0 : _o.traceInfo
17980
+ contentFormat: ((_q = recData === null || recData === void 0 ? void 0 : recData.video) === null || _q === void 0 ? void 0 : _q.url) ? 'video' : 'image',
17981
+ traceInfo: (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.traceInfo
17941
17982
  }
17942
17983
  });
17943
17984
  // 如果接口调用失败,则回滚状态
@@ -17945,40 +17986,41 @@ const LikeButton = (_a) => {
17945
17986
  setState(true);
17946
17987
  }
17947
17988
  else {
17948
- const nRtcList = (_p = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
17989
+ const nRtcList = (_s = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
17949
17990
  if (index === position) {
17950
17991
  item.isCollected = false;
17951
17992
  }
17952
17993
  return item;
17953
- })) !== null && _p !== void 0 ? _p : [];
17994
+ })) !== null && _s !== void 0 ? _s : [];
17954
17995
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
17955
17996
  }
17956
17997
  }
17957
17998
  else {
17958
17999
  setState(true);
17959
- const result = (_q = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _q !== void 0 ? _q : false;
18000
+ const result = (_t = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _t !== void 0 ? _t : false;
17960
18001
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
17961
18002
  eventInfo: {
17962
18003
  eventSubject: 'favoriteContent',
17963
18004
  eventDescription: 'This content was favorite by the user',
17964
- 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 : '',
17965
- 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 : '',
17966
- 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 : []),
18005
+ 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 : '',
18006
+ 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 : '',
18007
+ 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 : '',
18008
+ 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 : []),
17967
18009
  position: position + '',
17968
- contentFormat: ((_x = recData === null || recData === void 0 ? void 0 : recData.video) === null || _x === void 0 ? void 0 : _x.url) ? 'video' : 'image',
17969
- traceInfo: (_y = recData === null || recData === void 0 ? void 0 : recData.video) === null || _y === void 0 ? void 0 : _y.traceInfo
18010
+ contentFormat: ((_3 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _3 === void 0 ? void 0 : _3.url) ? 'video' : 'image',
18011
+ traceInfo: (_4 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _4 === void 0 ? void 0 : _4.traceInfo
17970
18012
  }
17971
18013
  });
17972
18014
  if (!result) {
17973
18015
  setState(false);
17974
18016
  }
17975
18017
  else {
17976
- const nRtcList = (_z = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18018
+ const nRtcList = (_5 = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
17977
18019
  if (index === position) {
17978
18020
  item.isCollected = true;
17979
18021
  }
17980
18022
  return item;
17981
- })) !== null && _z !== void 0 ? _z : [];
18023
+ })) !== null && _5 !== void 0 ? _5 : [];
17982
18024
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
17983
18025
  }
17984
18026
  }
@@ -18015,7 +18057,7 @@ const mountVideoPlayerAtNode = (() => {
18015
18057
  const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex, videoPostConfig, videoPlayIcon, loopPlay, swiperRef }, ref) => {
18016
18058
  var _a, _b;
18017
18059
  const [isPauseVideo, setIsPauseVideo] = useState(false);
18018
- const { bffEventReport, sxpParameter, waterFallData, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
18060
+ const { bffEventReport, sxpParameter, firstRtcList, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
18019
18061
  const videoStartTime = useRef(0);
18020
18062
  const [isLoadFinish, setIsLoadFinish] = useState(false);
18021
18063
  const { isActive } = useSwiperSlide();
@@ -18081,6 +18123,23 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18081
18123
  return;
18082
18124
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
18083
18125
  }, [videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18126
+ const handleEnd = () => {
18127
+ var _a, _b, _c, _d, _e, _f;
18128
+ if (!videoRef.current)
18129
+ return;
18130
+ if (isDiyH5) {
18131
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.pause();
18132
+ if (!loopPlayRef.current)
18133
+ return;
18134
+ if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
18135
+ 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;
18136
+ (_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);
18137
+ }
18138
+ }
18139
+ else {
18140
+ (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.play();
18141
+ }
18142
+ };
18084
18143
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
18085
18144
  const handlePlaying = useCallback(() => {
18086
18145
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
@@ -18089,7 +18148,7 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18089
18148
  setIsLoadFinish(true);
18090
18149
  }, []);
18091
18150
  const handleStartPlay = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
18092
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18151
+ var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
18093
18152
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
18094
18153
  return;
18095
18154
  setIsPauseVideo(false);
@@ -18100,16 +18159,11 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18100
18159
  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);
18101
18160
  const playType = (isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) ? '0' : '1';
18102
18161
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18103
- 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) + '' }))
18162
+ 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) + '' }))
18104
18163
  });
18105
18164
  isFirstPlayRef.current = false;
18106
18165
  }
18107
18166
  }), [bffEventReport, data, index, isFirstPlayRef, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18108
- const setCurrentTimeByStartTime = useCallback(() => {
18109
- if (isDiyH5) {
18110
- videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
18111
- }
18112
- }, []);
18113
18167
  const handLoadeddata = useCallback(() => {
18114
18168
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || firstFrameSrc || !blur)
18115
18169
  return;
@@ -18134,13 +18188,12 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18134
18188
  const handleLoadedmetadata = useCallback(() => {
18135
18189
  if (!videoRef.current)
18136
18190
  return;
18137
- setCurrentTimeByStartTime();
18138
18191
  loadedTimeRef.current = new Date();
18139
18192
  handleStartPlay();
18140
18193
  handLoadeddata();
18141
18194
  }, [videoRef.current, handLoadeddata, handleStartPlay]);
18142
18195
  const handleClickVideo = useCallback((type) => () => {
18143
- var _a, _b, _c, _d, _e, _f;
18196
+ var _a, _b, _c, _d, _e;
18144
18197
  if (!videoRef.current)
18145
18198
  return;
18146
18199
  if (!isLoadFinish)
@@ -18161,20 +18214,17 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18161
18214
  break;
18162
18215
  default:
18163
18216
  if (isPause) {
18164
- 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)) {
18165
- videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
18166
- }
18167
- (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
18217
+ (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
18168
18218
  }
18169
18219
  else {
18170
- (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
18220
+ (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.pause();
18171
18221
  }
18172
18222
  setIsPauseVideo(!isPause);
18173
18223
  break;
18174
18224
  }
18175
18225
  }, [isLoadFinish, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18176
18226
  const handlePause = useCallback(() => {
18177
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
18227
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
18178
18228
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
18179
18229
  return;
18180
18230
  if (activeIndex !== index)
@@ -18190,14 +18240,15 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18190
18240
  eventSubject: 'playOverVideo',
18191
18241
  eventDescription: 'User finished playing the video',
18192
18242
  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 : '',
18193
- 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 : '',
18243
+ 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 : '',
18244
+ 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 : '',
18194
18245
  endTime: videoCurrentTime,
18195
18246
  videoDuration,
18196
18247
  playDuration,
18197
- 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 : []),
18248
+ 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 : []),
18198
18249
  position: index + '',
18199
18250
  contentFormat: 'video',
18200
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
18251
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
18201
18252
  }
18202
18253
  });
18203
18254
  }
@@ -18205,27 +18256,8 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18205
18256
  const handleWaiting = useCallback(() => {
18206
18257
  setWaiting(true);
18207
18258
  }, []);
18208
- const handleTimeUpload = () => {
18209
- if (!videoRef.current || !isDiyH5)
18210
- return;
18211
- setTimeout(() => {
18212
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
18213
- 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)) {
18214
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
18215
- if (!loopPlayRef.current)
18216
- return;
18217
- if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
18218
- (_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);
18219
- }
18220
- else {
18221
- 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;
18222
- (_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);
18223
- }
18224
- }
18225
- });
18226
- };
18227
18259
  useEffect(() => {
18228
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18260
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18229
18261
  if (!isActive)
18230
18262
  return;
18231
18263
  const videoSrc = videoUrl;
@@ -18246,7 +18278,6 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18246
18278
  hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
18247
18279
  hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
18248
18280
  var _a;
18249
- setCurrentTimeByStartTime();
18250
18281
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
18251
18282
  });
18252
18283
  }
@@ -18260,12 +18291,11 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18260
18291
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('play', handleStartPlay);
18261
18292
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
18262
18293
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.addEventListener('pause', handlePause);
18263
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handlePlay);
18294
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handleEnd);
18264
18295
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
18265
18296
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
18266
- (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.addEventListener('timeupdate', handleTimeUpload);
18267
18297
  return () => {
18268
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18298
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18269
18299
  const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
18270
18300
  if (!isPause)
18271
18301
  handlePause();
@@ -18277,10 +18307,9 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18277
18307
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('play', handleStartPlay);
18278
18308
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('playing', handlePlaying);
18279
18309
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('pause', handlePause);
18280
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handlePlay);
18310
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handleEnd);
18281
18311
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('canplay', handlePlay);
18282
18312
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.removeEventListener('waiting', handleWaiting);
18283
- (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.removeEventListener('timeupdate', handleTimeUpload);
18284
18313
  };
18285
18314
  }, [isActive]);
18286
18315
  useEffect(() => {
@@ -18491,19 +18520,45 @@ const Picture = (props) => {
18491
18520
  }, onLoad: onShowFirstImage }))));
18492
18521
  };
18493
18522
 
18494
- const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig }) => {
18523
+ const PictureGroup$4 = forwardRef(({ imgUrls, data, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig, swiperRef }, ref) => {
18495
18524
  var _a, _b;
18496
18525
  const { isActive } = useSwiperSlide();
18497
- const { sxpParameter, openHashtag } = useSxpDataSource();
18526
+ const { firstRtcList, openHashtag, isDiyH5 } = useSxpDataSource();
18498
18527
  const [isLoad, setIsLoad] = useState(false);
18499
18528
  const [imgInfo, setImgInfo] = useState();
18500
18529
  const [swiperActiveIndex, setSwiperActiveIndex] = useState(0);
18501
- const swiperRef = useRef();
18530
+ const imgsSwiperRef = useRef();
18502
18531
  const isFirstPlayRef = useRef(true);
18532
+ const loopPlayRef = useRef(true);
18503
18533
  const initTime = new Date();
18534
+ useImperativeHandle(ref, () => {
18535
+ return {
18536
+ setLoopPlay(v) {
18537
+ loopPlayRef.current = v;
18538
+ }
18539
+ };
18540
+ });
18541
+ useEffect(() => {
18542
+ let timerId;
18543
+ if (isLoad && isActive && isDiyH5) {
18544
+ timerId = setTimeout(() => {
18545
+ var _a, _b, _c, _d;
18546
+ if (!loopPlayRef.current)
18547
+ return;
18548
+ if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
18549
+ 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;
18550
+ (_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);
18551
+ }
18552
+ }, 3000);
18553
+ }
18554
+ return () => {
18555
+ if (timerId)
18556
+ clearTimeout(timerId);
18557
+ };
18558
+ }, [isLoad, isActive, isDiyH5, index, swiperRef, firstRtcList]);
18504
18559
  useEffect(() => {
18505
18560
  if (isLoad && isActive) {
18506
- (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.start();
18561
+ (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.start();
18507
18562
  if (openHashtag) {
18508
18563
  onViewImageEndEvent(rec);
18509
18564
  }
@@ -18513,7 +18568,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
18513
18568
  }
18514
18569
  }
18515
18570
  else {
18516
- (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.stop();
18571
+ (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.stop();
18517
18572
  }
18518
18573
  }, [rec, isActive, onViewImageEndEvent, openHashtag, index, onViewImageStartEvent, isLoad, imgInfo]);
18519
18574
  const showFirstImageFn = useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
@@ -18540,13 +18595,13 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
18540
18595
  };
18541
18596
  }, [isActive, imgInfo]);
18542
18597
  const handleMouseEnter = useCallback(() => {
18543
- if (swiperRef.current && swiperRef.current.swiper && isAlly) {
18544
- swiperRef.current.swiper.autoplay.stop();
18598
+ if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
18599
+ imgsSwiperRef.current.swiper.autoplay.stop();
18545
18600
  }
18546
18601
  }, []);
18547
18602
  const handleMouseLeave = useCallback(() => {
18548
- if (swiperRef.current && swiperRef.current.swiper && isAlly) {
18549
- swiperRef.current.swiper.autoplay.start();
18603
+ if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
18604
+ imgsSwiperRef.current.swiper.autoplay.start();
18550
18605
  }
18551
18606
  }, []);
18552
18607
  const handleSlideChange = useCallback((swiper) => {
@@ -18567,7 +18622,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
18567
18622
  enabled: true
18568
18623
  }
18569
18624
  }
18570
- : {}), { loop: true, ref: swiperRef, onSlideChange: handleSlideChange, className: css(Object.assign(Object.assign({ '.swiper-pagination': {
18625
+ : {}), { loop: true, ref: imgsSwiperRef, onSlideChange: handleSlideChange, className: css(Object.assign(Object.assign({ '.swiper-pagination': {
18571
18626
  bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
18572
18627
  fontSize: '14px'
18573
18628
  } }, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor) && {
@@ -18584,7 +18639,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
18584
18639
  return (React.createElement(SwiperSlide, { key: srcKey, "aria-hidden": srcKey !== swiperActiveIndex },
18585
18640
  React.createElement(Picture, { src: !isLoad && srcKey > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
18586
18641
  }))));
18587
- };
18642
+ });
18588
18643
  var PictureGroup$5 = memo(PictureGroup$4);
18589
18644
 
18590
18645
  /*
@@ -18864,7 +18919,7 @@ var NavBack$1 = memo(NavBack);
18864
18919
  * @Author: binruan@chatlabs.com
18865
18920
  * @Date: 2024-03-20 10:27:31
18866
18921
  * @LastEditors: binruan@chatlabs.com
18867
- * @LastEditTime: 2025-05-09 15:51:40
18922
+ * @LastEditTime: 2025-05-12 14:26:15
18868
18923
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
18869
18924
  *
18870
18925
  */
@@ -18884,6 +18939,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18884
18939
  const skipLinkRef = useRef(false);
18885
18940
  const [pageNum, setPageNum] = useState(2);
18886
18941
  const videoWidgetRef = useRef(null);
18942
+ const pictureGroupRef = useRef(null);
18887
18943
  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();
18888
18944
  const { backMainFeed, productView, jumpToWeb } = useEventReport();
18889
18945
  const isShowFingerTip = useMemo(() => {
@@ -18931,7 +18987,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18931
18987
  (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
18932
18988
  }, [data, ctaType, swiperRef]);
18933
18989
  const handleSessionCompleted = useCallback((fk) => {
18934
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
18990
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
18935
18991
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
18936
18992
  let fromKName = '';
18937
18993
  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))) {
@@ -18958,12 +19014,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18958
19014
  eventSubject: 'sessionCompleted',
18959
19015
  eventDescription: 'Session completed',
18960
19016
  contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
18961
- productId: (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.itemId,
19017
+ 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 : '',
19018
+ productId: (_r = item === null || item === void 0 ? void 0 : item.product) === null || _r === void 0 ? void 0 : _r.itemId,
18962
19019
  position: activeIndex + '',
18963
19020
  fromKName: fk || fromKName,
18964
19021
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
18965
- 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 : '',
18966
- 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 : ''
19022
+ 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 : '',
19023
+ 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 : ''
18967
19024
  }
18968
19025
  });
18969
19026
  }, [data, bffEventReport, activeIndex, popupDetailData, tempMap, isFromHashtag, curTime]);
@@ -19022,8 +19079,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19022
19079
  refreshFeSession
19023
19080
  ]);
19024
19081
  const handleSessionExpire = useCallback(debounce(() => {
19025
- var _a;
19082
+ var _a, _b;
19026
19083
  (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
19084
+ (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
19027
19085
  refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(false, handleSessionCompleted);
19028
19086
  }, 1000), [handleSessionCompleted, refreshFeSession]);
19029
19087
  useEffect(() => {
@@ -19093,18 +19151,18 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19093
19151
  return null;
19094
19152
  }, [globalConfig, activeIndex, visList]);
19095
19153
  const renderContent = useCallback((rec, index) => {
19096
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
19154
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
19097
19155
  if (rec === 'organic menu') {
19098
19156
  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)));
19099
19157
  }
19100
- if ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.url) {
19158
+ 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)) {
19101
19159
  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 })));
19102
19160
  }
19103
- if ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.imgUrls) {
19104
- 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 }));
19161
+ if ((_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.imgUrls) {
19162
+ 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 })));
19105
19163
  }
19106
- 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) {
19107
- return (_k = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _k === void 0 ? void 0 : _k.map((value, idx) => {
19164
+ 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) {
19165
+ return (_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _m === void 0 ? void 0 : _m.map((value, idx) => {
19108
19166
  var _a, _b, _c, _d, _e, _f, _g, _h;
19109
19167
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
19110
19168
  const Component = withBindDataSource(t);
@@ -19142,7 +19200,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19142
19200
  };
19143
19201
  }, [isShowMore]);
19144
19202
  const renderBottom = useCallback((rec, index) => {
19145
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
19203
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
19146
19204
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
19147
19205
  let cta = null;
19148
19206
  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) {
@@ -19151,24 +19209,27 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19151
19209
  else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
19152
19210
  cta = '商品CTA';
19153
19211
  }
19212
+ 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)) {
19213
+ cta = '服务CTA';
19214
+ }
19154
19215
  else {
19155
- 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;
19216
+ 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;
19156
19217
  }
19157
19218
  const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
19158
19219
  const isNineProduct = (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.nineProductEnable) &&
19159
19220
  index === ((rtcList === null || rtcList === void 0 ? void 0 : rtcList[0]) === 'organic menu' ? 2 : 1) &&
19160
- ((_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));
19221
+ ((_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));
19161
19222
  return (React.createElement(React.Fragment, null,
19162
19223
  isNineProduct && (React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value, isNineProduct: isNineProduct })),
19163
- ((_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' }),
19164
- 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` } },
19224
+ ((_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' }),
19225
+ 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` } },
19165
19226
  React.createElement(Nudge, { nudge: nudge }),
19166
19227
  ((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' },
19167
19228
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value }))) : null,
19168
19229
  React.createElement("div", null,
19169
- 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 }),
19230
+ 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 }),
19170
19231
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex, value: value }),
19171
- 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) }))),
19232
+ 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) }))),
19172
19233
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex, value: value })));
19173
19234
  }
19174
19235
  return null;
@@ -19207,7 +19268,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19207
19268
  return null;
19208
19269
  }, [globalConfig, waterFallData]);
19209
19270
  const handleViewImageStartEnd = (item) => {
19210
- var _a, _b, _c, _d, _e, _f;
19271
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
19211
19272
  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)) {
19212
19273
  const endTime = Date.now();
19213
19274
  const duration = viewImageStartTime.current === 0 ? 0 : (endTime - viewImageStartTime.current) / 1000;
@@ -19216,10 +19277,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19216
19277
  eventSubject: 'viewImageCarouselEnd',
19217
19278
  eventDescription: 'User end view the image carousel',
19218
19279
  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 : '',
19219
- contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
19280
+ 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 : '',
19281
+ contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19220
19282
  imageEndTime: `${endTime}`,
19221
19283
  playDuration: `${duration}`,
19222
- contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
19284
+ contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19223
19285
  position: activeIndex + '',
19224
19286
  contentFormat: 'image',
19225
19287
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
@@ -19228,7 +19290,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19228
19290
  }
19229
19291
  };
19230
19292
  const handleSlideSkip = (item, position) => {
19231
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
19293
+ 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;
19232
19294
  if (isPreview || waterFallData)
19233
19295
  return;
19234
19296
  const t = new Date() - curTime.current;
@@ -19254,7 +19316,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19254
19316
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
19255
19317
  position: position + '',
19256
19318
  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 : '',
19257
- 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 : '',
19319
+ 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 : '',
19320
+ 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 : '',
19258
19321
  contentFormat
19259
19322
  }
19260
19323
  });
@@ -19264,7 +19327,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19264
19327
  }
19265
19328
  };
19266
19329
  const handleScrollEvent = (swiper) => {
19267
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
19330
+ 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;
19268
19331
  const item = data[swiper.previousIndex];
19269
19332
  if (!item)
19270
19333
  return;
@@ -19281,11 +19344,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19281
19344
  eventSubject: 'scrollDown',
19282
19345
  eventDescription: 'User scroll down',
19283
19346
  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 : '',
19284
- 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 : '',
19347
+ 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 : '',
19348
+ 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 : '',
19285
19349
  requestId: null,
19286
- 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 : '',
19350
+ 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 : '',
19287
19351
  contentFormat,
19288
- position: ((_m = swiper.previousIndex) !== null && _m !== void 0 ? _m : 0) + ''
19352
+ position: ((_q = swiper.previousIndex) !== null && _q !== void 0 ? _q : 0) + ''
19289
19353
  }
19290
19354
  });
19291
19355
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19297,12 +19361,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19297
19361
  eventInfo: {
19298
19362
  eventSubject: 'scrollUp',
19299
19363
  eventDescription: 'User scroll up',
19300
- 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 : '',
19301
- productId: (_r = (_q = item.product) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
19364
+ 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 : '',
19365
+ 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 : '',
19366
+ productId: (_x = (_w = item.product) === null || _w === void 0 ? void 0 : _w.itemId) !== null && _x !== void 0 ? _x : '',
19302
19367
  requestId: null,
19303
- 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 : '',
19368
+ 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 : '',
19304
19369
  contentFormat,
19305
- position: ((_w = swiper.previousIndex) !== null && _w !== void 0 ? _w : 0) + ''
19370
+ position: ((_2 = swiper.previousIndex) !== null && _2 !== void 0 ? _2 : 0) + ''
19306
19371
  }
19307
19372
  });
19308
19373
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19328,7 +19393,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19328
19393
  }
19329
19394
  }, [openHashtag, data, activeIndex]);
19330
19395
  const handleViewImageStartEvent = (activeIndex, imgInfo, enableCapi) => {
19331
- var _a, _b, _c, _d, _e, _f, _g, _h;
19396
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
19332
19397
  const item = data[activeIndex];
19333
19398
  // 如果是图片集则上报事件
19334
19399
  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)) {
@@ -19339,9 +19404,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19339
19404
  eventSubject: 'viewImageCarouselStart',
19340
19405
  eventDescription: 'User start view the image carousel',
19341
19406
  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 : '',
19342
- contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
19407
+ 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 : '',
19408
+ contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19343
19409
  imageStartTime: `${startTime}`,
19344
- contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
19410
+ contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19345
19411
  position: activeIndex + '',
19346
19412
  contentFormat: 'image',
19347
19413
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo,
@@ -19351,11 +19417,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19351
19417
  if (enableCapi) {
19352
19418
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19353
19419
  eventName: 'ViewContent',
19354
- product: (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.bindProduct
19420
+ product: (_k = item === null || item === void 0 ? void 0 : item.video) === null || _k === void 0 ? void 0 : _k.bindProduct
19355
19421
  });
19356
19422
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19357
19423
  eventName: 'PageView',
19358
- product: (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProduct
19424
+ product: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.bindProduct
19359
19425
  });
19360
19426
  }
19361
19427
  }
@@ -19447,15 +19513,20 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19447
19513
  swiperRef.current.swiper.allowTouchMove = true;
19448
19514
  }, 500);
19449
19515
  }, onActiveIndexChange: (swiper) => {
19516
+ var _a, _b;
19450
19517
  setActiveIndex(swiper.activeIndex);
19451
19518
  if (openHashtag)
19452
19519
  return;
19453
19520
  // 处理上滑下滑事件
19454
19521
  handleScrollEvent(swiper);
19455
- if (waterFallData || isEditor || isDiyH5)
19522
+ if (waterFallData || isEditor)
19456
19523
  return;
19457
19524
  if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
19458
19525
  if (!isLoadMore) {
19526
+ if (isDiyH5) {
19527
+ (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
19528
+ (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
19529
+ }
19459
19530
  setIsLoadMore(true);
19460
19531
  loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(pageNum).then((res) => {
19461
19532
  var _a;
@@ -19508,7 +19579,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19508
19579
  }, []);
19509
19580
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
19510
19581
  const handlePlaying = useCallback(() => {
19511
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
19582
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
19512
19583
  setIsPauseVideo(false);
19513
19584
  const item = data[index];
19514
19585
  if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
@@ -19521,14 +19592,15 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19521
19592
  eventSubject: 'playVideo',
19522
19593
  eventDescription: 'User played the video',
19523
19594
  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 : '',
19524
- 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 : '',
19595
+ 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 : '',
19596
+ 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 : '',
19525
19597
  playType,
19526
19598
  startTime: videoCurrentTime,
19527
19599
  videoDuration,
19528
- 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 : []),
19600
+ 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 : []),
19529
19601
  position: index + '',
19530
19602
  contentFormat: 'video',
19531
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
19603
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
19532
19604
  }
19533
19605
  });
19534
19606
  setIsFirstPlay(false);
@@ -19567,7 +19639,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19567
19639
  }
19568
19640
  }, [isLoadFinish]);
19569
19641
  const onPause = useCallback(() => {
19570
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
19642
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
19571
19643
  const item = data[index];
19572
19644
  const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
19573
19645
  const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
@@ -19578,14 +19650,15 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19578
19650
  eventSubject: 'playOverVideo',
19579
19651
  eventDescription: 'User finished playing the video',
19580
19652
  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 : '',
19581
- 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 : '',
19653
+ 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 : '',
19654
+ 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 : '',
19582
19655
  endTime: videoCurrentTime,
19583
19656
  videoDuration,
19584
19657
  playDuration,
19585
- 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 : []),
19658
+ 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 : []),
19586
19659
  position: index + '',
19587
19660
  contentFormat: 'video',
19588
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
19661
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
19589
19662
  }
19590
19663
  });
19591
19664
  }