@xiping/react-components 1.0.43 → 1.0.49

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 (255) hide show
  1. package/dist/cjs/_virtual/_commonjsHelpers.js +1 -0
  2. package/dist/cjs/_virtual/delegate.js +1 -0
  3. package/dist/cjs/_virtual/download.js +1 -0
  4. package/dist/cjs/_virtual/download2.js +1 -0
  5. package/dist/cjs/_virtual/index.js +1 -0
  6. package/dist/cjs/_virtual/index2.js +1 -0
  7. package/dist/cjs/components/shimmer-button/ShimmerButton.js +1 -1
  8. package/dist/cjs/components/shiny-button/ShinyButton.js +1 -1
  9. package/dist/cjs/components/sparkles-text/SparklesText.js +1 -1
  10. package/dist/cjs/components/subtitle-player/SubtitlePlayer.d.ts +51 -0
  11. package/dist/cjs/components/subtitle-player/SubtitlePlayer.js +3 -0
  12. package/dist/cjs/components/subtitle-player/index.d.ts +2 -0
  13. package/dist/cjs/components/txt-editor/TxtEditor.d.ts +5 -4
  14. package/dist/cjs/components/txt-editor/TxtEditor.js +32 -1
  15. package/dist/cjs/components/txt-reader/TxtReader.js +1 -1
  16. package/dist/cjs/components/txt-reader/index.module.css.js +1 -1
  17. package/dist/cjs/components/variable-proximity/index.d.ts +10 -0
  18. package/dist/cjs/components/variable-proximity/index.js +1 -1
  19. package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.d.ts +23 -0
  20. package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.js +1 -0
  21. package/dist/cjs/components/video-subtitle-player/index.d.ts +3 -0
  22. package/dist/cjs/components/video-subtitle-player/useVideoSubtitleStore.d.ts +61 -0
  23. package/dist/cjs/components/video-subtitle-player/useVideoSubtitleStore.js +1 -0
  24. package/dist/cjs/index.d.ts +2 -1
  25. package/dist/cjs/index.js +1 -1
  26. package/dist/cjs/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/closest.js +1 -0
  27. package/dist/cjs/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/delegate.js +1 -0
  28. package/dist/cjs/node_modules/.pnpm/downloadjs@1.4.7/node_modules/downloadjs/download.js +3 -0
  29. package/dist/cjs/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js +1 -0
  30. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/_virtual/_rollupPluginBabelHelpers.js +2 -0
  31. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/constant.js +1 -0
  32. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/defaultConfig.js +1 -0
  33. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/error.js +1 -0
  34. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/events.js +1 -0
  35. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/index.umd.js +1 -0
  36. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/instManager.js +1 -0
  37. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/en.js +1 -0
  38. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/i18n.js +1 -0
  39. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/zh-cn.js +1 -0
  40. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/mediaProxy.js +1 -0
  41. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/player.js +1 -0
  42. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/basePlugin.js +1 -0
  43. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/hooksDescriptor.js +1 -0
  44. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/plugin.js +1 -0
  45. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/pluginsManager.js +1 -0
  46. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/preset.js +1 -0
  47. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/resizeObserver.js +1 -0
  48. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/back.js +5 -0
  49. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/download.js +15 -0
  50. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/exitCssFull.js +4 -0
  51. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/exitFull.js +4 -0
  52. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/loading.js +4 -0
  53. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pause.js +4 -0
  54. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pipIcon.js +5 -0
  55. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pipIconExit.js +8 -0
  56. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/play.js +4 -0
  57. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/playNext.js +4 -0
  58. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/replay.js +4 -0
  59. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/requestCssFull.js +4 -0
  60. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/requestFull.js +4 -0
  61. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/rotate.js +12 -0
  62. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/seekicon.js +7 -0
  63. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeLarge.js +5 -0
  64. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeMuted.js +5 -0
  65. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeSmall.js +5 -0
  66. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/iconPlugin.js +1 -0
  67. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/iconTools.js +3 -0
  68. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/optionList.js +1 -0
  69. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/optionsIcon.js +4 -0
  70. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/thumbnail.js +1 -0
  71. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/controls/index.js +9 -0
  72. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/cssFullScreen/index.js +5 -0
  73. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/definition/index.js +1 -0
  74. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/download/index.js +5 -0
  75. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/dynamicBg/index.js +2 -0
  76. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/enter/index.js +1 -0
  77. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/error/index.js +6 -0
  78. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fpsDetect/index.js +1 -0
  79. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fullscreen/backicon.js +2 -0
  80. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fullscreen/index.js +5 -0
  81. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/gapJump/index.js +1 -0
  82. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/keyboard/index.js +1 -0
  83. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/loading/index.js +4 -0
  84. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/logger/index.js +1 -0
  85. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/miniScreen/index.js +13 -0
  86. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/miniScreen/miniScreenIcon.js +4 -0
  87. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/mobile/index.js +19 -0
  88. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/mobile/touch.js +1 -0
  89. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/pc/index.js +1 -0
  90. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/pip/index.js +8 -0
  91. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/play/index.js +5 -0
  92. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/playNext/index.js +7 -0
  93. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/playbackRate/index.js +1 -0
  94. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/poster/index.js +2 -0
  95. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/index.js +7 -0
  96. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/innerList.js +1 -0
  97. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/miniProgress.js +4 -0
  98. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progressPreview/dotsApi.js +1 -0
  99. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progressPreview/index.js +11 -0
  100. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/prompt/index.js +3 -0
  101. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/replay/index.js +3 -0
  102. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/rotate/index.js +6 -0
  103. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/screenShot/index.js +6 -0
  104. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/start/index.js +4 -0
  105. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/stats/index.js +1 -0
  106. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/testspeed/index.js +1 -0
  107. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/time/index.js +6 -0
  108. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/time/timesegments.js +1 -0
  109. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/volume/index.js +11 -0
  110. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/waitingTimeoutJump/index.js +1 -0
  111. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/presets/default.js +1 -0
  112. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/state.js +1 -0
  113. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/stateClassMap.js +1 -0
  114. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/database.js +1 -0
  115. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/debug.js +1 -0
  116. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/draggabilly.js +1 -0
  117. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/sniffer.js +1 -0
  118. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/util.js +1 -0
  119. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/xgplayerTimeRange.js +1 -0
  120. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/version.js +1 -0
  121. package/dist/cjs/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/react.js +1 -0
  122. package/dist/cjs/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/vanilla.js +1 -0
  123. package/dist/cjs/packages/subtitle/lib/src/json-converter.js +1 -0
  124. package/dist/cjs/packages/subtitle/lib/src/parser.js +5 -0
  125. package/dist/cjs/react-components.css +1 -1
  126. package/dist/es/_virtual/_commonjsHelpers.js +6 -0
  127. package/dist/es/_virtual/delegate.js +7 -0
  128. package/dist/es/_virtual/download.js +7 -0
  129. package/dist/es/_virtual/download2.js +4 -0
  130. package/dist/es/_virtual/index.js +8 -0
  131. package/dist/es/_virtual/index2.js +4 -0
  132. package/dist/es/components/shimmer-button/ShimmerButton.js +29 -62
  133. package/dist/es/components/shiny-button/ShinyButton.js +15 -17
  134. package/dist/es/components/sparkles-text/SparklesText.js +30 -29
  135. package/dist/es/components/subtitle-player/SubtitlePlayer.d.ts +51 -0
  136. package/dist/es/components/subtitle-player/SubtitlePlayer.js +301 -0
  137. package/dist/es/components/subtitle-player/index.d.ts +2 -0
  138. package/dist/es/components/txt-editor/TxtEditor.d.ts +5 -4
  139. package/dist/es/components/txt-editor/TxtEditor.js +105 -43
  140. package/dist/es/components/txt-reader/TxtReader.js +48 -55
  141. package/dist/es/components/txt-reader/index.module.css.js +6 -2
  142. package/dist/es/components/variable-proximity/index.d.ts +10 -0
  143. package/dist/es/components/variable-proximity/index.js +166 -94
  144. package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.d.ts +23 -0
  145. package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.js +125 -0
  146. package/dist/es/components/video-subtitle-player/index.d.ts +3 -0
  147. package/dist/es/components/video-subtitle-player/useVideoSubtitleStore.d.ts +61 -0
  148. package/dist/es/components/video-subtitle-player/useVideoSubtitleStore.js +57 -0
  149. package/dist/es/index.d.ts +2 -1
  150. package/dist/es/index.js +60 -56
  151. package/dist/es/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/closest.js +21 -0
  152. package/dist/es/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/delegate.js +29 -0
  153. package/dist/es/node_modules/.pnpm/downloadjs@1.4.7/node_modules/downloadjs/download.js +77 -0
  154. package/dist/es/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js +111 -0
  155. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/_virtual/_rollupPluginBabelHelpers.js +197 -0
  156. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/constant.js +7 -0
  157. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/defaultConfig.js +87 -0
  158. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/error.js +64 -0
  159. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/events.js +67 -0
  160. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/index.umd.js +45 -0
  161. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/instManager.js +101 -0
  162. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/en.js +79 -0
  163. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/i18n.js +75 -0
  164. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/zh-cn.js +79 -0
  165. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/mediaProxy.js +466 -0
  166. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/player.js +1240 -0
  167. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/basePlugin.js +207 -0
  168. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/hooksDescriptor.js +130 -0
  169. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/plugin.js +366 -0
  170. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/pluginsManager.js +204 -0
  171. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/preset.js +14 -0
  172. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/resizeObserver.js +81 -0
  173. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/back.js +10 -0
  174. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/download.js +20 -0
  175. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/exitCssFull.js +9 -0
  176. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/exitFull.js +9 -0
  177. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/loading.js +9 -0
  178. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pause.js +9 -0
  179. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pipIcon.js +10 -0
  180. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pipIconExit.js +13 -0
  181. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/play.js +9 -0
  182. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/playNext.js +9 -0
  183. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/replay.js +9 -0
  184. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/requestCssFull.js +9 -0
  185. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/requestFull.js +9 -0
  186. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/rotate.js +17 -0
  187. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/seekicon.js +12 -0
  188. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeLarge.js +10 -0
  189. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeMuted.js +10 -0
  190. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeSmall.js +10 -0
  191. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/iconPlugin.js +35 -0
  192. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/iconTools.js +12 -0
  193. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/optionList.js +79 -0
  194. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/optionsIcon.js +193 -0
  195. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/thumbnail.js +141 -0
  196. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/controls/index.js +171 -0
  197. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/cssFullScreen/index.js +105 -0
  198. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/definition/index.js +110 -0
  199. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/download/index.js +83 -0
  200. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/dynamicBg/index.js +232 -0
  201. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/enter/index.js +42 -0
  202. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/error/index.js +68 -0
  203. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fpsDetect/index.js +116 -0
  204. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fullscreen/backicon.js +68 -0
  205. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fullscreen/index.js +150 -0
  206. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/gapJump/index.js +96 -0
  207. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/keyboard/index.js +299 -0
  208. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/loading/index.js +46 -0
  209. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/logger/index.js +171 -0
  210. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/miniScreen/index.js +169 -0
  211. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/miniScreen/miniScreenIcon.js +55 -0
  212. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/mobile/index.js +448 -0
  213. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/mobile/touch.js +138 -0
  214. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/pc/index.js +122 -0
  215. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/pip/index.js +216 -0
  216. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/play/index.js +102 -0
  217. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/playNext/index.js +78 -0
  218. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/playbackRate/index.js +100 -0
  219. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/poster/index.js +119 -0
  220. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/index.js +431 -0
  221. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/innerList.js +215 -0
  222. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/miniProgress.js +93 -0
  223. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progressPreview/dotsApi.js +175 -0
  224. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progressPreview/index.js +292 -0
  225. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/prompt/index.js +86 -0
  226. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/replay/index.js +92 -0
  227. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/rotate/index.js +106 -0
  228. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/screenShot/index.js +134 -0
  229. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/start/index.js +222 -0
  230. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/stats/index.js +152 -0
  231. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/testspeed/index.js +134 -0
  232. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/time/index.js +164 -0
  233. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/time/timesegments.js +146 -0
  234. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/volume/index.js +206 -0
  235. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/waitingTimeoutJump/index.js +53 -0
  236. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/presets/default.js +61 -0
  237. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/state.js +13 -0
  238. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/stateClassMap.js +34 -0
  239. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/database.js +83 -0
  240. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/debug.js +34 -0
  241. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/draggabilly.js +271 -0
  242. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/sniffer.js +111 -0
  243. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/util.js +517 -0
  244. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/xgplayerTimeRange.js +25 -0
  245. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/version.js +4 -0
  246. package/dist/es/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/react.js +19 -0
  247. package/dist/es/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/vanilla.js +14 -0
  248. package/dist/es/packages/subtitle/lib/src/json-converter.js +27 -0
  249. package/dist/es/packages/subtitle/lib/src/parser.js +56 -0
  250. package/dist/es/react-components.css +1 -1
  251. package/package.json +23 -21
  252. package/dist/cjs/components/qr-code/index.d.ts +0 -103
  253. package/dist/cjs/components/qr-code/index.js +0 -1
  254. package/dist/es/components/qr-code/index.d.ts +0 -103
  255. package/dist/es/components/qr-code/index.js +0 -49
