pb-sxp-ui 1.16.5 → 1.16.6

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 (31) hide show
  1. package/dist/index.cjs +162 -126
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +162 -126
  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 +162 -126
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +6 -6
  12. package/dist/pb-ui.min.js.map +1 -1
  13. package/es/core/components/DiyPortalPreview/VideoWidget.js +10 -8
  14. package/es/core/components/SxpPageRender/LikeButton/index.js +17 -15
  15. package/es/core/components/SxpPageRender/PictureGroup/index.d.ts +5 -0
  16. package/es/core/components/SxpPageRender/PictureGroup/index.js +42 -13
  17. package/es/core/components/SxpPageRender/VideoWidget/index.js +34 -44
  18. package/es/core/components/SxpPageRender/WaterFall/index.js +4 -3
  19. package/es/core/components/SxpPageRender/index.js +46 -35
  20. package/es/core/context/SxpDataSourceProvider.js +2 -2
  21. package/es/core/hooks/useEventReport.js +6 -5
  22. package/lib/core/components/DiyPortalPreview/VideoWidget.js +10 -8
  23. package/lib/core/components/SxpPageRender/LikeButton/index.js +17 -15
  24. package/lib/core/components/SxpPageRender/PictureGroup/index.d.ts +5 -0
  25. package/lib/core/components/SxpPageRender/PictureGroup/index.js +41 -12
  26. package/lib/core/components/SxpPageRender/VideoWidget/index.js +34 -44
  27. package/lib/core/components/SxpPageRender/WaterFall/index.js +4 -3
  28. package/lib/core/components/SxpPageRender/index.js +46 -35
  29. package/lib/core/context/SxpDataSourceProvider.js +2 -2
  30. package/lib/core/hooks/useEventReport.js +6 -5
  31. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -22,7 +22,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
22
22
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
23
23
  PERFORMANCE OF THIS SOFTWARE.
24
24
  ***************************************************************************** */
25
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
25
+ /* global Reflect, Promise, SuppressedError, Symbol */
26
26
 
27
27
 
28
28
  function __rest(s, e) {
@@ -1064,7 +1064,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1064
1064
  }
1065
1065
  }), [bffFetch, utmVal]);
1066
1066
  const ctaEvent = useCallback((eventInfo, rec, product, position) => {
1067
- 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;
1067
+ 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;
1068
1068
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
1069
1069
  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);
1070
1070
  let fromKName = '';
@@ -1082,7 +1082,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1082
1082
  }
1083
1083
  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;
1084
1084
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1085
- 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 })
1085
+ 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 })
1086
1086
  });
1087
1087
  }, [bffEventReport, isFromHashtag]);
1088
1088
  const h5EnterLink = useCallback(() => {
@@ -1743,14 +1743,14 @@ var settingRender$f = [
1743
1743
  * @Author: binruan@chatlabs.com
1744
1744
  * @Date: 2024-03-12 10:59:06
1745
1745
  * @LastEditors: binruan@chatlabs.com
1746
- * @LastEditTime: 2024-11-28 11:17:16
1746
+ * @LastEditTime: 2025-05-09 15:30:59
1747
1747
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1748
1748
  *
1749
1749
  */
1750
1750
  function useEventReport() {
1751
1751
  const { bffEventReport, popupDetailData, isFromHashtag, eventTimeList, setEventTimeList } = useSxpDataSource();
1752
1752
  const jumpToWeb = useCallback((e, data, product, cta, position, traceInfo) => {
1753
- 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;
1753
+ 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;
1754
1754
  const i = eventTimeList === null || eventTimeList === void 0 ? void 0 : eventTimeList.findIndex((item) => item.target === (e === null || e === void 0 ? void 0 : e.target));
1755
1755
  if (i !== -1) {
1756
1756
  return;
@@ -1783,11 +1783,11 @@ function useEventReport() {
1783
1783
  contentFormat = 'image';
1784
1784
  }
1785
1785
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1786
- 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 }))
1786
+ 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 }))
1787
1787
  });
1788
1788
  }, [bffEventReport, popupDetailData, isFromHashtag, eventTimeList]);
