pb-sxp-ui 1.20.12 → 1.20.14

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 +250 -173
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +250 -173
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +7 -7
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +7 -7
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +250 -173
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +7 -7
  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 +20 -18
  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 +33 -46
  18. package/es/core/components/SxpPageRender/WaterFall/index.js +4 -3
  19. package/es/core/components/SxpPageRender/index.js +56 -40
  20. package/es/core/context/SxpDataSourceProvider.d.ts +5 -12
  21. package/es/core/context/SxpDataSourceProvider.js +83 -39
  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 +20 -18
  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 +33 -46
  28. package/lib/core/components/SxpPageRender/WaterFall/index.js +4 -3
  29. package/lib/core/components/SxpPageRender/index.js +56 -40
  30. package/lib/core/context/SxpDataSourceProvider.d.ts +5 -12
  31. package/lib/core/context/SxpDataSourceProvider.js +83 -39
  32. package/lib/core/hooks/useEventReport.js +6 -5
  33. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -645,6 +645,7 @@ const DEFAULT_TAG = 'FOR U';
645
645
  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 }) => {
646
646
  var _a, _b, _c, _d, _e;
647
647
  const [rtcList, setRtcList] = useState([]);
648
+ const [firstRtcList, setFirstRtcList] = useState([]);
648
649
  const [tagList, setTagList] = useState([]);
649
650
  const [loading, setLoading] = useState(true);
650
651
  const [curReqInfo, setCurReqInfo] = useState({ rtc: '', requestId: '' });
@@ -676,6 +677,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
676
677
  const [chatlabsId, setChatlabsId] = useState();
677
678
  const finalPageData = useMemo(() => pageData !== null && pageData !== void 0 ? pageData : data, [pageData, data]);
678
679
  const pixelPvStatusRef = useRef(false);
680
+ const isDiyPage = useMemo(() => {
681
+ var _a, _b, _c;
682
+ return isDiyH5 && !((_c = (_b = (_a = finalPageData === null || finalPageData === void 0 ? void 0 : finalPageData.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf) === null || _b === void 0 ? void 0 : _b.globalConfig) === null || _c === void 0 ? void 0 : _c.enablePreview);
683
+ }, [isDiyH5, finalPageData]);
679
684
  useEffect(() => {
680
685
  var _a, _b;
681
686
  setGlobalConfig((_b = (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf) === null || _b === void 0 ? void 0 : _b.globalConfig);
@@ -781,7 +786,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
781
786
  };
782
787
  // bff API 请求方法
783
788
  const bffFetch = useCallback((path, options, isBota = true) => {
784
- var _a;
789
+ var _a, _b;
785
790
  if (!bffDataSource)
786
791
  return;
787
792
  const url = bffDataSource.url;
@@ -794,8 +799,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
794
799
  val.split('=')[0];
795
800
  val.split('=')[1];
796
801
  });
802
+ options.body = Object.assign(Object.assign({}, options.body), { productUserId: fakeUserId });
797
803
  return window
798
- .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
804
+ .fetch(`${url}/api/${path}`, Object.assign({ headers: Object.assign({ 'Content-Type': 'application/json', 'x-user-id': fakeUserId, 'tenant-id': (_b = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _b === void 0 ? void 0 : _b['x-app-id'] }, bffDataSource.headers), method: options.method, body: options.type === 'beacon' && isBota
799
805
  ? JSON.stringify({
800
806
  body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
801
807
  })
@@ -1080,8 +1086,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1080
1086
  }, [bffDataSource]);
1081
1087
  // 获取推荐视频数据
1082
1088
  const getRecommendVideos = useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
1083
- var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
1084
- query = Object.assign(Object.assign({ maxSize: (_f = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _f !== void 0 ? _f : maxSize, defaultSize: (_g = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _g !== void 0 ? _g : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag, pageNum: query === null || query === void 0 ? void 0 : query.pageNum, contentFilter: query === null || query === void 0 ? void 0 : query.contentFilter, productFilter: query === null || query === void 0 ? void 0 : query.productFilter }, (chatlabsId && { chatlabsId })), (isDiyH5 && { type: 'story' }));
1089
+ var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
1090
+ query = Object.assign(Object.assign({ maxSize: (_f = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _f !== void 0 ? _f : maxSize, defaultSize: (_g = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _g !== void 0 ? _g : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag, pageNum: query === null || query === void 0 ? void 0 : query.pageNum, contentFilter: query === null || query === void 0 ? void 0 : query.contentFilter, productFilter: query === null || query === void 0 ? void 0 : query.productFilter }, (chatlabsId && { chatlabsId })), (isDiyPage && { type: 'story' }));
1085
1091
  if (channel) {
1086
1092
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(channel) });
1087
1093
  }
@@ -1094,9 +1100,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1094
1100
  if (val)
1095
1101
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
1096
1102
  }
1103
+ const isDiy = isDiyH5 && ((_o = (_m = (_l = finalPageData === null || finalPageData === void 0 ? void 0 : finalPageData.data) === null || _l === void 0 ? void 0 : _l.sxpPageConf) === null || _m === void 0 ? void 0 : _m.globalConfig) === null || _o === void 0 ? void 0 : _o.enablePreview);
1097
1104
  if (isEditor) {
1098
1105
  let pageNum = 1;
1099
- query = Object.assign(Object.assign(Object.assign({}, query), { directPage: true, level: 1 }), (!utmVal && channelQueryList && (channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList.length) > 0 && { channel: channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList[0] }));
1106
+ query = Object.assign(Object.assign(Object.assign(Object.assign({}, query), { directPage: true, level: 1 }), (!utmVal && channelQueryList && (channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList.length) > 0 && { channel: channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList[0] })), (isDiy && { maxRecs: query === null || query === void 0 ? void 0 : query.maxSize }));
1100
1107
  if (!(query === null || query === void 0 ? void 0 : query.channel) || isInit.current) {
1101
1108
  return undefined;
1102
1109
  }
@@ -1104,19 +1111,24 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1104
1111
  let list = [];
1105
1112
  let result = null;
1106
1113
  const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
1107
- var _v, _w, _x, _y, _z, _0;
1114
+ var _y, _z, _0, _1, _2, _3;
1108
1115
  query.pageNum = pageNum;
1109
- result = yield (bffFetchAdmin === null || bffFetchAdmin === void 0 ? void 0 : bffFetchAdmin('recommend/direct_page', { method: 'POST', body: query }));
1116
+ result = isDiyH5
1117
+ ? yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v3/recommend/direct/page/view', { method: 'POST', body: query }))
1118
+ : yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('recommend/direct_page', { method: 'POST', body: query }));
1110
1119
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
1111
1120
  return undefined;
1112
1121
  }
1113
1122
  setLoading(false);
1114
- list = list.concat((_y = (_x = (_w = (_v = result === null || result === void 0 ? void 0 : result.data) === null || _v === void 0 ? void 0 : _v.recList) === null || _w === void 0 ? void 0 : _w.filter) === null || _x === void 0 ? void 0 : _x.call(_w, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _y !== void 0 ? _y : []);
1123
+ list = list.concat((_1 = (_0 = (_z = (_y = result === null || result === void 0 ? void 0 : result.data) === null || _y === void 0 ? void 0 : _y.recList) === null || _z === void 0 ? void 0 : _z.filter) === null || _0 === void 0 ? void 0 : _0.call(_z, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _1 !== void 0 ? _1 : []);
1115
1124
  if ((rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) === 0) {
1116
1125
  setRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
1117
1126
  setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
1127
+ if (isDiyPage) {
1128
+ setFirstRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
1129
+ }
1118
1130
  }
1119
- 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));
1131
+ const isNotNullList = (_3 = (_2 = result === null || result === void 0 ? void 0 : result.data) === null || _2 === void 0 ? void 0 : _2.recList) === null || _3 === void 0 ? void 0 : _3.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
1120
1132
  if (isNotNullList) {
1121
1133
  pageNum = pageNum + 1;
1122
1134
  yield recurveRecList(query);
@@ -1124,42 +1136,61 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1124
1136
  });
1125
1137
  yield recurveRecList(query);
1126
1138
  if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
1127
- setCurReqInfo({ rtc: (_l = result === null || result === void 0 ? void 0 : result.data) === null || _l === void 0 ? void 0 : _l.rtc, requestId: (_m = result === null || result === void 0 ? void 0 : result.data) === null || _m === void 0 ? void 0 : _m.requestId });
1139
+ setCurReqInfo({ rtc: (_p = result === null || result === void 0 ? void 0 : result.data) === null || _p === void 0 ? void 0 : _p.rtc, requestId: (_q = result === null || result === void 0 ? void 0 : result.data) === null || _q === void 0 ? void 0 : _q.requestId });
1128
1140
  return Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list });
1129
1141
  }
1130
1142
  if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
1131
- query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_o = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _o !== void 0 ? _o : 1 });
1143
+ query = Object.assign(Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_r = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _r !== void 0 ? _r : 1 }), (isDiy && { maxRecs: query === null || query === void 0 ? void 0 : query.maxSize }));
1132
1144
  }
