pb-sxp-ui 1.16.13 → 1.16.15

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 +292 -183
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +292 -183
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +6 -6
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +6 -6
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +292 -183
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +6 -6
  12. package/dist/pb-ui.min.js.map +1 -1
  13. package/es/core/components/DiyPortalPreview/VideoWidget.js +8 -10
  14. package/es/core/components/SxpPageRender/LikeButton/index.js +15 -17
  15. package/es/core/components/SxpPageRender/PictureGroup/index.d.ts +0 -5
  16. package/es/core/components/SxpPageRender/PictureGroup/index.js +13 -39
  17. package/es/core/components/SxpPageRender/VideoWidget/index.js +45 -32
  18. package/es/core/components/SxpPageRender/WaterFall/index.js +3 -4
  19. package/es/core/components/SxpPageRender/index.js +37 -53
  20. package/es/core/context/SxpDataSourceProvider.d.ts +0 -1
  21. package/es/core/context/SxpDataSourceProvider.js +147 -22
  22. package/es/core/hooks/useEventReport.js +5 -6
  23. package/lib/core/components/DiyPortalPreview/VideoWidget.js +8 -10
  24. package/lib/core/components/SxpPageRender/LikeButton/index.js +15 -17
  25. package/lib/core/components/SxpPageRender/PictureGroup/index.d.ts +0 -5
  26. package/lib/core/components/SxpPageRender/PictureGroup/index.js +12 -38
  27. package/lib/core/components/SxpPageRender/VideoWidget/index.js +45 -32
  28. package/lib/core/components/SxpPageRender/WaterFall/index.js +3 -4
  29. package/lib/core/components/SxpPageRender/index.js +37 -53
  30. package/lib/core/context/SxpDataSourceProvider.d.ts +0 -1
  31. package/lib/core/context/SxpDataSourceProvider.js +147 -22
  32. package/lib/core/hooks/useEventReport.js +5 -6
  33. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -622,7 +622,6 @@ const DEFAULT_TAG = 'FOR U';
622
622
  const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isOpenConsent = false, isEditor = false, utmParameter, channelQueryList, data, dataList, isDiyH5, onUpdateSchema, onUpdateChannel }) => {
623
623
  var _a, _b, _c, _d, _e;
624
624
  const [rtcList, setRtcList] = useState([]);
625
- const [firstRtcList, setFirstRtcList] = useState([]);
626
625
  const [tagList, setTagList] = useState([]);
627
626
  const [loading, setLoading] = useState(true);
628
627
  const [curReqInfo, setCurReqInfo] = useState({ rtc: '', requestId: '' });
@@ -715,7 +714,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
715
714
  return ((_a = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _a === void 0 ? void 0 : _a['x-app-id']) + storeAndLoadFeUserId();
716
715
  }, [bffDataSource]);
717
716
  // bff API 请求方法
718
- const bffFetch = useCallback((path, options) => {
717
+ const bffFetch = useCallback((path, options, isBota = true) => {
719
718
  var _a;
720
719
  if (!bffDataSource)
721
720
  return;
@@ -730,7 +729,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
730
729
  val.split('=')[1];
731
730
  });
732
731
  return window
733
- .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'
732
+ .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
734
733
  ? JSON.stringify({
735
734
  body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
736
735
  })
@@ -738,6 +737,166 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
738
737
  .then((res) => res.json())
739
738
  .catch((err) => Promise.reject(err));
740
739
  }, [bffDataSource, fakeUserId]);