1789
1789
  const productView = useCallback((data, product, cta, viewTime, position) => {
1790
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
1790
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
1791
1791
  let fromKName = '';
1792
1792
  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))) {
1793
1793
  fromKName = 'pdpPage';
@@ -1806,8 +1806,9 @@ function useEventReport() {
1806
1806
  contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
1807
1807
  position: position + '',
1808
1808
  contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
1809
+ 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 : '',
1809
1810
  ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
1810
- 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 : '',
1811
+ 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 : '',
1811
1812
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
1812
1813
  eventSubject: 'productView',
1813
1814
  eventDescription: 'User browsed the product'
@@ -15610,7 +15611,7 @@ function WaterfallList(_a) {
15610
15611
  * @Author: binruan@chatlabs.com
15611
15612
  * @Date: 2024-01-10 10:58:24
15612
15613
  * @LastEditors: binruan@chatlabs.com
15613
- * @LastEditTime: 2025-02-28 10:00:31
15614
+ * @LastEditTime: 2025-05-09 15:30:41
15614
15615
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
15615
15616
  *
15616
15617
  */
@@ -15648,7 +15649,7 @@ const WaterFall = (props) => {
15648
15649
  }
15649
15650
  }, [waterFallData]);
15650
15651
  const reportTagsView = useCallback(() => {
15651
- var _a, _b, _c, _d, _e, _f;
15652
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
15652
15653
  const rec = recData === null || recData === void 0 ? void 0 : recData.rec;
15653
15654
  if (!rec)
15654
15655
  return;
@@ -15668,9 +15669,10 @@ const WaterFall = (props) => {
15668
15669
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
15669
15670
  eventInfo: {
15670
15671
  contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
15672
+ 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 : '',
15671
15673
  position: cacheActiveIndex + '',
15672
- contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
15673
- traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
15674
+ contentTags: JSON.stringify((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.tags),
15675
+ traceInfo: (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.traceInfo,
15674
15676
  hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
15675
15677
  fromKName,
15676
15678
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
@@ -17752,7 +17754,7 @@ const LikeButton = (_a) => {
17752
17754
  const likeIcon = useIconLink(defaultLikeIconPath$2);
17753
17755
  const unlikeIcon = useIconLink(defaultUnLikeIconPath$2);
17754
17756
  const handleClick = debounce(() => __awaiter(void 0, void 0, void 0, function* () {
17755
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
17757
+ 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;
17756
17758
  if (state) {
17757
17759
  // 先设置状态
17758
17760
  setState(false);
@@ -17762,11 +17764,12 @@ const LikeButton = (_a) => {
17762
17764
  eventSubject: 'favoriteContentCanceled',
17763
17765
  eventDescription: 'This content was unfavorite by the user',
17764
17766
  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 : '',
17765
- 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 : '',
17766
- 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 : []),
17767
+ 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 : '',
17768
+ 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 : '',
17769
+ 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 : []),
17767
17770
  position: position + '',
17768
- contentFormat: ((_m = recData === null || recData === void 0 ? void 0 : recData.video) === null || _m === void 0 ? void 0 : _m.url) ? 'video' : 'image',
17769
- traceInfo: (_o = recData === null || recData === void 0 ? void 0 : recData.video) === null || _o === void 0 ? void 0 : _o.traceInfo
17771
+ contentFormat: ((_q = recData === null || recData === void 0 ? void 0 : recData.video) === null || _q === void 0 ? void 0 : _q.url) ? 'video' : 'image',
17772
+ traceInfo: (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.traceInfo
17770
17773
  }
17771
17774
  });
17772
17775
  // 如果接口调用失败,则回滚状态
@@ -17774,40 +17777,41 @@ const LikeButton = (_a) => {
17774
17777
  setState(true);
17775
17778
  }
17776
17779
  else {
17777
- const nRtcList = (_p = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
17780
+ const nRtcList = (_s = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
17778
17781
  if (index === position) {
17779
17782
  item.isCollected = false;
17780
17783
  }
17781
17784
  return item;
17782
- })) !== null && _p !== void 0 ? _p : [];
17785
+ })) !== null && _s !== void 0 ? _s : [];
17783
17786
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
17784
17787
  }
17785
17788
  }
17786
17789
  else {
17787
17790
  setState(true);
17788
- const result = (_q = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _q !== void 0 ? _q : false;
17791
+ const result = (_t = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _t !== void 0 ? _t : false;
17789
17792
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
17790
17793
  eventInfo: {
17791
17794
  eventSubject: 'favoriteContent',
17792
17795
  eventDescription: 'This content was favorite by the user',
17793
- 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 : '',
17794
- 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 : '',
17795
- 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 : []),
17796
+ 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 : '',
17797
+ 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 : '',
17798
+ 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 : '',
17799
+ 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 : []),
17796
17800
  position: position + '',
17797
- contentFormat: ((_x = recData === null || recData === void 0 ? void 0 : recData.video) === null || _x === void 0 ? void 0 : _x.url) ? 'video' : 'image',
17798
- traceInfo: (_y = recData === null || recData === void 0 ? void 0 : recData.video) === null || _y === void 0 ? void 0 : _y.traceInfo
17801
+ contentFormat: ((_3 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _3 === void 0 ? void 0 : _3.url) ? 'video' : 'image',
17802
+ traceInfo: (_4 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _4 === void 0 ? void 0 : _4.traceInfo
17799
17803
  }
17800
17804
  });
17801
17805
  if (!result) {
17802
17806
  setState(false);
17803
17807
  }
17804
17808
  else {
17805
- const nRtcList = (_z = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
17809
+ const nRtcList = (_5 = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
17806
17810
  if (index === position) {
17807
17811
  item.isCollected = true;
17808
17812
  }
17809
17813
  return item;
17810
- })) !== null && _z !== void 0 ? _z : [];
17814
+ })) !== null && _5 !== void 0 ? _5 : [];
17811
17815
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
17812
17816
  }
17813
17817
  }