1133
- const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/list', {
1134
- method: 'POST',
1135
- body: query
1136
- }));
1145
+ const result = isDiy
1146
+ ? yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v3/recommend/direct/page/view', { method: 'POST', body: query }))
1147
+ : yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/list', {
1148
+ method: 'POST',
1149
+ body: query
1150
+ }));
1137
1151
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
1138
1152
  return undefined;
1139
1153
  }
1140
1154
  if (!(query === null || query === void 0 ? void 0 : query.hashTag))
1141
1155
  setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
1142
1156
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
1143
- const isNotNullList = (_q = (_p = result === null || result === void 0 ? void 0 : result.data) === null || _p === void 0 ? void 0 : _p.recList) === null || _q === void 0 ? void 0 : _q.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
1157
+ const isNotNullList = (_t = (_s = result === null || result === void 0 ? void 0 : result.data) === null || _s === void 0 ? void 0 : _s.recList) === null || _t === void 0 ? void 0 : _t.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
1144
1158
  if (!isNotNullList) {
1145
1159
  setIsNoMoreData(true);
1146
1160
  }
1147
1161
  }
1148
1162
  let list = [];
1149
- list = list.concat((_u = (_t = (_s = (_r = result === null || result === void 0 ? void 0 : result.data) === null || _r === void 0 ? void 0 : _r.recList) === null || _s === void 0 ? void 0 : _s.filter) === null || _t === void 0 ? void 0 : _t.call(_s, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _u !== void 0 ? _u : []);
1163
+ list = list.concat((_x = (_w = (_v = (_u = result === null || result === void 0 ? void 0 : result.data) === null || _u === void 0 ? void 0 : _u.recList) === null || _v === void 0 ? void 0 : _v.filter) === null || _w === void 0 ? void 0 : _w.call(_v, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _x !== void 0 ? _x : []);
1150
1164
  return Object.assign(Object.assign({}, result.data), { recList: list });
1151
- }), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList, channel, chatlabsId, bffFetchAdmin]);
1165
+ }), [
1166
+ bffFetch,
1167
+ utmVal,
1168
+ maxSize,
1169
+ defaultSize,
1170
+ channelQueryList,
1171
+ channel,
1172
+ chatlabsId,
1173
+ bffFetchAdmin,
1174
+ isDiyPage,
1175
+ finalPageData,
1176
+ isDiyH5
1177
+ ]);
1152
1178
  const loadVideos = useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
1153
- var _1, _2, _3, _4;
1179
+ var _4, _5, _6, _7;
1154
1180
  if (rtcList.length <= 0) {
1155
1181
  return;
1156
1182
  }
1183
+ if (isDiyPage && (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) > 0) {
1184
+ setRtcList(rtcList.concat(firstRtcList));
1185
+ setCacheRtcList(cacheRtcList.concat(firstRtcList));
1186
+ return;
1187
+ }
1157
1188
  const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
1158
- 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 })));
1189
+ const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_4 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _4 === void 0 ? void 0 : _4.itemId) && { productFilter: [(_5 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _5 === void 0 ? void 0 : _5.itemId] })), (((_6 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _6 === void 0 ? void 0 : _6.itemId) && { contentFilter: [(_7 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _7 === void 0 ? void 0 : _7.itemId] })), { themeTag: themeTag.current }), ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor && { pageNum })));
1159
1190
  setRtcList(rtcList.concat(getFilterRecList(data)));
1160
1191
  setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
1161
1192
  return data;
1162
- }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
1193
+ }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList, isDiyPage, firstRtcList]);
1163
1194
  const refreshFeSession = useCallback((enableReSid, event) => {
1164
1195
  var _a, _b, _c, _d, _e;
1165
1196
  let expire = false;
@@ -1190,8 +1221,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1190
1221
  // 用户信息都是公共的
1191
1222
  if (!userInfo) {
1192
1223
  userInfo = {
1193
- // productUserId: fakeUserId, // 后端逻辑会从请求头获取,所以不需要传
1194
- // tpChannelId: 'H5' // 后端处理
1224
+ productUserId: fakeUserId // 后端逻辑会从请求头获取,所以不需要传
1225
+ // tpChannelId: 'H5' // 后端处理
1195
1226
  };
1196
1227
  }
1197
1228
  const sessionID = storeAndLoadFeSessionId();
@@ -1225,7 +1256,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1225
1256
  layoutVariantId,
1226
1257
  globalConfig,
1227
1258
  playbookType,
1228
- bffDataSource
1259
+ bffDataSource,
1260
+ fakeUserId
1229
1261
  ]);
1230
1262
  const getEventParamsByJson = useCallback((_a) => {
1231
1263
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
@@ -1279,7 +1311,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1279
1311
  'contents',
1280
1312
  'image_urls',
1281
1313
  'video_urls',
1282
- 'prompt'
1314
+ 'prompt',
1315
+ 'value'
1283
1316
  ];
1284
1317
  deleteKeys.forEach((key) => {
1285
1318
  if (customData === null || customData === void 0 ? void 0 : customData[key])
@@ -1411,38 +1444,40 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1411
1444
  }
1412
1445
  }, [bffFetch, enableReportEvent, enabledMetaConversionApi, globalConfig, bffDataSource, getEventParamsByJson]);
1413
1446
  const bffMutateLike = useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
1447
+ body = Object.assign(Object.assign({}, body), { productUserId: fakeUserId });
1414
1448
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/like', { method: 'POST', body }));
1415
1449
  return res === null || res === void 0 ? void 0 : res.success;
1416
- }), [bffFetch]);
1450
+ }), [bffFetch, fakeUserId]);
1417
1451
  const bffMutateUnlike = useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
1452
+ body = Object.assign(Object.assign({}, body), { productUserId: fakeUserId });
1418
1453
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/unlike', { method: 'POST', body }));
1419
1454
  return res === null || res === void 0 ? void 0 : res.success;
