pb-sxp-ui 1.20.13 → 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 +248 -172
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +248 -172
  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 +248 -172
  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 +81 -38
  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 +81 -38
  32. package/lib/core/hooks/useEventReport.js +6 -5
  33. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -667,6 +667,7 @@ const DEFAULT_TAG = 'FOR U';
667
667
  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 }) => {
668
668
  var _a, _b, _c, _d, _e;
669
669
  const [rtcList, setRtcList] = React.useState([]);
670
+ const [firstRtcList, setFirstRtcList] = React.useState([]);
670
671
  const [tagList, setTagList] = React.useState([]);
671
672
  const [loading, setLoading] = React.useState(true);
672
673
  const [curReqInfo, setCurReqInfo] = React.useState({ rtc: '', requestId: '' });
@@ -698,6 +699,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
698
699
  const [chatlabsId, setChatlabsId] = React.useState();
699
700
  const finalPageData = React.useMemo(() => pageData !== null && pageData !== void 0 ? pageData : data, [pageData, data]);
700
701
  const pixelPvStatusRef = React.useRef(false);
702
+ const isDiyPage = React.useMemo(() => {
703
+ var _a, _b, _c;
704
+ 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);
705
+ }, [isDiyH5, finalPageData]);
701
706
  React.useEffect(() => {
702
707
  var _a, _b;
703
708
  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);
@@ -803,7 +808,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
803
808
  };
804
809
  // bff API 请求方法
805
810
  const bffFetch = React.useCallback((path, options, isBota = true) => {
806
- var _a;
811
+ var _a, _b;
807
812
  if (!bffDataSource)
808
813
  return;
809
814
  const url = bffDataSource.url;
@@ -816,8 +821,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
816
821
  val.split('=')[0];
817
822
  val.split('=')[1];
818
823
  });
824
+ options.body = Object.assign(Object.assign({}, options.body), { productUserId: fakeUserId });
819
825
  return window
820
- .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
826
+ .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
821
827
  ? JSON.stringify({
822
828
  body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
823
829
  })
@@ -1102,8 +1108,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1102
1108
  }, [bffDataSource]);
1103
1109
  // 获取推荐视频数据
1104
1110
  const getRecommendVideos = React.useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
1105
- var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
1106
- 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' }));
1111
+ var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
1112
+ 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' }));
1107
1113
  if (channel) {
1108
1114
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(channel) });
1109
1115
  }
@@ -1116,9 +1122,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1116
1122
  if (val)
1117
1123
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
1118
1124
  }
1125
+ 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);
1119
1126
  if (isEditor) {
1120
1127
  let pageNum = 1;
1121
- 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] }));
1128
+ 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 }));
1122
1129
  if (!(query === null || query === void 0 ? void 0 : query.channel) || isInit.current) {
1123
1130
  return undefined;
1124
1131
  }
@@ -1126,19 +1133,24 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1126
1133
  let list = [];
1127
1134
  let result = null;
1128
1135
  const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
1129
- var _v, _w, _x, _y, _z, _0;
1136
+ var _y, _z, _0, _1, _2, _3;
1130
1137
  query.pageNum = pageNum;
1131
- result = yield (bffFetchAdmin === null || bffFetchAdmin === void 0 ? void 0 : bffFetchAdmin('recommend/direct_page', { method: 'POST', body: query }));
1138
+ result = isDiyH5
1139
+ ? yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v3/recommend/direct/page/view', { method: 'POST', body: query }))
1140
+ : yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('recommend/direct_page', { method: 'POST', body: query }));
1132
1141
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
1133
1142
  return undefined;
1134
1143
  }
1135
1144
  setLoading(false);
1136
- 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 : []);
1145
+ 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 : []);
1137
1146
  if ((rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) === 0) {
1138
1147
  setRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
1139
1148
  setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
1149
+ if (isDiyPage) {
1150
+ setFirstRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
1151
+ }
1140
1152
  }
1141
- 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));
1153
+ 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));
1142
1154
  if (isNotNullList) {
1143
1155
  pageNum = pageNum + 1;
1144
1156
  yield recurveRecList(query);
@@ -1146,42 +1158,61 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1146
1158
  });
1147
1159
  yield recurveRecList(query);
1148
1160
  if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
1149
- 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 });
1161
+ 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 });
1150
1162
  return Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list });
1151
1163
  }
1152
1164
  if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
1153
- 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 });
1165
+ 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 }));
1154
1166
  }
1155
- const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/list', {
1156
- method: 'POST',
1157
- body: query
1158
- }));
1167
+ const result = isDiy
1168
+ ? yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v3/recommend/direct/page/view', { method: 'POST', body: query }))
1169
+ : yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/list', {
1170
+ method: 'POST',
1171
+ body: query
1172
+ }));
1159
1173
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
1160
1174
  return undefined;
1161
1175
  }
1162
1176
  if (!(query === null || query === void 0 ? void 0 : query.hashTag))
1163
1177
  setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
1164
1178
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
1165
- 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));
1179
+ 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));
1166
1180
  if (!isNotNullList) {
1167
1181
  setIsNoMoreData(true);
1168
1182
  }
1169
1183
  }
1170
1184
  let list = [];
1171
- 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 : []);
1185
+ 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 : []);
1172
1186
  return Object.assign(Object.assign({}, result.data), { recList: list });
1173
- }), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList, channel, chatlabsId, bffFetchAdmin]);
1187
+ }), [
1188
+ bffFetch,
1189
+ utmVal,
1190
+ maxSize,
1191
+ defaultSize,
1192
+ channelQueryList,
1193
+ channel,
1194
+ chatlabsId,
1195
+ bffFetchAdmin,
1196
+ isDiyPage,
1197
+ finalPageData,
1198
+ isDiyH5
1199
+ ]);
1174
1200
  const loadVideos = React.useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