@@ -17910,6 +17914,26 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
17910
17914
  return;
17911
17915
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
17912
17916
  }, [videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
17917
+ const handleEnd = () => {
17918
+ var _a, _b, _c, _d, _e, _f, _g, _h;
17919
+ if (!videoRef.current)
17920
+ return;
17921
+ if (isDiyH5) {
17922
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.pause();
17923
+ if (!loopPlayRef.current)
17924
+ return;
17925
+ if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
17926
+ (_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.slideTo(0);
17927
+ }
17928
+ else {
17929
+ const i = (_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.activeIndex;
17930
+ (_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.slideTo(i + 1);
17931
+ }
17932
+ }
17933
+ else {
17934
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.play();
17935
+ }
17936
+ };
17913
17937
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
17914
17938
  const handlePlaying = useCallback(() => {
17915
17939
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
@@ -17918,7 +17942,7 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
17918
17942
  setIsLoadFinish(true);
17919
17943
  }, []);
17920
17944
  const handleStartPlay = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
17921
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
17945
+ var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
17922
17946
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
17923
17947
  return;
17924
17948
  setIsPauseVideo(false);
@@ -17929,16 +17953,11 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
17929
17953
  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);
17930
17954
  const playType = (isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) ? '0' : '1';
17931
17955
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
17932
- 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) + '' }))
17956
+ 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) + '' }))
17933
17957
  });
17934
17958
  isFirstPlayRef.current = false;
17935
17959
  }