@@ -0,0 +1,79 @@
1
+ import { createClass as h, classCallCheck as d } from "../../_virtual/_rollupPluginBabelHelpers.js";
2
+ import r from "../../utils/util.js";
3
+ import u from "../../plugin/plugin.js";
4
+ var v = /* @__PURE__ */ (function() {
5
+ function l(s) {
6
+ d(this, l), this.config = s.config, this.parent = s.root, this.root = r.createDom("ul", "", {}, "xg-options-list xg-list-slide-scroll ".concat(this.config.className)), s.root.appendChild(this.root);
7
+ var t = this.config.maxHeight;
8
+ t && this.setStyle({
9
+ maxHeight: t
10
+ }), this.onItemClick = this.onItemClick.bind(this), this.renderItemList();
11
+ var i = this.config.domEventType === "touch" ? "touchend" : "click";
12
+ this._delegates = u.delegate.call(this, this.root, "li", i, this.onItemClick);
13
+ }
14
+ return h(l, [{
15
+ key: "renderItemList",
16
+ value: function(t) {
17
+ var i = this, e = this.config, n = this.root;
18
+ t ? e.data = t : t = e.data, e.style && Object.keys(e.style).map(function(o) {
19
+ n.style[o] = e[o];
20
+ }), t.length > 0 && (this.attrKeys = Object.keys(t[0])), this.root.innerHTML = "", t.map(function(o, a) {
21
+ var c = o.selected ? "option-item selected" : "option-item";
22
+ o["data-index"] = a, i.root.appendChild(r.createDom("li", "<span>".concat(o.showText, "</span>"), o, c));
23
+ });
24
+ }
25
+ }, {
26
+ key: "onItemClick",
27
+ value: function(t) {
28
+ t.delegateTarget || (t.delegateTarget = t.target);
29
+ var i = t.delegateTarget;
30
+ if (i && r.hasClass(i, "selected"))
31
+ return !1;
32
+ var e = typeof this.config.onItemClick == "function" ? this.config.onItemClick : null, n = this.root.querySelector(".selected");
33
+ r.addClass(i, "selected"), n && r.removeClass(n, "selected"), e(t, {
34
+ from: n ? this.getAttrObj(n, this.attrKeys) : null,
35
+ to: this.getAttrObj(i, this.attrKeys)
36
+ });
37
+ }
38
+ }, {
39
+ key: "getAttrObj",
40
+ value: function(t, i) {
41
+ if (!t || !i)
42
+ return {};
43
+ var e = {};
44
+ i.map(function(o) {
45
+ e[o] = t.getAttribute(o);
46
+ });
47
+ var n = t.getAttribute("data-index");
48
+ return n && (e.index = Number(n)), e;
49
+ }
50
+ }, {
51
+ key: "show",
52
+ value: function() {
53
+ r.removeClass(this.root, "hide"), r.addClass(this.root, "active");
54
+ }
55
+ }, {
56
+ key: "hide",
57
+ value: function() {
58
+ r.removeClass(this.root, "active"), r.addClass(this.root, "hide");
59
+ }
60
+ }, {
61
+ key: "setStyle",
62
+ value: function(t) {
63
+ var i = this;
64
+ Object.keys(t).forEach(function(e) {
65
+ i.root.style[e] = t[e];
66
+ });
67
+ }
68
+ }, {
69
+ key: "destroy",
70
+ value: function() {
71
+ this._delegates && (this._delegates.map(function(t) {
72
+ t.destroy && t.destroy();
73
+ }), this._delegates = null), this.root.innerHTML = null, this.parent.removeChild(this.root), this.root = null;
74
+ }
75
+ }]), l;
76
+ })();
77
+ export {
78
+ v as default
79
+ };
@@ -0,0 +1,193 @@
1
+ import { inherits as x, createSuper as S, classCallCheck as _, defineProperty as u, assertThisInitialized as f, createClass as k, typeof as D } from "../../_virtual/_rollupPluginBabelHelpers.js";
2
+ import a from "../../utils/util.js";
3
+ import C from "../../utils/sniffer.js";
4
+ import { VIDEO_RESIZE as b, FULLSCREEN_CHANGE as w, CANPLAY as A, PLAYER_FOCUS as O } from "../../events.js";
5
+ import N, { POSITIONS as y } from "../../plugin/plugin.js";
6
+ import M from "./optionList.js";
7
+ var o = {
8
+ SIDE: "side",
9
+ MIDDLE: "middle",
10
+ DEFAULT: "default"
11
+ }, l = {
12
+ CLICK: "click",
13
+ HOVER: "hover"
14
+ };
15
+ function P(p, d) {
16
+ return p === o.SIDE ? d === y.CONTROLS_LEFT ? "xg-side-list xg-left-side" : "xg-side-list xg-right-side" : "";
17
+ }
18
+ var c = C.device === "mobile", G = /* @__PURE__ */ (function(p) {
19
+ x(h, p);
20
+ var d = S(h);
21
+ function h(s) {
22
+ var t;
23
+ return _(this, h), t = d.call(this, s), u(f(t), "onEnter", function(i) {
24
+ i.stopPropagation(), t.emit("icon_mouseenter", {
25
+ pluginName: t.pluginName
26
+ }), t.switchActiveState(i);
27
+ }), u(f(t), "switchActiveState", function(i) {
28
+ i.stopPropagation();
29
+ var e = t.config.toggleMode;
30
+ e === l.CLICK ? t.toggle(!t.isActive) : t.toggle(!0);
31
+ }), u(f(t), "onLeave", function(i) {
32
+ i.stopPropagation(), t.emit("icon_mouseleave", {
33
+ pluginName: t.pluginName
34
+ }), t.config.listType !== o.SIDE && t.isActive && t.toggle(!1);
35
+ }), u(f(t), "onListEnter", function(i) {
36
+ t.enterType = 2;
37
+ }), u(f(t), "onListLeave", function(i) {
38
+ t.enterType = 0, t.isActive && t.toggle(!1);
39
+ }), t.isIcons = !1, t.isActive = !1, t.curValue = null, t.curIndex = 0, t;
40
+ }
41
+ return k(h, [{
42
+ key: "updateLang",
43
+ value: function(t) {
44
+ this.renderItemList(this.config.list, this.curIndex);
45
+ }
46
+ }, {
47
+ key: "afterCreate",
48
+ value: function() {
49
+ var t = this, i = this.config;
50
+ this.initIcons(), c = c || this.domEventType === "touch", c && C.device === "mobile" && i.listType === o.DEFAULT && (i.listType = o.SIDE), i.hidePortrait && a.addClass(this.root, "portrait"), this.on([b, w], function() {
51
+ t._resizeList();
52
+ }), this.once(A, function() {
53
+ i.list && i.list.length > 0 && (t.renderItemList(i.list), t.show());
54
+ }), c && this.on(O, function() {
55
+ t.isActive && (t.optionsList && t.optionsList.hide(), t.isActive = !1);
56
+ }), c ? (i.toggleMode = l.CLICK, this.activeEvent = "touchend") : this.activeEvent = i.toggleMode === l.CLICK ? "click" : "mouseenter", i.toggleMode === l.CLICK ? this.bind(this.activeEvent, this.switchActiveState) : (this.bind(this.activeEvent, this.onEnter), this.bind("mouseleave", this.onLeave)), this.isIcons && this.bind("click", this.onIconClick);
57
+ }
58
+ }, {
59
+ key: "initIcons",
60
+ value: function() {
61
+ var t = this, i = this.icons, e = Object.keys(i), n = !1;
62
+ e.length > 0 && (e.forEach(function(r) {
63
+ t.appendChild(".xgplayer-icon", i[r]), !n && (n = i[r]);
64
+ }), this.isIcons = n), !n && (this.appendChild(".xgplayer-icon", a.createDom("span", "", {}, "icon-text")), a.addClass(this.find(".xgplayer-icon"), "btn-text"));
65
+ }
66
+ }, {
67
+ key: "show",
68
+ value: function(t) {
69
+ !this.config.list || this.config.list.length < 2 || a.addClass(this.root, "show");
70
+ }
71
+ }, {
72
+ key: "hide",
73
+ value: function() {
74
+ a.removeClass(this.root, "show");
75
+ }
76
+ }, {
77
+ key: "getTextByLang",
78
+ value: function(t, i, e) {
79
+ if (t === void 0)
80
+ return "";
81
+ var n = this.config.list;
82
+ !e && (e = this.player.lang), i = !i || a.isUndefined(t[i]) ? "text" : i, typeof t == "number" && (t = n[t]);
83
+ try {
84
+ return D(t[i]) === "object" ? t[i][e] || t[i].en : t[i];
85
+ } catch (r) {
86
+ return console.warn(r), "";
87
+ }
88
+ }
89
+ }, {
90
+ key: "toggle",
91
+ value: function(t) {
92
+ if (!(t === this.isActive || this.config.disable)) {
93
+ var i = this.player.controls, e = this.config.listType;
94
+ t ? (e === o.SIDE ? i.blur() : i.focus(), this.optionsList && this.optionsList.show()) : (e === o.SIDE ? i.focus() : i.focusAwhile(), this.optionsList && this.optionsList.hide()), this.isActive = t;
95
+ }
96
+ }
97
+ }, {
98
+ key: "onItemClick",
99
+ value: function(t, i) {
100
+ t.stopPropagation();
101
+ var e = this.config, n = e.listType, r = e.list;
102
+ this.curIndex = i.to.index, this.curItem = r[this.curIndex], this.changeCurrentText();
103
+ var g = this.config.isItemClickHide;
104
+ (g || c || n === o.SIDE) && this.toggle(!1);
105
+ }
106
+ }, {
107
+ key: "onIconClick",
108
+ value: function(t) {
109
+ }
110
+ }, {
111
+ key: "changeCurrentText",
112
+ value: function() {
113
+ if (!this.isIcons) {
114
+ var t = this.config.list, i = this.curIndex < t.length ? this.curIndex : 0, e = t[i];
115
+ e && (this.find(".icon-text").innerHTML = this.getTextByLang(e, "iconText"));
116
+ }
117
+ }
118
+ }, {
119
+ key: "renderItemList",
120
+ value: function(t, i) {
121
+ var e = this, n = this.config, r = this.optionsList, g = this.player;
122
+ if (typeof i == "number" && (this.curIndex = i, this.curItem = n.list[i]), r) {
123
+ r.renderItemList(t), this.changeCurrentText();
124
+ return;
125
+ }
126
+ var v = {
127
+ config: {
128
+ data: t || [],
129
+ className: P(n.listType, n.position),
130
+ onItemClick: function(E, T) {
131
+ e.onItemClick(E, T);
132
+ },
133
+ domEventType: c ? "touch" : "mouse"
134
+ },
135
+ root: n.listType === o.SIDE ? g.innerContainer || g.root : this.root
136
+ };
137
+ if (this.config.isShowIcon) {
138
+ var m = this.player.root.getBoundingClientRect(), I = m.height, L = n.listType === o.MIDDLE ? I - 50 : I;
139
+ L && n.heightLimit && (v.config.maxHeight = "".concat(L, "px")), this.optionsList = new M(v), this.changeCurrentText(), this.show();
140
+ }
141
+ this._resizeList();
142
+ }
143
+ }, {
144
+ key: "_resizeList",
145
+ value: function() {
146
+ if (this.config.heightLimit) {
147
+ var t = this.player.root.getBoundingClientRect(), i = t.height, e = this.config.listType === o.MIDDLE ? i - 50 : i;
148
+ this.optionsList && this.optionsList.setStyle({
149
+ maxHeight: "".concat(e, "px")
150
+ });
151
+ }
152
+ }
153
+ }, {
154
+ key: "destroy",
155
+ value: function() {
156
+ var t = this.config;
157
+ t.toggleMode === l.CLICK ? this.unbind(this.activeEvent, this.switchActiveState) : (this.unbind(this.activeEvent, this.onEnter), this.unbind("mouseleave", this.onLeave)), this.isIcons && this.unbind("click", this.onIconClick), this.optionsList && (this.optionsList.destroy(), this.optionsList = null);
158
+ }
159
+ }, {
160
+ key: "render",
161
+ value: function() {
162
+ if (this.config.isShowIcon)
163
+ return '<xg-icon class="xg-options-icon '.concat(this.config.className || "", `">
164
+ <div class="xgplayer-icon">
165
+ </div>
166
+ </xg-icon>`);
167
+ }
168
+ }], [{
169
+ key: "pluginName",
170
+ get: function() {
171
+ return "optionsIcon";
172
+ }
173
+ }, {
174
+ key: "defaultConfig",
175
+ get: function() {
176
+ return {
177
+ position: y.CONTROLS_RIGHT,
178
+ index: 100,
179
+ list: [],
180
+ listType: "default",
181
+ listStyle: {},
182
+ hidePortrait: !0,
183
+ isShowIcon: !1,
184
+ isItemClickHide: !0,
185
+ toggleMode: l.HOVER,
186
+ heightLimit: !0
187
+ };
188
+ }
189
+ }]), h;
190
+ })(N);
191
+ export {
192
+ G as default
193
+ };
@@ -0,0 +1,141 @@
1
+ import { inherits as w, createSuper as M, classCallCheck as I, createClass as T } from "../../_virtual/_rollupPluginBabelHelpers.js";
2
+ import y from "../../utils/util.js";
3
+ import { DURATION_CHANGE as x } from "../../events.js";
4
+ import P from "../../plugin/plugin.js";
5
+ var O = /* @__PURE__ */ (function(k) {
6
+ w(f, k);
7
+ var b = M(f);
8
+ function f(a) {
9
+ var t;
10
+ return I(this, f), t = b.call(this, a), t.ratio = 1, t.interval = null, t._preloadMark = {}, t;
11
+ }
12
+ return T(f, [{
13
+ key: "afterCreate",
14
+ value: function() {
15
+ var t = this;
16
+ this.usable && this.initThumbnail(), this.on([x], function() {
17
+ var e = t.config, i = e.pic_num, n = e.interval;
18
+ t.usable && (t.interval = n > 0 ? n : Math.round(t.player.duration * 1e3 / i) / 1e3);
19
+ });
20
+ }
21
+ }, {
22
+ key: "setConfig",
23
+ value: function(t) {
24
+ var e = this;
25
+ if (t) {
26
+ var i = Object.keys(t);
27
+ i.length < 1 || (i.forEach(function(n) {
28
+ e.config[n] = t[n];
29
+ }), this.usable && this.initThumbnail());
30
+ }
31
+ }
32
+ }, {
33
+ key: "usable",
34
+ get: function() {
35
+ var t = this.config, e = t.urls, i = t.pic_num;
36
+ return e && e.length > 0 && i > 0;
37
+ }
38
+ }, {
39
+ key: "initThumbnail",
40
+ value: function() {
41
+ var t = this.config, e = t.width, i = t.height, n = t.pic_num, r = t.interval;
42
+ this.ratio = e / i * 100, this.interval = r || Math.round(this.player.duration / n), this._preloadMark = {};
43
+ }
44
+ }, {
45
+ key: "getUrlByIndex",
46
+ value: function(t) {
47
+ return t >= 0 && t < this.config.urls.length ? this.config.urls[t] : "";
48
+ }
49
+ }, {
50
+ key: "preload",
51
+ value: function(t) {
52
+ var e = this;
53
+ if (!this._preloadMark[t]) {
54
+ var i = this.config.urls, n = i.length, r = [];
55
+ t > 0 && r.push(t - 1), r.push(t), t > 0 && t < n - 1 && r.push(t + 1), r.map(function(u) {
56
+ !e._preloadMark[u] && u >= 0 && u < n && (e._preloadMark[u] = 1, y.preloadImg(i[u], function() {
57
+ e._preloadMark[u] = 2;
58
+ }));
59
+ });
60
+ }
61
+ }
62
+ }, {
63
+ key: "getPosition",
64
+ value: function(t) {
65
+ var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, n = this.config, r = n.pic_num, u = n.row, g = n.col, h = n.width, l = n.height;
66
+ this.interval = Math.round(this.player.duration / r);
67
+ var s = Math.ceil(t / this.interval);
68
+ s = s > r ? r : s;
69
+ var m = s < u * g ? 0 : Math.ceil(s / (u * g)) - 1, v = s - m * (g * u), p = v > 0 ? Math.ceil(v / g) - 1 : 0, d = v > 0 ? v - p * g - 1 : 0, o = 0, c = 0;
70
+ if (e && i) {
71
+ var C = e / i;
72
+ C < h / l ? (c = i, o = c * (h / l)) : (o = e, c = o / (h / l));
73
+ } else i ? e || (c = i || l, o = c * (h / l)) : (o = e || h, c = o / (h / l));
74
+ var _ = this.getUrlByIndex(m);
75
+ return {
76
+ urlIndex: m,
77
+ rowIndex: p,
78
+ colIndex: d,
79
+ url: _,
80
+ height: c,
81
+ width: o,
82
+ style: {
83
+ backgroundImage: "url(".concat(_, ")"),
84
+ backgroundSize: "".concat(o * g, "px auto"),
85
+ backgroundPosition: "-".concat(d * o, "px -").concat(p * c, "px"),
86
+ width: "".concat(o, "px"),
87
+ height: "".concat(c, "px")
88
+ }
89
+ };
90
+ }
91
+ }, {
92
+ key: "update",
93
+ value: function(t, e) {
94
+ var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, r = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : "", u = this.config, g = u.pic_num, h = u.urls;
95
+ if (!(g <= 0 || !h || h.length === 0)) {
96
+ var l = this.getPosition(e, i, n);
97
+ this.preload(l.urlIndex), Object.keys(l.style).map(function(s) {
98
+ t.style[s] = l.style[s];
99
+ }), Object.keys(r).map(function(s) {
100
+ t.style[s] = r[s];
101
+ });
102
+ }
103
+ }
104
+ }, {
105
+ key: "changeConfig",
106
+ value: function() {
107
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
108
+ this.setConfig(t);
109
+ }
110
+ }, {
111
+ key: "createThumbnail",
112
+ value: function(t, e) {
113
+ var i = y.createDom("xg-thumbnail", "", {}, "thumbnail ".concat(e));
114
+ return t && t.appendChild(i), i;
115
+ }
116
+ }], [{
117
+ key: "pluginName",
118
+ get: function() {
119
+ return "thumbnail";
120
+ }
121
+ }, {
122
+ key: "defaultConfig",
123
+ get: function() {
124
+ return {
125
+ isShow: !1,
126
+ urls: [],
127
+ pic_num: 0,
128
+ col: 0,
129
+ row: 0,
130
+ height: 90,
131
+ width: 160,
132
+ scale: 1,
133
+ className: "",
134
+ hidePortrait: !1
135
+ };
136
+ }
137
+ }]), f;
138
+ })(P);
139
+ export {
140
+ O as default
141
+ };
@@ -0,0 +1,171 @@
1
+ import { inherits as y, createSuper as C, classCallCheck as b, defineProperty as d, assertThisInitialized as f, createClass as x, get as O, getPrototypeOf as T } from "../../_virtual/_rollupPluginBabelHelpers.js";
2
+ import l from "../../utils/util.js";
3
+ import m from "../../utils/sniffer.js";
4
+ import { MINI_STATE_CHANGE as S } from "../../events.js";
5
+ import _, { POSITIONS as c } from "../../plugin/plugin.js";
6
+ import g from "../../stateClassMap.js";
7
+ var I = /* @__PURE__ */ (function(v) {
8
+ y(a, v);
9
+ var p = C(a);
10
+ function a() {
11
+ var t;
12
+ b(this, a);
13
+ for (var i = arguments.length, e = new Array(i), o = 0; o < i; o++)
14
+ e[o] = arguments[o];
15
+ return t = p.call.apply(p, [this].concat(e)), d(f(t), "onMouseEnter", function(n) {
16
+ var r = f(t), s = r.player, h = r.playerConfig;
17
+ h.closeControlsBlur && s.focus({
18
+ autoHide: !1
19
+ });
20
+ }), d(f(t), "onMouseLeave", function(n) {
21
+ var r = f(t), s = r.player;
22
+ s.focus();
23
+ }), t;
24
+ }
25
+ return x(a, [{
26
+ key: "beforeCreate",
27
+ value: function(i) {
28
+ !i.config.mode && m.device === "mobile" && (i.config.mode = "flex"), i.player.config.marginControls && (i.config.autoHide = !1);
29
+ }
30
+ }, {
31
+ key: "afterCreate",
32
+ value: function() {
33
+ var i = this, e = this.config, o = e.disable, n = e.height, r = e.mode;
34
+ if (!o) {
35
+ r === "flex" && this.player.addClass(g.FLEX_CONTROLS);
36
+ var s = {
37
+ height: "".concat(n, "px")
38
+ };
39
+ Object.keys(s).map(function(u) {
40
+ i.root.style[u] = s[u];
41
+ }), this.left = this.find("xg-left-grid"), this.center = this.find("xg-center-grid"), this.right = this.find("xg-right-grid"), this.innerRoot = this.find("xg-inner-controls"), this.on(S, function(u) {
42
+ u ? l.addClass(i.root, "mini-controls") : l.removeClass(i.root, "mini-controls");
43
+ });
44
+ var h = this.playerConfig.isMobileSimulateMode;
45
+ m.device !== "mobile" && h !== "mobile" && (this.bind("mouseenter", this.onMouseEnter), this.bind("mouseleave", this.onMouseLeave));
46
+ }
47
+ }
48
+ }, {
49
+ key: "focus",
50
+ value: function() {
51
+ this.player.focus({
52
+ autoHide: !1
53
+ });
54
+ }
55
+ }, {
56
+ key: "focusAwhile",
57
+ value: function() {
58
+ this.player.focus({
59
+ autoHide: !0
60
+ });
61
+ }
62
+ }, {
63
+ key: "blur",
64
+ value: function() {
65
+ this.player.blur({
66
+ ignorePaused: !0
67
+ });
68
+ }
69
+ }, {
70
+ key: "recoverAutoHide",
71
+ value: function() {
72
+ this.config.autoHide && l.addClass(this.root, g.CONTROLS_AUTOHIDE);
73
+ }
74
+ }, {
75
+ key: "pauseAutoHide",
76
+ value: function() {
77
+ l.removeClass(this.root, g.CONTROLS_AUTOHIDE);
78
+ }
79
+ }, {
80
+ key: "show",
81
+ value: function(i) {
82
+ this.root.style.display = "", this.player.focus();
83
+ }
84
+ }, {
85
+ key: "hide",
86
+ value: function() {
87
+ this.root.style.display = "none";
88
+ }
89
+ }, {
90
+ key: "mode",
91
+ get: function() {
92
+ return this.config.mode;
93
+ }
94
+ }, {
95
+ key: "registerPlugin",
96
+ value: function(i) {
97
+ var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = arguments.length > 2 ? arguments[2] : void 0;
98
+ if (this.root) {
99
+ var n = i.defaultConfig || {};
100
+ if (!e.root) {
101
+ var r = e.position ? e.position : e.config && e.config.position ? e.config.position : n.position;
102
+ switch (r) {
103
+ case c.CONTROLS_LEFT:
104
+ e.root = this.left;
105
+ break;
106
+ case c.CONTROLS_RIGHT:
107
+ e.root = this.right;
108
+ break;
109
+ case c.CONTROLS_CENTER:
110
+ e.root = this.center;
111
+ break;
112
+ case c.CONTROLS:
113
+ e.root = this.root;
114
+ break;
115
+ default:
116
+ e.root = this.left;
117
+ }
118
+ return O(T(a.prototype), "registerPlugin", this).call(this, i, e, o);
119
+ }
120
+ }
121
+ }
122
+ }, {
123
+ key: "destroy",
124
+ value: function() {
125
+ m.device !== "mobile" && (this.unbind("mouseenter", this.onMouseEnter), this.unbind("mouseleave", this.onMouseLeave)), this.left = null, this.center = null, this.right = null, this.innerRoot = null;
126
+ }
127
+ }, {
128
+ key: "render",
129
+ value: function() {
130
+ var i = this.config, e = i.mode, o = i.autoHide, n = i.initShow, r = i.disable;
131
+ if (!r) {
132
+ var s = l.classNames({
133
+ "xgplayer-controls": !0
134
+ }, {
135
+ "flex-controls": e === "flex"
136
+ }, {
137
+ "bottom-controls": e === "bottom"
138
+ }, d({}, g.CONTROLS_AUTOHIDE, o), {
139
+ "xgplayer-controls-initshow": n || !o
140
+ });
141
+ return '<xg-controls class="'.concat(s, `" unselectable="on">
142
+ <xg-inner-controls class="xg-inner-controls xg-pos">
143
+ <xg-left-grid class="xg-left-grid">
144
+ </xg-left-grid>
145
+ <xg-center-grid class="xg-center-grid"></xg-center-grid>
146
+ <xg-right-grid class="xg-right-grid">
147
+ </xg-right-grid>
148
+ </xg-inner-controls>
149
+ </xg-controls>`);
150
+ }
151
+ }
152
+ }], [{
153
+ key: "pluginName",
154
+ get: function() {
155
+ return "controls";
156
+ }
157
+ }, {
158
+ key: "defaultConfig",
159
+ get: function() {
160
+ return {
161
+ disable: !1,
162
+ autoHide: !0,
163
+ mode: "",
164
+ initShow: !1
165
+ };
166
+ }
167
+ }]), a;
168
+ })(_);
169
+ export {
170
+ I as default
171
+ };
@@ -0,0 +1,105 @@
1
+ import { inherits as o, createSuper as u, classCallCheck as f, createClass as h, get as r, getPrototypeOf as l } from "../../_virtual/_rollupPluginBabelHelpers.js";
2
+ import { CSS_FULLSCREEN_CHANGE as p } from "../../events.js";
3
+ import { POSITIONS as C } from "../../plugin/plugin.js";
4
+ import { xgIconTips as g } from "../common/iconTools.js";
5
+ import y from "../common/iconPlugin.js";
6
+ import d from "../assets/requestCssFull.js";
7
+ import S from "../assets/exitCssFull.js";
8
+ var I = /* @__PURE__ */ (function(c) {
9
+ o(i, c);
10
+ var a = u(i);
11
+ function i() {
12
+ return f(this, i), a.apply(this, arguments);
13
+ }
14
+ return h(i, [{
15
+ key: "beforeCreate",
16
+ value: function(e) {
17
+ typeof e.player.config.cssFullscreen == "boolean" && (e.config.disable = !e.player.config.cssFullscreen);
18
+ }
19
+ }, {
20
+ key: "afterCreate",
21
+ value: function() {
22
+ var e = this;
23
+ r(l(i.prototype), "afterCreate", this).call(this), !this.config.disable && (this.config.target && (this.playerConfig.fullscreenTarget = this.config.target), this.initIcons(), this.on(p, function(t) {
24
+ e.animate(t);
25
+ }), this.btnClick = this.btnClick.bind(this), this.handleCssFullscreen = this.hook("cssFullscreen_change", this.btnClick, {
26
+ pre: function(n) {
27
+ n.preventDefault(), n.stopPropagation();
28
+ }
29
+ }), this.bind(["click", "touchend"], this.handleCssFullscreen));
30
+ }
31
+ }, {
32
+ key: "initIcons",
33
+ value: function() {
34
+ var e = this.icons, t = this.find(".xgplayer-icon");
35
+ t.appendChild(e.cssFullscreen), t.appendChild(e.exitCssFullscreen);
36
+ }
37
+ }, {
38
+ key: "btnClick",
39
+ value: function(e) {
40
+ e.preventDefault(), e.stopPropagation();
41
+ var t = this.player.isCssfullScreen;
42
+ this.emitUserAction(e, "switch_cssfullscreen", {
43
+ cssfullscreen: t
44
+ }), t ? this.player.exitCssFullscreen() : this.player.getCssFullscreen();
45
+ }
46
+ }, {
47
+ key: "animate",
48
+ value: function(e) {
49
+ this.root && (e ? this.setAttr("data-state", "full") : this.setAttr("data-state", "normal"), this.switchTips(e));
50
+ }
51
+ }, {
52
+ key: "switchTips",
53
+ value: function(e) {
54
+ var t = this.i18nKeys, n = this.find(".xg-tips");
55
+ n && this.changeLangTextKey(n, e ? t.EXITCSSFULLSCREEN_TIPS : t.CSSFULLSCREEN_TIPS);
56
+ }
57
+ }, {
58
+ key: "registerIcons",
59
+ value: function() {
60
+ return {
61
+ cssFullscreen: {
62
+ icon: d,
63
+ class: "xg-get-cssfull"
64
+ },
65
+ exitCssFullscreen: {
66
+ icon: S,
67
+ class: "xg-exit-cssfull"
68
+ }
69
+ };
70
+ }
71
+ }, {
72
+ key: "destroy",
73
+ value: function() {
74
+ r(l(i.prototype), "destroy", this).call(this), this.unbind(["click", "touchend"], this.btnClick);
75
+ }
76
+ }, {
77
+ key: "render",
78
+ value: function() {
79
+ if (!this.config.disable)
80
+ return `<xg-icon class='xgplayer-cssfullscreen'>
81
+ <div class="xgplayer-icon">
82
+ </div>
83
+ `.concat(g(this, "CSSFULLSCREEN_TIPS", this.playerConfig.isHideTips), `
84
+ </xg-icon>`);
85
+ }
86
+ }], [{
87
+ key: "pluginName",
88
+ get: function() {
89
+ return "cssFullscreen";
90
+ }
91
+ }, {
92
+ key: "defaultConfig",
93
+ get: function() {
94
+ return {
95
+ position: C.CONTROLS_RIGHT,
96
+ index: 1,
97
+ disable: !1,
98
+ target: null
99
+ };
100
+ }
101
+ }]), i;
102
+ })(y);
103
+ export {
104
+ I as default
105
+ };