1175
- var _1, _2, _3, _4;
1201
+ var _4, _5, _6, _7;
1176
1202
  if (rtcList.length <= 0) {
1177
1203
  return;
1178
1204
  }
1205
+ if (isDiyPage && (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) > 0) {
1206
+ setRtcList(rtcList.concat(firstRtcList));
1207
+ setCacheRtcList(cacheRtcList.concat(firstRtcList));
1208
+ return;
1209
+ }
1179
1210
  const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
1180
- 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 })));
1211
+ 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 })));
1181
1212
  setRtcList(rtcList.concat(getFilterRecList(data)));
1182
1213
  setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
1183
1214
  return data;
1184
- }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
1215
+ }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList, isDiyPage, firstRtcList]);
1185
1216
  const refreshFeSession = React.useCallback((enableReSid, event) => {
1186
1217
  var _a, _b, _c, _d, _e;
1187
1218
  let expire = false;
@@ -1212,8 +1243,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1212
1243
  // 用户信息都是公共的
1213
1244
  if (!userInfo) {
1214
1245
  userInfo = {
1215
- // productUserId: fakeUserId, // 后端逻辑会从请求头获取,所以不需要传
1216
- // tpChannelId: 'H5' // 后端处理
1246
+ productUserId: fakeUserId // 后端逻辑会从请求头获取,所以不需要传
1247
+ // tpChannelId: 'H5' // 后端处理
1217
1248
  };
1218
1249
  }
1219
1250
  const sessionID = storeAndLoadFeSessionId();
@@ -1247,7 +1278,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1247
1278
  layoutVariantId,
1248
1279
  globalConfig,
1249
1280
  playbookType,
1250
- bffDataSource
1281
+ bffDataSource,
1282
+ fakeUserId
1251
1283
  ]);
1252
1284
  const getEventParamsByJson = React.useCallback((_a) => {
1253
1285
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
@@ -1434,38 +1466,40 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1434
1466
  }
1435
1467
  }, [bffFetch, enableReportEvent, enabledMetaConversionApi, globalConfig, bffDataSource, getEventParamsByJson]);
1436
1468
  const bffMutateLike = React.useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
1469
+ body = Object.assign(Object.assign({}, body), { productUserId: fakeUserId });
1437
1470
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/like', { method: 'POST', body }));
1438
1471
  return res === null || res === void 0 ? void 0 : res.success;
1439
- }), [bffFetch]);
1472
+ }), [bffFetch, fakeUserId]);
1440
1473
  const bffMutateUnlike = React.useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
1474
+ body = Object.assign(Object.assign({}, body), { productUserId: fakeUserId });
1441
1475
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/unlike', { method: 'POST', body }));
1442
1476
  return res === null || res === void 0 ? void 0 : res.success;
1443
- }), [bffFetch]);
1477
+ }), [bffFetch, fakeUserId]);
1444
1478
  const bffSubmitForm = React.useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
1445
1479
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/customform', { method: 'POST', body }));
1446
1480
  return res === null || res === void 0 ? void 0 : res.success;
1447
1481
  }), [bffFetch]);
1448
1482
  // 获取 Tag
1449
1483
  const bffGetTagList = React.useCallback((data) => __awaiter(void 0, void 0, void 0, function* () {
1450
- var _5, _6, _7, _8, _9, _10, _11, _12;
1451
- 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);
1484
+ var _8, _9, _10, _11, _12, _13, _14, _15;
1485
+ 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);
1452
1486
  if (!utmVal || !isShowTag)
1453
1487
  return;
1454
1488
  try {
1455
- const val = (_10 = (_9 = (_8 = splitUrlParams(utmVal)) === null || _8 === void 0 ? void 0 : _8.filter((val) => {
1489
+ const val = (_13 = (_12 = (_11 = splitUrlParams(utmVal)) === null || _11 === void 0 ? void 0 : _11.filter((val) => {
1456
1490
  var _a, _b;
1457
1491
  const key = val.split('=')[0];
1458
1492
  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);
1459
- })) === null || _9 === void 0 ? void 0 : _9.join('&')) !== null && _10 !== void 0 ? _10 : '';
1493
+ })) === null || _12 === void 0 ? void 0 : _12.join('&')) !== null && _13 !== void 0 ? _13 : '';
1460
1494
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
1461
- 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 : []);
1495
+ 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 : []);
1462
1496
  }
1463
1497
  catch (e) {
1464
1498
  console.log('e', e);
1465
1499
  }
1466
1500
  }), [bffFetch, utmVal]);
1467
1501
  const ctaEvent = React.useCallback((eventInfo, rec, product, position, ctaActionType, targetUrl, contentType) => {
1468
- 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;
1502
+ 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;
1469
1503
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
1470
1504
  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);
1471
1505
  let fromKName = '';
@@ -1483,7 +1517,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1483
1517
  }
1484
1518
  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;
1485
1519
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1486
- 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 })
1520
+ 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 })
1487
1521
  });
1488
1522
  }, [bffEventReport, isFromHashtag]);
1489
1523
  const h5EnterLink = React.useCallback(() => {
@@ -1507,10 +1541,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1507
1541
  });
1508
1542
  }, [bffEventReport]);
1509
1543
  const getAccount = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
1510
- var _13, _14;
1544
+ var _16, _17;
1511
1545
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/account', { method: 'GET' }));
1512
- setChatlabsId((_13 = res === null || res === void 0 ? void 0 : res.data) === null || _13 === void 0 ? void 0 : _13.chatLabsId);
1513
- return ((_14 = res === null || res === void 0 ? void 0 : res.data) === null || _14 === void 0 ? void 0 : _14.consentResult) === 'true';
1546
+ setChatlabsId((_16 = res === null || res === void 0 ? void 0 : res.data) === null || _16 === void 0 ? void 0 : _16.chatLabsId);
1547
+ return ((_17 = res === null || res === void 0 ? void 0 : res.data) === null || _17 === void 0 ? void 0 : _17.consentResult) === 'true';
1514
1548
  }), [bffFetch]);