740
+ const bffCollectEvent = useCallback((params) => {
741
+ var _a;
742
+ const body = {
743
+ eventName: params === null || params === void 0 ? void 0 : params.eventName,
744
+ eventSource: params === null || params === void 0 ? void 0 : params.eventSource
745
+ // eventInfo: params?.eventInfo ? JSON.stringify(params?.eventInfo) : ''
746
+ };
747
+ return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v1/data/collect/${(_a = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _a === void 0 ? void 0 : _a['x-app-id']}/${params === null || params === void 0 ? void 0 : params.eventName}`, {
748
+ method: 'POST',
749
+ body,
750
+ type: 'beacon'
751
+ }, false);
752
+ }, [bffFetch, bffDataSource]);
753
+ useEffect(() => {
754
+ if (typeof (window === null || window === void 0 ? void 0 : window.fbq) === 'function') {
755
+ const OriginalImage = window.Image;
756
+ window.Image = function () {
757
+ const img = new OriginalImage();
758
+ // 劫持 src 的 setter
759
+ const originalSrcDescriptor = Object.getOwnPropertyDescriptor(HTMLImageElement.prototype, 'src');
760
+ Object.defineProperty(img, 'src', {
761
+ set(value) {
762
+ // 继续正常设置 src
763
+ originalSrcDescriptor.set.call(this, value);
764
+ img.onload = function () {
765
+ // 检查是否是目标 URL
766
+ if (value.includes('https://www.facebook.com/privacy_sandbox/pixel/register/trigger/')) {
767
+ // 解析 URL 参数
768
+ const url = new URL(value);
769
+ const params = Object.fromEntries(url.searchParams.entries());
770
+ bffCollectEvent({
771
+ eventName: params === null || params === void 0 ? void 0 : params.ev,
772
+ eventSource: 'Meta Pixel'
773
+ });
774
+ }
775
+ };
776
+ },
777
+ get() {
778
+ return originalSrcDescriptor.get.call(this);
779
+ }
780
+ });
781
+ return img;
782
+ };
783
+ }
784
+ }, [bffCollectEvent]);
785
+ useEffect(() => {
786
+ // 类型安全声明
787
+ const navigatorWithBeacon = navigator;
788
+ if (!navigatorWithBeacon.sendBeacon) {
789
+ console.warn('navigator.sendBeacon is not supported');
790
+ return;
791
+ }
792
+ // 保存原始方法
793
+ const originalSendBeacon = navigatorWithBeacon.sendBeacon.bind(navigatorWithBeacon);
794
+ // 覆盖方法
795
+ navigatorWithBeacon.sendBeacon = function (url, data) {
796
+ const urlString = url instanceof URL ? url.href : url.toString();
797
+ const success = originalSendBeacon(url, data);
798
+ function parseBeaconData(data) {
799
+ return __awaiter(this, void 0, void 0, function* () {
800
+ if (typeof data === 'string')
801
+ return JSON.parse(data);
802
+ if (data instanceof Blob)
803
+ return JSON.parse(yield data.text());
804
+ if (data instanceof ArrayBuffer)
805
+ return JSON.parse(new TextDecoder().decode(data));
806
+ return null;
807
+ });
808
+ }
809
+ if (success) {
810
+ // 异步处理监控逻辑(不阻塞原始行为)
811
+ Promise.resolve().then(() => __awaiter(this, void 0, void 0, function* () {
812
+ var _a, _b;
813
+ try {
814
+ const parsedData = yield parseBeaconData(data);
815
+ if (success) {
816
+ // 使用你的自定义上报方法
817
+ if (urlString.includes('https://tr.snapchat.com/p')) {
818
+ (_b = (_a = parsedData === null || parsedData === void 0 ? void 0 : parsedData.req) === null || _a === void 0 ? void 0 : _a.forEach) === null || _b === void 0 ? void 0 : _b.call(_a, (item) => {
819
+ var _a, _b;
820
+ if ((_a = item === null || item === void 0 ? void 0 : item.t) === null || _a === void 0 ? void 0 : _a.ev) {
821
+ bffCollectEvent({
822
+ eventName: (_b = item === null || item === void 0 ? void 0 : item.t) === null || _b === void 0 ? void 0 : _b.ev,
823
+ eventSource: 'Snapchat Pixel'
824
+ });
825
+ }
826
+ });
827
+ }
828
+ else if (urlString.includes('https://analytics.tiktok.com/api/v2/pixel') && (parsedData === null || parsedData === void 0 ? void 0 : parsedData.event)) {
829
+ bffCollectEvent({
830
+ eventName: parsedData.event,
831
+ eventSource: 'TikTok Pixel'
832
+ });
833
+ }
834
+ }
835
+ }
836
+ catch (error) {
837
+ console.error('监控失败:', error);
838
+ }
839
+ }));
840
+ }
841
+ // 非TikTok请求直接放行
842
+ return success;
843
+ };
844
+ // 清理函数:恢复原始方法
845
+ return () => {
846
+ navigatorWithBeacon.sendBeacon = originalSendBeacon;
847
+ };
848
+ }, [bffCollectEvent]);
849
+ useEffect(() => {
850
+ const _originalFetch = window.fetch;
851
+ // 覆盖 fetch 方法
852
+ window.fetch = function (input, init) {
853
+ var arguments_1 = arguments;
854
+ return __awaiter(this, void 0, void 0, function* () {
855
+ // 安全获取 URL 字符串
856
+ let url;
857
+ try {
858
+ url = typeof input === 'string'
859
+ ? input
860
+ : input instanceof URL
861
+ ? input.href
862
+ : input.url;
863
+ }
864
+ catch (error) {
865
+ console.error('解析请求URL失败:', error);
866
+ return _originalFetch.apply(this, arguments_1);
867
+ }
868
+ // 非GA4请求直接放行
869
+ if (!url.includes('https://www.google-analytics.com/g/collect')) {
870
+ return _originalFetch.apply(this, arguments_1);
871
+ }
872
+ // 检查是否是 GA4 收集端点
873
+ try {
874
+ // 1. 先执行原始请求
875
+ const response = yield _originalFetch.apply(this, arguments_1);
876
+ // 2. 检查请求是否成功 (HTTP 200-299)
877
+ // 安全解析 URL
878
+ const urlObj = new URL(url);
879
+ const params = Object.fromEntries(urlObj.searchParams.entries());
880
+ if (params === null || params === void 0 ? void 0 : params.en) {
881
+ bffCollectEvent({
882
+ eventName: params === null || params === void 0 ? void 0 : params.en,
883
+ eventSource: 'Google Analytics'
884
+ });
885
+ }
886
+ return response;
887
+ }
888
+ catch (error) {
889
+ console.error('处理 GA4 请求时出错:', error);
890
+ throw error;
891
+ }
892
+ });
893
+ };
894
+ }, [bffCollectEvent]);
895
+ useEffect(() => {
896
+ if (typeof (window === null || window === void 0 ? void 0 : window.fbq) === 'function') {
897
+ window === null || window === void 0 ? void 0 : window.fbq('track', 'PageView');
898
+ }
899
+ }, []);
741
900
  // bff API admin 请求方法
742
901
  const bffFetchAdmin = useCallback((path, options) => {
743
902
  if (!bffDataSource)
@@ -793,9 +952,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
793
952
  if ((rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) === 0) {
794
953
  setRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
795
954
  setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
796
- if (isDiyH5) {
797
- setFirstRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
798
- }
799
955
  }
800
956
  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));
801
957
  if (isNotNullList) {
@@ -835,17 +991,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
835
991
  if (rtcList.length <= 0) {
836
992
  return;
837
993
  }
838
- if (isDiyH5 && (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) > 0) {
839
- setRtcList(rtcList.concat(firstRtcList));
840
- setCacheRtcList(cacheRtcList.concat(firstRtcList));
841
- return;
842
- }
843
994
  const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
844
995
  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 })));
845
996
  setRtcList(rtcList.concat(getFilterRecList(data)));
846
997
  setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
847
998
  return data;
848
- }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList, isDiyH5, firstRtcList]);
999
+ }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
849
1000
  const refreshFeSession = useCallback((enableReSid, event) => {
850
1001
  var _a, _b, _c, _d, _e;
851
1002
  let expire = false;
@@ -1072,7 +1223,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1072
1223
  }
1073
1224
  }), [bffFetch, utmVal]);
1074
1225
  const ctaEvent = useCallback((eventInfo, rec, product, position) => {
1075
- 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;
1226
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
1076
1227
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
1077
1228
  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);
1078
1229
  let fromKName = '';
@@ -1090,7 +1241,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1090
1241
  }
1091
1242
  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;
1092
1243
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1093
- 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 })
1244
+ eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_r = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _r !== void 0 ? _r : '', ctaName: (_s = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _s !== void 0 ? _s : '', contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_u = (_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_10 = (_7 = (_2 = (_y = (_v = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _v !== void 0 ? _v : (_x = (_w = rec === null || rec === void 0 ? void 0 : rec.video) === null || _w === void 0 ? void 0 : _w.bindCta) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_1 = (_0 = (_z = rec === null || rec === void 0 ? void 0 : rec.video) === null || _z === void 0 ? void 0 : _z.bindProduct) === null || _0 === void 0 ? void 0 : _0.bindCta) === null || _1 === void 0 ? void 0 : _1.traceInfo) !== null && _2 !== void 0 ? _2 : (_6 = (_5 = (_4 = (_3 = rec === null || rec === void 0 ? void 0 : rec.video) === null || _3 === void 0 ? void 0 : _3.bindProducts) === null || _4 === void 0 ? void 0 : _4[0]) === null || _5 === void 0 ? void 0 : _5.bindCta) === null || _6 === void 0 ? void 0 : _6.traceInfo) !== null && _7 !== void 0 ? _7 : (_9 = (_8 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _8 === void 0 ? void 0 : _8.bindCta) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : '', fromKName, fromKPage: (_11 = location === null || location === void 0 ? void 0 : location.href) !== null && _11 !== void 0 ? _11 : '', contentFormat })
1094
1245
  });
1095
1246
  }, [bffEventReport, isFromHashtag]);
1096
1247
  const h5EnterLink = useCallback(() => {
@@ -1192,9 +1343,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1192
1343
  }
1193
1344
  setRtcList(list);
1194
1345
  setCacheRtcList(list);
1195
- if (isDiyH5) {
1196
- setFirstRtcList(list);
1197
- }
1198
1346
  bffGetTagList(curData !== null && curData !== void 0 ? curData : finalPageData);
1199
1347
  if (channel) {
1200
1348
  const item = list === null || list === void 0 ? void 0 : list[0];
@@ -1230,9 +1378,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1230
1378
  }
1231
1379
  setRtcList(list);
1232
1380
  setCacheRtcList(list);
1233
- if (isDiyH5) {
1234
- setFirstRtcList(list);
1235
- }
1236
1381
  }
1237
1382
  })
1238
1383
  .finally(() => {
@@ -1296,8 +1441,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1296
1441
  refreshFeSession,
1297
1442
  getAccount,
1298
1443
  accountSonsent,
1299
- isDiyH5,
1300
- firstRtcList
1444
+ isDiyH5
1301
1445
  } }, 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({
1302
1446
  rtcList,
1303
1447
  mutateLike: bffMutateLike,
@@ -1758,14 +1902,14 @@ var settingRender$f = [
1758
1902
  * @Author: binruan@chatlabs.com
1759
1903
  * @Date: 2024-03-12 10:59:06
1760
1904
  * @LastEditors: binruan@chatlabs.com
1761
- * @LastEditTime: 2025-05-09 15:30:59
1905
+ * @LastEditTime: 2024-11-28 11:17:16
1762
1906
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1763
1907
  *
1764
1908
  */
1765
1909
  function useEventReport() {
1766
1910
  const { bffEventReport, popupDetailData, isFromHashtag, eventTimeList, setEventTimeList } = useSxpDataSource();
1767
1911
  const jumpToWeb = useCallback((e, data, product, cta, position, traceInfo) => {
1768
- 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;
1912
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13;
1769
1913
  const i = eventTimeList === null || eventTimeList === void 0 ? void 0 : eventTimeList.findIndex((item) => item.target === (e === null || e === void 0 ? void 0 : e.target));
1770
1914
  if (i !== -1) {
1771
1915
  return;
@@ -1798,11 +1942,11 @@ function useEventReport() {
1798
1942
  contentFormat = 'image';
1799
1943
  }
1800
1944
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1801
- 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 }))
1945
+ eventInfo: Object.assign({ eventSubject: 'jumpToWeb', eventDescription: 'User jumped to website', productId: (_v = product === null || product === void 0 ? void 0 : product.itemId) !== null && _v !== void 0 ? _v : '', productName: (_w = product === null || product === void 0 ? void 0 : product.title) !== null && _w !== void 0 ? _w : '', price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0', productCollection: (_x = product === null || product === void 0 ? void 0 : product.collection) !== null && _x !== void 0 ? _x : '', fromKName, fromKPage: location === null || location === void 0 ? void 0 : location.href, contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.itemId) !== null && _z !== void 0 ? _z : '', ctatId: (_0 = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _0 !== void 0 ? _0 : '', traceInfo: (_13 = (_10 = (_8 = (_4 = (_1 = traceInfo !== null && traceInfo !== void 0 ? traceInfo : product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _1 !== void 0 ? _1 : (_3 = (_2 = data === null || data === void 0 ? void 0 : data.video) === null || _2 === void 0 ? void 0 : _2.bindProduct) === null || _3 === void 0 ? void 0 : _3.traceInfo) !== null && _4 !== void 0 ? _4 : (_7 = (_6 = (_5 = data === null || data === void 0 ? void 0 : data.video) === null || _5 === void 0 ? void 0 : _5.bindProducts) === null || _6 === void 0 ? void 0 : _6[0]) === null || _7 === void 0 ? void 0 : _7.traceInfo) !== null && _8 !== void 0 ? _8 : (_9 = data === null || data === void 0 ? void 0 : data.product) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : (_12 = (_11 = data === null || data === void 0 ? void 0 : data.video) === null || _11 === void 0 ? void 0 : _11.bindCta) === null || _12 === void 0 ? void 0 : _12.traceInfo) !== null && _13 !== void 0 ? _13 : '' }, (contentFormat && { contentFormat }))
1802
1946
  });
1803
1947
  }, [bffEventReport, popupDetailData, isFromHashtag, eventTimeList]);
1804
1948
  const productView = useCallback((data, product, cta, viewTime, position) => {
1805
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
1949
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
1806
1950
  let fromKName = '';
1807
1951
  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))) {
1808
1952
  fromKName = 'pdpPage';
@@ -1821,9 +1965,8 @@ function useEventReport() {
1821
1965
  contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
1822
1966
  position: position + '',
1823
1967
  contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
1824
- 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 : '',
1825
1968
  ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
1826
- 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 : '',
1969
+ traceInfo: (_p = (_m = (_h = (_e = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _e !== void 0 ? _e : (_g = (_f = data === null || data === void 0 ? void 0 : data.video) === null || _f === void 0 ? void 0 : _f.bindProduct) === null || _g === void 0 ? void 0 : _g.traceInfo) !== null && _h !== void 0 ? _h : (_l = (_k = (_j = data === null || data === void 0 ? void 0 : data.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.traceInfo) !== null && _m !== void 0 ? _m : (_o = data === null || data === void 0 ? void 0 : data.product) === null || _o === void 0 ? void 0 : _o.traceInfo) !== null && _p !== void 0 ? _p : '',
1827
1970
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
1828
1971
  eventSubject: 'productView',
1829
1972
  eventDescription: 'User browsed the product'
@@ -15638,7 +15781,7 @@ function WaterfallList(_a) {
15638
15781
  * @Author: binruan@chatlabs.com
15639
15782
  * @Date: 2024-01-10 10:58:24
15640
15783
  * @LastEditors: binruan@chatlabs.com
15641
- * @LastEditTime: 2025-05-09 15:30:41
15784
+ * @LastEditTime: 2025-02-28 10:00:31
15642
15785
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
15643
15786
  *
15644
15787
  */
@@ -15676,7 +15819,7 @@ const WaterFall = (props) => {
15676
15819
  }
15677
15820
  }, [waterFallData]);
15678
15821
  const reportTagsView = useCallback(() => {
15679
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
15822
+ var _a, _b, _c, _d, _e, _f;
15680
15823
  const rec = recData === null || recData === void 0 ? void 0 : recData.rec;
15681
15824
  if (!rec)
15682
15825
  return;
@@ -15696,10 +15839,9 @@ const WaterFall = (props) => {
15696
15839
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
15697
15840
  eventInfo: {
15698
15841
  contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
15699
- 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 : '',
15700
15842
  position: cacheActiveIndex + '',
15701
- contentTags: JSON.stringify((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.tags),
15702
- traceInfo: (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.traceInfo,
15843
+ contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
15844
+ traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
15703
15845
  hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
15704
15846
  fromKName,
15705
15847
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
@@ -17781,7 +17923,7 @@ const LikeButton = (_a) => {
17781
17923
  const likeIcon = useIconLink(defaultLikeIconPath$2);
17782
17924
  const unlikeIcon = useIconLink(defaultUnLikeIconPath$2);
17783
17925
  const handleClick = debounce(() => __awaiter(void 0, void 0, void 0, function* () {
17784
- 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;
17926
+ var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
17785
17927
  if (state) {
17786
17928
  // 先设置状态
17787
17929
  setState(false);
@@ -17791,12 +17933,11 @@ const LikeButton = (_a) => {
17791
17933
  eventSubject: 'favoriteContentCanceled',
17792
17934
  eventDescription: 'This content was unfavorite by the user',
17793
17935
  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 : '',
17794
- 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 : '',
17795
- 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 : '',
17796
- 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 : []),
17936
+ contentName: (_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.title) !== null && _j !== void 0 ? _j : '',
17937
+ contentTags: JSON.stringify((_l = (_k = recData === null || recData === void 0 ? void 0 : recData.video) === null || _k === void 0 ? void 0 : _k.tags) !== null && _l !== void 0 ? _l : []),
17797
17938
  position: position + '',
17798
- contentFormat: ((_q = recData === null || recData === void 0 ? void 0 : recData.video) === null || _q === void 0 ? void 0 : _q.url) ? 'video' : 'image',
17799
- traceInfo: (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.traceInfo
17939
+ contentFormat: ((_m = recData === null || recData === void 0 ? void 0 : recData.video) === null || _m === void 0 ? void 0 : _m.url) ? 'video' : 'image',
17940
+ traceInfo: (_o = recData === null || recData === void 0 ? void 0 : recData.video) === null || _o === void 0 ? void 0 : _o.traceInfo
17800
17941
  }
17801
17942
  });
17802
17943
  // 如果接口调用失败,则回滚状态
@@ -17804,41 +17945,40 @@ const LikeButton = (_a) => {
17804
17945
  setState(true);
17805
17946
  }
17806
17947
  else {
17807
- const nRtcList = (_s = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
17948
+ const nRtcList = (_p = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
17808
17949
  if (index === position) {
17809
17950
  item.isCollected = false;
17810
17951
  }
17811
17952
  return item;
17812
- })) !== null && _s !== void 0 ? _s : [];
17953
+ })) !== null && _p !== void 0 ? _p : [];
17813
17954
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
17814
17955
  }
17815
17956
  }
17816
17957
  else {
17817
17958
  setState(true);
17818
- const result = (_t = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _t !== void 0 ? _t : false;
17959
+ const result = (_q = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _q !== void 0 ? _q : false;
17819
17960
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
17820
17961
  eventInfo: {
17821
17962
  eventSubject: 'favoriteContent',
17822
17963
  eventDescription: 'This content was favorite by the user',
17823
- contentId: (_v = (_u = recData === null || recData === void 0 ? void 0 : recData.video) === null || _u === void 0 ? void 0 : _u.itemId) !== null && _v !== void 0 ? _v : '',
17824
- sceneId: (_y = (_x = (_w = recData === null || recData === void 0 ? void 0 : recData.video) === null || _w === void 0 ? void 0 : _w.scene) === null || _x === void 0 ? void 0 : _x.sceneId) !== null && _y !== void 0 ? _y : '',
17825
- contentName: (_0 = (_z = recData === null || recData === void 0 ? void 0 : recData.video) === null || _z === void 0 ? void 0 : _z.title) !== null && _0 !== void 0 ? _0 : '',
17826
- contentTags: JSON.stringify((_2 = (_1 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _1 === void 0 ? void 0 : _1.tags) !== null && _2 !== void 0 ? _2 : []),
17964
+ contentId: (_s = (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.itemId) !== null && _s !== void 0 ? _s : '',
17965
+ contentName: (_u = (_t = recData === null || recData === void 0 ? void 0 : recData.video) === null || _t === void 0 ? void 0 : _t.title) !== null && _u !== void 0 ? _u : '',
17966
+ contentTags: JSON.stringify((_w = (_v = recData === null || recData === void 0 ? void 0 : recData.video) === null || _v === void 0 ? void 0 : _v.tags) !== null && _w !== void 0 ? _w : []),
17827
17967
  position: position + '',
17828
- contentFormat: ((_3 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _3 === void 0 ? void 0 : _3.url) ? 'video' : 'image',
17829
- traceInfo: (_4 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _4 === void 0 ? void 0 : _4.traceInfo
17968
+ contentFormat: ((_x = recData === null || recData === void 0 ? void 0 : recData.video) === null || _x === void 0 ? void 0 : _x.url) ? 'video' : 'image',
17969
+ traceInfo: (_y = recData === null || recData === void 0 ? void 0 : recData.video) === null || _y === void 0 ? void 0 : _y.traceInfo
17830
17970
  }
17831
17971
  });
17832
17972
  if (!result) {
17833
17973
  setState(false);
17834
17974
  }
17835
17975
  else {
17836
- const nRtcList = (_5 = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
17976
+ const nRtcList = (_z = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
17837
17977
  if (index === position) {
17838
17978
  item.isCollected = true;
17839
17979
  }
17840
17980
  return item;
17841
- })) !== null && _5 !== void 0 ? _5 : [];
17981
+ })) !== null && _z !== void 0 ? _z : [];
17842
17982
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
17843
17983
  }
17844
17984
  }
@@ -17875,7 +18015,7 @@ const mountVideoPlayerAtNode = (() => {
17875
18015
  const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex, videoPostConfig, videoPlayIcon, loopPlay, swiperRef }, ref) => {
17876
18016
  var _a, _b;
17877
18017
  const [isPauseVideo, setIsPauseVideo] = useState(false);
17878
- const { bffEventReport, sxpParameter, firstRtcList, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
18018
+ const { bffEventReport, sxpParameter, waterFallData, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
17879
18019
  const videoStartTime = useRef(0);
17880
18020
  const [isLoadFinish, setIsLoadFinish] = useState(false);
17881
18021
  const { isActive } = useSwiperSlide();
@@ -17941,23 +18081,6 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
17941
18081
  return;
17942
18082
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
17943
18083
  }, [videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
17944
- const handleEnd = () => {
17945
- var _a, _b, _c, _d, _e, _f;
17946
- if (!videoRef.current)
17947
- return;
17948
- if (isDiyH5) {
17949
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.pause();
17950
- if (!loopPlayRef.current)
17951
- return;
17952
- if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
17953
- 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;
17954
- (_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);
17955
- }
17956
- }
17957
- else {
17958
- (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.play();
17959
- }
17960
- };
17961
18084
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
17962
18085
  const handlePlaying = useCallback(() => {
17963
18086
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
@@ -17966,7 +18089,7 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
17966
18089
  setIsLoadFinish(true);
17967
18090
  }, []);
17968
18091
  const handleStartPlay = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
17969
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
18092
+ var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
17970
18093
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
17971
18094
  return;
17972
18095
  setIsPauseVideo(false);
@@ -17977,11 +18100,16 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
17977
18100
  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);
17978
18101
  const playType = (isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) ? '0' : '1';
17979
18102
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
17980
- 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) + '' }))
18103
+ eventInfo: Object.assign({ eventSubject: 'playVideo', eventDescription: 'User played the video', contentId: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.itemId) !== null && _k !== void 0 ? _k : '', contentName: (_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.title) !== null && _m !== void 0 ? _m : '', playType, startTime: videoCurrentTime, videoDuration, contentTags: JSON.stringify((_p = (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : []), position: index + '', contentFormat: 'video', traceInfo: (_q = item === null || item === void 0 ? void 0 : item.video) === null || _q === void 0 ? void 0 : _q.traceInfo }, ((isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) && { loadTime: (loadedTimeRef === null || loadedTimeRef === void 0 ? void 0 : loadedTimeRef.current) - (initTimeRef === null || initTimeRef === void 0 ? void 0 : initTimeRef.current) + '' }))
17981
18104
  });
17982
18105
  isFirstPlayRef.current = false;
17983
18106
  }
17984
18107
  }), [bffEventReport, data, index, isFirstPlayRef, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18108
+ const setCurrentTimeByStartTime = useCallback(() => {
18109
+ if (isDiyH5) {
18110
+ videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
18111
+ }
18112
+ }, []);
17985
18113
  const handLoadeddata = useCallback(() => {
17986
18114
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || firstFrameSrc || !blur)
17987
18115
  return;
@@ -18006,12 +18134,13 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18006
18134
  const handleLoadedmetadata = useCallback(() => {
18007
18135
  if (!videoRef.current)
18008
18136
  return;
18137
+ setCurrentTimeByStartTime();
18009
18138
  loadedTimeRef.current = new Date();
18010
18139
  handleStartPlay();
18011
18140
  handLoadeddata();
18012
18141
  }, [videoRef.current, handLoadeddata, handleStartPlay]);
18013
18142
  const handleClickVideo = useCallback((type) => () => {
18014
- var _a, _b, _c, _d, _e;
18143
+ var _a, _b, _c, _d, _e, _f;
18015
18144
  if (!videoRef.current)
18016
18145
  return;
18017
18146
  if (!isLoadFinish)
@@ -18032,17 +18161,20 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18032
18161
  break;
18033
18162
  default:
18034
18163
  if (isPause) {
18035
- (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
18164
+ if (isDiyH5 && Math.round((_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.currentTime) >= (scene === null || scene === void 0 ? void 0 : scene.endTime)) {
18165
+ videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
18166
+ }
18167
+ (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
18036
18168
  }
18037
18169
  else {
18038
- (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.pause();
18170
+ (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
18039
18171
  }
18040
18172
  setIsPauseVideo(!isPause);
18041
18173
  break;
18042
18174
  }
18043
18175
  }, [isLoadFinish, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18044
18176
  const handlePause = useCallback(() => {
18045
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
18177
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
18046
18178
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
18047
18179
  return;
18048
18180
  if (activeIndex !== index)
@@ -18058,15 +18190,14 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18058
18190
  eventSubject: 'playOverVideo',
18059
18191
  eventDescription: 'User finished playing the video',
18060
18192
  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 : '',
18061
- 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 : '',
18062
- 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 : '',
18193
+ contentName: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
18063
18194
  endTime: videoCurrentTime,
18064
18195
  videoDuration,
18065
18196
  playDuration,
18066
- 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 : []),
18197
+ contentTags: JSON.stringify((_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
18067
18198
  position: index + '',
18068
18199
  contentFormat: 'video',
18069
- traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
18200
+ traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
18070
18201
  }
18071
18202
  });
18072
18203
  }
@@ -18074,8 +18205,27 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18074
18205
  const handleWaiting = useCallback(() => {
18075
18206
  setWaiting(true);
18076
18207
  }, []);
18208
+ const handleTimeUpload = () => {
18209
+ if (!videoRef.current || !isDiyH5)
18210
+ return;
18211
+ setTimeout(() => {
18212
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
18213
+ if (Math.round((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.currentTime) >= ((_b = scene === null || scene === void 0 ? void 0 : scene.endTime) !== null && _b !== void 0 ? _b : 0)) {
18214
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
18215
+ if (!loopPlayRef.current)
18216
+ return;
18217
+ if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
18218
+ (_e = (_d = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _d === void 0 ? void 0 : _d.swiper) === null || _e === void 0 ? void 0 : _e.slideTo(0);
18219
+ }
18220
+ else {
18221
+ const i = (_g = (_f = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _f === void 0 ? void 0 : _f.swiper) === null || _g === void 0 ? void 0 : _g.activeIndex;
18222
+ (_j = (_h = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _h === void 0 ? void 0 : _h.swiper) === null || _j === void 0 ? void 0 : _j.slideTo(i + 1);
18223
+ }
18224
+ }
18225
+ });
18226
+ };
18077
18227
  useEffect(() => {
18078
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18228
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18079
18229
  if (!isActive)
18080
18230
  return;
18081
18231
  const videoSrc = videoUrl;
@@ -18096,6 +18246,7 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18096
18246
  hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
18097
18247
  hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
18098
18248
  var _a;
18249
+ setCurrentTimeByStartTime();
18099
18250
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
18100
18251
  });
18101
18252
  }
@@ -18109,11 +18260,12 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18109
18260
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('play', handleStartPlay);
18110
18261
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
18111
18262
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.addEventListener('pause', handlePause);
18112
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handleEnd);
18263
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handlePlay);
18113
18264
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
18114
18265
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
18266
+ (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.addEventListener('timeupdate', handleTimeUpload);
18115
18267
  return () => {
18116
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18268
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18117
18269
  const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
18118
18270
  if (!isPause)
18119
18271
  handlePause();
@@ -18125,9 +18277,10 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18125
18277
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('play', handleStartPlay);
18126
18278
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('playing', handlePlaying);
18127
18279
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('pause', handlePause);
18128
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handleEnd);
18280
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handlePlay);
18129
18281
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('canplay', handlePlay);
18130
18282
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.removeEventListener('waiting', handleWaiting);
18283
+ (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.removeEventListener('timeupdate', handleTimeUpload);
18131
18284
  };
18132
18285
  }, [isActive]);
18133
18286
  useEffect(() => {
@@ -18338,45 +18491,19 @@ const Picture = (props) => {
18338
18491
  }, onLoad: onShowFirstImage }))));
18339
18492
  };
18340
18493
 
18341
- const PictureGroup$4 = forwardRef(({ imgUrls, data, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig, swiperRef }, ref) => {
18494
+ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig }) => {
18342
18495
  var _a, _b;
18343
18496
  const { isActive } = useSwiperSlide();
18344
- const { firstRtcList, openHashtag, isDiyH5 } = useSxpDataSource();
18497
+ const { sxpParameter, openHashtag } = useSxpDataSource();
18345
18498
  const [isLoad, setIsLoad] = useState(false);
18346
18499
  const [imgInfo, setImgInfo] = useState();
18347
18500
  const [swiperActiveIndex, setSwiperActiveIndex] = useState(0);
18348
- const imgsSwiperRef = useRef();
18501
+ const swiperRef = useRef();
18349
18502
  const isFirstPlayRef = useRef(true);
18350
- const loopPlayRef = useRef(true);
18351
18503
  const initTime = new Date();
18352
- useImperativeHandle(ref, () => {
18353
- return {
18354
- setLoopPlay(v) {
18355
- loopPlayRef.current = v;
18356
- }
18357
- };
18358
- });
18359
- useEffect(() => {
18360
- let timerId;
18361
- if (isLoad && isActive && isDiyH5) {
18362
- timerId = setTimeout(() => {
18363
- var _a, _b, _c, _d;
18364
- if (!loopPlayRef.current)
18365
- return;
18366
- if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
18367
- 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;
18368
- (_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);
18369
- }
18370
- }, 3000);
18371
- }
18372
- return () => {
18373
- if (timerId)
18374
- clearTimeout(timerId);
18375
- };
18376
- }, [isLoad, isActive, isDiyH5, index, swiperRef, firstRtcList]);
18377
18504
  useEffect(() => {
18378
18505
  if (isLoad && isActive) {
18379
- (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.start();
18506
+ (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.start();
18380
18507
  if (openHashtag) {
18381
18508
  onViewImageEndEvent(rec);
18382
18509
  }
@@ -18386,7 +18513,7 @@ const PictureGroup$4 = forwardRef(({ imgUrls, data, height, rec, index, onViewIm
18386
18513
  }
18387
18514
  }
18388
18515
  else {
18389
- (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.stop();
18516
+ (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.stop();
18390
18517
  }
18391
18518
  }, [rec, isActive, onViewImageEndEvent, openHashtag, index, onViewImageStartEvent, isLoad, imgInfo]);
18392
18519
  const showFirstImageFn = useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
@@ -18413,13 +18540,13 @@ const PictureGroup$4 = forwardRef(({ imgUrls, data, height, rec, index, onViewIm
18413
18540
  };
18414
18541
  }, [isActive, imgInfo]);
18415
18542
  const handleMouseEnter = useCallback(() => {
18416
- if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
18417
- imgsSwiperRef.current.swiper.autoplay.stop();
18543
+ if (swiperRef.current && swiperRef.current.swiper && isAlly) {
18544
+ swiperRef.current.swiper.autoplay.stop();
18418
18545
  }
18419
18546
  }, []);
18420
18547
  const handleMouseLeave = useCallback(() => {
18421
- if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
18422
- imgsSwiperRef.current.swiper.autoplay.start();
18548
+ if (swiperRef.current && swiperRef.current.swiper && isAlly) {
18549
+ swiperRef.current.swiper.autoplay.start();
18423
18550
  }
18424
18551
  }, []);
18425
18552
  const handleSlideChange = useCallback((swiper) => {
@@ -18440,7 +18567,7 @@ const PictureGroup$4 = forwardRef(({ imgUrls, data, height, rec, index, onViewIm
18440
18567
  enabled: true
18441
18568
  }
18442
18569
  }
18443
- : {}), { loop: true, ref: imgsSwiperRef, onSlideChange: handleSlideChange, className: css(Object.assign(Object.assign({ '.swiper-pagination': {
18570
+ : {}), { loop: true, ref: swiperRef, onSlideChange: handleSlideChange, className: css(Object.assign(Object.assign({ '.swiper-pagination': {
18444
18571
  bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
18445
18572
  fontSize: '14px'
18446
18573
  } }, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor) && {
@@ -18457,7 +18584,7 @@ const PictureGroup$4 = forwardRef(({ imgUrls, data, height, rec, index, onViewIm
18457
18584
  return (React.createElement(SwiperSlide, { key: srcKey, "aria-hidden": srcKey !== swiperActiveIndex },
18458
18585
  React.createElement(Picture, { src: !isLoad && srcKey > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
18459
18586
  }))));
18460
- });
18587
+ };
18461
18588
  var PictureGroup$5 = memo(PictureGroup$4);
18462
18589
 
18463
18590
  /*
@@ -18737,7 +18864,7 @@ var NavBack$1 = memo(NavBack);
18737
18864
  * @Author: binruan@chatlabs.com
18738
18865
  * @Date: 2024-03-20 10:27:31
18739
18866
  * @LastEditors: binruan@chatlabs.com
18740
- * @LastEditTime: 2025-05-12 14:26:15
18867
+ * @LastEditTime: 2025-05-09 15:51:40
18741
18868
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
18742
18869
  *
18743
18870
  */
@@ -18757,7 +18884,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18757
18884
  const skipLinkRef = useRef(false);
18758
18885
  const [pageNum, setPageNum] = useState(2);
18759
18886
  const videoWidgetRef = useRef(null);
18760
- const pictureGroupRef = useRef(null);
18761
18887
  const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview, isEditor, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, isNoMoreData, channel, refreshFeSession, isDiyH5 } = useSxpDataSource();
18762
18888
  const { backMainFeed, productView, jumpToWeb } = useEventReport();
18763
18889
  const isShowFingerTip = useMemo(() => {
@@ -18805,7 +18931,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18805
18931
  (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
18806
18932
  }, [data, ctaType, swiperRef]);
18807
18933
  const handleSessionCompleted = useCallback((fk) => {
18808
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
18934
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
18809
18935
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
18810
18936
  let fromKName = '';
18811
18937
  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))) {
@@ -18832,13 +18958,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18832
18958
  eventSubject: 'sessionCompleted',
18833
18959
  eventDescription: 'Session completed',
18834
18960
  contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
18835
- 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 : '',
18836
- productId: (_r = item === null || item === void 0 ? void 0 : item.product) === null || _r === void 0 ? void 0 : _r.itemId,
18961
+ productId: (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.itemId,
18837
18962
  position: activeIndex + '',
18838
18963
  fromKName: fk || fromKName,
18839
18964
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
18840
- 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 : '',
18841
- 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 : ''
18965
+ ctatId: (_r = (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.bindCta) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
18966
+ traceInfo: (_v = (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : (_u = item === null || item === void 0 ? void 0 : item.product) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : ''
18842
18967
  }
18843
18968
  });
18844
18969
  }, [data, bffEventReport, activeIndex, popupDetailData, tempMap, isFromHashtag, curTime]);
@@ -18897,9 +19022,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18897
19022
  refreshFeSession
18898
19023
  ]);
18899
19024
  const handleSessionExpire = useCallback(debounce(() => {
18900
- var _a, _b;
19025
+ var _a;
18901
19026
  (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
18902
- (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
18903
19027
  refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(false, handleSessionCompleted);
18904
19028
  }, 1000), [handleSessionCompleted, refreshFeSession]);
18905
19029
  useEffect(() => {
@@ -18969,18 +19093,18 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18969
19093
  return null;
18970
19094
  }, [globalConfig, activeIndex, visList]);
18971
19095
  const renderContent = useCallback((rec, index) => {
18972
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
19096
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18973
19097
  if (rec === 'organic menu') {
18974
19098
  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)));
18975
19099
  }
18976
- 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)) {
19100
+ if ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.url) {
18977
19101
  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 })));
18978
19102
  }
18979
- if ((_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.imgUrls) {
18980
- 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 })));
19103
+ if ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.imgUrls) {
19104
+ return (React.createElement(PictureGroup$5, { key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, imgUrls: rec === null || rec === void 0 ? void 0 : rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onViewImageEndEvent: handleViewImageStartEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
18981
19105
  }
18982
- 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) {
18983
- return (_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _m === void 0 ? void 0 : _m.map((value, idx) => {
19106
+ if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_j = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _j === void 0 ? void 0 : _j.length) > 0) {
19107
+ return (_k = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _k === void 0 ? void 0 : _k.map((value, idx) => {
18984
19108
  var _a, _b, _c, _d, _e, _f, _g, _h;
18985
19109
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
18986
19110
  const Component = withBindDataSource(t);
@@ -19018,7 +19142,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19018
19142
  };
19019
19143
  }, [isShowMore]);
19020
19144
  const renderBottom = useCallback((rec, index) => {
19021
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
19145
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
19022
19146
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
19023
19147
  let cta = null;
19024
19148
  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) {
@@ -19027,27 +19151,24 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19027
19151
  else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
19028
19152
  cta = '商品CTA';
19029
19153
  }
19030
- 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)) {
19031
- cta = '服务CTA';
19032
- }
19033
19154
  else {
19034
- 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;
19155
+ cta = (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
19035
19156
  }
19036
19157
  const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
19037
19158
  const isNineProduct = (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.nineProductEnable) &&
19038
19159
  index === ((rtcList === null || rtcList === void 0 ? void 0 : rtcList[0]) === 'organic menu' ? 2 : 1) &&
19039
- ((_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));
19160
+ ((_f = ['MultiCommodity', 'MultiCommodityDiro', 'MultiCommodityDiroNew']) === null || _f === void 0 ? void 0 : _f.includes((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.type));
19040
19161
  return (React.createElement(React.Fragment, null,
19041
19162
  isNineProduct && (React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value, isNineProduct: isNineProduct })),
19042
- ((_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' }),
19043
- 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` } },
19163
+ ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
19164
+ React.createElement("div", { className: 'clc-sxp-bottom', style: { marginBottom: `${(_j = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _j !== void 0 ? _j : 40}px` } },
19044
19165
  React.createElement(Nudge, { nudge: nudge }),
19045
19166
  ((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' },
19046
19167
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value }))) : null,
19047
19168
  React.createElement("div", null,
19048
- 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 }),
19169
+ React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.title) !== null && _l !== void 0 ? _l : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
19049
19170
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex, value: value }),
19050
- 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) }))),
19171
+ React.createElement(Hashtag$1, { index: activeIndex, tags: (_o = (_m = rec === null || rec === void 0 ? void 0 : rec.video) === null || _m === void 0 ? void 0 : _m.hashTags) !== null && _o !== void 0 ? _o : [], itemId: (_p = rec === null || rec === void 0 ? void 0 : rec.video) === null || _p === void 0 ? void 0 : _p.itemId, itemType: ((_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle, hashTagRightMargin: containerWidth - (hashTagRightMargin !== null && hashTagRightMargin !== void 0 ? hashTagRightMargin : 0) }))),
19051
19172
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex, value: value })));
19052
19173
  }