1420
- }), [bffFetch]);
1455
+ }), [bffFetch, fakeUserId]);
1421
1456
  const bffSubmitForm = useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
1422
1457
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/customform', { method: 'POST', body }));
1423
1458
  return res === null || res === void 0 ? void 0 : res.success;
1424
1459
  }), [bffFetch]);
1425
1460
  // 获取 Tag
1426
1461
  const bffGetTagList = useCallback((data) => __awaiter(void 0, void 0, void 0, function* () {
1427
- var _5, _6, _7, _8, _9, _10, _11, _12;
1428
- const isShowTag = !!((_7 = (_6 = (_5 = data === null || data === void 0 ? void 0 : data.data) === null || _5 === void 0 ? void 0 : _5.sxpPageConf) === null || _6 === void 0 ? void 0 : _6.globalConfig) === null || _7 === void 0 ? void 0 : _7.isShowTag);
1462
+ var _8, _9, _10, _11, _12, _13, _14, _15;
1463
+ const isShowTag = !!((_10 = (_9 = (_8 = data === null || data === void 0 ? void 0 : data.data) === null || _8 === void 0 ? void 0 : _8.sxpPageConf) === null || _9 === void 0 ? void 0 : _9.globalConfig) === null || _10 === void 0 ? void 0 : _10.isShowTag);
1429
1464
  if (!utmVal || !isShowTag)
1430
1465
  return;
1431
1466
  try {
1432
- const val = (_10 = (_9 = (_8 = splitUrlParams(utmVal)) === null || _8 === void 0 ? void 0 : _8.filter((val) => {
1467
+ const val = (_13 = (_12 = (_11 = splitUrlParams(utmVal)) === null || _11 === void 0 ? void 0 : _11.filter((val) => {
1433
1468
  var _a, _b;
1434
1469
  const key = val.split('=')[0];
1435
1470
  return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
1436
- })) === null || _9 === void 0 ? void 0 : _9.join('&')) !== null && _10 !== void 0 ? _10 : '';
1471
+ })) === null || _12 === void 0 ? void 0 : _12.join('&')) !== null && _13 !== void 0 ? _13 : '';
1437
1472
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
1438
- setTagList((_12 = (_11 = result === null || result === void 0 ? void 0 : result.data) === null || _11 === void 0 ? void 0 : _11.tags) !== null && _12 !== void 0 ? _12 : []);
1473
+ setTagList((_15 = (_14 = result === null || result === void 0 ? void 0 : result.data) === null || _14 === void 0 ? void 0 : _14.tags) !== null && _15 !== void 0 ? _15 : []);
1439
1474
  }
1440
1475
  catch (e) {
1441
1476
  console.log('e', e);
1442
1477
  }
1443
1478
  }), [bffFetch, utmVal]);
1444
1479
  const ctaEvent = useCallback((eventInfo, rec, product, position, ctaActionType, targetUrl, contentType) => {
1445
- 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;
1480
+ 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;
1446
1481
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
1447
1482
  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);
1448
1483
  let fromKName = '';
@@ -1460,7 +1495,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1460
1495
  }
1461
1496
  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;
1462
1497
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1463
- 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 })
1498
+ 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 })
1464
1499
  });
1465
1500
  }, [bffEventReport, isFromHashtag]);
1466
1501
  const h5EnterLink = useCallback(() => {
@@ -1484,10 +1519,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1484
1519
  });
1485
1520
  }, [bffEventReport]);
1486
1521
  const getAccount = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
1487
- var _13, _14;
1522
+ var _16, _17;
1488
1523
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/account', { method: 'GET' }));
1489
- setChatlabsId((_13 = res === null || res === void 0 ? void 0 : res.data) === null || _13 === void 0 ? void 0 : _13.chatLabsId);
1490
- return ((_14 = res === null || res === void 0 ? void 0 : res.data) === null || _14 === void 0 ? void 0 : _14.consentResult) === 'true';
1524
+ setChatlabsId((_16 = res === null || res === void 0 ? void 0 : res.data) === null || _16 === void 0 ? void 0 : _16.chatLabsId);
1525
+ return ((_17 = res === null || res === void 0 ? void 0 : res.data) === null || _17 === void 0 ? void 0 : _17.consentResult) === 'true';
1491
1526
  }), [bffFetch]);
1492
1527
  const accountSonsent = useCallback((consentResult) => __awaiter(void 0, void 0, void 0, function* () {
1493
1528
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/account/consent', {
@@ -1551,6 +1586,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1551
1586
  }
1552
1587
  setRtcList(list);
1553
1588
  setCacheRtcList(list);
1589
+ if (isDiyPage) {
1590
+ setFirstRtcList(list);
1591
+ }
1554
1592
  bffGetTagList(curData !== null && curData !== void 0 ? curData : finalPageData);
1555
1593
  if (channel) {
1556
1594
  const item = list === null || list === void 0 ? void 0 : list[0];
@@ -1570,7 +1608,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1570
1608
  });
1571
1609
  setLoading(false);
1572
1610
  });
1573
- }, [isShowConsent, channel]);
1611
+ }, [isShowConsent, channel, isDiyPage]);
1574
1612
  // cms预览
1575
1613
  useEffect(() => {
1576
1614
  if (!isPreview)
@@ -1586,12 +1624,15 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1586
1624
  }
1587
1625
  setRtcList(list);
1588
1626
  setCacheRtcList(list);
1627
+ if (isDiyPage) {
1628
+ setFirstRtcList(list);
1629
+ }
1589
1630
  }
1590
1631
  })
1591
1632
  .finally(() => {
1592
1633
  setLoading(false);
1593
1634
  });
1594
- }, [getRecommendVideos, bffGetTagList, channel]);
1635
+ }, [getRecommendVideos, bffGetTagList, channel, isDiyPage]);
1595
1636
  const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
1596
1637
  return (React.createElement(SxpDataSourceContext.Provider, { value: {
1597
1638
  rtcList,
@@ -1649,7 +1690,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1649
1690
  refreshFeSession,
1650
1691
  getAccount,
1651
1692
  accountSonsent,
1652
- isDiyH5,
1693
+ isDiyH5: isDiyPage,
1694
+ firstRtcList,
1653
1695
  pixelPvStatusRef
1654
1696
  } }, 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({
1655
1697
  rtcList,
@@ -2111,14 +2153,14 @@ var settingRender$f = [
2111
2153
  * @Author: binruan@chatlabs.com
2112
2154
  * @Date: 2024-03-12 10:59:06
2113
2155
  * @LastEditors: binruan@chatlabs.com
2114
- * @LastEditTime: 2024-11-28 11:17:16
2156
+ * @LastEditTime: 2025-05-09 15:30:59
2115
2157
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
2116
2158
  *
2117
2159
  */
2118
2160
  function useEventReport() {
2119
2161
  const { bffEventReport, popupDetailData, isFromHashtag, eventTimeList, setEventTimeList } = useSxpDataSource();
2120
2162
  const jumpToWeb = useCallback((e, data, product, cta, position, traceInfo) => {
2121
- 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;
2163
+ 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;
2122
2164
  const i = eventTimeList === null || eventTimeList === void 0 ? void 0 : eventTimeList.findIndex((item) => item.target === (e === null || e === void 0 ? void 0 : e.target));
2123
2165
  if (i !== -1) {
2124
2166
  return;
@@ -2151,11 +2193,11 @@ function useEventReport() {
2151
2193
  contentFormat = 'image';
2152
2194
  }
2153
2195
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
2154
- 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 }))
2196
+ 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 }))
2155
2197
  });
2156
2198
  }, [bffEventReport, popupDetailData, isFromHashtag, eventTimeList]);
