@funhub/platform 0.2.29 → 0.2.31

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 (894) hide show
  1. package/dist/_virtual/_rolldown/runtime.mjs +18 -1
  2. package/dist/assets/icons/channel-list/channel-active-indicator.mjs +31 -1
  3. package/dist/assets/icons/clear.mjs +17 -1
  4. package/dist/assets/icons/close-icon.mjs +18 -1
  5. package/dist/assets/icons/close.mjs +14 -1
  6. package/dist/assets/icons/common/collect_nor.mjs +21 -1
  7. package/dist/assets/icons/common/collect_sel.mjs +21 -1
  8. package/dist/assets/icons/common/follow_sel.mjs +17 -1
  9. package/dist/assets/icons/common/follow_user.mjs +17 -1
  10. package/dist/assets/icons/common/full_screen.mjs +17 -1
  11. package/dist/assets/icons/common/god_comment.mjs +17 -1
  12. package/dist/assets/icons/common/header-menu.mjs +29 -1
  13. package/dist/assets/icons/common/header-search-icon.mjs +17 -1
  14. package/dist/assets/icons/common/heart-like.mjs +31 -1
  15. package/dist/assets/icons/common/heart-unlike.mjs +18 -1
  16. package/dist/assets/icons/common/qq.mjs +32 -1
  17. package/dist/assets/icons/common/right_arrow.mjs +14 -1
  18. package/dist/assets/icons/common/right_arrow_thin.mjs +17 -1
  19. package/dist/assets/icons/common/share.mjs +17 -1
  20. package/dist/assets/icons/common/solid-arrow.mjs +17 -1
  21. package/dist/assets/icons/common/video_play.mjs +18 -1
  22. package/dist/assets/icons/common/wechat-friends.mjs +40 -1
  23. package/dist/assets/icons/common/wechat.mjs +39 -1
  24. package/dist/assets/icons/detail/check-ok.mjs +17 -1
  25. package/dist/assets/icons/detail/comment.mjs +19 -1
  26. package/dist/assets/icons/detail/commet_at.mjs +53 -1
  27. package/dist/assets/icons/detail/give_like.mjs +20 -1
  28. package/dist/assets/icons/detail/give_like_sel.mjs +27 -1
  29. package/dist/assets/icons/detail/min-collection.mjs +38 -1
  30. package/dist/assets/icons/detail/publish_pic.mjs +27 -1
  31. package/dist/assets/icons/detail/publish_video.mjs +30 -1
  32. package/dist/assets/icons/detail/un_like.mjs +20 -1
  33. package/dist/assets/icons/detail/un_like_sel.mjs +27 -1
  34. package/dist/assets/icons/detail/video_flag.mjs +17 -1
  35. package/dist/assets/icons/detail/video_play.mjs +18 -1
  36. package/dist/assets/icons/dislike.mjs +20 -1
  37. package/dist/assets/icons/dislike_sel.mjs +27 -1
  38. package/dist/assets/icons/empty/img-empty-adduser.mjs +463 -1
  39. package/dist/assets/icons/empty/img-empty-nodata.mjs +194 -1
  40. package/dist/assets/icons/eye-icon.mjs +21 -1
  41. package/dist/assets/icons/eye-off-icon.mjs +24 -1
  42. package/dist/assets/icons/filter_dark.mjs +17 -1
  43. package/dist/assets/icons/follow_nor.mjs +44 -1
  44. package/dist/assets/icons/follow_sel.mjs +31 -1
  45. package/dist/assets/icons/left-arrow-icon.mjs +18 -1
  46. package/dist/assets/icons/left_arrow.mjs +14 -1
  47. package/dist/assets/icons/like.mjs +20 -1
  48. package/dist/assets/icons/like_sel.mjs +27 -1
  49. package/dist/assets/icons/marquee-close.mjs +29 -1
  50. package/dist/assets/icons/marquee-enter.mjs +17 -1
  51. package/dist/assets/icons/marquee-speaker.mjs +22 -1
  52. package/dist/assets/icons/publish/publish_add.mjs +17 -1
  53. package/dist/assets/icons/publish/publish_at.mjs +53 -1
  54. package/dist/assets/icons/publish/publish_collection.mjs +28 -1
  55. package/dist/assets/icons/publish/publish_pic.mjs +27 -1
  56. package/dist/assets/icons/publish/publish_video.mjs +30 -1
  57. package/dist/assets/icons/refresh.mjs +18 -1
  58. package/dist/assets/icons/search/filter.mjs +17 -1
  59. package/dist/assets/icons/search.mjs +23 -1
  60. package/dist/assets/icons/share/share-link.mjs +39 -1
  61. package/dist/assets/icons/tabs/follow.mjs +20 -1
  62. package/dist/assets/icons/tabs/follow_active.mjs +17 -1
  63. package/dist/assets/icons/tabs/home.mjs +17 -1
  64. package/dist/assets/icons/tabs/home_active.mjs +17 -1
  65. package/dist/assets/icons/tabs/mine.mjs +26 -1
  66. package/dist/assets/icons/tabs/mine_active.mjs +17 -1
  67. package/dist/assets/icons/view.mjs +17 -1
  68. package/dist/assets/images/add.mjs +5 -1
  69. package/dist/assets/images/default_avatar.mjs +5 -1
  70. package/dist/assets/images/default_collection_cover.mjs +5 -1
  71. package/dist/assets/images/empty/img_empty_adduser.mjs +463 -1
  72. package/dist/assets/images/empty/img_empty_message.mjs +408 -1
  73. package/dist/assets/images/empty/img_empty_network.mjs +168 -1
  74. package/dist/assets/images/empty/img_empty_nodata.mjs +194 -1
  75. package/dist/assets/images/empty/img_empty_picture.mjs +59 -1
  76. package/dist/assets/images/empty/img_empty_search.mjs +250 -1
  77. package/dist/assets/images/frame.mjs +5 -1
  78. package/dist/assets/images/less.mjs +5 -1
  79. package/dist/assets/images/logo.mjs +5 -1
  80. package/dist/assets/images/shortcut-grid/shortcut-grid-card-bg-primary.mjs +29 -1
  81. package/dist/assets/images/subscript.mjs +5 -1
  82. package/dist/assets/images/user/default_avatar.mjs +5 -1
  83. package/dist/biz.mjs +169 -1
  84. package/dist/cli/init/create-client.mjs +12 -1
  85. package/dist/cli/init/create-sdk.mjs +12 -1
  86. package/dist/cli/init/shared/command.mjs +31 -1
  87. package/dist/cli/init/shared/constants.mjs +24 -1
  88. package/dist/cli/init/shared/create-project.mjs +58 -2
  89. package/dist/cli/init/shared/file.mjs +21 -1
  90. package/dist/cli/init/shared/package-manager.mjs +42 -1
  91. package/dist/cli/init/shared/prompts.mjs +107 -1
  92. package/dist/cli/init/shared/template.mjs +66 -1
  93. package/dist/cli.mjs +128 -2
  94. package/dist/common.mjs +51 -1
  95. package/dist/components/biz/basics/card-item/defaults/default-props.mjs +10 -1
  96. package/dist/components/biz/basics/card-item/runtime/client.mjs +83 -1
  97. package/dist/components/biz/basics/card-item/runtime/corners.mjs +33 -1
  98. package/dist/components/biz/basics/card-item/schema/component.mjs +14 -1
  99. package/dist/components/biz/basics/card-item/schema/data.schema.mjs +8 -1
  100. package/dist/components/biz/basics/card-item/schema/event.schema.mjs +8 -1
  101. package/dist/components/biz/basics/card-item/schema/index.mjs +17 -1
  102. package/dist/components/biz/basics/card-item/schema/props.schema.mjs +18 -1
  103. package/dist/components/biz/basics/card-item/schema/style.schema.mjs +7 -1
  104. package/dist/components/biz/basics/card-layout/defaults/default-props.mjs +13 -1
  105. package/dist/components/biz/basics/card-layout/runtime/client.mjs +38 -1
  106. package/dist/components/biz/basics/card-layout/schema/component.mjs +14 -1
  107. package/dist/components/biz/basics/card-layout/schema/data.schema.mjs +8 -1
  108. package/dist/components/biz/basics/card-layout/schema/event.schema.mjs +5 -1
  109. package/dist/components/biz/basics/card-layout/schema/index.mjs +17 -1
  110. package/dist/components/biz/basics/card-layout/schema/props.schema.mjs +28 -1
  111. package/dist/components/biz/basics/card-layout/schema/style.schema.mjs +7 -1
  112. package/dist/components/biz/basics/fullscreen-feed/basic-fullscreen.mjs +268 -1
  113. package/dist/components/biz/basics/fullscreen-feed/defaults/default-props.mjs +11 -1
  114. package/dist/components/biz/basics/fullscreen-feed/index.mjs +12 -1
  115. package/dist/components/biz/basics/fullscreen-feed/runtime/adapters.mjs +97 -1
  116. package/dist/components/biz/basics/fullscreen-feed/runtime/bottom-info.mjs +125 -1
  117. package/dist/components/biz/basics/fullscreen-feed/runtime/client.mjs +390 -1
  118. package/dist/components/biz/basics/fullscreen-feed/runtime/comment-modal.mjs +107 -1
  119. package/dist/components/biz/basics/fullscreen-feed/runtime/interaction-sync.mjs +134 -1
  120. package/dist/components/biz/basics/fullscreen-feed/runtime/post-slide.mjs +232 -1
  121. package/dist/components/biz/basics/fullscreen-feed/runtime/styles.module.mjs +25 -152
  122. package/dist/components/biz/basics/fullscreen-feed/runtime/use-mixed-feed-controller.mjs +193 -1
  123. package/dist/components/biz/basics/fullscreen-feed/runtime/use-series-feed-controller.mjs +212 -1
  124. package/dist/components/biz/basics/fullscreen-feed/runtime/user-action.mjs +270 -1
  125. package/dist/components/biz/basics/fullscreen-feed/runtime/video-slide.mjs +376 -1
  126. package/dist/components/biz/basics/fullscreen-feed/schema/component.mjs +14 -1
  127. package/dist/components/biz/basics/fullscreen-feed/schema/data.schema.mjs +11 -1
  128. package/dist/components/biz/basics/fullscreen-feed/schema/event.schema.mjs +13 -1
  129. package/dist/components/biz/basics/fullscreen-feed/schema/index.mjs +17 -1
  130. package/dist/components/biz/basics/fullscreen-feed/schema/props.schema.mjs +20 -1
  131. package/dist/components/biz/basics/fullscreen-feed/schema/style.schema.mjs +5 -1
  132. package/dist/components/biz/basics/logo/variants/basic-logo/defaults/default-props.mjs +19 -1
  133. package/dist/components/biz/basics/logo/variants/basic-logo/index.mjs +9 -1
  134. package/dist/components/biz/basics/logo/variants/basic-logo/runtime/client.mjs +171 -1
  135. package/dist/components/biz/basics/logo/variants/basic-logo/schema/component.mjs +14 -1
  136. package/dist/components/biz/basics/logo/variants/basic-logo/schema/data.schema.mjs +9 -1
  137. package/dist/components/biz/basics/logo/variants/basic-logo/schema/event.schema.mjs +23 -1
  138. package/dist/components/biz/basics/logo/variants/basic-logo/schema/index.mjs +17 -1
  139. package/dist/components/biz/basics/logo/variants/basic-logo/schema/props.schema.mjs +78 -1
  140. package/dist/components/biz/basics/logo/variants/basic-logo/schema/style.schema.mjs +7 -1
  141. package/dist/components/biz/basics/search/shared/components/search-box.mjs +56 -1
  142. package/dist/components/biz/basics/search/shared/config/default-data.mjs +15 -1
  143. package/dist/components/biz/basics/search/shared/config/schema.mjs +50 -1
  144. package/dist/components/biz/basics/search/variants/basic-search/defaults/default-props.mjs +10 -1
  145. package/dist/components/biz/basics/search/variants/basic-search/index.mjs +12 -1
  146. package/dist/components/biz/basics/search/variants/basic-search/runtime/client.mjs +33 -1
  147. package/dist/components/biz/basics/search/variants/basic-search/schema/component.mjs +14 -1
  148. package/dist/components/biz/basics/search/variants/basic-search/schema/data.schema.mjs +8 -1
  149. package/dist/components/biz/basics/search/variants/basic-search/schema/event.schema.mjs +7 -1
  150. package/dist/components/biz/basics/search/variants/basic-search/schema/index.mjs +17 -1
  151. package/dist/components/biz/basics/search/variants/basic-search/schema/props.schema.mjs +7 -1
  152. package/dist/components/biz/basics/search/variants/basic-search/schema/style.schema.mjs +7 -1
  153. package/dist/components/biz/basics/search/variants/filter-search/defaults/default-props.mjs +14 -1
  154. package/dist/components/biz/basics/search/variants/filter-search/index.mjs +12 -1
  155. package/dist/components/biz/basics/search/variants/filter-search/runtime/client.mjs +63 -1
  156. package/dist/components/biz/basics/search/variants/filter-search/schema/component.mjs +14 -1
  157. package/dist/components/biz/basics/search/variants/filter-search/schema/data.schema.mjs +8 -1
  158. package/dist/components/biz/basics/search/variants/filter-search/schema/event.schema.mjs +7 -1
  159. package/dist/components/biz/basics/search/variants/filter-search/schema/index.mjs +17 -1
  160. package/dist/components/biz/basics/search/variants/filter-search/schema/props.schema.mjs +22 -1
  161. package/dist/components/biz/basics/search/variants/filter-search/schema/style.schema.mjs +7 -1
  162. package/dist/components/biz/basics/search/variants/simple-search/defaults/default-props.mjs +10 -1
  163. package/dist/components/biz/basics/search/variants/simple-search/index.mjs +9 -1
  164. package/dist/components/biz/basics/search/variants/simple-search/runtime/client.mjs +37 -1
  165. package/dist/components/biz/basics/search/variants/simple-search/schema/component.mjs +14 -1
  166. package/dist/components/biz/basics/search/variants/simple-search/schema/data.schema.mjs +8 -1
  167. package/dist/components/biz/basics/search/variants/simple-search/schema/event.schema.mjs +7 -1
  168. package/dist/components/biz/basics/search/variants/simple-search/schema/index.mjs +17 -1
  169. package/dist/components/biz/basics/search/variants/simple-search/schema/props.schema.mjs +7 -1
  170. package/dist/components/biz/basics/search/variants/simple-search/schema/style.schema.mjs +7 -1
  171. package/dist/components/biz/basics/search/variants/tag-search/defaults/default-props.mjs +18 -1
  172. package/dist/components/biz/basics/search/variants/tag-search/index.mjs +9 -1
  173. package/dist/components/biz/basics/search/variants/tag-search/runtime/client.mjs +67 -1
  174. package/dist/components/biz/basics/search/variants/tag-search/schema/component.mjs +14 -1
  175. package/dist/components/biz/basics/search/variants/tag-search/schema/data.schema.mjs +8 -1
  176. package/dist/components/biz/basics/search/variants/tag-search/schema/event.schema.mjs +7 -1
  177. package/dist/components/biz/basics/search/variants/tag-search/schema/index.mjs +17 -1
  178. package/dist/components/biz/basics/search/variants/tag-search/schema/props.schema.mjs +37 -1
  179. package/dist/components/biz/basics/search/variants/tag-search/schema/style.schema.mjs +7 -1
  180. package/dist/components/biz/business/advertisement/ad-match.mjs +142 -1
  181. package/dist/components/biz/business/advertisement/ad-provider.mjs +50 -1
  182. package/dist/components/biz/business/advertisement/ad-query.mjs +39 -1
  183. package/dist/components/biz/business/advertisement/ad-runtime-provider.mjs +21 -1
  184. package/dist/components/biz/business/advertisement/banner-ad/client.mjs +274 -1
  185. package/dist/components/biz/business/advertisement/banner-ad/material.mjs +21 -1
  186. package/dist/components/biz/business/advertisement/banner-ad/schema.mjs +55 -1
  187. package/dist/components/biz/business/advertisement/banner-ad/server.mjs +24 -1
  188. package/dist/components/biz/business/advertisement/feed-ad/index.mjs +36 -1
  189. package/dist/components/biz/business/advertisement/floating-ad/client.mjs +109 -1
  190. package/dist/components/biz/business/advertisement/floating-ad/material.mjs +21 -1
  191. package/dist/components/biz/business/advertisement/floating-ad/schema.mjs +11 -1
  192. package/dist/components/biz/business/advertisement/floating-ad/server.mjs +24 -1
  193. package/dist/components/biz/business/advertisement/icon-ad/client.mjs +187 -1
  194. package/dist/components/biz/business/advertisement/icon-ad/material.mjs +21 -1
  195. package/dist/components/biz/business/advertisement/icon-ad/schema.mjs +42 -1
  196. package/dist/components/biz/business/advertisement/icon-ad/server.mjs +24 -1
  197. package/dist/components/biz/business/advertisement/popup-ad/client.mjs +203 -2
  198. package/dist/components/biz/business/advertisement/popup-ad/material.mjs +21 -1
  199. package/dist/components/biz/business/advertisement/popup-ad/schema.mjs +48 -1
  200. package/dist/components/biz/business/advertisement/popup-ad/server.mjs +24 -1
  201. package/dist/components/biz/business/advertisement/text-ad/client.mjs +370 -1
  202. package/dist/components/biz/business/advertisement/text-ad/material.mjs +21 -1
  203. package/dist/components/biz/business/advertisement/text-ad/schema.mjs +34 -1
  204. package/dist/components/biz/business/advertisement/text-ad/server.mjs +24 -1
  205. package/dist/components/biz/business/banner/variants/basic-banner/defaults/default-props.mjs +15 -1
  206. package/dist/components/biz/business/banner/variants/basic-banner/index.mjs +12 -1
  207. package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.mjs +62 -1
  208. package/dist/components/biz/business/banner/variants/basic-banner/material.mjs +21 -1
  209. package/dist/components/biz/business/banner/variants/basic-banner/runtime/client.mjs +140 -1
  210. package/dist/components/biz/business/banner/variants/basic-banner/schema/component.mjs +14 -1
  211. package/dist/components/biz/business/banner/variants/basic-banner/schema/data.schema.mjs +53 -1
  212. package/dist/components/biz/business/banner/variants/basic-banner/schema/event.schema.mjs +5 -1
  213. package/dist/components/biz/business/banner/variants/basic-banner/schema/index.mjs +17 -1
  214. package/dist/components/biz/business/banner/variants/basic-banner/schema/props.schema.mjs +40 -1
  215. package/dist/components/biz/business/banner/variants/basic-banner/schema/style.schema.mjs +7 -1
  216. package/dist/components/biz/business/banner/variants/basic-banner/server.mjs +25 -1
  217. package/dist/components/biz/business/banner-carousel/client.mjs +133 -1
  218. package/dist/components/biz/business/banner-carousel/default-props.mjs +15 -1
  219. package/dist/components/biz/business/banner-carousel/material.mjs +22 -1
  220. package/dist/components/biz/business/banner-carousel/schema.mjs +94 -1
  221. package/dist/components/biz/business/banner-carousel/server.mjs +87 -1
  222. package/dist/components/biz/business/card-grid/variants/card-grid-2x3/defaults/default-props.mjs +8 -1
  223. package/dist/components/biz/business/card-grid/variants/card-grid-2x3/index.mjs +9 -1
  224. package/dist/components/biz/business/card-grid/variants/card-grid-2x3/runtime/client.mjs +41 -1
  225. package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/component.mjs +14 -1
  226. package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/data.schema.mjs +8 -1
  227. package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/event.schema.mjs +5 -1
  228. package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/index.mjs +17 -1
  229. package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/props.schema.mjs +12 -1
  230. package/dist/components/biz/business/card-grid/variants/card-grid-2x3/schema/style.schema.mjs +7 -1
  231. package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/defaults/default-props.mjs +8 -1
  232. package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/index.mjs +9 -1
  233. package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/runtime/client.mjs +106 -1
  234. package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/component.mjs +14 -1
  235. package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/data.schema.mjs +8 -1
  236. package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/event.schema.mjs +5 -1
  237. package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/index.mjs +17 -1
  238. package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/props.schema.mjs +12 -1
  239. package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/style.schema.mjs +7 -1
  240. package/dist/components/biz/business/card-grid/variants/card-grid-2x4/defaults/default-props.mjs +8 -1
  241. package/dist/components/biz/business/card-grid/variants/card-grid-2x4/index.mjs +9 -1
  242. package/dist/components/biz/business/card-grid/variants/card-grid-2x4/runtime/client.mjs +41 -1
  243. package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/component.mjs +14 -1
  244. package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/data.schema.mjs +8 -1
  245. package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/event.schema.mjs +5 -1
  246. package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/index.mjs +17 -1
  247. package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/props.schema.mjs +12 -1
  248. package/dist/components/biz/business/card-grid/variants/card-grid-2x4/schema/style.schema.mjs +7 -1
  249. package/dist/components/biz/business/card-grid/variants/card-grid-3x3/defaults/default-props.mjs +8 -1
  250. package/dist/components/biz/business/card-grid/variants/card-grid-3x3/index.mjs +9 -1
  251. package/dist/components/biz/business/card-grid/variants/card-grid-3x3/runtime/client.mjs +41 -1
  252. package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/component.mjs +14 -1
  253. package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/data.schema.mjs +8 -1
  254. package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/event.schema.mjs +5 -1
  255. package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/index.mjs +17 -1
  256. package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/props.schema.mjs +12 -1
  257. package/dist/components/biz/business/card-grid/variants/card-grid-3x3/schema/style.schema.mjs +7 -1
  258. package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/defaults/default-props.mjs +8 -1
  259. package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/index.mjs +9 -1
  260. package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/runtime/client.mjs +106 -1
  261. package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/component.mjs +14 -1
  262. package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/data.schema.mjs +8 -1
  263. package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/event.schema.mjs +5 -1
  264. package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/index.mjs +17 -1
  265. package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/props.schema.mjs +12 -1
  266. package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/style.schema.mjs +7 -1
  267. package/dist/components/biz/business/channel-list/channel-filter-dialog.mjs +190 -1
  268. package/dist/components/biz/business/channel-list/client.mjs +157 -1
  269. package/dist/components/biz/business/channel-list/default-props.mjs +13 -1
  270. package/dist/components/biz/business/channel-list/material.mjs +21 -1
  271. package/dist/components/biz/business/channel-list/schema.mjs +40 -1
  272. package/dist/components/biz/business/comment/comment-input.mjs +772 -5
  273. package/dist/components/biz/business/comment/comment-item.mjs +182 -1
  274. package/dist/components/biz/business/comment/comment-list.mjs +722 -1
  275. package/dist/components/biz/business/comment/comment-media.mjs +57 -1
  276. package/dist/components/biz/business/comment/comment-rich-text.mjs +69 -1
  277. package/dist/components/biz/business/comment/reply-detail.mjs +969 -1
  278. package/dist/components/biz/business/comment/time-display.mjs +20 -1
  279. package/dist/components/biz/business/comment/use-keyboard-handler.mjs +142 -1
  280. package/dist/components/biz/business/contact/contact-item.mjs +45 -1
  281. package/dist/components/biz/business/contact/contact-list.mjs +212 -1
  282. package/dist/components/biz/business/contact/contact-search.mjs +128 -1
  283. package/dist/components/biz/business/detail/shared/detail-follow-action.mjs +114 -1
  284. package/dist/components/biz/business/detail/shared/detail-info-tags.mjs +33 -1
  285. package/dist/components/biz/business/detail/shared/detail-info-title.mjs +84 -1
  286. package/dist/components/biz/business/detail/shared/detail-operate.mjs +432 -1
  287. package/dist/components/biz/business/detail/shared/detail-structured-data.mjs +63 -1
  288. package/dist/components/biz/business/detail/shared/editor-preview.mjs +67 -1
  289. package/dist/components/biz/business/detail/shared/material-route-context.mjs +44 -1
  290. package/dist/components/biz/business/detail/shared/metadata-utils.mjs +21 -1
  291. package/dist/components/biz/business/detail/shared/post-recommend-list.mjs +184 -1
  292. package/dist/components/biz/business/detail/shared/registry.d.mts +7 -2
  293. package/dist/components/biz/business/detail/shared/registry.mjs +55 -1
  294. package/dist/components/biz/business/detail/shared/runtime-context-provider.mjs +225 -1
  295. package/dist/components/biz/business/detail/shared/seo-config.mjs +28 -1
  296. package/dist/components/biz/business/detail/shared/use-video-detail-webview-bridge.mjs +320 -1
  297. package/dist/components/biz/business/detail/shared/video-detail-server-data.mjs +46 -1
  298. package/dist/components/biz/business/detail/shared/video-hero.mjs +902 -1
  299. package/dist/components/biz/business/detail/video-detail-actions/client.mjs +97 -1
  300. package/dist/components/biz/business/detail/video-detail-actions/material.mjs +18 -1
  301. package/dist/components/biz/business/detail/video-detail-actions/schema.mjs +11 -1
  302. package/dist/components/biz/business/detail/video-detail-actions/server.mjs +47 -1
  303. package/dist/components/biz/business/detail/video-detail-info/client.mjs +201 -1
  304. package/dist/components/biz/business/detail/video-detail-info/material.mjs +18 -1
  305. package/dist/components/biz/business/detail/video-detail-info/schema.mjs +14 -1
  306. package/dist/components/biz/business/detail/video-detail-info/server.mjs +45 -1
  307. package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/client.mjs +51 -1
  308. package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/material.mjs +18 -1
  309. package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/schema.mjs +14 -1
  310. package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/server.mjs +45 -1
  311. package/dist/components/biz/business/detail/video-detail-player/client.mjs +136 -1
  312. package/dist/components/biz/business/detail/video-detail-player/material.mjs +18 -1
  313. package/dist/components/biz/business/detail/video-detail-player/schema.mjs +11 -1
  314. package/dist/components/biz/business/detail/video-detail-player/server.mjs +17 -1
  315. package/dist/components/biz/business/detail/video-detail-player-bridge-only/client.mjs +17 -1
  316. package/dist/components/biz/business/detail/video-detail-player-bridge-only/material.mjs +18 -1
  317. package/dist/components/biz/business/detail/video-detail-player-bridge-only/schema.mjs +13 -1
  318. package/dist/components/biz/business/detail/video-detail-player-bridge-only/server.mjs +17 -1
  319. package/dist/components/biz/business/detail/video-detail-recommend/client.d.mts +10 -2
  320. package/dist/components/biz/business/detail/video-detail-recommend/client.mjs +89 -1
  321. package/dist/components/biz/business/detail/video-detail-recommend/index.d.mts +1 -1
  322. package/dist/components/biz/business/detail/video-detail-recommend/material.d.mts +7 -2
  323. package/dist/components/biz/business/detail/video-detail-recommend/material.mjs +18 -1
  324. package/dist/components/biz/business/detail/video-detail-recommend/schema.d.mts +7 -2
  325. package/dist/components/biz/business/detail/video-detail-recommend/schema.mjs +35 -1
  326. package/dist/components/biz/business/detail/video-detail-recommend/server.d.mts +1 -1
  327. package/dist/components/biz/business/detail/video-detail-recommend/server.mjs +35 -1
  328. package/dist/components/biz/business/detail/video-detail-recommend/shared.mjs +548 -1
  329. package/dist/components/biz/business/detail/video-detail-recommend/utils.mjs +60 -1
  330. package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/defaults/default-props.mjs +12 -1
  331. package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/index.mjs +9 -1
  332. package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/runtime/client.mjs +66 -1
  333. package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/component.mjs +14 -1
  334. package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/data.schema.mjs +43 -1
  335. package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/event.schema.mjs +5 -1
  336. package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/index.mjs +17 -1
  337. package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/props.schema.mjs +32 -1
  338. package/dist/components/biz/business/feature-grid/variants/basic-feature-grid/schema/style.schema.mjs +7 -1
  339. package/dist/components/biz/business/floating-ball/client.mjs +31 -1
  340. package/dist/components/biz/business/floating-ball/material.mjs +18 -1
  341. package/dist/components/biz/business/floating-ball/schema.mjs +20 -1
  342. package/dist/components/biz/business/floating-ball/server.mjs +17 -1
  343. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/defaults/default-props.mjs +11 -1
  344. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/index.mjs +9 -1
  345. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/runtime/client.mjs +71 -1
  346. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/schema/component.mjs +14 -1
  347. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/schema/data.schema.mjs +11 -1
  348. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/schema/index.mjs +17 -1
  349. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/defaults/default-props.mjs +11 -1
  350. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/index.mjs +9 -1
  351. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/runtime/client.mjs +64 -1
  352. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/schema/component.mjs +14 -1
  353. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/schema/data.schema.mjs +11 -1
  354. package/dist/components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/schema/index.mjs +17 -1
  355. package/dist/components/biz/business/fullscreen-feed/variants/shared/runtime-compat.mjs +522 -1
  356. package/dist/components/biz/business/header-search/header-avatar-icon/client.mjs +21 -1
  357. package/dist/components/biz/business/header-search/header-avatar-icon/material.mjs +18 -1
  358. package/dist/components/biz/business/header-search/header-avatar-icon/schema.mjs +11 -1
  359. package/dist/components/biz/business/header-search/header-avatar-icon/server.mjs +17 -1
  360. package/dist/components/biz/business/header-search/header-avatar-logo-search/client.mjs +142 -1
  361. package/dist/components/biz/business/header-search/header-avatar-logo-search/material.mjs +18 -1
  362. package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.mjs +23 -1
  363. package/dist/components/biz/business/header-search/header-avatar-logo-search/server.mjs +17 -1
  364. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/client.mjs +38 -1
  365. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/material.mjs +18 -1
  366. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/schema.mjs +20 -1
  367. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/server.mjs +17 -1
  368. package/dist/components/biz/business/header-search/header-logo-search/client.mjs +32 -1
  369. package/dist/components/biz/business/header-search/header-logo-search/material.mjs +18 -1
  370. package/dist/components/biz/business/header-search/header-logo-search/schema.mjs +22 -1
  371. package/dist/components/biz/business/header-search/header-logo-search/server.mjs +17 -1
  372. package/dist/components/biz/business/header-search/header-search/client.mjs +19 -1
  373. package/dist/components/biz/business/header-search/header-search/material.mjs +18 -1
  374. package/dist/components/biz/business/header-search/header-search/schema.mjs +11 -1
  375. package/dist/components/biz/business/header-search/header-search/server.mjs +17 -1
  376. package/dist/components/biz/business/header-search/shared/avatar.mjs +53 -1
  377. package/dist/components/biz/business/header-search/shared/header-action.mjs +29 -1
  378. package/dist/components/biz/business/header-search/shared/header-search-icon.mjs +26 -1
  379. package/dist/components/biz/business/header-search/shared/header-shell.mjs +21 -1
  380. package/dist/components/biz/business/header-search/shared/logo.mjs +25 -1
  381. package/dist/components/biz/business/header-search/shared/search.mjs +47 -1
  382. package/dist/components/biz/business/home-recommend/home-recommend-grid/client.d.mts +1 -1
  383. package/dist/components/biz/business/home-recommend/home-recommend-grid/client.mjs +48 -1
  384. package/dist/components/biz/business/home-recommend/home-recommend-grid/index.mjs +14 -1
  385. package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.mjs +229 -1
  386. package/dist/components/biz/business/home-recommend/home-recommend-grid/material.mjs +18 -1
  387. package/dist/components/biz/business/home-recommend/home-recommend-grid/schema.mjs +24 -1
  388. package/dist/components/biz/business/home-recommend/home-recommend-grid/server.mjs +48 -1
  389. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/client.d.mts +3 -1
  390. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/client.mjs +47 -1
  391. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/index.mjs +14 -1
  392. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.mjs +211 -1
  393. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/material.mjs +18 -1
  394. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/schema.mjs +24 -1
  395. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/server.mjs +42 -1
  396. package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +890 -1
  397. package/dist/components/biz/business/home-recommend/shared/home-recommend-default-config.mjs +24 -1
  398. package/dist/components/biz/business/home-recommend/shared/home-recommend-play-count.mjs +31 -1
  399. package/dist/components/biz/business/home-recommend/shared/home-recommend-preview.mjs +178 -1
  400. package/dist/components/biz/business/home-recommend/shared/home-recommend-runtime-props.mjs +47 -1
  401. package/dist/components/biz/business/home-recommend/shared/home-recommend-server-data.mjs +336 -1
  402. package/dist/components/biz/business/home-recommend/shared/home-recommend-smart-layout.mjs +73 -1
  403. package/dist/components/biz/business/home-recommend/shared/home-recommend-smart-tag.mjs +21 -1
  404. package/dist/components/biz/business/home-recommend/shared/home-recommend-video-detail.mjs +73 -1
  405. package/dist/components/biz/business/image-text-recommend/client.mjs +436 -1
  406. package/dist/components/biz/business/image-text-recommend/material.mjs +21 -1
  407. package/dist/components/biz/business/image-text-recommend/schema.mjs +79 -1
  408. package/dist/components/biz/business/image-text-recommend/server.mjs +53 -1
  409. package/dist/components/biz/business/image-text-recommend/shared/query.mjs +33 -1
  410. package/dist/components/biz/business/large-feature-grid/card-item.mjs +106 -1
  411. package/dist/components/biz/business/large-feature-grid/client.mjs +256 -1
  412. package/dist/components/biz/business/large-feature-grid/material.mjs +21 -1
  413. package/dist/components/biz/business/large-feature-grid/schema.mjs +127 -1
  414. package/dist/components/biz/business/large-feature-grid/server.mjs +16 -1
  415. package/dist/components/biz/business/marquee/client.mjs +303 -1
  416. package/dist/components/biz/business/marquee/material.mjs +21 -1
  417. package/dist/components/biz/business/marquee/schema.mjs +86 -1
  418. package/dist/components/biz/business/marquee/server.mjs +17 -1
  419. package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/defaults/default-props.mjs +21 -1
  420. package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/index.mjs +9 -1
  421. package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/runtime/channel-filter-dialog.mjs +180 -1
  422. package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/runtime/client.mjs +159 -1
  423. package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/component.mjs +14 -1
  424. package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/data.schema.mjs +9 -1
  425. package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/event.schema.mjs +27 -1
  426. package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/index.mjs +17 -1
  427. package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/props.schema.mjs +92 -1
  428. package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/schema/style.schema.mjs +7 -1
  429. package/dist/components/biz/business/post-card/variants/basic-post-card/defaults/default-props.mjs +8 -1
  430. package/dist/components/biz/business/post-card/variants/basic-post-card/index.mjs +9 -1
  431. package/dist/components/biz/business/post-card/variants/basic-post-card/runtime/client.mjs +119 -1
  432. package/dist/components/biz/business/post-card/variants/basic-post-card/schema/component.mjs +14 -1
  433. package/dist/components/biz/business/post-card/variants/basic-post-card/schema/data.schema.mjs +8 -1
  434. package/dist/components/biz/business/post-card/variants/basic-post-card/schema/event.schema.mjs +5 -1
  435. package/dist/components/biz/business/post-card/variants/basic-post-card/schema/index.mjs +17 -1
  436. package/dist/components/biz/business/post-card/variants/basic-post-card/schema/props.schema.mjs +5 -1
  437. package/dist/components/biz/business/post-card/variants/basic-post-card/schema/style.schema.mjs +7 -1
  438. package/dist/components/biz/business/profile/profile-header/client.mjs +343 -1
  439. package/dist/components/biz/business/profile/profile-header/material.mjs +59 -1
  440. package/dist/components/biz/business/profile/profile-header/schema.mjs +11 -1
  441. package/dist/components/biz/business/profile/profile-header/user-profile-avatar.mjs +262 -1
  442. package/dist/components/biz/business/profile/profile-header/user-profile-cover-background.mjs +182 -1
  443. package/dist/components/biz/business/profile/profile-main/client.mjs +235 -1
  444. package/dist/components/biz/business/profile/profile-main/empty-state.mjs +43 -1
  445. package/dist/components/biz/business/profile/profile-main/material.mjs +18 -1
  446. package/dist/components/biz/business/profile/profile-main/schema.mjs +11 -1
  447. package/dist/components/biz/business/profile/profile-main/server.mjs +13 -1
  448. package/dist/components/biz/business/profile/profile-main/shell.mjs +275 -1
  449. package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/client.mjs +747 -1
  450. package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/server.mjs +13 -1
  451. package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/video-waterfall.mjs +178 -1
  452. package/dist/components/biz/business/profile/profile-main/tabs/history-tab/client.mjs +259 -1
  453. package/dist/components/biz/business/profile/profile-main/tabs/history-tab/server.mjs +13 -1
  454. package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.mjs +258 -1
  455. package/dist/components/biz/business/profile/profile-main/tabs/like-tab/server.mjs +13 -1
  456. package/dist/components/biz/business/profile/profile-main/tabs/publish-tab/client.mjs +149 -1
  457. package/dist/components/biz/business/profile/profile-main/tabs/publish-tab/server.mjs +13 -1
  458. package/dist/components/biz/business/profile/profile-main/utils.mjs +266 -1
  459. package/dist/components/biz/business/profile/profile-main/variants.mjs +40 -1
  460. package/dist/components/biz/business/profile/tracking.mjs +19 -1
  461. package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/defaults/default-props.mjs +15 -1
  462. package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/index.mjs +9 -1
  463. package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/runtime/client.mjs +168 -1
  464. package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/runtime/recommended-users-skeleton.mjs +119 -1
  465. package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/component.mjs +14 -1
  466. package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/data.schema.mjs +9 -1
  467. package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/event.schema.mjs +17 -1
  468. package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/index.mjs +17 -1
  469. package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/props.schema.mjs +54 -1
  470. package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/schema/style.schema.mjs +7 -1
  471. package/dist/components/biz/business/search-bar/variants/basic-search-bar/defaults/default-props.mjs +15 -1
  472. package/dist/components/biz/business/search-bar/variants/basic-search-bar/index.mjs +9 -1
  473. package/dist/components/biz/business/search-bar/variants/basic-search-bar/runtime/client.mjs +54 -1
  474. package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/component.mjs +14 -1
  475. package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/data.schema.mjs +9 -1
  476. package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/event.schema.mjs +5 -1
  477. package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/index.mjs +17 -1
  478. package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/props.schema.mjs +117 -1
  479. package/dist/components/biz/business/search-bar/variants/basic-search-bar/schema/style.schema.mjs +7 -1
  480. package/dist/components/biz/business/search-bar/variants/detail-search-bar/defaults/default-props.mjs +22 -1
  481. package/dist/components/biz/business/search-bar/variants/detail-search-bar/index.mjs +9 -1
  482. package/dist/components/biz/business/search-bar/variants/detail-search-bar/runtime/client.mjs +53 -1
  483. package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/component.mjs +14 -1
  484. package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/data.schema.mjs +9 -1
  485. package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/event.schema.mjs +5 -1
  486. package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/index.mjs +17 -1
  487. package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/props.schema.mjs +117 -1
  488. package/dist/components/biz/business/search-bar/variants/detail-search-bar/schema/style.schema.mjs +7 -1
  489. package/dist/components/biz/business/search-bar/variants/filter-search-bar/defaults/default-props.mjs +15 -1
  490. package/dist/components/biz/business/search-bar/variants/filter-search-bar/index.mjs +9 -1
  491. package/dist/components/biz/business/search-bar/variants/filter-search-bar/runtime/client.mjs +52 -1
  492. package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/component.mjs +14 -1
  493. package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/data.schema.mjs +9 -1
  494. package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/event.schema.mjs +25 -1
  495. package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/index.mjs +17 -1
  496. package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/props.schema.mjs +128 -1
  497. package/dist/components/biz/business/search-bar/variants/filter-search-bar/schema/style.schema.mjs +7 -1
  498. package/dist/components/biz/business/search-bar/variants/tag-search-bar/defaults/default-props.mjs +15 -1
  499. package/dist/components/biz/business/search-bar/variants/tag-search-bar/index.mjs +12 -1
  500. package/dist/components/biz/business/search-bar/variants/tag-search-bar/runtime/client.mjs +58 -1
  501. package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/component.mjs +14 -1
  502. package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/data.schema.mjs +9 -1
  503. package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/event.schema.mjs +38 -1
  504. package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/index.mjs +17 -1
  505. package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/props.schema.mjs +144 -1
  506. package/dist/components/biz/business/search-bar/variants/tag-search-bar/schema/style.schema.mjs +7 -1
  507. package/dist/components/biz/business/search-history/client.mjs +182 -1
  508. package/dist/components/biz/business/search-history/material.mjs +18 -1
  509. package/dist/components/biz/business/search-history/schema.mjs +16 -1
  510. package/dist/components/biz/business/search-history/server.mjs +17 -1
  511. package/dist/components/biz/business/search-input/client.mjs +115 -1
  512. package/dist/components/biz/business/search-input/material.mjs +18 -1
  513. package/dist/components/biz/business/search-input/schema.mjs +11 -1
  514. package/dist/components/biz/business/search-input/server.mjs +17 -1
  515. package/dist/components/biz/business/shortcut-grid/client.mjs +86 -1
  516. package/dist/components/biz/business/shortcut-grid/material.mjs +18 -1
  517. package/dist/components/biz/business/shortcut-grid/schema.mjs +65 -1
  518. package/dist/components/biz/business/shortcut-grid/server.mjs +17 -1
  519. package/dist/components/biz/business/tab-bar/client.mjs +157 -1
  520. package/dist/components/biz/business/tab-bar/material.mjs +21 -1
  521. package/dist/components/biz/business/tab-bar/schema.mjs +11 -1
  522. package/dist/components/biz/business/tab-bar/server.mjs +17 -1
  523. package/dist/components/biz/business/text-recommend/client.mjs +104 -1
  524. package/dist/components/biz/business/text-recommend/material.mjs +18 -1
  525. package/dist/components/biz/business/text-recommend/schema.mjs +25 -1
  526. package/dist/components/biz/business/text-recommend/server.mjs +18 -1
  527. package/dist/components/biz/example/button/client.mjs +43 -1
  528. package/dist/components/biz/example/button/material.mjs +18 -1
  529. package/dist/components/biz/example/button/schema.mjs +44 -1
  530. package/dist/components/biz/example/button/server.mjs +32 -1
  531. package/dist/components/biz/example/button/variants.mjs +22 -1
  532. package/dist/components/biz/renderer/renderer.mjs +73 -1
  533. package/dist/components/biz/utils/constants/card-spec.mjs +48 -1
  534. package/dist/components/biz/utils/helpers/get-channel-list.mjs +14 -1
  535. package/dist/components/biz/utils/helpers/url.mjs +16 -1
  536. package/dist/components/biz/utils/schema/data.mjs +22 -1
  537. package/dist/components/biz/utils/styles/helpers.mjs +84 -1
  538. package/dist/components/biz/utils/styles/schema.mjs +306 -1
  539. package/dist/components/biz/utils/transformers/card-grid.mjs +67 -1
  540. package/dist/components/biz/utils/transformers/data.mjs +171 -1
  541. package/dist/components/common/analytics-init/analytics-init.mjs +75 -1
  542. package/dist/components/common/analytics-init/page-lifecycle-tracker.mjs +248 -1
  543. package/dist/components/common/analytics-init/sensor-init.mjs +126 -1
  544. package/dist/components/common/at-element/index.mjs +47 -1
  545. package/dist/components/common/background-preview-modal/background-preview-modal.mjs +73 -1
  546. package/dist/components/common/blocked-dialog/blocked-dialog.mjs +54 -1
  547. package/dist/components/common/cards/mini-three-card.mjs +55 -1
  548. package/dist/components/common/cards/style.module.mjs +12 -24
  549. package/dist/components/common/collection-popup/create-collection-sheet.mjs +271 -1
  550. package/dist/components/common/collection-popup/index.mjs +293 -1
  551. package/dist/components/common/debug-locale-switcher/index.mjs +59 -1
  552. package/dist/components/common/delete-confirm-dialog/delete-confirm-dialog.mjs +66 -1
  553. package/dist/components/common/empty/index.mjs +51 -1
  554. package/dist/components/common/follow-button/index.mjs +133 -1
  555. package/dist/components/common/follow-button/unfollow-confirm-dialog.mjs +23 -1
  556. package/dist/components/common/funhub-provider/funhub-provider.mjs +50 -1
  557. package/dist/components/common/header-nav/client.mjs +51 -1
  558. package/dist/components/common/icons/add.mjs +21 -1
  559. package/dist/components/common/icons/comment.mjs +30 -1
  560. package/dist/components/common/icons/delete.mjs +32 -1
  561. package/dist/components/common/icons/left-arrow.mjs +15 -1
  562. package/dist/components/common/icons/more.mjs +30 -1
  563. package/dist/components/common/icons/right-arrow.mjs +19 -1
  564. package/dist/components/common/icons/setting.mjs +27 -1
  565. package/dist/components/common/icons/share.mjs +20 -1
  566. package/dist/components/common/icons/video.mjs +22 -1
  567. package/dist/components/common/image-crop-modal/image-crop-modal.mjs +128 -2
  568. package/dist/components/common/info-card/card-header.mjs +71 -1
  569. package/dist/components/common/info-card/card-text.mjs +49 -1
  570. package/dist/components/common/interaction-animations.module.mjs +14 -84
  571. package/dist/components/common/intl-provider/intl-provider.mjs +21 -1
  572. package/dist/components/common/keep-scroll-position/index.mjs +39 -1
  573. package/dist/components/common/list/collection-list/collection-list-item.mjs +139 -1
  574. package/dist/components/common/list/collection-list/collection-list.mjs +27 -1
  575. package/dist/components/common/list/collection-list/collection-select-icon.mjs +53 -1
  576. package/dist/components/common/list/post-list/post-list-item.mjs +54 -1
  577. package/dist/components/common/list/post-list/post-list.mjs +143 -1
  578. package/dist/components/common/list/user-activity-list/user-activity-list-actions.mjs +269 -1
  579. package/dist/components/common/list/user-activity-list/user-activity-list-item.mjs +469 -1
  580. package/dist/components/common/list/user-activity-list/user-activity-list.mjs +143 -1
  581. package/dist/components/common/list/video-list/video-list-item.mjs +100 -1
  582. package/dist/components/common/list/video-list/video-list.mjs +152 -1
  583. package/dist/components/common/list/waterfall-recommend/recommend-badge-style.mjs +18 -1
  584. package/dist/components/common/list/waterfall-recommend/waterfall-recommend-display.mjs +26 -1
  585. package/dist/components/common/list/waterfall-recommend/waterfall-recommend.mjs +183 -1
  586. package/dist/components/common/locale-sync/locale-sync.mjs +62 -1
  587. package/dist/components/common/login-dialog/login-dialog.mjs +46 -1
  588. package/dist/components/common/media-preview/index.mjs +162 -1
  589. package/dist/components/common/media-preview/video-play.mjs +237 -1
  590. package/dist/components/common/page-loading/index.mjs +20 -1
  591. package/dist/components/common/page-skeleton/page-skeleton.mjs +7 -1
  592. package/dist/components/common/photo-grid/common-photo-grid.mjs +321 -1
  593. package/dist/components/common/photo-grid/index.mjs +226 -1
  594. package/dist/components/common/photo-preview/common-photo-preview.mjs +97 -1
  595. package/dist/components/common/photo-preview/decrypt-loading.mjs +66 -2
  596. package/dist/components/common/photo-preview/index.mjs +64 -1
  597. package/dist/components/common/photo-preview/style.mjs +7 -19
  598. package/dist/components/common/picker/gender-picker/gender-picker.mjs +66 -1
  599. package/dist/components/common/picker/picker-drawer/picker-drawer.mjs +78 -1
  600. package/dist/components/common/popup-video/index.mjs +98 -1
  601. package/dist/components/common/popup-video/popup-video.module.mjs +7 -16
  602. package/dist/components/common/series-episodes/index.mjs +826 -1
  603. package/dist/components/common/share-popup/share-content.mjs +155 -1
  604. package/dist/components/common/share-popup/share-drawer.mjs +100 -1
  605. package/dist/components/common/share-popup/share-popup.mjs +326 -1
  606. package/dist/components/common/skeleton/post-list-item-skeleton.mjs +99 -1
  607. package/dist/components/common/skeleton/user-activity-list-item-skeleton.mjs +146 -1
  608. package/dist/components/common/skeleton/video-list-item-skeleton.mjs +110 -1
  609. package/dist/components/common/tab-bar/index.mjs +150 -1
  610. package/dist/components/common/theme-sync/index.mjs +22 -1
  611. package/dist/components/common/top-nav-bar/client.mjs +70 -1
  612. package/dist/components/common/top-nav-bar/fullscreen.mjs +27 -1
  613. package/dist/components/common/top-nav-bar/index.mjs +29 -1
  614. package/dist/components/common/top-nav-bar/normal.mjs +20 -1
  615. package/dist/components/common/user-info-initializer/index.mjs +37 -1
  616. package/dist/components/common/video-player/create-video.mjs +27 -2
  617. package/dist/components/common/video-player/index.mjs +700 -5
  618. package/dist/components/common/video-player/playing-videos.mjs +73 -1
  619. package/dist/components/common/video-player/preroll-skip-button-content.mjs +20 -1
  620. package/dist/components/common/video-player/process-m3u8-cache.mjs +281 -1
  621. package/dist/components/common/video-player/style.module.mjs +7 -260
  622. package/dist/components/common/video-player/video-blind-ad-overlay.mjs +155 -1
  623. package/dist/components/common/video-player/video-player-ref-context.mjs +18 -1
  624. package/dist/components/common/video-player/video-preroll-ad-overlay.mjs +167 -1
  625. package/dist/components/common/video-player/video-preroll-ad.mjs +187 -1
  626. package/dist/components/common/wait-loading.mjs +119 -1
  627. package/dist/components/pages/(follow)/_components/follow-button/index.mjs +80 -1
  628. package/dist/components/pages/(follow)/_components/header-nav/index.mjs +13 -1
  629. package/dist/components/pages/(follow)/_components/interaction-tabs/index.mjs +44 -1
  630. package/dist/components/pages/(follow)/_components/user-list/index.mjs +139 -1
  631. package/dist/components/pages/(follow)/_components/user-list/user-list-item.mjs +46 -1
  632. package/dist/components/pages/(follow)/fans/index.mjs +10 -1
  633. package/dist/components/pages/(follow)/fans/page.mjs +95 -1
  634. package/dist/components/pages/(follow)/followed/index.mjs +10 -1
  635. package/dist/components/pages/(follow)/followed/page.mjs +95 -1
  636. package/dist/components/pages/collection-add/index.mjs +10 -1
  637. package/dist/components/pages/collection-add/page.mjs +164 -1
  638. package/dist/components/pages/collection-create/form.mjs +164 -1
  639. package/dist/components/pages/collection-create/index.mjs +10 -1
  640. package/dist/components/pages/collection-create/page.mjs +28 -1
  641. package/dist/components/pages/collection-detail/_components/collection-detail-card.mjs +183 -1
  642. package/dist/components/pages/collection-detail/_components/collection-detail-video-card.mjs +135 -1
  643. package/dist/components/pages/collection-detail/detail.mjs +539 -1
  644. package/dist/components/pages/collection-detail/index.mjs +10 -1
  645. package/dist/components/pages/collection-detail/page.mjs +18 -1
  646. package/dist/components/pages/edit/index.mjs +10 -1
  647. package/dist/components/pages/edit/page.mjs +683 -1
  648. package/dist/components/pages/feed-series/feed-series-client.mjs +383 -1
  649. package/dist/components/pages/feed-series/page.mjs +97 -1
  650. package/dist/components/pages/feedback/_components/feedback-form.mjs +271 -1
  651. package/dist/components/pages/feedback/index.mjs +10 -1
  652. package/dist/components/pages/feedback/page.mjs +10 -1
  653. package/dist/components/pages/fullscreen-feed/index.mjs +10 -1
  654. package/dist/components/pages/fullscreen-feed/page.mjs +105 -1
  655. package/dist/components/pages/home/channel-matcher.mjs +30 -1
  656. package/dist/components/pages/home/client.mjs +149 -1
  657. package/dist/components/pages/home/index.mjs +59 -1
  658. package/dist/components/pages/login/agreement-dialog.mjs +104 -1
  659. package/dist/components/pages/login/auth-guard.mjs +37 -1
  660. package/dist/components/pages/login/auth-page-styles.mjs +17 -2
  661. package/dist/components/pages/login/forgot.mjs +136 -1
  662. package/dist/components/pages/login/index.mjs +107 -1
  663. package/dist/components/pages/login/login-client.mjs +233 -1
  664. package/dist/components/pages/login/password.mjs +186 -1
  665. package/dist/components/pages/login/register.mjs +204 -1
  666. package/dist/components/pages/login/reset-password.mjs +193 -1
  667. package/dist/components/pages/login/tracking.mjs +32 -1
  668. package/dist/components/pages/login/verify.mjs +243 -1
  669. package/dist/components/pages/post-detail/page.mjs +28 -1
  670. package/dist/components/pages/post-detail/post-detail-client.mjs +516 -1
  671. package/dist/components/pages/profile/index.mjs +10 -1
  672. package/dist/components/pages/profile/page.mjs +28 -1
  673. package/dist/components/pages/publish/components/collection-card.mjs +49 -1
  674. package/dist/components/pages/publish/components/collection-popup.mjs +81 -1
  675. package/dist/components/pages/publish/components/collection.mjs +97 -1
  676. package/dist/components/pages/publish/components/cover-item.mjs +46 -1
  677. package/dist/components/pages/publish/components/editor.mjs +208 -1
  678. package/dist/components/pages/publish/components/header.mjs +31 -1
  679. package/dist/components/pages/publish/components/material-grid.mjs +52 -1
  680. package/dist/components/pages/publish/components/material-item.mjs +68 -1
  681. package/dist/components/pages/publish/components/toolbar.mjs +39 -1
  682. package/dist/components/pages/publish/components/upload-progress.mjs +53 -1
  683. package/dist/components/pages/publish/components/video-item.mjs +36 -1
  684. package/dist/components/pages/publish/constants.mjs +8 -1
  685. package/dist/components/pages/publish/hooks/use-file-upload.mjs +162 -1
  686. package/dist/components/pages/publish/page-client.mjs +345 -1
  687. package/dist/components/pages/publish/page.mjs +11 -1
  688. package/dist/components/pages/publish/utils/file-upload.mjs +155 -1
  689. package/dist/components/pages/publish/utils/publish-utils.mjs +11 -1
  690. package/dist/components/pages/search/hot-recommend.mjs +192 -1
  691. package/dist/components/pages/search/hot-search.mjs +70 -1
  692. package/dist/components/pages/search/index.mjs +17 -1
  693. package/dist/components/pages/search/page-client.mjs +211 -1
  694. package/dist/components/pages/search/search-result/index.mjs +31 -1
  695. package/dist/components/pages/search/search-result/search-all.mjs +167 -1
  696. package/dist/components/pages/search/search-result/search-user.mjs +306 -1
  697. package/dist/components/pages/search/search-result/search-video-info.mjs +134 -1
  698. package/dist/components/pages/search/search-result/shared.mjs +114 -1
  699. package/dist/components/pages/search/style.module.mjs +12 -85
  700. package/dist/components/pages/search/top-header.mjs +131 -1
  701. package/dist/components/pages/search/tracking.mjs +51 -1
  702. package/dist/components/pages/search-result/page-client.mjs +130 -1
  703. package/dist/components/pages/search-result/search-all.mjs +180 -1
  704. package/dist/components/pages/search-result/search-empty.mjs +52 -1
  705. package/dist/components/pages/search-result/search-tab.mjs +95 -1
  706. package/dist/components/pages/search-result/search-user.mjs +315 -1
  707. package/dist/components/pages/search-result/search-video-info.mjs +195 -1
  708. package/dist/components/pages/search-result/shared.mjs +46 -1
  709. package/dist/components/pages/search-result/top-header.mjs +105 -1
  710. package/dist/components/pages/search-result/tracking.mjs +39 -1
  711. package/dist/components/pages/settings/_components/reset-password-drawer.mjs +381 -1
  712. package/dist/components/pages/settings/_components/settings.mjs +192 -1
  713. package/dist/components/pages/settings/index.mjs +10 -1
  714. package/dist/components/pages/settings/page.mjs +13 -1
  715. package/dist/components/pages/user-follow/_components/follow-no-login.mjs +34 -1
  716. package/dist/components/pages/user-follow/_components/follow-top-header.mjs +25 -1
  717. package/dist/components/pages/user-follow/_components/post-tab.mjs +96 -1
  718. package/dist/components/pages/user-follow/index.mjs +10 -1
  719. package/dist/components/pages/user-follow/page.mjs +106 -1
  720. package/dist/components/pages/user-follow/skeleton.mjs +62 -1
  721. package/dist/components/pages/video-detail/page.mjs +47 -1
  722. package/dist/components/pages/video-detail/video-detail-client.mjs +395 -1
  723. package/dist/components/pages/video-list/index.mjs +61 -1
  724. package/dist/components/pages/video-list/types.mjs +16 -1
  725. package/dist/components/pages/video-list/video-list-client.mjs +144 -1
  726. package/dist/components/pages/video-list/video-list-recommend-item.mjs +94 -1
  727. package/dist/components/pages/video-list/video-list-skeleton.mjs +91 -1
  728. package/dist/components/ui/accordion.mjs +62 -1
  729. package/dist/components/ui/alert-dialog.mjs +114 -1
  730. package/dist/components/ui/alert.mjs +50 -1
  731. package/dist/components/ui/aspect-ratio.mjs +17 -1
  732. package/dist/components/ui/avatar.mjs +107 -1
  733. package/dist/components/ui/badge.mjs +38 -1
  734. package/dist/components/ui/box.mjs +17 -1
  735. package/dist/components/ui/breadcrumb.mjs +84 -1
  736. package/dist/components/ui/button-group.mjs +49 -1
  737. package/dist/components/ui/button.mjs +50 -1
  738. package/dist/components/ui/card.mjs +65 -1
  739. package/dist/components/ui/carousel.mjs +142 -1
  740. package/dist/components/ui/checkbox.mjs +25 -1
  741. package/dist/components/ui/collapsible.mjs +31 -1
  742. package/dist/components/ui/combobox.mjs +185 -1
  743. package/dist/components/ui/context-menu.mjs +150 -1
  744. package/dist/components/ui/dialog.mjs +109 -1
  745. package/dist/components/ui/drawer.mjs +91 -1
  746. package/dist/components/ui/dropdown-menu.mjs +154 -1
  747. package/dist/components/ui/empty-icons.mjs +96 -7
  748. package/dist/components/ui/empty.mjs +95 -1
  749. package/dist/components/ui/field.mjs +131 -1
  750. package/dist/components/ui/hover-card.mjs +43 -1
  751. package/dist/components/ui/image.mjs +257 -1
  752. package/dist/components/ui/infinite-scroll.mjs +168 -1
  753. package/dist/components/ui/input-group.mjs +90 -1
  754. package/dist/components/ui/input.mjs +19 -1
  755. package/dist/components/ui/item.mjs +137 -1
  756. package/dist/components/ui/kbd.mjs +24 -1
  757. package/dist/components/ui/label.mjs +18 -1
  758. package/dist/components/ui/legacy/badge.mjs +80 -1
  759. package/dist/components/ui/legacy/button.mjs +55 -1
  760. package/dist/components/ui/legacy/input.mjs +22 -1
  761. package/dist/components/ui/legacy/popover.mjs +69 -1
  762. package/dist/components/ui/link.mjs +52 -1
  763. package/dist/components/ui/list.mjs +221 -5
  764. package/dist/components/ui/loading.mjs +44 -1
  765. package/dist/components/ui/mask.mjs +17 -1
  766. package/dist/components/ui/menubar.mjs +154 -1
  767. package/dist/components/ui/native-select.mjs +43 -1
  768. package/dist/components/ui/pagination.mjs +90 -1
  769. package/dist/components/ui/popover.mjs +73 -1
  770. package/dist/components/ui/popup.mjs +44 -1
  771. package/dist/components/ui/progress.mjs +53 -1
  772. package/dist/components/ui/radio-group.mjs +34 -1
  773. package/dist/components/ui/rate.mjs +69 -1
  774. package/dist/components/ui/scroll-area.mjs +43 -1
  775. package/dist/components/ui/select.mjs +113 -1
  776. package/dist/components/ui/separator.mjs +20 -1
  777. package/dist/components/ui/sheet.mjs +109 -1
  778. package/dist/components/ui/skeleton.mjs +16 -1
  779. package/dist/components/ui/slider.mjs +46 -1
  780. package/dist/components/ui/sonner.mjs +34 -1
  781. package/dist/components/ui/spinner.mjs +18 -1
  782. package/dist/components/ui/switch.mjs +65 -1
  783. package/dist/components/ui/table.mjs +78 -1
  784. package/dist/components/ui/tabs.mjs +54 -1
  785. package/dist/components/ui/text.mjs +20 -1
  786. package/dist/components/ui/textarea.mjs +16 -1
  787. package/dist/components/ui/time.mjs +91 -1
  788. package/dist/components/ui/toggle-group.mjs +59 -1
  789. package/dist/components/ui/toggle.mjs +41 -1
  790. package/dist/components/ui/tooltip.mjs +49 -1
  791. package/dist/components/ui/wheel-picker.mjs +28 -1
  792. package/dist/constants/event-key.mjs +18 -1
  793. package/dist/constants/query-key.mjs +32 -1
  794. package/dist/constants/revalidate.mjs +9 -1
  795. package/dist/constants/site.mjs +11 -1
  796. package/dist/constants/url-prefix.mjs +11 -1
  797. package/dist/hooks/image-text-recommend.mjs +71 -1
  798. package/dist/hooks/query/hydration-boundary.mjs +34 -1
  799. package/dist/hooks/query/use-query.mjs +114 -1
  800. package/dist/hooks/use-auth.mjs +198 -1
  801. package/dist/hooks/use-browse-report.mjs +489 -1
  802. package/dist/hooks/use-card-decoration.mjs +96 -1
  803. package/dist/hooks/use-content-operate.mjs +526 -1
  804. package/dist/hooks/use-first-row-height.mjs +105 -1
  805. package/dist/hooks/use-follow.mjs +69 -1
  806. package/dist/hooks/use-fullscreen-gestures.mjs +144 -1
  807. package/dist/hooks/use-interaction-animation.mjs +26 -1
  808. package/dist/hooks/use-is-client.mjs +20 -1
  809. package/dist/hooks/use-keyboard-open.mjs +56 -1
  810. package/dist/hooks/use-like-dislike.mjs +40 -1
  811. package/dist/hooks/use-min-duration-loading.mjs +63 -1
  812. package/dist/hooks/use-search-history.mjs +53 -1
  813. package/dist/hooks/use-sticky.mjs +50 -1
  814. package/dist/hooks.mjs +17 -1
  815. package/dist/i18n/locales/en.mjs +836 -3
  816. package/dist/i18n/locales/zh-CN.mjs +836 -3
  817. package/dist/i18n/messages.mjs +20 -1
  818. package/dist/i18n/translator.mjs +38 -1
  819. package/dist/i18n.mjs +165 -1
  820. package/dist/materials.mjs +73 -1
  821. package/dist/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs +17 -1
  822. package/dist/pages.mjs +23 -1
  823. package/dist/seo/build-metadata.mjs +163 -1
  824. package/dist/seo/config/index.mjs +22 -1
  825. package/dist/seo/config/page.mjs +301 -6
  826. package/dist/seo/config/site.mjs +25 -1
  827. package/dist/seo/constants.mjs +31 -1
  828. package/dist/seo/helpers.mjs +120 -1
  829. package/dist/seo/resource-hints.mjs +60 -1
  830. package/dist/seo/robots.mjs +36 -1
  831. package/dist/seo/sitemap.mjs +44 -1
  832. package/dist/seo/structured-data/article.mjs +51 -1
  833. package/dist/seo/structured-data/common.mjs +60 -1
  834. package/dist/seo/structured-data/video.mjs +41 -1
  835. package/dist/seo/viewport.mjs +31 -1
  836. package/dist/seo.mjs +15 -1
  837. package/dist/service/advertisement.mjs +88 -1
  838. package/dist/service/generated/client.mjs +1281 -1
  839. package/dist/service/generated/tanstack.mjs +1179 -1
  840. package/dist/service/register-by-verify-email-code.mjs +17 -1
  841. package/dist/service.mjs +6 -1
  842. package/dist/store/create-store.mjs +25 -1
  843. package/dist/store/modules/app-config-store.mjs +28 -1
  844. package/dist/store/modules/blind-spot-ad-store.mjs +95 -1
  845. package/dist/store/modules/blocked-modal-store.mjs +30 -1
  846. package/dist/store/modules/follow-ids-store.mjs +12 -1
  847. package/dist/store/modules/login-modal-store.mjs +155 -1
  848. package/dist/store/modules/media-preview-store.mjs +54 -1
  849. package/dist/store/modules/publish-store.mjs +31 -1
  850. package/dist/store/modules/use-demo-store.mjs +17 -1
  851. package/dist/store/modules/user-store.mjs +133 -1
  852. package/dist/store/modules/video-player-ref-store.mjs +13 -1
  853. package/dist/store.mjs +12 -1
  854. package/dist/theme-tokens.mjs +82 -1
  855. package/dist/types/safe-at-user.mjs +15 -1
  856. package/dist/types/safe-comment.mjs +30 -1
  857. package/dist/types/safe-grid.mjs +36 -1
  858. package/dist/types/safe-replay.mjs +43 -1
  859. package/dist/types/share.mjs +16 -1
  860. package/dist/ui.mjs +58 -1
  861. package/dist/utils/api-collect.mjs +14 -1
  862. package/dist/utils/browser-fingerprint.mjs +53 -1
  863. package/dist/utils/channel-storage.mjs +57 -1
  864. package/dist/utils/cn.mjs +15 -1
  865. package/dist/utils/common.mjs +311 -1
  866. package/dist/utils/db.mjs +80 -1
  867. package/dist/utils/decrypt-image-client.mjs +325 -1
  868. package/dist/utils/decrypt.worker.mjs +20 -2
  869. package/dist/utils/device-id.mjs +20 -1
  870. package/dist/utils/email-validator.mjs +108 -1
  871. package/dist/utils/event-bus.mjs +33 -1
  872. package/dist/utils/follow-service.mjs +87 -1
  873. package/dist/utils/get-res-url.mjs +94 -1
  874. package/dist/utils/helper.mjs +33 -1
  875. package/dist/utils/http.mjs +202 -1
  876. package/dist/utils/image-compression.mjs +59 -1
  877. package/dist/utils/image-crop.mjs +63 -1
  878. package/dist/utils/loaders.mjs +51 -1
  879. package/dist/utils/login-modal-bridge.mjs +65 -1
  880. package/dist/utils/media.mjs +128 -1
  881. package/dist/utils/password-validator.mjs +86 -1
  882. package/dist/utils/request-user-id.mjs +16 -1
  883. package/dist/utils/s3-uploader.mjs +40 -1
  884. package/dist/utils/schema/material.mjs +24 -1
  885. package/dist/utils/schema/schema.mjs +207 -1
  886. package/dist/utils/schema/utils.mjs +27 -1
  887. package/dist/utils/share-manager.mjs +183 -1
  888. package/dist/utils/tools.mjs +92 -1
  889. package/dist/utils/tracking.mjs +183 -1
  890. package/dist/utils/uint8.mjs +46 -1
  891. package/dist/utils/upload-file.mjs +429 -1
  892. package/dist/utils/use-compatible-router.mjs +84 -1
  893. package/dist/utils.mjs +27 -1
  894. package/package.json +1 -1