19053
19174
  return null;
@@ -19086,7 +19207,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19086
19207
  return null;
19087
19208
  }, [globalConfig, waterFallData]);
19088
19209
  const handleViewImageStartEnd = (item) => {
19089
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
19210
+ var _a, _b, _c, _d, _e, _f;
19090
19211
  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)) {
19091
19212
  const endTime = Date.now();
19092
19213
  const duration = viewImageStartTime.current === 0 ? 0 : (endTime - viewImageStartTime.current) / 1000;
@@ -19095,11 +19216,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19095
19216
  eventSubject: 'viewImageCarouselEnd',
19096
19217
  eventDescription: 'User end view the image carousel',
19097
19218
  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 : '',
19098
- 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 : '',
19099
- contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19219
+ contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
19100
19220
  imageEndTime: `${endTime}`,
19101
19221
  playDuration: `${duration}`,
19102
- contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19222
+ contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
19103
19223
  position: activeIndex + '',
19104
19224
  contentFormat: 'image',
19105
19225
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
@@ -19108,7 +19228,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19108
19228
  }
19109
19229
  };
19110
19230
  const handleSlideSkip = (item, position) => {
19111
- 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;
19231
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
19112
19232
  if (isPreview || waterFallData)
19113
19233
  return;
19114
19234
  const t = new Date() - curTime.current;
@@ -19134,8 +19254,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19134
19254
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
19135
19255
  position: position + '',
19136
19256
  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 : '',
19137
- 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 : '',
19138
- 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 : '',
19257
+ traceInfo: (_x = (_v = (_u = item === null || item === void 0 ? void 0 : item.video) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : (_w = item === null || item === void 0 ? void 0 : item.product) === null || _w === void 0 ? void 0 : _w.traceInfo) !== null && _x !== void 0 ? _x : '',
19139
19258
  contentFormat
19140
19259
  }
19141
19260
  });