2157
2199
  const productView = useCallback((data, product, cta, viewTime, position) => {
2158
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
2200
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
2159
2201
  let fromKName = '';
2160
2202
  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))) {
2161
2203
  fromKName = 'pdpPage';
@@ -2174,8 +2216,9 @@ function useEventReport() {
2174
2216
  contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
2175
2217
  position: position + '',
2176
2218
  contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
2219
+ 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 : '',
2177
2220
  ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
2178
- 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 : '',
2221
+ 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 : '',
2179
2222
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
2180
2223
  eventSubject: 'productView',
2181
2224
  eventDescription: 'User browsed the product'
@@ -16219,7 +16262,7 @@ function WaterfallList(_a) {
16219
16262
  * @Author: binruan@chatlabs.com
16220
16263
  * @Date: 2024-01-10 10:58:24
16221
16264
  * @LastEditors: binruan@chatlabs.com
16222
- * @LastEditTime: 2025-02-28 10:00:31
16265
+ * @LastEditTime: 2025-05-09 15:30:41
16223
16266
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
16224
16267
  *
16225
16268
  */
@@ -16257,7 +16300,7 @@ const WaterFall = (props) => {
16257
16300
  }
16258
16301
  }, [waterFallData]);
16259
16302
  const reportTagsView = useCallback(() => {
16260
- var _a, _b, _c, _d, _e, _f;
16303
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
16261
16304
  const rec = recData === null || recData === void 0 ? void 0 : recData.rec;
16262
16305
  if (!rec)
16263
16306
  return;
@@ -16277,9 +16320,10 @@ const WaterFall = (props) => {
16277
16320
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
16278
16321
  eventInfo: {
16279
16322
  contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
16323
+ 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 : '',
16280
16324
  position: cacheActiveIndex + '',
16281
- contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
16282
- traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
16325
+ contentTags: JSON.stringify((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.tags),
16326
+ traceInfo: (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.traceInfo,
16283
16327
  hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
16284
16328
  fromKName,
16285
16329
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
@@ -18386,21 +18430,22 @@ const LikeButton = (_a) => {
18386
18430
  const likeIcon = useIconLink(defaultLikeIconPath$2);
18387
18431
  const unlikeIcon = useIconLink(defaultUnLikeIconPath$2);
18388
18432
  const handleClick = debounce(() => __awaiter(void 0, void 0, void 0, function* () {
18389
- 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;
18433
+ 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, _6, _7, _8, _9, _10;
18390
18434
  if (state) {
18391
18435
  // 先设置状态
18392
18436
  setState(false);
18393
- const result = (_e = (yield (mutateUnlike === null || mutateUnlike === void 0 ? void 0 : mutateUnlike({ videoItemId: (_d = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '' })))) !== null && _e !== void 0 ? _e : false;
18437
+ const result = (_e = (yield (mutateUnlike === null || mutateUnlike === void 0 ? void 0 : mutateUnlike({ itemId: (_d = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '' })))) !== null && _e !== void 0 ? _e : false;
18394
18438
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18395
18439
  eventInfo: {
18396
18440
  eventSubject: 'favoriteContentCanceled',
18397
18441
  eventDescription: 'This content was unfavorite by the user',
18398
18442
  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 : '',
18399
- 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 : '',
18400
- 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 : []),
18443
+ 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 : '',
18444
+ 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 : '',
18445
+ 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 : []),
18401
18446
  position: position + '',
18402
- contentFormat: ((_m = recData === null || recData === void 0 ? void 0 : recData.video) === null || _m === void 0 ? void 0 : _m.url) ? 'video' : 'image',
18403
- traceInfo: (_o = recData === null || recData === void 0 ? void 0 : recData.video) === null || _o === void 0 ? void 0 : _o.traceInfo
18447
+ contentFormat: ((_q = recData === null || recData === void 0 ? void 0 : recData.video) === null || _q === void 0 ? void 0 : _q.url) ? 'video' : 'image',
18448
+ traceInfo: (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.traceInfo
18404
18449
  }
18405
18450
  });
18406
18451
  // 如果接口调用失败,则回滚状态
@@ -18408,48 +18453,49 @@ const LikeButton = (_a) => {
18408
18453
  setState(true);
18409
18454
  }
18410
18455
  else {
18411
- const nRtcList = (_p = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18456
+ const nRtcList = (_s = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18412
18457
  if (index === position) {
18413
18458
  item.isCollected = false;
18414
18459
  }
18415
18460
  return item;
18416
- })) !== null && _p !== void 0 ? _p : [];
18461
+ })) !== null && _s !== void 0 ? _s : [];
18417
18462
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
18418
18463
  }
18419
18464
  }
18420
18465
  else {
18421
18466
  setState(true);
18422
- const result = (_q = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _q !== void 0 ? _q : false;
18467
+ const result = (_v = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData), itemId: (_u = (_t = recData === null || recData === void 0 ? void 0 : recData.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '' })))) !== null && _v !== void 0 ? _v : false;
18423
18468
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18424
18469
  eventInfo: {
18425
18470
  eventSubject: 'favoriteContent',
18426
18471
  eventDescription: 'This content was favorite by the user',
18427
- 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 : '',
18428
- 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 : '',
18429
- 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 : []),
18472
+ contentId: (_x = (_w = recData === null || recData === void 0 ? void 0 : recData.video) === null || _w === void 0 ? void 0 : _w.itemId) !== null && _x !== void 0 ? _x : '',
18473
+ sceneId: (_0 = (_z = (_y = recData === null || recData === void 0 ? void 0 : recData.video) === null || _y === void 0 ? void 0 : _y.scene) === null || _z === void 0 ? void 0 : _z.sceneId) !== null && _0 !== void 0 ? _0 : '',
18474
+ contentName: (_2 = (_1 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _1 === void 0 ? void 0 : _1.title) !== null && _2 !== void 0 ? _2 : '',
18475
+ contentTags: JSON.stringify((_4 = (_3 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _3 === void 0 ? void 0 : _3.tags) !== null && _4 !== void 0 ? _4 : []),
18430
18476
  position: position + '',
18431
- contentFormat: ((_x = recData === null || recData === void 0 ? void 0 : recData.video) === null || _x === void 0 ? void 0 : _x.url) ? 'video' : 'image',
18432
- traceInfo: (_y = recData === null || recData === void 0 ? void 0 : recData.video) === null || _y === void 0 ? void 0 : _y.traceInfo
18477
+ contentFormat: ((_5 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _5 === void 0 ? void 0 : _5.url) ? 'video' : 'image',
18478
+ traceInfo: (_6 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _6 === void 0 ? void 0 : _6.traceInfo
18433
18479
  }
18434
18480
  });
18435
18481
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
18436
18482
  eventName: 'Engagement',
18437
- product: (_z = recData === null || recData === void 0 ? void 0 : recData.video) === null || _z === void 0 ? void 0 : _z.bindProducts,
18483
+ product: (_7 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _7 === void 0 ? void 0 : _7.bindProducts,
18438
18484
  rec: recData,
18439
18485
  position,
18440
- content_id: (_1 = (_0 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _0 === void 0 ? void 0 : _0.itemId) !== null && _1 !== void 0 ? _1 : '',
18486
+ content_id: (_9 = (_8 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _8 === void 0 ? void 0 : _8.itemId) !== null && _9 !== void 0 ? _9 : '',
18441
18487
  engagement_type: 'like'
18442
18488
  });
18443
18489
  if (!result) {
18444
18490
  setState(false);
18445
18491
  }
18446
18492
  else {
18447
- const nRtcList = (_2 = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18493
+ const nRtcList = (_10 = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18448
18494
  if (index === position) {
18449
18495
  item.isCollected = true;
18450
18496
  }
18451
18497
  return item;
18452
- })) !== null && _2 !== void 0 ? _2 : [];
18498
+ })) !== null && _10 !== void 0 ? _10 : [];
18453
18499
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
18454
18500
  }
18455
18501
  }
@@ -18486,7 +18532,7 @@ const mountVideoPlayerAtNode = (() => {
18486
18532
  const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex, videoPostConfig, videoPlayIcon, loopPlay, swiperRef, visibleHeight }, ref) => {
18487
18533
  var _a, _b;
18488
18534
  const [isPauseVideo, setIsPauseVideo] = useState(false);
18489
- const { bffEventReport, sxpParameter, waterFallData, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
18535
+ const { bffEventReport, sxpParameter, firstRtcList, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
18490
18536
  const videoStartTime = useRef(0);
18491
18537
  const [isLoadFinish, setIsLoadFinish] = useState(false);
18492
18538
  const { isActive } = useSwiperSlide();
@@ -18503,7 +18549,7 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18503
18549
  const loopPlayRef = useRef(loopPlay);
18504
18550
  const scene = rec.video.scene;
18505
18551
  const videoUrl = (scene === null || scene === void 0 ? void 0 : scene.mediaUrl) || ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url);
18506
- const videoCover = (scene === null || scene === void 0 ? void 0 : scene.mediaUrl) ? scene === null || scene === void 0 ? void 0 : scene.cover : (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.cover;
18552
+ const videoCover = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.cover;
18507
18553
  const videoPoster = videoCover || (sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image);
18508
18554
  useImperativeHandle(ref, () => {
18509
18555
  return {
@@ -18552,6 +18598,23 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18552
18598
  return;
18553
18599
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
18554
18600
  }, [videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18601
+ const handleEnd = () => {
18602
+ var _a, _b, _c, _d, _e, _f;
18603
+ if (!videoRef.current)
18604
+ return;
18605
+ if (isDiyH5) {
18606
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.pause();
18607
+ if (!loopPlayRef.current)
18608
+ return;
18609
+ if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
18610
+ 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;
18611
+ (_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);
18612
+ }
18613
+ }
18614
+ else {
18615
+ (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.play();
18616
+ }
18617
+ };
18555
18618
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
18556
18619
  const handlePlaying = useCallback(() => {
18557
18620
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
@@ -18560,7 +18623,7 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18560
18623
  setIsLoadFinish(true);
18561
18624
  }, []);
18562
18625
  const handleStartPlay = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
18563
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18626
+ var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
18564
18627
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
18565
18628
  return;
18566
18629
  setIsPauseVideo(false);
@@ -18571,16 +18634,11 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18571
18634
  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);
18572
18635
  const playType = (isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) ? '0' : '1';
18573
18636
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18574
- 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) + '' }))
18637
+ 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) + '' }))
18575
18638
  });