1515
1549
  const accountSonsent = React.useCallback((consentResult) => __awaiter(void 0, void 0, void 0, function* () {
1516
1550
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/account/consent', {
@@ -1574,6 +1608,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1574
1608
  }
1575
1609
  setRtcList(list);
1576
1610
  setCacheRtcList(list);
1611
+ if (isDiyPage) {
1612
+ setFirstRtcList(list);
1613
+ }
1577
1614
  bffGetTagList(curData !== null && curData !== void 0 ? curData : finalPageData);
1578
1615
  if (channel) {
1579
1616
  const item = list === null || list === void 0 ? void 0 : list[0];
@@ -1593,7 +1630,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1593
1630
  });
1594
1631
  setLoading(false);
1595
1632
  });
1596
- }, [isShowConsent, channel]);
1633
+ }, [isShowConsent, channel, isDiyPage]);
1597
1634
  // cms预览
1598
1635
  React.useEffect(() => {
1599
1636
  if (!isPreview)
@@ -1609,12 +1646,15 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1609
1646
  }
1610
1647
  setRtcList(list);
1611
1648
  setCacheRtcList(list);
1649
+ if (isDiyPage) {
1650
+ setFirstRtcList(list);
1651
+ }
1612
1652
  }
1613
1653
  })
1614
1654
  .finally(() => {
1615
1655
  setLoading(false);
1616
1656
  });
1617
- }, [getRecommendVideos, bffGetTagList, channel]);
1657
+ }, [getRecommendVideos, bffGetTagList, channel, isDiyPage]);
1618
1658
  const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
1619
1659
  return (React.createElement(SxpDataSourceContext.Provider, { value: {
1620
1660
  rtcList,
@@ -1672,7 +1712,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1672
1712
  refreshFeSession,
1673
1713
  getAccount,
1674
1714
  accountSonsent,
1675
- isDiyH5,
1715
+ isDiyH5: isDiyPage,
1716
+ firstRtcList,
1676
1717
  pixelPvStatusRef
1677
1718
  } }, 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({
1678
1719
  rtcList,
@@ -2134,14 +2175,14 @@ var settingRender$f = [
2134
2175
  * @Author: binruan@chatlabs.com
2135
2176
  * @Date: 2024-03-12 10:59:06
2136
2177
  * @LastEditors: binruan@chatlabs.com
2137
- * @LastEditTime: 2024-11-28 11:17:16
2178
+ * @LastEditTime: 2025-05-09 15:30:59
2138
2179
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
2139
2180
  *
2140
2181
  */
2141
2182
  function useEventReport() {
2142
2183
  const { bffEventReport, popupDetailData, isFromHashtag, eventTimeList, setEventTimeList } = useSxpDataSource();
2143
2184
  const jumpToWeb = React.useCallback((e, data, product, cta, position, traceInfo) => {
2144
- 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;
2185
+ 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;
2145
2186
  const i = eventTimeList === null || eventTimeList === void 0 ? void 0 : eventTimeList.findIndex((item) => item.target === (e === null || e === void 0 ? void 0 : e.target));
2146
2187
  if (i !== -1) {
2147
2188
  return;
@@ -2174,11 +2215,11 @@ function useEventReport() {
2174
2215
  contentFormat = 'image';
2175
2216
  }
2176
2217
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
2177
- 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 }))
2218
+ 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 }))
2178
2219
  });
2179
2220
  }, [bffEventReport, popupDetailData, isFromHashtag, eventTimeList]);