17936
17960
  }), [bffEventReport, data, index, isFirstPlayRef, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
17937
- const setCurrentTimeByStartTime = useCallback(() => {
17938
- if (isDiyH5) {
17939
- videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
17940
- }
17941
- }, []);
17942
17961
  const handLoadeddata = useCallback(() => {
17943
17962
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || firstFrameSrc || !blur)
17944
17963
  return;
@@ -17963,13 +17982,12 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
17963
17982
  const handleLoadedmetadata = useCallback(() => {
17964
17983
  if (!videoRef.current)
17965
17984
  return;
17966
- setCurrentTimeByStartTime();
17967
17985
  loadedTimeRef.current = new Date();
17968
17986
  handleStartPlay();
17969
17987
  handLoadeddata();
17970
17988
  }, [videoRef.current, handLoadeddata, handleStartPlay]);
17971
17989
  const handleClickVideo = useCallback((type) => () => {
17972
- var _a, _b, _c, _d, _e, _f;
17990
+ var _a, _b, _c, _d, _e;
17973
17991
  if (!videoRef.current)
17974
17992
  return;
17975
17993
  if (!isLoadFinish)
@@ -17990,20 +18008,17 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
17990
18008
  break;
17991
18009
  default:
17992
18010
  if (isPause) {
17993
- 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)) {
17994
- videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
17995
- }
17996
- (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
18011
+ (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
17997
18012
  }
17998
18013
  else {
17999
- (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
18014
+ (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.pause();
18000
18015
  }
18001
18016
  setIsPauseVideo(!isPause);
18002
18017
  break;
18003
18018
  }
18004
18019
  }, [isLoadFinish, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
18005
18020
  const handlePause = useCallback(() => {
18006
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
18021
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
18007
18022
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
18008
18023
  return;
18009
18024
  if (activeIndex !== index)
@@ -18019,14 +18034,15 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18019
18034
  eventSubject: 'playOverVideo',
18020
18035
  eventDescription: 'User finished playing the video',
18021
18036
  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 : '',
18022
- 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 : '',
18037
+ 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 : '',
18038
+ 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 : '',
18023
18039
  endTime: videoCurrentTime,
18024
18040
  videoDuration,
18025
18041
  playDuration,
18026
- 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 : []),
18042
+ 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 : []),
18027
18043
  position: index + '',
18028
18044
  contentFormat: 'video',
18029
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
18045
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
18030
18046
  }
18031
18047
  });
18032
18048
  }
@@ -18034,27 +18050,8 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18034
18050
  const handleWaiting = useCallback(() => {
18035
18051
  setWaiting(true);
18036
18052
  }, []);
18037
- const handleTimeUpload = () => {
18038
- if (!videoRef.current || !isDiyH5)
18039
- return;
18040
- setTimeout(() => {
18041
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
18042
- 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)) {
18043
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
18044
- if (!loopPlayRef.current)
18045
- return;
18046
- if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
18047
- (_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);
18048
- }
18049
- else {
18050
- 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;
18051
- (_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);
18052
- }
18053
- }
18054
- });
18055
- };
18056
18053
  useEffect(() => {
18057
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18054
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18058
18055
  if (!isActive)
18059
18056
  return;
18060
18057
  const videoSrc = videoUrl;
@@ -18075,7 +18072,6 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18075
18072
  hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
18076
18073
  hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
18077
18074
  var _a;
18078
- setCurrentTimeByStartTime();
18079
18075
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
18080
18076
  });
18081
18077
  }
@@ -18089,12 +18085,11 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18089
18085
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('play', handleStartPlay);
18090
18086
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
18091
18087
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.addEventListener('pause', handlePause);
18092
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handlePlay);
18088
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handleEnd);
18093
18089
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
18094
18090
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
18095
- (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.addEventListener('timeupdate', handleTimeUpload);
18096
18091
  return () => {
18097
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18092
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18098
18093
  const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
18099
18094
  if (!isPause)
18100
18095
  handlePause();
@@ -18106,10 +18101,9 @@ const VideoWidget$4 = forwardRef(({ rec, index, height, data, muted, activeIndex
18106
18101
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('play', handleStartPlay);
18107
18102
  (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('playing', handlePlaying);
18108
18103
  (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('pause', handlePause);
18109
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handlePlay);
18104
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handleEnd);
18110
18105
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('canplay', handlePlay);
18111
18106
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.removeEventListener('waiting', handleWaiting);
18112
- (_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.removeEventListener('timeupdate', handleTimeUpload);
18113
18107
  };
18114
18108
  }, [isActive]);
18115
18109
  useEffect(() => {
@@ -18320,19 +18314,48 @@ const Picture = (props) => {
18320
18314
  }, onLoad: onShowFirstImage }))));
18321
18315
  };
18322
18316
 