18576
18639
  isFirstPlayRef.current = false;
18577
18640
  }
18578
18641
  }), [bffEventReport, data, index, isFirstPlayRef, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18579
- const setCurrentTimeByStartTime = useCallback(() => {
18580
- if (isDiyH5) {
18581
- videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
18582
- }
18583
- }, []);
18584
18642
  const handLoadeddata = useCallback(() => {
18585
18643
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || firstFrameSrc || !blur)
18586
18644
  return;
@@ -18605,13 +18663,12 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18605
18663
  const handleLoadedmetadata = useCallback(() => {
18606
18664
  if (!videoRef.current)
18607
18665
  return;
18608
- setCurrentTimeByStartTime();
18609
18666
  loadedTimeRef.current = new Date();
18610
18667
  handleStartPlay();
18611
18668
  handLoadeddata();
18612
18669
  }, [videoRef.current, handLoadeddata, handleStartPlay]);
18613
18670
  const handleClickVideo = useCallback((type) => () => {
18614
- var _a, _b, _c, _d, _e, _f;
18671
+ var _a, _b, _c, _d, _e;
18615
18672
  if (!videoRef.current)
18616
18673
  return;
18617
18674
  if (!isLoadFinish)
@@ -18632,20 +18689,17 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18632
18689
  break;
18633
18690
  default:
18634
18691
  if (isPause) {
18635
- 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)) {
18636
- videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
18637
- }
18638
- (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
18692
+ (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
18639
18693
  }
18640
18694
  else {
18641
- (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
18695
+ (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.pause();
18642
18696
  }
18643
18697
  setIsPauseVideo(!isPause);
18644
18698
  break;
18645
18699
  }
18646
18700
  }, [isLoadFinish, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18647
18701
  const handlePause = useCallback(() => {
18648
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
18702
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
18649
18703
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
18650
18704
  return;
18651
18705
  if (activeIndex !== index)
@@ -18661,14 +18715,15 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18661
18715
  eventSubject: 'playOverVideo',
18662
18716
  eventDescription: 'User finished playing the video',
18663
18717
  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 : '',
18664
- 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 : '',
18718
+ 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 : '',
18719
+ 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 : '',
18665
18720
  endTime: videoCurrentTime,
18666
18721
  videoDuration,
18667
18722
  playDuration,
18668
- 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 : []),
18723
+ 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 : []),
18669
18724
  position: index + '',
18670
18725
  contentFormat: 'video',
18671
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
18726
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
18672
18727
  }
18673
18728
  });
18674
18729
  }
@@ -18676,27 +18731,8 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18676
18731
  const handleWaiting = useCallback(() => {
18677
18732
  setWaiting(true);
18678
18733
  }, []);
18679
- const handleTimeUpload = () => {
18680
- if (!videoRef.current || !isDiyH5)
18681
- return;
18682
- setTimeout(() => {
18683
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
18684
- 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)) {
18685
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
18686
- if (!loopPlayRef.current)
18687
- return;
18688
- if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
18689
- (_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);
18690
- }
18691
- else {
18692
- 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;
18693
- (_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);
18694
- }
18695
- }
18696
- });
18697
- };
18698
18734
  useEffect(() => {
18699
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18735
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18700
18736
  if (!isActive)
18701
18737
  return;
18702
18738
  const videoSrc = videoUrl;
@@ -18717,7 +18753,6 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18717
18753
  hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
18718
18754
  hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
18719
18755
  var _a;
18720
- setCurrentTimeByStartTime();
18721
18756
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
18722
18757
  });
18723
18758
  }
@@ -18731,12 +18766,11 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18731
18766
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('play', handleStartPlay);
18732
18767
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
18733
18768
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.addEventListener('pause', handlePause);
18734
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handlePlay);
18769
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handleEnd);
18735
18770
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
18736
18771
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
18737
- (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.addEventListener('timeupdate', handleTimeUpload);
18738
18772
  return () => {
18739
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18773
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18740
18774
  const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
18741
18775
  if (!isPause)
18742
18776
  handlePause();
@@ -18748,10 +18782,9 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18748
18782
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('play', handleStartPlay);
18749
18783
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('playing', handlePlaying);
18750
18784
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('pause', handlePause);
18751
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handlePlay);
18785
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handleEnd);
18752
18786
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('canplay', handlePlay);
18753
18787
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.removeEventListener('waiting', handleWaiting);
18754
- (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.removeEventListener('timeupdate', handleTimeUpload);
18755
18788
  };