2180
2221
  const productView = React.useCallback((data, product, cta, viewTime, position) => {
2181
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
2222
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
2182
2223
  let fromKName = '';
2183
2224
  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))) {
2184
2225
  fromKName = 'pdpPage';
@@ -2197,8 +2238,9 @@ function useEventReport() {
2197
2238
  contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
2198
2239
  position: position + '',
2199
2240
  contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
2241
+ 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 : '',
2200
2242
  ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
2201
- 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 : '',
2243
+ 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 : '',
2202
2244
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
2203
2245
  eventSubject: 'productView',
2204
2246
  eventDescription: 'User browsed the product'
@@ -16242,7 +16284,7 @@ function WaterfallList(_a) {
16242
16284
  * @Author: binruan@chatlabs.com
16243
16285
  * @Date: 2024-01-10 10:58:24
16244
16286
  * @LastEditors: binruan@chatlabs.com
16245
- * @LastEditTime: 2025-02-28 10:00:31
16287
+ * @LastEditTime: 2025-05-09 15:30:41
16246
16288
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
16247
16289
  *
16248
16290
  */
@@ -16280,7 +16322,7 @@ const WaterFall = (props) => {
16280
16322
  }
16281
16323
  }, [waterFallData]);
16282
16324
  const reportTagsView = React.useCallback(() => {
16283
- var _a, _b, _c, _d, _e, _f;
16325
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
16284
16326
  const rec = recData === null || recData === void 0 ? void 0 : recData.rec;
16285
16327
  if (!rec)
16286
16328
  return;
@@ -16300,9 +16342,10 @@ const WaterFall = (props) => {
16300
16342
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
16301
16343
  eventInfo: {
16302
16344
  contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
16345
+ 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 : '',
16303
16346
  position: cacheActiveIndex + '',
16304
- contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
16305
- traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
16347
+ contentTags: JSON.stringify((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.tags),
16348
+ traceInfo: (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.traceInfo,
16306
16349
  hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
16307
16350
  fromKName,
16308
16351
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
@@ -18409,21 +18452,22 @@ const LikeButton = (_a) => {
18409
18452
  const likeIcon = useIconLink(defaultLikeIconPath$2);
18410
18453
  const unlikeIcon = useIconLink(defaultUnLikeIconPath$2);
18411
18454
  const handleClick = lodash.debounce(() => __awaiter(void 0, void 0, void 0, function* () {
18412
- 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;
18455
+ 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;
18413
18456
  if (state) {
18414
18457
  // 先设置状态
18415
18458
  setState(false);
18416
- 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;
18459
+ 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;
18417
18460
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18418
18461
  eventInfo: {
18419
18462
  eventSubject: 'favoriteContentCanceled',
18420
18463
  eventDescription: 'This content was unfavorite by the user',
18421
18464
  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 : '',
18422
- 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 : '',
18423
- 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 : []),
18465
+ 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 : '',
18466
+ 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 : '',
18467
+ 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 : []),
18424
18468
  position: position + '',
18425
- contentFormat: ((_m = recData === null || recData === void 0 ? void 0 : recData.video) === null || _m === void 0 ? void 0 : _m.url) ? 'video' : 'image',
18426
- traceInfo: (_o = recData === null || recData === void 0 ? void 0 : recData.video) === null || _o === void 0 ? void 0 : _o.traceInfo
18469
+ contentFormat: ((_q = recData === null || recData === void 0 ? void 0 : recData.video) === null || _q === void 0 ? void 0 : _q.url) ? 'video' : 'image',
18470
+ traceInfo: (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.traceInfo
18427
18471
  }
18428
18472
  });
18429
18473
  // 如果接口调用失败,则回滚状态
@@ -18431,48 +18475,49 @@ const LikeButton = (_a) => {
18431
18475
  setState(true);
18432
18476
  }
18433
18477
  else {
18434
- const nRtcList = (_p = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18478
+ const nRtcList = (_s = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18435
18479
  if (index === position) {
18436
18480
  item.isCollected = false;
18437
18481
  }
18438
18482
  return item;
18439
- })) !== null && _p !== void 0 ? _p : [];
18483
+ })) !== null && _s !== void 0 ? _s : [];
18440
18484
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
18441
18485
  }
18442
18486
  }
18443
18487
  else {
18444
18488
  setState(true);
18445
- const result = (_q = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _q !== void 0 ? _q : false;
18489
+ 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;
18446
18490
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18447
18491
  eventInfo: {
18448
18492
  eventSubject: 'favoriteContent',
18449
18493
  eventDescription: 'This content was favorite by the user',
18450
- 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 : '',
18451
- 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 : '',
18452
- 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 : []),
18494
+ 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 : '',
18495
+ 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 : '',
18496
+ 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 : '',
18497
+ 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 : []),
18453
18498
  position: position + '',
18454
- contentFormat: ((_x = recData === null || recData === void 0 ? void 0 : recData.video) === null || _x === void 0 ? void 0 : _x.url) ? 'video' : 'image',
18455
- traceInfo: (_y = recData === null || recData === void 0 ? void 0 : recData.video) === null || _y === void 0 ? void 0 : _y.traceInfo
18499
+ contentFormat: ((_5 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _5 === void 0 ? void 0 : _5.url) ? 'video' : 'image',
18500
+ traceInfo: (_6 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _6 === void 0 ? void 0 : _6.traceInfo
18456
18501
  }
18457
18502
  });
18458
18503
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
18459
18504
  eventName: 'Engagement',
18460
- product: (_z = recData === null || recData === void 0 ? void 0 : recData.video) === null || _z === void 0 ? void 0 : _z.bindProducts,
18505
+ product: (_7 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _7 === void 0 ? void 0 : _7.bindProducts,
18461
18506
  rec: recData,
18462
18507
  position,
18463
- 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 : '',
18508
+ 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 : '',
18464
18509
  engagement_type: 'like'
18465
18510
  });
18466
18511
  if (!result) {
18467
18512
  setState(false);
18468
18513
  }
18469
18514
  else {
18470
- const nRtcList = (_2 = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18515
+ const nRtcList = (_10 = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
18471
18516
  if (index === position) {
18472
18517
  item.isCollected = true;
18473
18518
  }
18474
18519
  return item;
18475
- })) !== null && _2 !== void 0 ? _2 : [];
18520
+ })) !== null && _10 !== void 0 ? _10 : [];
18476
18521
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
18477
18522
  }
18478
18523
  }
@@ -18509,7 +18554,7 @@ const mountVideoPlayerAtNode = (() => {
18509
18554
  const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activeIndex, videoPostConfig, videoPlayIcon, loopPlay, swiperRef, visibleHeight }, ref) => {
18510
18555
  var _a, _b;
18511
18556
  const [isPauseVideo, setIsPauseVideo] = React.useState(false);
18512
- const { bffEventReport, sxpParameter, waterFallData, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
18557
+ const { bffEventReport, sxpParameter, firstRtcList, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
18513
18558
  const videoStartTime = React.useRef(0);
18514
18559
  const [isLoadFinish, setIsLoadFinish] = React.useState(false);
18515
18560
  const { isActive } = useSwiperSlide();
@@ -18526,7 +18571,7 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18526
18571
  const loopPlayRef = React.useRef(loopPlay);
18527
18572
  const scene = rec.video.scene;
18528
18573
  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);
18529
- 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;
18574
+ const videoCover = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.cover;
18530
18575
  const videoPoster = videoCover || (sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image);
18531
18576
  React.useImperativeHandle(ref, () => {
18532
18577
  return {
@@ -18575,6 +18620,23 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18575
18620
  return;
18576
18621
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
18577
18622
  }, [videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18623
+ const handleEnd = () => {
18624
+ var _a, _b, _c, _d, _e, _f;
18625
+ if (!videoRef.current)
18626
+ return;
18627
+ if (isDiyH5) {
18628
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.pause();
18629
+ if (!loopPlayRef.current)
18630
+ return;
18631
+ if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
18632
+ 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;
18633
+ (_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);
18634
+ }
18635
+ }
18636
+ else {
18637
+ (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.play();
18638
+ }
18639
+ };
18578
18640
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
18579
18641
  const handlePlaying = React.useCallback(() => {
18580
18642
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
@@ -18583,7 +18645,7 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18583
18645
  setIsLoadFinish(true);
18584
18646
  }, []);
18585
18647
  const handleStartPlay = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
18586
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18648
+ var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
18587
18649
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
18588
18650
  return;
18589
18651
  setIsPauseVideo(false);
@@ -18594,16 +18656,11 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18594
18656
  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);
18595
18657
  const playType = (isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) ? '0' : '1';
18596
18658
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
18597
- 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) + '' }))
18659
+ 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) + '' }))
18598
18660
  });