@@ -19145,7 +19264,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19145
19264
  }
19146
19265
  };
19147
19266
  const handleScrollEvent = (swiper) => {
19148
- 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;
19267
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
19149
19268
  const item = data[swiper.previousIndex];
19150
19269
  if (!item)
19151
19270
  return;
@@ -19162,12 +19281,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19162
19281
  eventSubject: 'scrollDown',
19163
19282
  eventDescription: 'User scroll down',
19164
19283
  contentId: (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.itemId) !== null && _e !== void 0 ? _e : '',
19165
- sceneId: (_h = (_g = (_f = item === null || item === void 0 ? void 0 : item.video) === null || _f === void 0 ? void 0 : _f.scene) === null || _g === void 0 ? void 0 : _g.sceneId) !== null && _h !== void 0 ? _h : '',
19166
- productId: (_k = (_j = item === null || item === void 0 ? void 0 : item.product) === null || _j === void 0 ? void 0 : _j.itemId) !== null && _k !== void 0 ? _k : '',
19284
+ productId: (_g = (_f = item === null || item === void 0 ? void 0 : item.product) === null || _f === void 0 ? void 0 : _f.itemId) !== null && _g !== void 0 ? _g : '',
19167
19285
  requestId: null,
19168
- traceInfo: (_p = (_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.traceInfo) !== null && _m !== void 0 ? _m : (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.traceInfo) !== null && _p !== void 0 ? _p : '',
19286
+ traceInfo: (_l = (_j = (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.traceInfo) !== null && _j !== void 0 ? _j : (_k = item === null || item === void 0 ? void 0 : item.product) === null || _k === void 0 ? void 0 : _k.traceInfo) !== null && _l !== void 0 ? _l : '',
19169
19287
  contentFormat,
19170
- position: ((_q = swiper.previousIndex) !== null && _q !== void 0 ? _q : 0) + ''
19288
+ position: ((_m = swiper.previousIndex) !== null && _m !== void 0 ? _m : 0) + ''
19171
19289
  }
19172
19290
  });
