@tarojs/components 3.5.0-alpha.9 → 3.5.0-beta.2

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 (392) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/{index-4495e5cf.js → index-cd258c8b.js} +1 -27
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/taro-ad-core.cjs.entry.js +2 -2
  5. package/dist/cjs/taro-ad-custom-core.cjs.entry.js +2 -2
  6. package/dist/cjs/taro-audio-core.cjs.entry.js +2 -2
  7. package/dist/cjs/taro-block-core.cjs.entry.js +2 -2
  8. package/dist/cjs/taro-button-core.cjs.entry.js +2 -2
  9. package/dist/cjs/taro-camera-core.cjs.entry.js +2 -2
  10. package/dist/cjs/taro-canvas-core.cjs.entry.js +2 -2
  11. package/dist/cjs/taro-checkbox-core_2.cjs.entry.js +3 -3
  12. package/dist/cjs/taro-components.cjs.js +2 -2
  13. package/dist/cjs/taro-cover-image-core.cjs.entry.js +2 -2
  14. package/dist/cjs/taro-cover-view-core.cjs.entry.js +2 -2
  15. package/dist/cjs/taro-custom-wrapper-core.cjs.entry.js +2 -2
  16. package/dist/cjs/taro-editor-core.cjs.entry.js +2 -2
  17. package/dist/cjs/taro-form-core.cjs.entry.js +2 -2
  18. package/dist/cjs/taro-functional-page-navigator-core.cjs.entry.js +2 -2
  19. package/dist/cjs/taro-icon-core.cjs.entry.js +2 -2
  20. package/dist/cjs/taro-image-core.cjs.entry.js +2 -2
  21. package/dist/cjs/taro-input-core.cjs.entry.js +2 -2
  22. package/dist/cjs/taro-keyboard-accessory-core.cjs.entry.js +2 -2
  23. package/dist/cjs/taro-label-core.cjs.entry.js +2 -2
  24. package/dist/cjs/taro-live-player-core.cjs.entry.js +2 -2
  25. package/dist/cjs/taro-live-pusher-core.cjs.entry.js +2 -2
  26. package/dist/cjs/taro-map-core.cjs.entry.js +2 -2
  27. package/dist/cjs/taro-match-media-core.cjs.entry.js +2 -2
  28. package/dist/cjs/taro-movable-area-core.cjs.entry.js +2 -2
  29. package/dist/cjs/taro-movable-view-core.cjs.entry.js +2 -2
  30. package/dist/cjs/taro-navigation-bar-core.cjs.entry.js +2 -2
  31. package/dist/cjs/taro-navigator-core.cjs.entry.js +2 -2
  32. package/dist/cjs/taro-official-account-core.cjs.entry.js +2 -2
  33. package/dist/cjs/taro-open-data-core.cjs.entry.js +2 -2
  34. package/dist/cjs/taro-page-container-core.cjs.entry.js +2 -2
  35. package/dist/cjs/taro-page-meta-core.cjs.entry.js +2 -2
  36. package/dist/cjs/taro-picker-core_2.cjs.entry.js +3 -3
  37. package/dist/cjs/taro-picker-view-column-core.cjs.entry.js +2 -2
  38. package/dist/cjs/taro-picker-view-core.cjs.entry.js +2 -2
  39. package/dist/cjs/taro-progress-core.cjs.entry.js +2 -2
  40. package/dist/cjs/taro-pull-to-refresh.cjs.entry.js +9 -8
  41. package/dist/cjs/taro-radio-core_2.cjs.entry.js +3 -3
  42. package/dist/cjs/taro-rich-text-core.cjs.entry.js +2 -2
  43. package/dist/cjs/taro-scroll-view-core.cjs.entry.js +2 -2
  44. package/dist/cjs/taro-share-element-core.cjs.entry.js +2 -2
  45. package/dist/cjs/taro-slider-core.cjs.entry.js +2 -2
  46. package/dist/cjs/taro-slot-core.cjs.entry.js +2 -2
  47. package/dist/cjs/taro-swiper-core_2.cjs.entry.js +3 -3
  48. package/dist/cjs/taro-switch-core.cjs.entry.js +2 -2
  49. package/dist/cjs/taro-tabbar.cjs.entry.js +3 -3
  50. package/dist/cjs/taro-text-core.cjs.entry.js +2 -2
  51. package/dist/cjs/taro-textarea-core.cjs.entry.js +2 -2
  52. package/dist/cjs/taro-video-control_3.cjs.entry.js +23 -17
  53. package/dist/cjs/taro-view-core.cjs.entry.js +4 -4
  54. package/dist/cjs/taro-voip-room-core.cjs.entry.js +2 -2
  55. package/dist/cjs/taro-web-view-core.cjs.entry.js +2 -2
  56. package/dist/collection/collection-manifest.json +2 -2
  57. package/dist/collection/components/pull-to-refresh/pull-to-refresh.js +7 -6
  58. package/dist/collection/components/tabbar/tabbar.js +1 -1
  59. package/dist/collection/components/video/style/index.css +0 -1
  60. package/dist/collection/components/video/utils.js +6 -7
  61. package/dist/collection/components/video/video-control.js +3 -3
  62. package/dist/collection/components/video/video.js +10 -3
  63. package/dist/collection/components/view/view.js +2 -2
  64. package/dist/esm/{index-789b3db7.js → index-1d67274c.js} +1 -27
  65. package/dist/esm/loader.js +2 -2
  66. package/dist/esm/polyfills/css-shim.js +1 -1
  67. package/dist/esm/taro-ad-core.entry.js +2 -2
  68. package/dist/esm/taro-ad-custom-core.entry.js +2 -2
  69. package/dist/esm/taro-audio-core.entry.js +2 -2
  70. package/dist/esm/taro-block-core.entry.js +2 -2
  71. package/dist/esm/taro-button-core.entry.js +2 -2
  72. package/dist/esm/taro-camera-core.entry.js +2 -2
  73. package/dist/esm/taro-canvas-core.entry.js +2 -2
  74. package/dist/esm/taro-checkbox-core_2.entry.js +3 -3
  75. package/dist/esm/taro-components.js +2 -2
  76. package/dist/esm/taro-cover-image-core.entry.js +2 -2
  77. package/dist/esm/taro-cover-view-core.entry.js +2 -2
  78. package/dist/esm/taro-custom-wrapper-core.entry.js +2 -2
  79. package/dist/esm/taro-editor-core.entry.js +2 -2
  80. package/dist/esm/taro-form-core.entry.js +2 -2
  81. package/dist/esm/taro-functional-page-navigator-core.entry.js +2 -2
  82. package/dist/esm/taro-icon-core.entry.js +2 -2
  83. package/dist/esm/taro-image-core.entry.js +2 -2
  84. package/dist/esm/taro-input-core.entry.js +2 -2
  85. package/dist/esm/taro-keyboard-accessory-core.entry.js +2 -2
  86. package/dist/esm/taro-label-core.entry.js +2 -2
  87. package/dist/esm/taro-live-player-core.entry.js +2 -2
  88. package/dist/esm/taro-live-pusher-core.entry.js +2 -2
  89. package/dist/esm/taro-map-core.entry.js +2 -2
  90. package/dist/esm/taro-match-media-core.entry.js +2 -2
  91. package/dist/esm/taro-movable-area-core.entry.js +2 -2
  92. package/dist/esm/taro-movable-view-core.entry.js +2 -2
  93. package/dist/esm/taro-navigation-bar-core.entry.js +2 -2
  94. package/dist/esm/taro-navigator-core.entry.js +2 -2
  95. package/dist/esm/taro-official-account-core.entry.js +2 -2
  96. package/dist/esm/taro-open-data-core.entry.js +2 -2
  97. package/dist/esm/taro-page-container-core.entry.js +2 -2
  98. package/dist/esm/taro-page-meta-core.entry.js +2 -2
  99. package/dist/esm/taro-picker-core_2.entry.js +3 -3
  100. package/dist/esm/taro-picker-view-column-core.entry.js +2 -2
  101. package/dist/esm/taro-picker-view-core.entry.js +2 -2
  102. package/dist/esm/taro-progress-core.entry.js +2 -2
  103. package/dist/esm/taro-pull-to-refresh.entry.js +9 -8
  104. package/dist/esm/taro-radio-core_2.entry.js +3 -3
  105. package/dist/esm/taro-rich-text-core.entry.js +2 -2
  106. package/dist/esm/taro-scroll-view-core.entry.js +2 -2
  107. package/dist/esm/taro-share-element-core.entry.js +2 -2
  108. package/dist/esm/taro-slider-core.entry.js +2 -2
  109. package/dist/esm/taro-slot-core.entry.js +2 -2
  110. package/dist/esm/taro-swiper-core_2.entry.js +3 -3
  111. package/dist/esm/taro-switch-core.entry.js +2 -2
  112. package/dist/esm/taro-tabbar.entry.js +3 -3
  113. package/dist/esm/taro-text-core.entry.js +2 -2
  114. package/dist/esm/taro-textarea-core.entry.js +2 -2
  115. package/dist/esm/taro-video-control_3.entry.js +23 -17
  116. package/dist/esm/taro-view-core.entry.js +4 -4
  117. package/dist/esm/taro-voip-room-core.entry.js +2 -2
  118. package/dist/esm/taro-web-view-core.entry.js +2 -2
  119. package/dist/esm-es5/index-1d67274c.js +1 -0
  120. package/dist/esm-es5/loader.js +1 -1
  121. package/dist/esm-es5/taro-ad-core.entry.js +1 -1
  122. package/dist/esm-es5/taro-ad-custom-core.entry.js +1 -1
  123. package/dist/esm-es5/taro-audio-core.entry.js +1 -1
  124. package/dist/esm-es5/taro-block-core.entry.js +1 -1
  125. package/dist/esm-es5/taro-button-core.entry.js +1 -1
  126. package/dist/esm-es5/taro-camera-core.entry.js +1 -1
  127. package/dist/esm-es5/taro-canvas-core.entry.js +1 -1
  128. package/dist/esm-es5/taro-checkbox-core_2.entry.js +1 -1
  129. package/dist/esm-es5/taro-components.js +1 -1
  130. package/dist/esm-es5/taro-cover-image-core.entry.js +1 -1
  131. package/dist/esm-es5/taro-cover-view-core.entry.js +1 -1
  132. package/dist/esm-es5/taro-custom-wrapper-core.entry.js +1 -1
  133. package/dist/esm-es5/taro-editor-core.entry.js +1 -1
  134. package/dist/esm-es5/taro-form-core.entry.js +1 -1
  135. package/dist/esm-es5/taro-functional-page-navigator-core.entry.js +1 -1
  136. package/dist/esm-es5/taro-icon-core.entry.js +1 -1
  137. package/dist/esm-es5/taro-image-core.entry.js +1 -1
  138. package/dist/esm-es5/taro-input-core.entry.js +1 -1
  139. package/dist/esm-es5/taro-keyboard-accessory-core.entry.js +1 -1
  140. package/dist/esm-es5/taro-label-core.entry.js +1 -1
  141. package/dist/esm-es5/taro-live-player-core.entry.js +1 -1
  142. package/dist/esm-es5/taro-live-pusher-core.entry.js +1 -1
  143. package/dist/esm-es5/taro-map-core.entry.js +1 -1
  144. package/dist/esm-es5/taro-match-media-core.entry.js +1 -1
  145. package/dist/esm-es5/taro-movable-area-core.entry.js +1 -1
  146. package/dist/esm-es5/taro-movable-view-core.entry.js +1 -1
  147. package/dist/esm-es5/taro-navigation-bar-core.entry.js +1 -1
  148. package/dist/esm-es5/taro-navigator-core.entry.js +1 -1
  149. package/dist/esm-es5/taro-official-account-core.entry.js +1 -1
  150. package/dist/esm-es5/taro-open-data-core.entry.js +1 -1
  151. package/dist/esm-es5/taro-page-container-core.entry.js +1 -1
  152. package/dist/esm-es5/taro-page-meta-core.entry.js +1 -1
  153. package/dist/esm-es5/taro-picker-core_2.entry.js +1 -1
  154. package/dist/esm-es5/taro-picker-view-column-core.entry.js +1 -1
  155. package/dist/esm-es5/taro-picker-view-core.entry.js +1 -1
  156. package/dist/esm-es5/taro-progress-core.entry.js +1 -1
  157. package/dist/esm-es5/taro-pull-to-refresh.entry.js +1 -1
  158. package/dist/esm-es5/taro-radio-core_2.entry.js +1 -1
  159. package/dist/esm-es5/taro-rich-text-core.entry.js +1 -1
  160. package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -1
  161. package/dist/esm-es5/taro-share-element-core.entry.js +1 -1
  162. package/dist/esm-es5/taro-slider-core.entry.js +1 -1
  163. package/dist/esm-es5/taro-slot-core.entry.js +1 -1
  164. package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
  165. package/dist/esm-es5/taro-switch-core.entry.js +1 -1
  166. package/dist/esm-es5/taro-tabbar.entry.js +1 -1
  167. package/dist/esm-es5/taro-text-core.entry.js +1 -1
  168. package/dist/esm-es5/taro-textarea-core.entry.js +1 -1
  169. package/dist/esm-es5/taro-video-control_3.entry.js +2 -2
  170. package/dist/esm-es5/taro-view-core.entry.js +1 -1
  171. package/dist/esm-es5/taro-voip-room-core.entry.js +1 -1
  172. package/dist/esm-es5/taro-web-view-core.entry.js +1 -1
  173. package/dist/taro-components/p-06352f55.entry.js +1 -0
  174. package/dist/taro-components/p-085c4322.entry.js +1 -0
  175. package/dist/taro-components/p-087d704b.entry.js +1 -0
  176. package/dist/taro-components/p-0afc53da.entry.js +1 -0
  177. package/dist/taro-components/{p-61645135.system.entry.js → p-12615394.system.entry.js} +55 -55
  178. package/dist/taro-components/p-13359eb6.system.entry.js +1 -0
  179. package/dist/taro-components/p-1398c59d.system.entry.js +1 -0
  180. package/dist/taro-components/p-13d03572.entry.js +1 -0
  181. package/dist/taro-components/p-14484d41.entry.js +1 -0
  182. package/dist/taro-components/p-14b26b5f.system.entry.js +1 -0
  183. package/dist/taro-components/p-176374d6.system.entry.js +1 -0
  184. package/dist/taro-components/p-17b78ad7.entry.js +1 -0
  185. package/dist/taro-components/p-1b11a8d4.system.entry.js +1 -0
  186. package/dist/taro-components/p-1d5fa0f3.entry.js +1 -0
  187. package/dist/taro-components/p-1e44fcfd.entry.js +1 -0
  188. package/dist/taro-components/p-1fbf755f.entry.js +1 -0
  189. package/dist/taro-components/{p-407aada8.system.entry.js → p-221bffa0.system.entry.js} +1 -1
  190. package/dist/taro-components/{p-bfd76333.system.entry.js → p-24cc05ea.system.entry.js} +1 -1
  191. package/dist/taro-components/{p-55da9401.system.entry.js → p-2afb4d49.system.entry.js} +1 -1
  192. package/dist/taro-components/p-2c4dea36.system.entry.js +1 -0
  193. package/dist/taro-components/p-34d60fc8.entry.js +1 -0
  194. package/dist/taro-components/p-37ac3d2b.system.entry.js +1 -0
  195. package/dist/taro-components/p-3b067d1f.entry.js +1 -0
  196. package/dist/taro-components/p-3e1e4626.entry.js +1 -0
  197. package/dist/taro-components/p-3e7aced1.entry.js +1 -0
  198. package/dist/taro-components/{p-3774a0b9.system.entry.js → p-3efae2a3.system.entry.js} +1 -1
  199. package/dist/taro-components/p-44996bd6.system.js +1 -0
  200. package/dist/taro-components/p-45574a38.system.entry.js +1 -0
  201. package/dist/taro-components/{p-5ebf2333.system.entry.js → p-45b92229.system.entry.js} +1 -1
  202. package/dist/taro-components/{p-c090756b.system.entry.js → p-49df1b65.system.entry.js} +1 -1
  203. package/dist/taro-components/{p-7be1a0bb.system.entry.js → p-4a0599c1.system.entry.js} +1 -1
  204. package/dist/taro-components/{p-8554900a.system.entry.js → p-4cb60cf0.system.entry.js} +1 -1
  205. package/dist/taro-components/{p-96232b22.system.entry.js → p-52cbf36e.system.entry.js} +1 -1
  206. package/dist/taro-components/p-546f5965.system.entry.js +1 -0
  207. package/dist/taro-components/p-549636ca.entry.js +1 -0
  208. package/dist/taro-components/p-55646f03.entry.js +1 -0
  209. package/dist/taro-components/p-5656b308.system.entry.js +1 -0
  210. package/dist/taro-components/p-58cbfd17.entry.js +1 -0
  211. package/dist/taro-components/{p-c36df190.system.entry.js → p-5e48f1b4.system.entry.js} +1 -1
  212. package/dist/taro-components/p-615b87e8.entry.js +1 -0
  213. package/dist/taro-components/{p-4e108995.system.entry.js → p-617f5e2a.system.entry.js} +1 -1
  214. package/dist/taro-components/p-68246408.entry.js +1 -0
  215. package/dist/taro-components/{p-0141754f.system.entry.js → p-6946f166.system.entry.js} +1 -1
  216. package/dist/taro-components/p-6e12bd70.system.entry.js +1 -0
  217. package/dist/taro-components/{p-36727043.entry.js → p-7419e765.entry.js} +1 -1
  218. package/dist/taro-components/{p-a3933a47.system.entry.js → p-79495606.system.entry.js} +1 -1
  219. package/dist/taro-components/p-7d457a6a.entry.js +1 -0
  220. package/dist/taro-components/p-7df1437d.system.entry.js +1 -0
  221. package/dist/taro-components/{p-d6e42063.system.entry.js → p-7f2d456b.system.entry.js} +1 -1
  222. package/dist/taro-components/p-7f726d39.entry.js +1 -0
  223. package/dist/taro-components/p-7f8ddefe.entry.js +1 -0
  224. package/dist/taro-components/p-81e33437.system.entry.js +1 -0
  225. package/dist/taro-components/p-880791ee.entry.js +1 -0
  226. package/dist/taro-components/p-884e6eab.entry.js +1 -0
  227. package/dist/taro-components/p-88e3bc92.entry.js +1 -0
  228. package/dist/taro-components/p-88ee404a.system.entry.js +1 -0
  229. package/dist/taro-components/{p-780c1853.system.entry.js → p-899c6b73.system.entry.js} +1 -1
  230. package/dist/taro-components/p-8a2b7701.entry.js +1 -0
  231. package/dist/taro-components/p-8c6d8802.entry.js +1 -0
  232. package/dist/taro-components/p-8c7cf814.js +1 -0
  233. package/dist/taro-components/p-8ca394d6.entry.js +1 -0
  234. package/dist/taro-components/p-8cdc809b.system.entry.js +1 -0
  235. package/dist/taro-components/{p-a66340b0.system.entry.js → p-8e0529f2.system.entry.js} +1 -1
  236. package/dist/taro-components/{p-4c8f288d.system.entry.js → p-8ea9ceb6.system.entry.js} +1 -1
  237. package/dist/taro-components/{p-97e8bb30.system.entry.js → p-90f11b84.system.entry.js} +1 -1
  238. package/dist/taro-components/p-917185f3.entry.js +1 -0
  239. package/dist/taro-components/p-92f26e22.entry.js +1 -0
  240. package/dist/taro-components/p-96706c5c.system.entry.js +1 -0
  241. package/dist/taro-components/{p-40711024.system.entry.js → p-9c0f3f24.system.entry.js} +1 -1
  242. package/dist/taro-components/{p-b3eaf173.entry.js → p-9eb01395.entry.js} +2 -2
  243. package/dist/taro-components/{p-8194107c.system.entry.js → p-9f23c9e1.system.entry.js} +1 -1
  244. package/dist/taro-components/p-9ff180ae.entry.js +1 -0
  245. package/dist/taro-components/{p-f2fa2c75.system.js → p-a2fd3c03.system.js} +1 -1
  246. package/dist/taro-components/p-a9c3e575.entry.js +1 -0
  247. package/dist/taro-components/{p-431dd581.system.entry.js → p-ac4c4975.system.entry.js} +1 -1
  248. package/dist/taro-components/p-aca73ca4.entry.js +1 -0
  249. package/dist/taro-components/p-acb07924.system.entry.js +1 -0
  250. package/dist/taro-components/{p-99b8a7a2.system.entry.js → p-acfcb861.system.entry.js} +1 -1
  251. package/dist/taro-components/p-b31e6cf0.entry.js +1 -0
  252. package/dist/taro-components/p-b455351e.entry.js +1 -0
  253. package/dist/taro-components/p-b640bd56.entry.js +1 -0
  254. package/dist/taro-components/{p-1ae9ff34.system.entry.js → p-b7128eac.system.entry.js} +1 -1
  255. package/dist/taro-components/{p-c2a225ef.system.entry.js → p-ba984b34.system.entry.js} +1 -1
  256. package/dist/taro-components/p-c0875abf.entry.js +1 -0
  257. package/dist/taro-components/p-c1642977.entry.js +1 -0
  258. package/dist/taro-components/p-c33b552b.entry.js +1 -0
  259. package/dist/taro-components/p-c6d14c2b.entry.js +1 -0
  260. package/dist/taro-components/p-c995a3aa.entry.js +1 -0
  261. package/dist/taro-components/p-cde242bb.system.entry.js +1 -0
  262. package/dist/taro-components/p-de726095.entry.js +1 -0
  263. package/dist/taro-components/{p-a06fb894.system.entry.js → p-de95c6ac.system.entry.js} +1 -1
  264. package/dist/taro-components/{p-1a01e5a6.system.entry.js → p-deef9af1.system.entry.js} +1 -1
  265. package/dist/taro-components/p-e5486e8c.system.entry.js +1 -0
  266. package/dist/taro-components/p-e56a303b.entry.js +1 -0
  267. package/dist/taro-components/p-e5fdbc1c.entry.js +1 -0
  268. package/dist/taro-components/p-e6ec7abc.entry.js +1 -0
  269. package/dist/taro-components/{p-5d8ba574.system.entry.js → p-ed69dc55.system.entry.js} +1 -1
  270. package/dist/taro-components/p-ee1ffbb0.entry.js +1 -0
  271. package/dist/taro-components/{p-42b45ac3.system.entry.js → p-efc892d1.system.entry.js} +1 -1
  272. package/dist/taro-components/{p-954862dc.system.entry.js → p-f0c5c933.system.entry.js} +1 -1
  273. package/dist/taro-components/p-f425f3b5.entry.js +1 -0
  274. package/dist/taro-components/p-f5377a15.entry.js +1 -0
  275. package/dist/taro-components/{p-1900c26d.system.entry.js → p-f675e927.system.entry.js} +1 -1
  276. package/dist/taro-components/p-fee2ad82.entry.js +1 -0
  277. package/dist/taro-components/p-ff792cf7.system.entry.js +1 -0
  278. package/dist/taro-components/taro-components.esm.js +1 -1
  279. package/dist/taro-components/taro-components.js +1 -1
  280. package/dist/types/components/video/utils.d.ts +1 -3
  281. package/dist/types/components/video/video-control.d.ts +1 -1
  282. package/dist/types/home/runner/work/taro/taro/packages/taro-components/.stencil/types/props.d.ts +3 -3
  283. package/dist-h5/react/components/index.js +63 -0
  284. package/dist-h5/react/index.js +1 -46
  285. package/dist-h5/react/utils/reactify-wc.js +1 -1
  286. package/dist-h5/vue/components/index.js +60 -0
  287. package/dist-h5/vue/index.js +23 -26
  288. package/dist-h5/vue3/components/index.js +64 -0
  289. package/dist-h5/vue3/createFormsComponent.js +1 -1
  290. package/dist-h5/vue3/index.js +12 -65
  291. package/package.json +4 -4
  292. package/types/Ad.d.ts +6 -6
  293. package/types/Button.d.ts +12 -12
  294. package/types/Camera.d.ts +10 -10
  295. package/types/Canvas.d.ts +1 -1
  296. package/types/Checkbox.d.ts +4 -4
  297. package/types/CheckboxGroup.d.ts +3 -3
  298. package/types/Form.d.ts +2 -2
  299. package/types/Input.d.ts +19 -19
  300. package/types/LivePlayer.d.ts +8 -8
  301. package/types/Map.d.ts +28 -28
  302. package/types/MovableArea.d.ts +1 -1
  303. package/types/MovableView.d.ts +18 -18
  304. package/types/OpenData.d.ts +6 -6
  305. package/types/PageContainer.d.ts +14 -14
  306. package/types/Radio.d.ts +5 -5
  307. package/types/RadioGroup.d.ts +2 -2
  308. package/types/RichText.d.ts +6 -1
  309. package/types/Swiper.d.ts +5 -5
  310. package/types/Switch.d.ts +2 -2
  311. package/types/Textarea.d.ts +21 -21
  312. package/types/Video.d.ts +13 -13
  313. package/types/WebView.d.ts +5 -5
  314. package/types/props.ts +3 -4
  315. package/virtual-list/memoize.js +1 -0
  316. package/virtual-list/react/createListComponent.js +2 -1
  317. package/virtual-list/react/index.js +2 -1
  318. package/virtual-list/timer.js +1 -1
  319. package/virtual-list/vue/index.js +1 -1
  320. package/dist/esm-es5/index-789b3db7.js +0 -1
  321. package/dist/taro-components/p-02282c70.system.entry.js +0 -1
  322. package/dist/taro-components/p-0674e57b.system.js +0 -1
  323. package/dist/taro-components/p-0adcc512.entry.js +0 -1
  324. package/dist/taro-components/p-107c83e4.system.entry.js +0 -1
  325. package/dist/taro-components/p-15f00e71.entry.js +0 -1
  326. package/dist/taro-components/p-1da081b6.entry.js +0 -1
  327. package/dist/taro-components/p-2927361f.entry.js +0 -1
  328. package/dist/taro-components/p-29f2cbdf.system.entry.js +0 -1
  329. package/dist/taro-components/p-2e78c090.entry.js +0 -1
  330. package/dist/taro-components/p-34477097.system.entry.js +0 -1
  331. package/dist/taro-components/p-3546a833.entry.js +0 -1
  332. package/dist/taro-components/p-3eb5219a.entry.js +0 -1
  333. package/dist/taro-components/p-404fbc7c.entry.js +0 -1
  334. package/dist/taro-components/p-44aa312d.system.entry.js +0 -1
  335. package/dist/taro-components/p-4651474c.entry.js +0 -1
  336. package/dist/taro-components/p-47484bac.system.entry.js +0 -1
  337. package/dist/taro-components/p-47eb9dcc.entry.js +0 -1
  338. package/dist/taro-components/p-497a5d9a.entry.js +0 -1
  339. package/dist/taro-components/p-4d4637df.entry.js +0 -1
  340. package/dist/taro-components/p-4eda1f6b.entry.js +0 -1
  341. package/dist/taro-components/p-518e7b29.entry.js +0 -1
  342. package/dist/taro-components/p-52033dd2.entry.js +0 -1
  343. package/dist/taro-components/p-52e0c86e.system.entry.js +0 -1
  344. package/dist/taro-components/p-557d86fe.entry.js +0 -1
  345. package/dist/taro-components/p-5d51b5b0.entry.js +0 -1
  346. package/dist/taro-components/p-64e67d96.system.entry.js +0 -1
  347. package/dist/taro-components/p-720134e9.system.entry.js +0 -1
  348. package/dist/taro-components/p-7309764b.entry.js +0 -1
  349. package/dist/taro-components/p-75c07a8d.system.entry.js +0 -1
  350. package/dist/taro-components/p-76ab644c.entry.js +0 -1
  351. package/dist/taro-components/p-783af5b6.entry.js +0 -1
  352. package/dist/taro-components/p-7868d50a.system.entry.js +0 -1
  353. package/dist/taro-components/p-7b43bfe6.entry.js +0 -1
  354. package/dist/taro-components/p-7c5be4ff.entry.js +0 -1
  355. package/dist/taro-components/p-7ee03392.system.entry.js +0 -1
  356. package/dist/taro-components/p-87282837.entry.js +0 -1
  357. package/dist/taro-components/p-8870f200.entry.js +0 -1
  358. package/dist/taro-components/p-89b902ef.entry.js +0 -1
  359. package/dist/taro-components/p-8ab7c95f.entry.js +0 -1
  360. package/dist/taro-components/p-8b9fdd2d.entry.js +0 -1
  361. package/dist/taro-components/p-8e56fb48.entry.js +0 -1
  362. package/dist/taro-components/p-8fd6b016.entry.js +0 -1
  363. package/dist/taro-components/p-95bd702e.entry.js +0 -1
  364. package/dist/taro-components/p-a0c6319e.entry.js +0 -1
  365. package/dist/taro-components/p-a296ef29.entry.js +0 -1
  366. package/dist/taro-components/p-a39fc58e.entry.js +0 -1
  367. package/dist/taro-components/p-a5b29178.system.entry.js +0 -1
  368. package/dist/taro-components/p-a64d8c69.entry.js +0 -1
  369. package/dist/taro-components/p-abe4452a.entry.js +0 -1
  370. package/dist/taro-components/p-b1cf6698.system.entry.js +0 -1
  371. package/dist/taro-components/p-b6956e54.entry.js +0 -1
  372. package/dist/taro-components/p-be4406bd.system.entry.js +0 -1
  373. package/dist/taro-components/p-c28a79eb.entry.js +0 -1
  374. package/dist/taro-components/p-c503bd98.system.entry.js +0 -1
  375. package/dist/taro-components/p-ca1f541c.system.entry.js +0 -1
  376. package/dist/taro-components/p-cabc377f.entry.js +0 -1
  377. package/dist/taro-components/p-cf9e80c9.entry.js +0 -1
  378. package/dist/taro-components/p-d1c28dd0.entry.js +0 -1
  379. package/dist/taro-components/p-d21dd145.js +0 -1
  380. package/dist/taro-components/p-d5bfba7d.entry.js +0 -1
  381. package/dist/taro-components/p-df00945b.entry.js +0 -1
  382. package/dist/taro-components/p-e28a1c0e.entry.js +0 -1
  383. package/dist/taro-components/p-e43c8d69.system.entry.js +0 -1
  384. package/dist/taro-components/p-f201d652.system.entry.js +0 -1
  385. package/dist/taro-components/p-f2add48e.entry.js +0 -1
  386. package/dist/taro-components/p-f46523cb.entry.js +0 -1
  387. package/dist/taro-components/p-f4e38010.entry.js +0 -1
  388. package/dist/taro-components/p-f7fc979d.entry.js +0 -1
  389. package/dist/taro-components/p-f8eb7e74.system.entry.js +0 -1
  390. package/dist/taro-components/p-fb1de68d.entry.js +0 -1
  391. package/dist/taro-components/p-fbf0fb63.entry.js +0 -1
  392. package/dist-h5/vue/simpleComponents.js +0 -19