18599
18661
  isFirstPlayRef.current = false;
18600
18662
  }
18601
18663
  }), [bffEventReport, data, index, isFirstPlayRef, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18602
- const setCurrentTimeByStartTime = React.useCallback(() => {
18603
- if (isDiyH5) {
18604
- videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
18605
- }
18606
- }, []);
18607
18664
  const handLoadeddata = React.useCallback(() => {
18608
18665
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || firstFrameSrc || !blur)
18609
18666
  return;
@@ -18628,13 +18685,12 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18628
18685
  const handleLoadedmetadata = React.useCallback(() => {
18629
18686
  if (!videoRef.current)
18630
18687
  return;
18631
- setCurrentTimeByStartTime();
18632
18688
  loadedTimeRef.current = new Date();
18633
18689
  handleStartPlay();
18634
18690
  handLoadeddata();
18635
18691
  }, [videoRef.current, handLoadeddata, handleStartPlay]);
18636
18692
  const handleClickVideo = React.useCallback((type) => () => {
18637
- var _a, _b, _c, _d, _e, _f;
18693
+ var _a, _b, _c, _d, _e;
18638
18694
  if (!videoRef.current)
18639
18695
  return;
18640
18696
  if (!isLoadFinish)
@@ -18655,20 +18711,17 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18655
18711
  break;
18656
18712
  default:
18657
18713
  if (isPause) {
18658
- 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)) {
18659
- videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
18660
- }
18661
- (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
18714
+ (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
18662
18715
  }
18663
18716
  else {
18664
- (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
18717
+ (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.pause();
18665
18718
  }
18666
18719
  setIsPauseVideo(!isPause);
18667
18720
  break;
18668
18721
  }
18669
18722
  }, [isLoadFinish, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18670
18723
  const handlePause = React.useCallback(() => {
18671
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
18724
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
18672
18725
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
18673
18726
  return;
18674
18727
  if (activeIndex !== index)
@@ -18684,14 +18737,15 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18684
18737
  eventSubject: 'playOverVideo',
18685
18738
  eventDescription: 'User finished playing the video',
18686
18739
  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 : '',
18687
- 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 : '',
18740
+ 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 : '',
18741
+ 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 : '',
18688
18742
  endTime: videoCurrentTime,
18689
18743
  videoDuration,
18690
18744
  playDuration,
18691
- 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 : []),
18745
+ 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 : []),
18692
18746
  position: index + '',
18693
18747
  contentFormat: 'video',
18694
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
18748
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
18695
18749
  }
18696
18750
  });
18697
18751
  }
@@ -18699,27 +18753,8 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18699
18753
  const handleWaiting = React.useCallback(() => {
18700
18754
  setWaiting(true);
18701
18755
  }, []);
18702
- const handleTimeUpload = () => {
18703
- if (!videoRef.current || !isDiyH5)
18704
- return;
18705
- setTimeout(() => {
18706
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
18707
- 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)) {
18708
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
18709
- if (!loopPlayRef.current)
18710
- return;
18711
- if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
18712
- (_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);
18713
- }
18714
- else {
18715
- 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;
18716
- (_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);
18717
- }
18718
- }
18719
- });
18720
- };
18721
18756
  React.useEffect(() => {
18722
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18757
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18723
18758
  if (!isActive)
18724
18759
  return;
18725
18760
  const videoSrc = videoUrl;
@@ -18740,7 +18775,6 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18740
18775
  hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
18741
18776
  hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
18742
18777
  var _a;
18743
- setCurrentTimeByStartTime();
18744
18778
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
18745
18779
  });
18746
18780
  }
@@ -18754,12 +18788,11 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18754
18788
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('play', handleStartPlay);
18755
18789
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
18756
18790
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.addEventListener('pause', handlePause);
18757
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handlePlay);
18791
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handleEnd);
18758
18792
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
18759
18793
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
18760
- (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.addEventListener('timeupdate', handleTimeUpload);
18761
18794
  return () => {
18762
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18795
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18763
18796
  const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
18764
18797
  if (!isPause)
18765
18798
  handlePause();
@@ -18771,10 +18804,9 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
18771
18804
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('play', handleStartPlay);
18772
18805
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('playing', handlePlaying);
18773
18806
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('pause', handlePause);
18774
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handlePlay);
18807
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handleEnd);
18775
18808
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('canplay', handlePlay);
18776
18809
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.removeEventListener('waiting', handleWaiting);
18777
- (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.removeEventListener('timeupdate', handleTimeUpload);
18778
18810
  };
18779
18811
  }, [isActive]);
18780
18812
  React.useEffect(() => {
@@ -18989,19 +19021,45 @@ const Picture = (props) => {
18989
19021
  }, onLoad: onShowFirstImage }))));
18990
19022
  };
18991
19023
 