18323
- const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig }) => {
18317
+ const PictureGroup$4 = forwardRef(({ imgUrls, data, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig, swiperRef }, ref) => {
18324
18318
  var _a, _b;
18325
18319
  const { isActive } = useSwiperSlide();
18326
- const { sxpParameter, openHashtag } = useSxpDataSource();
18320
+ const { sxpParameter, openHashtag, isDiyH5 } = useSxpDataSource();
18327
18321
  const [isLoad, setIsLoad] = useState(false);
18328
18322
  const [imgInfo, setImgInfo] = useState();
18329
18323
  const [swiperActiveIndex, setSwiperActiveIndex] = useState(0);
18330
- const swiperRef = useRef();
18324
+ const imgsSwiperRef = useRef();
18331
18325
  const isFirstPlayRef = useRef(true);
18326
+ const loopPlayRef = useRef(true);
18332
18327
  const initTime = new Date();
18328
+ useImperativeHandle(ref, () => {
18329
+ return {
18330
+ setLoopPlay(v) {
18331
+ loopPlayRef.current = v;
18332
+ }
18333
+ };
18334
+ });
18335
+ useEffect(() => {
18336
+ let timerId;
18337
+ if (isLoad && isActive && isDiyH5) {
18338
+ timerId = setTimeout(() => {
18339
+ var _a, _b, _c, _d, _e, _f;
18340
+ if (!loopPlayRef.current)
18341
+ return;
18342
+ if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
18343
+ (_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.slideTo(0);
18344
+ }
18345
+ else {
18346
+ const i = (_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.activeIndex;
18347
+ (_f = (_e = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _e === void 0 ? void 0 : _e.swiper) === null || _f === void 0 ? void 0 : _f.slideTo(i + 1);
18348
+ }
18349
+ }, 3000);
18350
+ }
18351
+ return () => {
18352
+ if (timerId)
18353
+ clearTimeout(timerId);
18354
+ };
18355
+ }, [isLoad, isActive, isDiyH5, data, index, swiperRef]);
18333
18356
  useEffect(() => {
18334
18357
  if (isLoad && isActive) {
18335
- (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.start();
18358
+ (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.start();
18336
18359
  if (openHashtag) {
18337
18360
  onViewImageEndEvent(rec);
18338
18361
  }
@@ -18342,7 +18365,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
18342
18365
  }
18343
18366
  }
18344
18367
  else {
18345
- (swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.stop();
18368
+ (imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.stop();
18346
18369
  }
18347
18370
  }, [rec, isActive, onViewImageEndEvent, openHashtag, index, onViewImageStartEvent, isLoad, imgInfo]);
18348
18371
  const showFirstImageFn = useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
@@ -18369,13 +18392,13 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
18369
18392
  };
18370
18393
  }, [isActive, imgInfo]);
18371
18394
  const handleMouseEnter = useCallback(() => {
18372
- if (swiperRef.current && swiperRef.current.swiper && isAlly) {
18373
- swiperRef.current.swiper.autoplay.stop();
18395
+ if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
18396
+ imgsSwiperRef.current.swiper.autoplay.stop();
18374
18397
  }
18375
18398
  }, []);
18376
18399
  const handleMouseLeave = useCallback(() => {
18377
- if (swiperRef.current && swiperRef.current.swiper && isAlly) {
18378
- swiperRef.current.swiper.autoplay.start();
18400
+ if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
18401
+ imgsSwiperRef.current.swiper.autoplay.start();
18379
18402
  }
18380
18403
  }, []);
18381
18404
  const handleSlideChange = useCallback((swiper) => {
@@ -18396,7 +18419,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
18396
18419
  enabled: true
18397
18420
  }
18398
18421
  }
18399
- : {}), { loop: true, ref: swiperRef, onSlideChange: handleSlideChange, className: css(Object.assign(Object.assign({ '.swiper-pagination': {
18422
+ : {}), { loop: true, ref: imgsSwiperRef, onSlideChange: handleSlideChange, className: css(Object.assign(Object.assign({ '.swiper-pagination': {
18400
18423
  bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
18401
18424
  fontSize: '14px'
18402
18425
  } }, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor) && {
@@ -18413,7 +18436,7 @@ const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
18413
18436
  return (React.createElement(SwiperSlide, { key: srcKey, "aria-hidden": srcKey !== swiperActiveIndex },
18414
18437
  React.createElement(Picture, { src: !isLoad && srcKey > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
18415
18438
  }))));
18416
- };
18439
+ });
18417
18440
  var PictureGroup$5 = memo(PictureGroup$4);
18418
18441
 
18419
18442
  /*
@@ -18693,7 +18716,7 @@ var NavBack$1 = memo(NavBack);
18693
18716
  * @Author: binruan@chatlabs.com
18694
18717
  * @Date: 2024-03-20 10:27:31
18695
18718
  * @LastEditors: binruan@chatlabs.com
18696
- * @LastEditTime: 2025-05-09 15:51:40
18719
+ * @LastEditTime: 2025-05-12 14:26:15
18697
18720
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
18698
18721
  *
18699
18722
  */
@@ -18713,6 +18736,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18713
18736
  const skipLinkRef = useRef(false);
18714
18737
  const [pageNum, setPageNum] = useState(2);
18715
18738
  const videoWidgetRef = useRef(null);
18739
+ const pictureGroupRef = useRef(null);
18716
18740
  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();
18717
18741
  const { backMainFeed, productView, jumpToWeb } = useEventReport();
18718
18742
  const isShowFingerTip = useMemo(() => {
@@ -18760,7 +18784,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18760
18784
  (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
18761
18785
  }, [data, ctaType, swiperRef]);
18762
18786
  const handleSessionCompleted = useCallback((fk) => {
18763
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
18787
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
18764
18788
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
18765
18789
  let fromKName = '';
18766
18790
  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))) {
@@ -18787,12 +18811,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18787
18811
  eventSubject: 'sessionCompleted',
18788
18812
  eventDescription: 'Session completed',
18789
18813
  contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
18790
- productId: (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.itemId,
18814
+ 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 : '',
18815
+ productId: (_r = item === null || item === void 0 ? void 0 : item.product) === null || _r === void 0 ? void 0 : _r.itemId,
18791
18816
  position: activeIndex + '',
18792
18817
  fromKName: fk || fromKName,
18793
18818
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
18794
- 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 : '',
18795
- 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 : ''
18819
+ 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 : '',
18820
+ 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 : ''
18796
18821
  }
18797
18822
  });
18798
18823
  }, [data, bffEventReport, activeIndex, popupDetailData, tempMap, isFromHashtag, curTime]);
@@ -18851,8 +18876,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18851
18876
  refreshFeSession
18852
18877
  ]);
18853
18878
  const handleSessionExpire = useCallback(debounce(() => {
18854
- var _a;
18879
+ var _a, _b;
18855
18880
  (_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
18881
+ (_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
18856
18882
  refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(false, handleSessionCompleted);
18857
18883
  }, 1000), [handleSessionCompleted, refreshFeSession]);
18858
18884
  useEffect(() => {
@@ -18922,18 +18948,18 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18922
18948
  return null;
18923
18949
  }, [globalConfig, activeIndex, visList]);
18924
18950
  const renderContent = useCallback((rec, index) => {
18925
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18951
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
18926
18952
  if (rec === 'organic menu') {
18927
18953
  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)));
18928
18954
  }
18929
- if ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.url) {
18955
+ 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)) {
18930
18956
  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 })));