@@ -1 +1 @@
1
- import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-789b3db7.js";var indexCss="taro-switch-core{display:inline-block;width:52px;height:32px}taro-switch-core .weui-switch{display:block;width:100%;height:100%}";var Switch=function(){function e(e){var t=this;registerInstance(this,e);this.onChange=createEvent(this,"change",7);this.type="switch";this.checked=false;this.color="#04BE02";this.disabled=false;this.nativeProps={};this.isWillLoadCalled=false;this.switchChange=function(e){e.stopPropagation();var i=e.target.checked;t.isChecked=i;t.onChange.emit({value:i})}}e.prototype.function=function(e,t){if(!this.isWillLoadCalled)return;if(e!==t)this.isChecked=e};e.prototype.componentWillLoad=function(){this.isWillLoadCalled=true;this.isChecked=this.checked};e.prototype.componentDidLoad=function(){var e=this;Object.defineProperty(this.el,"value",{get:function(){return e.isChecked},configurable:true})};e.prototype.render=function(){var e=this,t=e.type,i=e.color,n=e.isChecked,r=e.name,s=e.disabled,o=e.nativeProps;var c=n?{borderColor:i||"04BE02",backgroundColor:i||"04BE02"}:{};return h("input",Object.assign({type:"checkbox",class:"weui-".concat(t),style:c,checked:n,name:r,disabled:s,onChange:this.switchChange},o))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{checked:["function"]}},enumerable:false,configurable:true});return e}();Switch.style=indexCss;export{Switch as taro_switch_core};
1
+ import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-1d67274c.js";var indexCss="taro-switch-core{display:inline-block;width:52px;height:32px}taro-switch-core .weui-switch{display:block;width:100%;height:100%}";var Switch=function(){function e(e){var t=this;registerInstance(this,e);this.onChange=createEvent(this,"change",7);this.type="switch";this.checked=false;this.color="#04BE02";this.disabled=false;this.nativeProps={};this.isWillLoadCalled=false;this.switchChange=function(e){e.stopPropagation();var i=e.target.checked;t.isChecked=i;t.onChange.emit({value:i})}}e.prototype.function=function(e,t){if(!this.isWillLoadCalled)return;if(e!==t)this.isChecked=e};e.prototype.componentWillLoad=function(){this.isWillLoadCalled=true;this.isChecked=this.checked};e.prototype.componentDidLoad=function(){var e=this;Object.defineProperty(this.el,"value",{get:function(){return e.isChecked},configurable:true})};e.prototype.render=function(){var e=this,t=e.type,i=e.color,n=e.isChecked,r=e.name,s=e.disabled,o=e.nativeProps;var c=n?{borderColor:i||"04BE02",backgroundColor:i||"04BE02"}:{};return h("input",Object.assign({type:"checkbox",class:"weui-"+t,style:c,checked:n,name:r,disabled:s,onChange:this.switchChange},o))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{checked:["function"]}},enumerable:false,configurable:true});return e}();Switch.style=indexCss;export{Switch as taro_switch_core};
@@ -1 +1 @@
1
- var __spreadArray=this&&this.__spreadArray||function(e,a,t){if(t||arguments.length===2)for(var r=0,o=a.length,n;r<o;r++){if(n||!(r in a)){if(!n)n=Array.prototype.slice.call(a,0,r);n[r]=a[r]}}return e.concat(n||Array.prototype.slice.call(a))};import{h,r as registerInstance,c as createEvent,H as Host,g as getElement}from"./index-789b3db7.js";import Taro from"@tarojs/taro";import{c as classnames}from"./index-cd1a2d33.js";var splitUrl=function(e){var a=e||"";var t;var r={path:null,query:null,fragment:null};t=a.indexOf("#");if(t>-1){r.fragment=a.substring(t+1);a=a.substring(0,t)}t=a.indexOf("?");if(t>-1){r.query=a.substring(t+1);a=a.substring(0,t)}r.path=a;return r};function isAbsolute(e){return e.charAt(0)==="/"}function spliceOne(e,a){for(var t=a,r=t+1,o=e.length;r<o;t+=1,r+=1){e[t]=e[r]}e.pop()}function resolvePathname(e,a){if(a===undefined)a="";var t=e&&e.split("/")||[];var r=a&&a.split("/")||[];var o=e&&isAbsolute(e);var n=a&&isAbsolute(a);var s=o||n;if(e&&isAbsolute(e)){r=t}else if(t.length){r.pop();r=r.concat(t)}if(!r.length)return"/";var i;if(r.length){var l=r[r.length-1];i=l==="."||l===".."||l===""}else{i=false}var d=0;for(var b=r.length;b>=0;b--){var h=r[b];if(h==="."){spliceOne(r,b)}else if(h===".."){spliceOne(r,b);d++}else if(d){spliceOne(r,b);d--}}if(!s)for(;d--;d)r.unshift("..");if(s&&r[0]!==""&&(!r[0]||!isAbsolute(r[0])))r.unshift("");var c=r.join("/");if(i&&c.substr(-1)!=="/")c+="/";return c}var TabbarItem=function(e){var a=e.index,t=e.isSelected,r=t===void 0?false:t,o=e.textColor,n=e.iconPath,s=e.badgeText,i=e.showRedDot,l=i===void 0?false:i,d=e.text,b=e.onSelect;var c=classnames("weui-tabbar__item",{"weui-bar__item_on":r});var f={position:"absolute",top:"-2px",right:"-13px"};var u={position:"absolute",top:"0",right:"-6px"};function v(){b(a)}return h("a",{key:a,href:"javascript:;",class:c,onClick:v},h("span",{style:{display:"inline-block",position:"relative"}},h("img",{src:n,alt:"",class:"weui-tabbar__icon"}),!!s&&h("span",{class:"weui-badge taro-tabbar-badge",style:f},s),l&&h("span",{class:"weui-badge weui-badge_dot",style:u})),h("p",{class:"weui-tabbar__label",style:{color:o}},d))};var indexCss="html,body{height:100%}#app{height:100%}.taro-tabbar__border-white::before{border-top-color:#fff !important}.taro-tabbar__container{display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex-direction:column;flex-direction:column;height:100%}.taro-tabbar__panel{overflow:auto;position:relative;-ms-flex:1;flex:1;-webkit-overflow-scrolling:auto}.taro-tabbar__tabbar{position:relative;width:100%;height:50px;-webkit-transition:bottom 0.2s, top 0.2s;transition:bottom 0.2s, top 0.2s}.taro-tabbar__tabbar-top{top:0}.taro-tabbar__tabbar-bottom{bottom:0;margin-bottom:constant(safe-area-inset-bottom);margin-bottom:env(safe-area-inset-bottom)}.taro-tabbar__tabbar-hide{display:none}.taro-tabbar__tabbar-slideout{top:-52px;-ms-flex:0 0;flex:0 0}.taro-tabbar__panel+.taro-tabbar__tabbar-slideout{top:auto;bottom:-52px}";var addLeadingSlash=function(e){if(e===void 0){e=""}return e[0]==="/"?e:"/".concat(e)};var hasBasename=function(e,a){if(e===void 0){e=""}if(a===void 0){a=""}return new RegExp("^"+a+"(\\/|\\?|#|$)","i").test(e)};var stripBasename=function(e,a){if(e===void 0){e=""}if(a===void 0){a=""}return hasBasename(e,a)?e.substr(a.length):e};var stripSuffix=function(e,a){if(e===void 0){e=""}if(a===void 0){a=""}return e.includes(a)?e.substring(0,e.length-a.length):e};var STATUS_SHOW=0;var STATUS_HIDE=1;var STATUS_SLIDEOUT=2;var basicTabBarClassName="taro-tabbar__tabbar";var hideTabBarClassName="taro-tabbar__tabbar-hide";var hideTabBarWithAnimationClassName="taro-tabbar__tabbar-slideout";var Tabbar=function(){function e(e){var a=this;registerInstance(this,e);this.onLongPress=createEvent(this,"longpress",7);this.homePage="";this.customRoutes=[];this.tabbarPos="bottom";this.selectedIndex=-1;this.status=STATUS_SHOW;this.getOriginUrl=function(e){var t=a.customRoutes.filter((function(a){var t=a[1];var r=splitUrl(t).path;var o=splitUrl(e).path;return r===o}));return stripSuffix(t.length?t[0][0]:e,".html")};this.getSelectedIndex=function(e){var t=-1;a.list.forEach((function(a,r){var o=a.pagePath;var n=splitUrl(e).path;var s=splitUrl(o).path;if(n===s){t=r}}));return t};this.switchTab=function(e){a.selectedIndex=e;Taro.switchTab({url:a.list[e].pagePath})};this.switchTabHandler=function(e){var t=e.url,r=e.successHandler,o=e.errorHandler;var n=a.getOriginUrl(a.getCurrentUrl()||a.homePage);var s=resolvePathname(t,n);var i=a.getSelectedIndex(s);if(i>-1){a.switchTab(i);r({errMsg:"switchTab:ok"})}else{o({errMsg:'switchTab:fail page "'.concat(s,'" is not found')})}};this.routerChangeHandler=function(e){var t;var r=(t=e===null||e===void 0?void 0:e.toLocation)===null||t===void 0?void 0:t.path;var o;if(typeof r==="string"){var n=a.conf.basename||"/";o=stripBasename(addLeadingSlash(r||a.homePage),n)}else{o=a.getCurrentUrl()}a.selectedIndex=a.getSelectedIndex(a.getOriginUrl(o))};this.setTabBarBadgeHandler=function(e){var t=e.index,r=e.text,o=e.successHandler,n=e.errorHandler;var s=__spreadArray([],a.list,true);if(t in s){s[t].showRedDot=false;s[t].badgeText=r;o({errMsg:"setTabBarBadge:ok"})}else{n({errMsg:"setTabBarBadge:fail tabbar item not found"})}a.list=s};this.removeTabBarBadgeHandler=function(e){var t=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],a.list,true);if(t in n){n[t].badgeText=null;n[t].badgeText=null;r({errMsg:"removeTabBarBadge:ok"})}else{o({errMsg:"removeTabBarBadge:fail tabbar item not found"})}a.list=n};this.showTabBarRedDotHandler=function(e){var t=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],a.list,true);if(t in n){n[t].badgeText=null;n[t].showRedDot=true;r({errMsg:"showTabBarRedDot:ok"})}else{o({errMsg:"showTabBarRedDot:fail tabbar item not found"})}a.list=n};this.hideTabBarRedDotHandler=function(e){var t=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],a.list,true);if(t in n){n[t].showRedDot=false;r({errMsg:"hideTabBarRedDot:ok"})}else{o({errMsg:"hideTabBarRedDot:fail tabbar item not found"})}a.list=n};this.showTabBarHandler=function(e){var t=e.successHandler;a.status=STATUS_SHOW;t({errMsg:"showTabBar:ok"})};this.hideTabBarHandler=function(e){var t=e.animation,r=e.successHandler;a.status=t?STATUS_SLIDEOUT:STATUS_HIDE;r({errMsg:"hideTabBar:ok"})};this.setTabBarStyleHandler=function(e){var t=e.color,r=e.selectedColor,o=e.backgroundColor,n=e.borderStyle,s=e.successHandler;if(o)a.backgroundColor=o;if(n)a.borderStyle=n;if(t)a.color=t;if(r)a.selectedColor=r;s({errMsg:"setTabBarStyle:ok"})};this.setTabBarItemHandler=function(e){var t=e.index,r=e.iconPath,o=e.selectedIconPath,n=e.text,s=e.successHandler,i=e.errorHandler;var l=__spreadArray([],a.list,true);if(t in l){if(r)l[t].iconPath=r;if(o)l[t].selectedIconPath=o;if(n)l[t].text=n;s({errMsg:"setTabBarItem:ok"})}else{i({errMsg:"setTabBarItem:fail tabbar item not found"})}a.list=l};var t=this.conf.list;var r=this.conf.customRoutes;if(Object.prototype.toString.call(t)!=="[object Array]"||t.length<2||t.length>5){throw new Error("tabBar 配置错误")}this.homePage=addLeadingSlash(this.conf.homePage);var o=function(e){var a;var t=r[e];e=addLeadingSlash(e);if(typeof t==="string"){n.customRoutes.push([e,addLeadingSlash(t)])}else if((t===null||t===void 0?void 0:t.length)>0){(a=n.customRoutes).push.apply(a,t.map((function(a){return[e,addLeadingSlash(a)]})))}};var n=this;for(var s in r){o(s)}t.forEach((function(e){if(e.pagePath.indexOf("/")!==0){e.pagePath="/"+e.pagePath}}));this.list=t;this.borderStyle=this.conf.borderStyle;this.backgroundColor=this.conf.backgroundColor;this.color=this.conf.color;this.selectedColor=this.conf.selectedColor}e.prototype.getCurrentUrl=function(){var e=this.conf.mode;var a=this.conf.basename||"/";var t;if(e==="hash"){var r=window.location.href;var o=r.indexOf("#");t=o===-1?"":r.substring(o+1)}else{t=location.pathname}var n=addLeadingSlash(stripBasename(t,a));return decodeURI(n==="/"?this.homePage:n)};e.prototype.bindEvent=function(){Taro.eventCenter.on("__taroRouterChange",this.routerChangeHandler);Taro.eventCenter.on("__taroSwitchTab",this.switchTabHandler);Taro.eventCenter.on("__taroSetTabBarBadge",this.setTabBarBadgeHandler);Taro.eventCenter.on("__taroRemoveTabBarBadge",this.removeTabBarBadgeHandler);Taro.eventCenter.on("__taroShowTabBarRedDotHandler",this.showTabBarRedDotHandler);Taro.eventCenter.on("__taroHideTabBarRedDotHandler",this.hideTabBarRedDotHandler);Taro.eventCenter.on("__taroShowTabBar",this.showTabBarHandler);Taro.eventCenter.on("__taroHideTabBar",this.hideTabBarHandler);Taro.eventCenter.on("__taroSetTabBarStyle",this.setTabBarStyleHandler);Taro.eventCenter.on("__taroSetTabBarItem",this.setTabBarItemHandler)};e.prototype.removeEvent=function(){Taro.eventCenter.off("__taroRouterChange",this.routerChangeHandler);Taro.eventCenter.off("__taroSwitchTab",this.switchTabHandler);Taro.eventCenter.off("__taroSetTabBarBadge",this.setTabBarBadgeHandler);Taro.eventCenter.off("__taroRemoveTabBarBadge",this.removeTabBarBadgeHandler);Taro.eventCenter.off("__taroShowTabBarRedDotHandler",this.showTabBarRedDotHandler);Taro.eventCenter.off("__taroHideTabBarRedDotHandler",this.hideTabBarRedDotHandler);Taro.eventCenter.off("__taroShowTabBar",this.showTabBarHandler);Taro.eventCenter.off("__taroHideTabBar",this.hideTabBarHandler);Taro.eventCenter.off("__taroSetTabBarStyle",this.setTabBarStyleHandler);Taro.eventCenter.off("__taroSetTabBarItem",this.setTabBarItemHandler)};e.prototype.componentDidLoad=function(){this.tabbarPos=this.tabbar.nextElementSibling?"top":"bottom";this.bindEvent();this.routerChangeHandler()};e.prototype.disconnectedCallback=function(){this.removeEvent()};e.prototype.render=function(){var e,a;var t=this;var r=this.tabbarPos,o=r===void 0?"bottom":r;var n=this.status;var s=classnames("weui-tabbar",(e={},e["taro-tabbar__border-".concat(this.borderStyle||"black")]=true,e));var i=this.selectedIndex===-1||n===STATUS_HIDE;var l=n===STATUS_SLIDEOUT;return h(Host,{class:classnames(basicTabBarClassName,"".concat(basicTabBarClassName,"-").concat(o),(a={},a[hideTabBarClassName]=i,a[hideTabBarWithAnimationClassName]=l,a))},h("div",{class:s,style:{backgroundColor:this.backgroundColor||"",height:"inherit"}},this.list.map((function(e,a){var r=t.selectedIndex===a;var o;var n;if(r){o=t.selectedColor||"";n=e.selectedIconPath}else{o=t.color||"";n=e.iconPath}return h(TabbarItem,{index:a,onSelect:t.switchTab.bind(t),isSelected:r,textColor:o,iconPath:n,text:e.text,badgeText:e.badgeText,showRedDot:e.showRedDot})}))))};Object.defineProperty(e.prototype,"tabbar",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Tabbar.style=indexCss;export{Tabbar as taro_tabbar};
1
+ var __spreadArray=this&&this.__spreadArray||function(e,a){for(var t=0,r=a.length,o=e.length;t<r;t++,o++)e[o]=a[t];return e};import{h,r as registerInstance,c as createEvent,H as Host,g as getElement}from"./index-1d67274c.js";import Taro from"@tarojs/taro";import{c as classnames}from"./index-cd1a2d33.js";var splitUrl=function(e){var a=e||"";var t;var r={path:null,query:null,fragment:null};t=a.indexOf("#");if(t>-1){r.fragment=a.substring(t+1);a=a.substring(0,t)}t=a.indexOf("?");if(t>-1){r.query=a.substring(t+1);a=a.substring(0,t)}r.path=a;return r};function isAbsolute(e){return e.charAt(0)==="/"}function spliceOne(e,a){for(var t=a,r=t+1,o=e.length;r<o;t+=1,r+=1){e[t]=e[r]}e.pop()}function resolvePathname(e,a){if(a===undefined)a="";var t=e&&e.split("/")||[];var r=a&&a.split("/")||[];var o=e&&isAbsolute(e);var n=a&&isAbsolute(a);var s=o||n;if(e&&isAbsolute(e)){r=t}else if(t.length){r.pop();r=r.concat(t)}if(!r.length)return"/";var i;if(r.length){var l=r[r.length-1];i=l==="."||l===".."||l===""}else{i=false}var d=0;for(var b=r.length;b>=0;b--){var h=r[b];if(h==="."){spliceOne(r,b)}else if(h===".."){spliceOne(r,b);d++}else if(d){spliceOne(r,b);d--}}if(!s)for(;d--;d)r.unshift("..");if(s&&r[0]!==""&&(!r[0]||!isAbsolute(r[0])))r.unshift("");var c=r.join("/");if(i&&c.substr(-1)!=="/")c+="/";return c}var TabbarItem=function(e){var a=e.index,t=e.isSelected,r=t===void 0?false:t,o=e.textColor,n=e.iconPath,s=e.badgeText,i=e.showRedDot,l=i===void 0?false:i,d=e.text,b=e.onSelect;var c=classnames("weui-tabbar__item",{"weui-bar__item_on":r});var f={position:"absolute",top:"-2px",right:"-13px"};var u={position:"absolute",top:"0",right:"-6px"};function v(){b(a)}return h("a",{key:a,href:"javascript:;",class:c,onClick:v},h("span",{style:{display:"inline-block",position:"relative"}},h("img",{src:n,alt:"",class:"weui-tabbar__icon"}),!!s&&h("span",{class:"weui-badge taro-tabbar-badge",style:f},s),l&&h("span",{class:"weui-badge weui-badge_dot",style:u})),h("p",{class:"weui-tabbar__label",style:{color:o}},d))};var indexCss="html,body{height:100%}#app{height:100%}.taro-tabbar__border-white::before{border-top-color:#fff !important}.taro-tabbar__container{display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex-direction:column;flex-direction:column;height:100%}.taro-tabbar__panel{overflow:auto;position:relative;-ms-flex:1;flex:1;-webkit-overflow-scrolling:auto}.taro-tabbar__tabbar{position:relative;width:100%;height:50px;-webkit-transition:bottom 0.2s, top 0.2s;transition:bottom 0.2s, top 0.2s}.taro-tabbar__tabbar-top{top:0}.taro-tabbar__tabbar-bottom{bottom:0;margin-bottom:constant(safe-area-inset-bottom);margin-bottom:env(safe-area-inset-bottom)}.taro-tabbar__tabbar-hide{display:none}.taro-tabbar__tabbar-slideout{top:-52px;-ms-flex:0 0;flex:0 0}.taro-tabbar__panel+.taro-tabbar__tabbar-slideout{top:auto;bottom:-52px}";var addLeadingSlash=function(e){if(e===void 0){e=""}return e[0]==="/"?e:"/"+e};var hasBasename=function(e,a){if(e===void 0){e=""}if(a===void 0){a=""}return new RegExp("^"+a+"(\\/|\\?|#|$)","i").test(e)};var stripBasename=function(e,a){if(e===void 0){e=""}if(a===void 0){a=""}return hasBasename(e,a)?e.substr(a.length):e};var stripSuffix=function(e,a){if(e===void 0){e=""}if(a===void 0){a=""}return e.includes(a)?e.substring(0,e.length-a.length):e};var STATUS_SHOW=0;var STATUS_HIDE=1;var STATUS_SLIDEOUT=2;var basicTabBarClassName="taro-tabbar__tabbar";var hideTabBarClassName="taro-tabbar__tabbar-hide";var hideTabBarWithAnimationClassName="taro-tabbar__tabbar-slideout";var Tabbar=function(){function e(e){var a=this;registerInstance(this,e);this.onLongPress=createEvent(this,"longpress",7);this.homePage="";this.customRoutes=[];this.tabbarPos="bottom";this.selectedIndex=-1;this.status=STATUS_SHOW;this.getOriginUrl=function(e){var t=a.customRoutes.filter((function(a){var t=a[1];var r=splitUrl(t).path;var o=splitUrl(e).path;return r===o}));return stripSuffix(t.length?t[0][0]:e,".html")};this.getSelectedIndex=function(e){var t=-1;a.list.forEach((function(a,r){var o=a.pagePath;var n=splitUrl(e).path;var s=splitUrl(o).path;if(n===s){t=r}}));return t};this.switchTab=function(e){a.selectedIndex=e;Taro.switchTab({url:a.list[e].pagePath})};this.switchTabHandler=function(e){var t=e.url,r=e.successHandler,o=e.errorHandler;var n=a.getOriginUrl(a.getCurrentUrl()||a.homePage);var s=resolvePathname(t,n);var i=a.getSelectedIndex(s);if(i>-1){a.switchTab(i);r({errMsg:"switchTab:ok"})}else{o({errMsg:'switchTab:fail page "'+s+'" is not found'})}};this.routerChangeHandler=function(e){var t;var r=(t=e===null||e===void 0?void 0:e.toLocation)===null||t===void 0?void 0:t.path;var o;if(typeof r==="string"){var n=a.conf.basename||"/";o=stripBasename(addLeadingSlash(r||a.homePage),n)||"/"}else{o=a.getCurrentUrl()}a.selectedIndex=a.getSelectedIndex(a.getOriginUrl(o))};this.setTabBarBadgeHandler=function(e){var t=e.index,r=e.text,o=e.successHandler,n=e.errorHandler;var s=__spreadArray([],a.list);if(t in s){s[t].showRedDot=false;s[t].badgeText=r;o({errMsg:"setTabBarBadge:ok"})}else{n({errMsg:"setTabBarBadge:fail tabbar item not found"})}a.list=s};this.removeTabBarBadgeHandler=function(e){var t=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],a.list);if(t in n){n[t].badgeText=null;n[t].badgeText=null;r({errMsg:"removeTabBarBadge:ok"})}else{o({errMsg:"removeTabBarBadge:fail tabbar item not found"})}a.list=n};this.showTabBarRedDotHandler=function(e){var t=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],a.list);if(t in n){n[t].badgeText=null;n[t].showRedDot=true;r({errMsg:"showTabBarRedDot:ok"})}else{o({errMsg:"showTabBarRedDot:fail tabbar item not found"})}a.list=n};this.hideTabBarRedDotHandler=function(e){var t=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],a.list);if(t in n){n[t].showRedDot=false;r({errMsg:"hideTabBarRedDot:ok"})}else{o({errMsg:"hideTabBarRedDot:fail tabbar item not found"})}a.list=n};this.showTabBarHandler=function(e){var t=e.successHandler;a.status=STATUS_SHOW;t({errMsg:"showTabBar:ok"})};this.hideTabBarHandler=function(e){var t=e.animation,r=e.successHandler;a.status=t?STATUS_SLIDEOUT:STATUS_HIDE;r({errMsg:"hideTabBar:ok"})};this.setTabBarStyleHandler=function(e){var t=e.color,r=e.selectedColor,o=e.backgroundColor,n=e.borderStyle,s=e.successHandler;if(o)a.backgroundColor=o;if(n)a.borderStyle=n;if(t)a.color=t;if(r)a.selectedColor=r;s({errMsg:"setTabBarStyle:ok"})};this.setTabBarItemHandler=function(e){var t=e.index,r=e.iconPath,o=e.selectedIconPath,n=e.text,s=e.successHandler,i=e.errorHandler;var l=__spreadArray([],a.list);if(t in l){if(r)l[t].iconPath=r;if(o)l[t].selectedIconPath=o;if(n)l[t].text=n;s({errMsg:"setTabBarItem:ok"})}else{i({errMsg:"setTabBarItem:fail tabbar item not found"})}a.list=l};var t=this.conf.list;var r=this.conf.customRoutes;if(Object.prototype.toString.call(t)!=="[object Array]"||t.length<2||t.length>5){throw new Error("tabBar 配置错误")}this.homePage=addLeadingSlash(this.conf.homePage);var o=function(e){var a;var t=r[e];e=addLeadingSlash(e);if(typeof t==="string"){n.customRoutes.push([e,addLeadingSlash(t)])}else if((t===null||t===void 0?void 0:t.length)>0){(a=n.customRoutes).push.apply(a,t.map((function(a){return[e,addLeadingSlash(a)]})))}};var n=this;for(var s in r){o(s)}t.forEach((function(e){if(e.pagePath.indexOf("/")!==0){e.pagePath="/"+e.pagePath}}));this.list=t;this.borderStyle=this.conf.borderStyle;this.backgroundColor=this.conf.backgroundColor;this.color=this.conf.color;this.selectedColor=this.conf.selectedColor}e.prototype.getCurrentUrl=function(){var e=this.conf.mode;var a=this.conf.basename||"/";var t;if(e==="hash"){var r=window.location.href;var o=r.indexOf("#");t=o===-1?"":r.substring(o+1)}else{t=location.pathname}var n=addLeadingSlash(stripBasename(t,a));return decodeURI(n==="/"?this.homePage:n)};e.prototype.bindEvent=function(){Taro.eventCenter.on("__taroRouterChange",this.routerChangeHandler);Taro.eventCenter.on("__taroSwitchTab",this.switchTabHandler);Taro.eventCenter.on("__taroSetTabBarBadge",this.setTabBarBadgeHandler);Taro.eventCenter.on("__taroRemoveTabBarBadge",this.removeTabBarBadgeHandler);Taro.eventCenter.on("__taroShowTabBarRedDotHandler",this.showTabBarRedDotHandler);Taro.eventCenter.on("__taroHideTabBarRedDotHandler",this.hideTabBarRedDotHandler);Taro.eventCenter.on("__taroShowTabBar",this.showTabBarHandler);Taro.eventCenter.on("__taroHideTabBar",this.hideTabBarHandler);Taro.eventCenter.on("__taroSetTabBarStyle",this.setTabBarStyleHandler);Taro.eventCenter.on("__taroSetTabBarItem",this.setTabBarItemHandler)};e.prototype.removeEvent=function(){Taro.eventCenter.off("__taroRouterChange",this.routerChangeHandler);Taro.eventCenter.off("__taroSwitchTab",this.switchTabHandler);Taro.eventCenter.off("__taroSetTabBarBadge",this.setTabBarBadgeHandler);Taro.eventCenter.off("__taroRemoveTabBarBadge",this.removeTabBarBadgeHandler);Taro.eventCenter.off("__taroShowTabBarRedDotHandler",this.showTabBarRedDotHandler);Taro.eventCenter.off("__taroHideTabBarRedDotHandler",this.hideTabBarRedDotHandler);Taro.eventCenter.off("__taroShowTabBar",this.showTabBarHandler);Taro.eventCenter.off("__taroHideTabBar",this.hideTabBarHandler);Taro.eventCenter.off("__taroSetTabBarStyle",this.setTabBarStyleHandler);Taro.eventCenter.off("__taroSetTabBarItem",this.setTabBarItemHandler)};e.prototype.componentDidLoad=function(){this.tabbarPos=this.tabbar.nextElementSibling?"top":"bottom";this.bindEvent();this.routerChangeHandler()};e.prototype.disconnectedCallback=function(){this.removeEvent()};e.prototype.render=function(){var e,a;var t=this;var r=this.tabbarPos,o=r===void 0?"bottom":r;var n=this.status;var s=classnames("weui-tabbar",(e={},e["taro-tabbar__border-"+(this.borderStyle||"black")]=true,e));var i=this.selectedIndex===-1||n===STATUS_HIDE;var l=n===STATUS_SLIDEOUT;return h(Host,{class:classnames(basicTabBarClassName,basicTabBarClassName+"-"+o,(a={},a[hideTabBarClassName]=i,a[hideTabBarWithAnimationClassName]=l,a))},h("div",{class:s,style:{backgroundColor:this.backgroundColor||"",height:"inherit"}},this.list.map((function(e,a){var r=t.selectedIndex===a;var o;var n;if(r){o=t.selectedColor||"";n=e.selectedIconPath}else{o=t.color||"";n=e.iconPath}return h(TabbarItem,{index:a,onSelect:t.switchTab.bind(t),isSelected:r,textColor:o,iconPath:n,text:e.text,badgeText:e.badgeText,showRedDot:e.showRedDot})}))))};Object.defineProperty(e.prototype,"tabbar",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Tabbar.style=indexCss;export{Tabbar as taro_tabbar};
@@ -1 +1 @@
1
- import{r as registerInstance,h,H as Host}from"./index-789b3db7.js";import{c as classnames}from"./index-cd1a2d33.js";var indexCss="taro-text-core{display:inline;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:pre-wrap}.taro-text__selectable{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}";var Text=function(){function e(e){registerInstance(this,e);this.selectable=false}e.prototype.render=function(){var e=classnames({"taro-text__selectable":this.selectable});return h(Host,{class:e},h("slot",null))};return e}();Text.style=indexCss;export{Text as taro_text_core};
1
+ import{r as registerInstance,h,H as Host}from"./index-1d67274c.js";import{c as classnames}from"./index-cd1a2d33.js";var indexCss="taro-text-core{display:inline;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:pre-wrap}.taro-text__selectable{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}";var Text=function(){function e(e){registerInstance(this,e);this.selectable=false}e.prototype.render=function(){var e=classnames({"taro-text__selectable":this.selectable});return h(Host,{class:e},h("slot",null))};return e}();Text.style=indexCss;export{Text as taro_text_core};
@@ -1 +1 @@
1
- import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-789b3db7.js";var indexCss="taro-textarea-core{display:block;width:300px}taro-textarea-core .auto-height{height:auto}.taro-textarea{display:block;position:relative;border:0;width:100%;height:150px;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:auto;line-height:1.5}.taro-textarea:focus{outline:none}";function fixControlledValue(e){return e!==null&&e!==void 0?e:""}var Textarea=function(){function e(e){var t=this;registerInstance(this,e);this.onInput=createEvent(this,"input",7);this.onFocus=createEvent(this,"focus",7);this.onBlur=createEvent(this,"blur",7);this.onChange=createEvent(this,"change",7);this.onLineChange=createEvent(this,"linechange",7);this.disabled=false;this.maxlength=140;this.autoFocus=false;this.autoHeight=false;this.nativeProps={};this.line=1;this.handleInput=function(e){e.stopPropagation();t.handleLineChange();t.onInput.emit({value:e.target.value,cursor:e.target.value.length})};this.handleFocus=function(e){t.onFocus.emit({value:e.target.value})};this.handleBlur=function(e){t.onBlur.emit({value:e.target.value})};this.handleChange=function(e){e.stopPropagation();t.onChange.emit({value:e.target.value})};this.handleLineChange=function(){var e=t.getNumberOfLines();if(e!==t.line){t.line=e;t.onLineChange.emit({height:t.textareaRef.clientHeight,lineCount:t.line})}};this.calculateContentHeight=function(e,t){var n=e.style.height,a=e.offsetHeight,i=e.scrollHeight,o=e.style.overflow,r=e.style.minHeight||null;if(a>=i){e.style.minHeight=0;e.style.height=a+t+"px";e.style.overflow="hidden";if(i<e.scrollHeight){while(e.offsetHeight>=e.scrollHeight){e.style.height=(a-=t)+"px"}while(e.offsetHeight<e.scrollHeight){e.style.height=a+++"px"}e.style.height=n;e.style.overflow=o;e.style.minHeight=r;return a}}else{return i}};this.getNumberOfLines=function(){var e=t.textareaRef,n=window.getComputedStyle?window.getComputedStyle(e):e.style,a=parseInt(n.lineHeight,10),i=t.calculateContentHeight(e,a),o=Math.floor(i/a);return o}}e.prototype.componentDidLoad=function(){var e=this;Object.defineProperty(this.el,"value",{get:function(){return e.textareaRef.value},set:function(t){return e.value=t},configurable:true});this.autoFocus&&this.textareaRef.focus()};e.prototype.render=function(){var e=this;var t=this,n=t.value,a=t.placeholder,i=t.disabled,o=t.maxlength,r=t.autoFocus,l=t.autoHeight,s=t.name,u=t.nativeProps,c=t.handleInput,g=t.handleFocus,f=t.handleBlur,p=t.handleChange;var d={};if(l){d.rows=this.line}return h("textarea",Object.assign({ref:function(t){if(t){e.textareaRef=t}},class:"taro-textarea ".concat(l?"auto-height":""),value:fixControlledValue(n),placeholder:a,name:s,disabled:i,maxlength:o,autofocus:r,onInput:c,onFocus:g,onBlur:f,onChange:p},u,d))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Textarea.style=indexCss;export{Textarea as taro_textarea_core};
1
+ import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-1d67274c.js";var indexCss="taro-textarea-core{display:block;width:300px}taro-textarea-core .auto-height{height:auto}.taro-textarea{display:block;position:relative;border:0;width:100%;height:150px;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:auto;line-height:1.5}.taro-textarea:focus{outline:none}";function fixControlledValue(e){return e!==null&&e!==void 0?e:""}var Textarea=function(){function e(e){var t=this;registerInstance(this,e);this.onInput=createEvent(this,"input",7);this.onFocus=createEvent(this,"focus",7);this.onBlur=createEvent(this,"blur",7);this.onChange=createEvent(this,"change",7);this.onLineChange=createEvent(this,"linechange",7);this.disabled=false;this.maxlength=140;this.autoFocus=false;this.autoHeight=false;this.nativeProps={};this.line=1;this.handleInput=function(e){e.stopPropagation();t.handleLineChange();t.onInput.emit({value:e.target.value,cursor:e.target.value.length})};this.handleFocus=function(e){t.onFocus.emit({value:e.target.value})};this.handleBlur=function(e){t.onBlur.emit({value:e.target.value})};this.handleChange=function(e){e.stopPropagation();t.onChange.emit({value:e.target.value})};this.handleLineChange=function(){var e=t.getNumberOfLines();if(e!==t.line){t.line=e;t.onLineChange.emit({height:t.textareaRef.clientHeight,lineCount:t.line})}};this.calculateContentHeight=function(e,t){var n=e.style.height,a=e.offsetHeight,i=e.scrollHeight,o=e.style.overflow,r=e.style.minHeight||null;if(a>=i){e.style.minHeight=0;e.style.height=a+t+"px";e.style.overflow="hidden";if(i<e.scrollHeight){while(e.offsetHeight>=e.scrollHeight){e.style.height=(a-=t)+"px"}while(e.offsetHeight<e.scrollHeight){e.style.height=a+++"px"}e.style.height=n;e.style.overflow=o;e.style.minHeight=r;return a}}else{return i}};this.getNumberOfLines=function(){var e=t.textareaRef,n=window.getComputedStyle?window.getComputedStyle(e):e.style,a=parseInt(n.lineHeight,10),i=t.calculateContentHeight(e,a),o=Math.floor(i/a);return o}}e.prototype.componentDidLoad=function(){var e=this;Object.defineProperty(this.el,"value",{get:function(){return e.textareaRef.value},set:function(t){return e.value=t},configurable:true});this.autoFocus&&this.textareaRef.focus()};e.prototype.render=function(){var e=this;var t=this,n=t.value,a=t.placeholder,i=t.disabled,o=t.maxlength,r=t.autoFocus,l=t.autoHeight,s=t.name,u=t.nativeProps,c=t.handleInput,g=t.handleFocus,f=t.handleBlur,p=t.handleChange;var d={};if(l){d.rows=this.line}return h("textarea",Object.assign({ref:function(t){if(t){e.textareaRef=t}},class:"taro-textarea "+(l?"auto-height":""),value:fixControlledValue(n),placeholder:a,name:s,disabled:i,maxlength:o,autofocus:r,onInput:c,onFocus:g,onBlur:f,onChange:p},u,d))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Textarea.style=indexCss;export{Textarea as taro_textarea_core};
@@ -1,4 +1,4 @@
1
- var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,a,n,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(r)try{if(i=1,a&&(n=s[0]&2?a["return"]:s[0]?a["throw"]||((n=a["return"])&&n.call(a),0):a.next)&&!(n=n.call(a,s[1])).done)return n;if(a=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;a=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(n=r.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){r.label=s[1];break}if(s[0]===6&&r.label<n[1]){r.label=n[1];n=s;break}if(n&&r.label<n[2]){r.label=n[2];r.ops.push(s);break}if(n[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];a=0}finally{i=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var i=0,a=t.length,n;i<a;i++){if(n||!(i in t)){if(!n)n=Array.prototype.slice.call(t,0,i);n[i]=t[i]}}return e.concat(n||Array.prototype.slice.call(t))};import{r as registerInstance,h,H as Host,g as getElement,c as createEvent}from"./index-789b3db7.js";import{a as createCommonjsModule,b as commonjsGlobal,g as getDefaultExportFromCjs,c as classnames}from"./index-cd1a2d33.js";import{t as throttle}from"./index-cad8203e.js";var formatTime=function(e){if(!e)return"";var t=Math.round(e%60);var r=Math.round((e-t)/60);return"".concat(r<10?"0".concat(r):r,":").concat(t<10?"0".concat(t):t)};var calcDist=function(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))};var normalizeNumber=function(e){return Math.max(-1,Math.min(e,1))};var screenFn=function(){var e;var t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];var r=["webkitEnterFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"];var i=0;var a=t.length;var n={};for(;i<a;i++){e=t[i];if(e&&e[1]in document){for(i=0;i<e.length;i++){n[t[0][i]]=e[i]}return n}}if(!n[t[0][0]]){for(i=0;i<r.length;i++){n[t[0][i]]=r[i]}}return n}();var isHls=function(e){return/\.(m3u8)($|\?)/i.test(e)};var __awaiter$2=undefined&&undefined.__awaiter||function(e,t,r,i){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function s(e){try{l(i.next(e))}catch(e){n(e)}}function o(e){try{l(i["throw"](e))}catch(e){n(e)}}function l(e){e.done?r(e.value):a(e.value).then(s,o)}l((i=i.apply(e,t||[])).next())}))};var VideoControl=function(){function e(e){var t=this;registerInstance(this,e);this.visible=false;this.isDraggingProgressBall=false;this.percentage=0;this.progressDimensions={left:0,width:0};this.calcPercentage=function(e){var r=e-t.progressDimensions.left;r=Math.max(r,0);r=Math.min(r,t.progressDimensions.width);return r/t.progressDimensions.width};this.onDragProgressBallStart=function(){t.isDraggingProgressBall=true;t.hideControlsTimer&&clearTimeout(t.hideControlsTimer)};this.onClickProgress=function(e){e.stopPropagation();var r=t.calcPercentage(e.pageX);t.seekFunc(r*t.duration);t.toggleVisibility(true)}}e.prototype.onDocumentTouchMove=function(e){if(!this.isDraggingProgressBall)return;var t=e.touches[0].pageX;this.percentage=this.calcPercentage(t);this.setProgressBall(this.percentage);this.setCurrentTime(this.percentage*this.duration)};e.prototype.onDocumentTouchEnd=function(){if(!this.isDraggingProgressBall)return;this.isDraggingProgressBall=false;this.seekFunc(this.percentage*this.duration);this.toggleVisibility(true)};e.prototype.setProgressBall=function(e){return __awaiter$2(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.progressBallRef){this.progressBallRef.style.left="".concat(e*100,"%")}return[2]}))}))};e.prototype.toggleVisibility=function(e){return __awaiter$2(this,void 0,void 0,(function(){var t;var r=this;return __generator(this,(function(i){t=e===undefined?!this.visible:e;if(t){this.hideControlsTimer&&clearTimeout(this.hideControlsTimer);if(this.isPlaying){this.hideControlsTimer=setTimeout((function(){r.toggleVisibility(false)}),2e3)}this.controlsRef.style.visibility="visible"}else{this.controlsRef.style.visibility="hidden"}this.visible=!!t;return[2]}))}))};e.prototype.getIsDraggingProgressBall=function(){return __awaiter$2(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.isDraggingProgressBall]}))}))};e.prototype.setCurrentTime=function(e){return __awaiter$2(this,void 0,void 0,(function(){return __generator(this,(function(t){this.currentTimeRef.innerHTML=formatTime(e);return[2]}))}))};e.prototype.render=function(){var e=this;var t=this,r=t.controls,i=t.currentTime,a=t.duration,n=t.isPlaying,s=t.pauseFunc,o=t.playFunc,l=t.showPlayBtn,u=t.showProgress;var f=formatTime(a);var c;if(!l){c=null}else if(n){c=h("div",{class:"taro-video-control-button taro-video-control-button-pause",onClick:s})}else{c=h("div",{class:"taro-video-control-button taro-video-control-button-play",onClick:o})}return h(Host,{class:"taro-video-bar taro-video-bar-full"},r&&h("div",{class:"taro-video-controls"},c,u&&h("div",{class:"taro-video-current-time",ref:function(t){return e.currentTimeRef=t}},formatTime(i)),u&&h("div",{class:"taro-video-progress-container",onClick:this.onClickProgress},h("div",{class:"taro-video-progress",ref:function(t){if(!t)return;var r=t.getBoundingClientRect();e.progressDimensions.left=r.left;e.progressDimensions.width=r.width}},h("div",{class:"taro-video-progress-buffered",style:{width:"100%"}}),h("div",{class:"taro-video-ball",ref:function(t){return e.progressBallRef=t},onTouchStart:this.onDragProgressBallStart,style:{left:"".concat(f?this.currentTime/a*100:0,"%")}},h("div",{class:"taro-video-inner"})))),u&&h("div",{class:"taro-video-duration"},f)),h("slot",null))};Object.defineProperty(e.prototype,"controlsRef",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();var hls=createCommonjsModule((function(e,t){typeof window!=="undefined"&&function t(r,i){e.exports=i()}(commonjsGlobal,(function(){return function(e){var t={};function r(i){if(t[i]){return t[i].exports}var a=t[i]={i:i,l:false,exports:{}};e[i].call(a.exports,a,a.exports,r);a.l=true;return a.exports}r.m=e;r.c=t;r.d=function(e,t,i){if(!r.o(e,t)){Object.defineProperty(e,t,{enumerable:true,get:i})}};r.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})};r.t=function(e,t){if(t&1)e=r(e);if(t&8)return e;if(t&4&&typeof e==="object"&&e&&e.__esModule)return e;var i=Object.create(null);r.r(i);Object.defineProperty(i,"default",{enumerable:true,value:e});if(t&2&&typeof e!="string")for(var a in e)r.d(i,a,function(t){return e[t]}.bind(null,a));return i};r.n=function(e){var t=e&&e.__esModule?function t(){return e["default"]}:function t(){return e};r.d(t,"a",t);return t};r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};r.p="/dist/";return r(r.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":
1
+ var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,a,n,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(r)try{if(i=1,a&&(n=s[0]&2?a["return"]:s[0]?a["throw"]||((n=a["return"])&&n.call(a),0):a.next)&&!(n=n.call(a,s[1])).done)return n;if(a=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;a=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(n=r.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){r.label=s[1];break}if(s[0]===6&&r.label<n[1]){r.label=n[1];n=s;break}if(n&&r.label<n[2]){r.label=n[2];r.ops.push(s);break}if(n[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];a=0}finally{i=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t){for(var r=0,i=t.length,a=e.length;r<i;r++,a++)e[a]=t[r];return e};import{r as registerInstance,h,H as Host,g as getElement,c as createEvent}from"./index-1d67274c.js";import{a as createCommonjsModule,b as commonjsGlobal,g as getDefaultExportFromCjs,c as classnames}from"./index-cd1a2d33.js";import{t as throttle}from"./index-cad8203e.js";var formatTime=function(e){if(!e)return"";var t=Math.round(e%60);var r=Math.round((e-t)/60);return(r<10?"0"+r:r)+":"+(t<10?"0"+t:t)};var calcDist=function(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))};var normalizeNumber=function(e){return Math.max(-1,Math.min(e,1))};var scene="default";var screenFn=function(){var e;var t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];var r=["webkitEnterFullscreen","webkitExitFullscreen","webkitCurrentFullScreenElement","webkitSupportsFullscreen","fullscreenchange","fullscreenerror"];var i=0;var a=t.length;var n={};for(;i<a;i++){e=t[i];if(e&&e[1]in document){for(i=0;i<e.length;i++){n[t[0][i]]=e[i]}return n}}if(!n[t[0][0]]){scene="iOS";for(i=0;i<r.length;i++){n[t[0][i]]=r[i]}}return n}();var isHls=function(e){return/\.(m3u8)($|\?)/i.test(e)};var __awaiter$2=undefined&&undefined.__awaiter||function(e,t,r,i){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function s(e){try{l(i.next(e))}catch(e){n(e)}}function o(e){try{l(i["throw"](e))}catch(e){n(e)}}function l(e){e.done?r(e.value):a(e.value).then(s,o)}l((i=i.apply(e,t||[])).next())}))};var VideoControl=function(){function e(e){var t=this;registerInstance(this,e);this.visible=false;this.isDraggingProgressBall=false;this.percentage=0;this.progressDimensions={left:0,width:0};this.calcPercentage=function(e){var r=e-t.progressDimensions.left;r=Math.max(r,0);r=Math.min(r,t.progressDimensions.width);return r/t.progressDimensions.width};this.onDragProgressBallStart=function(){t.isDraggingProgressBall=true;t.hideControlsTimer&&clearTimeout(t.hideControlsTimer)};this.onClickProgress=function(e){e.stopPropagation();var r=t.calcPercentage(e.pageX);t.seekFunc(r*t.duration);t.toggleVisibility(true)}}e.prototype.onDocumentTouchMove=function(e){if(!this.isDraggingProgressBall)return;var t=e.touches[0].pageX;this.percentage=this.calcPercentage(t);this.setProgressBall(this.percentage);this.setCurrentTime(this.percentage*this.duration)};e.prototype.onDocumentTouchEnd=function(){if(!this.isDraggingProgressBall)return;this.isDraggingProgressBall=false;this.seekFunc(this.percentage*this.duration);this.toggleVisibility(true)};e.prototype.setProgressBall=function(e){return __awaiter$2(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.progressBallRef){this.progressBallRef.style.left=e*100+"%"}return[2]}))}))};e.prototype.toggleVisibility=function(e){return __awaiter$2(this,void 0,void 0,(function(){var t;var r=this;return __generator(this,(function(i){t=e===undefined?!this.visible:e;if(t){this.hideControlsTimer&&clearTimeout(this.hideControlsTimer);if(this.isPlaying){this.hideControlsTimer=setTimeout((function(){r.toggleVisibility(false)}),2e3)}this.el.style.visibility="visible"}else{this.el.style.visibility="hidden"}this.visible=!!t;return[2]}))}))};e.prototype.getIsDraggingProgressBall=function(){return __awaiter$2(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.isDraggingProgressBall]}))}))};e.prototype.setCurrentTime=function(e){return __awaiter$2(this,void 0,void 0,(function(){return __generator(this,(function(t){this.currentTimeRef.innerHTML=formatTime(e);return[2]}))}))};e.prototype.render=function(){var e=this;var t=this,r=t.controls,i=t.currentTime,a=t.duration,n=t.isPlaying,s=t.pauseFunc,o=t.playFunc,l=t.showPlayBtn,u=t.showProgress;var f=formatTime(a);var c;if(!l){c=null}else if(n){c=h("div",{class:"taro-video-control-button taro-video-control-button-pause",onClick:s})}else{c=h("div",{class:"taro-video-control-button taro-video-control-button-play",onClick:o})}return h(Host,{class:"taro-video-bar taro-video-bar-full"},r&&h("div",{class:"taro-video-controls"},c,u&&h("div",{class:"taro-video-current-time",ref:function(t){return e.currentTimeRef=t}},formatTime(i)),u&&h("div",{class:"taro-video-progress-container",onClick:this.onClickProgress},h("div",{class:"taro-video-progress",ref:function(t){if(!t)return;var r=t.getBoundingClientRect();e.progressDimensions.left=r.left;e.progressDimensions.width=r.width}},h("div",{class:"taro-video-progress-buffered",style:{width:"100%"}}),h("div",{class:"taro-video-ball",ref:function(t){return e.progressBallRef=t},onTouchStart:this.onDragProgressBallStart,style:{left:(f?this.currentTime/a*100:0)+"%"}},h("div",{class:"taro-video-inner"})))),u&&h("div",{class:"taro-video-duration"},f)),h("slot",null))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();var hls=createCommonjsModule((function(e,t){typeof window!=="undefined"&&function t(r,i){e.exports=i()}(commonjsGlobal,(function(){return function(e){var t={};function r(i){if(t[i]){return t[i].exports}var a=t[i]={i:i,l:false,exports:{}};e[i].call(a.exports,a,a.exports,r);a.l=true;return a.exports}r.m=e;r.c=t;r.d=function(e,t,i){if(!r.o(e,t)){Object.defineProperty(e,t,{enumerable:true,get:i})}};r.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})};r.t=function(e,t){if(t&1)e=r(e);if(t&8)return e;if(t&4&&typeof e==="object"&&e&&e.__esModule)return e;var i=Object.create(null);r.r(i);Object.defineProperty(i,"default",{enumerable:true,value:e});if(t&2&&typeof e!="string")for(var a in e)r.d(i,a,function(t){return e[t]}.bind(null,a));return i};r.n=function(e){var t=e&&e.__esModule?function t(){return e["default"]}:function t(){return e};r.d(t,"a",t);return t};r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};r.p="/dist/";return r(r.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":
2
2
  /*!*********************************************!*\
3
3
  !*** ./node_modules/eventemitter3/index.js ***!
4
4
  \*********************************************/
@@ -362,4 +362,4 @@ var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:functi
362
362
  /*!*********************************!*\
363
363
  !*** ./src/utils/xhr-loader.ts ***!
364
364
  \*********************************/
365
- /*! exports provided: default */function(e,t,r){r.r(t);var i=r(/*! ../utils/logger */"./src/utils/logger.ts");var a=r(/*! ../loader/load-stats */"./src/loader/load-stats.ts");var n=/^age:\s*[\d.]+\s*$/m;var s=function(){function e(e){this.xhrSetup=void 0;this.requestTimeout=void 0;this.retryTimeout=void 0;this.retryDelay=void 0;this.config=null;this.callbacks=null;this.context=void 0;this.loader=null;this.stats=void 0;this.xhrSetup=e?e.xhrSetup:null;this.stats=new a["LoadStats"];this.retryDelay=0}var t=e.prototype;t.destroy=function e(){this.callbacks=null;this.abortInternal();this.loader=null;this.config=null};t.abortInternal=function e(){var t=this.loader;self.clearTimeout(this.requestTimeout);self.clearTimeout(this.retryTimeout);if(t){t.onreadystatechange=null;t.onprogress=null;if(t.readyState!==4){this.stats.aborted=true;t.abort()}}};t.abort=function e(){var t;this.abortInternal();if((t=this.callbacks)!==null&&t!==void 0&&t.onAbort){this.callbacks.onAbort(this.stats,this.context,this.loader)}};t.load=function e(t,r,i){if(this.stats.loading.start){throw new Error("Loader can only be used once.")}this.stats.loading.start=self.performance.now();this.context=t;this.config=r;this.callbacks=i;this.retryDelay=r.retryDelay;this.loadInternal()};t.loadInternal=function e(){var t=this.config,r=this.context;if(!t){return}var i=this.loader=new self.XMLHttpRequest;var a=this.stats;a.loading.first=0;a.loaded=0;var n=this.xhrSetup;try{if(n){try{n(i,r.url)}catch(e){i.open("GET",r.url,true);n(i,r.url)}}if(!i.readyState){i.open("GET",r.url,true)}var s=this.context.headers;if(s){for(var o in s){i.setRequestHeader(o,s[o])}}}catch(e){this.callbacks.onError({code:i.status,text:e.message},r,i);return}if(r.rangeEnd){i.setRequestHeader("Range","bytes="+r.rangeStart+"-"+(r.rangeEnd-1))}i.onreadystatechange=this.readystatechange.bind(this);i.onprogress=this.loadprogress.bind(this);i.responseType=r.responseType;self.clearTimeout(this.requestTimeout);this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),t.timeout);i.send()};t.readystatechange=function e(){var t=this.context,r=this.loader,a=this.stats;if(!t||!r){return}var n=r.readyState;var s=this.config;if(a.aborted){return}if(n>=2){self.clearTimeout(this.requestTimeout);if(a.loading.first===0){a.loading.first=Math.max(self.performance.now(),a.loading.start)}if(n===4){r.onreadystatechange=null;r.onprogress=null;var o=r.status;if(o>=200&&o<300){a.loading.end=Math.max(self.performance.now(),a.loading.first);var l;var u;if(t.responseType==="arraybuffer"){l=r.response;u=l.byteLength}else{l=r.responseText;u=l.length}a.loaded=a.total=u;if(!this.callbacks){return}var f=this.callbacks.onProgress;if(f){f(a,t,l,r)}if(!this.callbacks){return}var c={url:r.responseURL,data:l};this.callbacks.onSuccess(c,a,t,r)}else{if(a.retry>=s.maxRetry||o>=400&&o<499){i["logger"].error(o+" while loading "+t.url);this.callbacks.onError({code:o,text:r.statusText},t,r)}else{i["logger"].warn(o+" while loading "+t.url+", retrying in "+this.retryDelay+"...");this.abortInternal();this.loader=null;self.clearTimeout(this.retryTimeout);this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay);this.retryDelay=Math.min(2*this.retryDelay,s.maxRetryDelay);a.retry++}}}else{self.clearTimeout(this.requestTimeout);this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.timeout)}}};t.loadtimeout=function e(){i["logger"].warn("timeout while loading "+this.context.url);var t=this.callbacks;if(t){this.abortInternal();t.onTimeout(this.stats,this.context,this.loader)}};t.loadprogress=function e(t){var r=this.stats;r.loaded=t.loaded;if(t.lengthComputable){r.total=t.total}};t.getCacheAge=function e(){var t=null;if(this.loader&&n.test(this.loader.getAllResponseHeaders())){var r=this.loader.getResponseHeader("age");t=r?parseFloat(r):null}return t};return e}();t["default"]=s}})["default"]}))}));var Hls=getDefaultExportFromCjs(hls);var indexCss='.taro-video{display:inline-block;overflow:hidden;position:relative;width:100%;height:225px;line-height:0}.taro-video[hidden]{display:none}.taro-video-container{display:inline-block;overflow:hidden;position:absolute;left:0;top:0;width:100%;height:100%;background-color:#000;-o-object-position:inherit;object-position:inherit}.taro-video-container.taro-video-type-fullscreen{position:fixed;left:0;right:0;top:0;bottom:0;z-index:999}.taro-video-container.taro-video-type-fullscreen.taro-video-type-rotate-left{-webkit-transform:translate(-50%, -50%) rotate(-90deg);transform:translate(-50%, -50%) rotate(-90deg)}.taro-video-container.taro-video-type-fullscreen.taro-video-type-rotate-right{-webkit-transform:translate(-50%, -50%) rotate(90deg);transform:translate(-50%, -50%) rotate(90deg)}.taro-video-video{width:100%;height:100%;-o-object-position:inherit;object-position:inherit}.taro-video-cover{display:-ms-flexbox;display:flex;position:absolute;left:0;top:0;bottom:0;z-index:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:100%;background-color:rgba(1, 1, 1, 0.5);-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-pack:center;-webkit-box-align:center}.taro-video-cover-play-button{width:40px;height:40px;background-repeat:no-repeat;background-position:50% 50%;background-size:50%}.taro-video-cover-duration{margin-top:10px;line-height:1;font-size:16px;color:#fff}.taro-video-bar{display:-ms-flexbox;display:flex;visibility:hidden;overflow:hidden;position:absolute;right:0;bottom:0;z-index:1;-ms-flex-align:center;align-items:center;padding:0 10px;height:44px;background-color:rgba(0, 0, 0, 0.5);-webkit-box-align:center}.taro-video-bar.taro-video-bar-full{left:0}.taro-video-controls{display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;margin:0 8.5px}.taro-video-control-button{-webkit-box-sizing:content-box;box-sizing:content-box;margin-left:-8.5px;padding:14.5px 12.5px;width:13px;height:15px}.taro-video-control-button::after{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:50% 50%;background-size:100%;content:""}.taro-video-control-button.taro-video-control-button-play::after,.taro-video-cover-play-button{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAeCAYAAAAy2w7YAAAAAXNSR0IArs4c6QAAAWhJREFUSA1j+P///0cgBoHjQGzCQCsAtgJB/AMy5wCxGNXtQ9iBwvoA5BUCMQvVLEQxHpNzDSjkRhXLMM3GKrIeKKpEkYVYjcUu+AMo3ALE3GRZiN1MvKKPgbIRJFuG10j8koeA0gZEW4jfLIKyf4EqpgOxMEELCRpFnIJ3QGU5QMyM00LizCFa1SWgSkeslhFtBGkKVwGVy6FYSJp+klR/A6quB2JOkIWMIK0oNlOf8xBoZDE9LAI7nYn6HsBq4l96WHQEaLUpAyiOaASeAM2NgvuPBpaACt82IEYtfKls0UagecpwXyAzqGTRdaA57sjmYrAptAjUsCkGYlYMg9EFyLQI1IiZB8Ti6Obh5JNh0QmgHlOcBuKSIMGi50C18UDMiMssvOJEWPQLqKYbiHnxGkRIkoBF24DyaoTMIEoeh0W3geI+RBlArCI0iz4D+RVAzEasfqLVAQ19AcSg5LoYiKWI1kiiQgCMBLnEEcfDSgAAAABJRU5ErkJggg==")}.taro-video-control-button.taro-video-control-button-pause::after{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAAAXNSR0IArs4c6QAAAFlJREFUSA3tksEKACAIQ7X//5zq98wOgQayum8QaGweHhMzG/6OujzKAymn+0LMqivu1XznWmX8/echTIyMyAgTwA72iIwwAexgj8gIE8CO3aMRbDPMaEy5BRGaKcZv8YxRAAAAAElFTkSuQmCC")}.taro-video-current-time,.taro-video-duration{margin-top:15px;margin-bottom:14.5px;height:14.5px;line-height:14.5px;font-size:12px;color:#cbcbcb}.taro-video-progress-container{position:relative;-ms-flex-positive:2;flex-grow:2;-webkit-box-flex:2}.taro-video-progress{position:relative;margin:21px 12px;height:2px;background-color:rgba(255, 255, 255, 0.4)}.taro-video-progress-buffered{position:absolute;left:0;top:0;width:0;height:100%;background-color:rgba(255, 255, 255, 0.8);-webkit-transition:width 0.1s;transition:width 0.1s}.taro-video-ball{position:absolute;left:0;top:-21px;-webkit-box-sizing:content-box;box-sizing:content-box;margin-left:-22px;padding:14px;width:16px;height:16px}.taro-video-inner{border-radius:50%;width:100%;height:100%;background-color:#fff}.taro-video-danmu-button{margin:0 8.5px;padding:2px 10px;border:1px solid #fff;border-radius:5px;line-height:1;font-size:13px;color:#fff;white-space:nowrap}.taro-video-danmu-button.taro-video-danmu-button-active{border-color:#48c23d;color:#48c23d}.taro-video-fullscreen,.taro-video-mute{-webkit-box-sizing:content-box;box-sizing:content-box;padding:8.5px;width:17px;height:17px;background-repeat:no-repeat;background-position:50% 50%;background-size:50%}.taro-video-fullscreen{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAhUlEQVRYR+2WSwrAMAhEnZO3PfmULLooGEFTiIXJ2s/kRY2wzQeb85sE9CRA8jSzY1YfAFzhJBnU1AVgxH2dSiArCnD9QgGzRNnOech48SRABHoSyFb5in3PSbhyo6yvCPQkEM3u7BsPe/0FIvBfAh/vhKmVbO9SWun1qk/PSVi9TcVPBG6R1YIhgWwNpQAAAABJRU5ErkJggg==")}.taro-video-fullscreen.taro-video-type-fullscreen{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABPUlEQVRYR+2Xu0pDURBF1/ZLxNcHKNiIlfhA7C0UBSEE8RNEBNFPUEQEEbGxFiSSSrCwEHsf5E/ccsSUuWfUhKQ40947+y42Z8+ZK/pcinzf9hhwD1xJ2q/qsb0JHAOzkl5y+lGAGnCWICQtZgAS6DxQk3TeLYA6cAo0JSXxjmW7CcwBdUkJurKiDhSA4kBvHbA9CqwBQx2O7BSw8ssU3ALP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RkNzRmIiBzdEV2dDp3aGVuPSIyMDE5LTA0LTExVDEwOjIyOjIyKzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoTWFjaW50b3NoKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz459+FoAAABqElEQVRYhc2XPWsVQRSGnxPjF4oGRfxoRQKGWCU2Ft7CykrQWosEyf/If0hhIPgHDEmbNJZqCFxiQEgTUGxsBUVEHgvnyrjZZJO92V1fGIaZnTPvszPszNlQ6VIjnbr/DwCoDLMNak/dUVfUK0f2rQugnlcX/FevWgFQH6gf3autRgHUC+piiXHzAOmtPx9gXgug8itQx9SXwDpw47AGKXZWvXvQmNFCwE3gCXA2dY0Az4GrRzHONA9cU/vAbERsllEOyh31e8USV2mrMPdG9uyn+rDom2/BHHCm5puWKiKmgdtAnz+rvaxO5mNygEvHaZ5BfADuARvAaWBpP4DGFBHfgBngFzClTrUKkCDeA+9S837rAEnbqb7VFcCpVJ/oCmCw959aB1AfAROpudYqgDoOLKRmPyLelAF8bcD4pPoMeAtcB34AT4uDBqXXwFG8XXUU/72MIuK1OgE8Bs6l7mEvo8up7lN1Ge0n9aK6VHMFZvJTr9S3CiALaCQhqZOSvegMIAvu2UVSWpigLC1fbQ0gm6in7qpfLCQbhwGIYcyPQ53/G3YO8BtUtd35bvKcVwAAAABJRU5ErkJggg==")}.taro-video-mute.taro-video-type-mute{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGAGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTX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vyg2WZO3dmzt47/zZUtoJ6Nhsg09YDiYhKDzACTAFNYH9lEpUq80TdrT5wpV5n/ZV9KoGoo+pXV2uyKkipOaLuUceAt8DhUvQd1FsCYhR4ChzaSIBMHSOi7lOfsByFWiCgEBH1GHAF2JlMPcBt4GC3HUYEaj9wF3gVEVPtfNVTwAXgWX7CDKq/1piAZTSZBmim8qJ6sQ3EgDqb/L7kU3MH2NHtl3dQX3r3Ak21UYAYAj4A/cl0JB+RF+uMRj4iQ+p8zt7KYFLdXKHuRi0gacBhV6a6pd5bA6KRNagFJPU9qv5u47toLmW1HnoR8Q5oAK1CVQu4FBHj/wUkaXsb+4pzpVaQFPqXrN7Be4Fx9VztIOr1BLEtmX4A94E/qdwHTKjDWYM6lu81dSlnn3V570BtuLxaMs2rZ/IgYxsBovaoPwsQA4VoFWEm8ql5DiysNyURsQTMpOIMcDYiPhd8xoGr/FtNC2G6FKXD6ihwGdiVHMoeeh8jYlA9ANwE3kTEp3bO6vE03qOONzR1r/q4RGrquaFFxFxE3ALOA9+6jExpdb180y55AhirhaRTatq0GXEzL8+ZIuI9cBJ4WKiartJf9nWV/mty7UfUafW7erpqRGI9EBuprffvu9n6C1KOmsqwI5A1AAAAAElFTkSuQmCC")}.taro-video-danmu{overflow:visible;position:absolute;left:0;top:0;bottom:0;margin-top:14px;margin-bottom:44px;width:100%;line-height:14px;font-size:14px}.taro-video-danmu-item{position:absolute;left:100%;line-height:1;color:#fff;white-space:nowrap;-webkit-transform:translateX(0);transform:translateX(0);-webkit-transition-property:left, -webkit-transform;transition-property:left, -webkit-transform;transition-property:left, transform;transition-property:left, transform, -webkit-transform;-webkit-transition-duration:3s;transition-duration:3s;-webkit-transition-timing-function:linear;transition-timing-function:linear}.taro-video-toast{display:block;visibility:hidden;position:absolute;left:50%;top:50%;border-radius:5px;background-color:rgba(255, 255, 255, 0.8);pointer-events:none;color:#000;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.taro-video-toast.taro-video-toast-volume{display:block;width:100px;height:100px}.taro-video-toast-volume .taro-video-toast-title{display:block;margin-top:10px;width:100%;line-height:16px;text-align:center;font-size:12px}.taro-video-toast-volume .taro-video-toast-icon{display:block;margin-left:25%;width:50%;height:50%;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAFhklEQVR4Xu2aeaxfQxTHP1VBES0NIQitWtpaaxeCUkQtaYVa0tiClAq1ExIiQTVppaWxt8RWSa2tWkJQRGgtQaSIpUKEpG0ssbbk28yV2+mZO/e9e3vvu/e98897mZnfzPl+75mZs0wvurn06ub46SGgxwLqZaA3sB/wO/A+8G/V6tS5BU4BJgJbO9DvAMOB36okoQ4CNgAeBEYbQK8Bbm4zAdsBc4EdAyA/APZoKwHHAA8DG2UA/AnYrG0ErAVcD1yXA9gfQJ8c40obsqbPgH7AY8CROTVuFQFD3X7fJid4DWsNAWOAGZ0w58YTsDZwKzChA189PbTRBGwKzAYO6iT4srbAMHfTfAksjulS1iG4JzAH2Dy2YKS/qAVcCdzi1vgZOBZ4PWvNGAG6wgYCW0IwctzNmf06BcEXtYABwOeA4otEfgEOdnGGqV6IAAUopwM6zDYuAVjeKYpYwCjgCWOhH513+b2lhE+Avrj89NPyalzyuCIE6EN9BfQ1dHoPOAD40+9LE6D/5aoqSqtLsgiQC60DTiHzfGCFoaSsQAexZdlTgEuyCDgLuK8u5G7dEAHyKN8CBrtxLwDHAX8Z+l4N3GS0L3db4aN0X5opmc+2XZQAfb2LPd2eciG1lUSRJZ9qYHkZONwiYAjwSc3gs24BXWWWfzEVuMjQez13HljX8v7A28lvEgsInaBVcxLaAvr6sgJLtBWeNTrOB+4w2p8DRvoEnAPcXTVaY70QAbrbXwIONX7zBSAL/tvrk1+iviTllnRry2irr/QSEws4D7izCxMg1XQLLAQGGXpeCkw22kOWI49RMUujCJC+uwAfGtfcImAng4AtAMsBeg04pIkESOfbgQsMsNoGnxrtSrfv7rXrSlwXWN6kLZBgEBiB8iWUUZZPIN/AF1nMoiYSICDfAlt5iB4CxhpAzwXuMtqPBuY1lYB5wFEeqFeAwwyguvIUqvuiQO/xphJwP3Cmhyh0EKrOoGDIF7n+M5pKwEwXrqdBCaQSM77Ig7SSIicDs5pKwIvACA+pzFwZIF9OlKm36QyQV7jEqDDJk5VD58uFgGIGX1Se+6yJFqAKsqI6X84GdDb4Mh0Y5zUqjFYFakUTCXja5QLSmBQHbAL8ahAgT1AeYVreSKLLphGwF/CuAfLJQLldGSTFD75c5d4mNCoWyAqG9gYWGED1AOMKo12ZbiWA/idA++deY2DVTZ0Jh5UJPsFQtD/wDaAHGWl5EzgwaUi2gK4UXS11S0cTIjrMFBtYQdAk4DID0BnAAz4B6wNLgTKKG0VIDBHwqitwpOcW+OOB540FdeipNKbUWFrUtn06o5xOij4KyDuqU0IE3Obl/rLA63pTzm9XA8jKACjdniZAaSKFmUpB1yUhAlTsUEpMh913wEkuTe7rKTzPAHqO44vpKPkFhH3cWWBVV6ogJVYZUgz/tXtIYelzI3Ct0fExIGx6j7iKWBUUveyYBehv1RIjIEsfqziq8Xp4pSBJOYTVJFQcVY3wCFeKUjVGyYfQWB00+5bEVBECrNS+qsOKBpVHNCVWHs+LS7H5PV5pOu9v0+OKEOAXR39w1e1C7wM6AkJ1eLmkRcrpRQiQrqobXO5S3vL3/4kBKMsCknV0k+iasVLUMV3UX5SAPGtED8EOT+L9YENnCasUIXNO2goChFWHqAIRyxXN4qI1BCQg9dJESYq8LnbrCBAR8t50Lig6i0krCRBoVWhVlt45wkBrCRBuRZyPuAguxIPe9lXqhpd9DcZMXOvdkPF0Xu/8dohNUmZ/1QQkuitXr+d4fryuFx3jywQYm6suAqSX8vLTXKJDt4QqO6rtLYspXWZ/nQQkOJTAUJZGIav19q9MvKvN1RUIWKMAY5P3EBBjqO393d4C/gMVHwRQlpx21QAAAABJRU5ErkJggg==");background-repeat:no-repeat;background-position:50% 50%;background-size:50%;fill:#000}.taro-video-toast-volume .taro-video-toast-value{margin-left:10px;margin-top:5px;width:80px;height:5px}.taro-video-toast-volume .taro-video-toast-value>.taro-video-toast-value-content{overflow:hidden}.taro-video-toast-volume-grids{width:80px;height:5px}.taro-video-toast-volume-grids-item{float:left;width:7.1px;height:5px;background-color:#000}.taro-video-toast-volume-grids-item:not(:first-child){margin-left:1px}.taro-video-toast.taro-video-toast-progress{padding:6px;background-color:rgba(0, 0, 0, 0.8);line-height:18px;font-size:14px;color:#fff}';var __awaiter$1=undefined&&undefined.__awaiter||function(e,t,r,i){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function s(e){try{l(i.next(e))}catch(e){n(e)}}function o(e){try{l(i["throw"](e))}catch(e){n(e)}}function l(e){e.done?r(e.value):a(e.value).then(s,o)}l((i=i.apply(e,t||[])).next())}))};var Video=function(){function e(e){var t=this;registerInstance(this,e);this.onPlay=createEvent(this,"play",7);this.onPause=createEvent(this,"pause",7);this.onEnded=createEvent(this,"ended",7);this.onTimeUpdate=createEvent(this,"timeupdate",7);this.onError=createEvent(this,"error",7);this.onFullScreenChange=createEvent(this,"fullscreenchange",7);this.onProgress=createEvent(this,"progress",7);this.onLoadedMetaData=createEvent(this,"loadedmetadata",7);this.currentTime=0;this.isDraggingProgress=false;this.gestureType="none";this.controls=true;this.autoplay=false;this.loop=false;this.muted=false;this.initialTime=0;this.objectFit="contain";this.showProgress=true;this.showFullscreenBtn=true;this.showPlayBtn=true;this.showCenterPlayBtn=true;this.showMuteBtn=false;this.danmuBtn=false;this.enableDanmu=false;this.enablePlayGesture=false;this.enableProgressGesture=true;this.vslideGesture=false;this.vslideGestureInFullscreen=true;this.nativeProps={};this._enableDanmu=false;this.isPlaying=false;this.isFirst=true;this.isFullScreen=false;this.fullScreenTimestamp=(new Date).getTime();this.isMute=false;this.analyzeGesture=function(e){var r;var i={type:"none"};var a=e.touches[0].screenX;var n=e.touches[0].screenY;var s=a-t.lastTouchScreenX;var o=n-t.lastTouchScreenY;var l=t.isFullScreen?t.vslideGestureInFullscreen:t.vslideGesture;if(t.gestureType==="none"){var u=calcDist(s,o);if(u<10)return i;if(Math.abs(o)>=Math.abs(s)){if(l){t.gestureType="adjustVolume";t.lastVolume=t.videoRef.volume}else{return i}}else if(Math.abs(o)<Math.abs(s)){if(t.enableProgressGesture){t.gestureType="adjustProgress";t.lastPercentage=t.currentTime/((r=t.duration)!==null&&r!==void 0?r:t._duration)}else{return i}}}i.type=t.gestureType;i.dataX=normalizeNumber(s/200);i.dataY=normalizeNumber(o/200);return i};this.loadNativePlayer=function(){if(t.videoRef){t.videoRef.src=t.src;t.videoRef.load()}};this.init=function(){var e=t,r=e.src,i=e.videoRef;if(isHls(r)){if(Hls.isSupported()){if(t.hls){t.hls.destroy()}t.hls=new Hls;t.hls.loadSource(r);t.hls.attachMedia(i);t.hls.on(Hls.Events.MANIFEST_PARSED,(function(){t.autoplay&&t.play()}))}else if(i.canPlayType("application/vnd.apple.mpegurl")){t.loadNativePlayer()}else{console.error("该浏览器不支持 HLS 播放")}}else{t.loadNativePlayer()}};this.handlePlay=function(){t.isPlaying=true;t.isFirst=false;t.controlsRef.toggleVisibility(true);t.onPlay.emit()};this.handlePause=function(){t.isPlaying=false;t.controlsRef.toggleVisibility(true);t.onPause.emit()};this.handleEnded=function(){t.isFirst=true;t.pause();t.controlsRef.toggleVisibility();t.onEnded.emit()};this.handleTimeUpdate=throttle((function(e){return __awaiter$1(t,void 0,void 0,(function(){var t,r,i,a;return __generator(this,(function(n){switch(n.label){case 0:this.currentTime=this.videoRef.currentTime;i=this.duration||this._duration;return[4,this.controlsRef.getIsDraggingProgressBall()];case 1:a=n.sent();if(this.controls&&this.showProgress){if(!a&&!this.isDraggingProgress){this.controlsRef.setProgressBall(this.currentTime/i);this.controlsRef.setCurrentTime(this.currentTime)}}this.danmuRef.tick(this.currentTime);this.onTimeUpdate.emit({duration:(t=e.target)===null||t===void 0?void 0:t.duration,currentTime:(r=e.target)===null||r===void 0?void 0:r.currentTime});if(this.duration){if(this.currentTime>=this.duration){this.seek(0);this.handleEnded()}}return[2]}}))}))}),250);this.handleError=function(e){var r,i;t.onError.emit({errMsg:(i=(r=e.target)===null||r===void 0?void 0:r.error)===null||i===void 0?void 0:i.message})};this.handleDurationChange=function(){t._duration=t.videoRef.duration};this.handleProgress=function(){t.onProgress.emit()};this.handleLoadedMetaData=function(e){var r=e.target;t.onLoadedMetaData.emit({width:r.videoWidth,height:r.videoHeight,duration:r.duration})};this._play=function(){return t.videoRef.play()};this._pause=function(){return t.videoRef.pause()};this._stop=function(){t.videoRef.pause();t._seek(0)};this._seek=function(e){t.videoRef.currentTime=e};this.onTouchStartContainer=function(e){t.lastTouchScreenX=e.touches[0].screenX;t.lastTouchScreenY=e.touches[0].screenY};this.onClickContainer=function(){if(t.enablePlayGesture){var e=Date.now();if(e-t.lastClickedTime<300){t.isPlaying?t.pause():t.play()}t.lastClickedTime=e}t.controlsRef.toggleVisibility()};this.onClickFullScreenBtn=function(e){e.stopPropagation();t.toggleFullScreen()};this.handleFullScreenChange=function(e){var r=(new Date).getTime();if(!e.detail&&t.isFullScreen&&!document[screenFn.fullscreenElement]&&r-t.fullScreenTimestamp>100){t.toggleFullScreen(false)}};this.toggleFullScreen=function(e){if(e===void 0){e=!t.isFullScreen}t.isFullScreen=e;t.controlsRef.toggleVisibility(true);t.fullScreenTimestamp=(new Date).getTime();t.onFullScreenChange.emit({fullScreen:t.isFullScreen,direction:"vertical"});if(t.isFullScreen&&!document[screenFn.fullscreenElement]){setTimeout((function(){t.videoRef[screenFn.requestFullscreen]({navigationUI:"show"})}),0)}};this.toggleMute=function(e){e.stopPropagation();t.videoRef.muted=!t.isMute;t.controlsRef.toggleVisibility(true);t.isMute=!t.isMute};this.toggleDanmu=function(e){e.stopPropagation();t.controlsRef.toggleVisibility(true);t._enableDanmu=!t._enableDanmu}}e.prototype.componentWillLoad=function(){this._enableDanmu=this.enableDanmu};e.prototype.componentDidLoad=function(){this.init();if(this.initialTime){this.videoRef.currentTime=this.initialTime}this.danmuRef.sendDanmu(this.danmuList);if(document.addEventListener){document.addEventListener(screenFn.fullscreenchange,this.handleFullScreenChange)}};e.prototype.componentDidRender=function(){};e.prototype.disconnectedCallback=function(){if(document.removeEventListener){document.removeEventListener(screenFn.fullscreenchange,this.handleFullScreenChange)}};e.prototype.watchEnableDanmu=function(e){this._enableDanmu=e};e.prototype.watchSrc=function(){this.init()};e.prototype.onDocumentTouchMove=function(e){return __awaiter$1(this,void 0,void 0,(function(){var t,r,i;return __generator(this,(function(a){switch(a.label){case 0:if(this.lastTouchScreenX===undefined||this.lastTouchScreenY===undefined)return[2];return[4,this.controlsRef.getIsDraggingProgressBall()];case 1:if(a.sent())return[2];t=this.analyzeGesture(e);if(t.type==="adjustVolume"){this.toastVolumeRef.style.visibility="visible";r=Math.max(Math.min(this.lastVolume-t.dataY,1),0);this.videoRef.volume=r;this.toastVolumeBarRef.style.width="".concat(r*100,"%")}else if(t.type==="adjustProgress"){this.isDraggingProgress=true;this.nextPercentage=Math.max(Math.min(this.lastPercentage+t.dataX,1),0);if(this.controls&&this.showProgress){this.controlsRef.setProgressBall(this.nextPercentage);this.controlsRef.toggleVisibility(true)}i=this.duration||this._duration;this.toastProgressTitleRef.innerHTML="".concat(formatTime(this.nextPercentage*i)," / ").concat(formatTime(i));this.toastProgressRef.style.visibility="visible"}return[2]}}))}))};e.prototype.onDocumentTouchEnd=function(){var e;if(this.gestureType==="adjustVolume"){this.toastVolumeRef.style.visibility="hidden"}else if(this.gestureType==="adjustProgress"){this.toastProgressRef.style.visibility="hidden"}if(this.isDraggingProgress){this.isDraggingProgress=false;this.seek(this.nextPercentage*((e=this.duration)!==null&&e!==void 0?e:this._duration))}this.gestureType="none";this.lastTouchScreenX=undefined;this.lastTouchScreenY=undefined};e.prototype.play=function(){return __awaiter$1(this,void 0,void 0,(function(){return __generator(this,(function(e){this._play();return[2]}))}))};e.prototype.pause=function(){return __awaiter$1(this,void 0,void 0,(function(){return __generator(this,(function(e){this._pause();return[2]}))}))};e.prototype.stop=function(){return __awaiter$1(this,void 0,void 0,(function(){return __generator(this,(function(e){this._stop();return[2]}))}))};e.prototype.seek=function(e){return __awaiter$1(this,void 0,void 0,(function(){return __generator(this,(function(t){this._seek(e);return[2]}))}))};e.prototype.requestFullScreen=function(){return __awaiter$1(this,void 0,void 0,(function(){return __generator(this,(function(e){this.toggleFullScreen(true);return[2]}))}))};e.prototype.exitFullScreen=function(){return __awaiter$1(this,void 0,void 0,(function(){return __generator(this,(function(e){this.toggleFullScreen(false);return[2]}))}))};e.prototype.render=function(){var e=this;var t=this,r=t.controls,i=t.autoplay,a=t.loop,n=t.muted,s=t.poster,o=t.objectFit,l=t.isFirst,u=t.isMute,f=t.isFullScreen,c=t.showCenterPlayBtn,d=t.isPlaying,v=t._enableDanmu,g=t.showMuteBtn,p=t.danmuBtn,m=t.showFullscreenBtn,y=t.nativeProps;var E=this.duration||this._duration;var T=formatTime(E);return h(Host,{class:classnames("taro-video-container",{"taro-video-type-fullscreen":f}),onTouchStart:this.onTouchStartContainer,onClick:this.onClickContainer},h("video",Object.assign({class:"taro-video-video",style:{"object-fit":o},ref:function(t){if(t){e.videoRef=t}},autoplay:i,loop:a,muted:n,poster:r?s:undefined,playsinline:true,"webkit-playsinline":true,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onTimeUpdate:this.handleTimeUpdate,onError:this.handleError,onDurationChange:this.handleDurationChange,onProgress:this.handleProgress,onLoadedMetaData:this.handleLoadedMetaData},y),"暂时不支持播放该视频"),h("taro-video-danmu",{ref:function(t){if(t){e.danmuRef=t}},enable:v}),l&&c&&!d&&h("div",{class:"taro-video-cover"},h("div",{class:"taro-video-cover-play-button",onClick:function(){return e.play()}}),h("p",{class:"taro-video-cover-duration"},T)),h("taro-video-control",{ref:function(t){if(t){e.controlsRef=t}},controls:r,currentTime:this.currentTime,duration:E,isPlaying:this.isPlaying,pauseFunc:this._pause,playFunc:this._play,seekFunc:this._seek,showPlayBtn:this.showPlayBtn,showProgress:this.showProgress},g&&h("div",{class:classnames("taro-video-mute",{"taro-video-type-mute":u}),onClick:this.toggleMute}),p&&h("div",{class:classnames("taro-video-danmu-button",{"taro-video-danmu-button-active":v}),onClick:this.toggleDanmu},"弹幕"),m&&h("div",{class:classnames("taro-video-fullscreen",{"taro-video-type-fullscreen":f}),onClick:this.onClickFullScreenBtn})),h("div",{class:"taro-video-toast taro-video-toast-volume",ref:function(t){if(t){e.toastVolumeRef=t}}},h("div",{class:"taro-video-toast-title"},"音量"),h("div",{class:"taro-video-toast-icon"}),h("div",{class:"taro-video-toast-value"},h("div",{class:"taro-video-toast-value-content",ref:function(t){if(t){e.toastVolumeBarRef=t}}},h("div",{class:"taro-video-toast-volume-grids"},Array(10).fill(1).map((function(){return h("div",{class:"taro-video-toast-volume-grids-item"})})))))),h("div",{class:"taro-video-toast taro-video-toast-progress",ref:function(t){if(t){e.toastProgressRef=t}}},h("div",{class:"taro-video-toast-title",ref:function(t){if(t){e.toastProgressTitleRef=t}}})))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{enableDanmu:["watchEnableDanmu"],src:["watchSrc"]}},enumerable:false,configurable:true});return e}();Video.style=indexCss;var __awaiter=undefined&&undefined.__awaiter||function(e,t,r,i){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function s(e){try{l(i.next(e))}catch(e){n(e)}}function o(e){try{l(i["throw"](e))}catch(e){n(e)}}function l(e){e.done?r(e.value):a(e.value).then(s,o)}l((i=i.apply(e,t||[])).next())}))};var VideoDanmu=function(){function e(e){registerInstance(this,e);this.list=[];this.danmuElList=[];this.currentTime=0;this.enable=false;this.danmuList=[]}e.prototype.ensureProperties=function(e){var t=Object.assign({},e);if(!("time"in e)){t.time=this.currentTime}t.key=Math.random();t.bottom="".concat(Math.random()*90+5,"%");return t};e.prototype.sendDanmu=function(e){if(e===void 0){e=[]}return __awaiter(this,void 0,void 0,(function(){var t;var r=this;return __generator(this,(function(i){if(Array.isArray(e)){this.list=__spreadArray(__spreadArray([],this.list,true),e.map((function(e){return r.ensureProperties(e)})),true)}else{t=e;this.list=__spreadArray(__spreadArray([],this.list,true),[Object.assign({},this.ensureProperties(t))],false)}return[2]}))}))};e.prototype.tick=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,a;return __generator(this,(function(n){this.currentTime=e;if(!this.enable)return[2];t=this.list;r=t.filter((function(t){var r=t.time;return e-r<4&&e>r}));i=false;a=this.danmuList;if(r.length!==a.length){i=true}else{i=r.some((function(e){var t=e.key;return a.every((function(e){return t!==e.key}))}))}if(i){this.danmuList=r}return[2]}))}))};e.prototype.componentDidUpdate=function(){var e=this;requestAnimationFrame((function(){setTimeout((function(){var t=e.danmuElList.splice(0);t.forEach((function(e){e.style.left="0";e.style.webkitTransform="translateX(-100%)";e.style.transform="translateX(-100%)"}))}))}))};e.prototype.render=function(){var e=this;if(!this.enable)return"";return h(Host,{class:"taro-video-danmu"},this.danmuList.map((function(t){var r=t.text,i=t.color,a=t.bottom,n=t.key;return h("p",{class:"taro-video-danmu-item",key:n,style:{color:i,bottom:a},ref:function(t){if(t){e.danmuElList.push(t)}}},r)})))};return e}();export{VideoControl as taro_video_control,Video as taro_video_core,VideoDanmu as taro_video_danmu};
365
+ /*! exports provided: default */function(e,t,r){r.r(t);var i=r(/*! ../utils/logger */"./src/utils/logger.ts");var a=r(/*! ../loader/load-stats */"./src/loader/load-stats.ts");var n=/^age:\s*[\d.]+\s*$/m;var s=function(){function e(e){this.xhrSetup=void 0;this.requestTimeout=void 0;this.retryTimeout=void 0;this.retryDelay=void 0;this.config=null;this.callbacks=null;this.context=void 0;this.loader=null;this.stats=void 0;this.xhrSetup=e?e.xhrSetup:null;this.stats=new a["LoadStats"];this.retryDelay=0}var t=e.prototype;t.destroy=function e(){this.callbacks=null;this.abortInternal();this.loader=null;this.config=null};t.abortInternal=function e(){var t=this.loader;self.clearTimeout(this.requestTimeout);self.clearTimeout(this.retryTimeout);if(t){t.onreadystatechange=null;t.onprogress=null;if(t.readyState!==4){this.stats.aborted=true;t.abort()}}};t.abort=function e(){var t;this.abortInternal();if((t=this.callbacks)!==null&&t!==void 0&&t.onAbort){this.callbacks.onAbort(this.stats,this.context,this.loader)}};t.load=function e(t,r,i){if(this.stats.loading.start){throw new Error("Loader can only be used once.")}this.stats.loading.start=self.performance.now();this.context=t;this.config=r;this.callbacks=i;this.retryDelay=r.retryDelay;this.loadInternal()};t.loadInternal=function e(){var t=this.config,r=this.context;if(!t){return}var i=this.loader=new self.XMLHttpRequest;var a=this.stats;a.loading.first=0;a.loaded=0;var n=this.xhrSetup;try{if(n){try{n(i,r.url)}catch(e){i.open("GET",r.url,true);n(i,r.url)}}if(!i.readyState){i.open("GET",r.url,true)}var s=this.context.headers;if(s){for(var o in s){i.setRequestHeader(o,s[o])}}}catch(e){this.callbacks.onError({code:i.status,text:e.message},r,i);return}if(r.rangeEnd){i.setRequestHeader("Range","bytes="+r.rangeStart+"-"+(r.rangeEnd-1))}i.onreadystatechange=this.readystatechange.bind(this);i.onprogress=this.loadprogress.bind(this);i.responseType=r.responseType;self.clearTimeout(this.requestTimeout);this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),t.timeout);i.send()};t.readystatechange=function e(){var t=this.context,r=this.loader,a=this.stats;if(!t||!r){return}var n=r.readyState;var s=this.config;if(a.aborted){return}if(n>=2){self.clearTimeout(this.requestTimeout);if(a.loading.first===0){a.loading.first=Math.max(self.performance.now(),a.loading.start)}if(n===4){r.onreadystatechange=null;r.onprogress=null;var o=r.status;if(o>=200&&o<300){a.loading.end=Math.max(self.performance.now(),a.loading.first);var l;var u;if(t.responseType==="arraybuffer"){l=r.response;u=l.byteLength}else{l=r.responseText;u=l.length}a.loaded=a.total=u;if(!this.callbacks){return}var f=this.callbacks.onProgress;if(f){f(a,t,l,r)}if(!this.callbacks){return}var c={url:r.responseURL,data:l};this.callbacks.onSuccess(c,a,t,r)}else{if(a.retry>=s.maxRetry||o>=400&&o<499){i["logger"].error(o+" while loading "+t.url);this.callbacks.onError({code:o,text:r.statusText},t,r)}else{i["logger"].warn(o+" while loading "+t.url+", retrying in "+this.retryDelay+"...");this.abortInternal();this.loader=null;self.clearTimeout(this.retryTimeout);this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay);this.retryDelay=Math.min(2*this.retryDelay,s.maxRetryDelay);a.retry++}}}else{self.clearTimeout(this.requestTimeout);this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.timeout)}}};t.loadtimeout=function e(){i["logger"].warn("timeout while loading "+this.context.url);var t=this.callbacks;if(t){this.abortInternal();t.onTimeout(this.stats,this.context,this.loader)}};t.loadprogress=function e(t){var r=this.stats;r.loaded=t.loaded;if(t.lengthComputable){r.total=t.total}};t.getCacheAge=function e(){var t=null;if(this.loader&&n.test(this.loader.getAllResponseHeaders())){var r=this.loader.getResponseHeader("age");t=r?parseFloat(r):null}return t};return e}();t["default"]=s}})["default"]}))}));var Hls=getDefaultExportFromCjs(hls);var indexCss='.taro-video{display:inline-block;overflow:hidden;position:relative;width:100%;height:225px;line-height:0}.taro-video[hidden]{display:none}.taro-video-container{display:inline-block;position:absolute;left:0;top:0;width:100%;height:100%;background-color:#000;-o-object-position:inherit;object-position:inherit}.taro-video-container.taro-video-type-fullscreen{position:fixed;left:0;right:0;top:0;bottom:0;z-index:999}.taro-video-container.taro-video-type-fullscreen.taro-video-type-rotate-left{-webkit-transform:translate(-50%, -50%) rotate(-90deg);transform:translate(-50%, -50%) rotate(-90deg)}.taro-video-container.taro-video-type-fullscreen.taro-video-type-rotate-right{-webkit-transform:translate(-50%, -50%) rotate(90deg);transform:translate(-50%, -50%) rotate(90deg)}.taro-video-video{width:100%;height:100%;-o-object-position:inherit;object-position:inherit}.taro-video-cover{display:-ms-flexbox;display:flex;position:absolute;left:0;top:0;bottom:0;z-index:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:100%;background-color:rgba(1, 1, 1, 0.5);-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-pack:center;-webkit-box-align:center}.taro-video-cover-play-button{width:40px;height:40px;background-repeat:no-repeat;background-position:50% 50%;background-size:50%}.taro-video-cover-duration{margin-top:10px;line-height:1;font-size:16px;color:#fff}.taro-video-bar{display:-ms-flexbox;display:flex;visibility:hidden;overflow:hidden;position:absolute;right:0;bottom:0;z-index:1;-ms-flex-align:center;align-items:center;padding:0 10px;height:44px;background-color:rgba(0, 0, 0, 0.5);-webkit-box-align:center}.taro-video-bar.taro-video-bar-full{left:0}.taro-video-controls{display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;margin:0 8.5px}.taro-video-control-button{-webkit-box-sizing:content-box;box-sizing:content-box;margin-left:-8.5px;padding:14.5px 12.5px;width:13px;height:15px}.taro-video-control-button::after{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:50% 50%;background-size:100%;content:""}.taro-video-control-button.taro-video-control-button-play::after,.taro-video-cover-play-button{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAeCAYAAAAy2w7YAAAAAXNSR0IArs4c6QAAAWhJREFUSA1j+P///0cgBoHjQGzCQCsAtgJB/AMy5wCxGNXtQ9iBwvoA5BUCMQvVLEQxHpNzDSjkRhXLMM3GKrIeKKpEkYVYjcUu+AMo3ALE3GRZiN1MvKKPgbIRJFuG10j8koeA0gZEW4jfLIKyf4EqpgOxMEELCRpFnIJ3QGU5QMyM00LizCFa1SWgSkeslhFtBGkKVwGVy6FYSJp+klR/A6quB2JOkIWMIK0oNlOf8xBoZDE9LAI7nYn6HsBq4l96WHQEaLUpAyiOaASeAM2NgvuPBpaACt82IEYtfKls0UagecpwXyAzqGTRdaA57sjmYrAptAjUsCkGYlYMg9EFyLQI1IiZB8Ti6Obh5JNh0QmgHlOcBuKSIMGi50C18UDMiMssvOJEWPQLqKYbiHnxGkRIkoBF24DyaoTMIEoeh0W3geI+RBlArCI0iz4D+RVAzEasfqLVAQ19AcSg5LoYiKWI1kiiQgCMBLnEEcfDSgAAAABJRU5ErkJggg==")}.taro-video-control-button.taro-video-control-button-pause::after{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAAAXNSR0IArs4c6QAAAFlJREFUSA3tksEKACAIQ7X//5zq98wOgQayum8QaGweHhMzG/6OujzKAymn+0LMqivu1XznWmX8/echTIyMyAgTwA72iIwwAexgj8gIE8CO3aMRbDPMaEy5BRGaKcZv8YxRAAAAAElFTkSuQmCC")}.taro-video-current-time,.taro-video-duration{margin-top:15px;margin-bottom:14.5px;height:14.5px;line-height:14.5px;font-size:12px;color:#cbcbcb}.taro-video-progress-container{position:relative;-ms-flex-positive:2;flex-grow:2;-webkit-box-flex:2}.taro-video-progress{position:relative;margin:21px 12px;height:2px;background-color:rgba(255, 255, 255, 0.4)}.taro-video-progress-buffered{position:absolute;left:0;top:0;width:0;height:100%;background-color:rgba(255, 255, 255, 0.8);-webkit-transition:width 0.1s;transition:width 0.1s}.taro-video-ball{position:absolute;left:0;top:-21px;-webkit-box-sizing:content-box;box-sizing:content-box;margin-left:-22px;padding:14px;width:16px;height:16px}.taro-video-inner{border-radius:50%;width:100%;height:100%;background-color:#fff}.taro-video-danmu-button{margin:0 8.5px;padding:2px 10px;border:1px solid #fff;border-radius:5px;line-height:1;font-size:13px;color:#fff;white-space:nowrap}.taro-video-danmu-button.taro-video-danmu-button-active{border-color:#48c23d;color:#48c23d}.taro-video-fullscreen,.taro-video-mute{-webkit-box-sizing:content-box;box-sizing:content-box;padding:8.5px;width:17px;height:17px;background-repeat:no-repeat;background-position:50% 50%;background-size:50%}.taro-video-fullscreen{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAhUlEQVRYR+2WSwrAMAhEnZO3PfmULLooGEFTiIXJ2s/kRY2wzQeb85sE9CRA8jSzY1YfAFzhJBnU1AVgxH2dSiArCnD9QgGzRNnOech48SRABHoSyFb5in3PSbhyo6yvCPQkEM3u7BsPe/0FIvBfAh/vhKmVbO9SWun1qk/PSVi9TcVPBG6R1YIhgWwNpQAAAABJRU5ErkJggg==")}.taro-video-fullscreen.taro-video-type-fullscreen{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABPUlEQVRYR+2Xu0pDURBF1/ZLxNcHKNiIlfhA7C0UBSEE8RNEBNFPUEQEEbGxFiSSSrCwEHsf5E/ccsSUuWfUhKQ40947+y42Z8+ZK/pcinzf9hhwD1xJ2q/qsb0JHAOzkl5y+lGAGnCWICQtZgAS6DxQk3TeLYA6cAo0JSXxjmW7CcwBdUkJurKiDhSA4kBvHbA9CqwBQx2O7BSw8ssU3ALPFRF4knT3nQLbr8B4LjLBOdAAFgJaLUkjbYC9n+zm+i4kXWbmwCqwnRMCHiXthuZAQOzPrxSA4kBxYDAcsH0EzATCfCLpJjOINoCtgFZabg7bk7AFDAeaGpKWgitZTu5N0kQbYBmYrujo9mX0CVxL+gidAdu9vY5zXhWA4sAgOND3X7NJ4AHYCaxkB8B62gslvecSFpoDOZH/PP8Cnt7hIaM5xCEAAAAASUVORK5CYII=")}.taro-video-mute{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAGAGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDAgNzkuMTYwNDUxLCAyMDE3LzA1LzA2LTAxOjA4OjIxICAgICAgICAiPiA8cmRmOlJERiB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rvaxO5mNygEvHaZ5BfADuARvAaWBpP4DGFBHfgBngFzClTrUKkCDeA+9S837rAEnbqb7VFcCpVJ/oCmCw959aB1AfAROpudYqgDoOLKRmPyLelAF8bcD4pPoMeAtcB34AT4uDBqXXwFG8XXUU/72MIuK1OgE8Bs6l7mEvo8up7lN1Ge0n9aK6VHMFZvJTr9S3CiALaCQhqZOSvegMIAvu2UVSWpigLC1fbQ0gm6in7qpfLCQbhwGIYcyPQ53/G3YO8BtUtd35bvKcVwAAAABJRU5ErkJggg==")}.taro-video-mute.taro-video-type-mute{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGAGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDAgNzkuMTYwNDUxLCAyMDE3LzA1LzA2LTAxOjA4OjIxICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLz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WKiartJf9nWV/mty7UfUafW7erpqRGI9EBuprffvu9n6C1KOmsqwI5A1AAAAAElFTkSuQmCC")}.taro-video-danmu{overflow:visible;position:absolute;left:0;top:0;bottom:0;margin-top:14px;margin-bottom:44px;width:100%;line-height:14px;font-size:14px}.taro-video-danmu-item{position:absolute;left:100%;line-height:1;color:#fff;white-space:nowrap;-webkit-transform:translateX(0);transform:translateX(0);-webkit-transition-property:left, -webkit-transform;transition-property:left, -webkit-transform;transition-property:left, transform;transition-property:left, transform, -webkit-transform;-webkit-transition-duration:3s;transition-duration:3s;-webkit-transition-timing-function:linear;transition-timing-function:linear}.taro-video-toast{display:block;visibility:hidden;position:absolute;left:50%;top:50%;border-radius:5px;background-color:rgba(255, 255, 255, 0.8);pointer-events:none;color:#000;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.taro-video-toast.taro-video-toast-volume{display:block;width:100px;height:100px}.taro-video-toast-volume .taro-video-toast-title{display:block;margin-top:10px;width:100%;line-height:16px;text-align:center;font-size:12px}.taro-video-toast-volume .taro-video-toast-icon{display:block;margin-left:25%;width:50%;height:50%;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAFhklEQVR4Xu2aeaxfQxTHP1VBES0NIQitWtpaaxeCUkQtaYVa0tiClAq1ExIiQTVppaWxt8RWSa2tWkJQRGgtQaSIpUKEpG0ssbbk28yV2+mZO/e9e3vvu/e98897mZnfzPl+75mZs0wvurn06ub46SGgxwLqZaA3sB/wO/A+8G/V6tS5BU4BJgJbO9DvAMOB36okoQ4CNgAeBEYbQK8Bbm4zAdsBc4EdAyA/APZoKwHHAA8DG2UA/AnYrG0ErAVcD1yXA9gfQJ8c40obsqbPgH7AY8CROTVuFQFD3X7fJid4DWsNAWOAGZ0w58YTsDZwKzChA189PbTRBGwKzAYO6iT4srbAMHfTfAksjulS1iG4JzAH2Dy2YKS/qAVcCdzi1vgZOBZ4PWvNGAG6wgYCW0IwctzNmf06B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cVY3wCFeKUjVGyYfQWB00+5bEVBECrNS+qsOKBpVHNCVWHs+LS7H5PV5pOu9v0+OKEOAXR39w1e1C7wM6AkJ1eLmkRcrpRQiQrqobXO5S3vL3/4kBKMsCknV0k+iasVLUMV3UX5SAPGtED8EOT+L9YENnCasUIXNO2goChFWHqAIRyxXN4qI1BCQg9dJESYq8LnbrCBAR8t50Lig6i0krCRBoVWhVlt45wkBrCRBuRZyPuAguxIPe9lXqhpd9DcZMXOvdkPF0Xu/8dohNUmZ/1QQkuitXr+d4fryuFx3jywQYm6suAqSX8vLTXKJDt4QqO6rtLYspXWZ/nQQkOJTAUJZGIav19q9MvKvN1RUIWKMAY5P3EBBjqO393d4C/gMVHwRQlpx21QAAAABJRU5ErkJggg==");background-repeat:no-repeat;background-position:50% 50%;background-size:50%;fill:#000}.taro-video-toast-volume .taro-video-toast-value{margin-left:10px;margin-top:5px;width:80px;height:5px}.taro-video-toast-volume .taro-video-toast-value>.taro-video-toast-value-content{overflow:hidden}.taro-video-toast-volume-grids{width:80px;height:5px}.taro-video-toast-volume-grids-item{float:left;width:7.1px;height:5px;background-color:#000}.taro-video-toast-volume-grids-item:not(:first-child){margin-left:1px}.taro-video-toast.taro-video-toast-progress{padding:6px;background-color:rgba(0, 0, 0, 0.8);line-height:18px;font-size:14px;color:#fff}';var __awaiter$1=undefined&&undefined.__awaiter||function(e,t,r,i){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function s(e){try{l(i.next(e))}catch(e){n(e)}}function o(e){try{l(i["throw"](e))}catch(e){n(e)}}function l(e){e.done?r(e.value):a(e.value).then(s,o)}l((i=i.apply(e,t||[])).next())}))};var Video=function(){function e(e){var t=this;registerInstance(this,e);this.onPlay=createEvent(this,"play",7);this.onPause=createEvent(this,"pause",7);this.onEnded=createEvent(this,"ended",7);this.onTimeUpdate=createEvent(this,"timeupdate",7);this.onError=createEvent(this,"error",7);this.onFullScreenChange=createEvent(this,"fullscreenchange",7);this.onProgress=createEvent(this,"progress",7);this.onLoadedMetaData=createEvent(this,"loadedmetadata",7);this.currentTime=0;this.isDraggingProgress=false;this.gestureType="none";this.controls=true;this.autoplay=false;this.loop=false;this.muted=false;this.initialTime=0;this.objectFit="contain";this.showProgress=true;this.showFullscreenBtn=true;this.showPlayBtn=true;this.showCenterPlayBtn=true;this.showMuteBtn=false;this.danmuBtn=false;this.enableDanmu=false;this.enablePlayGesture=false;this.enableProgressGesture=true;this.vslideGesture=false;this.vslideGestureInFullscreen=true;this.nativeProps={};this._enableDanmu=false;this.isPlaying=false;this.isFirst=true;this.isFullScreen=false;this.fullScreenTimestamp=(new Date).getTime();this.isMute=false;this.analyzeGesture=function(e){var r;var i={type:"none"};var a=e.touches[0].screenX;var n=e.touches[0].screenY;var s=a-t.lastTouchScreenX;var o=n-t.lastTouchScreenY;var l=t.isFullScreen?t.vslideGestureInFullscreen:t.vslideGesture;if(t.gestureType==="none"){var u=calcDist(s,o);if(u<10)return i;if(Math.abs(o)>=Math.abs(s)){if(l){t.gestureType="adjustVolume";t.lastVolume=t.videoRef.volume}else{return i}}else if(Math.abs(o)<Math.abs(s)){if(t.enableProgressGesture){t.gestureType="adjustProgress";t.lastPercentage=t.currentTime/((r=t.duration)!==null&&r!==void 0?r:t._duration)}else{return i}}}i.type=t.gestureType;i.dataX=normalizeNumber(s/200);i.dataY=normalizeNumber(o/200);return i};this.loadNativePlayer=function(){if(t.videoRef){t.videoRef.src=t.src;t.videoRef.load()}};this.init=function(){var e=t,r=e.src,i=e.videoRef;if(isHls(r)){if(Hls.isSupported()){if(t.hls){t.hls.destroy()}t.hls=new Hls;t.hls.loadSource(r);t.hls.attachMedia(i);t.hls.on(Hls.Events.MANIFEST_PARSED,(function(){t.autoplay&&t.play()}))}else if(i.canPlayType("application/vnd.apple.mpegurl")){t.loadNativePlayer()}else{console.error("该浏览器不支持 HLS 播放")}}else{t.loadNativePlayer()}};this.handlePlay=function(){t.isPlaying=true;t.isFirst=false;t.controlsRef.toggleVisibility(true);t.onPlay.emit()};this.handlePause=function(){t.isPlaying=false;t.controlsRef.toggleVisibility(true);t.onPause.emit()};this.handleEnded=function(){t.isFirst=true;t.pause();t.controlsRef.toggleVisibility();t.onEnded.emit()};this.handleTimeUpdate=throttle((function(e){return __awaiter$1(t,void 0,void 0,(function(){var t,r,i,a;return __generator(this,(function(n){switch(n.label){case 0:this.currentTime=this.videoRef.currentTime;i=this.duration||this._duration;return[4,this.controlsRef.getIsDraggingProgressBall()];case 1:a=n.sent();if(this.controls&&this.showProgress){if(!a&&!this.isDraggingProgress){this.controlsRef.setProgressBall(this.currentTime/i);this.controlsRef.setCurrentTime(this.currentTime)}}this.danmuRef.tick(this.currentTime);this.onTimeUpdate.emit({duration:(t=e.target)===null||t===void 0?void 0:t.duration,currentTime:(r=e.target)===null||r===void 0?void 0:r.currentTime});if(this.duration){if(this.currentTime>=this.duration){this.seek(0);this.handleEnded()}}return[2]}}))}))}),250);this.handleError=function(e){var r,i;t.onError.emit({errMsg:(i=(r=e.target)===null||r===void 0?void 0:r.error)===null||i===void 0?void 0:i.message})};this.handleDurationChange=function(){t._duration=t.videoRef.duration};this.handleProgress=function(){t.onProgress.emit()};this.handleLoadedMetaData=function(e){var r=e.target;t.onLoadedMetaData.emit({width:r.videoWidth,height:r.videoHeight,duration:r.duration})};this._play=function(){return t.videoRef.play()};this._pause=function(){return t.videoRef.pause()};this._stop=function(){t.videoRef.pause();t._seek(0)};this._seek=function(e){t.videoRef.currentTime=e};this.onTouchStartContainer=function(e){t.lastTouchScreenX=e.touches[0].screenX;t.lastTouchScreenY=e.touches[0].screenY};this.onClickContainer=function(){if(t.enablePlayGesture){var e=Date.now();if(e-t.lastClickedTime<300){t.isPlaying?t.pause():t.play()}t.lastClickedTime=e}t.controlsRef.toggleVisibility()};this.onClickFullScreenBtn=function(e){e.stopPropagation();t.toggleFullScreen()};this.handleFullScreenChange=function(e){var r=(new Date).getTime();if(!e.detail&&t.isFullScreen&&!document[screenFn.fullscreenElement]&&r-t.fullScreenTimestamp>100){t.toggleFullScreen(false)}};this.toggleFullScreen=function(e){if(e===void 0){e=!t.isFullScreen}t.isFullScreen=e;t.controlsRef.toggleVisibility(true);t.fullScreenTimestamp=(new Date).getTime();t.onFullScreenChange.emit({fullScreen:t.isFullScreen,direction:"vertical"});if(t.isFullScreen&&!document[screenFn.fullscreenElement]){setTimeout((function(){t.videoRef[screenFn.requestFullscreen]({navigationUI:"auto"})}),0)}};this.toggleMute=function(e){e.stopPropagation();t.videoRef.muted=!t.isMute;t.controlsRef.toggleVisibility(true);t.isMute=!t.isMute};this.toggleDanmu=function(e){e.stopPropagation();t.controlsRef.toggleVisibility(true);t._enableDanmu=!t._enableDanmu}}e.prototype.componentWillLoad=function(){this._enableDanmu=this.enableDanmu};e.prototype.componentDidLoad=function(){this.init();if(this.initialTime){this.videoRef.currentTime=this.initialTime}this.danmuRef.sendDanmu(this.danmuList);if(document.addEventListener){document.addEventListener(screenFn.fullscreenchange,this.handleFullScreenChange)}if(this.videoRef&&scene==="iOS"){this.videoRef.addEventListener("webkitendfullscreen",this.handleFullScreenChange)}};e.prototype.componentDidRender=function(){};e.prototype.disconnectedCallback=function(){if(document.removeEventListener){document.removeEventListener(screenFn.fullscreenchange,this.handleFullScreenChange)}if(this.videoRef&&scene==="iOS"){this.videoRef.removeEventListener("webkitendfullscreen",this.handleFullScreenChange)}};e.prototype.watchEnableDanmu=function(e){this._enableDanmu=e};e.prototype.watchSrc=function(){this.init()};e.prototype.onDocumentTouchMove=function(e){return __awaiter$1(this,void 0,void 0,(function(){var t,r,i;return __generator(this,(function(a){switch(a.label){case 0:if(this.lastTouchScreenX===undefined||this.lastTouchScreenY===undefined)return[2];return[4,this.controlsRef.getIsDraggingProgressBall()];case 1:if(a.sent())return[2];t=this.analyzeGesture(e);if(t.type==="adjustVolume"){this.toastVolumeRef.style.visibility="visible";r=Math.max(Math.min(this.lastVolume-t.dataY,1),0);this.videoRef.volume=r;this.toastVolumeBarRef.style.width=r*100+"%"}else if(t.type==="adjustProgress"){this.isDraggingProgress=true;this.nextPercentage=Math.max(Math.min(this.lastPercentage+t.dataX,1),0);if(this.controls&&this.showProgress){this.controlsRef.setProgressBall(this.nextPercentage);this.controlsRef.toggleVisibility(true)}i=this.duration||this._duration;this.toastProgressTitleRef.innerHTML=formatTime(this.nextPercentage*i)+" / "+formatTime(i);this.toastProgressRef.style.visibility="visible"}return[2]}}))}))};e.prototype.onDocumentTouchEnd=function(){var e;if(this.gestureType==="adjustVolume"){this.toastVolumeRef.style.visibility="hidden"}else if(this.gestureType==="adjustProgress"){this.toastProgressRef.style.visibility="hidden"}if(this.isDraggingProgress){this.isDraggingProgress=false;this.seek(this.nextPercentage*((e=this.duration)!==null&&e!==void 0?e:this._duration))}this.gestureType="none";this.lastTouchScreenX=undefined;this.lastTouchScreenY=undefined};e.prototype.play=function(){return __awaiter$1(this,void 0,void 0,(function(){return __generator(this,(function(e){this._play();return[2]}))}))};e.prototype.pause=function(){return __awaiter$1(this,void 0,void 0,(function(){return __generator(this,(function(e){this._pause();return[2]}))}))};e.prototype.stop=function(){return __awaiter$1(this,void 0,void 0,(function(){return __generator(this,(function(e){this._stop();return[2]}))}))};e.prototype.seek=function(e){return __awaiter$1(this,void 0,void 0,(function(){return __generator(this,(function(t){this._seek(e);return[2]}))}))};e.prototype.requestFullScreen=function(){return __awaiter$1(this,void 0,void 0,(function(){return __generator(this,(function(e){this.toggleFullScreen(true);return[2]}))}))};e.prototype.exitFullScreen=function(){return __awaiter$1(this,void 0,void 0,(function(){return __generator(this,(function(e){this.toggleFullScreen(false);return[2]}))}))};e.prototype.render=function(){var e=this;var t=this,r=t.controls,i=t.autoplay,a=t.loop,n=t.muted,s=t.poster,o=t.objectFit,l=t.isFirst,u=t.isMute,f=t.isFullScreen,c=t.showCenterPlayBtn,d=t.isPlaying,v=t._enableDanmu,g=t.showMuteBtn,p=t.danmuBtn,m=t.showFullscreenBtn,y=t.nativeProps;var E=this.duration||this._duration;var T=formatTime(E);return h(Host,{class:classnames("taro-video-container",{"taro-video-type-fullscreen":f}),onTouchStart:this.onTouchStartContainer,onClick:this.onClickContainer},h("video",Object.assign({class:"taro-video-video",style:{"object-fit":o},ref:function(t){if(t){e.videoRef=t}},autoplay:i,loop:a,muted:n,poster:r?s:undefined,playsinline:true,"webkit-playsinline":true,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onTimeUpdate:this.handleTimeUpdate,onError:this.handleError,onDurationChange:this.handleDurationChange,onProgress:this.handleProgress,onLoadedMetaData:this.handleLoadedMetaData},y),"暂时不支持播放该视频"),h("taro-video-danmu",{ref:function(t){if(t){e.danmuRef=t}},enable:v}),l&&c&&!d&&h("div",{class:"taro-video-cover"},h("div",{class:"taro-video-cover-play-button",onClick:function(){return e.play()}}),h("p",{class:"taro-video-cover-duration"},T)),h("taro-video-control",{ref:function(t){if(t){e.controlsRef=t}},controls:r,currentTime:this.currentTime,duration:E,isPlaying:this.isPlaying,pauseFunc:this._pause,playFunc:this._play,seekFunc:this._seek,showPlayBtn:this.showPlayBtn,showProgress:this.showProgress},g&&h("div",{class:classnames("taro-video-mute",{"taro-video-type-mute":u}),onClick:this.toggleMute}),p&&h("div",{class:classnames("taro-video-danmu-button",{"taro-video-danmu-button-active":v}),onClick:this.toggleDanmu},"弹幕"),m&&h("div",{class:classnames("taro-video-fullscreen",{"taro-video-type-fullscreen":f}),onClick:this.onClickFullScreenBtn})),h("div",{class:"taro-video-toast taro-video-toast-volume",ref:function(t){if(t){e.toastVolumeRef=t}}},h("div",{class:"taro-video-toast-title"},"音量"),h("div",{class:"taro-video-toast-icon"}),h("div",{class:"taro-video-toast-value"},h("div",{class:"taro-video-toast-value-content",ref:function(t){if(t){e.toastVolumeBarRef=t}}},h("div",{class:"taro-video-toast-volume-grids"},Array(10).fill(1).map((function(){return h("div",{class:"taro-video-toast-volume-grids-item"})})))))),h("div",{class:"taro-video-toast taro-video-toast-progress",ref:function(t){if(t){e.toastProgressRef=t}}},h("div",{class:"taro-video-toast-title",ref:function(t){if(t){e.toastProgressTitleRef=t}}})))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{enableDanmu:["watchEnableDanmu"],src:["watchSrc"]}},enumerable:false,configurable:true});return e}();Video.style=indexCss;var __awaiter=undefined&&undefined.__awaiter||function(e,t,r,i){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function s(e){try{l(i.next(e))}catch(e){n(e)}}function o(e){try{l(i["throw"](e))}catch(e){n(e)}}function l(e){e.done?r(e.value):a(e.value).then(s,o)}l((i=i.apply(e,t||[])).next())}))};var VideoDanmu=function(){function e(e){registerInstance(this,e);this.list=[];this.danmuElList=[];this.currentTime=0;this.enable=false;this.danmuList=[]}e.prototype.ensureProperties=function(e){var t=Object.assign({},e);if(!("time"in e)){t.time=this.currentTime}t.key=Math.random();t.bottom=Math.random()*90+5+"%";return t};e.prototype.sendDanmu=function(e){if(e===void 0){e=[]}return __awaiter(this,void 0,void 0,(function(){var t;var r=this;return __generator(this,(function(i){if(Array.isArray(e)){this.list=__spreadArray(__spreadArray([],this.list),e.map((function(e){return r.ensureProperties(e)})))}else{t=e;this.list=__spreadArray(__spreadArray([],this.list),[Object.assign({},this.ensureProperties(t))])}return[2]}))}))};e.prototype.tick=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,a;return __generator(this,(function(n){this.currentTime=e;if(!this.enable)return[2];t=this.list;r=t.filter((function(t){var r=t.time;return e-r<4&&e>r}));i=false;a=this.danmuList;if(r.length!==a.length){i=true}else{i=r.some((function(e){var t=e.key;return a.every((function(e){return t!==e.key}))}))}if(i){this.danmuList=r}return[2]}))}))};e.prototype.componentDidUpdate=function(){var e=this;requestAnimationFrame((function(){setTimeout((function(){var t=e.danmuElList.splice(0);t.forEach((function(e){e.style.left="0";e.style.webkitTransform="translateX(-100%)";e.style.transform="translateX(-100%)"}))}))}))};e.prototype.render=function(){var e=this;if(!this.enable)return"";return h(Host,{class:"taro-video-danmu"},this.danmuList.map((function(t){var r=t.text,i=t.color,a=t.bottom,n=t.key;return h("p",{class:"taro-video-danmu-item",key:n,style:{color:i,bottom:a},ref:function(t){if(t){e.danmuElList.push(t)}}},r)})))};return e}();export{VideoControl as taro_video_control,Video as taro_video_core,VideoDanmu as taro_video_danmu};
@@ -1 +1 @@
1
- import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-789b3db7.js";import{c as classnames}from"./index-cd1a2d33.js";var indexCss="body,html{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}taro-view-core{display:block}";var View=function(){function t(t){registerInstance(this,t);this.onLongPress=createEvent(this,"longpress",7);this.hoverStartTime=50;this.hoverStayTime=400;this.hover=false;this.touch=false;this.startTime=0}t.prototype.onTouchStart=function(){var t=this;if(this.hoverClass){this.touch=true;setTimeout((function(){if(t.touch){t.hover=true}}),this.hoverStartTime)}this.timeoutEvent=setTimeout((function(){t.onLongPress.emit()}),350);this.startTime=Date.now()};t.prototype.onTouchMove=function(){clearTimeout(this.timeoutEvent)};t.prototype.onTouchEnd=function(){var t=this;var e=Date.now()-this.startTime;if(e<350){clearTimeout(this.timeoutEvent)}if(this.hoverClass){this.touch=false;setTimeout((function(){if(!t.touch){t.hover=false}}),this.hoverStayTime)}};t.prototype.componentDidRender=function(){var t=this.el;t.childNodes.forEach((function(e){if(e.nodeType===document.COMMENT_NODE)t.removeChild(e)}))};t.prototype.render=function(){var t;var e=classnames((t={},t["".concat(this.hoverClass)]=this.hover,t));var o={};if(!!this.animation){o["animation"]=this.animation;o["data-animation"]=this.animation}return h(Host,Object.assign({class:e},o),h("slot",null))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();View.style=indexCss;export{View as taro_view_core};
1
+ import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-1d67274c.js";import{c as classnames}from"./index-cd1a2d33.js";var indexCss="body,html{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}taro-view-core{display:block}";var View=function(){function t(t){registerInstance(this,t);this.onLongPress=createEvent(this,"longpress",7);this.hoverStartTime=50;this.hoverStayTime=400;this.hover=false;this.touch=false;this.startTime=0}t.prototype.onTouchStart=function(){var t=this;if(this.hoverClass){this.touch=true;setTimeout((function(){if(t.touch){t.hover=true}}),this.hoverStartTime)}this.timeoutEvent=setTimeout((function(){t.onLongPress.emit()}),350);this.startTime=Date.now()};t.prototype.onTouchMove=function(){clearTimeout(this.timeoutEvent)};t.prototype.onTouchEnd=function(){var t=this;var e=Date.now()-this.startTime;if(e<350){clearTimeout(this.timeoutEvent)}if(this.hoverClass){this.touch=false;setTimeout((function(){if(!t.touch){t.hover=false}}),this.hoverStayTime)}};t.prototype.componentDidRender=function(){var t=this.el;t.childNodes.forEach((function(t){if(t.nodeType===document.COMMENT_NODE&&t["s-cn"])t["s-cn"]=false}))};t.prototype.render=function(){var t;var e=classnames((t={},t[""+this.hoverClass]=this.hover,t));var i={};if(!!this.animation){i["animation"]=this.animation;i["data-animation"]=this.animation}return h(Host,Object.assign({class:e},i),h("slot",null))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();View.style=indexCss;export{View as taro_view_core};
@@ -1 +1 @@
1
- import{r as registerInstance,h,H as Host}from"./index-789b3db7.js";var VoipRoom=function(){function o(o){registerInstance(this,o)}o.prototype.componentDidLoad=function(){console.error("H5 暂不支持 VoipRoom 组件!")};o.prototype.render=function(){return h(Host,null)};return o}();export{VoipRoom as taro_voip_room_core};
1
+ import{r as registerInstance,h,H as Host}from"./index-1d67274c.js";var VoipRoom=function(){function o(o){registerInstance(this,o)}o.prototype.componentDidLoad=function(){console.error("H5 暂不支持 VoipRoom 组件!")};o.prototype.render=function(){return h(Host,null)};return o}();export{VoipRoom as taro_voip_room_core};
@@ -1 +1 @@
1
- import{r as registerInstance,c as createEvent,h}from"./index-789b3db7.js";var indexCss="iframe{border:none}.taro-webview{position:fixed;top:0;bottom:0;z-index:999;width:100%;height:100%}";var WebView=function(){function e(e){registerInstance(this,e);this.onLoad=createEvent(this,"load",7);this.onError=createEvent(this,"error",7)}e.prototype.render=function(){var e=this,r=e.src,t=e.onLoad,o=e.onError;return h("iframe",{class:"taro-webview",onLoad:function(e){e.stopPropagation();t.emit({src:r})},onError:function(e){e.stopPropagation();o.emit({src:r})},src:r})};return e}();WebView.style=indexCss;export{WebView as taro_web_view_core};
1
+ import{r as registerInstance,c as createEvent,h}from"./index-1d67274c.js";var indexCss="iframe{border:none}.taro-webview{position:fixed;top:0;bottom:0;z-index:999;width:100%;height:100%}";var WebView=function(){function e(e){registerInstance(this,e);this.onLoad=createEvent(this,"load",7);this.onError=createEvent(this,"error",7)}e.prototype.render=function(){var e=this,r=e.src,t=e.onLoad,o=e.onError;return h("iframe",{class:"taro-webview",onLoad:function(e){e.stopPropagation();t.emit({src:r})},onError:function(e){e.stopPropagation();o.emit({src:r})},src:r})};return e}();WebView.style=indexCss;export{WebView as taro_web_view_core};
@@ -0,0 +1 @@
1
+ import{r as s,h as r,H as o}from"./p-8c7cf814.js";let t=class{constructor(r){s(this,r),this.percent=0,this.showInfo=!1,this.borderRadius=0,this.fontSize=16,this.strokeWidth=6,this.activeColor="#09BB07",this.backgroundColor="#EBEBEB",this.active=!1}render(){const{percent:s,showInfo:t,borderRadius:i,fontSize:e,strokeWidth:a,activeColor:n,backgroundColor:c,active:h}=this,l=s>100?100:s<0?0:s,p=h?"width 1s ease-in-out":"none";return r(o,{class:"weui-progress"},r("div",{class:"weui-progress__bar",style:{height:a+"px",backgroundColor:c}},r("div",{class:"weui-progress__inner-bar",style:{width:`${l}%`,transition:p,WebkitTransition:p,backgroundColor:n,borderRadius:i?`${i}px`:"0px"}})),t&&r("div",{class:"weui-progress__opr",style:{"font-size":`${e}px`}},r("span",null,l,"%")))}};export{t as taro_progress_core}
@@ -0,0 +1 @@
1
+ import{r as o,h as r,H as e}from"./p-8c7cf814.js";let n=class{constructor(r){o(this,r)}componentDidLoad(){console.error("H5 暂不支持 PageContainer 组件!")}render(){return r(e,null)}};export{n as taro_page_container_core}
@@ -0,0 +1 @@
1
+ import{r as o,h as a,H as r}from"./p-8c7cf814.js";let t=class{constructor(a){o(this,a)}componentDidLoad(){console.error("H5 暂不支持 FunctionalPageNavigator 组件!")}render(){return a(r,null)}};export{t as taro_functional_page_navigator_core}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as i,g as e,H as o}from"./p-8c7cf814.js";import{d as n}from"./p-5746d7ce.js";let r=class{constructor(i){t(this,i),this.onChange=s(this,"onselect",7),this.onSelectStart=s(this,"onselectstart",7),this.onSelectEnd=s(this,"onselectend",7),this.initialPosition="0",this.paddingVertical=0,this.isInit=!1,this.isMove=!1,this.handleSelected=n((()=>{const t=this.el.childNodes;let s=0,i="0";for(const e in t){const o=t[e].offsetHeight;if(s+o/2>this.el.scrollTop){i=e;break}s+=o}this.el.scrollTo({top:s,behavior:"smooth"}),this.onChange.emit({curIndex:this.col,selectedIndex:i}),this.onSelectEnd.emit()}),500)}onScroll(t){this.isMove||(this.isMove=!0,this.onSelectStart.emit()),this.handleSelected()}onMouseEnd(){this.isMove&&(this.isMove=!1,this.handleSelected())}onTouchEnd(){this.isMove=!1,this.handleSelected()}componentDidUpdate(){if(!this.isInit){this.isInit=!0;const t=this.el.childNodes;let s=0,i=0;for(const e in t){const o=t[e];if(this.initialPosition===e||!o||"number"!=typeof o.offsetHeight)break;i+=o.offsetHeight,s++}this.el.scrollTo({top:i}),s>=t.length&&this.onChange.emit({curIndex:this.col,selectedIndex:s-1})}}render(){const{paddingVertical:t=0}=this;return i(o,{class:"taro-picker-view-column-container",style:{"padding-top":`${t}px`,"padding-bottom":`${t}px`}})}get el(){return e(this)}};r.style=".taro-picker-view-column-container{display:-ms-flexbox;display:flex;overflow:scroll;overflow-x:hidden;position:relative;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;text-align:center}.taro-picker-view-column-container::-webkit-scrollbar{display:none}";export{r as taro_picker_view_column_core}