18992
- const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig }) => {
19024
+ const PictureGroup$4 = React.forwardRef(({ imgUrls, data, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig, swiperRef }, ref) => {
18993
19025
  var _a, _b;
18994
19026
  const { isActive } = useSwiperSlide();
18995
- const { sxpParameter, openHashtag } = useSxpDataSource();
19027
+ const { firstRtcList, openHashtag, isDiyH5 } = useSxpDataSource();
18996
19028
  const [isLoad, setIsLoad] = React.useState(false);
18997
19029
  const [imgInfo, setImgInfo] = React.useState();
18998
19030
  const [swiperActiveIndex, setSwiperActiveIndex] = React.useState(0);
18999
- const swiperRef = React.useRef();
19031
+ const imgsSwiperRef = React.useRef();
19000
19032
  const isFirstPlayRef = React.useRef(true);
19033
+ const loopPlayRef = React.useRef(true);
19001
19034
  const initTime = new Date();
19035
+ React.useImperativeHandle(ref, () => {
19036
+ return {
19037
+ setLoopPlay(v) {
19038
+ loopPlayRef.current = v;
19039
+ }
19040
+ };
19041
+ });
19042
+ React.useEffect(() => {
19043
+ let timerId;
19044
+ if (isLoad && isActive && isDiyH5) {
19045
+ timerId = setTimeout(() => {
19046
+ var _a, _b, _c, _d;
19047
+ if (!loopPlayRef.current)
19048
+ return;
19049
+ if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
19050
+ 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;
19051
+ (_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);
19052
+ }
19053
+ }, 3000);
19054
+ }
19055
+ return () => {
19056
+ if (timerId)
19057
+ clearTimeout(timerId);
19058
+ };
19059
+ }, [isLoad, isActive, isDiyH5, index, swiperRef, firstRtcList]);
19002
19060
  React.useEffect(() => {
19003
19061
  if (isLoad && isActive) {
19004
- (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.start();
19062
+ (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.start();
19005
19063
  if (openHashtag) {
19006
19064
  onViewImageEndEvent(rec);
19007
19065
  }
@@ -19011,7 +19069,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
19011
19069
  }
19012
19070
  }
19013
19071
  else {
19014
- (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.stop();
19072
+ (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.stop();
19015
19073
  }
19016
19074
  }, [rec, isActive, onViewImageEndEvent, openHashtag, index, onViewImageStartEvent, isLoad, imgInfo]);
19017
19075
  const showFirstImageFn = React.useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
@@ -19038,13 +19096,13 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
19038
19096
  };
19039
19097
  }, [isActive, imgInfo]);
19040
19098
  const handleMouseEnter = React.useCallback(() => {
19041
- if (swiperRef.current && swiperRef.current.swiper && isAlly) {
19042
- swiperRef.current.swiper.autoplay.stop();
19099
+ if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
19100
+ imgsSwiperRef.current.swiper.autoplay.stop();
19043
19101
  }
19044
19102
  }, []);
19045
19103
  const handleMouseLeave = React.useCallback(() => {
19046
- if (swiperRef.current && swiperRef.current.swiper && isAlly) {
19047
- swiperRef.current.swiper.autoplay.start();
19104
+ if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
19105
+ imgsSwiperRef.current.swiper.autoplay.start();
19048
19106
  }
19049
19107
  }, []);
19050
19108
  const handleSlideChange = React.useCallback((swiper) => {
@@ -19065,7 +19123,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
19065
19123
  enabled: true
19066
19124
  }
19067
19125
  }
19068
- : {}), { loop: true, ref: swiperRef, onSlideChange: handleSlideChange, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': {
19126
+ : {}), { loop: true, ref: imgsSwiperRef, onSlideChange: handleSlideChange, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': {
19069
19127
  bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
19070
19128
  fontSize: '14px'
19071
19129
  } }, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor) && {
@@ -19082,7 +19140,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
19082
19140
  return (React.createElement(SwiperSlide, { key: srcKey, "aria-hidden": srcKey !== swiperActiveIndex },
19083
19141
  React.createElement(Picture, { src: !isLoad && srcKey > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
19084
19142
  }))));
19085
- };
19143
+ });
19086
19144
  var PictureGroup$5 = React.memo(PictureGroup$4);
19087
19145
 
19088
19146
  /*
@@ -19374,7 +19432,7 @@ var NavBack$1 = React.memo(NavBack);
19374
19432
  * @Author: binruan@chatlabs.com
19375
19433
  * @Date: 2024-03-20 10:27:31
19376
19434
  * @LastEditors: binruan@chatlabs.com
19377
- * @LastEditTime: 2025-05-09 15:51:40
19435
+ * @LastEditTime: 2025-05-12 14:26:15
19378
19436
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
19379
19437
  *
19380
19438
  */
@@ -19395,6 +19453,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19395
19453
  const [pageNum, setPageNum] = React.useState(2);
19396
19454
  React.useState(false);
19397
19455
  const videoWidgetRef = React.useRef(null);
19456
+ const pictureGroupRef = React.useRef(null);
19398
19457
  const fbcRef = React.useRef('');
19399
19458
  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();
19400
19459
  const { backMainFeed, productView, jumpToWeb } = useEventReport();
@@ -19444,7 +19503,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19444
19503
  (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
19445
19504
  }, [data, ctaType, swiperRef]);
19446
19505
  const handleSessionCompleted = React.useCallback((fk) => {
19447
- 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;
19506
+ 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;
19448
19507
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
19449
19508
  let fromKName = '';
19450
19509
  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))) {
@@ -19471,22 +19530,23 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19471
19530
  eventSubject: 'sessionCompleted',
19472
19531
  eventDescription: 'Session completed',
19473
19532
  contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
19474
- productId: (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.itemId,
19533
+ 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 : '',
19534
+ productId: (_r = item === null || item === void 0 ? void 0 : item.product) === null || _r === void 0 ? void 0 : _r.itemId,
19475
19535
  position: activeIndex + '',
19476
19536
  fromKName: fk || fromKName,
19477
19537
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
19478
- 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 : '',
19479
- 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 : ''
19538
+ 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 : '',
19539
+ 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 : ''
19480
19540
  }
19481
19541
  });