18931
18957
  }
18932
- if ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.imgUrls) {
18933
- 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 }));
18958
+ if ((_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.imgUrls) {
18959
+ 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 })));
18934
18960
  }
18935
- 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) {
18936
- return (_k = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _k === void 0 ? void 0 : _k.map((value, idx) => {
18961
+ 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) {
18962
+ return (_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _m === void 0 ? void 0 : _m.map((value, idx) => {
18937
18963
  var _a, _b, _c, _d, _e, _f, _g, _h;
18938
18964
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
18939
18965
  const Component = withBindDataSource(t);
@@ -18971,7 +18997,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18971
18997
  };
18972
18998
  }, [isShowMore]);
18973
18999
  const renderBottom = useCallback((rec, index) => {
18974
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
19000
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
18975
19001
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
18976
19002
  let cta = null;
18977
19003
  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) {
@@ -18980,22 +19006,25 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
18980
19006
  else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
18981
19007
  cta = '商品CTA';
18982
19008
  }
19009
+ 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)) {
19010
+ cta = '服务CTA';
19011
+ }
18983
19012
  else {
18984
- 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;
19013
+ 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;
18985
19014
  }
18986
19015
  const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
18987
19016
  const isNineProduct = (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.nineProductEnable) && index === ((rtcList === null || rtcList === void 0 ? void 0 : rtcList[0]) === 'organic menu' ? 2 : 1);
18988
19017
  return (React.createElement(React.Fragment, null,
18989
19018
  isNineProduct && (React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value, isNineProduct: isNineProduct })),
18990
- ((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
18991
- React.createElement("div", { className: 'clc-sxp-bottom', style: { marginBottom: `${(_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _g !== void 0 ? _g : 40}px` } },
19019
+ ((_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
19020
+ React.createElement("div", { className: 'clc-sxp-bottom', style: { marginBottom: `${(_k = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _k !== void 0 ? _k : 40}px` } },
18992
19021
  React.createElement(Nudge, { nudge: nudge }),
18993
19022
  ((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' },
18994
19023
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value }))) : null,
18995
19024
  React.createElement("div", null,
18996
- 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: (_j = (_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.title) !== null && _j !== void 0 ? _j : '', 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 }),
19025
+ 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: (_m = (_l = rec === null || rec === void 0 ? void 0 : rec.video) === null || _l === void 0 ? void 0 : _l.title) !== null && _m !== void 0 ? _m : '', 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 }),
18997
19026
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex, value: value }),
18998
- React.createElement(Hashtag$1, { index: activeIndex, tags: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.hashTags) !== null && _l !== void 0 ? _l : [], itemId: (_m = rec === null || rec === void 0 ? void 0 : rec.video) === null || _m === void 0 ? void 0 : _m.itemId, itemType: ((_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle, hashTagRightMargin: containerWidth - (hashTagRightMargin !== null && hashTagRightMargin !== void 0 ? hashTagRightMargin : 0) }))),
19027
+ React.createElement(Hashtag$1, { index: activeIndex, tags: (_p = (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.hashTags) !== null && _p !== void 0 ? _p : [], itemId: (_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.itemId, itemType: ((_r = rec === null || rec === void 0 ? void 0 : rec.video) === null || _r === void 0 ? void 0 : _r.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle, hashTagRightMargin: containerWidth - (hashTagRightMargin !== null && hashTagRightMargin !== void 0 ? hashTagRightMargin : 0) }))),
18999
19028
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex, value: value })));
19000
19029
  }