18756
18789
  }, [isActive]);
18757
18790
  useEffect(() => {
@@ -18966,19 +18999,45 @@ const Picture = (props) => {
18966
18999
  }, onLoad: onShowFirstImage }))));
18967
19000
  };
18968
19001
 
18969
- const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig }) => {
19002
+ const PictureGroup$4 = forwardRef(({ imgUrls, data, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig, swiperRef }, ref) => {
18970
19003
  var _a, _b;
18971
19004
  const { isActive } = useSwiperSlide();
18972
- const { sxpParameter, openHashtag } = useSxpDataSource();
19005
+ const { firstRtcList, openHashtag, isDiyH5 } = useSxpDataSource();
18973
19006
  const [isLoad, setIsLoad] = useState(false);
18974
19007
  const [imgInfo, setImgInfo] = useState();
18975
19008
  const [swiperActiveIndex, setSwiperActiveIndex] = useState(0);
18976
- const swiperRef = useRef();
19009
+ const imgsSwiperRef = useRef();
18977
19010
  const isFirstPlayRef = useRef(true);
19011
+ const loopPlayRef = useRef(true);
18978
19012
  const initTime = new Date();
19013
+ useImperativeHandle(ref, () => {
19014
+ return {
19015
+ setLoopPlay(v) {
19016
+ loopPlayRef.current = v;
19017
+ }
19018
+ };
19019
+ });
19020
+ useEffect(() => {
19021
+ let timerId;
19022
+ if (isLoad && isActive && isDiyH5) {
19023
+ timerId = setTimeout(() => {
19024
+ var _a, _b, _c, _d;
19025
+ if (!loopPlayRef.current)
19026
+ return;
19027
+ if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
19028
+ 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;
19029
+ (_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);
19030
+ }
19031
+ }, 3000);
19032
+ }
19033
+ return () => {
19034
+ if (timerId)
19035
+ clearTimeout(timerId);
19036
+ };
19037
+ }, [isLoad, isActive, isDiyH5, index, swiperRef, firstRtcList]);
18979
19038
  useEffect(() => {
18980
19039
  if (isLoad && isActive) {
18981
- (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.start();
19040
+ (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.start();
18982
19041
  if (openHashtag) {
18983
19042
  onViewImageEndEvent(rec);
18984
19043
  }
@@ -18988,7 +19047,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
18988
19047
  }
18989
19048
  }
18990
19049
  else {
18991
- (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.stop();
19050
+ (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.stop();
18992
19051
  }
18993
19052
  }, [rec, isActive, onViewImageEndEvent, openHashtag, index, onViewImageStartEvent, isLoad, imgInfo]);
18994
19053
  const showFirstImageFn = useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
@@ -19015,13 +19074,13 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
19015
19074
  };
19016
19075
  }, [isActive, imgInfo]);
19017
19076
  const handleMouseEnter = useCallback(() => {
19018
- if (swiperRef.current && swiperRef.current.swiper && isAlly) {
19019
- swiperRef.current.swiper.autoplay.stop();
19077
+ if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
19078
+ imgsSwiperRef.current.swiper.autoplay.stop();
19020
19079
  }
19021
19080
  }, []);
19022
19081
  const handleMouseLeave = useCallback(() => {
19023
- if (swiperRef.current && swiperRef.current.swiper && isAlly) {
19024
- swiperRef.current.swiper.autoplay.start();
19082
+ if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
19083
+ imgsSwiperRef.current.swiper.autoplay.start();
19025
19084
  }
19026
19085
  }, []);
19027
19086
  const handleSlideChange = useCallback((swiper) => {
@@ -19042,7 +19101,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
19042
19101
  enabled: true
19043
19102
  }
19044
19103
  }
19045
- : {}), { loop: true, ref: swiperRef, onSlideChange: handleSlideChange, className: css(Object.assign(Object.assign({ '.swiper-pagination': {
19104
+ : {}), { loop: true, ref: imgsSwiperRef, onSlideChange: handleSlideChange, className: css(Object.assign(Object.assign({ '.swiper-pagination': {
19046
19105
  bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
19047
19106
  fontSize: '14px'
19048
19107
  } }, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor) && {
@@ -19059,7 +19118,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
19059
19118
  return (React.createElement(SwiperSlide, { key: srcKey, "aria-hidden": srcKey !== swiperActiveIndex },
19060
19119
  React.createElement(Picture, { src: !isLoad && srcKey > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
19061
19120
  }))));
19062
- };
19121
+ });
19063
19122
  var PictureGroup$5 = memo(PictureGroup$4);
19064
19123
 
19065
19124
  /*
@@ -19351,7 +19410,7 @@ var NavBack$1 = memo(NavBack);
19351
19410
  * @Author: binruan@chatlabs.com
19352
19411
  * @Date: 2024-03-20 10:27:31
19353
19412
  * @LastEditors: binruan@chatlabs.com
19354
- * @LastEditTime: 2025-05-09 15:51:40
19413
+ * @LastEditTime: 2025-05-12 14:26:15
19355
19414
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
19356
19415
  *
19357
19416
  */
@@ -19372,6 +19431,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19372
19431
  const [pageNum, setPageNum] = useState(2);
19373
19432
  useState(false);
19374
19433
  const videoWidgetRef = useRef(null);
19434
+ const pictureGroupRef = useRef(null);
19375
19435
  const fbcRef = useRef('');
19376
19436
  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, pixelPvStatusRef } = useSxpDataSource();
19377
19437
  const { backMainFeed, productView, jumpToWeb } = useEventReport();
@@ -19421,7 +19481,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19421
19481
  (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
19422
19482
  }, [data, ctaType, swiperRef]);
19423
19483
  const handleSessionCompleted = useCallback((fk) => {
19424
- 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;
19484
+ 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;
19425
19485
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
19426
19486
  let fromKName = '';
19427
19487
  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))) {
@@ -19448,22 +19508,23 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19448
19508
  eventSubject: 'sessionCompleted',
19449
19509
  eventDescription: 'Session completed',
19450
19510
  contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
19451
- productId: (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.itemId,
19511
+ 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 : '',
19512
+ productId: (_r = item === null || item === void 0 ? void 0 : item.product) === null || _r === void 0 ? void 0 : _r.itemId,
19452
19513
  position: activeIndex + '',
19453
19514
  fromKName: fk || fromKName,
19454
19515
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
19455
- 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 : '',
19456
- 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 : ''
19516
+ 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 : '',
19517
+ 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 : ''
19457
19518
  }
19458
19519
  });
19459
- const isPostType = ((_w = item === null || item === void 0 ? void 0 : item.video) === null || _w === void 0 ? void 0 : _w.url) || ((_y = (_x = item === null || item === void 0 ? void 0 : item.video) === null || _x === void 0 ? void 0 : _x.imgUrls) === null || _y === void 0 ? void 0 : _y.length);
19520
+ const isPostType = ((_z = item === null || item === void 0 ? void 0 : item.video) === null || _z === void 0 ? void 0 : _z.url) || ((_1 = (_0 = item === null || item === void 0 ? void 0 : item.video) === null || _0 === void 0 ? void 0 : _0.imgUrls) === null || _1 === void 0 ? void 0 : _1.length);
19460
19521
  if (!popupDetailData) {
19461
19522
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19462
19523
  eventName: 'ExitFeed',
19463
- product: isPostType ? (_z = item === null || item === void 0 ? void 0 : item.video) === null || _z === void 0 ? void 0 : _z.bindProducts : (item === null || item === void 0 ? void 0 : item.product) ? [item === null || item === void 0 ? void 0 : item.product] : [],
19524
+ product: isPostType ? (_2 = item === null || item === void 0 ? void 0 : item.video) === null || _2 === void 0 ? void 0 : _2.bindProducts : (item === null || item === void 0 ? void 0 : item.product) ? [item === null || item === void 0 ? void 0 : item.product] : [],
19464
19525
  rec: item,
19465
19526
  position: activeIndex,
19466
- content_id: isPostType ? (_1 = (_0 = item === null || item === void 0 ? void 0 : item.video) === null || _0 === void 0 ? void 0 : _0.itemId) !== null && _1 !== void 0 ? _1 : '' : (_3 = (_2 = item === null || item === void 0 ? void 0 : item.product) === null || _2 === void 0 ? void 0 : _2.itemId) !== null && _3 !== void 0 ? _3 : '',
19527
+ content_id: isPostType ? (_4 = (_3 = item === null || item === void 0 ? void 0 : item.video) === null || _3 === void 0 ? void 0 : _3.itemId) !== null && _4 !== void 0 ? _4 : '' : (_6 = (_5 = item === null || item === void 0 ? void 0 : item.product) === null || _5 === void 0 ? void 0 : _5.itemId) !== null && _6 !== void 0 ? _6 : '',
19467
19528
  view_time: new Date() - viewTime.current
19468
19529
  });
19469
19530
  }