19482
- 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);
19542
+ 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);
19483
19543
  if (!popupDetailData) {
19484
19544
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19485
19545
  eventName: 'ExitFeed',
19486
- 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] : [],
19546
+ 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] : [],
19487
19547
  rec: item,
19488
19548
  position: activeIndex,
19489
- 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 : '',
19549
+ 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 : '',
19490
19550
  view_time: new Date() - viewTime.current
19491
19551
  });
19492
19552
  }
@@ -19546,8 +19606,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19546
19606
  refreshFeSession
19547
19607
  ]);
19548
19608
  const handleSessionExpire = React.useCallback(lodash.debounce(() => {
19549
- var _a;
19609
+ var _a, _b;
19550
19610
  (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
19611
+ (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
19551
19612
  refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(false, handleSessionCompleted);
19552
19613
  }, 1000), [handleSessionCompleted, refreshFeSession]);
19553
19614
  React.useEffect(() => {
@@ -19618,18 +19679,18 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19618
19679
  return null;
19619
19680
  }, [globalConfig, activeIndex, visList]);
19620
19681
  const renderContent = React.useCallback((rec, index) => {
19621
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
19682
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
19622
19683
  if (rec === 'organic menu') {
19623
19684
  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)));
19624
19685
  }
19625
- if ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.url) {
19686
+ 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)) {
19626
19687
  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 })));
19627
19688
  }
19628
- if ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.imgUrls) {
19629
- 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 }));
19689
+ if ((_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.imgUrls) {
19690
+ 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 })));
19630
19691
  }
19631
- 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) {
19632
- return (_k = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _k === void 0 ? void 0 : _k.map((value, idx) => {
19692
+ 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) {
19693
+ return (_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _m === void 0 ? void 0 : _m.map((value, idx) => {
19633
19694
  var _a, _b, _c, _d, _e, _f, _g, _h;
19634
19695
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
19635
19696
  const Component = withBindDataSource(t);
@@ -19668,7 +19729,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19668
19729
  };
19669
19730
  }, [isShowMore]);
19670
19731
  const renderBottom = React.useCallback((rec, index) => {
19671
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
19732
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
19672
19733
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
19673
19734
  let cta = null;
19674
19735
  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) {
@@ -19677,24 +19738,27 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19677
19738
  else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
19678
19739
  cta = '商品CTA';
19679
19740
  }
19741
+ 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)) {
19742
+ cta = '服务CTA';
19743
+ }
19680
19744
  else {
19681
- 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;
19745
+ 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;
19682
19746
  }
19683
19747
  const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
19684
19748
  const isNineProduct = (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.nineProductEnable) &&
19685
19749
  index === ((rtcList === null || rtcList === void 0 ? void 0 : rtcList[0]) === 'organic menu' ? 1 : 0) &&
19686
- ((_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));
19750
+ ((_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));
19687
19751
  return (React.createElement(React.Fragment, null,
19688
19752
  isNineProduct && (React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, isNineProduct: isNineProduct })),
19689
- ((_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' }),
19690
- 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` } },
19753
+ ((_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' }),
19754
+ 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` } },
19691
19755
  React.createElement(Nudge, { nudge: nudge }),
19692
19756
  ((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' },
19693
19757
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, includesCtaType: [] }))) : null,
19694
19758
  React.createElement("div", { style: { display: 'flex', flexDirection: 'column' } },
19695
- 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 }),
19759
+ 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 }),
19696
19760
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex }),
19697
- 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) }))),
19761
+ 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) }))),
19698
19762
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
19699
19763
  }
19700
19764
  return null;
@@ -19736,7 +19800,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19736
19800
  return null;
19737
19801
  }, [globalConfig, waterFallData, bottomHeight]);
19738
19802
  const handleViewImageStartEnd = (item) => {
19739
- var _a, _b, _c, _d, _e, _f;
19803
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
19740
19804
  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)) {
19741
19805
  const endTime = Date.now();
19742
19806
  const duration = viewImageStartTime.current === 0 ? 0 : (endTime - viewImageStartTime.current) / 1000;
@@ -19745,10 +19809,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19745
19809
  eventSubject: 'viewImageCarouselEnd',
19746
19810
  eventDescription: 'User end view the image carousel',
19747
19811
  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 : '',
19748
- contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
19812
+ 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 : '',
19813
+ contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19749
19814
  imageEndTime: `${endTime}`,
19750
19815
  playDuration: `${duration}`,
19751
- contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
19816
+ contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19752
19817
  position: activeIndex + '',
19753
19818
  contentFormat: 'image',
19754
19819
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
@@ -19757,7 +19822,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19757
19822
  }
19758
19823
  };
19759
19824
  const handleSlideSkip = (item, position) => {
19760
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
19825
+ 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;
19761
19826
  if (isPreview || waterFallData)
19762
19827
  return;
19763
19828
  const t = new Date() - curTime.current;
@@ -19783,7 +19848,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19783
19848
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
19784
19849
  position: position + '',
19785
19850
  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 : '',
19786
- 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 : '',
19851
+ 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 : '',
19852
+ 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 : '',
19787
19853
  contentFormat
19788
19854
  }
19789
19855
  });
@@ -19793,7 +19859,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19793
19859
  }
19794
19860
  };
19795
19861
  const handleScrollEvent = (swiper) => {
19796
- 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;
19862
+ 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;
19797
19863
  const item = data[swiper.previousIndex];
19798
19864
  const activeItem = data[swiper.activeIndex];
19799
19865
  if (!item)
@@ -19826,11 +19892,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19826
19892
  eventSubject: 'scrollDown',
19827
19893
  eventDescription: 'User scroll down',
19828
19894
  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 : '',
19829
- 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 : '',
19895
+ 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 : '',
19896
+ 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 : '',
19830
19897
  requestId: null,
19831
- 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 : '',
19898
+ 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 : '',
19832
19899
  contentFormat,
19833
- position: ((_1 = swiper.previousIndex) !== null && _1 !== void 0 ? _1 : 0) + ''
19900
+ position: ((_4 = swiper.previousIndex) !== null && _4 !== void 0 ? _4 : 0) + ''
19834
19901
  }