19001
19030
  return null;
@@ -19034,7 +19063,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19034
19063
  return null;
19035
19064
  }, [globalConfig, waterFallData]);
19036
19065
  const handleViewImageStartEnd = (item) => {
19037
- var _a, _b, _c, _d, _e, _f;
19066
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
19038
19067
  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)) {
19039
19068
  const endTime = Date.now();
19040
19069
  const duration = viewImageStartTime.current === 0 ? 0 : (endTime - viewImageStartTime.current) / 1000;
@@ -19043,10 +19072,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19043
19072
  eventSubject: 'viewImageCarouselEnd',
19044
19073
  eventDescription: 'User end view the image carousel',
19045
19074
  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 : '',
19046
- contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
19075
+ 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 : '',
19076
+ contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19047
19077
  imageEndTime: `${endTime}`,
19048
19078
  playDuration: `${duration}`,
19049
- contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
19079
+ contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19050
19080
  position: activeIndex + '',
19051
19081
  contentFormat: 'image',
19052
19082
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
@@ -19055,7 +19085,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19055
19085
  }
19056
19086
  };
19057
19087
  const handleSlideSkip = (item, position) => {
19058
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
19088
+ 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;
19059
19089
  if (isPreview || waterFallData)
19060
19090
  return;
19061
19091
  const t = new Date() - curTime.current;
@@ -19081,7 +19111,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19081
19111
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
19082
19112
  position: position + '',
19083
19113
  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 : '',
19084
- 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 : '',
19114
+ 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 : '',
19115
+ 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 : '',
19085
19116
  contentFormat
19086
19117
  }
19087
19118
  });
@@ -19091,7 +19122,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19091
19122
  }
19092
19123
  };
19093
19124
  const handleScrollEvent = (swiper) => {
19094
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
19125
+ 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;
19095
19126
  const item = data[swiper.previousIndex];
19096
19127
  if (!item)
19097
19128
  return;
@@ -19108,11 +19139,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19108
19139
  eventSubject: 'scrollDown',
19109
19140
  eventDescription: 'User scroll down',
19110
19141
  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 : '',
19111
- 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 : '',
19142
+ 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 : '',
19143
+ 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 : '',
19112
19144
  requestId: null,
19113
- 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 : '',
19145
+ 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 : '',
19114
19146
  contentFormat,
19115
- position: ((_m = swiper.previousIndex) !== null && _m !== void 0 ? _m : 0) + ''
19147
+ position: ((_q = swiper.previousIndex) !== null && _q !== void 0 ? _q : 0) + ''
19116
19148
  }