19173
19291
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19179,13 +19297,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19179
19297
  eventInfo: {
19180
19298
  eventSubject: 'scrollUp',
19181
19299
  eventDescription: 'User scroll up',
19182
- contentId: (_s = (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.itemId) !== null && _s !== void 0 ? _s : '',
19183
- sceneId: (_v = (_u = (_t = item === null || item === void 0 ? void 0 : item.video) === null || _t === void 0 ? void 0 : _t.scene) === null || _u === void 0 ? void 0 : _u.sceneId) !== null && _v !== void 0 ? _v : '',
19184
- productId: (_x = (_w = item.product) === null || _w === void 0 ? void 0 : _w.itemId) !== null && _x !== void 0 ? _x : '',
19300
+ contentId: (_p = (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.itemId) !== null && _p !== void 0 ? _p : '',
19301
+ productId: (_r = (_q = item.product) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
19185
19302
  requestId: null,
19186
- traceInfo: (_1 = (_z = (_y = item === null || item === void 0 ? void 0 : item.video) === null || _y === void 0 ? void 0 : _y.traceInfo) !== null && _z !== void 0 ? _z : (_0 = item === null || item === void 0 ? void 0 : item.product) === null || _0 === void 0 ? void 0 : _0.traceInfo) !== null && _1 !== void 0 ? _1 : '',
19303
+ traceInfo: (_v = (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : (_u = item === null || item === void 0 ? void 0 : item.product) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : '',
19187
19304
  contentFormat,
19188
- position: ((_2 = swiper.previousIndex) !== null && _2 !== void 0 ? _2 : 0) + ''
19305
+ position: ((_w = swiper.previousIndex) !== null && _w !== void 0 ? _w : 0) + ''
19189
19306
  }
19190
19307
  });
19191
19308
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19211,7 +19328,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19211
19328
  }
19212
19329
  }, [openHashtag, data, activeIndex]);