19835
19902
  });
19836
19903
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19843,12 +19910,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19843
19910
  eventInfo: {
19844
19911
  eventSubject: 'scrollUp',
19845
19912
  eventDescription: 'User scroll up',
19846
- 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 : '',
19847
- productId: (_5 = (_4 = item.product) === null || _4 === void 0 ? void 0 : _4.itemId) !== null && _5 !== void 0 ? _5 : '',
19913
+ 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 : '',
19914
+ 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 : '',
19915
+ productId: (_11 = (_10 = item.product) === null || _10 === void 0 ? void 0 : _10.itemId) !== null && _11 !== void 0 ? _11 : '',
19848
19916
  requestId: null,
19849
- 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 : '',
19917
+ 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 : '',
19850
19918
  contentFormat,
19851
- position: ((_10 = swiper.previousIndex) !== null && _10 !== void 0 ? _10 : 0) + ''
19919
+ position: ((_16 = swiper.previousIndex) !== null && _16 !== void 0 ? _16 : 0) + ''
19852
19920
  }
19853
19921
  });
19854
19922
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19948,7 +20016,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19948
20016
  };
19949
20017
  }, [globalConfig, bffEventReport, data, activeIndex]);
19950
20018
  const handleViewImageStartEvent = (activeIndex, imgInfo, enableCapi) => {
19951
- var _a, _b, _c, _d, _e, _f, _g, _h;
20019
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
19952
20020
  const item = data[activeIndex];
19953
20021
  // 如果是图片集则上报事件
19954
20022
  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)) {
@@ -19959,9 +20027,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19959
20027
  eventSubject: 'viewImageCarouselStart',
19960
20028
  eventDescription: 'User start view the image carousel',
19961
20029
  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 : '',
19962
- contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
20030
+ 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 : '',
20031
+ contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19963
20032
  imageStartTime: `${startTime}`,
19964
- contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
20033
+ contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19965
20034
  position: activeIndex + '',
19966
20035
  contentFormat: 'image',
19967
20036
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo,
@@ -19971,13 +20040,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
19971
20040
  if (enableCapi) {
19972
20041
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19973
20042
  eventName: 'ViewContent',
19974
- product: (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.bindProducts,
20043
+ product: (_k = item === null || item === void 0 ? void 0 : item.video) === null || _k === void 0 ? void 0 : _k.bindProducts,
19975
20044
  rec: item,
19976
20045
  position: activeIndex
19977
20046
  });
19978
20047
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19979
20048
  eventName: 'PageView',
19980
- product: (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProducts,
20049
+ product: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.bindProducts,
19981
20050
  rec: item,
19982
20051
  position: activeIndex
19983
20052
  });
@@ -20075,15 +20144,20 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
20075
20144
  swiperRef.current.swiper.allowTouchMove = true;
20076
20145
  }, 500);
20077
20146
  }, onActiveIndexChange: (swiper) => {
20147
+ var _a, _b;
20078
20148
  setActiveIndex(swiper.activeIndex);
20079
20149
  if (openHashtag)
20080
20150
  return;
20081
20151
  // 处理上滑下滑事件
20082
20152
  handleScrollEvent(swiper);
20083
- if (waterFallData || isEditor || isDiyH5)
20153
+ if (waterFallData || isEditor)
20084
20154
  return;
20085
20155
  if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
20086
20156
  if (!isLoadMore) {
20157
+ if (isDiyH5) {
20158
+ (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
20159
+ (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
20160
+ }
20087
20161
  setIsLoadMore(true);
20088
20162
  loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(pageNum).then((res) => {
20089
20163
  var _a;
@@ -20156,7 +20230,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
20156
20230
  }, []);
20157
20231
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
20158
20232
  const handlePlaying = React.useCallback(() => {
20159
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
20233
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
20160
20234
  setIsPauseVideo(false);
20161
20235
  const item = data[index];
20162
20236
  if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
@@ -20169,14 +20243,15 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
20169
20243
  eventSubject: 'playVideo',
20170
20244
  eventDescription: 'User played the video',
20171
20245
  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 : '',
20172
- 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 : '',
20246
+ 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 : '',
20247
+ 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 : '',
20173
20248
  playType,
20174
20249
  startTime: videoCurrentTime,
20175
20250
  videoDuration,
20176
- 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 : []),
20251
+ 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 : []),
20177
20252
  position: index + '',
20178
20253
  contentFormat: 'video',
20179
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
20254
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
20180
20255
  }
20181
20256
  });
20182
20257
  setIsFirstPlay(false);
@@ -20215,7 +20290,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
20215
20290
  }
20216
20291
  }, [isLoadFinish]);
20217
20292
  const onPause = React.useCallback(() => {
20218
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
20293
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
20219
20294
  const item = data[index];
20220
20295
  const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
20221
20296
  const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
@@ -20226,14 +20301,15 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
20226
20301
  eventSubject: 'playOverVideo',
20227
20302
  eventDescription: 'User finished playing the video',
20228
20303
  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 : '',
20229
- 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 : '',
20304
+ 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 : '',
20305
+ 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 : '',
20230
20306
  endTime: videoCurrentTime,
20231
20307
  videoDuration,
20232
20308
  playDuration,
20233
- 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 : []),
20309
+ 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 : []),
20234
20310
  position: index + '',
20235
20311
  contentFormat: 'video',
20236
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
20312
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
20237
20313
  }
20238
20314
  });
20239
20315
  }