19117
19149
  });
19118
19150
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19124,12 +19156,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19124
19156
  eventInfo: {
19125
19157
  eventSubject: 'scrollUp',
19126
19158
  eventDescription: 'User scroll up',
19127
- 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 : '',
19128
- productId: (_r = (_q = item.product) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
19159
+ 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 : '',
19160
+ 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 : '',
19161
+ productId: (_x = (_w = item.product) === null || _w === void 0 ? void 0 : _w.itemId) !== null && _x !== void 0 ? _x : '',
19129
19162
  requestId: null,
19130
- 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 : '',
19163
+ 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 : '',
19131
19164
  contentFormat,
19132
- position: ((_w = swiper.previousIndex) !== null && _w !== void 0 ? _w : 0) + ''
19165
+ position: ((_2 = swiper.previousIndex) !== null && _2 !== void 0 ? _2 : 0) + ''
19133
19166
  }
19134
19167
  });
19135
19168
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -19155,7 +19188,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19155
19188
  }
19156
19189
  }, [openHashtag, data, activeIndex]);
19157
19190
  const handleViewImageStartEvent = (activeIndex, imgInfo, enableCapi) => {
19158
- var _a, _b, _c, _d, _e, _f, _g, _h;
19191
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
19159
19192
  const item = data[activeIndex];
19160
19193
  // 如果是图片集则上报事件
19161
19194
  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)) {
@@ -19166,9 +19199,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19166
19199
  eventSubject: 'viewImageCarouselStart',
19167
19200
  eventDescription: 'User start view the image carousel',
19168
19201
  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 : '',
19169
- contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
19202
+ 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 : '',
19203
+ contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
19170
19204
  imageStartTime: `${startTime}`,
19171
- contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
19205
+ contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
19172
19206
  position: activeIndex + '',
19173
19207
  contentFormat: 'image',
19174
19208
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo,
@@ -19178,11 +19212,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19178
19212
  if (enableCapi) {
19179
19213
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19180
19214
  eventName: 'ViewContent',
19181
- product: (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.bindProduct
19215
+ product: (_k = item === null || item === void 0 ? void 0 : item.video) === null || _k === void 0 ? void 0 : _k.bindProduct
19182
19216
  });
19183
19217
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
19184
19218
  eventName: 'PageView',
19185
- product: (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProduct
19219
+ product: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.bindProduct
19186
19220
  });
19187
19221
  }
19188
19222
  }
@@ -19335,7 +19369,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19335
19369
  }, []);
19336
19370
  const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
19337
19371
  const handlePlaying = useCallback(() => {
19338
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
19372
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
19339
19373
  setIsPauseVideo(false);
19340
19374
  const item = data[index];
19341
19375
  if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
@@ -19348,14 +19382,15 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19348
19382
  eventSubject: 'playVideo',
19349
19383
  eventDescription: 'User played the video',
19350
19384
  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 : '',
19351
- 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 : '',
19385
+ 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 : '',
19386
+ 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 : '',
19352
19387
  playType,
19353
19388
  startTime: videoCurrentTime,
19354
19389
  videoDuration,
19355
- 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 : []),
19390
+ 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 : []),
19356
19391
  position: index + '',
19357
19392
  contentFormat: 'video',
19358
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
19393
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
19359
19394
  }
19360
19395
  });
19361
19396
  setIsFirstPlay(false);
@@ -19394,7 +19429,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19394
19429
  }
19395
19430
  }, [isLoadFinish]);
19396
19431
  const onPause = useCallback(() => {
19397
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
19432
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
19398
19433
  const item = data[index];
19399
19434
  const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
19400
19435
  const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
@@ -19405,14 +19440,15 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
19405
19440
  eventSubject: 'playOverVideo',
19406
19441
  eventDescription: 'User finished playing the video',
19407
19442
  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 : '',
19408
- 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 : '',
19443
+ 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 : '',
19444
+ 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 : '',
19409
19445
  endTime: videoCurrentTime,
19410
19446
  videoDuration,
19411
19447
  playDuration,
19412
- 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 : []),
19448
+ 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 : []),
19413
19449
  position: index + '',
19414
19450
  contentFormat: 'video',
19415
- traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
19451
+ traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
19416
19452
  }
19417
19453
  });
19418
19454
  }