19213
19330
  const handleViewImageStartEvent = (activeIndex, imgInfo, enableCapi) => {
19214
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
19331
+ var _a, _b, _c, _d, _e, _f, _g, _h;
19215
19332
  const item = data[activeIndex];
19216
19333
  // 如果是图片集则上报事件
19217
19334
  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)) {
@@ -19222,10 +19339,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19222
19339
  eventSubject: 'viewImageCarouselStart',
19223
19340
  eventDescription: 'User start view the image carousel',
19224
19341
  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 : '',
19225
- 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 : '',
19226
- contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19342
+ contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
19227
19343
  imageStartTime: `${startTime}`,
19228
- contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19344
+ contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
19229
19345
  position: activeIndex + '',
19230
19346
  contentFormat: 'image',
19231
19347
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo,
@@ -19235,11 +19351,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19235
19351
  if (enableCapi) {
19236
19352
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19237
19353
  eventName: 'ViewContent',
19238
- product: (_k = item === null || item === void 0 ? void 0 : item.video) === null || _k === void 0 ? void 0 : _k.bindProduct
19354
+ product: (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.bindProduct
19239
19355
  });
19240
19356
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19241
19357
  eventName: 'PageView',
19242
- product: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.bindProduct
19358
+ product: (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProduct
19243
19359
  });