@@ -19523,8 +19584,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19523
19584
  refreshFeSession
19524
19585
  ]);
19525
19586
  const handleSessionExpire = useCallback(debounce(() => {
19526
- var _a;
19587
+ var _a, _b;
19527
19588
  (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
19589
+ (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
19528
19590
  refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(false, handleSessionCompleted);
19529
19591
  }, 1000), [handleSessionCompleted, refreshFeSession]);
19530
19592
  useEffect(() => {
@@ -19595,18 +19657,18 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19595
19657
  return null;
19596
19658
  }, [globalConfig, activeIndex, visList]);
19597
19659
  const renderContent = useCallback((rec, index) => {
19598
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
19660
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
19599
19661
  if (rec === 'organic menu') {
19600
19662
  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)));
19601
19663
  }
19602
- if ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.url) {
19664
+ 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)) {
19603
19665
  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, visibleHeight: visibleHeight })));
19604
19666
  }
19605
- if ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.imgUrls) {
19606
- 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 }));
19667
+ if ((_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.imgUrls) {
19668
+ 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 })));
19607
19669
  }
19608
- 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) {
19609
- return (_k = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _k === void 0 ? void 0 : _k.map((value, idx) => {
19670
+ 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) {
19671
+ return (_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _m === void 0 ? void 0 : _m.map((value, idx) => {
19610
19672
  var _a, _b, _c, _d, _e, _f, _g, _h;
19611
19673
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
19612
19674
  const Component = withBindDataSource(t);
@@ -19645,7 +19707,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19645
19707
  };
19646
19708
  }, [isShowMore]);
19647
19709
  const renderBottom = useCallback((rec, index) => {
19648
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
19710
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
19649
19711
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
19650
19712
  let cta = null;
19651
19713
  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) {
@@ -19654,24 +19716,27 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19654
19716
  else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
19655
19717
  cta = '商品CTA';
19656
19718
  }
19719
+ 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)) {
19720
+ cta = '服务CTA';
19721
+ }
19657
19722
  else {
19658
- 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;
19723
+ 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;
19659
19724
  }
19660
19725
  const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
19661
19726
  const isNineProduct = (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.nineProductEnable) &&
19662
19727
  index === ((rtcList === null || rtcList === void 0 ? void 0 : rtcList[0]) === 'organic menu' ? 1 : 0) &&
19663
- ((_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));
19728
+ ((_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));
19664
19729
  return (React.createElement(React.Fragment, null,
19665
19730
  isNineProduct && (React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, isNineProduct: isNineProduct })),
19666
- ((_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' }),
19667
- 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` } },
19731
+ ((_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' }),
19732
+ 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` } },
19668
19733
  React.createElement(Nudge, { nudge: nudge }),
19669
19734
  ((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' },
19670
19735
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, includesCtaType: [] }))) : null,
19671
19736
  React.createElement("div", { style: { display: 'flex', flexDirection: 'column' } },
19672
- 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 }),
19737
+ 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 }),
19673
19738
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex }),
19674
- 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) }))),
19739
+ 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) }))),
19675
19740
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
19676
19741
  }
19677
19742
  return null;
@@ -19713,7 +19778,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19713
19778
  return null;
19714
19779
  }, [globalConfig, waterFallData, bottomHeight]);
19715
19780
  const handleViewImageStartEnd = (item) => {
19716
- var _a, _b, _c, _d, _e, _f;
19781
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
19717
19782
  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)) {
19718
19783
  const endTime = Date.now();
19719
19784
  const duration = viewImageStartTime.current === 0 ? 0 : (endTime - viewImageStartTime.current) / 1000;
@@ -19722,10 +19787,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19722
19787
  eventSubject: 'viewImageCarouselEnd',
19723
19788
  eventDescription: 'User end view the image carousel',
19724
19789
  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 : '',
19725
- contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
19790
+ 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 : '',
19791
+ contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19726
19792
  imageEndTime: `${endTime}`,
19727
19793
  playDuration: `${duration}`,
19728
- contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
19794
+ contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19729
19795
  position: activeIndex + '',
19730
19796
  contentFormat: 'image',
19731
19797
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
@@ -19734,7 +19800,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19734
19800
  }
19735
19801
  };
19736
19802
  const handleSlideSkip = (item, position) => {
19737
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
19803
+ 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;
19738
19804
  if (isPreview || waterFallData)
19739
19805
  return;
19740
19806
  const t = new Date() - curTime.current;
@@ -19760,7 +19826,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19760
19826
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
19761
19827
  position: position + '',
19762
19828
  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 : '',
19763
- 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 : '',
19829
+ 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 : '',
19830
+ 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 : '',
19764
19831
  contentFormat
19765
19832
  }
19766
19833
  });
@@ -19770,7 +19837,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19770
19837
  }
19771
19838
  };
19772
19839
  const handleScrollEvent = (swiper) => {
19773
- 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;
19840
+ 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;
19774
19841
  const item = data[swiper.previousIndex];
19775
19842
  const activeItem = data[swiper.activeIndex];
19776
19843
  if (!item)
@@ -19803,11 +19870,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19803
19870
  eventSubject: 'scrollDown',
19804
19871
  eventDescription: 'User scroll down',
19805
19872
  contentId: (_u = (_t = item === null || item === void 0 ? void 0 : item.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '',
19806
- productId: (_w = (_v = item === null || item === void 0 ? void 0 : item.product) === null || _v === void 0 ? void 0 : _v.itemId) !== null && _w !== void 0 ? _w : '',
19873
+ sceneId: (_x = (_w = (_v = item === null || item === void 0 ? void 0 : item.video) === null || _v === void 0 ? void 0 : _v.scene) === null || _w === void 0 ? void 0 : _w.sceneId) !== null && _x !== void 0 ? _x : '',
19874
+ productId: (_z = (_y = item === null || item === void 0 ? void 0 : item.product) === null || _y === void 0 ? void 0 : _y.itemId) !== null && _z !== void 0 ? _z : '',
19807
19875
  requestId: null,
19808
- 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 : '',
19876
+ traceInfo: (_3 = (_1 = (_0 = item === null || item === void 0 ? void 0 : item.video) === null || _0 === void 0 ? void 0 : _0.traceInfo) !== null && _1 !== void 0 ? _1 : (_2 = item === null || item === void 0 ? void 0 : item.product) === null || _2 === void 0 ? void 0 : _2.traceInfo) !== null && _3 !== void 0 ? _3 : '',
19809
19877
  contentFormat,
19810
- position: ((_1 = swiper.previousIndex) !== null && _1 !== void 0 ? _1 : 0) + ''
19878
+ position: ((_4 = swiper.previousIndex) !== null && _4 !== void 0 ? _4 : 0) + ''
19811
19879
  }
19812
19880
  });