@@ -1,2 +1,970 @@
1
1
 
2
- "use client";import{debounceFun as e,formatCompactCount as t,getCurrentSecondTime as n,parseTextAtUserIds as r,replaceAtUserElement as i}from"../../../../utils/common.mjs";import{cn as a}from"../../../../utils/cn.mjs";import{useFollowIdsState as o}from"../../../../store/modules/follow-ids-store.mjs";import{useUserStore as s}from"../../../../store/modules/user-store.mjs";import{gCommunityGetComments as c,pCommunityCreateComment as l,pCommunityDislikeComment as u,pCommunityLikeComment as d,pInteractionFollow as f,pInteractionUnfollow as p}from"../../../../service/generated/client.mjs";import{checkFollowStatus as m}from"../../../../utils/follow-service.mjs";import{useRouter as h}from"../../../../utils/use-compatible-router.mjs";import{Image as g}from"../../../ui/image.mjs";import{Dialog as _,DialogContent as v}from"../../../ui/dialog.mjs";import{InfiniteScroll as y}from"../../../ui/infinite-scroll.mjs";import{useLikeDislike as b}from"../../../../hooks/use-like-dislike.mjs";import{useKeepAliveState as x}from"../../../common/keep-scroll-position/index.mjs";import S from"../../../../assets/icons/close.mjs";import C from"../../../../assets/icons/common/follow_sel.mjs";import w from"../../../../assets/icons/common/follow_user.mjs";import{UnfollowConfirmDialog as T}from"../../../common/follow-button/unfollow-confirm-dialog.mjs";import E from"../../../../assets/icons/detail/give_like.mjs";import D from"../../../../assets/icons/detail/give_like_sel.mjs";import O from"./comment-input.mjs";import k from"../../../../assets/icons/detail/un_like.mjs";import A from"../../../../assets/icons/detail/un_like_sel.mjs";import{CommentMedia as j}from"./comment-media.mjs";import{CommentRichText as M}from"./comment-rich-text.mjs";import{TimeDisplay as N}from"./time-display.mjs";import{CommentItem as P}from"./comment-item.mjs";import{mapApiReplayToReplay as F}from"../../../../types/safe-replay.mjs";import{toast as I}from"sonner";import{memo as L,useCallback as R,useEffect as z,useMemo as B,useRef as V,useState as H}from"react";import{Fragment as U,jsx as W,jsxs as G}from"react/jsx-runtime";import{useTranslations as K}from"next-intl";function q(e){if(e==null)return 0;let t=typeof e==`number`?e:Number(e);if(!Number.isNaN(t)&&t>0)return t>0xe8d4a51000?Math.floor(t/1e3):Math.floor(t);let n=Date.parse(String(e));return Number.isNaN(n)?0:Math.floor(n/1e3)}function J(e,t,n){let r=[];return Array.isArray(n)&&n.length>0?(n.forEach(e=>{let t=!!e?.is_video,n=String(e?.media_url||``),i=String(e?.cover_image||``);!n&&!i||r.push({cover_image:i,cover_image_thumbnail:i,cover_image_radio:1,cover_image_resolution:String(e?.cover_image_resolution||``),image_url:t?``:n,image_thumbnail:t?``:n,image_radio:1,image_resolution:String(e?.image_resolution||``),is_video:t,resolution:String(e?.video_resolution||``),video_duration:Number(e?.video_duration||0),video_url:t?n:``,video_size:Number(e?.video_size||0),video_codec_info:{hls_info:[],video_codec_deal:!1}})}),r):(e?.length&&e.forEach(e=>{r.push({cover_image:``,cover_image_thumbnail:``,cover_image_radio:1,cover_image_resolution:``,image_url:e,image_thumbnail:e,image_radio:1,image_resolution:``,is_video:!1,resolution:``,video_duration:0,video_url:``,video_size:0,video_codec_info:{hls_info:[],video_codec_deal:!1}})}),t?.length&&t.forEach(e=>{r.push({cover_image:``,cover_image_thumbnail:``,cover_image_radio:1,cover_image_resolution:``,image_url:``,image_thumbnail:``,image_radio:1,image_resolution:``,is_video:!0,resolution:``,video_duration:0,video_url:e,video_size:0,video_codec_info:{hls_info:[],video_codec_deal:!1}})}),r)}function Y(e){let t=Z(e.mentioned_users),n=t.length>0?t:Q(e.content||``);return{id:String(e.comment_id??e.id??``),user_name:e.user?.nickname||e.user?.username||``,text:e.content||``,type:`4`,files:[],at_users:n,cover_image:``,nine_grid_content_info:J(e?.images,e?.videos,e?.medias)}}function X(e,t){let n=e.is_liked?`1`:e.is_dislike?`2`:`0`,r=Z(e.mentioned_users),i=r.length>0?r:Q(e.content||``),a=String(e.comment_id??e.id??``),o=typeof e.like_count==`number`?e.like_count:0,s=F({id:a,like_cnt:(e.is_liked&&o===0?1:o).toString(),dislike_cnt:(e.dislike_count||0).toString(),created_at:q(e.create_time),text:e.content||``,type:`4`,like_flag:n,user_id:e.user_id||``,user_name:e.user?.nickname||e.user?.username||``,avatar:e.user?.avatar_url||``,reply_cnt:(e.reply_count||0).toString(),nine_grid_content_info:J(e?.images,e?.videos,e?.medias),at_users:i,parent_reply:void 0});return t&&(s.parent_reply=Y(t)),s}function Z(e){return Array.isArray(e)?e.map(e=>({user_id:e.user_id||``,name:e.nickname||e.username||``,avatar:e.avatar_url||``,birthday:``,signature:e.signature||``})):[]}function Q(e){if(!e)return[];let t=new Map,n=/<span[^>]*class=['"]mention['"][^>]*data-id=['"]([^'"]+)['"][^>]*>@([^<]*)<\/span>/g,r;for(;(r=n.exec(e))!==null;){let e=r[1]?String(r[1]):``,n=(r[2]?String(r[2]):``).replace(/^@/,``)||e;!e||t.has(e)||t.set(e,{user_id:e,name:n,avatar:``,birthday:``,signature:``})}if(t.size>0)return Array.from(t.values());let i=/<@_user>(\w+)<\/@_user>/g;for(;(r=i.exec(e))!==null;){let e=r[1]?String(r[1]):``;!e||t.has(e)||t.set(e,{user_id:e,name:e,avatar:``,birthday:``,signature:``})}return Array.from(t.values())}function ee(e){return!Array.isArray(e)||e.length===0?[]:e.map(e=>{let t=!!e.is_video,n=t?String(e.video_url||``):String(e.image_url||e.cover_image||``),r=String(e.cover_image||e.image_url||``);return{media_url:n,is_video:t,image_resolution:String(e.image_resolution||``),cover_image:r,cover_image_resolution:String(e.cover_image_resolution||``),video_resolution:String(e.resolution||``),video_duration:Number(e.video_duration||0),video_size:Number(e.video_size||0)}}).filter(e=>!!e.media_url)}function $(e,t){let n=[];return e.forEach(e=>{n.push(X(e,t)),e.sub_comments?.length&&n.push(...$(e.sub_comments,e))}),n}const te=e((e,t,n)=>{try{if(!e?.id)return;d({comment_id:e.id,is_like:e.like_flag!==`1`},{revalidate:!1})}catch(e){console.error(`点赞回复失败:`,e)}},200),ne=e((e,t,n)=>{try{if(!e?.id)return;u({comment_id:e.id,is_dislike:e.like_flag!==`2`},{revalidate:!1})}catch(e){console.error(`点踩回复失败:`,e)}},200),re=L(({comment:e,updateFollow:t,onRequireLogin:n})=>{let{userInfo:r,userId:i,isLogin:a}=s(),o=r?.userId||r?.user_id||i||``;return W(`div`,{className:`w-full bg-bg1`,children:W(P,{comment:e,variant:`light`,isLogin:a,onRequireLogin:n,rightSlot:B(()=>!!o&&String(o)===String(e.user_id||``),[e.user_id,o])?W(U,{}):W(ie,{userId:e.user_id,hasFollow:e.is_follow,onChange:t,onRequireLogin:n}),showReplyButton:!1})})});function ie({userId:e,hasFollow:t=!1,onChange:n,onRequireLogin:r}){let i=K(`components.biz.business.comment`),{isLogin:c,userInfo:l,userId:u}=s(),{followIds:d}=o(),[m,h]=H(t),[g,_]=H(!1),v=l?.userId||l?.user_id||u||``,y=B(()=>!!v&&String(v)===String(e||``),[e,v]),b=B(()=>t||d.includes(e),[d,t,e]);z(()=>{h(b)},[b]);let x=R(async()=>{try{if(!v||!e||e===`0`){I.error(i(`replyDetail.loginRequired`));return}if(m){let t=await p({follower_id:String(v),followee_id:e});if(t.code!==0){I.error(t.message||i(`replyDetail.unfollowFailed`));return}}else{let t=await f({follower_id:String(v),followee_id:e});if(t.code!==0){I.error(t.message||i(`replyDetail.followFailed`));return}}window.sensors?.track(`detail_follow_click`,{object_id:``,action:m?`取消关注`:`关注`,author_id:e}),sessionStorage.setItem(`user_page_refresh`,`1`)}catch(e){console.error(`关注或取消关注失败:`,e),I.error(i(m?`replyDetail.unfollowFailed`:`replyDetail.followFailed`));return}let t=!m;n?.(t),h(t);let{followIds:r,setFollowIds:a}=o.getState(),s=new Set(r);t?s.add(e):s.delete(e),a(Array.from(s))},[e,m,n,v,i]),S=R(()=>{if(!c){r?.();return}if(m){_(!0);return}x()},[x,m,c,r]);function E(){_(!1),x()}function D(){_(!1)}return y||!e||e===`0`?null:G(U,{children:[W(`div`,{className:a(`h-[28px] rounded-[14px] px-[8px] border border-solid cursor-pointer flex items-center justify-center`,m?`border-text3`:`border-theme5`),onClick:S,children:m?G(U,{children:[W(C,{className:`w-[12px] h-[12px] text-text3 shrink-0`}),W(`span`,{className:`text-text3 text-[12px] leading-[18px] ml-[4px] shrink-0`,children:i(`replyDetail.followed`)})]}):G(U,{children:[W(w,{className:`block w-[12px] h-[12px] text-theme5 shrink-0`}),W(`span`,{className:`block text-theme5 text-[12px] leading-[18px] ml-[4px] shrink-0`,children:i(`replyDetail.follow`)})]})}),W(T,{open:g,onOpenChange:_,onCancel:D,onConfirm:E})]})}const ae=e(e=>{e()},0);function oe(e,t,n,r){let i=V(!1);z(()=>{i.current=!1},[r]),z(()=>{let r=e.current;if(!r)return;!i.current&&t>0&&(r.scrollTop=t,i.current=!0);let a=()=>{i.current=!0,n(r.scrollTop)};return r.addEventListener(`scroll`,a,{passive:!0}),()=>r.removeEventListener(`scroll`,a)},[e,n,t,r])}const se=L(({commentId:e,informationId:t,handleReplyComment:n,onReplyListUpdate:r})=>{let i=K(`components.biz.business.comment`),[a,o]=x(`replay-detail-list-${e}`,[]),[s,l]=x(`replay-detail-has-more-${e}`,!0),[u,d]=x(`replay-detail-page-${e}`,1),{getLikedListData:f,getDislikedListData:p}=b(),m=V(!1),h=R(async()=>{if(!(!e||!t)&&!m.current){m.current=!0;try{let n=await c({content_id:t,parent_id:e,page:u,page_size:20,sort_by:`latest`});if(n.code!==0)throw Error(n.message||i(`replyDetail.fetchRepliesFailed`));let r=n.data?.data?.comments??[],a=$(r);((n.data?.data?.has_more??!1)===!1||r.length<20)&&l(!1),o(e=>{let t=new Set(e.map(e=>e.id)),n=a.filter(e=>!t.has(e.id));return[...e,...n]}),a.length>0&&d(u+1)}catch(e){console.error(`获取回复列表失败:`,e),l(!1)}finally{m.current=!1}}},[e,t,u,o,l,d,i]),g=R(e=>{o(t=>[e,...t])},[o]);z(()=>{r(g)},[r,g]),z(()=>{e&&t&&(o(e=>e.length===0?e:[]),l(e=>e===!0?e:!0),d(e=>e===1?e:1))},[e,t,o,l,d]);let _=R(n=>{o(e=>f(e,n.id)),te(n,t,e)},[e,f,t,o]),v=R(n=>{n.like_flag!==`2`&&I.message(i(`replyDetail.dislikeHint`)),o(e=>p(e,n.id)),ne(n,t,e)},[e,p,t,o,i]),[S,C]=x(`replay-detail-scroll-top-${e}`,0),w=V(null);oe(w,S,C,e),z(()=>{!e||!t||a.length===0&&s&&h()},[e,t,h,a.length,s]);let T=R(async()=>{await h()},[h]);return G(`div`,{ref:w,className:`w-full pb-[66px]`,children:[a.map((e,t)=>W(ce,{replyItem:e,replyComment:n,onLikeReply:_,onDislikeReply:v},`${e.id}-${t}`)),W(y,{loadMore:T,hasMore:s})]})});function ce({replyItem:e,replyComment:n,onLikeReply:r,onDislikeReply:i}){let a=K(`components.biz.business.comment`),o=h(),s=e.status===`0`;function c(){r?.(e)}function l(){i?.(e)}function u(){n(e)}return G(`div`,{className:`p-[16px] flex flex-col`,children:[G(`div`,{className:`flex flex-row justify-between`,children:[G(`button`,{type:`button`,className:`flex flex-row items-center text-left`,onClick:()=>{o.push(`/profile/${e.user_id}`)},children:[W(`div`,{className:`w-[38px] h-[38px] rounded-full overflow-hidden relative bg-bg2`,children:e.avatar&&W(g,{src:e.avatar,fill:!0,objectFit:`cover`,alt:`avatar`})}),G(`div`,{className:`ml-[12px] flex flex-col`,children:[W(`span`,{className:`text-text2 text-[14px] leading-[14px] max-w-[180px] text-ellipsis overflow-hidden whitespace-nowrap`,children:e.user_name}),W(`span`,{className:`mt-[8px] text-text3 text-[12px] leading-[12px]`,children:W(N,{timestamp:e.created_at})})]})]}),s?W(`div`,{className:`px-[8px] py-[4px] bg-text3/10 rounded-[12px]`,children:W(`span`,{className:`text-text3 text-[12px] leading-[12px]`,children:a(`replyDetail.underReview`)})}):G(`div`,{className:`flex flex-row items-center`,children:[G(`div`,{className:`px-[4px] flex flex-col items-center`,onClick:c,children:[e.like_flag===`1`?W(D,{className:`w-[14px] h-[14px]`}):W(E,{className:`w-[14px] h-[14px] text-text3`}),W(`span`,{className:`mt-[4px] text-text3 text-[12px] leading-[12px]`,children:e.like_cnt===`0`?a(`replyDetail.like`):t(e.like_cnt)})]}),G(`div`,{className:`ml-[12px] px-[4px] flex flex-col items-center`,onClick:l,children:[e.like_flag===`2`?W(A,{className:`w-[14px] h-[14px]`}):W(k,{className:`w-[14px] h-[14px] text-text3`}),W(`span`,{className:`mt-[4px] text-text3 text-[12px] leading-[12px]`,children:e.dislike_cnt===`0`?a(`replyDetail.dislike`):t(e.dislike_cnt)})]})]})]}),G(`div`,{className:`mt-[4px] pl-[50px] flex flex-col`,children:[e.text&&W(M,{className:`text-text1 text-[14px] leading-[22px] break-all`,text:e.text,atUsers:e.at_users}),W(j,{list:e.nine_grid_content_info,disabled:s,hasText:!!e.text,playerId:e.id}),e.parent_reply&&e.parent_reply.text&&G(U,{children:[G(`div`,{className:`mt-[4px] flex flex-row items-center text-[14px] leading-[22px] relative pl-[8px]`,children:[W(`div`,{className:`w-[2px] h-full bg-line1 mr-[8px] absolute left-0 top-0 bottom-0 m-auto`}),G(`span`,{className:`text-theme1`,children:[e.parent_reply.user_name,`:`,e.parent_reply.text&&W(`span`,{className:`text-text1`,children:W(M,{text:e.parent_reply.text,atUsers:e.parent_reply.at_users})})]})]}),W(`div`,{className:`mt-1`,children:W(j,{list:e.parent_reply.nine_grid_content_info,disabled:s,hasText:!!e.parent_reply.text,playerId:e.parent_reply.id})})]}),W(`div`,{className:`mt-[4px] w-[fit-content] h-[30px] px-[12px] text-text1 text-[14px] leading-[22px] flex flex-row items-center bg-bg1 rounded-[15px]`,onClick:u,children:W(`span`,{children:a(`replyDetail.reply`)})})]})]})}function le({comment:e,information:t,contentType:a,visible:c,onClose:u,onReplyComment:d,onReplyAdded:f,onRequireLogin:p}){let h=K(`components.biz.business.comment`),g=V(null),[y,b]=H(()=>F({})),[x,C]=H(!1),{userInfo:w,userId:T}=s(),{followIds:E,setFollowIds:D}=o(),k=w?.userId||w?.user_id||T||``,A=w?.name||w?.nick_name||w?.nickname||w?.user_name||``,j=w?.avatar||w?.avatar_url||``,M=V({commentId:``,userId:``});function N(e){if(!e)return``;if(Array.isArray(e))return String(e[0]||``);if(typeof e==`object`){if(Object.prototype.hasOwnProperty.call(e,`comment_id`))return String(e.comment_id??``);if(Array.isArray(e.data))return String(e.data[0]||``)}return``}z(()=>{c&&(!k||!e.user_id||e.user_id!==`0`&&String(k)!==String(e.user_id)&&(M.current.commentId===e.id&&M.current.userId===k||(M.current={commentId:e.id,userId:k},(async()=>{let t=await m({app_id:0,follower_id:k,followee_ids:[e.user_id]});if(!t.success||!t.data?.is_following_map)return;let n=!!t.data.is_following_map[e.user_id];e.is_follow=n;let r=new Set(E);n?r.add(e.user_id):r.delete(e.user_id),D(Array.from(r))})())))},[e,E,k,D,c]);let P=R(e=>{b(e),setTimeout(()=>{C(!0),g.current?.focus()},10)},[]);function L(){ae(()=>{C(!1)})}async function B({text:e,imageVideoInfoList:t}){let n=e=>e.success?e:(I.error(e.message||h(`replyDetail.publishReplyFailed`)),{...e,toastHandled:!0});if(x){let r=await q({text:e,imageVideoInfoList:t});return C(!1),n(r)}else{let r=await U({text:e,imageVideoInfoList:t});return C(!1),n(r)}}async function U({text:e,imageVideoInfoList:t}){return await d?.({text:e,imageVideoInfoList:t,callback:r=>{let i=Q(e);if(!r||r===`0`)return;let a=F({id:r,user_id:k,user_name:A,avatar:j,text:e,created_at:n(),type:`4`,nine_grid_content_info:t,at_users:i});J?.(a)}})??{success:!0}}async function q({text:e,imageVideoInfoList:o}){if(!y?.id||y.id===`0`)return{success:!1,message:h(`replyDetail.invalidReplyTarget`)};let s=ee(o),c=r(e),u=a===`video`?1:2;try{let r=await l({content_id:t.id,content:i(e),medias:s,mentioned_users:c,parent_id:y.id,source_type:u},{revalidate:!1});if(r.code!==0)return{success:!1,message:r.message||h(`replyDetail.publishReplyFailed`)};let a=N(r.data);if(!a||a===`0`)return{success:!1,message:h(`replyDetail.publishReplyFailed`)};let d=F({id:a,user_id:k,user_name:A,avatar:j,text:e,created_at:n(),type:`4`,nine_grid_content_info:o,at_users:Q(e)});return d.parent_reply=y,J?.(d),f?.(),{success:!0}}catch(e){return console.error(`发布回复回复失败:`,e),{success:!1,message:h(`replyDetail.publishReplyFailed`)}}}let[J,Y]=H(null),X=R(e=>{Y(()=>e)},[]),Z=x?`回复@${y.user_name}`:``;function $(e){e||u()}return W(_,{open:c,onOpenChange:$,children:G(v,{showCloseButton:!1,className:`fixed left-0 right-0 bottom-0 top-[84px] z-[1000] h-auto w-full max-w-none translate-x-0 translate-y-0 rounded-none bg-bg2 p-0 text-text1 !flex !flex-col !gap-0`,children:[G(`div`,{className:`w-full h-[60px] bg-bg1 flex items-center justify-center relative`,children:[W(`button`,{type:`button`,className:`w-[48px] focus-within:outline-none focus-within:border-none focus-within:ring-0 h-full flex items-center justify-center absolute left-0 top-0`,onClick:u,children:W(S,{className:`w-[16px] h-[16px] text-text1`})}),W(`span`,{className:`text-[18px] font-bold`,children:h(`replyDetail.commentDetail`)})]}),G(`div`,{className:`flex-1 min-h-0 w-full overflow-y-auto bg-bg2`,children:[W(re,{comment:e,updateFollow:t=>{e.is_follow=t},onRequireLogin:p}),W(se,{commentId:e.id,informationId:t.id,handleReplyComment:P,onReplyListUpdate:X}),W(O,{placeholder:Z,onInputBlur:L,onPublish:B,onRequireLogin:p,ref:g})]})]})})}export{le as default};
2
+ 'use client';
3
+
4
+ import { debounceFun, formatCompactCount, getCurrentSecondTime, parseTextAtUserIds, replaceAtUserElement } from "../../../../utils/common.mjs";
5
+ import { cn } from "../../../../utils/cn.mjs";
6
+ import { useFollowIdsState } from "../../../../store/modules/follow-ids-store.mjs";
7
+ import { useUserStore } from "../../../../store/modules/user-store.mjs";
8
+ import { gCommunityGetComments, pCommunityCreateComment, pCommunityDislikeComment, pCommunityLikeComment, pInteractionFollow, pInteractionUnfollow } from "../../../../service/generated/client.mjs";
9
+ import { checkFollowStatus } from "../../../../utils/follow-service.mjs";
10
+ import { useRouter } from "../../../../utils/use-compatible-router.mjs";
11
+ import { Image } from "../../../ui/image.mjs";
12
+ import { Dialog, DialogContent } from "../../../ui/dialog.mjs";
13
+ import { InfiniteScroll } from "../../../ui/infinite-scroll.mjs";
14
+ import { useLikeDislike } from "../../../../hooks/use-like-dislike.mjs";
15
+ import { useKeepAliveState } from "../../../common/keep-scroll-position/index.mjs";
16
+ import SvgClose from "../../../../assets/icons/close.mjs";
17
+ import SvgFollowSel from "../../../../assets/icons/common/follow_sel.mjs";
18
+ import SvgFollowUser from "../../../../assets/icons/common/follow_user.mjs";
19
+ import { UnfollowConfirmDialog } from "../../../common/follow-button/unfollow-confirm-dialog.mjs";
20
+ import SvgGiveLike from "../../../../assets/icons/detail/give_like.mjs";
21
+ import SvgGiveLikeSel from "../../../../assets/icons/detail/give_like_sel.mjs";
22
+ import CommentInput from "./comment-input.mjs";
23
+ import SvgUnLike from "../../../../assets/icons/detail/un_like.mjs";
24
+ import SvgUnLikeSel from "../../../../assets/icons/detail/un_like_sel.mjs";
25
+ import { CommentMedia } from "./comment-media.mjs";
26
+ import { CommentRichText } from "./comment-rich-text.mjs";
27
+ import { TimeDisplay } from "./time-display.mjs";
28
+ import { CommentItem } from "./comment-item.mjs";
29
+ import { mapApiReplayToReplay } from "../../../../types/safe-replay.mjs";
30
+ import { toast } from "sonner";
31
+ import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
32
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
33
+ import { useTranslations } from "next-intl";
34
+
35
+ //#region components/biz/business/comment/reply-detail.tsx
36
+ /**
37
+ * 将接口时间字段转换为秒级时间戳,兼容秒/毫秒/ISO 字符串。
38
+ */
39
+ function parseToSecondTimestamp(value) {
40
+ if (value === void 0 || value === null) return 0;
41
+ const numericValue = typeof value === "number" ? value : Number(value);
42
+ if (!Number.isNaN(numericValue) && numericValue > 0) {
43
+ if (numericValue > 0xe8d4a51000) return Math.floor(numericValue / 1e3);
44
+ return Math.floor(numericValue);
45
+ }
46
+ const parsed = Date.parse(String(value));
47
+ if (Number.isNaN(parsed)) return 0;
48
+ return Math.floor(parsed / 1e3);
49
+ }
50
+ /**
51
+ * 将评论媒体转换为 SafeNineGridInfoType 数组(优先 medias)。
52
+ */
53
+ function convertMediaArrayToNineGridInfo(images, videos, medias) {
54
+ const result = [];
55
+ if (Array.isArray(medias) && medias.length > 0) {
56
+ medias.forEach((media) => {
57
+ const isVideo = Boolean(media?.is_video);
58
+ const mediaUrl = String(media?.media_url || "");
59
+ const coverImage = String(media?.cover_image || "");
60
+ if (!mediaUrl && !coverImage) return;
61
+ result.push({
62
+ cover_image: coverImage,
63
+ cover_image_thumbnail: coverImage,
64
+ cover_image_radio: 1,
65
+ cover_image_resolution: String(media?.cover_image_resolution || ""),
66
+ image_url: isVideo ? "" : mediaUrl,
67
+ image_thumbnail: isVideo ? "" : mediaUrl,
68
+ image_radio: 1,
69
+ image_resolution: String(media?.image_resolution || ""),
70
+ is_video: isVideo,
71
+ resolution: String(media?.video_resolution || ""),
72
+ video_duration: Number(media?.video_duration || 0),
73
+ video_url: isVideo ? mediaUrl : "",
74
+ video_size: Number(media?.video_size || 0),
75
+ video_codec_info: {
76
+ hls_info: [],
77
+ video_codec_deal: false
78
+ }
79
+ });
80
+ });
81
+ return result;
82
+ }
83
+ if (images?.length) images.forEach((imageUrl) => {
84
+ result.push({
85
+ cover_image: "",
86
+ cover_image_thumbnail: "",
87
+ cover_image_radio: 1,
88
+ cover_image_resolution: "",
89
+ image_url: imageUrl,
90
+ image_thumbnail: imageUrl,
91
+ image_radio: 1,
92
+ image_resolution: "",
93
+ is_video: false,
94
+ resolution: "",
95
+ video_duration: 0,
96
+ video_url: "",
97
+ video_size: 0,
98
+ video_codec_info: {
99
+ hls_info: [],
100
+ video_codec_deal: false
101
+ }
102
+ });
103
+ });
104
+ if (videos?.length) videos.forEach((videoUrl) => {
105
+ result.push({
106
+ cover_image: "",
107
+ cover_image_thumbnail: "",
108
+ cover_image_radio: 1,
109
+ cover_image_resolution: "",
110
+ image_url: "",
111
+ image_thumbnail: "",
112
+ image_radio: 1,
113
+ image_resolution: "",
114
+ is_video: true,
115
+ resolution: "",
116
+ video_duration: 0,
117
+ video_url: videoUrl,
118
+ video_size: 0,
119
+ video_codec_info: {
120
+ hls_info: [],
121
+ video_codec_deal: false
122
+ }
123
+ });
124
+ });
125
+ return result;
126
+ }
127
+ /**
128
+ * 将 Community 评论结构映射到 SafeParentReplayType。
129
+ */
130
+ function mapCommunityCommentToParentReply(comment) {
131
+ const mentionedUsers = mapCommunityMentionedUsers(comment.mentioned_users);
132
+ const resolvedAtUsers = mentionedUsers.length > 0 ? mentionedUsers : parseAtUsersFromHtml(comment.content || "");
133
+ return {
134
+ id: String(comment.comment_id ?? comment.id ?? ""),
135
+ user_name: comment.user?.nickname || comment.user?.username || "",
136
+ text: comment.content || "",
137
+ type: "4",
138
+ files: [],
139
+ at_users: resolvedAtUsers,
140
+ cover_image: "",
141
+ nine_grid_content_info: convertMediaArrayToNineGridInfo(comment?.images, comment?.videos, comment?.medias)
142
+ };
143
+ }
144
+ /**
145
+ * 将 Community 评论结构映射到 SafeReplayType
146
+ */
147
+ function mapCommunityCommentToSafeReply(comment, parentComment) {
148
+ const likeFlag = comment.is_liked ? "1" : comment.is_dislike ? "2" : "0";
149
+ const mentionedUsers = mapCommunityMentionedUsers(comment.mentioned_users);
150
+ const resolvedAtUsers = mentionedUsers.length > 0 ? mentionedUsers : parseAtUsersFromHtml(comment.content || "");
151
+ const resolvedId = String(comment.comment_id ?? comment.id ?? "");
152
+ const rawLikeCnt = typeof comment.like_count === "number" ? comment.like_count : 0;
153
+ const reply = mapApiReplayToReplay({
154
+ id: resolvedId,
155
+ like_cnt: (comment.is_liked && rawLikeCnt === 0 ? 1 : rawLikeCnt).toString(),
156
+ dislike_cnt: (comment.dislike_count || 0).toString(),
157
+ created_at: parseToSecondTimestamp(comment.create_time),
158
+ text: comment.content || "",
159
+ type: "4",
160
+ like_flag: likeFlag,
161
+ user_id: comment.user_id || "",
162
+ user_name: comment.user?.nickname || comment.user?.username || "",
163
+ avatar: comment.user?.avatar_url || "",
164
+ reply_cnt: (comment.reply_count || 0).toString(),
165
+ nine_grid_content_info: convertMediaArrayToNineGridInfo(comment?.images, comment?.videos, comment?.medias),
166
+ at_users: resolvedAtUsers,
167
+ parent_reply: void 0
168
+ });
169
+ if (parentComment) reply.parent_reply = mapCommunityCommentToParentReply(parentComment);
170
+ return reply;
171
+ }
172
+ /**
173
+ * 将评论里的 @ 用户信息转换为 SafeAtUserType。
174
+ */
175
+ function mapCommunityMentionedUsers(mentionedUsers) {
176
+ if (!Array.isArray(mentionedUsers)) return [];
177
+ return mentionedUsers.map((user) => ({
178
+ user_id: user.user_id || "",
179
+ name: user.nickname || user.username || "",
180
+ avatar: user.avatar_url || "",
181
+ birthday: "",
182
+ signature: user.signature || ""
183
+ }));
184
+ }
185
+ /**
186
+ * 从富文本中解析 @mention 信息,用于本地新增回复的高亮展示。
187
+ */
188
+ function parseAtUsersFromHtml(text) {
189
+ if (!text) return [];
190
+ const result = /* @__PURE__ */ new Map();
191
+ const mentionRegex = /<span[^>]*class=['"]mention['"][^>]*data-id=['"]([^'"]+)['"][^>]*>@([^<]*)<\/span>/g;
192
+ let match;
193
+ while ((match = mentionRegex.exec(text)) !== null) {
194
+ const id = match[1] ? String(match[1]) : "";
195
+ const name = (match[2] ? String(match[2]) : "").replace(/^@/, "") || id;
196
+ if (!id || result.has(id)) continue;
197
+ result.set(id, {
198
+ user_id: id,
199
+ name,
200
+ avatar: "",
201
+ birthday: "",
202
+ signature: ""
203
+ });
204
+ }
205
+ if (result.size > 0) return Array.from(result.values());
206
+ const placeholderRegex = /<@_user>(\w+)<\/@_user>/g;
207
+ while ((match = placeholderRegex.exec(text)) !== null) {
208
+ const id = match[1] ? String(match[1]) : "";
209
+ if (!id || result.has(id)) continue;
210
+ result.set(id, {
211
+ user_id: id,
212
+ name: id,
213
+ avatar: "",
214
+ birthday: "",
215
+ signature: ""
216
+ });
217
+ }
218
+ return Array.from(result.values());
219
+ }
220
+ /**
221
+ * 将评论附件转换为 createComment 的 medias 结构。
222
+ */
223
+ function buildCommentMedias(list) {
224
+ if (!Array.isArray(list) || list.length === 0) return [];
225
+ return list.map((item) => {
226
+ const isVideo = Boolean(item.is_video);
227
+ const mediaUrl = isVideo ? String(item.video_url || "") : String(item.image_url || item.cover_image || "");
228
+ const coverImage = String(item.cover_image || item.image_url || "");
229
+ return {
230
+ media_url: mediaUrl,
231
+ is_video: isVideo,
232
+ image_resolution: String(item.image_resolution || ""),
233
+ cover_image: coverImage,
234
+ cover_image_resolution: String(item.cover_image_resolution || ""),
235
+ video_resolution: String(item.resolution || ""),
236
+ video_duration: Number(item.video_duration || 0),
237
+ video_size: Number(item.video_size || 0)
238
+ };
239
+ }).filter((media) => Boolean(media.media_url));
240
+ }
241
+ /**
242
+ * 将 Community 评论列表扁平化,包含 sub_comments。
243
+ */
244
+ function flattenCommunityCommentReplies(comments, parentComment) {
245
+ const result = [];
246
+ comments.forEach((item) => {
247
+ result.push(mapCommunityCommentToSafeReply(item, parentComment));
248
+ if (item.sub_comments?.length) result.push(...flattenCommunityCommentReplies(item.sub_comments, item));
249
+ });
250
+ return result;
251
+ }
252
+ /**
253
+ * 回复详情点赞节流。
254
+ */
255
+ const replyDetailLikeDebounce = debounceFun((reply, _informationId, _commentId) => {
256
+ try {
257
+ if (!reply?.id) return;
258
+ pCommunityLikeComment({
259
+ comment_id: reply.id,
260
+ is_like: reply.like_flag !== "1"
261
+ }, { revalidate: false });
262
+ } catch (error) {
263
+ console.error("点赞回复失败:", error);
264
+ }
265
+ }, 200);
266
+ /**
267
+ * 回复详情点踩节流。
268
+ */
269
+ const replyDetailDislikeDebounce = debounceFun((reply, _informationId, _commentId) => {
270
+ try {
271
+ if (!reply?.id) return;
272
+ pCommunityDislikeComment({
273
+ comment_id: reply.id,
274
+ is_dislike: reply.like_flag !== "2"
275
+ }, { revalidate: false });
276
+ } catch (error) {
277
+ console.error("点踩回复失败:", error);
278
+ }
279
+ }, 200);
280
+ /**
281
+ * 回复详情顶部评论区。
282
+ */
283
+ const ReplyDetailHeader = memo(({ comment, updateFollow, onRequireLogin }) => {
284
+ const { userInfo, userId, isLogin } = useUserStore();
285
+ const resolvedUserId = userInfo?.userId || userInfo?.user_id || userId || "";
286
+ return /* @__PURE__ */ jsx("div", {
287
+ className: "w-full bg-bg1",
288
+ children: /* @__PURE__ */ jsx(CommentItem, {
289
+ comment,
290
+ variant: "light",
291
+ isLogin,
292
+ onRequireLogin,
293
+ rightSlot: useMemo(() => Boolean(resolvedUserId) && String(resolvedUserId) === String(comment.user_id || ""), [comment.user_id, resolvedUserId]) ? /* @__PURE__ */ jsx(Fragment$1, {}) : /* @__PURE__ */ jsx(ReplyFollowButton, {
294
+ userId: comment.user_id,
295
+ hasFollow: comment.is_follow,
296
+ onChange: updateFollow,
297
+ onRequireLogin
298
+ }),
299
+ showReplyButton: false
300
+ })
301
+ });
302
+ });
303
+ /**
304
+ * 回复详情关注按钮。
305
+ */
306
+ function ReplyFollowButton({ userId: followUserId, hasFollow = false, onChange, onRequireLogin }) {
307
+ const t = useTranslations("components.biz.business.comment");
308
+ const { isLogin, userInfo, userId } = useUserStore();
309
+ const { followIds } = useFollowIdsState();
310
+ const [isFollow, setIsFollow] = useState(hasFollow);
311
+ const [confirmOpen, setConfirmOpen] = useState(false);
312
+ const resolvedUserId = userInfo?.userId || userInfo?.user_id || userId || "";
313
+ const isSelf = useMemo(() => Boolean(resolvedUserId) && String(resolvedUserId) === String(followUserId || ""), [followUserId, resolvedUserId]);
314
+ const isHasFollowedStatus = useMemo(() => hasFollow || followIds.includes(followUserId), [
315
+ followIds,
316
+ hasFollow,
317
+ followUserId
318
+ ]);
319
+ useEffect(() => {
320
+ setIsFollow(isHasFollowedStatus);
321
+ }, [isHasFollowedStatus]);
322
+ /**
323
+ * 改变关注状态。
324
+ */
325
+ const changeFollowStatus = useCallback(async () => {
326
+ try {
327
+ if (!resolvedUserId || !followUserId || followUserId === "0") {
328
+ toast.error(t("replyDetail.loginRequired"));
329
+ return;
330
+ }
331
+ if (isFollow) {
332
+ const res = await pInteractionUnfollow({
333
+ follower_id: String(resolvedUserId),
334
+ followee_id: followUserId
335
+ });
336
+ if (res.code !== 0) {
337
+ toast.error(res.message || t("replyDetail.unfollowFailed"));
338
+ return;
339
+ }
340
+ } else {
341
+ const res = await pInteractionFollow({
342
+ follower_id: String(resolvedUserId),
343
+ followee_id: followUserId
344
+ });
345
+ if (res.code !== 0) {
346
+ toast.error(res.message || t("replyDetail.followFailed"));
347
+ return;
348
+ }
349
+ }
350
+ window.sensors?.track("detail_follow_click", {
351
+ object_id: "",
352
+ action: isFollow ? "取消关注" : "关注",
353
+ author_id: followUserId
354
+ });
355
+ sessionStorage.setItem("user_page_refresh", "1");
356
+ } catch (error) {
357
+ console.error("关注或取消关注失败:", error);
358
+ toast.error(isFollow ? t("replyDetail.unfollowFailed") : t("replyDetail.followFailed"));
359
+ return;
360
+ }
361
+ const nextFollow = !isFollow;
362
+ onChange?.(nextFollow);
363
+ setIsFollow(nextFollow);
364
+ const { followIds: prevIds, setFollowIds } = useFollowIdsState.getState();
365
+ const next = new Set(prevIds);
366
+ if (nextFollow) next.add(followUserId);
367
+ else next.delete(followUserId);
368
+ setFollowIds(Array.from(next));
369
+ }, [
370
+ followUserId,
371
+ isFollow,
372
+ onChange,
373
+ resolvedUserId,
374
+ t
375
+ ]);
376
+ /**
377
+ * 点击关注按钮。
378
+ */
379
+ const followHandler = useCallback(() => {
380
+ if (!isLogin) {
381
+ onRequireLogin?.();
382
+ return;
383
+ }
384
+ if (isFollow) {
385
+ setConfirmOpen(true);
386
+ return;
387
+ }
388
+ changeFollowStatus();
389
+ }, [
390
+ changeFollowStatus,
391
+ isFollow,
392
+ isLogin,
393
+ onRequireLogin
394
+ ]);
395
+ function handleConfirmUnfollow() {
396
+ setConfirmOpen(false);
397
+ changeFollowStatus();
398
+ }
399
+ function handleCancelUnfollow() {
400
+ setConfirmOpen(false);
401
+ }
402
+ if (isSelf || !followUserId || followUserId === "0") return null;
403
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
404
+ className: cn("h-[28px] rounded-[14px] px-[8px] border border-solid cursor-pointer flex items-center justify-center", !isFollow ? "border-theme5" : "border-text3"),
405
+ onClick: followHandler,
406
+ children: !isFollow ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(SvgFollowUser, { className: "block w-[12px] h-[12px] text-theme5 shrink-0" }), /* @__PURE__ */ jsx("span", {
407
+ className: "block text-theme5 text-[12px] leading-[18px] ml-[4px] shrink-0",
408
+ children: t("replyDetail.follow")
409
+ })] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(SvgFollowSel, { className: "w-[12px] h-[12px] text-text3 shrink-0" }), /* @__PURE__ */ jsx("span", {
410
+ className: "text-text3 text-[12px] leading-[18px] ml-[4px] shrink-0",
411
+ children: t("replyDetail.followed")
412
+ })] })
413
+ }), /* @__PURE__ */ jsx(UnfollowConfirmDialog, {
414
+ open: confirmOpen,
415
+ onOpenChange: setConfirmOpen,
416
+ onCancel: handleCancelUnfollow,
417
+ onConfirm: handleConfirmUnfollow
418
+ })] });
419
+ }
420
+ /**
421
+ * 0ms 节流:用于输入框失焦时先重置状态。
422
+ */
423
+ const replyDetailDebounce0 = debounceFun((callback) => {
424
+ callback();
425
+ }, 0);
426
+ /**
427
+ * 跟随列表滚动位置变化,自动保存/恢复滚动位置。
428
+ */
429
+ function useScrollPositionEffect(containerRef, scrollTop, onScrollTopChange, key) {
430
+ const restoredRef = useRef(false);
431
+ useEffect(() => {
432
+ restoredRef.current = false;
433
+ }, [key]);
434
+ useEffect(() => {
435
+ const container = containerRef.current;
436
+ if (!container) return;
437
+ if (!restoredRef.current && scrollTop > 0) {
438
+ container.scrollTop = scrollTop;
439
+ restoredRef.current = true;
440
+ }
441
+ const handleScroll = () => {
442
+ restoredRef.current = true;
443
+ onScrollTopChange(container.scrollTop);
444
+ };
445
+ container.addEventListener("scroll", handleScroll, { passive: true });
446
+ return () => container.removeEventListener("scroll", handleScroll);
447
+ }, [
448
+ containerRef,
449
+ onScrollTopChange,
450
+ scrollTop,
451
+ key
452
+ ]);
453
+ }
454
+ /**
455
+ * 回复列表。
456
+ */
457
+ const ReplyList = memo(({ commentId, informationId, handleReplyComment, onReplyListUpdate }) => {
458
+ const t = useTranslations("components.biz.business.comment");
459
+ const [replyList, setReplyList] = useKeepAliveState(`replay-detail-list-${commentId}`, []);
460
+ const [hasMore, setHasMore] = useKeepAliveState(`replay-detail-has-more-${commentId}`, true);
461
+ const [page, setPage] = useKeepAliveState(`replay-detail-page-${commentId}`, 1);
462
+ const { getLikedListData, getDislikedListData } = useLikeDislike();
463
+ const fetchInProgressRef = useRef(false);
464
+ /**
465
+ * 获取回复列表。
466
+ */
467
+ const fetchReplyList = useCallback(async () => {
468
+ if (!commentId || !informationId) return;
469
+ if (fetchInProgressRef.current) return;
470
+ fetchInProgressRef.current = true;
471
+ try {
472
+ const result = await gCommunityGetComments({
473
+ content_id: informationId,
474
+ parent_id: commentId,
475
+ page,
476
+ page_size: 20,
477
+ sort_by: "latest"
478
+ });
479
+ if (result.code !== 0) throw new Error(result.message || t("replyDetail.fetchRepliesFailed"));
480
+ const list = result.data?.data?.comments ?? [];
481
+ const data = flattenCommunityCommentReplies(list);
482
+ if ((result.data?.data?.has_more ?? false) === false || list.length < 20) setHasMore(false);
483
+ setReplyList((prevList) => {
484
+ const existingIds = new Set(prevList.map((item) => item.id));
485
+ const filteredData = data.filter((item) => !existingIds.has(item.id));
486
+ return [...prevList, ...filteredData];
487
+ });
488
+ if (data.length > 0) setPage(page + 1);
489
+ } catch (error) {
490
+ console.error("获取回复列表失败:", error);
491
+ setHasMore(false);
492
+ } finally {
493
+ fetchInProgressRef.current = false;
494
+ }
495
+ }, [
496
+ commentId,
497
+ informationId,
498
+ page,
499
+ setReplyList,
500
+ setHasMore,
501
+ setPage,
502
+ t
503
+ ]);
504
+ /**
505
+ * 更新回复列表。
506
+ */
507
+ const updateReplyList = useCallback((newReply) => {
508
+ setReplyList((prevList) => [newReply, ...prevList]);
509
+ }, [setReplyList]);
510
+ useEffect(() => {
511
+ onReplyListUpdate(updateReplyList);
512
+ }, [onReplyListUpdate, updateReplyList]);
513
+ /**
514
+ * 当评论ID改变时,重置状态并加载第一页数据。
515
+ */
516
+ useEffect(() => {
517
+ if (commentId && informationId) {
518
+ setReplyList((prev) => prev.length === 0 ? prev : []);
519
+ setHasMore((prev) => prev === true ? prev : true);
520
+ setPage((prev) => prev === 1 ? prev : 1);
521
+ }
522
+ }, [
523
+ commentId,
524
+ informationId,
525
+ setReplyList,
526
+ setHasMore,
527
+ setPage
528
+ ]);
529
+ /**
530
+ * 点赞回复。
531
+ */
532
+ const handleLikeReply = useCallback((reply) => {
533
+ setReplyList((prevList) => getLikedListData(prevList, reply.id));
534
+ replyDetailLikeDebounce(reply, informationId, commentId);
535
+ }, [
536
+ commentId,
537
+ getLikedListData,
538
+ informationId,
539
+ setReplyList
540
+ ]);
541
+ /**
542
+ * 点踩回复。
543
+ */
544
+ const handleDislikeReply = useCallback((reply) => {
545
+ if (reply.like_flag !== "2") toast.message(t("replyDetail.dislikeHint"));
546
+ setReplyList((prevList) => getDislikedListData(prevList, reply.id));
547
+ replyDetailDislikeDebounce(reply, informationId, commentId);
548
+ }, [
549
+ commentId,
550
+ getDislikedListData,
551
+ informationId,
552
+ setReplyList,
553
+ t
554
+ ]);
555
+ const [scrollTop, setScrollTop] = useKeepAliveState(`replay-detail-scroll-top-${commentId}`, 0);
556
+ const containerRef = useRef(null);
557
+ useScrollPositionEffect(containerRef, scrollTop, setScrollTop, commentId);
558
+ useEffect(() => {
559
+ if (!commentId || !informationId) return;
560
+ if (replyList.length === 0 && hasMore) fetchReplyList();
561
+ }, [
562
+ commentId,
563
+ informationId,
564
+ fetchReplyList,
565
+ replyList.length,
566
+ hasMore
567
+ ]);
568
+ /**
569
+ * 加载更多。
570
+ */
571
+ const handleLoadMore = useCallback(async () => {
572
+ await fetchReplyList();
573
+ }, [fetchReplyList]);
574
+ return /* @__PURE__ */ jsxs("div", {
575
+ ref: containerRef,
576
+ className: "w-full pb-[66px]",
577
+ children: [replyList.map((item, index) => /* @__PURE__ */ jsx(ReplyCommentItem, {
578
+ replyItem: item,
579
+ replyComment: handleReplyComment,
580
+ onLikeReply: handleLikeReply,
581
+ onDislikeReply: handleDislikeReply
582
+ }, `${item.id}-${index}`)), /* @__PURE__ */ jsx(InfiniteScroll, {
583
+ loadMore: handleLoadMore,
584
+ hasMore
585
+ })]
586
+ });
587
+ });
588
+ /**
589
+ * 回复列表项。
590
+ */
591
+ function ReplyCommentItem({ replyItem, replyComment, onLikeReply, onDislikeReply }) {
592
+ const t = useTranslations("components.biz.business.comment");
593
+ const router = useRouter();
594
+ const isUnderReview = replyItem.status === "0";
595
+ /**
596
+ * 点赞回复。
597
+ */
598
+ function handleLikeClick() {
599
+ onLikeReply?.(replyItem);
600
+ }
601
+ /**
602
+ * 点踩回复。
603
+ */
604
+ function handleDislikeClick() {
605
+ onDislikeReply?.(replyItem);
606
+ }
607
+ /**
608
+ * 回复该回复。
609
+ */
610
+ function handleReplyClick() {
611
+ replyComment(replyItem);
612
+ }
613
+ return /* @__PURE__ */ jsxs("div", {
614
+ className: "p-[16px] flex flex-col",
615
+ children: [/* @__PURE__ */ jsxs("div", {
616
+ className: "flex flex-row justify-between",
617
+ children: [/* @__PURE__ */ jsxs("button", {
618
+ type: "button",
619
+ className: "flex flex-row items-center text-left",
620
+ onClick: () => {
621
+ router.push(`/profile/${replyItem.user_id}`);
622
+ },
623
+ children: [/* @__PURE__ */ jsx("div", {
624
+ className: "w-[38px] h-[38px] rounded-full overflow-hidden relative bg-bg2",
625
+ children: replyItem.avatar && /* @__PURE__ */ jsx(Image, {
626
+ src: replyItem.avatar,
627
+ fill: true,
628
+ objectFit: "cover",
629
+ alt: "avatar"
630
+ })
631
+ }), /* @__PURE__ */ jsxs("div", {
632
+ className: "ml-[12px] flex flex-col",
633
+ children: [/* @__PURE__ */ jsx("span", {
634
+ className: "text-text2 text-[14px] leading-[14px] max-w-[180px] text-ellipsis overflow-hidden whitespace-nowrap",
635
+ children: replyItem.user_name
636
+ }), /* @__PURE__ */ jsx("span", {
637
+ className: "mt-[8px] text-text3 text-[12px] leading-[12px]",
638
+ children: /* @__PURE__ */ jsx(TimeDisplay, { timestamp: replyItem.created_at })
639
+ })]
640
+ })]
641
+ }), isUnderReview ? /* @__PURE__ */ jsx("div", {
642
+ className: "px-[8px] py-[4px] bg-text3/10 rounded-[12px]",
643
+ children: /* @__PURE__ */ jsx("span", {
644
+ className: "text-text3 text-[12px] leading-[12px]",
645
+ children: t("replyDetail.underReview")
646
+ })
647
+ }) : /* @__PURE__ */ jsxs("div", {
648
+ className: "flex flex-row items-center",
649
+ children: [/* @__PURE__ */ jsxs("div", {
650
+ className: "px-[4px] flex flex-col items-center",
651
+ onClick: handleLikeClick,
652
+ children: [replyItem.like_flag === "1" ? /* @__PURE__ */ jsx(SvgGiveLikeSel, { className: "w-[14px] h-[14px]" }) : /* @__PURE__ */ jsx(SvgGiveLike, { className: "w-[14px] h-[14px] text-text3" }), /* @__PURE__ */ jsx("span", {
653
+ className: "mt-[4px] text-text3 text-[12px] leading-[12px]",
654
+ children: replyItem.like_cnt === "0" ? t("replyDetail.like") : formatCompactCount(replyItem.like_cnt)
655
+ })]
656
+ }), /* @__PURE__ */ jsxs("div", {
657
+ className: "ml-[12px] px-[4px] flex flex-col items-center",
658
+ onClick: handleDislikeClick,
659
+ children: [replyItem.like_flag === "2" ? /* @__PURE__ */ jsx(SvgUnLikeSel, { className: "w-[14px] h-[14px]" }) : /* @__PURE__ */ jsx(SvgUnLike, { className: "w-[14px] h-[14px] text-text3" }), /* @__PURE__ */ jsx("span", {
660
+ className: "mt-[4px] text-text3 text-[12px] leading-[12px]",
661
+ children: replyItem.dislike_cnt === "0" ? t("replyDetail.dislike") : formatCompactCount(replyItem.dislike_cnt)
662
+ })]
663
+ })]
664
+ })]
665
+ }), /* @__PURE__ */ jsxs("div", {
666
+ className: "mt-[4px] pl-[50px] flex flex-col",
667
+ children: [
668
+ replyItem.text && /* @__PURE__ */ jsx(CommentRichText, {
669
+ className: "text-text1 text-[14px] leading-[22px] break-all",
670
+ text: replyItem.text,
671
+ atUsers: replyItem.at_users
672
+ }),
673
+ /* @__PURE__ */ jsx(CommentMedia, {
674
+ list: replyItem.nine_grid_content_info,
675
+ disabled: isUnderReview,
676
+ hasText: Boolean(replyItem.text),
677
+ playerId: replyItem.id
678
+ }),
679
+ replyItem.parent_reply && replyItem.parent_reply.text && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("div", {
680
+ className: "mt-[4px] flex flex-row items-center text-[14px] leading-[22px] relative pl-[8px]",
681
+ children: [/* @__PURE__ */ jsx("div", { className: "w-[2px] h-full bg-line1 mr-[8px] absolute left-0 top-0 bottom-0 m-auto" }), /* @__PURE__ */ jsxs("span", {
682
+ className: "text-theme1",
683
+ children: [
684
+ replyItem.parent_reply.user_name,
685
+ ":",
686
+ replyItem.parent_reply.text && /* @__PURE__ */ jsx("span", {
687
+ className: "text-text1",
688
+ children: /* @__PURE__ */ jsx(CommentRichText, {
689
+ text: replyItem.parent_reply.text,
690
+ atUsers: replyItem.parent_reply.at_users
691
+ })
692
+ })
693
+ ]
694
+ })]
695
+ }), /* @__PURE__ */ jsx("div", {
696
+ className: "mt-1",
697
+ children: /* @__PURE__ */ jsx(CommentMedia, {
698
+ list: replyItem.parent_reply.nine_grid_content_info,
699
+ disabled: isUnderReview,
700
+ hasText: Boolean(replyItem.parent_reply.text),
701
+ playerId: replyItem.parent_reply.id
702
+ })
703
+ })] }),
704
+ /* @__PURE__ */ jsx("div", {
705
+ className: "mt-[4px] w-[fit-content] h-[30px] px-[12px] text-text1 text-[14px] leading-[22px] flex flex-row items-center bg-bg1 rounded-[15px]",
706
+ onClick: handleReplyClick,
707
+ children: /* @__PURE__ */ jsx("span", { children: t("replyDetail.reply") })
708
+ })
709
+ ]
710
+ })]
711
+ });
712
+ }
713
+ /**
714
+ * 回复详情弹层。
715
+ */
716
+ function ReplyDetail({ comment, information, contentType, visible, onClose, onReplyComment, onReplyAdded, onRequireLogin }) {
717
+ const t = useTranslations("components.biz.business.comment");
718
+ const commentRef = useRef(null);
719
+ const [replyComment, setReplyComment] = useState(() => mapApiReplayToReplay({}));
720
+ const [isClickReplyButton, setIsClickReplyButton] = useState(false);
721
+ const { userInfo, userId: storeUserId } = useUserStore();
722
+ const { followIds, setFollowIds } = useFollowIdsState();
723
+ const resolvedUserId = userInfo?.userId || userInfo?.user_id || storeUserId || "";
724
+ const resolvedUserName = userInfo?.name || userInfo?.nick_name || userInfo?.nickname || userInfo?.user_name || "";
725
+ const resolvedUserAvatar = userInfo?.avatar || userInfo?.avatar_url || "";
726
+ const followCheckRef = useRef({
727
+ commentId: "",
728
+ userId: ""
729
+ });
730
+ /**
731
+ * CreateComment 接口 data 字段在不同端/版本里可能是:
732
+ * - { comment_id: '123' }
733
+ * - ['123']
734
+ * - { data: ['123'] }
735
+ * 统一兜底解析,避免拿不到 comment_id 后本地用时间戳/0 作为 id,进一步把 parent_id 传错(深层回复会放大这个问题)。
736
+ */
737
+ function resolveCreatedCommentId(data) {
738
+ if (!data) return "";
739
+ if (Array.isArray(data)) return String(data[0] || "");
740
+ if (typeof data === "object") {
741
+ if (Object.prototype.hasOwnProperty.call(data, "comment_id")) return String(data.comment_id ?? "");
742
+ if (Array.isArray(data.data)) return String(data.data[0] || "");
743
+ }
744
+ return "";
745
+ }
746
+ /**
747
+ * 弹窗打开时刷新关注状态(同步 followIds/评论头部按钮)。
748
+ */
749
+ useEffect(() => {
750
+ if (!visible) return;
751
+ if (!resolvedUserId || !comment.user_id) return;
752
+ if (comment.user_id === "0") return;
753
+ if (String(resolvedUserId) === String(comment.user_id)) return;
754
+ if (followCheckRef.current.commentId === comment.id && followCheckRef.current.userId === resolvedUserId) return;
755
+ followCheckRef.current = {
756
+ commentId: comment.id,
757
+ userId: resolvedUserId
758
+ };
759
+ (async () => {
760
+ const result = await checkFollowStatus({
761
+ app_id: 0,
762
+ follower_id: resolvedUserId,
763
+ followee_ids: [comment.user_id]
764
+ });
765
+ if (!result.success || !result.data?.is_following_map) return;
766
+ const isFollowed = Boolean(result.data.is_following_map[comment.user_id]);
767
+ comment.is_follow = isFollowed;
768
+ const next = new Set(followIds);
769
+ if (isFollowed) next.add(comment.user_id);
770
+ else next.delete(comment.user_id);
771
+ setFollowIds(Array.from(next));
772
+ })();
773
+ }, [
774
+ comment,
775
+ followIds,
776
+ resolvedUserId,
777
+ setFollowIds,
778
+ visible
779
+ ]);
780
+ /**
781
+ * 回复回复:定位到输入框。
782
+ */
783
+ const handleReplyComment = useCallback((reply) => {
784
+ setReplyComment(reply);
785
+ setTimeout(() => {
786
+ setIsClickReplyButton(true);
787
+ commentRef.current?.focus();
788
+ }, 10);
789
+ }, []);
790
+ /**
791
+ * 输入框失焦:重置回复态。
792
+ */
793
+ function handleInputBlur() {
794
+ replyDetailDebounce0(() => {
795
+ setIsClickReplyButton(false);
796
+ });
797
+ }
798
+ /**
799
+ * 回复评论(统一入口)。
800
+ */
801
+ async function handlePublishComment({ text, imageVideoInfoList }) {
802
+ /**
803
+ * 统一处理发布失败提示。
804
+ */
805
+ const handlePublishFailure = (result) => {
806
+ if (result.success) return result;
807
+ toast.error(result.message || t("replyDetail.publishReplyFailed"));
808
+ return {
809
+ ...result,
810
+ toastHandled: true
811
+ };
812
+ };
813
+ if (isClickReplyButton) {
814
+ const result = await publishReplyReply({
815
+ text,
816
+ imageVideoInfoList
817
+ });
818
+ setIsClickReplyButton(false);
819
+ return handlePublishFailure(result);
820
+ } else {
821
+ const result = await publishReplyComment({
822
+ text,
823
+ imageVideoInfoList
824
+ });
825
+ setIsClickReplyButton(false);
826
+ return handlePublishFailure(result);
827
+ }
828
+ }
829
+ /**
830
+ * 发布回复评论(直接回复评论)。
831
+ */
832
+ async function publishReplyComment({ text, imageVideoInfoList }) {
833
+ return await onReplyComment?.({
834
+ text,
835
+ imageVideoInfoList,
836
+ callback: (replyId) => {
837
+ const localAtUsers = parseAtUsersFromHtml(text);
838
+ if (!replyId || replyId === "0") return;
839
+ const newReply = mapApiReplayToReplay({
840
+ id: replyId,
841
+ user_id: resolvedUserId,
842
+ user_name: resolvedUserName,
843
+ avatar: resolvedUserAvatar,
844
+ text,
845
+ created_at: getCurrentSecondTime(),
846
+ type: "4",
847
+ nine_grid_content_info: imageVideoInfoList,
848
+ at_users: localAtUsers
849
+ });
850
+ updateReplyListFn?.(newReply);
851
+ }
852
+ }) ?? { success: true };
853
+ }
854
+ /**
855
+ * 发布回复回复(回复某条回复)。
856
+ */
857
+ async function publishReplyReply({ text, imageVideoInfoList }) {
858
+ if (!replyComment?.id || replyComment.id === "0") return {
859
+ success: false,
860
+ message: t("replyDetail.invalidReplyTarget")
861
+ };
862
+ const medias = buildCommentMedias(imageVideoInfoList);
863
+ const mentionedUserIds = parseTextAtUserIds(text);
864
+ const resolvedSourceType = contentType === "video" ? 1 : 2;
865
+ try {
866
+ const result = await pCommunityCreateComment({
867
+ content_id: information.id,
868
+ content: replaceAtUserElement(text),
869
+ medias,
870
+ mentioned_users: mentionedUserIds,
871
+ parent_id: replyComment.id,
872
+ source_type: resolvedSourceType
873
+ }, { revalidate: false });
874
+ if (result.code !== 0) return {
875
+ success: false,
876
+ message: result.message || t("replyDetail.publishReplyFailed")
877
+ };
878
+ const replyId = resolveCreatedCommentId(result.data);
879
+ if (!replyId || replyId === "0") return {
880
+ success: false,
881
+ message: t("replyDetail.publishReplyFailed")
882
+ };
883
+ const newReply = mapApiReplayToReplay({
884
+ id: replyId,
885
+ user_id: resolvedUserId,
886
+ user_name: resolvedUserName,
887
+ avatar: resolvedUserAvatar,
888
+ text,
889
+ created_at: getCurrentSecondTime(),
890
+ type: "4",
891
+ nine_grid_content_info: imageVideoInfoList,
892
+ at_users: parseAtUsersFromHtml(text)
893
+ });
894
+ newReply.parent_reply = replyComment;
895
+ updateReplyListFn?.(newReply);
896
+ onReplyAdded?.();
897
+ return { success: true };
898
+ } catch (error) {
899
+ console.error("发布回复回复失败:", error);
900
+ return {
901
+ success: false,
902
+ message: t("replyDetail.publishReplyFailed")
903
+ };
904
+ }
905
+ }
906
+ const [updateReplyListFn, setUpdateReplyListFn] = useState(null);
907
+ /**
908
+ * 处理更新回复列表的函数。
909
+ */
910
+ const handleReplyListUpdate = useCallback((updateFn) => {
911
+ setUpdateReplyListFn(() => updateFn);
912
+ }, []);
913
+ /**
914
+ * 评论输入框占位符。
915
+ */
916
+ const inputPlaceholder = isClickReplyButton ? `回复@${replyComment.user_name}` : "";
917
+ /**
918
+ * 弹窗开关回调。
919
+ */
920
+ function handleDialogOpenChange(next) {
921
+ if (!next) onClose();
922
+ }
923
+ return /* @__PURE__ */ jsx(Dialog, {
924
+ open: visible,
925
+ onOpenChange: handleDialogOpenChange,
926
+ children: /* @__PURE__ */ jsxs(DialogContent, {
927
+ showCloseButton: false,
928
+ className: "fixed left-0 right-0 bottom-0 top-[84px] z-[1000] h-auto w-full max-w-none translate-x-0 translate-y-0 rounded-none bg-bg2 p-0 text-text1 !flex !flex-col !gap-0",
929
+ children: [/* @__PURE__ */ jsxs("div", {
930
+ className: "w-full h-[60px] bg-bg1 flex items-center justify-center relative",
931
+ children: [/* @__PURE__ */ jsx("button", {
932
+ type: "button",
933
+ className: "w-[48px] focus-within:outline-none focus-within:border-none focus-within:ring-0 h-full flex items-center justify-center absolute left-0 top-0",
934
+ onClick: onClose,
935
+ children: /* @__PURE__ */ jsx(SvgClose, { className: "w-[16px] h-[16px] text-text1" })
936
+ }), /* @__PURE__ */ jsx("span", {
937
+ className: "text-[18px] font-bold",
938
+ children: t("replyDetail.commentDetail")
939
+ })]
940
+ }), /* @__PURE__ */ jsxs("div", {
941
+ className: "flex-1 min-h-0 w-full overflow-y-auto bg-bg2",
942
+ children: [
943
+ /* @__PURE__ */ jsx(ReplyDetailHeader, {
944
+ comment,
945
+ updateFollow: (hasFollow) => {
946
+ comment.is_follow = hasFollow;
947
+ },
948
+ onRequireLogin
949
+ }),
950
+ /* @__PURE__ */ jsx(ReplyList, {
951
+ commentId: comment.id,
952
+ informationId: information.id,
953
+ handleReplyComment,
954
+ onReplyListUpdate: handleReplyListUpdate
955
+ }),
956
+ /* @__PURE__ */ jsx(CommentInput, {
957
+ placeholder: inputPlaceholder,
958
+ onInputBlur: handleInputBlur,
959
+ onPublish: handlePublishComment,
960
+ onRequireLogin,
961
+ ref: commentRef
962
+ })
963
+ ]
964
+ })]
965
+ })
966
+ });
967
+ }
968
+
969
+ //#endregion
970
+ export { ReplyDetail as default };