19244
19360
  }
19245
19361
  }
@@ -19331,20 +19447,15 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19331
19447
  swiperRef.current.swiper.allowTouchMove = true;
19332
19448
  }, 500);
19333
19449
  }, onActiveIndexChange: (swiper) => {
19334
- var _a, _b;
19335
19450
  setActiveIndex(swiper.activeIndex);
19336
19451
  if (openHashtag)
19337
19452
  return;
19338
19453
  // 处理上滑下滑事件
19339
19454
  handleScrollEvent(swiper);
19340
- if (waterFallData || isEditor)
19455
+ if (waterFallData || isEditor || isDiyH5)
19341
19456
  return;
19342
19457
  if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
19343
19458
  if (!isLoadMore) {
19344
- if (isDiyH5) {
19345
- (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
19346
- (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
19347
- }
19348
19459
  setIsLoadMore(true);
19349
19460
  loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(pageNum).then((res) => {
19350
19461
  var _a;
@@ -19397,7 +19508,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19397
19508
  }, []);
19398
19509
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
19399
19510
  const handlePlaying = useCallback(() => {
19400
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
19511
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
19401
19512
  setIsPauseVideo(false);
19402
19513
  const item = data[index];
19403
19514
  if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
@@ -19410,15 +19521,14 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19410
19521
  eventSubject: 'playVideo',
19411
19522
  eventDescription: 'User played the video',
19412
19523
  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 : '',
19413
- 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 : '',
19414
- 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 : '',
19524
+ contentName: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
19415
19525
  playType,
19416
19526
  startTime: videoCurrentTime,
19417
19527
  videoDuration,
19418
- 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 : []),
19528
+ contentTags: JSON.stringify((_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
19419
19529
  position: index + '',
19420
19530
  contentFormat: 'video',
19421
- traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
19531
+ traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
19422
19532
  }
19423
19533
  });
19424
19534
  setIsFirstPlay(false);
@@ -19457,7 +19567,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19457
19567
  }
19458
19568
  }, [isLoadFinish]);
19459
19569
  const onPause = useCallback(() => {
19460
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
19570
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
19461
19571
  const item = data[index];
19462
19572
  const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
19463
19573
  const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
@@ -19468,15 +19578,14 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19468
19578
  eventSubject: 'playOverVideo',
19469
19579
  eventDescription: 'User finished playing the video',
19470
19580
  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 : '',
19471
- 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 : '',
19472
- 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 : '',
19581
+ contentName: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
19473
19582
  endTime: videoCurrentTime,
19474
19583
  videoDuration,
19475
19584
  playDuration,
19476
- 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 : []),
19585
+ contentTags: JSON.stringify((_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
19477
19586
  position: index + '',
19478
19587
  contentFormat: 'video',
19479
- traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
19588
+ traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
19480
19589
  }
19481
19590
  });
19482
19591
  }