19813
19881
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19820,12 +19888,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19820
19888
  eventInfo: {
19821
19889
  eventSubject: 'scrollUp',
19822
19890
  eventDescription: 'User scroll up',
19823
- contentId: (_3 = (_2 = item === null || item === void 0 ? void 0 : item.video) === null || _2 === void 0 ? void 0 : _2.itemId) !== null && _3 !== void 0 ? _3 : '',
19824
- productId: (_5 = (_4 = item.product) === null || _4 === void 0 ? void 0 : _4.itemId) !== null && _5 !== void 0 ? _5 : '',
19891
+ contentId: (_6 = (_5 = item === null || item === void 0 ? void 0 : item.video) === null || _5 === void 0 ? void 0 : _5.itemId) !== null && _6 !== void 0 ? _6 : '',
19892
+ sceneId: (_9 = (_8 = (_7 = item === null || item === void 0 ? void 0 : item.video) === null || _7 === void 0 ? void 0 : _7.scene) === null || _8 === void 0 ? void 0 : _8.sceneId) !== null && _9 !== void 0 ? _9 : '',
19893
+ productId: (_11 = (_10 = item.product) === null || _10 === void 0 ? void 0 : _10.itemId) !== null && _11 !== void 0 ? _11 : '',
19825
19894
  requestId: null,
19826
- traceInfo: (_9 = (_7 = (_6 = item === null || item === void 0 ? void 0 : item.video) === null || _6 === void 0 ? void 0 : _6.traceInfo) !== null && _7 !== void 0 ? _7 : (_8 = item === null || item === void 0 ? void 0 : item.product) === null || _8 === void 0 ? void 0 : _8.traceInfo) !== null && _9 !== void 0 ? _9 : '',
19895
+ traceInfo: (_15 = (_13 = (_12 = item === null || item === void 0 ? void 0 : item.video) === null || _12 === void 0 ? void 0 : _12.traceInfo) !== null && _13 !== void 0 ? _13 : (_14 = item === null || item === void 0 ? void 0 : item.product) === null || _14 === void 0 ? void 0 : _14.traceInfo) !== null && _15 !== void 0 ? _15 : '',
19827
19896
  contentFormat,
19828
- position: ((_10 = swiper.previousIndex) !== null && _10 !== void 0 ? _10 : 0) + ''
19897
+ position: ((_16 = swiper.previousIndex) !== null && _16 !== void 0 ? _16 : 0) + ''
19829
19898
  }
19830
19899
  });
19831
19900
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19925,7 +19994,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19925
19994
  };
19926
19995
  }, [globalConfig, bffEventReport, data, activeIndex]);
19927
19996
  const handleViewImageStartEvent = (activeIndex, imgInfo, enableCapi) => {
19928
- var _a, _b, _c, _d, _e, _f, _g, _h;
19997
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
19929
19998
  const item = data[activeIndex];
19930
19999
  // 如果是图片集则上报事件
19931
20000
  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)) {
@@ -19936,9 +20005,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19936
20005
  eventSubject: 'viewImageCarouselStart',
19937
20006
  eventDescription: 'User start view the image carousel',
19938
20007
  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 : '',
19939
- contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
20008
+ 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 : '',
20009
+ contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19940
20010
  imageStartTime: `${startTime}`,
19941
- contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
20011
+ contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19942
20012
  position: activeIndex + '',
19943
20013
  contentFormat: 'image',
19944
20014
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo,
@@ -19948,13 +20018,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19948
20018
  if (enableCapi) {
19949
20019
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19950
20020
  eventName: 'ViewContent',
19951
- product: (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.bindProducts,
20021
+ product: (_k = item === null || item === void 0 ? void 0 : item.video) === null || _k === void 0 ? void 0 : _k.bindProducts,
19952
20022
  rec: item,
19953
20023
  position: activeIndex
19954
20024
  });
19955
20025
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19956
20026
  eventName: 'PageView',
19957
- product: (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProducts,
20027
+ product: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.bindProducts,
19958
20028
  rec: item,
19959
20029
  position: activeIndex
19960
20030
  });
@@ -20052,15 +20122,20 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
20052
20122
  swiperRef.current.swiper.allowTouchMove = true;
20053
20123
  }, 500);
20054
20124
  }, onActiveIndexChange: (swiper) => {
20125
+ var _a, _b;
20055
20126
  setActiveIndex(swiper.activeIndex);
20056
20127
  if (openHashtag)
20057
20128
  return;
20058
20129
  // 处理上滑下滑事件
20059
20130
  handleScrollEvent(swiper);
20060
- if (waterFallData || isEditor || isDiyH5)
20131
+ if (waterFallData || isEditor)
20061
20132
  return;
20062
20133
  if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
20063
20134
  if (!isLoadMore) {
20135
+ if (isDiyH5) {
20136
+ (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
20137
+ (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
20138
+ }
20064
20139
  setIsLoadMore(true);
20065
20140
  loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(pageNum).then((res) => {
20066
20141
  var _a;
@@ -20133,7 +20208,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
20133
20208
  }, []);
20134
20209
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
20135
20210
  const handlePlaying = useCallback(() => {
20136
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
20211
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
20137
20212
  setIsPauseVideo(false);
20138
20213
  const item = data[index];
20139
20214
  if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
@@ -20146,14 +20221,15 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
20146
20221
  eventSubject: 'playVideo',
20147
20222
  eventDescription: 'User played the video',
20148
20223
  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 : '',
20149
- 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 : '',
20224
+ 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 : '',
20225
+ 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 : '',
20150
20226
  playType,
20151
20227
  startTime: videoCurrentTime,
20152
20228
  videoDuration,
20153
- 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 : []),
20229
+ 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 : []),
20154
20230
  position: index + '',
20155
20231
  contentFormat: 'video',
20156
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
20232
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
20157
20233
  }
20158
20234
  });
20159
20235
  setIsFirstPlay(false);
@@ -20192,7 +20268,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
20192
20268
  }
20193
20269
  }, [isLoadFinish]);
20194
20270
  const onPause = useCallback(() => {
20195
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
20271
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
20196
20272
  const item = data[index];
20197
20273
  const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
20198
20274
  const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
@@ -20203,14 +20279,15 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
20203
20279
  eventSubject: 'playOverVideo',
20204
20280
  eventDescription: 'User finished playing the video',
20205
20281
  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 : '',
20206
- 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 : '',
20282
+ 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 : '',
20283
+ 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 : '',
20207
20284
  endTime: videoCurrentTime,
20208
20285
  videoDuration,
20209
20286
  playDuration,
20210
- 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 : []),
20287
+ 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 : []),
20211
20288
  position: index + '',
20212
20289
  contentFormat: 'video',
20213
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
20290
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
20214
20291
  }
20215
20292
  });
20216
20293
  }